[FFmpeg-devel] hwaccel infrastructure in libavcodec

Gwenole Beauchesne gbeauchesne
Wed Mar 16 18:02:49 CET 2011


On Wed, 16 Mar 2011, Gregor Riepl wrote:

>> As much as possible should go into libavcodec.
>> How to do this is a different question.
>> If the API supports efficient readback, doing it all in libavcodec like it is done for CrystalHD is a good idea, requiring the least application changes, but often performance will be a lot lower.
> This sounds like what I would do.
> Correct me if I'm wrong, but the current hwaccel modules split codec
> initialization between ffmpeg and MPlayer, as there is no real
> setup/shutdown facility in libavcodec. I think struct AVHWAccel should
> have two additional function pointers for these procedures, like so:
> int (*create_decoder)(AVCodecContext *avctx);
> int (*destroy_decoder)(AVCodecContext *avctx);

The v2 proposal has init/close functions for that purpose. One use-case is 
tidsp acceleration so that people can create their own context fromthere.

More information about the ffmpeg-devel mailing list