Commit f6a45cdb authored by Jingning Han's avatar Jingning Han

Guard ref_frame index access in mfmv

Avoid unnecessary out of boundary access issue.

Change-Id: I949372827a7b5133428a45af0ab2be03aa30a742
parent f1cf7178
......@@ -1639,9 +1639,8 @@ void av1_setup_motion_field(AV1_COMMON *cm) {
MV_REFERENCE_FRAME ref_frame[2] = { mv_ref->ref_frame[0],
mv_ref->ref_frame[1] };
const int ref_frame_offset = ref_frame_offset_buffer[ref_frame[0]];
if (ref_frame[0] <= GOLDEN_FRAME && ref_frame[0] > INTRA_FRAME) {
const int ref_frame_offset = ref_frame_offset_buffer[ref_frame[0]];
int_mv this_mv;
int mi_r, mi_c;
......
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