shithub: libvpx

Download patch

ref: 0c60db7def133eb93e9479480f7a019fc6386de0
parent: ccf4f47b994d4e6ea8e7a3a8f1279d6f03b5b570
author: Marco <[email protected]>
date: Wed May 11 08:18:53 EDT 2016

vp9: Fix to quality regression issue for 1 pass.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1217

Issue introduced in https://chromium-review.googlesource.com/#/c/339162/.
The factor on avg_frame_qindex[INTER_FRAME] in that CL, used for q-basis to
set active_best, can cause the QP to decrease too slowly or get stuck
in some cases when max-q=63.

Removing that factor fixes the regression in issue#1217.

Change-Id: I97fe28dca3c2bc2d852b1775f39c62164e032d4f

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -953,11 +953,10 @@
                              FIXED_GF_INTERVAL], cm->bit_depth);
       active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
     } else {
-      // Use the min of the average Q (with some increase) and
-      // active_worst_quality as basis for active_best.
+      // Use the min of the average Q and active_worst_quality as basis for
+      // active_best.
       if (cm->current_video_frame > 1) {
-        q = VPXMIN(((17 * rc->avg_frame_qindex[INTER_FRAME]) >> 4),
-                    active_worst_quality);
+        q = VPXMIN(rc->avg_frame_qindex[INTER_FRAME], active_worst_quality);
         active_best_quality = inter_minq[q];
       } else {
         active_best_quality = inter_minq[rc->avg_frame_qindex[KEY_FRAME]];