Tweaks to mediaformatshaper
-- parameterize the % boost if QP is desired but not present
-- parameterize the upper bounds for where shaping is phased out
-- tuning default bits-per-pixel for AVC
Bug: 183211971
Test: video quality test scripts
Change-Id: I2e83c574e766606c50d7ed5dc26c49ba92ecb2a4
diff --git a/media/libmediaformatshaper/CodecProperties.h b/media/libmediaformatshaper/CodecProperties.h
index ff7051f..98ab99e 100644
--- a/media/libmediaformatshaper/CodecProperties.h
+++ b/media/libmediaformatshaper/CodecProperties.h
@@ -82,6 +82,14 @@
void setSupportsQp(bool supported) { mSupportsQp = supported;}
bool supportsQp() { return mSupportsQp;}
+ // defines our range of operation -- multiplier on the floor bitrate
+ double getPhaseOut() { return mPhaseOut; }
+ void setPhaseOut(double overageMultiplier);
+
+ // how much (0.20 = +20%) do we add if Qp is requested but unsupported
+ double getMissingQpBoost() {return mMissingQpBoost; }
+ void setMissingQpBoost(double boost);
+
int supportedApi();
// a codec is not usable until it has been registered with its
@@ -98,6 +106,11 @@
bool mSupportsQp = false;
double mBpp = 0.0;
+ // target bitrates above floor * mPhaseOut are left untouched
+ double mPhaseOut = 1.75;
+ // 20% bump if QP is configured but it is unavailable
+ double mMissingQpBoost = 0.20;
+
// allow different target bits-per-pixel based on resolution
// similar to codec 'performance points'
// uses 'next largest' (by pixel count) point as minimum bpp