shithub: libvpx

Download patch

ref: 8d0c8c5e6bb1b410d5c6c7f176a6782717c9ff57
parent: 8e8e2d11bfb2f6dd90051b2ca897190fe99a0fbd
author: Marco <[email protected]>
date: Tue Jan 24 04:58:05 EST 2017

vp9: Adjust some parameters in aq-mode=3 mode.

Increase the qp-delta, mainly for low resolutions,
excluding case of very low bitrates.

avgPSNR/SSSIM gain of ~3-5% on rtc_derf set.
Small change on rtc set.

Change-Id: Ice03d04bd0340404d1957666ef154fd64fed0606

--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -455,7 +455,7 @@
   CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
   cr->percent_refresh = 10;
   if (cr->reduce_refresh) cr->percent_refresh = 5;
-  cr->max_qdelta_perc = 50;
+  cr->max_qdelta_perc = 60;
   cr->time_for_refresh = 0;
   cr->motion_thresh = 32;
   cr->rate_boost_fac = 15;
@@ -474,10 +474,15 @@
       cr->rate_boost_fac = 13;
     }
   }
-  // Adjust some parameters for low resolutions at low bitrates.
-  if (cm->width <= 352 && cm->height <= 288 && rc->avg_frame_bandwidth < 3400) {
-    cr->motion_thresh = 16;
-    cr->rate_boost_fac = 13;
+  // Adjust some parameters for low resolutions.
+  if (cm->width <= 352 && cm->height <= 288) {
+    if (rc->avg_frame_bandwidth < 3000) {
+      cr->motion_thresh = 16;
+      cr->rate_boost_fac = 13;
+    } else {
+      cr->max_qdelta_perc = 70;
+      cr->rate_ratio_qdelta = VPXMAX(cr->rate_ratio_qdelta, 2.5);
+    }
   }
   if (cpi->svc.spatial_layer_id > 0) {
     cr->motion_thresh = 4;