]> granicus.if.org Git - libvpx/commitdiff
vp9: Adjust qp_thresh on slide change overshoot detection
authorMarco Paniconi <marpan@google.com>
Fri, 3 Aug 2018 16:20:55 +0000 (09:20 -0700)
committerMarco Paniconi <marpan@google.com>
Fri, 3 Aug 2018 16:29:16 +0000 (09:29 -0700)
For real-time screen-content mode: increase the
qp_thresh for max_Q setting on slide changes.
This will make bitrate spikes less likely on slide changes.

Change-Id: Ie13524a06490214456b1c9c042a864ea0d0750c5

vp9/encoder/vp9_ratectrl.c

index 47669a049a943d0cf2377db3810cea4b10cbb3dc..1ec6965174ef7a4af0c957b2736bd85b9a748827 100644 (file)
@@ -2820,7 +2820,7 @@ int vp9_encodedframe_overshoot(VP9_COMP *cpi, int frame_size, int *q) {
   // If this decision is not based on an encoded frame size but just on
   // scene/slide change detection (i.e., re_encode_overshoot_rt = 0), adjust the
   // qp_thresh and skip the (frame_size > thresh_rate) condition in this case.
-  if (!sf->re_encode_overshoot_rt) thresh_qp = rc->worst_quality >> 1;
+  if (!sf->re_encode_overshoot_rt) thresh_qp = 3 * (rc->worst_quality >> 2);
   if ((!sf->re_encode_overshoot_rt || frame_size > thresh_rate) &&
       cm->base_qindex < thresh_qp) {
     double rate_correction_factor =