[FFmpeg-devel] hwaccel infrastructure in libavcodec

Gregor Riepl onitake
Wed Mar 16 16:01:45 CET 2011

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

Did I look in the wrong place?

More information about the ffmpeg-devel mailing list