From: Jingning Han Date: Mon, 30 Sep 2013 18:58:22 +0000 (-0700) Subject: Fix rectangular partition check in speed 1 X-Git-Tag: v1.3.0~345 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=195061fedaeca7ac79ef810213c35fb06ed155aa;p=libvpx Fix rectangular partition check in speed 1 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 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index a2adcd386..8950a05a8 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -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);