summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-07-29 11:03:00 -0700
committerJingning Han <jingning@google.com>2014-07-29 11:03:52 -0700
commit6646ea73e29abd0349153708c2bd6fece006632c (patch)
tree81a9e166b24ee3c56e44cf0c4e167436d2ac9f12 /vp9/encoder/vp9_encodeframe.c
parentc36f78b054db7633b2e3963d414fd205d7fea3c5 (diff)
downloadlibvpx-6646ea73e29abd0349153708c2bd6fece006632c.tar
libvpx-6646ea73e29abd0349153708c2bd6fece006632c.tar.gz
libvpx-6646ea73e29abd0349153708c2bd6fece006632c.tar.bz2
libvpx-6646ea73e29abd0349153708c2bd6fece006632c.zip
Clean up max/min allowed block size in rd_pick_partition
This commit replace the repetitive retrieve of max and min allowed partition from speed_feature with local variables max_size and min_size. Change-Id: Ib06f11f16615e4876e4dd5fb6a968c6bf5f7b216
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index b89e1b733..0d9002bac 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1917,6 +1917,9 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
const int xss = x->e_mbd.plane[1].subsampling_x;
const int yss = x->e_mbd.plane[1].subsampling_y;
+ BLOCK_SIZE min_size = cpi->sf.min_partition_size;
+ BLOCK_SIZE max_size = cpi->sf.max_partition_size;
+
int partition_none_allowed = !force_horz_split && !force_vert_split;
int partition_horz_allowed = !force_vert_split && yss <= xss &&
bsize >= BLOCK_8X8;
@@ -1934,15 +1937,12 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
// Determine partition types in search according to the speed features.
// The threshold set here has to be of square block size.
if (cpi->sf.auto_min_max_partition_size) {
- partition_none_allowed &= (bsize <= cpi->sf.max_partition_size &&
- bsize >= cpi->sf.min_partition_size);
- partition_horz_allowed &= ((bsize <= cpi->sf.max_partition_size &&
- bsize > cpi->sf.min_partition_size) ||
+ partition_none_allowed &= (bsize <= max_size && bsize >= min_size);
+ partition_horz_allowed &= ((bsize <= max_size && bsize > min_size) ||
force_horz_split);
- partition_vert_allowed &= ((bsize <= cpi->sf.max_partition_size &&
- bsize > cpi->sf.min_partition_size) ||
+ partition_vert_allowed &= ((bsize <= max_size && bsize > min_size) ||
force_vert_split);
- do_split &= bsize > cpi->sf.min_partition_size;
+ do_split &= bsize > min_size;
}
if (cpi->sf.use_square_partition_only) {
partition_horz_allowed &= force_horz_split;