Commit 72e2e982 authored by Frederic Barbier's avatar Frederic Barbier Committed by Yaowu Xu

Avoid out-of-bounds issue

When accessing to reference vector list with NONE_FRAME

BUG=aomedia:412

Change-Id: I82a23591d6d9a179eb6f3b1e40f8d1f4018a53d8
parent 6501122f
......@@ -1696,15 +1696,14 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
zeromv[0].as_int = zeromv[1].as_int = 0;
#endif
for (ref = 0; ref < 2; ++ref) {
if (rf[ref] == NONE_FRAME) continue;
lower_mv_precision(&ref_mvs[rf[ref]][0].as_mv, allow_hp);
lower_mv_precision(&ref_mvs[rf[ref]][1].as_mv, allow_hp);
}
if (ref_mvs[rf[0]][0].as_int != zeromv[0].as_int ||
ref_mvs[rf[0]][1].as_int != zeromv[0].as_int ||
ref_mvs[rf[1]][0].as_int != zeromv[1].as_int ||
ref_mvs[rf[1]][1].as_int != zeromv[1].as_int)
inter_mode_ctx[ref_frame] &= ~(1 << ALL_ZERO_FLAG_OFFSET);
if (ref_mvs[rf[ref]][0].as_int != zeromv[0].as_int ||
ref_mvs[rf[ref]][1].as_int != zeromv[1].as_int)
inter_mode_ctx[ref_frame] &= ~(1 << ALL_ZERO_FLAG_OFFSET);
}
}
}
......
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