Commit 07084f5e authored by Hui Su's avatar Hui Su
Browse files

[NORMATIVE]Fix has_bottom_left() for 128*x blocks

Compression changes are of noise level.

BUG=aomedia:1309

Change-Id: Icc0e607e2d16c9041a9b8bab1b267da21ebbddd0
parent fc27f369
......@@ -486,9 +486,31 @@ static const uint8_t *get_has_bl_table(PARTITION_TYPE partition,
static int has_bottom_left(const AV1_COMMON *cm, BLOCK_SIZE bsize, int mi_row,
int mi_col, int bottom_available, int left_available,
PARTITION_TYPE partition, TX_SIZE txsz, int row_off,
int col_off, int ss_y) {
int col_off, int ss_x, int ss_y) {
if (!bottom_available || !left_available) return 0;
#if CONFIG_EXT_PARTITION
// Special case for 128x* blocks, when col_off is half the block width.
// This is needed because 128x* superblocks are divided into 64x* blocks in
// raster order
if (block_size_wide[bsize] > block_size_wide[BLOCK_64X64] && col_off > 0) {
const int plane_bw_unit_64 = mi_size_wide[BLOCK_64X64] >> ss_x;
const int col_off_64 = col_off % plane_bw_unit_64;
if (col_off_64 == 0) {
// We are at the left edge of top-right or bottom-right 64x* block.
const int plane_bh_unit_64 = mi_size_high[BLOCK_64X64] >> ss_y;
const int row_off_64 = row_off % plane_bh_unit_64;
const int plane_bh_unit =
AOMMIN(mi_size_high[bsize] >> ss_y, plane_bh_unit_64);
// Check if all bottom-left pixels are in the left 64x* block (which is
// already coded).
return row_off_64 + tx_size_high_unit[txsz] < plane_bh_unit;
}
}
#else
(void)ss_x;
#endif // CONFIG_EXT_PARTITION
if (col_off > 0) {
// Bottom-left pixels are in the bottom-left block, which is not available.
return 0;
......@@ -2090,9 +2112,9 @@ void av1_predict_intra_block(const AV1_COMMON *cm, const MACROBLOCKD *xd,
const int have_top_right =
has_top_right(cm, bsize, mi_row, mi_col, have_top, right_available,
partition, tx_size, row_off, col_off, pd->subsampling_x);
const int have_bottom_left =
has_bottom_left(cm, bsize, mi_row, mi_col, bottom_available, have_left,
partition, tx_size, row_off, col_off, pd->subsampling_y);
const int have_bottom_left = has_bottom_left(
cm, bsize, mi_row, mi_col, bottom_available, have_left, partition,
tx_size, row_off, col_off, pd->subsampling_x, pd->subsampling_y);
if (mbmi->palette_mode_info.palette_size[plane != 0] > 0) {
const int stride = wpx;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment