shithub: libvpx

Download patch

ref: 927fad48472b969065226e6e727e5e7670d2ff68
parent: ca9a262b1d7272a32da60273dbc607d0f54e0262
author: angiebird <angiebird@google.com>
date: Wed Aug 5 08:16:50 EDT 2020

Correct rq_model_update when recode_count == 1

This will reduce the avg recode times per frame form
3.19 to 2.81 when targeting 15% error margin for
target bitrate per frame.

Change-Id: I28c9ec09a1b1318c09fe5229ccb7e51b32b9dfb9

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -4324,7 +4324,7 @@
       const double prev_q_step = vp9_convert_qindex_to_q(prev_q, VPX_BITS_8);
       const int actual_bits = rq_history->rate_history[recode_count - 1];
       rq_model->ratio =
-          rq_model->ratio - (target_bits - actual_bits) / log2(prev_q_step);
+          rq_model->ratio + (target_bits - actual_bits) / log2(prev_q_step);
     }
   }
 }