Commit 8a1f7ade authored by David Barker's avatar David Barker Committed by Debargha Mukherjee

[NORMATIVE] Only signal allow_warped_motion if needed

The allow_warped_motion flag has no effect on keyframes or
intra-only frames, so we don't need to signal it in that case.

BUG=aomedia:1652

STATS_CHANGED

Change-Id: I216ee9f61fdc58dceffb8be93a33a944deb7daf1
parent 72cc1965
......@@ -2764,7 +2764,6 @@ static int read_uncompressed_header(AV1Decoder *pbi,
(av1_superres_unscaled(cm) || !NO_FILTER_FOR_IBC))
cm->allow_intrabc = aom_rb_read_bit(rb);
cm->use_ref_frame_mvs = 0;
cm->allow_warped_motion = 0;
cm->prev_frame = NULL;
} else {
#if CONFIG_EXPLICIT_ORDER_HINT
......@@ -3131,7 +3130,7 @@ static int read_uncompressed_header(AV1Decoder *pbi,
cm->skip_mode_flag = cm->is_skip_mode_allowed ? aom_rb_read_bit(rb) : 0;
read_compound_tools(cm, rb);
if (!cm->error_resilient_mode)
if (!(frame_is_intra_only(cm) || cm->error_resilient_mode))
cm->allow_warped_motion = aom_rb_read_bit(rb);
else
cm->allow_warped_motion = 0;
......
......@@ -3259,7 +3259,7 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
if (cm->is_skip_mode_allowed) aom_wb_write_bit(wb, cm->skip_mode_flag);
write_compound_tools(cm, wb);
if (!cm->error_resilient_mode)
if (!(frame_is_intra_only(cm) || cm->error_resilient_mode))
aom_wb_write_bit(wb, cm->allow_warped_motion);
else
assert(!cm->allow_warped_motion);
......
......@@ -4732,7 +4732,8 @@ static int encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, uint8_t *dest,
cm->use_ref_frame_mvs = !cpi->oxcf.disable_tempmv &&
frame_might_use_prev_frame_mvs(cm) &&
cm->seq_params.enable_order_hint;
cm->allow_warped_motion = !cm->error_resilient_mode;
cm->allow_warped_motion =
!(frame_is_intra_only(cm) || cm->error_resilient_mode);
// Reset the frame packet stamp index.
if (cm->frame_type == KEY_FRAME) cm->current_video_frame = 0;
......
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