Lines Matching defs:ContextID

155 cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Data)
157 _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin);
167 fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(ContextID, sizeof(_cmsParametricCurvesCollection));
206 _cmsParametricCurvesCollection *GetParametricCurveByType(cmsContext ContextID, int Type, int* index)
210 _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin);
241 cmsToneCurve* AllocateToneCurveStruct(cmsContext ContextID, cmsInt32Number nEntries,
250 cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve of more than 65530 entries");
255 cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve with zero segments and no table");
260 p = (cmsToneCurve*) _cmsMallocZero(ContextID, sizeof(cmsToneCurve));
269 p ->Segments = (cmsCurveSegment*) _cmsCalloc(ContextID, nSegments, sizeof(cmsCurveSegment));
272 p ->Evals = (cmsParametricCurveEvaluator*) _cmsCalloc(ContextID, nSegments, sizeof(cmsParametricCurveEvaluator));
284 p ->Table16 = (cmsUInt16Number*) _cmsCalloc(ContextID, nEntries, sizeof(cmsUInt16Number));
303 p ->SegInterp = (cmsInterpParams**) _cmsCalloc(ContextID, nSegments, sizeof(cmsInterpParams*));
310 p ->SegInterp[i] = _cmsComputeInterpParams(ContextID, Segments[i].nGridPoints, 1, 1, NULL, CMS_LERP_FLAGS_FLOAT);
315 p ->Segments[i].SampledPoints = (cmsFloat32Number*) _cmsDupMem(ContextID, Segments[i].SampledPoints, sizeof(cmsFloat32Number) * Segments[i].nGridPoints);
320 c = GetParametricCurveByType(ContextID, Segments[i].Type, NULL);
326 p ->InterpParams = _cmsComputeInterpParams(ContextID, p ->nEntries, 1, 1, p->Table16, CMS_LERP_FLAGS_16BITS);
331 if (p -> Segments) _cmsFree(ContextID, p ->Segments);
332 if (p -> Evals) _cmsFree(ContextID, p -> Evals);
333 if (p ->Table16) _cmsFree(ContextID, p ->Table16);
334 _cmsFree(ContextID, p);
648 cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsInt32Number nEntries, const cmsUInt16Number Values[])
650 return AllocateToneCurveStruct(ContextID, nEntries, 0, NULL, Values);
662 cmsToneCurve* CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID,
678 g = AllocateToneCurveStruct(ContextID, nGridPoints, nSegments, Segments, NULL);
697 cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[])
733 return cmsBuildSegmentedToneCurve(ContextID, 3, Seg);
741 cmsToneCurve* CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt32Number Type, const cmsFloat64Number Params[])
746 _cmsParametricCurvesCollection* c = GetParametricCurveByType(ContextID, Type, &Pos);
751 cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Invalid parametric curve type %d", Type);
764 return cmsBuildSegmentedToneCurve(ContextID, 1, &Seg0);
770 cmsToneCurve* CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma)
772 return cmsBuildParametricToneCurve(ContextID, 1, &Gamma);
779 cmsContext ContextID;
783 ContextID = Curve ->InterpParams->ContextID;
788 _cmsFree(ContextID, Curve ->Table16);
797 _cmsFree(ContextID, Curve ->Segments[i].SampledPoints);
804 _cmsFree(ContextID, Curve ->Segments);
805 _cmsFree(ContextID, Curve ->SegInterp);
809 _cmsFree(ContextID, Curve -> Evals);
811 if (Curve) _cmsFree(ContextID, Curve);
833 return AllocateToneCurveStruct(In ->InterpParams ->ContextID, In ->nEntries, In ->nSegments, In ->Segments, In ->Table16);
841 cmsToneCurve* CMSEXPORT cmsJoinToneCurve(cmsContext ContextID,
858 Res = (cmsFloat32Number*) _cmsCalloc(ContextID, nResultingPoints, sizeof(cmsFloat32Number));
870 out = cmsBuildTabulatedToneCurveFloat(ContextID, nResultingPoints, Res);
874 if (Res != NULL) _cmsFree(ContextID, Res);
944 GetParametricCurveByType(InCurve ->InterpParams->ContextID, InCurve ->Segments[0].Type, NULL) != NULL) {
946 return cmsBuildParametricToneCurve(InCurve ->InterpParams->ContextID,
952 out = cmsBuildTabulatedToneCurve16(InCurve ->InterpParams->ContextID, nResultSamples, NULL);
1015 cmsBool smooth2(cmsContext ContextID, cmsFloat32Number w[], cmsFloat32Number y[], cmsFloat32Number z[], cmsFloat32Number lambda, int m)
1022 c = (cmsFloat32Number*) _cmsCalloc(ContextID, MAX_NODES_IN_CURVE, sizeof(cmsFloat32Number));
1023 d = (cmsFloat32Number*) _cmsCalloc(ContextID, MAX_NODES_IN_CURVE, sizeof(cmsFloat32Number));
1024 e = (cmsFloat32Number*) _cmsCalloc(ContextID, MAX_NODES_IN_CURVE, sizeof(cmsFloat32Number));
1064 if (c != NULL) _cmsFree(ContextID, c);
1065 if (d != NULL) _cmsFree(ContextID, d);
1066 if (e != NULL) _cmsFree(ContextID, e);
1084 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: too many points.");
1098 if (!smooth2(Tab ->InterpParams->ContextID, w, y, z, (cmsFloat32Number) lambda, nItems)) return FALSE;
1107 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Non-Monotonic.");
1113 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly zeros.");
1117 cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly poles.");