From 54c0f0de444dae1f37a44acd81bb90a84b2c10cc Mon Sep 17 00:00:00 2001 From: Paul Wilkins Date: Thu, 31 Jan 2019 17:03:55 +0000 Subject: [PATCH] Change to direction of scan for GF only group boost. When coding a GF only group it makes more sense to scan forward from the GF to choose the boost level rather than backwards from the end of the group towards the GF. In practice we do not often code GF only groups in normal 2 pass encodes and when we do the video is usually almost static which means the direction does not matter much. However, a forward scan makes more sense and is how things used to work before we started using arfs most of the time. Change-Id: I64a5a731ff579c8af86d8a6718830d426b16a755 --- vp9/encoder/vp9_firstpass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 5cfffe6b5..e671b84e9 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2636,7 +2636,8 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { rc->gfu_boost = calc_arf_boost(cpi, forward_frames, (i - 1)); rc->source_alt_ref_pending = 1; } else { - rc->gfu_boost = VPXMIN(MAX_GF_BOOST, calc_arf_boost(cpi, 0, (i - 1))); + reset_fpf_position(twopass, start_pos); + rc->gfu_boost = VPXMIN(MAX_GF_BOOST, calc_arf_boost(cpi, (i - 1), 0)); rc->source_alt_ref_pending = 0; } -- 2.40.0