summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJim Bankoski <jimbankoski@google.com>2013-06-11 09:29:21 -0700
committerJim Bankoski <jimbankoski@google.com>2013-06-11 09:29:21 -0700
commitfca6c82b29b0f19457807dfe42a65cdc23fa660f (patch)
tree0cb8907c289d465d7115aaef3a7cf6025955c5a2 /vp9/encoder
parent551f37d63d508d24dfe071454ca9f38df01c29e9 (diff)
downloadlibvpx-fca6c82b29b0f19457807dfe42a65cdc23fa660f.tar
libvpx-fca6c82b29b0f19457807dfe42a65cdc23fa660f.tar.gz
libvpx-fca6c82b29b0f19457807dfe42a65cdc23fa660f.tar.bz2
libvpx-fca6c82b29b0f19457807dfe42a65cdc23fa660f.zip
Fix rd partition search for corner blocks
This commit enables proper partition type search for the bottom- right corner blocks. Change-Id: Id1123d0e4e81eba648ed4f3c0c7ab587e174f650
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index cb3845e9c..213a9c72a 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1287,17 +1287,18 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp,
}
// PARTITION_HORZ
- if ((bsize >= BLOCK_SIZE_SB8X8) && (mi_col + ms <= cm->mi_cols)) {
+ if (bsize >= BLOCK_SIZE_SB8X8 && mi_col + (ms >> 1) < cm->mi_cols) {
int r2, d2;
+ int r = 0, d = 0;
subsize = get_subsize(bsize, PARTITION_HORZ);
*(get_sb_index(xd, subsize)) = 0;
pick_sb_modes(cpi, mi_row, mi_col, tp, &r2, &d2, subsize,
get_block_context(x, subsize));
if (mi_row + (ms >> 1) < cm->mi_rows) {
- int r = 0, d = 0;
update_state(cpi, get_block_context(x, subsize), subsize, 0);
encode_superblock(cpi, tp, 0, mi_row, mi_col, subsize);
+
*(get_sb_index(xd, subsize)) = 1;
pick_sb_modes(cpi, mi_row + (ms >> 1), mi_col, tp, &r, &d, subsize,
get_block_context(x, subsize));
@@ -1318,7 +1319,7 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp,
}
// PARTITION_VERT
- if ((bsize >= BLOCK_SIZE_SB8X8) && (mi_row + ms <= cm->mi_rows)) {
+ if (bsize >= BLOCK_SIZE_SB8X8 && mi_row + (ms >> 1) < cm->mi_rows) {
int r2, d2;
subsize = get_subsize(bsize, PARTITION_VERT);
*(get_sb_index(xd, subsize)) = 0;
@@ -1328,6 +1329,7 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp,
int r = 0, d = 0;
update_state(cpi, get_block_context(x, subsize), subsize, 0);
encode_superblock(cpi, tp, 0, mi_row, mi_col, subsize);
+
*(get_sb_index(xd, subsize)) = 1;
pick_sb_modes(cpi, mi_row, mi_col + (ms >> 1), tp, &r, &d, subsize,
get_block_context(x, subsize));
@@ -1348,7 +1350,8 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp,
}
// PARTITION_NONE
- if (mi_row + ms <= cm->mi_rows && mi_col + ms <= cm->mi_cols) {
+ if ((mi_row + (ms >> 1) < cm->mi_rows) &&
+ (mi_col + (ms >> 1) < cm->mi_cols)) {
int r, d;
pick_sb_modes(cpi, mi_row, mi_col, tp, &r, &d, bsize,
get_block_context(x, bsize));