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

Commit 00d348ec authored by Doris Liu's avatar Doris Liu Committed by android-build-merger
Browse files

Fix LUTInterpolator lookup table position calc

am: 0940834c

Change-Id: Ib80c00801473d7e60bae87b3b34a381c7f8e7e68
parents 8c6429cb 0940834c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -97,7 +97,8 @@ LUTInterpolator::~LUTInterpolator() {
}

float LUTInterpolator::interpolate(float input) {
    float lutpos = input * mSize;
    // lut position should only be at the end of the table when input is 1f.
    float lutpos = input * (mSize - 1);
    if (lutpos >= (mSize - 1)) {
        return mValues[mSize - 1];
    }
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public class NativeInterpolatorFactoryHelper_Delegate {

        @Override
        public float getInterpolation(float input) {
            float lutpos = input * mSize;
            float lutpos = input * (mSize - 1);
            if (lutpos >= (mSize - 1)) {
                return mValues[mSize - 1];
            }