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

Michael Niedermayer michaelni
Mon Feb 23 23:08:10 CET 2009


On Mon, Feb 23, 2009 at 10:36:23PM +0100, Gwenole Beauchesne wrote:
> Le 23 f?vr. 09 ? 21:10, Michael Niedermayer a ?crit :
> 
> >>> this is broken actually, and ive not realized this until now ....
> >>> AVCodec.pix_fmts is the full and authrative list of suported  
> >>> pix_fmts
> >>>
> >>> thus all calls to this function can be replaced by
> >>> return avctx->get_format(avctx, avctx->codec->pix_fmts);
> >>>
> >>> and ff_query_pixfmt() droped
> >>
> >> What? How do you deal with registered HW accelerated codecs then?
> >
> > Its a list of pixel formats not hw decoders, you cant register new  
> > pixel
> > formats
> 
> Oh, great, you again changed your mind, you are not very consistent.  

It wasnt my idea to write a page of unneeded and poorly factored code.
Now dont blame me that after spliting it half turned out to be a 
x=x;


> 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);



> Please also point me to the patch that replaces the VDPAU PIX_FMTs, I  

what should that patch replace them with?


> 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.

its exactly what your patch does minus 1 page of useless code. I dont know
how i missed that this page was useless sooner.

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

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20090223/3a8b504c/attachment.pgp>



More information about the ffmpeg-devel mailing list