avcodec: add metadata to identify wrappers and hardware decoders

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 <philipl@overt.org>.

Merges Libav commit 47687a2f8a.
pull/274/head
wm4 7 years ago
parent 2e391a576c
commit b945fed629
  1. 4
      doc/APIchanges
  2. 1
      libavcodec/audiotoolboxdec.c
  3. 1
      libavcodec/audiotoolboxenc.c
  4. 26
      libavcodec/avcodec.h
  5. 3
      libavcodec/crystalhd.c
  6. 3
      libavcodec/cuviddec.c
  7. 1
      libavcodec/libcelt_dec.c
  8. 1
      libavcodec/libfdk-aacdec.c
  9. 1
      libavcodec/libfdk-aacenc.c
  10. 2
      libavcodec/libgsmdec.c
  11. 2
      libavcodec/libgsmenc.c
  12. 1
      libavcodec/libilbc.c
  13. 2
      libavcodec/libkvazaar.c
  14. 1
      libavcodec/libmp3lame.c
  15. 1
      libavcodec/libopencore-amr.c
  16. 1
      libavcodec/libopenh264dec.c
  17. 1
      libavcodec/libopenh264enc.c
  18. 1
      libavcodec/libopenjpegdec.c
  19. 1
      libavcodec/libopenjpegenc.c
  20. 1
      libavcodec/libopusdec.c
  21. 1
      libavcodec/libopusenc.c
  22. 1
      libavcodec/librsvgdec.c
  23. 1
      libavcodec/libshine.c
  24. 1
      libavcodec/libspeexdec.c
  25. 1
      libavcodec/libspeexenc.c
  26. 1
      libavcodec/libtheoraenc.c
  27. 1
      libavcodec/libtwolame.c
  28. 1
      libavcodec/libvo-amrwbenc.c
  29. 1
      libavcodec/libvorbisenc.c
  30. 2
      libavcodec/libvpxdec.c
  31. 2
      libavcodec/libvpxenc.c
  32. 1
      libavcodec/libwavpackenc.c
  33. 1
      libavcodec/libwebpenc.c
  34. 1
      libavcodec/libwebpenc_animencoder.c
  35. 3
      libavcodec/libx264.c
  36. 1
      libavcodec/libx265.c
  37. 1
      libavcodec/libxavs.c
  38. 1
      libavcodec/libxvid.c
  39. 1
      libavcodec/libzvbi-teletextdec.c
  40. 18
      libavcodec/mediacodecdec.c
  41. 3
      libavcodec/mmaldec.c
  42. 9
      libavcodec/nvenc_h264.c
  43. 6
      libavcodec/nvenc_hevc.c
  44. 6
      libavcodec/qsvdec_h2645.c
  45. 9
      libavcodec/qsvdec_other.c
  46. 3
      libavcodec/qsvenc_h264.c
  47. 3
      libavcodec/qsvenc_hevc.c
  48. 3
      libavcodec/qsvenc_jpeg.c
  49. 3
      libavcodec/qsvenc_mpeg2.c
  50. 3
      libavcodec/rkmppdec.c
  51. 2
      libavcodec/v4l2_m2m_dec.c
  52. 2
      libavcodec/v4l2_m2m_enc.c
  53. 3
      libavcodec/vaapi_encode_h264.c
  54. 3
      libavcodec/vaapi_encode_h265.c
  55. 2
      libavcodec/vaapi_encode_mjpeg.c
  56. 3
      libavcodec/vaapi_encode_mpeg2.c
  57. 3
      libavcodec/vaapi_encode_vp8.c
  58. 3
      libavcodec/vaapi_encode_vp9.c
  59. 4
      libavcodec/version.h
  60. 3
      libavcodec/videotoolboxenc.c

@ -15,6 +15,10 @@ libavutil: 2017-10-21
API changes, most recent first: API changes, most recent first:
2017-xx-xx - xxxxxxc - lavc 58.7.100 - avcodec.h
Add AV_CODEC_CAP_HARDWARE, AV_CODEC_CAP_HYBRID, and AVCodec.wrapper_name,
and mark all AVCodecs accordingly.
2017-xx-xx - xxxxxxx - lavu 56.4.100 / 56.7.0 - stereo3d.h 2017-xx-xx - xxxxxxx - lavu 56.4.100 / 56.7.0 - stereo3d.h
Add view field to AVStereo3D structure and AVStereo3DView enum. Add view field to AVStereo3D structure and AVStereo3DView enum.

@ -597,6 +597,7 @@ static av_cold int ffat_close_decoder(AVCodecContext *avctx)
.bsfs = bsf_name, \ .bsfs = bsf_name, \
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, \ .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \
.wrapper_name = "at", \
}; };
FFAT_DEC(aac, AV_CODEC_ID_AAC, "aac_adtstoasc") FFAT_DEC(aac, AV_CODEC_ID_AAC, "aac_adtstoasc")

