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

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

Change-Id: I237b063b45b16af6a476c1d8222a127c46eb7760
This commit is contained in:
Michael Wright
2021-03-30 20:13:12 +00:00
committed by Automerger Merge Worker

View File

@@ -433,9 +433,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,