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

Gwenole Beauchesne gbeauchesne
Thu Feb 26 09:28:30 CET 2009


On Wed, 25 Feb 2009, Michael Niedermayer wrote:

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

Most likely VC-1 decoding was not tested since it was not widely available 
at that time. IIRC, do_slices is set if CODEC_CAP_DRAW_HORIZ_BAND is set 
in the codec, which VC-1 doesn't.

Would any of the following be correct?
- Set the flag for VC-1 et al.
- Set do_slices if hwaccel, as it would/were the case for do_dr1?

The latter sounds more practical.




More information about the ffmpeg-devel mailing list