ref: dcc7c5aeb1c1c07bad79188e2d7858955246a318
parent: 66a6cfa5eb36dbc2e48bb154d28b1c229c7468a3
author: Jingning Han <jingning@google.com>
date: Wed Nov 14 16:02:03 EST 2018
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
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2144,8 +2144,9 @@
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);