summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmsintrp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmsintrp.c b/src/cmsintrp.c
index 5cd6d16..5eb98e6 100644
--- a/src/cmsintrp.c
+++ b/src/cmsintrp.c
@@ -278,10 +278,10 @@ void Eval1Input(CMSREGISTER const cmsUInt16Number Input[],
// if last value...
if (Input[0] == 0xffff || p16->Domain[0] == 0) {
- cmsUInt16Number y0 = LutTable[p16->Domain[0]];
-
+ cmsUInt32Number y0 = p16->Domain[0] * p16->opta[0];
+
for (OutChan = 0; OutChan < p16->nOutputs; OutChan++) {
- Output[OutChan] = y0;
+ Output[OutChan] = LutTable[y0 + OutChan];
}
}
else
@@ -324,10 +324,10 @@ void Eval1InputFloat(const cmsFloat32Number Value[],
// if last value...
if (val2 == 1.0 || p->Domain[0] == 0) {
- y0 = LutTable[p->Domain[0]];
+ cmsUInt32Number start = p->Domain[0] * p->opta[0];
for (OutChan = 0; OutChan < p->nOutputs; OutChan++) {
- Output[OutChan] = y0;
+ Output[OutChan] = LutTable[start + OutChan];
}
}
else