SUPERRES_AUTO: Allow superres for low qindices too
Turned on in dual and exhaustive search only.
BDRate baseline vs SUPERRES_AUTO mode for hdres2 (1 pass):
(1) Q mode:
- before = +0.001
- after = -0.009
Improves gain from SUPERRES_AUTO mode for a few clips, without hurting
any clips.
(2) VBR mode:
- before: -0.034
- after: <same>
BUG=aomedia:2844
Change-Id: Iaf0656a9569322777cc15cddf07afa8fcea95147
diff --git a/av1/encoder/superres_scale.c b/av1/encoder/superres_scale.c
index 27a1fda..bcd3fef 100644
--- a/av1/encoder/superres_scale.c
+++ b/av1/encoder/superres_scale.c
@@ -236,7 +236,6 @@
break;
}
case AOM_SUPERRES_AUTO: {
- // Do not use superres when screen content tools are used.
if (cpi->common.features.allow_screen_content_tools) break;
if (rc_cfg->mode == AOM_VBR || rc_cfg->mode == AOM_CQ)
av1_set_target_rate(cpi, frm_dim_cfg->width, frm_dim_cfg->height);
@@ -247,11 +246,13 @@
cpi, &cpi->rc, frm_dim_cfg->width, frm_dim_cfg->height,
cpi->gf_group.index, &bottom_index, &top_index);
- const int qthresh = 128;
+ const SUPERRES_AUTO_SEARCH_TYPE sr_search_type =
+ cpi->sf.hl_sf.superres_auto_search_type;
+ const int qthresh = (sr_search_type == SUPERRES_AUTO_SOLO) ? 128 : 0;
if (q <= qthresh) {
- new_denom = SCALE_NUMERATOR;
+ new_denom = SCALE_NUMERATOR; // Don't use superres.
} else {
- if (cpi->sf.hl_sf.superres_auto_search_type == SUPERRES_AUTO_ALL) {
+ if (sr_search_type == SUPERRES_AUTO_ALL) {
if (cpi->common.current_frame.frame_type == KEY_FRAME)
new_denom = superres_cfg->superres_kf_scale_denominator;
else