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>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
pull/274/head
wm4 7 years ago committed by Luca Barbato
parent 5083785566
commit 47687a2f8a
  1. 25
      libavcodec/avcodec.h
  2. 1
      libavcodec/libdcadec.c
  3. 1
      libavcodec/libfaac.c
  4. 1
      libavcodec/libfdk-aacdec.c
  5. 1
      libavcodec/libfdk-aacenc.c
  6. 2
      libavcodec/libgsmdec.c
  7. 2
      libavcodec/libgsmenc.c
  8. 1
      libavcodec/libilbc.c
  9. 2
      libavcodec/libkvazaar.c
  10. 1
      libavcodec/libmp3lame.c
  11. 1
      libavcodec/libopencore-amr.c
  12. 1
      libavcodec/libopenh264dec.c
  13. 1
      libavcodec/libopenh264enc.c
  14. 1
      libavcodec/libopenjpegdec.c
  15. 1
      libavcodec/libopenjpegenc.c
  16. 1
      libavcodec/libopusdec.c
  17. 1
      libavcodec/libopusenc.c
  18. 1
      libavcodec/libschroedingerdec.c
  19. 1
      libavcodec/libschroedingerenc.c
  20. 1
      libavcodec/libspeexdec.c
  21. 1
      libavcodec/libspeexenc.c
  22. 1
      libavcodec/libtheoraenc.c
  23. 1
      libavcodec/libtwolame.c
  24. 1
      libavcodec/libvo-aacenc.c
  25. 1
      libavcodec/libvo-amrwbenc.c
  26. 1
      libavcodec/libvorbis.c
  27. 2
      libavcodec/libvpxdec.c
  28. 2
      libavcodec/libvpxenc.c
  29. 1
      libavcodec/libwavpackenc.c
  30. 1
      libavcodec/libwebpenc.c
  31. 2
      libavcodec/libx264.c
  32. 1
      libavcodec/libx265.c
  33. 1
      libavcodec/libxavs.c
  34. 1
      libavcodec/libxvid.c
  35. 3
      libavcodec/mmaldec.c
  36. 6
      libavcodec/qsvdec_h2645.c
  37. 9
      libavcodec/qsvdec_other.c
  38. 3
      libavcodec/qsvenc_h264.c
  39. 3
      libavcodec/qsvenc_hevc.c
  40. 3
      libavcodec/qsvenc_jpeg.c
  41. 3
      libavcodec/qsvenc_mpeg2.c
  42. 3
      libavcodec/vaapi_encode_h264.c
  43. 3
      libavcodec/vaapi_encode_h265.c
  44. 2
      libavcodec/vaapi_encode_mjpeg.c
  45. 3
      libavcodec/vaapi_encode_mpeg2.c
  46. 3
      libavcodec/vaapi_encode_vp8.c
  47. 3
      libavcodec/vaapi_encode_vp9.c

@ -885,6 +885,19 @@ typedef struct RcOverride{
*/
#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
/**
* Codec is backed by a hardware implementation. Typically used to
* identify a non-hwaccel hardware decoder.
*/
#define AV_CODEC_CAP_HARDWARE (1 << 17)
/**
* 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 << 18)
/**
* Pan Scan area.
* This specifies the area which should be displayed.
@ -2770,6 +2783,18 @@ typedef struct AVCodec {
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}
/**
* 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 decoder.
* 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
* may not be used outside of libavcodec and can be changed and

@ -202,4 +202,5 @@ AVCodec ff_libdcadec_decoder = {
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
.profiles = NULL_IF_CONFIG_SMALL(profiles),
.wrapper_name = "libdcadec",
};

@ -237,4 +237,5 @@ AVCodec ff_libfaac_encoder = {
AV_SAMPLE_FMT_NONE },
.profiles = NULL_IF_CONFIG_SMALL(profiles),
.channel_layouts = faac_channel_layouts,
.wrapper_name = "libfaac",
};

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

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

@ -130,6 +130,7 @@ AVCodec ff_libgsm_decoder = {
.decode = libgsm_decode_frame,
.flush = libgsm_flush,
.capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "libgsm",
};
AVCodec ff_libgsm_ms_decoder = {
@ -143,4 +144,5 @@ AVCodec ff_libgsm_ms_decoder = {
.decode = libgsm_decode_frame,
.flush = libgsm_flush,
.capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "libgsm",
};

@ -117,6 +117,7 @@ AVCodec ff_libgsm_encoder = {
.close = libgsm_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.wrapper_name = "libgsm",
};
AVCodec ff_libgsm_ms_encoder = {
@ -129,4 +130,5 @@ AVCodec ff_libgsm_ms_encoder = {
.close = libgsm_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.wrapper_name = "libgsm",
};

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

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

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

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

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

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

@ -438,4 +438,5 @@ AVCodec ff_libopenjpeg_decoder = {
.decode = libopenjpeg_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.priv_class = &class,
.wrapper_name = "libopenjpeg",
};

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

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

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

@ -393,4 +393,5 @@ AVCodec ff_libschroedinger_decoder = {
.decode = libschroedinger_decode_frame,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.flush = libschroedinger_flush,
.wrapper_name = "libschroedinger",
};

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

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

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

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

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

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

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

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

@ -137,6 +137,7 @@ AVCodec ff_libvpx_vp8_decoder = {
.close = vp8_free,
.decode = vp8_decode,
.capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1,
.wrapper_name = "libvpx",
};
#endif /* CONFIG_LIBVPX_VP8_DECODER */
@ -156,5 +157,6 @@ AVCodec ff_libvpx_vp9_decoder = {
.close = vp8_free,
.decode = vp8_decode,
.capabilities = AV_CODEC_CAP_AUTO_THREADS,
.wrapper_name = "libvpx",
};
#endif /* CONFIG_LIBVPX_VP9_DECODER */

@ -649,6 +649,7 @@ AVCodec ff_libvpx_vp8_encoder = {
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
.priv_class = &class_vp8,
.defaults = defaults,
.wrapper_name = "libvpx",
};
#endif /* CONFIG_LIBVPX_VP8_ENCODER */
@ -695,5 +696,6 @@ AVCodec ff_libvpx_vp9_encoder = {
.profiles = NULL_IF_CONFIG_SMALL(profiles),
.priv_class = &class_vp9,
.defaults = defaults,
.wrapper_name = "libvpx",
};
#endif /* CONFIG_LIBVPX_VP9_ENCODER */

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

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

@ -826,6 +826,7 @@ AVCodec ff_libx264_encoder = {
.init_static_data = X264_init_static,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libx264",
};
#endif
@ -852,5 +853,6 @@ AVCodec ff_libx262_encoder = {
.pix_fmts = pix_fmts_8bit,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "libx264",
};
#endif

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

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

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

@ -835,11 +835,12 @@ static const AVOption options[]={
.decode = ffmmal_decode, \
.flush = ffmmal_flush, \
.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, \
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_NONE}, \
.wrapper_name = "mmal", \
};
FFMMAL_DEC(h264, AV_CODEC_ID_H264)