@ -619,6 +619,7 @@ static const AVOption options[] = {
}, \ }, \
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
.profiles = PROFILES, \ .profiles = PROFILES, \
.wrapper_name = "at", \
}; };
static const uint64_t aac_at_channel_layouts[] = { static const uint64_t aac_at_channel_layouts[] = {

@ -1045,6 +1045,20 @@ typedef struct RcOverride{
*/ */
#define AV_CODEC_CAP_LOSSLESS 0x80000000 #define AV_CODEC_CAP_LOSSLESS 0x80000000
/**
* Codec is backed by a hardware implementation. Typically used to
* identify a non-hwaccel hardware decoder. For information about hwaccels, use
* avcodec_get_hw_config() instead.
*/
#define AV_CODEC_CAP_HARDWARE (1 << 18)
/**
* Codec is potentially backed by a hardware implementation, but not
* necessarily. This is used instead of AV_CODEC_CAP_HARDWARE, if the
* implementation provides some sort of internal fallback.
*/
#define AV_CODEC_CAP_HYBRID (1 << 19)
/** /**
* Pan Scan area. * Pan Scan area.
* This specifies the area which should be displayed. * This specifies the area which should be displayed.
@ -3377,6 +3391,18 @@ typedef struct AVCodec {
const AVClass *priv_class; ///< AVClass for the private context const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
/**
* Group name of the codec implementation.
* This is a short symbolic name of the wrapper backing this codec. A
* wrapper uses some kind of external implementation for the codec, such
* as an external library, or a codec implementation provided by the OS or
* the hardware.
* If this field is NULL, this is a builtin, libavcodec native codec.
* If non-NULL, this will be the suffix in AVCodec.name in most cases
* (usually AVCodec.name will be of the form "<codec_name>_<wrapper_name>").
*/
const char *wrapper_name;
/***************************************************************** /*****************************************************************
* No fields below this line are part of the public API. They * No fields below this line are part of the public API. They
* may not be used outside of libavcodec and can be changed and * may not be used outside of libavcodec and can be changed and

@ -786,8 +786,9 @@ static int crystalhd_receive_frame(AVCodecContext *avctx, AVFrame *frame)
.receive_frame = crystalhd_receive_frame, \ .receive_frame = crystalhd_receive_frame, \
.flush = flush, \ .flush = flush, \
.bsfs = bsf_name, \ .bsfs = bsf_name, \
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUYV422, AV_PIX_FMT_NONE}, \ .pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUYV422, AV_PIX_FMT_NONE}, \
.wrapper_name = "crystalhd", \
}; };
#if CONFIG_H264_CRYSTALHD_DECODER #if CONFIG_H264_CRYSTALHD_DECODER

@ -1127,13 +1127,14 @@ static const AVCodecHWConfigInternal *cuvid_hw_configs[] = {
.decode = cuvid_decode_frame, \ .decode = cuvid_decode_frame, \
.receive_frame = cuvid_output_frame, \ .receive_frame = cuvid_output_frame, \
.flush = cuvid_flush, \ .flush = cuvid_flush, \
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \
AV_PIX_FMT_NV12, \ AV_PIX_FMT_NV12, \
AV_PIX_FMT_P010, \ AV_PIX_FMT_P010, \
AV_PIX_FMT_P016, \ AV_PIX_FMT_P016, \
AV_PIX_FMT_NONE }, \ AV_PIX_FMT_NONE }, \
.hw_configs = cuvid_hw_configs, \ .hw_configs = cuvid_hw_configs, \
.wrapper_name = "cuvid", \
}; };
#if CONFIG_HEVC_CUVID_DECODER #if CONFIG_HEVC_CUVID_DECODER

@ -137,4 +137,5 @@ AVCodec ff_libcelt_decoder = {
.close = libcelt_dec_close, .close = libcelt_dec_close,
.decode = libcelt_dec_decode, .decode = libcelt_dec_decode,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "libcelt",
}; };

@ -385,4 +385,5 @@ AVCodec ff_libfdk_aac_decoder = {
.priv_class = &fdk_aac_dec_class, .priv_class = &fdk_aac_dec_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP, FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libfdk",
}; };

@ -428,4 +428,5 @@ AVCodec ff_libfdk_aac_encoder = {
.profiles = profiles, .profiles = profiles,
.supported_samplerates = aac_sample_rates, .supported_samplerates = aac_sample_rates,
.channel_layouts = aac_channel_layout, .channel_layouts = aac_channel_layout,
.wrapper_name = "libfdk",
}; };

@ -135,6 +135,7 @@ AVCodec ff_libgsm_decoder = {
.decode = libgsm_decode_frame, .decode = libgsm_decode_frame,
.flush = libgsm_flush, .flush = libgsm_flush,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "libgsm",
}; };
#endif #endif
#if CONFIG_LIBGSM_MS_DECODER #if CONFIG_LIBGSM_MS_DECODER
@ -149,5 +150,6 @@ AVCodec ff_libgsm_ms_decoder = {
.decode = libgsm_decode_frame, .decode = libgsm_decode_frame,
.flush = libgsm_flush, .flush = libgsm_flush,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "libgsm",
}; };
#endif #endif

@ -126,6 +126,7 @@ AVCodec ff_libgsm_encoder = {
.close = libgsm_encode_close, .close = libgsm_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.wrapper_name = "libgsm",
}; };
#endif #endif
#if CONFIG_LIBGSM_MS_ENCODER #if CONFIG_LIBGSM_MS_ENCODER
@ -139,5 +140,6 @@ AVCodec ff_libgsm_ms_encoder = {
.close = libgsm_encode_close, .close = libgsm_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.wrapper_name = "libgsm",
}; };
#endif #endif

@ -193,4 +193,5 @@ AVCodec ff_libilbc_encoder = {
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.defaults = ilbc_encode_defaults, .defaults = ilbc_encode_defaults,
.priv_class = &ilbc_enc_class, .priv_class = &ilbc_enc_class,
.wrapper_name = "libbilbc",
}; };

@ -305,4 +305,6 @@ AVCodec ff_libkvazaar_encoder = {
.close = libkvazaar_close, .close = libkvazaar_close,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libkvazaar",
}; };

@ -349,4 +349,5 @@ AVCodec ff_libmp3lame_encoder = {
0 }, 0 },
.priv_class = &libmp3lame_class, .priv_class = &libmp3lame_class,
.defaults = libmp3lame_defaults, .defaults = libmp3lame_defaults,
.wrapper_name = "libmp3lame",
}; };

@ -378,6 +378,7 @@ AVCodec ff_libopencore_amrwb_decoder = {
.close = amr_wb_decode_close, .close = amr_wb_decode_close,
.decode = amr_wb_decode_frame, .decode = amr_wb_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "libopencore_amrwb",
}; };
#endif /* CONFIG_LIBOPENCORE_AMRWB_DECODER */ #endif /* CONFIG_LIBOPENCORE_AMRWB_DECODER */

@ -147,4 +147,5 @@ AVCodec ff_libopenh264_decoder = {
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP, FF_CODEC_CAP_INIT_CLEANUP,
.bsfs = "h264_mp4toannexb", .bsfs = "h264_mp4toannexb",
.wrapper_name = "libopenh264",
}; };

@ -301,4 +301,5 @@ AVCodec ff_libopenh264_encoder = {
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.priv_class = &class, .priv_class = &class,
.wrapper_name = "libopenh264",
}; };

@ -512,4 +512,5 @@ AVCodec ff_libopenjpeg_decoder = {
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.max_lowres = 31, .max_lowres = 31,
.priv_class = &openjpeg_class, .priv_class = &openjpeg_class,
.wrapper_name = "libopenjpeg",
}; };

