]> granicus.if.org Git - libvpx/commitdiff
Add NORMAL_BOOST macro
authorJingning Han <jingning@google.com>
Thu, 6 Sep 2018 23:58:55 +0000 (16:58 -0700)
committerJingning Han <jingning@google.com>
Fri, 7 Sep 2018 17:03:33 +0000 (10:03 -0700)
Normal frame boost factor is set to be 100 as the baseline for
ARF boost. Replace the hard coded number with a macro.

Change-Id: I81ce30138f7819844e7a2d811de9e1ccbeb85da5

vp9/encoder/vp9_firstpass.c

index ae6d97c9887e9a76611ff6239bac5a3b0b609f77..5108620c6125b299d88f281855fb7768553739f9 100644 (file)
@@ -44,6 +44,7 @@
 #define COMPLEXITY_STATS_OUTPUT 0
 
 #define FIRST_PASS_Q 10.0
+#define NORMAL_BOOST 100
 #define MIN_ARF_GF_BOOST 240
 #define MIN_DECAY_FACTOR 0.01
 #define NEW_MV_MODE_PENALTY 32
@@ -2070,7 +2071,7 @@ static int calculate_boost_bits(int frame_count, int boost,
   // return 0 for invalid inputs (could arise e.g. through rounding errors)
   if (!boost || (total_group_bits <= 0) || (frame_count < 0)) return 0;
 
-  allocation_chunks = (frame_count * 100) + boost;
+  allocation_chunks = (frame_count * NORMAL_BOOST) + boost;
 
   // Prevent overflow.
   if (boost > 1023) {