shithub: libvpx

Download patch

ref: a8fa1bde720a8ab36eea27bbefe9a7f99b0737b3
parent: 3a1d99b3ef8bf065b3b8f3d8f1b306c340d966ea
author: Marco Paniconi <marpan@google.com>
date: Fri May 17 06:50:42 EDT 2019

vp9-rtc: Increase qp thresh for overshoot detection

For video mode (non-screen) in CBR real-time mode:
increase the qp thresh to trigger setting to active_worst
on scene changes. Avoid big overshoots in content with
scene changes.

Change-Id: I74721b07b0d7b742cbef468ece70cca7da0f89eb

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -3044,7 +3044,7 @@
   // Lower thresh_qp for video (more overshoot at lower Q) to be
   // more conservative for video.
   if (cpi->oxcf.content != VP9E_CONTENT_SCREEN)
-    thresh_qp = rc->worst_quality >> 1;
+    thresh_qp = 3 * (rc->worst_quality >> 2);
   // If this decision is not based on an encoded frame size but just on
   // scene/slide change detection (i.e., re_encode_overshoot_cbr_rt ==
   // FAST_DETECTION_MAXQ), for now skip the (frame_size > thresh_rate)