From: Jingning Han Date: Thu, 15 Nov 2018 05:02:03 +0000 (-0800) Subject: Fix arf boost factor calculation for intermediate ARFs X-Git-Tag: v1.8.0~150^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcc7c5aeb1c1c07bad79188e2d7858955246a318;p=libvpx Fix arf boost factor calculation for intermediate ARFs Need to offset the forward range by 1 to include the stats for the current frame itself. Change-Id: I3b5171b7edef51ec4e97e4e0542ca58af5ce1416 --- diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index c755d5dfc..e29e86576 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2144,8 +2144,9 @@ static void find_arf_order(VP9_COMP *cpi, GF_GROUP *gf_group, for (idx = 0; idx <= mid; ++idx) if (EOF == input_stats(twopass, &fpf_frame)) break; - gf_group->gfu_boost[*index_counter] = VPXMAX( - MIN_ARF_GF_BOOST, calc_arf_boost(cpi, end - mid, mid - start) >> depth); + gf_group->gfu_boost[*index_counter] = + VPXMAX(MIN_ARF_GF_BOOST, + calc_arf_boost(cpi, end - mid + 1, mid - start) >> depth); reset_fpf_position(twopass, start_pos);