summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_firstpass.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-11-14 21:02:03 -0800
committerJingning Han <jingning@google.com>2018-11-14 21:03:29 -0800
commitdcc7c5aeb1c1c07bad79188e2d7858955246a318 (patch)
treeb85afd65332395b53997c81551a6dd87b961e0cd /vp9/encoder/vp9_firstpass.c
parent66a6cfa5eb36dbc2e48bb154d28b1c229c7468a3 (diff)
downloadlibvpx-dcc7c5aeb1c1c07bad79188e2d7858955246a318.tar
libvpx-dcc7c5aeb1c1c07bad79188e2d7858955246a318.tar.gz
libvpx-dcc7c5aeb1c1c07bad79188e2d7858955246a318.tar.bz2
libvpx-dcc7c5aeb1c1c07bad79188e2d7858955246a318.zip
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
Diffstat (limited to 'vp9/encoder/vp9_firstpass.c')
-rw-r--r--vp9/encoder/vp9_firstpass.c5
1 files changed, 3 insertions, 2 deletions
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);