Correctly set cpi->use_screen_content flag
This cl is a fix.
When we set "--tune-content=screen" from the command line, the desired
behavior of the encoder is to encode WITH screen content tools
(both intrabc and palette), and skip executing the function
"av1_determine_sc_tools_with_encoding".
However, since the flag "cpi->use_screen_content" is not properly set,
the function "av1_determine_sc_tools_with_encoding" is called and
determines whether to use intrabc and palette separately.
Due to encoder change, it sometimes makes wrong decisions.
With this cl, screen content tools are always turned on
when "--tune-content=screen" is set. This fix has a significant impact
on stats (brings back coding gain of screen content tools):
speed 0, screen content set, key frame.
ovr_psnr ssim vmaf
-10.79% -11.38% -12.68%
Change-Id: Iea7cce2a15e3e96b4c610cefa3528e47eed8bea5
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 14c052f..ca85931 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -1788,6 +1788,7 @@
features->allow_screen_content_tools = 1;
features->allow_intrabc = cpi->oxcf.mode == REALTIME ? 0 : 1;
cpi->is_screen_content_type = 1;
+ cpi->use_screen_content_tools = 1;
return;
}