diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-11-30 00:35:21 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-11-30 00:35:21 +0300 |
commit | 6695c393c6b9e508fbc5f96b61e84a7bb5ccd710 (patch) | |
tree | b38599e8b50926f0b895a43c6917d9a10868dae2 /src/thirdparty/lcms2 | |
parent | 4848673562aa14b5c421eb67cea1018ab0a9dd7f (diff) |
update lcms and IS translations
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2747 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/thirdparty/lcms2')
-rw-r--r-- | src/thirdparty/lcms2/src/cmsgamma.c | 2 | ||||
-rw-r--r-- | src/thirdparty/lcms2/src/cmsintrp.c | 36 |
2 files changed, 31 insertions, 7 deletions
diff --git a/src/thirdparty/lcms2/src/cmsgamma.c b/src/thirdparty/lcms2/src/cmsgamma.c index 83551ff9d..c219a5b44 100644 --- a/src/thirdparty/lcms2/src/cmsgamma.c +++ b/src/thirdparty/lcms2/src/cmsgamma.c @@ -864,7 +864,7 @@ cmsToneCurve* CMSEXPORT cmsReverseToneCurve(const cmsToneCurve* InGamma) {
_cmsAssert(InGamma != NULL);
- return cmsReverseToneCurveEx(InGamma -> nEntries, InGamma);
+ return cmsReverseToneCurveEx(4096, InGamma);
}
// From: Eilers, P.H.C. (1994) Smoothing and interpolation with finite
diff --git a/src/thirdparty/lcms2/src/cmsintrp.c b/src/thirdparty/lcms2/src/cmsintrp.c index e3d05112b..6e2ba47a3 100644 --- a/src/thirdparty/lcms2/src/cmsintrp.c +++ b/src/thirdparty/lcms2/src/cmsintrp.c @@ -424,9 +424,21 @@ void TrilinearInterpFloat(const cmsFloat32Number Input[], TotalOut = p -> nOutputs;
- px = Input[0] * p->Domain[0];
- py = Input[1] * p->Domain[1];
- pz = Input[2] * p->Domain[2];
+ // We need some clipping here
+ px = Input[0];
+ py = Input[1];
+ pz = Input[2];
+
+ if (px < 0) px = 0;
+ if (px > 1) px = 1;
+ if (py < 0) py = 0;
+ if (py > 1) py = 1;
+ if (pz < 0) pz = 0;
+ if (pz > 1) pz = 1;
+
+ px *= p->Domain[0];
+ py *= p->Domain[1];
+ pz *= p->Domain[2];
x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0;
y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0;
@@ -567,9 +579,21 @@ void TetrahedralInterpFloat(const cmsFloat32Number Input[], TotalOut = p -> nOutputs;
- px = Input[0] * p->Domain[0];
- py = Input[1] * p->Domain[1];
- pz = Input[2] * p->Domain[2];
+ // We need some clipping here
+ px = Input[0];
+ py = Input[1];
+ pz = Input[2];
+
+ if (px < 0) px = 0;
+ if (px > 1) px = 1;
+ if (py < 0) py = 0;
+ if (py > 1) py = 1;
+ if (pz < 0) pz = 0;
+ if (pz > 1) pz = 1;
+
+ px *= p->Domain[0];
+ py *= p->Domain[1];
+ pz *= p->Domain[2];
x0 = (int) _cmsQuickFloor(px); rx = (px - (cmsFloat32Number) x0);
y0 = (int) _cmsQuickFloor(py); ry = (py - (cmsFloat32Number) y0);
|