Commit b520882f authored by Marco's avatar Marco

vp9-svc: Fix to avoid msan unitialized value.

Move the logic for forcing zero_mode after the
(ref_frame & flag_list) check.
This was causing an memory leak under msan:
https://bugs.chromium.org/p/webrtc/issues/detail?id=5402

Change-Id: Ie9d243369f8ed7c332f46178275945331da4fd85
parent 2bd4f444
......@@ -1263,9 +1263,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
ref_frame = ref_mode_set[idx].ref_frame;
if (cpi->use_svc) {
ref_frame = ref_mode_set_svc[idx].ref_frame;
if (svc_force_zero_mode[ref_frame - 1] &&
frame_mv[this_mode][ref_frame].as_int != 0)
continue;
}
if (!(cpi->ref_frame_flags & flag_list[ref_frame]))
......@@ -1273,6 +1270,12 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (const_motion[ref_frame] && this_mode == NEARMV)
continue;
if (cpi->use_svc) {
if (svc_force_zero_mode[ref_frame - 1] &&
frame_mv[this_mode][ref_frame].as_int != 0)
continue;
}
if (!(frame_mv[this_mode][ref_frame].as_int == 0 &&
ref_frame == LAST_FRAME)) {
i = (ref_frame == LAST_FRAME) ? GOLDEN_FRAME : LAST_FRAME;
......
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