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

This commit is contained in:
Michael Wright
2021-03-30 18:21:08 +00:00
committed by Gerrit Code Review

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,