@ -778,4 +778,5 @@ AVCodec ff_libopenjpeg_encoder = {
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}, },
.priv_class = &openjpeg_class, .priv_class = &openjpeg_class,
.wrapper_name = "libopenjpeg",
}; };

@ -223,4 +223,5 @@ AVCodec ff_libopus_decoder = {
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.wrapper_name = "libopus",
}; };

@ -566,4 +566,5 @@ AVCodec ff_libopus_encoder = {
.supported_samplerates = libopus_sample_rates, .supported_samplerates = libopus_sample_rates,
.priv_class = &libopus_class, .priv_class = &libopus_class,
.defaults = libopus_defaults, .defaults = libopus_defaults,
.wrapper_name = "libopus",
}; };

@ -124,4 +124,5 @@ AVCodec ff_librsvg_decoder = {
.decode = librsvg_decode_frame, .decode = librsvg_decode_frame,
.priv_data_size = sizeof(LibRSVGContext), .priv_data_size = sizeof(LibRSVGContext),
.capabilities = AV_CODEC_CAP_LOSSLESS | AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_LOSSLESS | AV_CODEC_CAP_DR1,
.wrapper_name = "librsvg",
}; };

@ -146,4 +146,5 @@ AVCodec ff_libshine_encoder = {
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_STEREO,
0 }, 0 },
.wrapper_name = "libshine",
}; };

@ -200,4 +200,5 @@ AVCodec ff_libspeex_decoder = {
.decode = libspeex_decode_frame, .decode = libspeex_decode_frame,
.flush = libspeex_decode_flush, .flush = libspeex_decode_flush,
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.wrapper_name = "libspeex",
}; };

