[MPlayer-dev-eng] [PATCH]Fix decoding with -vc ffvc1vdpau

Gwenole Beauchesne gbeauchesne at splitted-desktop.com
Thu Feb 26 09:51:58 CET 2009


On Thu, 26 Feb 2009, Reimar Döffinger 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(!IMGFMT_IS_XVMC(imgfmt) || ctx->do_slices);
>>          avctx->slice_flags=SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD;
>
> It's not correct though, if slices are not used, VDPAU will not work
> either. The question is why do_slices is not (yet?) set.
> Alternatively, the assert could probably be moved somewhere else, like get_buffer,
> it is not really necessary to have it set here already I think.

Copying from the ffmpeg-devel list:
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.

BTW, re-adding the MSGTR_MPCODECS_VDPAUAcceleration would also be a 
cosmetical benefit.


More information about the MPlayer-dev-eng mailing list