Refactor tx_size to pixel number mapping in reconintra.c

Change-Id: I1e4a43f5f08b76867240a207c60d7e85a8ffbb74
This commit is contained in:
Jingning Han
2016-10-21 13:04:31 -07:00
parent 2d64f12595
commit 22daaa3aea

View File

@@ -228,7 +228,7 @@ static int av1_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col,
TX_SIZE txsz, int y, int x, int ss_x) {
const int wl = mi_width_log2_lookup[bsize];
const int w = AOMMAX(num_4x4_blocks_wide_lookup[bsize] >> ss_x, 1);
const int step = 1 << txsz;
const int step = tx_size_wide_unit[txsz];
// TODO(bshacklett, huisu): Currently the RD loop traverses 4X8 blocks in
// inverted N order while in the bitstream the subblocks are stored in Z
@@ -238,9 +238,8 @@ static int av1_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col,
// blocks in inverted N order, and then update this function appropriately.
if (bsize == BLOCK_4X8 && y == 1) return 0;
if (!right_available) {
return 0;
} else {
if (!right_available) return 0;
// Handle block size 4x8 and 4x4
if (ss_x == 0 && num_4x4_blocks_wide_lookup[bsize] < 2 && x == 0) return 1;
@@ -274,7 +273,6 @@ static int av1_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col,
return x + step < w;
}
}
}
static int av1_has_bottom(BLOCK_SIZE bsize, int mi_row, int mi_col,
int bottom_available, TX_SIZE txsz, int y, int x,