shithub: libvpx

Download patch

ref: 19ef82268328780c3deb3c5a09369977aa68c975
parent: 87386826a95fda953162050a27f2506d8c1f3db5
author: Jingning Han <jingning@google.com>
date: Wed Jun 6 08:52:45 EDT 2018

Localize variable scope in vp9_rc_get_second_pass_params()

Remove unnecessary definitions.

Change-Id: Ie540aaed5f3ed3768eff4e6563455666aef9c9e8

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -3040,8 +3040,6 @@
   GF_GROUP *const gf_group = &twopass->gf_group;
   FIRSTPASS_STATS this_frame;
 
-  int target_rate;
-
   if (!twopass->stats_in) return;
 
   // If this is an arf frame then we dont want to read the stats file or
@@ -3149,8 +3147,7 @@
     cpi->partition_search_skippable_frame = is_skippable_frame(cpi);
   }
 
-  target_rate = gf_group->bit_allocation[gf_group->index];
-  rc->base_frame_target = target_rate;
+  rc->base_frame_target = gf_group->bit_allocation[gf_group->index];
 
   // The multiplication by 256 reverses a scaling factor of (>> 8)
   // applied when combining MB error values for the frame.