@ -365,4 +365,5 @@ AVCodec ff_libspeex_encoder = {
.supported_samplerates = (const int[]){ 8000, 16000, 32000, 0 }, .supported_samplerates = (const int[]){ 8000, 16000, 32000, 0 },
.priv_class = &speex_class, .priv_class = &speex_class,
.defaults = defaults, .defaults = defaults,
.wrapper_name = "libspeex",
}; };

@ -385,4 +385,5 @@ AVCodec ff_libtheora_encoder = {
.pix_fmts = (const enum AVPixelFormat[]){ .pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE
}, },
.wrapper_name = "libtheora",
}; };

@ -226,4 +226,5 @@ AVCodec ff_libtwolame_encoder = {
AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_STEREO,
0 }, 0 },
.supported_samplerates = twolame_samplerates, .supported_samplerates = twolame_samplerates,
.wrapper_name = "libtwolame",
}; };

@ -152,4 +152,5 @@ AVCodec ff_libvo_amrwbenc_encoder = {
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.priv_class = &amrwb_class, .priv_class = &amrwb_class,
.wrapper_name = "libvo_amrwbenc",
}; };

@ -377,4 +377,5 @@ AVCodec ff_libvorbis_encoder = {
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.priv_class = &vorbis_class, .priv_class = &vorbis_class,
.defaults = defaults, .defaults = defaults,
.wrapper_name = "libvorbis",
}; };

@ -289,6 +289,7 @@ AVCodec ff_libvpx_vp8_decoder = {
.close = vpx_free, .close = vpx_free,
.decode = vpx_decode, .decode = vpx_decode,
.capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1,
.wrapper_name = "libvpx",
}; };
#endif /* CONFIG_LIBVPX_VP8_DECODER */ #endif /* CONFIG_LIBVPX_VP8_DECODER */
@ -310,5 +311,6 @@ AVCodec ff_libvpx_vp9_decoder = {
.capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1,
.init_static_data = ff_vp9_init_static, .init_static_data = ff_vp9_init_static,
.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles), .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
.wrapper_name = "libvpx",
}; };
#endif /* CONFIG_LIBVPX_VP9_DECODER */ #endif /* CONFIG_LIBVPX_VP9_DECODER */

@ -1199,6 +1199,7 @@ AVCodec ff_libvpx_vp8_encoder = {
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE },
.priv_class = &class_vp8, .priv_class = &class_vp8,
.defaults = defaults, .defaults = defaults,
.wrapper_name = "libvpx",
}; };
#endif /* CONFIG_LIBVPX_VP8_ENCODER */ #endif /* CONFIG_LIBVPX_VP8_ENCODER */
@ -1229,5 +1230,6 @@ AVCodec ff_libvpx_vp9_encoder = {
.priv_class = &class_vp9, .priv_class = &class_vp9,
.defaults = defaults, .defaults = defaults,
.init_static_data = ff_vp9_init_static, .init_static_data = ff_vp9_init_static,
.wrapper_name = "libvpx",
}; };
#endif /* CONFIG_LIBVPX_VP9_ENCODER */ #endif /* CONFIG_LIBVPX_VP9_ENCODER */

@ -191,4 +191,5 @@ AVCodec ff_libwavpack_encoder = {
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SMALL_LAST_FRAME, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SMALL_LAST_FRAME,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_NONE }, AV_SAMPLE_FMT_NONE },
.wrapper_name = "libwavpack",
}; };

@ -109,4 +109,5 @@ AVCodec ff_libwebp_encoder = {
}, },
.priv_class = &class, .priv_class = &class,
.defaults = libwebp_defaults, .defaults = libwebp_defaults,
.wrapper_name = "libwebp",
}; };

@ -148,4 +148,5 @@ AVCodec ff_libwebp_anim_encoder = {
}, },
.priv_class = &class, .priv_class = &class,
.defaults = libwebp_defaults, .defaults = libwebp_defaults,
.wrapper_name = "libwebp",
}; };

@ -1026,6 +1026,7 @@ AVCodec ff_libx264_encoder = {
.init_static_data = X264_init_static, .init_static_data = X264_init_static,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP, FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libx264",
}; };
#endif #endif
@ -1050,6 +1051,7 @@ AVCodec ff_libx264rgb_encoder = {
.priv_class = &rgbclass, .priv_class = &rgbclass,
.defaults = x264_defaults, .defaults = x264_defaults,
.pix_fmts = pix_fmts_8bit_rgb, .pix_fmts = pix_fmts_8bit_rgb,
.wrapper_name = "libx264",
}; };
#endif #endif
@ -1076,5 +1078,6 @@ AVCodec ff_libx262_encoder = {
.pix_fmts = pix_fmts_8bit, .pix_fmts = pix_fmts_8bit,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP, FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libx264",
}; };
#endif #endif

