Accept all global motion model settings
When needed, fallback regular interp filter at reconstruction stage.
Such bitstreams are valid.
However, as we don't expect aomenc to generate them,
print a helper warning.
Change-Id: I7e818cf607d7d6f71df4ca7878d8976fb88c3282
diff --git a/av1/common/warped_motion.h b/av1/common/warped_motion.h
index 136cedb..f84f4b4 100644
--- a/av1/common/warped_motion.h
+++ b/av1/common/warped_motion.h
@@ -28,6 +28,8 @@
#define LEAST_SQUARES_SAMPLES_MAX_BITS 3
#define LEAST_SQUARES_SAMPLES_MAX (1 << LEAST_SQUARES_SAMPLES_MAX_BITS)
+#define WARPED_MOTION_DEBUG 0
+
#if CONFIG_EXT_WARPED_MOTION
// Search 1 row on the top and 1 column on the left, 1 upper-left block,
// 1 upper-right block. In worst case, the samples are (MAX_MIB_SIZE * 2 + 2).
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index f96350c..d6f7084 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -2613,9 +2613,12 @@
: &cm->prev_frame->global_motion[frame];
int good_params = read_global_motion_params(
&cm->global_motion[frame], ref_params, rb, cm->allow_high_precision_mv);
- if (!good_params)
- aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
- "Invalid shear parameters for global motion.");
+ if (!good_params) {
+#if WARPED_MOTION_DEBUG
+ printf("Warning: unexpected global motion shear params from aomenc\n");
+#endif
+ cm->global_motion[frame].invalid = 1;
+ }
// TODO(sarahparker, debargha): The logic in the commented out code below
// does not work currently and causes mismatches when resize is on. Fix it
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 68e0890..92bf64f 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -2484,7 +2484,7 @@
if (find_projection(mbmi->num_proj_ref[0], pts, pts_inref, bsize,
mbmi->mv[0].as_mv.row, mbmi->mv[0].as_mv.col,
&mbmi->wm_params[0], mi_row, mi_col)) {
-#if DEC_MISMATCH_DEBUG
+#if WARPED_MOTION_DEBUG
printf("Warning: unexpected warped model from aomenc\n");
#endif
mbmi->wm_params[0].invalid = 1;