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

Michael Niedermayer michaelni
Wed Feb 25 18:35:40 CET 2009


On Wed, Feb 25, 2009 at 05:40:33PM +0100, Carl Eugen Hoyos wrote:
> HI!
>
> Attached is a patch against MPlayer svn to fix decoding of VC1 with 
> hardware acceleration.
>
> Is the libavcodec part ok?
>
> Carl Eugen

> 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

looks ok


> 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;

why is this change needed but wasnt before?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090225/d0abe63b/attachment.pgp>



More information about the ffmpeg-devel mailing list