@ -442,4 +442,5 @@ AVCodec ff_libx265_encoder = {
.priv_class = &class, .priv_class = &class,
.defaults = x265_defaults, .defaults = x265_defaults,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
.wrapper_name = "libx265",
}; };

@ -478,4 +478,5 @@ AVCodec ff_libxavs_encoder = {
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
.priv_class = &xavs_class, .priv_class = &xavs_class,
.defaults = xavs_defaults, .defaults = xavs_defaults,
.wrapper_name = "libxavs",
}; };

@ -934,4 +934,5 @@ AVCodec ff_libxvid_encoder = {
.priv_class = &xvid_class, .priv_class = &xvid_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP, FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libxvid",
}; };

@ -573,4 +573,5 @@ AVCodec ff_libzvbi_teletext_decoder = {
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY,
.flush = teletext_flush, .flush = teletext_flush,
.priv_class= &teletext_class, .priv_class= &teletext_class,
.wrapper_name = "libzvbi",
}; };

@ -539,10 +539,11 @@ AVCodec ff_h264_mediacodec_decoder = {
.decode = mediacodec_decode_frame, .decode = mediacodec_decode_frame,
.flush = mediacodec_decode_flush, .flush = mediacodec_decode_flush,
.close = mediacodec_decode_close, .close = mediacodec_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS,
.bsfs = "h264_mp4toannexb", .bsfs = "h264_mp4toannexb",
.hw_configs = mediacodec_hw_configs, .hw_configs = mediacodec_hw_configs,
.wrapper_name = "mediacodec",
}; };
#endif #endif
@ -557,10 +558,11 @@ AVCodec ff_hevc_mediacodec_decoder = {
.decode = mediacodec_decode_frame, .decode = mediacodec_decode_frame,
.flush = mediacodec_decode_flush, .flush = mediacodec_decode_flush,
.close = mediacodec_decode_close, .close = mediacodec_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS,
.bsfs = "hevc_mp4toannexb", .bsfs = "hevc_mp4toannexb",
.hw_configs = mediacodec_hw_configs, .hw_configs = mediacodec_hw_configs,
.wrapper_name = "mediacodec",
}; };
#endif #endif
@ -575,9 +577,10 @@ AVCodec ff_mpeg2_mediacodec_decoder = {
.decode = mediacodec_decode_frame, .decode = mediacodec_decode_frame,
.flush = mediacodec_decode_flush, .flush = mediacodec_decode_flush,
.close = mediacodec_decode_close, .close = mediacodec_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS,
.hw_configs = mediacodec_hw_configs, .hw_configs = mediacodec_hw_configs,
.wrapper_name = "mediacodec",
}; };
#endif #endif
@ -592,9 +595,10 @@ AVCodec ff_mpeg4_mediacodec_decoder = {
.decode = mediacodec_decode_frame, .decode = mediacodec_decode_frame,
.flush = mediacodec_decode_flush, .flush = mediacodec_decode_flush,
.close = mediacodec_decode_close, .close = mediacodec_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS,
.hw_configs = mediacodec_hw_configs, .hw_configs = mediacodec_hw_configs,
.wrapper_name = "mediacodec",
}; };
#endif #endif
@ -609,9 +613,10 @@ AVCodec ff_vp8_mediacodec_decoder = {
.decode = mediacodec_decode_frame, .decode = mediacodec_decode_frame,
.flush = mediacodec_decode_flush, .flush = mediacodec_decode_flush,
.close = mediacodec_decode_close, .close = mediacodec_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS,
.hw_configs = mediacodec_hw_configs, .hw_configs = mediacodec_hw_configs,
.wrapper_name = "mediacodec",
}; };
#endif #endif
@ -626,8 +631,9 @@ AVCodec ff_vp9_mediacodec_decoder = {
.decode = mediacodec_decode_frame, .decode = mediacodec_decode_frame,
.flush = mediacodec_decode_flush, .flush = mediacodec_decode_flush,
.close = mediacodec_decode_close, .close = mediacodec_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS,
.hw_configs = mediacodec_hw_configs, .hw_configs = mediacodec_hw_configs,
.wrapper_name = "mediacodec",
}; };
#endif #endif

@ -840,12 +840,13 @@ static const AVOption options[]={
.decode = ffmmal_decode, \ .decode = ffmmal_decode, \
.flush = ffmmal_flush, \ .flush = ffmmal_flush, \
.priv_class = &ffmmal_##NAME##_dec_class, \ .priv_class = &ffmmal_##NAME##_dec_class, \
.capabilities = AV_CODEC_CAP_DELAY, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \ .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \ .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
AV_PIX_FMT_YUV420P, \ AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_NONE}, \ AV_PIX_FMT_NONE}, \
.hw_configs = mmal_hw_configs, \ .hw_configs = mmal_hw_configs, \
.wrapper_name = "mmal", \
}; };
FFMMAL_DEC(h264, AV_CODEC_ID_H264) FFMMAL_DEC(h264, AV_CODEC_ID_H264)

