[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 6)
Sat Feb 21 00:48:40 CET 2009
Le 21 f?vr. 09 ? 00:27, Michael Niedermayer a ?crit :
>>> avctx->pix_fmt = ff_query_pixfmt(avctx, avctx->codec->id);
>> your intent is a generic function for all codecs, that sounds
>> overkill right now, IMO. What would be the default value for AVCodecs
>> not implementing pix_fmts?
> it wont be called for such codecs
ok, so we can still have preliminary checks for other codec_id or
codec flags and only replace the YUV420P cases?
e.g. keep the current SVQ3 test as is and then have only have the
ff_query_hwaccel_codec() replaced by your two lines?
And, to be clearer, have the ff_query_pixfmt() pass hw pixfmts first,
then AVCodec::pix_fmts or YUV420P if NULL?
>> (ii) what is codec id needed for?
> 2 codecs might use the same hw pixfmt but different hwaccels, maybe
> this is unlikely and i dont mind codec_id being droped considering
> is just a internal function
well, our current practise is to have hw pixfmt + CODEC in the name.
People should stick to that and I doubt hooks would be implemented in
the same way anyway.
Anyway, for me, a bijection is from one element to another one, not
through a third-party helper. ;-) I mean, having an a2b function but
using a c looks weird to me, including the name.
More information about the ffmpeg-devel