vp9 ext rc: copy under/overshoot% for all RC modes
authorJerome Jiang <jianj@google.com>
Thu, 17 Aug 2023 18:56:35 +0000 (14:56 -0400)
committerJerome Jiang <jianj@google.com>
Mon, 21 Aug 2023 14:05:15 +0000 (10:05 -0400)
Bug: b/295507002
Change-Id: Ie4b302b82fa2d83e0be450cea60c59907b37f954

vp9/vp9_cx_iface.c

index f5f2464..dfc02de 100644 (file)
@@ -1962,17 +1962,15 @@ static vpx_codec_err_t ctrl_set_external_rate_control(vpx_codec_alg_priv_t *ctx,
     ratectrl_config.target_bitrate_kbps = (int)(oxcf->target_bandwidth / 1000);
     ratectrl_config.frame_rate_num = oxcf->g_timebase.den;
     ratectrl_config.frame_rate_den = oxcf->g_timebase.num;
+    ratectrl_config.overshoot_percent = oxcf->over_shoot_pct;
+    ratectrl_config.undershoot_percent = oxcf->under_shoot_pct;
 
     if (oxcf->rc_mode == VPX_VBR) {
       ratectrl_config.rc_mode = VPX_RC_VBR;
-      ratectrl_config.overshoot_percent = oxcf->over_shoot_pct;
-      ratectrl_config.undershoot_percent = oxcf->under_shoot_pct;
     } else if (oxcf->rc_mode == VPX_Q) {
       ratectrl_config.rc_mode = VPX_RC_QMODE;
     } else if (oxcf->rc_mode == VPX_CQ) {
       ratectrl_config.rc_mode = VPX_RC_CQ;
-      ratectrl_config.overshoot_percent = oxcf->over_shoot_pct;
-      ratectrl_config.undershoot_percent = oxcf->under_shoot_pct;
     }
 
     codec_status = vp9_extrc_create(funcs, ratectrl_config, ext_ratectrl);