summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd_ffmpeg.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-11-03 16:39:52 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-08 18:03:35 +0200
commit98a6088a2028ace0693adbdc0ee419e896bee277 (patch)
tree5a0e17b3f7ac25f36cc1f21063dd4cc6c60140fe /libmpcodecs/vd_ffmpeg.c
parentd783c38ce18e7776529e8a94cf461676f3fa6e4c (diff)
downloadmpv-98a6088a2028ace0693adbdc0ee419e896bee277.tar.bz2
mpv-98a6088a2028ace0693adbdc0ee419e896bee277.tar.xz
video: simplify some tests with a new IMGFMT_IS_HWACCEL macro
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32575 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r--libmpcodecs/vd_ffmpeg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 8105eb8f83..556542f481 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -539,7 +539,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
return avctx->get_buffer(avctx, pic);
}
- if (IMGFMT_IS_XVMC(ctx->best_csp) || IMGFMT_IS_VDPAU(ctx->best_csp)) {
+ if (IMGFMT_IS_HWACCEL(ctx->best_csp)) {
type = MP_IMGTYPE_NUMBERED | (0xffff << 16);
} else
if (!pic->buffer_hints) {
@@ -571,13 +571,12 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
avctx->draw_horiz_band= draw_slice;
} else
avctx->draw_horiz_band= NULL;
- if(IMGFMT_IS_VDPAU(mpi->imgfmt)) {
+ if(IMGFMT_IS_HWACCEL(mpi->imgfmt)) {
avctx->draw_horiz_band= draw_slice;
}
#if CONFIG_XVMC
if(IMGFMT_IS_XVMC(mpi->imgfmt)) {
struct xvmc_pix_fmt *render = mpi->priv; //same as data[2]
- avctx->draw_horiz_band= draw_slice;
if(!avctx->xvmc_acceleration) {
mp_tmsg(MSGT_DECVIDEO, MSGL_INFO, "[VD_FFMPEG] The mc_get_buffer should work only with XVMC acceleration!!");
assert(0);
@@ -910,7 +909,7 @@ static enum PixelFormat get_format(struct AVCodecContext *avctx,
for(i=0;fmt[i]!=PIX_FMT_NONE;i++){
imgfmt = pixfmt2imgfmt(fmt[i]);
- if(!IMGFMT_IS_XVMC(imgfmt) && !IMGFMT_IS_VDPAU(imgfmt)) continue;
+ if(!IMGFMT_IS_HWACCEL(imgfmt)) continue;
mp_msg(MSGT_DECVIDEO, MSGL_V, "[VD_FFMPEG] Trying pixfmt=%d.\n", i);
if(init_vo(sh, fmt[i]) >= 0) {
break;