Readjust kf boost factor for vbr VBR mode needs more boost so revert the optimizations done previously for constant quality mode for the vbr end usage. Improves quality for short videos of < 50 frames and higher resolutions. midres, 20 frames, vbr: AvPSNR -0.914%, GlbPSNR -0.657%, SSIM -1.319% STATS_CHANGED expected. Change-Id: Ib92171ac4ee30e508ea535d232943fee9d7b4043
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c index c2f2a4f..b9d7844 100644 --- a/av1/encoder/firstpass.c +++ b/av1/encoder/firstpass.c
@@ -2932,8 +2932,11 @@ // how many bits to spend on it. decay_accumulator = 1.0; boost_score = 0.0; - const double kf_max_boost = AOMMIN( - AOMMAX(rc->frames_to_key * 2.0, KF_MIN_FRAME_BOOST), KF_MAX_FRAME_BOOST); + const double kf_max_boost = + cpi->oxcf.rc_mode == AOM_Q + ? AOMMIN(AOMMAX(rc->frames_to_key * 2.0, KF_MIN_FRAME_BOOST), + KF_MAX_FRAME_BOOST) + : KF_MAX_FRAME_BOOST; for (i = 0; i < (rc->frames_to_key - 1); ++i) { if (EOF == input_stats(twopass, &next_frame)) break;