Merge "[Improvement]Fix loss of permissibleRatio calcaulation accuracy." am: f9c69a2c37

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655268

Change-Id: I0e9be2b7ff20e391ee9a103e8f067b0dbc1e36b5
This commit is contained in:
Michael Wright
2021-03-30 18:49:58 +00:00
committed by Automerger Merge Worker

View File

@@ -440,9 +440,8 @@ public abstract class BrightnessMappingStrategy {
}
private float permissibleRatio(float currLux, float prevLux) {
return MathUtils.exp(MAX_GRAD
* (MathUtils.log(currLux + LUX_GRAD_SMOOTHING)
- MathUtils.log(prevLux + LUX_GRAD_SMOOTHING)));
return MathUtils.pow((currLux + LUX_GRAD_SMOOTHING)
/ (prevLux + LUX_GRAD_SMOOTHING), MAX_GRAD);
}
protected float inferAutoBrightnessAdjustment(float maxGamma, float desiredBrightness,