Commit df89ee3a authored by Hui Su's avatar Hui Su Committed by Sebastien Alaiwan

Make the signaling of allow_screen_content_tools consistent

in keyframe and all-intra frame.

Change-Id: I09d6f83efd3c4fe3f9a464d6a0e22e2e68220a8d
parent 63dac2e6
......@@ -2816,13 +2816,6 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
cm->use_prev_frame_mvs = 0;
#endif
} else {
if (cm->intra_only) {
cm->allow_screen_content_tools = aom_rb_read_bit(rb);
#if CONFIG_INTRABC
if (cm->allow_screen_content_tools)
cm->allow_intrabc = aom_rb_read_bit(rb);
#endif // CONFIG_INTRABC
}
#if CONFIG_TEMPMV_SIGNALING
if (cm->intra_only || cm->error_resilient_mode) cm->use_prev_frame_mvs = 0;
#endif
......@@ -2868,6 +2861,11 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#if CONFIG_ANS && ANS_MAX_SYMBOLS
cm->ans_window_size_log2 = aom_rb_read_literal(rb, 4) + 8;
#endif
cm->allow_screen_content_tools = aom_rb_read_bit(rb);
#if CONFIG_INTRABC
if (cm->allow_screen_content_tools)
cm->allow_intrabc = aom_rb_read_bit(rb);
#endif // CONFIG_INTRABC
} else if (pbi->need_resync != 1) { /* Skip if need resync */
#if CONFIG_OBU
pbi->refresh_frame_flags = (cm->frame_type == S_FRAME)
......
......@@ -3700,13 +3700,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
}
#endif
} else {
if (cm->intra_only) {
aom_wb_write_bit(wb, cm->allow_screen_content_tools);
#if CONFIG_INTRABC
if (cm->allow_screen_content_tools)
aom_wb_write_bit(wb, cm->allow_intrabc);
#endif // CONFIG_INTRABC
}
#if !CONFIG_NO_FRAME_CONTEXT_SIGNALING
if (!cm->error_resilient_mode) {
if (cm->intra_only) {
......@@ -3733,12 +3726,16 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
write_frame_size(cm, wb);
#endif
write_sb_size(cm, wb);
#if CONFIG_ANS && ANS_MAX_SYMBOLS
assert(cpi->common.ans_window_size_log2 >= 8);
assert(cpi->common.ans_window_size_log2 < 24);
aom_wb_write_literal(wb, cpi->common.ans_window_size_log2 - 8, 4);
#endif // CONFIG_ANS && ANS_MAX_SYMBOLS
aom_wb_write_bit(wb, cm->allow_screen_content_tools);
#if CONFIG_INTRABC
if (cm->allow_screen_content_tools)
aom_wb_write_bit(wb, cm->allow_intrabc);
#endif // CONFIG_INTRABC
} else {
aom_wb_write_literal(wb, cpi->refresh_frame_mask, REF_FRAMES);
......
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