@ -171,9 +171,10 @@ AVCodec ff_nvenc_encoder = {
.priv_data_size = sizeof(NvencContext), .priv_data_size = sizeof(NvencContext),
.priv_class = &nvenc_class, .priv_class = &nvenc_class,
.defaults = defaults, .defaults = defaults,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = ff_nvenc_pix_fmts, .pix_fmts = ff_nvenc_pix_fmts,
.wrapper_name = "nvenc",
}; };
#endif #endif
@ -199,9 +200,10 @@ AVCodec ff_nvenc_h264_encoder = {
.priv_data_size = sizeof(NvencContext), .priv_data_size = sizeof(NvencContext),
.priv_class = &nvenc_h264_class, .priv_class = &nvenc_h264_class,
.defaults = defaults, .defaults = defaults,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = ff_nvenc_pix_fmts, .pix_fmts = ff_nvenc_pix_fmts,
.wrapper_name = "nvenc",
}; };
#endif #endif
@ -227,7 +229,8 @@ AVCodec ff_h264_nvenc_encoder = {
.priv_data_size = sizeof(NvencContext), .priv_data_size = sizeof(NvencContext),
.priv_class = &h264_nvenc_class, .priv_class = &h264_nvenc_class,
.defaults = defaults, .defaults = defaults,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = ff_nvenc_pix_fmts, .pix_fmts = ff_nvenc_pix_fmts,
.wrapper_name = "nvenc",
}; };

@ -161,8 +161,9 @@ AVCodec ff_nvenc_hevc_encoder = {
.priv_class = &nvenc_hevc_class, .priv_class = &nvenc_hevc_class,
.defaults = defaults, .defaults = defaults,
.pix_fmts = ff_nvenc_pix_fmts, .pix_fmts = ff_nvenc_pix_fmts,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "nvenc",
}; };
#endif #endif
@ -188,6 +189,7 @@ AVCodec ff_hevc_nvenc_encoder = {
.priv_class = &hevc_nvenc_class, .priv_class = &hevc_nvenc_class,
.defaults = defaults, .defaults = defaults,
.pix_fmts = ff_nvenc_pix_fmts, .pix_fmts = ff_nvenc_pix_fmts,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "nvenc",
}; };

@ -211,7 +211,7 @@ AVCodec ff_hevc_qsv_decoder = {
.decode = qsv_decode_frame, .decode = qsv_decode_frame,
.flush = qsv_decode_flush, .flush = qsv_decode_flush,
.close = qsv_decode_close, .close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
.priv_class = &hevc_class, .priv_class = &hevc_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_P010, AV_PIX_FMT_P010,
@ -219,6 +219,7 @@ AVCodec ff_hevc_qsv_decoder = {
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.hw_configs = ff_qsv_hw_configs, .hw_configs = ff_qsv_hw_configs,
.bsfs = "hevc_mp4toannexb", .bsfs = "hevc_mp4toannexb",
.wrapper_name = "qsv",
}; };
#endif #endif
@ -245,7 +246,7 @@ AVCodec ff_h264_qsv_decoder = {
.decode = qsv_decode_frame, .decode = qsv_decode_frame,
.flush = qsv_decode_flush, .flush = qsv_decode_flush,
.close = qsv_decode_close, .close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
.priv_class = &class, .priv_class = &class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_P010, AV_PIX_FMT_P010,
@ -253,5 +254,6 @@ AVCodec ff_h264_qsv_decoder = {
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.hw_configs = ff_qsv_hw_configs, .hw_configs = ff_qsv_hw_configs,
.bsfs = "h264_mp4toannexb", .bsfs = "h264_mp4toannexb",
.wrapper_name = "qsv",
}; };
#endif #endif

@ -176,12 +176,13 @@ AVCodec ff_mpeg2_qsv_decoder = {
.decode = qsv_decode_frame, .decode = qsv_decode_frame,
.flush = qsv_decode_flush, .flush = qsv_decode_flush,
.close = qsv_decode_close, .close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
.priv_class = &mpeg2_qsv_class, .priv_class = &mpeg2_qsv_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.hw_configs = ff_qsv_hw_configs, .hw_configs = ff_qsv_hw_configs,
.wrapper_name = "qsv",
}; };
#endif #endif
@ -203,12 +204,13 @@ AVCodec ff_vc1_qsv_decoder = {
.decode = qsv_decode_frame, .decode = qsv_decode_frame,
.flush = qsv_decode_flush, .flush = qsv_decode_flush,
.close = qsv_decode_close, .close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
.priv_class = &vc1_qsv_class, .priv_class = &vc1_qsv_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.hw_configs = ff_qsv_hw_configs, .hw_configs = ff_qsv_hw_configs,
.wrapper_name = "qsv",
}; };
#endif #endif
@ -230,11 +232,12 @@ AVCodec ff_vp8_qsv_decoder = {
.decode = qsv_decode_frame, .decode = qsv_decode_frame,
.flush = qsv_decode_flush, .flush = qsv_decode_flush,
.close = qsv_decode_close, .close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
.priv_class = &vp8_qsv_class, .priv_class = &vp8_qsv_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.hw_configs = ff_qsv_hw_configs, .hw_configs = ff_qsv_hw_configs,
.wrapper_name = "qsv",
}; };
#endif #endif

