diff options
author | James Zern <jzern@google.com> | 2022-09-13 17:23:53 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-09-22 11:52:16 -0700 |
commit | bd7d69fe354cf5b3d6247f049af44bfa56f0531a (patch) | |
tree | acd0fe4e0f87e3468ab2a7815d49bfc8dca2a42b /libavcodec | |
parent | 48615f0a7861fd1c24195f74856f68e06c7ca73c (diff) | |
download | ffmpeg-bd7d69fe354cf5b3d6247f049af44bfa56f0531a.tar.gz |
avcodec/libvpxenc: add -min-gf-interval
this maps to the vpxenc argument with the same name and the
VP9E_SET_MIN_GF_INTERVAL codec control
Signed-off-by: James Zern <jzern@google.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libvpxenc.c | 11 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 09b56aae2a..667cffc200 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -131,6 +131,7 @@ typedef struct VPxEncoderContext { int tune_content; int corpus_complexity; int tpl_model; + int min_gf_interval; AVFifo *hdr10_plus_fifo; /** * If the driver does not support ROI then warn the first time we @@ -186,6 +187,9 @@ static const char *const ctlidstr[] = { #ifdef VPX_CTRL_VP9E_SET_TPL [VP9E_SET_TPL] = "VP9E_SET_TPL", #endif +#ifdef VPX_CTRL_VP9E_SET_MIN_GF_INTERVAL + [VP9E_SET_MIN_GF_INTERVAL] = "VP9E_SET_MIN_GF_INTERVAL", +#endif #endif }; @@ -1174,6 +1178,10 @@ static av_cold int vpx_init(AVCodecContext *avctx, if (ctx->tpl_model >= 0) codecctl_int(avctx, VP9E_SET_TPL, ctx->tpl_model); #endif +#ifdef VPX_CTRL_VP9E_SET_MIN_GF_INTERVAL + if (ctx->min_gf_interval >= 0) + codecctl_int(avctx, VP9E_SET_MIN_GF_INTERVAL, ctx->min_gf_interval); +#endif } #endif @@ -1912,6 +1920,9 @@ static const AVOption vp9_options[] = { #ifdef VPX_CTRL_VP9E_SET_TPL { "enable-tpl", "Enable temporal dependency model", OFFSET(tpl_model), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE }, #endif +#ifdef VPX_CTRL_VP9E_SET_MIN_GF_INTERVAL + { "min-gf-interval", "Minimum golden/alternate reference frame interval", OFFSET(min_gf_interval), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VE }, +#endif LEGACY_OPTIONS { NULL } }; diff --git a/libavcodec/version.h b/libavcodec/version.h index 2cad78e640..c2404cf9ee 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -30,7 +30,7 @@ #include "version_major.h" #define LIBAVCODEC_VERSION_MINOR 44 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ |