rtc: Allow QP to react faster for larger overshoot Increase the max_delta_up when overshoot is detected. This reduces overshoot in static clips with scene change fading in/out. Neutral/negligible stats change on rtc_derf/rtc/rtc_screen. Change-Id: I86bf7c67e6438e60bd828775c60248abd571579f
diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c index 744f5f5..9793a3f 100644 --- a/av1/encoder/ratectrl.c +++ b/av1/encoder/ratectrl.c
@@ -551,7 +551,7 @@ p_rc->buffer_level < (p_rc->optimal_buffer_level >> 1) && rc->frames_since_key > 4; int max_delta_down; - int max_delta_up = overshoot_buffer_low ? 60 : 20; + int max_delta_up = overshoot_buffer_low ? 120 : 20; const int change_avg_frame_bandwidth = abs(rc->avg_frame_bandwidth - rc->prev_avg_frame_bandwidth) > 0.1 * (rc->avg_frame_bandwidth); @@ -571,7 +571,7 @@ // Link max_delta_up to max_delta_down and buffer status. if (p_rc->buffer_level > p_rc->optimal_buffer_level) { max_delta_up = AOMMAX(4, max_delta_down); - } else { + } else if (!overshoot_buffer_low) { max_delta_up = AOMMAX(8, max_delta_down); } }