From: Jingning Han Date: Thu, 6 Sep 2018 23:58:55 +0000 (-0700) Subject: Add NORMAL_BOOST macro X-Git-Tag: v1.8.0~354^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c5f88a280214d07b188a2e97ed736535f813195;p=libvpx Add NORMAL_BOOST macro 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 --- diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index ae6d97c98..5108620c6 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -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) {