[Libav-user] hw acceleration api is broken

Sampsa Riikonen sampsa.riikonen at iki.fi
Mon Jun 27 13:23:39 CEST 2016


Hello,

The hw acceleration subsystem is controlled by
AVCodecContext->hwaccel
AVCodecContext->hwaccel_context

Unfortunately, calling

codec=avcodec_find_decoder_by_name("h264_vdpau")
avcodec_alloc_context3(codec)

Does not populate neither "AVCodecContext->hwaccel" nor 
"AVCodecContext->hwaccel_context".

Following these lines ..

http://stackoverflow.com/questions/5985273/using-ffmpeg-hwaccel-from-c

I could maybe use:

libavcodec/utils.c :
static int setup_hwaccel(AVCodecContext *avctx, const enum AVPixelFormat 
fmt, const char *name)

.. but that function is not part of the public api!

So, the questions are:

- Is there an api endpoint to set "AVCodecContext->hwaccel" and 
"AVCodecContext->hwaccel_context" ?
- Is the hw acceleration api just a "scam" and I am supposed to 
implement the calls to vdpau by myself ?
- .. in that case, it would be nice to use libav/ffmpeg for sps and pps 
parsing, but that is again, way out of the api..

Regards,

Sampsa



More information about the Libav-user mailing list