ref: b520882f0eb2648e0d1e5090597ba43aa561e2f1
parent: 2bd4f444092bf1902a1caca66e14e8e75189191d
author: Marco <[email protected]>
date: Wed Jan 6 06:30:02 EST 2016
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
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1263,9 +1263,6 @@
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]))
@@ -1272,6 +1269,12 @@
continue;
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)) {