@ -175,7 +175,7 @@ AVCodec ff_h264_qsv_encoder = {
.init = qsv_enc_init, .init = qsv_enc_init,
.encode2 = qsv_enc_frame, .encode2 = qsv_enc_frame,
.close = qsv_enc_close, .close = qsv_enc_close,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_P010, AV_PIX_FMT_P010,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
@ -183,4 +183,5 @@ AVCodec ff_h264_qsv_encoder = {
.priv_class = &class, .priv_class = &class,
.defaults = qsv_enc_defaults, .defaults = qsv_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "qsv",
}; };

@ -277,7 +277,7 @@ AVCodec ff_hevc_qsv_encoder = {
.init = qsv_enc_init, .init = qsv_enc_init,
.encode2 = qsv_enc_frame, .encode2 = qsv_enc_frame,
.close = qsv_enc_close, .close = qsv_enc_close,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_P010, AV_PIX_FMT_P010,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
@ -285,4 +285,5 @@ AVCodec ff_hevc_qsv_encoder = {
.priv_class = &class, .priv_class = &class,
.defaults = qsv_enc_defaults, .defaults = qsv_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "qsv",
}; };

@ -83,9 +83,10 @@ AVCodec ff_mjpeg_qsv_encoder = {
.init = qsv_enc_init, .init = qsv_enc_init,
.encode2 = qsv_enc_frame, .encode2 = qsv_enc_frame,
.close = qsv_enc_close, .close = qsv_enc_close,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.priv_class = &class, .priv_class = &class,
.wrapper_name = "qsv",
}; };

@ -104,11 +104,12 @@ AVCodec ff_mpeg2_qsv_encoder = {
.init = qsv_enc_init, .init = qsv_enc_init,
.encode2 = qsv_enc_frame, .encode2 = qsv_enc_frame,
.close = qsv_enc_close, .close = qsv_enc_close,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV, AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE }, AV_PIX_FMT_NONE },
.priv_class = &class, .priv_class = &class,
.defaults = qsv_enc_defaults, .defaults = qsv_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "qsv",
}; };

@ -588,12 +588,13 @@ static const AVCodecHWConfigInternal *rkmpp_hw_configs[] = {
.receive_frame = rkmpp_receive_frame, \ .receive_frame = rkmpp_receive_frame, \
.flush = rkmpp_flush, \ .flush = rkmpp_flush, \
.priv_class = &rkmpp_##NAME##_dec_class, \ .priv_class = &rkmpp_##NAME##_dec_class, \
.capabilities = AV_CODEC_CAP_DELAY, \ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
.caps_internal = AV_CODEC_CAP_AVOID_PROBING, \ .caps_internal = AV_CODEC_CAP_AVOID_PROBING, \
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \ .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \
AV_PIX_FMT_NONE}, \ AV_PIX_FMT_NONE}, \
.hw_configs = rkmpp_hw_configs, \ .hw_configs = rkmpp_hw_configs, \
.bsfs = BSFS, \ .bsfs = BSFS, \
.wrapper_name = "rkmpp", \
}; };
RKMPP_DEC(h264, AV_CODEC_ID_H264, "h264_mp4toannexb") RKMPP_DEC(h264, AV_CODEC_ID_H264, "h264_mp4toannexb")

@ -215,6 +215,8 @@ AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \
.receive_frame = v4l2_receive_frame,\ .receive_frame = v4l2_receive_frame,\
.close = ff_v4l2_m2m_codec_end,\ .close = ff_v4l2_m2m_codec_end,\
.bsfs = bsf_name, \ .bsfs = bsf_name, \
.capabilities = AV_CODEC_CAP_HARDWARE, \
.wrapper_name = "v4l2m2m", \
}; };
M2MDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb"); M2MDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb");

@ -335,6 +335,8 @@ AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
.send_frame = v4l2_send_frame,\ .send_frame = v4l2_send_frame,\
.receive_packet = v4l2_receive_packet,\ .receive_packet = v4l2_receive_packet,\
.close = ff_v4l2_m2m_codec_end,\ .close = ff_v4l2_m2m_codec_end,\
.capabilities = AV_CODEC_CAP_HARDWARE, \
.wrapper_name = "v4l2m2m", \
}; };
M2MENC(mpeg4,"MPEG4", AV_CODEC_ID_MPEG4); M2MENC(mpeg4,"MPEG4", AV_CODEC_ID_MPEG4);