@ -220,13 +220,14 @@ AVCodec ff_hevc_qsv_decoder = {
.decode = qsv_decode_frame,
.flush = qsv_decode_flush,
.close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_HYBRID,
.priv_class = &hevc_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_P010,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.bsfs = "hevc_mp4toannexb",
.wrapper_name = "qsv",
};
#endif
@ -262,12 +263,13 @@ AVCodec ff_h264_qsv_decoder = {
.decode = qsv_decode_frame,
.flush = qsv_decode_flush,
.close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_HYBRID,
.priv_class = &class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_P010,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.bsfs = "h264_mp4toannexb",
.wrapper_name = "qsv",
};
#endif

@ -190,11 +190,12 @@ AVCodec ff_mpeg2_qsv_decoder = {
.decode = qsv_decode_frame,
.flush = qsv_decode_flush,
.close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_HYBRID,
.priv_class = &mpeg2_qsv_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.wrapper_name = "qsv",
};
#endif
@ -225,11 +226,12 @@ AVCodec ff_vc1_qsv_decoder = {
.decode = qsv_decode_frame,
.flush = qsv_decode_flush,
.close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_HYBRID,
.priv_class = &vc1_qsv_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.wrapper_name = "qsv",
};
#endif
@ -260,10 +262,11 @@ AVCodec ff_vp8_qsv_decoder = {
.decode = qsv_decode_frame,
.flush = qsv_decode_flush,
.close = qsv_decode_close,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_HYBRID,
.priv_class = &vp8_qsv_class,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.wrapper_name = "qsv",
};
#endif

@ -127,7 +127,7 @@ AVCodec ff_h264_qsv_encoder = {
.init = qsv_enc_init,
.encode2 = qsv_enc_frame,
.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,
AV_PIX_FMT_P010,
AV_PIX_FMT_QSV,
@ -135,4 +135,5 @@ AVCodec ff_h264_qsv_encoder = {
.priv_class = &class,
.defaults = qsv_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "qsv",
};

@ -272,7 +272,7 @@ AVCodec ff_hevc_qsv_encoder = {
.init = qsv_enc_init,
.encode2 = qsv_enc_frame,
.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,
AV_PIX_FMT_P010,
AV_PIX_FMT_QSV,
@ -280,4 +280,5 @@ AVCodec ff_hevc_qsv_encoder = {
.priv_class = &class,
.defaults = qsv_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "qsv",
};

@ -83,9 +83,10 @@ AVCodec ff_mjpeg_qsv_encoder = {
.init = qsv_enc_init,
.encode2 = qsv_enc_frame,
.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,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.priv_class = &class,
.wrapper_name = "qsv",
};

@ -104,11 +104,12 @@ AVCodec ff_mpeg2_qsv_encoder = {
.init = qsv_enc_init,
.encode2 = qsv_enc_frame,
.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,
AV_PIX_FMT_QSV,
AV_PIX_FMT_NONE },
.priv_class = &class,
.defaults = qsv_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.wrapper_name = "qsv",
};

@ -1074,10 +1074,11 @@ AVCodec ff_h264_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2,
.close = &vaapi_encode_h264_close,
.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,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.wrapper_name = "vaapi",
};

@ -1018,10 +1018,11 @@ AVCodec ff_hevc_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2,
.close = &vaapi_encode_h265_close,
.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,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.wrapper_name = "vaapi",
};

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

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

@ -259,10 +259,11 @@ AVCodec ff_vp8_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2,
.close = &ff_vaapi_encode_close,
.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,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.wrapper_name = "vaapi",
};

@ -302,10 +302,11 @@ AVCodec ff_vp9_vaapi_encoder = {
.encode2 = &ff_vaapi_encode2,
.close = &ff_vaapi_encode_close,
.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,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
.wrapper_name = "vaapi",
};

Loading…
Cancel
Save