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

Michael Niedermayer michaelni
Tue Feb 24 15:39:31 CET 2009


On Tue, Feb 24, 2009 at 02:19:54PM +0100, Michael Niedermayer wrote:
> 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 :)

after seeing your patch, i think per codec pix_fmts really should be
removed.
This would make the code much simpler and cleaner. It also would greatly
simplify get_format() for user apps,having to test just for one pix_fmt
er hwaccel API instead of for one per codec X API


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- 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/56e2d875/attachment.pgp>



More information about the ffmpeg-devel mailing list