]> granicus.if.org Git - libvpx/commitdiff
vp9-rtc: Increase partition threshold to 8x8 for high Q
authorMarco Paniconi <marpan@google.com>
Tue, 18 Feb 2020 23:04:32 +0000 (15:04 -0800)
committerMarco Paniconi <marpan@google.com>
Tue, 18 Feb 2020 23:36:30 +0000 (15:36 -0800)
For low resolutions: increase the partition threshold
to split to 8x8 blocks for high Q.
Some improvement in quality for low bitrates at low resoln.

On rtc_derf speed 7: ~1.7 bdrate gain for low bitrates.

Change-Id: I1900c32497b75da4e8b882fedc8f4b440b017480

vp9/encoder/vp9_encodeframe.c

index 0bac753ad4bddf45029f611266bee962001a4c46..13f9a1fbd2522448cdcd9c3a7de4be44e6c7b511 100644 (file)
@@ -649,6 +649,10 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q,
       thresholds[0] = threshold_base >> 3;
       thresholds[1] = threshold_base >> 1;
       thresholds[2] = threshold_base << 3;
+      if (cpi->rc.avg_frame_qindex[INTER_FRAME] > 220)
+        thresholds[2] = thresholds[2] << 2;
+      else if (cpi->rc.avg_frame_qindex[INTER_FRAME] > 200)
+        thresholds[2] = thresholds[2] << 1;
     } else if (cm->width < 1280 && cm->height < 720) {
       thresholds[1] = (5 * threshold_base) >> 2;
     } else if (cm->width < 1920 && cm->height < 1080) {