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

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

Change-Id: I6931a10fa9d9750b79f31af0512c420379d5f936
This commit is contained in:
Michael Wright
2021-03-30 19:29:37 +00:00
committed by Automerger Merge Worker

View File

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