[FFmpeg-devel] [PATCH]VDPAU patch for MPEG1/2 decoding, round 1

Reimar Döffinger Reimar.Doeffinger
Mon Jan 5 18:15:58 CET 2009


On Mon, Jan 05, 2009 at 06:11:02PM +0100, Gwenole Beauchesne wrote:
> On Mon, 5 Jan 2009, Reimar D?ffinger wrote:
>>> @@ -1212,6 +1213,28 @@
>>>      }
>>>  }
>>>
>>> +static void mpeg_set_pixelformat(AVCodecContext *avctx){
>>> +    Mpeg1Context *s1 = avctx->priv_data;
>>> +    MpegEncContext *s = &s1->mpeg_enc_ctx;
>>> +
>>> +    if(avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){
>>
>> IMO CODEC_CAP_HWACCEL_VDPAU should not be used at all, checking codec_id
>> seems like the sanest way to me currently.
>
> What about such occurrence in mpegvideo.c? Enumerating all codec_id would 
> be rather suboptimal. Or, is it considered sane only in that file?

To my knowledge that's exactly two codec ids.
But if that is too much, you could define a macro.
But to be honest I can't tell for sure what makes sense, since it is a mystery
to me what the purpose of all those xvmc_acceleration,
CODEC_CAP_HWACCEL, CODEC_CAP_HWACCEL_VDPAU etc. is supposed to be,
I mean we don't have a CODEC_CAP_YV12, CODEC_CAP_RGB32 or
CODEC_CAP_DECODE etc. which as I see it all make just as much sense
(IMHO none).

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list