]> granicus.if.org Git - libvpx/commitdiff
Fix rectangular partition check in speed 1
authorJingning Han <jingning@google.com>
Mon, 30 Sep 2013 18:58:22 +0000 (11:58 -0700)
committerJingning Han <jingning@google.com>
Mon, 30 Sep 2013 19:14:36 +0000 (12:14 -0700)
Make encoder skip rectangular partition check in speed 1 and above,
when early termination was triggered in partition split.
Thanks Guillaume (gmartres@) for catching this issue.

This change makes bus_cif at 2000kbps speed 1 runtime goes down from
25612ms to 23438ms (about 9% speed-up), at the expense of -0.235%
performance down.

Change-Id: I98613fad081a261d30d5fa206f934ca70601c180

vp9/encoder/vp9_encodeframe.c

index a2adcd386fc607f66f1162dd663cd714b34c6827..8950a05a8f166ae0476ea9e453d997ff6264a096 100644 (file)
@@ -1568,12 +1568,12 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp, int mi_row,
         best_dist = sum_dist;
         best_rd = sum_rd;
         *(get_sb_partitioning(x, bsize)) = subsize;
-      } else {
-        // skip rectangular partition test when larger block size
-        // gives better rd cost
-        if (cpi->sf.less_rectangular_check)
-          do_rect &= !partition_none_allowed;
       }
+    } else {
+      // skip rectangular partition test when larger block size
+      // gives better rd cost
+      if (cpi->sf.less_rectangular_check)
+        do_rect &= !partition_none_allowed;
     }
     partition_split_done = 1;
     restore_context(cpi, mi_row, mi_col, a, l, sa, sl, bsize);