Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9c69a2c authored by Michael Wright's avatar Michael Wright Committed by Gerrit Code Review
Browse files

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

parents ba4eeb87 2aaa220e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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,