summaryrefslogtreecommitdiff
path: root/vp9/vp9_cx_iface.c
diff options
context:
space:
mode:
authorJerome Jiang <jianj@google.com>2021-07-13 11:54:34 -0700
committerJerome Jiang <jianj@google.com>2021-07-13 21:51:37 -0700
commit76ad30b6fb85f1462b28323220960d165d167e78 (patch)
tree9b9ab8902f4f1b86da88e4f1877a0f0c81c97b72 /vp9/vp9_cx_iface.c
parent69fc604636f740a57482f3898c2527d29663ee6d (diff)
downloadlibvpx-76ad30b6fb85f1462b28323220960d165d167e78.tar
libvpx-76ad30b6fb85f1462b28323220960d165d167e78.tar.gz
libvpx-76ad30b6fb85f1462b28323220960d165d167e78.tar.bz2
libvpx-76ad30b6fb85f1462b28323220960d165d167e78.zip
Add codec control for rtc external ratectrl lib
This will do 3 things: Turn off low motion computation Turn off gf update constrain on key frame frequency turn off content mode for cyclic refresh Those are used to verify the external ratectrl lib works as expected. Change-Id: Ic6e61498de82d6b3973e58df246cf5e05f838680
Diffstat (limited to 'vp9/vp9_cx_iface.c')
-rw-r--r--vp9/vp9_cx_iface.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index 2c09a3992..906f2b0b8 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -1039,6 +1039,18 @@ static vpx_codec_err_t ctrl_set_row_mt(vpx_codec_alg_priv_t *ctx,
return update_extra_cfg(ctx, &extra_cfg);
}
+static vpx_codec_err_t ctrl_set_rtc_external_ratectrl(vpx_codec_alg_priv_t *ctx,
+ va_list args) {
+ VP9_COMP *const cpi = ctx->cpi;
+ const unsigned int data = va_arg(args, unsigned int);
+ if (data) {
+ cpi->compute_frame_low_motion_onepass = 0;
+ cpi->rc.constrain_gf_key_freq_onepass_vbr = 0;
+ cpi->cyclic_refresh->content_mode = 0;
+ }
+ return VPX_CODEC_OK;
+}
+
static vpx_codec_err_t ctrl_enable_motion_vector_unit_test(
vpx_codec_alg_priv_t *ctx, va_list args) {
struct vp9_extracfg extra_cfg = ctx->extra_cfg;
@@ -1970,6 +1982,7 @@ static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
{ VP9E_SET_SVC_SPATIAL_LAYER_SYNC, ctrl_set_svc_spatial_layer_sync },
{ VP9E_SET_DELTA_Q_UV, ctrl_set_delta_q_uv },
{ VP9E_SET_DISABLE_LOOPFILTER, ctrl_set_disable_loopfilter },
+ { VP9E_SET_RTC_EXTERNAL_RATECTRL, ctrl_set_rtc_external_ratectrl },
{ VP9E_SET_EXTERNAL_RATE_CONTROL, ctrl_set_external_rate_control },
// Getters