summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2014-03-18 17:00:30 -0700
committerAlex Converse <aconverse@google.com>2014-03-24 12:54:30 -0700
commit5182a35004d6ba36ce0eab730fa7171271bc6619 (patch)
tree8476e5cea21f03e08efe0ceb65c9992be9c76c5b
parentf16f507c761a3c2985ee296963b64b026d2c0fc8 (diff)
downloadlibvpx-5182a35004d6ba36ce0eab730fa7171271bc6619.tar
libvpx-5182a35004d6ba36ce0eab730fa7171271bc6619.tar.gz
libvpx-5182a35004d6ba36ce0eab730fa7171271bc6619.tar.bz2
libvpx-5182a35004d6ba36ce0eab730fa7171271bc6619.zip
Don't subpartion inactive area in rd_use_partition.
Change-Id: I50db8d3c99eea39e46cc5876cb1f49513c084073
-rw-r--r--vp9/encoder/vp9_encodeframe.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index a388778a2..6890a8a61 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1616,6 +1616,7 @@ static void rd_use_partition(VP9_COMP *cpi,
BLOCK_SIZE sub_subsize = BLOCK_4X4;
int splits_below = 0;
BLOCK_SIZE bs_type = mi_8x8[0]->mbmi.sb_type;
+ int do_partition_search = 1;
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
return;
@@ -1639,12 +1640,23 @@ static void rd_use_partition(VP9_COMP *cpi,
}
save_context(cpi, mi_row, mi_col, a, l, sa, sl, bsize);
+ set_offsets(cpi, tile, mi_row, mi_col, bsize);
if (bsize == BLOCK_16X16) {
- set_offsets(cpi, tile, mi_row, mi_col, bsize);
x->mb_energy = vp9_block_energy(cpi, x, bsize);
}
- if (cpi->sf.partition_search_type == SEARCH_PARTITION &&
+ if (!x->in_active_map) {
+ do_partition_search = 0;
+ if (mi_row + (mi_step >> 1) < cm->mi_rows &&
+ mi_col + (mi_step >> 1) < cm->mi_cols) {
+ *(get_sb_partitioning(x, bsize)) = bsize;
+ bs_type = mi_8x8[0]->mbmi.sb_type = bsize;
+ subsize = bsize;
+ partition = PARTITION_NONE;
+ }
+ }
+ if (do_partition_search &&
+ cpi->sf.partition_search_type == SEARCH_PARTITION &&
cpi->sf.adjust_partitioning_from_last_frame) {
// Check if any of the sub blocks are further split.
if (partition == PARTITION_SPLIT && subsize > BLOCK_8X8) {
@@ -1774,7 +1786,8 @@ static void rd_use_partition(VP9_COMP *cpi,
last_part_rd = RDCOST(x->rdmult, x->rddiv, last_part_rate, last_part_dist);
}
- if (cpi->sf.adjust_partitioning_from_last_frame
+ if (do_partition_search
+ && cpi->sf.adjust_partitioning_from_last_frame
&& cpi->sf.partition_search_type == SEARCH_PARTITION
&& partition != PARTITION_SPLIT && bsize > BLOCK_8X8
&& (mi_row + mi_step < cm->mi_rows ||