@ -1089,10 +1089,11 @@ AVCodec ff_h264_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2, .encode2 = &ff_vaapi_encode2,
.close = &vaapi_encode_h264_close, .close = &vaapi_encode_h264_close,
.priv_class = &vaapi_encode_h264_class, .priv_class = &vaapi_encode_h264_class,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.defaults = vaapi_encode_h264_defaults, .defaults = vaapi_encode_h264_defaults,
.pix_fmts = (const enum AVPixelFormat[]) { .pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE, AV_PIX_FMT_NONE,
}, },
.wrapper_name = "vaapi",
}; };

@ -1018,10 +1018,11 @@ AVCodec ff_hevc_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2, .encode2 = &ff_vaapi_encode2,
.close = &vaapi_encode_h265_close, .close = &vaapi_encode_h265_close,
.priv_class = &vaapi_encode_h265_class, .priv_class = &vaapi_encode_h265_class,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.defaults = vaapi_encode_h265_defaults, .defaults = vaapi_encode_h265_defaults,
.pix_fmts = (const enum AVPixelFormat[]) { .pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE, AV_PIX_FMT_NONE,
}, },
.wrapper_name = "vaapi",
}; };

@ -422,9 +422,11 @@ AVCodec ff_mjpeg_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2, .encode2 = &ff_vaapi_encode2,
.close = &ff_vaapi_encode_close, .close = &ff_vaapi_encode_close,
.priv_class = &vaapi_encode_mjpeg_class, .priv_class = &vaapi_encode_mjpeg_class,
.capabilities = AV_CODEC_CAP_HARDWARE,
.defaults = vaapi_encode_mjpeg_defaults, .defaults = vaapi_encode_mjpeg_defaults,
.pix_fmts = (const enum AVPixelFormat[]) { .pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE, AV_PIX_FMT_NONE,
}, },
.wrapper_name = "vaapi",
}; };

@ -669,10 +669,11 @@ AVCodec ff_mpeg2_vaapi_encoder = {
.init = &vaapi_encode_mpeg2_init, .init = &vaapi_encode_mpeg2_init,
.encode2 = &ff_vaapi_encode2, .encode2 = &ff_vaapi_encode2,
.close = &vaapi_encode_mpeg2_close, .close = &vaapi_encode_mpeg2_close,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.defaults = vaapi_encode_mpeg2_defaults, .defaults = vaapi_encode_mpeg2_defaults,
.pix_fmts = (const enum AVPixelFormat[]) { .pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE, AV_PIX_FMT_NONE,
}, },
.wrapper_name = "vaapi",
}; };

@ -260,10 +260,11 @@ AVCodec ff_vp8_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2, .encode2 = &ff_vaapi_encode2,
.close = &ff_vaapi_encode_close, .close = &ff_vaapi_encode_close,
.priv_class = &vaapi_encode_vp8_class, .priv_class = &vaapi_encode_vp8_class,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.defaults = vaapi_encode_vp8_defaults, .defaults = vaapi_encode_vp8_defaults,
.pix_fmts = (const enum AVPixelFormat[]) { .pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE, AV_PIX_FMT_NONE,
}, },
.wrapper_name = "vaapi",
}; };

@ -304,10 +304,11 @@ AVCodec ff_vp9_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2, .encode2 = &ff_vaapi_encode2,
.close = &ff_vaapi_encode_close, .close = &ff_vaapi_encode_close,
.priv_class = &vaapi_encode_vp9_class, .priv_class = &vaapi_encode_vp9_class,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.defaults = vaapi_encode_vp9_defaults, .defaults = vaapi_encode_vp9_defaults,
.pix_fmts = (const enum AVPixelFormat[]) { .pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI, AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE, AV_PIX_FMT_NONE,
}, },
.wrapper_name = "vaapi",
}; };

@ -28,8 +28,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 6 #define LIBAVCODEC_VERSION_MINOR 7
#define LIBAVCODEC_VERSION_MICRO 103 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \

@ -2599,8 +2599,9 @@ AVCodec ff_hevc_videotoolbox_encoder = {
.init = vtenc_init, .init = vtenc_init,
.encode2 = vtenc_frame, .encode2 = vtenc_frame,
.close = vtenc_close, .close = vtenc_close,
.capabilities = AV_CODEC_CAP_DELAY, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
.priv_class = &hevc_videotoolbox_class, .priv_class = &hevc_videotoolbox_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP, FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "videotoolbox",
}; };

Loading…
Cancel
Save