Variables m & mi were being dereferenced when they might
hold invalid values.
The fix is simply to move these dereferences to after the
point at which mb_row and mb_col are tested for validity.
Change-Id: Ib16561efa9792dc469759936189ea379d374ad20
// top-left, top-right, bottom-left, bottom-right
for (i=0; i<4; i++)
{
- const MB_MODE_INFO *const mi = & m->mbmi;
- const MV_REFERENCE_FRAME rf = mi->ref_frame;
- const MB_PREDICTION_MODE mode = mi->mode;
- const int segment_id = mi->segment_id;
+ MB_MODE_INFO *mi;
+ MV_REFERENCE_FRAME rf;
+ MB_PREDICTION_MODE mode;
+ int segment_id;
int dy = row_delta[i];
int dx = col_delta[i];
continue;
}
+ mi = & m->mbmi;
+ rf = mi->ref_frame;
+ mode = mi->mode;
+ segment_id = mi->segment_id;
+
// Distance of Mb to the various image edges.
// These specified to 8th pel as they are always compared to MV
// values that are in 1/8th pel units