Fix mismatch in global-motion experiment
This was introduced in 72e2e982ee72080418e8c26adb70e34b4a2c6cb0
Change-Id: Ia4d0a0606a518964d5f6f257874f8f3d5b4d651b
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 5395a3c..001694d 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1695,15 +1695,16 @@
#else
zeromv[0].as_int = zeromv[1].as_int = 0;
#endif
- for (ref = 0; ref < 2; ++ref) {
- if (rf[ref] == NONE_FRAME) continue;
+ for (ref = 0; ref < 1 + is_compound; ++ref) {
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[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);
}
+
+ if (ref_mvs[rf[0]][0].as_int != zeromv[0].as_int ||
+ ref_mvs[rf[0]][1].as_int != zeromv[0].as_int ||
+ (is_compound && (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);
}
}