summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2015-06-16 22:01:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-06-16 22:01:06 +0000
commit97b3913dcc4315c9863c92802eb938ad2d441912 (patch)
tree02393574c6279cc7485a1ef406b1ece775cdb0d6
parent8914ab696dbc30db6227596b063614d0689615ee (diff)
parentce6a6c54112da92ff332e1db984cc0648efafc68 (diff)
downloadlibvpx-97b3913dcc4315c9863c92802eb938ad2d441912.tar
libvpx-97b3913dcc4315c9863c92802eb938ad2d441912.tar.gz
libvpx-97b3913dcc4315c9863c92802eb938ad2d441912.tar.bz2
libvpx-97b3913dcc4315c9863c92802eb938ad2d441912.zip
Merge "Moved has_rows, has_cols in vp9_decodeframe.c"
-rw-r--r--vp9/decoder/vp9_decodeframe.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 76bc23b1d..9311d8dad 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -771,14 +771,11 @@ static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd,
xd->corrupted |= vp9_reader_has_error(r);
}
-static PARTITION_TYPE read_partition(VP9_COMMON *cm, MACROBLOCKD *xd,
- int hbs,
- int mi_row, int mi_col, BLOCK_SIZE bsize,
- vp9_reader *r) {
+static PARTITION_TYPE read_partition(MACROBLOCKD *xd, int mi_row, int mi_col,
+ BLOCK_SIZE bsize, vp9_reader *r,
+ int has_rows, int has_cols) {
const int ctx = partition_plane_context(xd, mi_row, mi_col, bsize);
const vp9_prob *const probs = get_partition_probs(xd, ctx);
- const int has_rows = (mi_row + hbs) < cm->mi_rows;
- const int has_cols = (mi_col + hbs) < cm->mi_cols;
FRAME_COUNTS *counts = xd->counts;
PARTITION_TYPE p;
@@ -805,11 +802,13 @@ static void decode_partition(VP9Decoder *const pbi, MACROBLOCKD *const xd,
const int hbs = num_8x8_blocks_wide_lookup[bsize] / 2;
PARTITION_TYPE partition;
BLOCK_SIZE subsize;
+ const int has_rows = (mi_row + hbs) < cm->mi_rows;
+ const int has_cols = (mi_col + hbs) < cm->mi_cols;
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
return;
- partition = read_partition(cm, xd, hbs, mi_row, mi_col, bsize, r);
+ partition = read_partition(xd, mi_row, mi_col, bsize, r, has_rows, has_cols);
subsize = get_subsize(bsize, partition);
if (bsize == BLOCK_8X8) {
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
@@ -820,12 +819,12 @@ static void decode_partition(VP9Decoder *const pbi, MACROBLOCKD *const xd,
break;
case PARTITION_HORZ:
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
- if (mi_row + hbs < cm->mi_rows)
+ if (has_rows)
decode_block(pbi, xd, tile, mi_row + hbs, mi_col, r, subsize);
break;
case PARTITION_VERT:
decode_block(pbi, xd, tile, mi_row, mi_col, r, subsize);
- if (mi_col + hbs < cm->mi_cols)
+ if (has_cols)
decode_block(pbi, xd, tile, mi_row, mi_col + hbs, r, subsize);
break;
case PARTITION_SPLIT: