]> granicus.if.org Git - libvpx/commitdiff
vp9: Turn on the partition copy for speed 8. Tune threshold.
authorJerome Jiang <jianj@google.com>
Tue, 10 Jan 2017 20:43:22 +0000 (12:43 -0800)
committerJerome Jiang <jianj@google.com>
Wed, 11 Jan 2017 18:48:16 +0000 (10:48 -0800)
For speed 8, it speeds up the encoding on android by 6% for QVGA and
7.4% for VGA with the new threshold. Overall PSNR is improved by 0.667
for rtc.

Change-Id: I4a644560b32c0b5b4e9f49ffb953d000413a3732

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_speed_features.c

index 323c053edff58d94139228db9b724b60273424bb..096ff4f617088d7b524eea35c90fa389fbf1da5f 100644 (file)
@@ -516,6 +516,7 @@ void vp9_set_variance_partition_thresholds(VP9_COMP *cpi, int q) {
     // The thresholds below are not changed locally.
     if (is_key_frame) {
       cpi->vbp_threshold_sad = 0;
+      cpi->vbp_threshold_copy = 0;
       cpi->vbp_bsize_min = BLOCK_8X8;
     } else {
       if (cm->width <= 352 && cm->height <= 288)
@@ -525,8 +526,13 @@ void vp9_set_variance_partition_thresholds(VP9_COMP *cpi, int q) {
                                      ? (cpi->y_dequant[q][1] << 1)
                                      : 1000;
       cpi->vbp_bsize_min = BLOCK_16X16;
+      if (cm->width <= 352 && cm->height <= 288)
+        cpi->vbp_threshold_copy = 40960;
+      else
+        cpi->vbp_threshold_copy = (cpi->y_dequant[q][1] << 6) > 32000
+                                      ? (cpi->y_dequant[q][1] << 6)
+                                      : 32000;
     }
-    cpi->vbp_threshold_copy = cpi->vbp_thresholds[0] << 16;
     cpi->vbp_threshold_minmax = 15 + (q >> 3);
   }
 }
index 6561ce930d1e1a790ac85fe1cdcb6bb8151cce15..088c4d0a9ccebb9cbf821fb8f664d2e866d8b3fb 100644 (file)
@@ -497,8 +497,10 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, int speed,
 
   if (speed >= 8) {
     sf->adaptive_rd_thresh = 4;
-    // Disabled for now until the threshold is tuned.
-    sf->copy_partition_flag = 0;
+    // Enable partition copy
+    if (!cpi->use_svc && !cpi->resize_pending && !cpi->resize_state &&
+        !cpi->external_resize)
+      sf->copy_partition_flag = 1;
     if (sf->copy_partition_flag) {
       if (cpi->prev_partition == NULL) {
         cpi->prev_partition = (BLOCK_SIZE *)vpx_calloc(