[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 7.1)

Michael Niedermayer michaelni
Tue Feb 24 14:19:54 CET 2009


On Tue, Feb 24, 2009 at 09:32:04AM +0100, Gwenole Beauchesne wrote:
> On Tue, 24 Feb 2009, Michael Niedermayer wrote:
> 
> >> So, it won't be enough to simply fill in pix_fmts for
> >> all mpeg*_decoder with e.g. {PIX_FMT_VAAPI_MPEG2, PIX_FMT_VDPAU_MPEG2,
> >> PIX_FMT_YUV420P}. Besides, for someone that doesn't like duplicate
> >> code, you seem to accept duplicate data very easily. ;-)
> >
> > i suspect the 3 static const lists need less space than your function
> 
> Not that much. You'd need several lists.
> 
> - ff_query_pixfmt() is 192 bytes ;
> - ff_query_pixfmt(avctx, avctx->codec->id) is 21 bytes ;
> - avctx->get_format(avctx, pixfmt_mpeg2_420) is 17 bytes
> 
> You only need at most N ff_query_pixfmt() calls, where N is the number of 
> codecs we deal with. So, the current approach is around 276 bytes and 
> independant on the number of HW accelerators.
> 
> Now, your suggested approach requires as many lists as (HW accelerators) x 
> (chroma formats) x (sub-codecs).

You dont need to split pix_fmts per codec, its done currently and iam not
asking you to change it but i would be happy if you did change it :)

that is instead of
{PIX_FMT_VDPAU_H264 , PIX_FMT_YUV420P, -1}
{PIX_FMT_VDPAU_MPEG1, PIX_FMT_YUV420P, -1}
{PIX_FMT_VDPAU_VC1  , PIX_FMT_YUV420P, -1}
...
you can just have a single
{PIX_FMT_VDPAU, PIX_FMT_YUV420P, -1}
used by all

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090224/09179abd/attachment.pgp>



More information about the ffmpeg-devel mailing list