shithub: libvpx

Download patch

ref: 18fa715c897acd63d3008263197290e5423f5fe2
parent: 9a9ff2d80485486e3de331080a257146724f51dc
parent: 19ef82268328780c3deb3c5a09369977aa68c975
author: Jingning Han <[email protected]>
date: Fri Jun 8 13:18:33 EDT 2018

Merge "Localize variable scope in vp9_rc_get_second_pass_params()"

--- 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.