Prevent left_block_mode stepping into left tile
This commit uses left_available flag to decide if the left mode_info struct is available for left_block_mode. As discussed with James Zern (jzern@), this prevents the codec from fetching mode_info from blocks in the left tile, which although effectively not used might present concerns for multi-threaded tile decoding. This is NOT a bit-stream change. Change-Id: I1dc8cf1bcbf056688eee27c7bc5706ac4b4e0125
This commit is contained in:
@@ -169,6 +169,7 @@ static void read_intra_frame_mode_info(VP9_COMMON *const cm,
|
||||
MB_MODE_INFO *const mbmi = &m->mbmi;
|
||||
const BLOCK_SIZE bsize = mbmi->sb_type;
|
||||
const MODE_INFO *above_mi = xd->mi_8x8[-cm->mode_info_stride];
|
||||
const MODE_INFO *left_mi = xd->left_available ? xd->mi_8x8[-1] : NULL;
|
||||
|
||||
mbmi->segment_id = read_intra_segment_id(cm, xd, mi_row, mi_col, r);
|
||||
mbmi->skip_coeff = read_skip_coeff(cm, xd, mbmi->segment_id, r);
|
||||
@@ -178,9 +179,7 @@ static void read_intra_frame_mode_info(VP9_COMMON *const cm,
|
||||
|
||||
if (bsize >= BLOCK_8X8) {
|
||||
const MB_PREDICTION_MODE A = above_block_mode(m, above_mi, 0);
|
||||
const MB_PREDICTION_MODE L = xd->left_available
|
||||
? left_block_mode(m, xd->mi_8x8[-1], 0)
|
||||
: DC_PRED;
|
||||
const MB_PREDICTION_MODE L = left_block_mode(m, left_mi, 0);
|
||||
mbmi->mode = read_intra_mode(r, vp9_kf_y_mode_prob[A][L]);
|
||||
} else {
|
||||
// Only 4x4, 4x8, 8x4 blocks
|
||||
@@ -192,9 +191,7 @@ static void read_intra_frame_mode_info(VP9_COMMON *const cm,
|
||||
for (idx = 0; idx < 2; idx += num_4x4_w) {
|
||||
const int ib = idy * 2 + idx;
|
||||
const MB_PREDICTION_MODE A = above_block_mode(m, above_mi, ib);
|
||||
const MB_PREDICTION_MODE L = (xd->left_available || idx)
|
||||
? left_block_mode(m, xd->mi_8x8[-1], ib)
|
||||
: DC_PRED;
|
||||
const MB_PREDICTION_MODE L = left_block_mode(m, left_mi, ib);
|
||||
const MB_PREDICTION_MODE b_mode = read_intra_mode(r,
|
||||
vp9_kf_y_mode_prob[A][L]);
|
||||
m->bmi[ib].as_mode = b_mode;
|
||||
|
||||
Reference in New Issue
Block a user