shithub: libvpx

Download patch

ref: 8b810c7a78cbaac715cc516973de2bfdbf4067f9
parent: f39bf458e55c55f86d46b29a4b34d91a07e2ad1b
author: Deb Mukherjee <[email protected]>
date: Wed Aug 21 12:19:35 EDT 2013

Fixes on feature disabling split based on variance

Adds a couple of minor fixes, which may be absorbed in Jingning's
patch. Thanks to Guillaume for pointing these out.
Also adjusts the thresholds for speed 1 and 2 to 16 and 32
respectively, to keep quality drops small.

Results:
--------
derfraw300:  threshold = 16, psnr -0.082%, speedup 2-3%
             threshold = 32, psnr -0.218%, speedup 5-6%
stdhdraw250: threshold = 16, psnr -0.031%, speedup 2-3%
             threshold = 32, psnr -0.273%, speedup 5-6%

Change-Id: I4b11ae8296cca6c2a9f644be7e40de7c423b8330

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1713,15 +1713,16 @@
     unsigned int source_variancey;
     vp9_setup_src_planes(x, cpi->Source, mi_row, mi_col);
     source_variancey = get_sby_perpixel_variance(cpi, x, bsize);
-    if (source_variancey < cpi->sf.disable_split_var_thresh)
+    if (source_variancey < cpi->sf.disable_split_var_thresh) {
       do_split = 0;
-    else if (source_variancey < cpi->sf.disable_split_var_thresh / 2)
-      do_rect = 0;
+      if (source_variancey < cpi->sf.disable_split_var_thresh / 2)
+        do_rect = 0;
+    }
   }
   // PARTITION_SPLIT
   if (do_split &&
       (!cpi->sf.auto_min_max_partition_size ||
-       bsize >= cpi->sf.min_partition_size)) {
+       bsize > cpi->sf.min_partition_size)) {
     if (bsize > BLOCK_8X8) {
       subsize = get_subsize(bsize, PARTITION_SPLIT);
       for (i = 0; i < 4 && sum_rd < best_rd; ++i) {
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -793,7 +793,7 @@
 
         sf->auto_min_max_partition_size = 1;
         sf->auto_min_max_partition_interval = 1;
-        sf->disable_split_var_thresh = 32;
+        sf->disable_split_var_thresh = 16;
         sf->disable_filter_search_var_thresh = 16;
       }
       if (speed == 2) {
@@ -828,9 +828,9 @@
         sf->search_method = SQUARE;
         sf->subpel_iters_per_step = 1;
         sf->use_fast_lpf_pick = 1;
-        sf->disable_split_var_thresh = 64;
         sf->auto_min_max_partition_size = 1;
         sf->auto_min_max_partition_interval = 2;
+        sf->disable_split_var_thresh = 32;
         sf->disable_filter_search_var_thresh = 32;
       }
       if (speed == 3) {