]> granicus.if.org Git - libvpx/commitdiff
vp9-rtc: Fix condition in regulate_q for cyclic_refresh
authorMarco Paniconi <marpan@google.com>
Mon, 27 Jan 2020 02:06:28 +0000 (18:06 -0800)
committerMarco Paniconi <marpan@google.com>
Mon, 27 Jan 2020 06:04:59 +0000 (22:04 -0800)
The bits_per_mb factor from cyclic refresh does not
need to be conditioned on seg_enabled, cr->apply_cyclic_refresh
is sufficient. This is more correct for the case where
the refresh is turned off/on dynamically.

Small/neutral change in bdrate metrics.

Change-Id: Ifbeda9d3e022e6b61cdefa1482d3075f076d7253

vp9/encoder/vp9_ratectrl.c

index cbafbf7b9af4f36b50e3377215dd997722c75e26..a5dbab631d27eb8157e08bb240d2c26de3c38234 100644 (file)
@@ -826,8 +826,7 @@ int vp9_rc_regulate_q(const VP9_COMP *cpi, int target_bits_per_frame,
   i = active_best_quality;
 
   do {
-    if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled &&
-        cr->apply_cyclic_refresh &&
+    if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cr->apply_cyclic_refresh &&
         (!cpi->oxcf.gf_cbr_boost_pct || !cpi->refresh_golden_frame)) {
       bits_per_mb_at_this_q =
           (int)vp9_cyclic_refresh_rc_bits_per_mb(cpi, i, correction_factor);