Send allow_screen_content flag for both key and intra only frames Cherry-picked from webm/nextgenv2: https://chromium-review.googlesource.com/#/c/397518/ BUG=webm:1311 Change-Id: I29e7863f40926baddbdcc2b7f2b4d416aa6540cd
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index 2e0887e..fe4eefd 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -1854,12 +1854,13 @@ pbi->need_resync = 0; } #if CONFIG_PALETTE - if (frame_is_intra_only(cm)) - cm->allow_screen_content_tools = aom_rb_read_bit(rb); + cm->allow_screen_content_tools = aom_rb_read_bit(rb); #endif // CONFIG_PALETTE } else { cm->intra_only = cm->show_frame ? 0 : aom_rb_read_bit(rb); - +#if CONFIG_PALETTE + if (cm->intra_only) cm->allow_screen_content_tools = aom_rb_read_bit(rb); +#endif // CONFIG_PALETTE if (cm->error_resilient_mode) { cm->reset_frame_context = RESET_FRAME_CONTEXT_ALL; } else {
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index 0c6e57a..510c97d 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c
@@ -2026,12 +2026,13 @@ write_bitdepth_colorspace_sampling(cm, wb); write_frame_size(cm, wb); #if CONFIG_PALETTE - if (frame_is_intra_only(cm)) - aom_wb_write_bit(wb, cm->allow_screen_content_tools); + aom_wb_write_bit(wb, cm->allow_screen_content_tools); #endif // CONFIG_PALETTE } else { if (!cm->show_frame) aom_wb_write_bit(wb, cm->intra_only); - +#if CONFIG_PALETTE + if (cm->intra_only) aom_wb_write_bit(wb, cm->allow_screen_content_tools); +#endif // CONFIG_PALETTE if (!cm->error_resilient_mode) { if (cm->intra_only) { aom_wb_write_bit(wb,