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

Michael Niedermayer michaelni
Tue Feb 24 02:25:10 CET 2009

On Mon, Feb 23, 2009 at 11:42:41PM +0100, Gwenole Beauchesne wrote:
> Le 23 f?vr. 09 ? 23:08, Michael Niedermayer a ?crit :
> >> Then, please be a bit clearer and tell me how you query the user for
> >> the best (and that the player actually supports) HW accelerator.
> >
> > i already did, its just:
> >
> > pix_fmt= avctx->get_format(avctx, avctx->codec->pix_fmts);
> That cannot be for all cases.

> >> Please also point me to the patch that replaces the VDPAU PIX_FMTs, I
> >
> > what should that patch replace them with?
> I don't know, you said "you can't register new pixel formats" and I  
> interpreted that as "you can't add new pixel formats", i.e. no HW  
> formats in pixfmt.h. Hence the confusion.

i meant
you cannot create new pixel formats _at runtime_
PIX_FMT_NB prevents it ...

> >> have just svn update'd the tree and I probably missed it or someone
> >> forgot to commit that bit.
> >>
> >> How is all this supposed to work now, specifically?
> >
> > This is very simple and really isnt "now" ...
> > each AVCodec has a constant list of pix_fmts, these get passed to  
> > get_format()
> > the user app through its get_format() chooses one of them and  
> > returns it
> > the codec looks up the matching AVHWAccel.
> Your precondition is not met: the list of pix_fmts is not constant for  
> some AVCodecs. see e.g. mpeg12.c, the pix_fmt depends on  
> chroma_format. 

i need more sleep, i have forgotten about that, still my point stands
that your page of code is not needed
3 static const lists for mpeg12 will do

> 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

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/389d41c1/attachment.pgp>

More information about the ffmpeg-devel mailing list