Lines Matching full:contextid
127 cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Data)
129 _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin);
139 fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(ContextID, sizeof(_cmsParametricCurvesCollection));
178 _cmsParametricCurvesCollection *GetParametricCurveByType(cmsContext ContextID, int Type, int* index)
182 _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin);
213 cmsToneCurve* AllocateToneCurveStruct(cmsContext ContextID, cmsInt32Number nEntries,
222 cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve of more than 65530 entries");
227 cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve with zero segments and no table");
232 p = (cmsToneCurve*) _cmsMallocZero(ContextID, sizeof(cmsToneCurve));
241 p ->Segments = (cmsCurveSegment*) _cmsCalloc(ContextID, nSegments, sizeof(cmsCurveSegment));
244 p ->Evals = (cmsParametricCurveEvaluator*) _cmsCalloc(ContextID, nSegments, sizeof(cmsParametricCurveEvaluator));
256 p ->Table16 = (cmsUInt16Number*) _cmsCalloc(ContextID, nEntries, sizeof(cmsUInt16Number));
275 p ->SegInterp = (cmsInterpParams**) _cmsCalloc(ContextID, nSegments, sizeof(cmsInterpParams*));
282 p ->SegInterp[i] = _cmsComputeInterpParams(ContextID, Segments[i].nGridPoints, 1, 1, NULL, CMS_LERP_FLAGS_FLOAT);
287 p ->Segments[i].SampledPoints = (cmsFloat32Number*) _cmsDupMem(ContextID, Segments[i].SampledPoints, sizeof(cmsFloat32Number) * Segments[i].nGridPoints);
292 c = GetParametricCurveByType(ContextID, Segments[i].Type, NULL);
298 p ->InterpParams = _cmsComputeInterpParams(ContextID, p ->nEntries, 1, 1, p->Table16, CMS_LERP_FLAGS_16BITS);
303 if (p -> Segments) _cmsFree(ContextID, p ->Segments);
304 if (p -> Evals) _cmsFree(ContextID, p -> Evals);
305 if (p ->Table16) _cmsFree(ContextID, p ->Table16);
306 _cmsFree(ContextID, p);
620 cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsInt32Number nEntries, const cmsUInt16Number Values[])
622 return AllocateToneCurveStruct(ContextID, nEntries, 0, NULL, Values);
634 cmsToneCurve* CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID,
650 g = AllocateToneCurveStruct(ContextID, nGridPoints, nSegments, Segments, NULL);
669 cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[])
705 return cmsBuildSegmentedToneCurve(ContextID, 3, Seg);
713 cmsToneCurve* CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt32Number Type, const cmsFloat64Number Params[])
718 _cmsParametricCurvesCollection* c = GetParametricCurveByType(ContextID, Type, &Pos);
723 cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Invalid parametric curve type %d", Type);
736 return cmsBuildSegmentedToneCurve(ContextID, 1, &Seg0);
742 cmsToneCurve* CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma)
744 return cmsBuildParametricToneCurve(ContextID, 1, &Gamma);
751 cmsContext ContextID;
757 ContextID = Curve ->InterpParams->ContextID;
764 _cmsFree(ContextID, Curve ->Table16);
775 _cmsFree(ContextID, Curve ->Segments[i].SampledPoints);
786 _cmsFree(ContextID, Curve ->Segments);
788 _cmsFree(ContextID, Curve ->SegInterp);
794 _cmsFree(ContextID, Curve -> Evals);
800 _cmsFree(ContextID, Curve);
827 return AllocateToneCurveStruct(In ->InterpParams ->ContextID, In ->nEntries, In ->nSegments, In ->Segments, In ->Table16);
835 cmsToneCurve* CMSEXPORT cmsJoinToneCurve(cmsContext ContextID,
852 Res = (cmsFloat32Number*) _cmsCalloc(ContextID, nResultingPoints, sizeof(cmsFloat32Number));
864 out = cmsBuildTabulatedToneCurveFloat(ContextID, nResultingPoints, Res);
868 if (Res != NULL) _cmsFree(ContextID, Res);
938 GetParametricCurveByType(InCurve ->InterpParams->ContextID, InCurve ->Segments[0].Type, NULL) != NULL) {
940 return cmsBuildParametricToneCurve(InCurve ->InterpParams->ContextID,
946 out = cmsBuildTabulatedToneCurve16(InCurve ->InterpParams->ContextID, nResultSamples, NULL);
1009 cmsBool smooth2(cmsContext ContextID, cmsFloat32Number w[], cmsFloat32Number y[], cmsFloat32Number z[], cmsFloat32Number lambda, int m)
1016 c = (cmsFloat32Number*) _cmsCalloc(ContextID, MAX_NODES_IN_CURVE, sizeof(cmsFloat32Number));
1017 d = (cmsFloat32Number*) _cmsCalloc(ContextID, MAX_NODES_IN_CURVE, sizeof(cmsFloat32Number));
1018 e = (cmsFloat32Number*) _cmsCalloc(ContextID, MAX_NODES_IN_CURVE, sizeof(cmsFloat32Number));
1058 if (c != NULL) _cmsFree(ContextID, c);
1059 if (d != NULL) _cmsFree(ContextID, d);
1060 if (e != NULL) _cmsFree(ContextID, e);
1078 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: too many points.");
1092 if (!smooth2(Tab ->InterpParams->ContextID, w, y, z, (cmsFloat32Number) lambda, nItems)) return FALSE;
1101 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Non-Monotonic.");
1107 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly zeros.");
1111 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly poles.");