diff options
author | Marti Maria <info@littlecms.com> | 2010-04-13 14:12:16 +0400 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2010-04-13 14:12:16 +0400 |
commit | eb57a59922b5abbf83e351c349cf513d9fb9c798 (patch) | |
tree | 454b6edb97f3f6c64d884c09bbd5305fa4584d75 /src | |
parent | 54256e3aadc1402676a85cd229fad798adc4c221 (diff) |
Beta3 additions
Diffstat (limited to 'src')
-rw-r--r-- | src/cmsintrp.c | 6 | ||||
-rw-r--r-- | src/cmsopt.c | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/cmsintrp.c b/src/cmsintrp.c index 6dccfaa..a4e18cc 100644 --- a/src/cmsintrp.c +++ b/src/cmsintrp.c @@ -683,13 +683,13 @@ void Eval4Inputs(register const cmsUInt16Number Input[], K1 = K0 + (Input[0] == 0xFFFFU ? 0 : p16->opta[3]); X0 = p16 -> opta[2] * x0; - X1 = X0 + (Input[0] == 0xFFFFU ? 0 : p16->opta[2]); + X1 = X0 + (Input[1] == 0xFFFFU ? 0 : p16->opta[2]); Y0 = p16 -> opta[1] * y0; - Y1 = Y0 + (Input[1] == 0xFFFFU ? 0 : p16->opta[1]); + Y1 = Y0 + (Input[2] == 0xFFFFU ? 0 : p16->opta[1]); Z0 = p16 -> opta[0] * z0; - Z1 = Z0 + (Input[2] == 0xFFFFU ? 0 : p16->opta[0]); + Z1 = Z0 + (Input[3] == 0xFFFFU ? 0 : p16->opta[0]); LutTable = (cmsUInt16Number*) p16 -> Table; LutTable += K0; diff --git a/src/cmsopt.c b/src/cmsopt.c index 7fd44fd..8cf75a9 100644 --- a/src/cmsopt.c +++ b/src/cmsopt.c @@ -253,7 +253,7 @@ void* Prelin16dup(cmsContext ContextID, const void* ptr) Prelin16Data* p16 = (Prelin16Data*) ptr; Prelin16Data* Duped = _cmsDupMem(ContextID, p16, sizeof(Prelin16Data)); - if (Duped == NULL) return NULL; + if (Duped == NULL) return NULL; Duped ->StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number)); Duped ->EvalCurveOut16 = _cmsDupMem(ContextID, p16 ->EvalCurveOut16, p16 ->nOutputs * sizeof(_cmsInterpFn16)); @@ -329,7 +329,7 @@ int XFormSampler16(register const cmsUInt16Number In[], register cmsUInt16Number cmsFloat32Number InFloat[MAXCHANNELS], OutFloat[MAXCHANNELS]; cmsUInt32Number i; - _cmsAssert(Lut -> InputChannels < MAXCHANNELS); + _cmsAssert(Lut -> InputChannels < MAXCHANNELS); _cmsAssert(Lut -> OutputChannels < MAXCHANNELS); // From 16 bit to floating point @@ -904,10 +904,10 @@ cmsBool OptimizeByComputingLinearization(cmsPipeline** Lut, cmsUInt32Number Inte if (T_COLORSPACE(*OutputFormat) != PT_RGB) return FALSE; - // On 16 bits, user has to specify the feature - if (!_cmsFormatterIs8bit(*InputFormat)) { - if (!(*dwFlags & cmsFLAGS_CLUT_PRE_LINEARIZATION)) return FALSE; - } + // On 16 bits, user has to specify the feature + if (!_cmsFormatterIs8bit(*InputFormat)) { + if (!(*dwFlags & cmsFLAGS_CLUT_PRE_LINEARIZATION)) return FALSE; + } OriginalLut = *Lut; ColorSpace = _cmsICCcolorSpace(T_COLORSPACE(*InputFormat)); @@ -1084,7 +1084,7 @@ void* CurvesDup(cmsContext ContextID, const void* ptr) Curves16Data* Data = _cmsDupMem(ContextID, ptr, sizeof(Curves16Data)); int i; - if (Data == NULL) return NULL; + if (Data == NULL) return NULL; Data ->Curves = _cmsDupMem(ContextID, Data ->Curves, Data ->nCurves * sizeof(cmsUInt16Number*)); @@ -1564,8 +1564,8 @@ cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Data) return TRUE; } - // Optimizer callback is required - if (Plugin ->OptimizePtr == NULL) return FALSE; + // Optimizer callback is required + if (Plugin ->OptimizePtr == NULL) return FALSE; fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(sizeof(_cmsOptimizationCollection)); if (fl == NULL) return FALSE; |