From 195061fedaeca7ac79ef810213c35fb06ed155aa Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Mon, 30 Sep 2013 11:58:22 -0700 Subject: [PATCH] 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 --- vp9/encoder/vp9_encodeframe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.40.0