avcodec: add metadata to identify wrappers and hardware decoders

Multimedia / FFmpeg - wm4 [googlemail.com] - 14 December 2017 18:37 EST

Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields.

Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable.

Based on a patch by Philip Langdale.

Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.

b945fed629 avcodec: add metadata to identify wrappers and hardware decoders
doc/APIchanges | 4 ++++
libavcodec/audiotoolboxdec.c | 1 +
libavcodec/audiotoolboxenc.c | 1 +
libavcodec/avcodec.h | 26 ++++++++++++++++++++++++++
libavcodec/crystalhd.c | 3 ++-
libavcodec/cuviddec.c | 3 ++-
libavcodec/libcelt_dec.c | 1 +
libavcodec/libfdk-aacdec.c | 1 +
libavcodec/libfdk-aacenc.c | 1 +
libavcodec/libgsmdec.c | 2 ++
libavcodec/libgsmenc.c | 2 ++
libavcodec/libilbc.c | 1 +
libavcodec/libkvazaar.c | 2 ++
libavcodec/libmp3lame.c | 1 +
libavcodec/libopencore-amr.c | 1 +
libavcodec/libopenh264dec.c | 1 +
libavcodec/libopenh264enc.c | 1 +
libavcodec/libopenjpegdec.c | 1 +
libavcodec/libopenjpegenc.c | 1 +
libavcodec/libopusdec.c | 1 +
libavcodec/libopusenc.c | 1 +
libavcodec/librsvgdec.c | 1 +
libavcodec/libshine.c | 1 +
libavcodec/libspeexdec.c | 1 +
libavcodec/libspeexenc.c | 1 +
libavcodec/libtheoraenc.c | 1 +
libavcodec/libtwolame.c | 1 +
libavcodec/libvo-amrwbenc.c | 1 +
libavcodec/libvorbisenc.c | 1 +
libavcodec/libvpxdec.c | 2 ++
libavcodec/libvpxenc.c | 2 ++
libavcodec/libwavpackenc.c | 1 +
libavcodec/libwebpenc.c | 1 +
libavcodec/libwebpenc_animencoder.c | 1 +
libavcodec/libx264.c | 3 +++
libavcodec/libx265.c | 1 +
libavcodec/libxavs.c | 1 +
libavcodec/libxvid.c | 1 +
libavcodec/libzvbi-teletextdec.c | 1 +
libavcodec/mediacodecdec.c | 18 ++++++++++++------
libavcodec/mmaldec.c | 3 ++-
libavcodec/nvenc_h264.c | 9 ++++++---
libavcodec/nvenc_hevc.c | 6 ++++--
libavcodec/qsvdec_h2645.c | 6 ++++--
libavcodec/qsvdec_other.c | 9 ++++++---
libavcodec/qsvenc_h264.c | 3 ++-
libavcodec/qsvenc_hevc.c | 3 ++-
libavcodec/qsvenc_jpeg.c | 3 ++-
libavcodec/qsvenc_mpeg2.c | 3 ++-
libavcodec/rkmppdec.c | 3 ++-
libavcodec/v4l2_m2m_dec.c | 2 ++
libavcodec/v4l2_m2m_enc.c | 2 ++
libavcodec/vaapi_encode_h264.c | 3 ++-
libavcodec/vaapi_encode_h265.c | 3 ++-
libavcodec/vaapi_encode_mjpeg.c | 2 ++
libavcodec/vaapi_encode_mpeg2.c | 3 ++-
libavcodec/vaapi_encode_vp8.c | 3 ++-
libavcodec/vaapi_encode_vp9.c | 3 ++-
libavcodec/version.h | 4 ++--
libavcodec/videotoolboxenc.c | 3 ++-
60 files changed, 140 insertions(+), 32 deletions(-)

  • Share