Lines Matching defs:Lut
119 cmsBool _Remove1Op(cmsPipeline* Lut, cmsStageSignature UnaryOp)
121 cmsStage** pt = &Lut ->Elements;
139 cmsBool _Remove2Op(cmsPipeline* Lut, cmsStageSignature Op1, cmsStageSignature Op2)
145 pt1 = &Lut ->Elements;
188 cmsBool _MultiplyMatrix(cmsPipeline* Lut)
195 pt1 = &Lut->Elements;
230 cmsStage* Multmat = cmsStageAllocMatrix(Lut->ContextID, 3, 3, (const cmsFloat64Number*) &res, NULL);
251 cmsBool PreOptimize(cmsPipeline* Lut)
260 Opt |= _Remove1Op(Lut, cmsSigIdentityElemType);
263 Opt |= _Remove2Op(Lut, cmsSigXYZ2LabElemType, cmsSigLab2XYZElemType);
266 Opt |= _Remove2Op(Lut, cmsSigLab2XYZElemType, cmsSigXYZ2LabElemType);
269 Opt |= _Remove2Op(Lut, cmsSigLabV4toV2, cmsSigLabV2toV4);
272 Opt |= _Remove2Op(Lut, cmsSigLabV2toV4, cmsSigLabV4toV2);
275 Opt |= _Remove2Op(Lut, cmsSigLab2FloatPCS, cmsSigFloatPCS2Lab);
278 Opt |= _Remove2Op(Lut, cmsSigXYZ2FloatPCS, cmsSigFloatPCS2XYZ);
281 Opt |= _MultiplyMatrix(Lut);
406 // Sampler implemented by another LUT. This is a clean way to precalculate the devicelink 3D CLUT for
411 cmsPipeline* Lut = (cmsPipeline*) Cargo;
415 _cmsAssert(Lut -> InputChannels < cmsMAXCHANNELS);
416 _cmsAssert(Lut -> OutputChannels < cmsMAXCHANNELS);
419 for (i=0; i < Lut ->InputChannels; i++)
423 cmsPipelineEvalFloat(InFloat, OutFloat, Lut);
426 for (i=0; i < Lut ->OutputChannels; i++)
465 cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut stage");
549 cmsBool FixWhiteMisalignment(cmsPipeline* Lut, cmsColorSpaceSignature EntryColorSpace, cmsColorSpaceSignature ExitColorSpace)
563 if (Lut ->InputChannels != nIns) return FALSE;
564 if (Lut ->OutputChannels != nOuts) return FALSE;
566 cmsPipelineEval16(WhitePointIn, ObtainedOut, Lut);
570 // Check if the LUT comes as Prelin, CLUT or Postlin. We allow all combinations
571 if (!cmsPipelineCheckAndRetreiveStages(Lut, 3, cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType, &PreLin, &CLUT, &PostLin))
572 if (!cmsPipelineCheckAndRetreiveStages(Lut, 2, cmsSigCurveSetElemType, cmsSigCLutElemType, &PreLin, &CLUT))
573 if (!cmsPipelineCheckAndRetreiveStages(Lut, 2, cmsSigCLutElemType, cmsSigCurveSetElemType, &CLUT, &PostLin))
574 if (!cmsPipelineCheckAndRetreiveStages(Lut, 1, cmsSigCLutElemType, &CLUT))
622 // This function creates simple LUT from complex ones. The generated LUT has an optional set of
624 // These curves have to exist in the original LUT in order to be used in the simplified output.
631 cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
655 if (cmsPipelineStageCount(*Lut) == 0)
658 Src = *Lut;
667 // Allocate an empty LUT
689 // in destination LUT, the sampling shoud be applied after this stage.
699 // Add the CLUT to the destination LUT
721 // In destination LUT, the sampling shoud be applied after this stage.
728 // The source LUT whithout pre/post curves is passed as parameter.
787 *Lut = Dest;
1023 cmsBool OptimizeByComputingLinearization(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
1055 OriginalLut = *Lut;
1072 // If the last stage of the original lut are curves, and those curves are
1147 // Create the result LUT
1160 // Add the CLUT to the destination LUT
1164 // Resample the LUT
1214 // And return the obtained LUT
1217 *Lut = OptimizedLUT;
1355 cmsPipeline* Lut = (cmsPipeline*) D;
1358 for (i=0; i < Lut ->InputChannels; i++) {
1364 // If the target LUT holds only curves, the optimization procedure is to join all those
1367 cmsBool OptimizeByJoiningCurves(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
1372 cmsPipeline* Src = *Lut;
1381 // Only curves in this LUT?
1388 // Allocate an empty LUT
1455 // LUT optimizes to nothing. Set the identity LUT
1467 *Lut = Dest;
1491 // LUT is Shaper - Matrix - Matrix - Shaper, which is very frequent when combining two matrix-shaper profiles
1656 cmsBool OptimizeMatrixShaper(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
1672 Src = *Lut;
1733 // Allocate an empty LUT
1737 // Assamble the new LUT
1769 *Lut = Dest;
1888 // The entry point for LUT optimization