From b0459ec8ea3d6aa9f1f355854e1c6886ffab1f92 Mon Sep 17 00:00:00 2001 From: paulwilkins Date: Tue, 4 Jul 2017 13:21:14 +0100 Subject: [PATCH] Fix incorrect index test in GF group rate assignment. Correct test for middle frame in the group. Change-Id: I1ee49fa33968eb3c4a01d6a27a60bb1409e3e68c --- vp9/encoder/vp9_firstpass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index b6e327548..23ca12951 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2250,7 +2250,7 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits, target_frame_size = (i == (normal_frames - 1)) ? last_frame_bits - : (i == mid_frame_idx) + : (frame_index == mid_frame_idx) ? normal_frame_bits + last_frame_reduction : normal_frame_bits;