[FFmpeg-devel] [PATCH]Fix MPlayer VC1 vdpau decoding

Carl Eugen Hoyos cehoyos
Wed Feb 25 17:40:33 CET 2009


HI!

Attached is a patch against MPlayer svn to fix decoding of VC1 with 
hardware acceleration.

Is the libavcodec part ok?

Carl Eugen
-------------- next part --------------
Index: libavcodec/vc1.c
===================================================================
--- libavcodec/vc1.c	(revision 17587)
+++ libavcodec/vc1.c	(working copy)
@@ -4379,6 +4379,7 @@
     CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
     NULL,
     .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"),
+    .pix_fmts = (enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE}
 };
 #endif
 
@@ -4395,5 +4396,6 @@
     CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
     NULL,
     .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"),
+    .pix_fmts = (enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE}
 };
 #endif
Index: libmpcodecs/vd_ffmpeg.c
===================================================================
--- libmpcodecs/vd_ffmpeg.c	(revision 28734)
+++ libmpcodecs/vd_ffmpeg.c	(working copy)
@@ -916,7 +916,7 @@
         avctx->draw_horiz_band = draw_slice;
         mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_XVMCAcceleratedMPEG2);
         assert(ctx->do_dr1);//these are must to!
-        assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
+//        assert(ctx->do_slices); //it is (vo_)ffmpeg bug if this fails
         avctx->slice_flags=SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD;
     }
     return selected_format;



More information about the ffmpeg-devel mailing list