Commit 74978fcb authored by Jingning Han's avatar Jingning Han

Use the bottom right 4x4 block for 8x8 unit mv reference

When accessing an 8x8 block for motion vector referencing, always
use the bottom right 4x4 block's motion information.

Change-Id: I95e7235f9645ea3dea83482041b9fbd4e764b13f
parent d37b83d8
......@@ -166,11 +166,16 @@ static uint8_t scan_row_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
? mi_size_wide[BLOCK_4X4]
: mi_size_wide[BLOCK_8X8];
// TODO(jingning): Revisit this part after cb4x4 is stable.
if (abs(row_offset) > 1) row_offset *= 2;
if (abs(row_offset) > 1) {
row_offset *= 2;
row_offset += 1;
if (bsize < BLOCK_8X8 && abs(row_offset) > 1) {
if (mi_row & 0x01) row_offset += 1;
if (mi_col & 0x01) col_offset -= 1;
col_offset = 1;
if (bsize < BLOCK_8X8) {
if (mi_row & 0x01) row_offset += 1;
if (mi_col & 0x01) col_offset -= 1;
}
}
#else
const int mi_offset = mi_size_wide[BLOCK_8X8];
......@@ -220,11 +225,16 @@ static uint8_t scan_col_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
const int mi_offset = (bsize < BLOCK_8X8) || (abs(col_offset) > 1)
? mi_size_high[BLOCK_4X4]
: mi_size_high[BLOCK_8X8];
if (abs(col_offset) > 1) col_offset *= 2;
if (abs(col_offset) > 1) {
col_offset *= 2;
col_offset += 1;
if (bsize < BLOCK_8X8 && abs(col_offset) > 1) {
if (mi_row & 0x01) row_offset -= 1;
if (mi_col & 0x01) col_offset += 1;
row_offset = 1;
if (bsize < BLOCK_8X8) {
if (mi_row & 0x01) row_offset -= 1;
if (mi_col & 0x01) col_offset += 1;
}
}
#else
const int mi_offset = mi_size_wide[BLOCK_8X8];
......
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