Commit 8d88b297 authored by Sebastien Alaiwan's avatar Sebastien Alaiwan

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
parent 8ce049e6
......@@ -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).
......
......@@ -2613,9 +2613,12 @@ static void read_global_motion(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
: &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
......
......@@ -2484,7 +2484,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
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;
......
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