Terminate decoding at invalid mode and ref frame combo
BUG=b/69488541
Change-Id: I2113bba4589f61a09d0dd07c64a522f4d0ae304b
(cherry picked from commit cccda0db727c2282375b174104294b40911d1447)
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 1b23e77..336f1aa 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1914,6 +1914,12 @@
read_drl_idx(ec_ctx, xd, mbmi, r);
}
+ if (is_compound != is_inter_compound_mode(mbmi->mode)) {
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
+ "Prediction mode %d invalid with ref frame %d %d",
+ mbmi->mode, mbmi->ref_frame[0], mbmi->ref_frame[1]);
+ }
+
if (mbmi->mode != GLOBALMV && mbmi->mode != GLOBAL_GLOBALMV) {
for (ref = 0; ref < 1 + is_compound; ++ref) {
#if CONFIG_AMVR