ref: f81b0000f60ea6f513d1a13d2c23b0bdc9f9a5e6
parent: ff72cca8bb52c79d4d5416a1dbbe73d9f848798e
parent: 3861b25be1ac3f7c137e6058f91f8f6c90f4d28e
author: Marco Paniconi <[email protected]>
date: Tue Apr 12 17:18:41 EDT 2016
Merge "vp9: Fix to active_best for GF/ARF in 1 pass vbr."
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -905,9 +905,12 @@
// Use the lower of active_worst_quality and recent
// average Q as basis for GF/ARF best Q limit unless last frame was
// a key frame.
- if (rc->frames_since_key > 1 &&
- rc->avg_frame_qindex[INTER_FRAME] < active_worst_quality) {
- q = rc->avg_frame_qindex[INTER_FRAME];
+ if (rc->frames_since_key > 1) {
+ if (rc->avg_frame_qindex[INTER_FRAME] < active_worst_quality) {
+ q = rc->avg_frame_qindex[INTER_FRAME];
+ } else {
+ q = active_worst_quality;
+ }
} else {
q = rc->avg_frame_qindex[KEY_FRAME];
}