]> granicus.if.org Git - libvpx/commitdiff
Fix incorrect index test in GF group rate assignment.
authorpaulwilkins <paulwilkins@google.com>
Tue, 4 Jul 2017 12:21:14 +0000 (13:21 +0100)
committerpaulwilkins <paulwilkins@google.com>
Wed, 5 Jul 2017 15:45:36 +0000 (16:45 +0100)
Correct test for middle frame in the group.

Change-Id: I1ee49fa33968eb3c4a01d6a27a60bb1409e3e68c

vp9/encoder/vp9_firstpass.c

index b6e3275482c9b4f695f4869b0a3913906e6b2af6..23ca129510ac447bd2b24acb33ae9fe2df0c1c65 100644 (file)
@@ -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;