[FFmpeg-devel] [PATCH] vc1.c: add support for HWAccel (take 4)
Gwenole Beauchesne
gbeauchesne
Thu Mar 19 16:56:50 CET 2009
Le 18 mars 09 ? 19:10, Kostya a ?crit :
>>> [...]
>>>> @@ -4277,8 +4279,16 @@ static int vc1_decode_frame(AVCodecContext
>>>> *avctx,
>>>> s->me.qpel_put= s->dsp.put_qpel_pixels_tab;
>>>> s->me.qpel_avg= s->dsp.avg_qpel_pixels_tab;
>>>>
>>>> - if ((CONFIG_VC1_VDPAU_DECODER || CONFIG_WMV3_VDPAU_DECODER)
>>>> - &&s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
>>>> + if (avctx->hwaccel) {
>>>> + if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0)
>>>> + return -1;
>>>> + if (avctx->hwaccel->decode_slice(avctx, buf_start, (buf
>>>> + buf_size) - buf_start) < 0)
>>>> + return -1;
>>>> + if (avctx->hwaccel->end_frame(avctx) < 0)
>>>> + return -1;
>>>> + }
>>>> + else if ((CONFIG_VC1_VDPAU_DECODER ||
>>>> CONFIG_WMV3_VDPAU_DECODER)
>>>> + &&s->avctx->codec-
>>>> >capabilities&CODEC_CAP_HWACCEL_VDPAU)
>>>> ff_vdpau_vc1_decode_picture(s, buf_start, (buf +
>>>> buf_size) - buf_start);
>>>> else {
>>>> ff_er_frame_start(s);
>>>
>>> No need to swap conditions here.
>>
>> What do you mean? The conditions are still in the same order:
>> CONFIG_*
>> then hw caps.
>
> I mean putting if(avctx->hwaccel){} before VDPAU chunk. If you don't
> have some
> technical reasons to do so please insert it between VDPAU and C
> decoding.
New patch herein attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.vc1.4.patch
Type: application/octet-stream
Size: 2416 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090319/f441e7c6/attachment.obj>
-------------- next part --------------
More information about the ffmpeg-devel
mailing list