aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2018-11-03 13:30:34 -0700
committerJames Zern <jzern@google.com>2018-11-09 17:41:31 -0800
commit6d3890ee34fd4937116fd7a671216e7a702f05b3 (patch)
tree8153cad1295374fd0dbbdf0a66be7c5583f1c057 /libavcodec
parent75625c555cbe3564eedd05721ace78d16f9f139a (diff)
downloadffmpeg-6d3890ee34fd4937116fd7a671216e7a702f05b3.tar.gz
libvpxenc,vp9: add enable-tpl option
enables temporal dependency model Signed-off-by: James Zern <jzern@google.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libvpxenc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 09f7a88452..e03dc3539a 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -111,6 +111,7 @@ typedef struct VPxEncoderContext {
int row_mt;
int tune_content;
int corpus_complexity;
+ int tpl_model;
} VPxContext;
/** String mappings for enum vp8e_enc_control_id */
@@ -146,6 +147,9 @@ static const char *const ctlidstr[] = {
#ifdef VPX_CTRL_VP9E_SET_TUNE_CONTENT
[VP9E_SET_TUNE_CONTENT] = "VP9E_SET_TUNE_CONTENT",
#endif
+#ifdef VPX_CTRL_VP9E_SET_TPL
+ [VP9E_SET_TPL] = "VP9E_SET_TPL",
+#endif
#endif
};
@@ -717,6 +721,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (ctx->tune_content >= 0)
codecctl_int(avctx, VP9E_SET_TUNE_CONTENT, ctx->tune_content);
#endif
+#ifdef VPX_CTRL_VP9E_SET_TPL
+ if (ctx->tpl_model >= 0)
+ codecctl_int(avctx, VP9E_SET_TPL, ctx->tpl_model);
+#endif
}
#endif
@@ -1157,6 +1165,9 @@ static const AVOption vp9_options[] = {
#if VPX_ENCODER_ABI_VERSION >= 14
{ "corpus-complexity", "corpus vbr complexity midpoint", OFFSET(corpus_complexity), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 10000, VE },
#endif
+#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
LEGACY_OPTIONS
{ NULL }
};