]> granicus.if.org Git - libvpx/commitdiff
Localize av_err mean_mod_score in define_gf_group
authorangiebird <angiebird@google.com>
Mon, 14 Oct 2019 22:05:03 +0000 (15:05 -0700)
committerangiebird <angiebird@google.com>
Tue, 15 Oct 2019 22:13:33 +0000 (15:13 -0700)
Change-Id: I3fb23f5c8df1c3276b663a32556ca800b7ba2ade

vp9/encoder/vp9_firstpass.c

index 8f82724ed5ea55381f60c0b6ab0355052407e6cb..8d2152a5c5d42ab5d521bb60516d5e502dc8d707 100644 (file)
@@ -2498,8 +2498,6 @@ static void define_gf_group(VP9_COMP *cpi, int gf_start_show_idx) {
 
   double zero_motion_accumulator = 1.0;
 
-  const double av_err = get_distribution_av_err(cpi, twopass);
-  const double mean_mod_score = twopass->mean_mod_score;
   unsigned int allow_alt_ref = is_altref_enabled(cpi);
 
   int active_max_gf_interval;
@@ -2749,6 +2747,8 @@ static void define_gf_group(VP9_COMP *cpi, int gf_start_show_idx) {
     is_alt_ref_flash = detect_flash(twopass, rc->baseline_gf_interval);
 
   {
+    const double av_err = get_distribution_av_err(cpi, twopass);
+    const double mean_mod_score = twopass->mean_mod_score;
     // If the first frame is a key frame or the overlay from a previous arf then
     // the error score / cost of this frame has already been accounted for.
     int start_idx = arf_active_or_kf ? 1 : 0;