Lines Matching full:segments
29 // The curve is stored in segments, where each segment can be sampled or specified by parameters.
213 cmsInt32Number nSegments, const cmsCurveSegment* Segments, in AllocateToneCurveStruct() argument
226 …cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve with zero segments and no ta… in AllocateToneCurveStruct()
234 // In this case, there are no segments in AllocateToneCurveStruct()
236 p ->Segments = NULL; in AllocateToneCurveStruct()
240 p ->Segments = (cmsCurveSegment*) _cmsCalloc(ContextID, nSegments, sizeof(cmsCurveSegment)); in AllocateToneCurveStruct()
241 if (p ->Segments == NULL) goto Error; in AllocateToneCurveStruct()
268 // Initialize the segments stuff. The evaluator for each segment is located and a pointer to it in AllocateToneCurveStruct()
270 if (Segments != NULL && (nSegments > 0)) { in AllocateToneCurveStruct()
280 if (Segments[i].Type == 0) in AllocateToneCurveStruct()
281 …p ->SegInterp[i] = _cmsComputeInterpParams(ContextID, Segments[i].nGridPoints, 1, 1, NULL, CMS_LER… in AllocateToneCurveStruct()
283 memmove(&p ->Segments[i], &Segments[i], sizeof(cmsCurveSegment)); in AllocateToneCurveStruct()
285 if (Segments[i].Type == 0 && Segments[i].SampledPoints != NULL) in AllocateToneCurveStruct()
286 …p ->Segments[i].SampledPoints = (cmsFloat32Number*) _cmsDupMem(ContextID, Segments[i].SampledPoint… in AllocateToneCurveStruct()
288 p ->Segments[i].SampledPoints = NULL; in AllocateToneCurveStruct()
291 c = GetParametricCurveByType(ContextID, Segments[i].Type, NULL); in AllocateToneCurveStruct()
302 if (p -> Segments) _cmsFree(ContextID, p ->Segments); in AllocateToneCurveStruct()
580 if ((R > g ->Segments[i].x0) && (R <= g ->Segments[i].x1)) { in EvalSegmentedFn()
583 if (g ->Segments[i].Type == 0) { in EvalSegmentedFn()
585 …cmsFloat32Number R1 = (cmsFloat32Number) (R - g ->Segments[i].x0) / (g ->Segments[i].x1 - g ->Segm… in EvalSegmentedFn()
589 g ->SegInterp[i]-> Table = g ->Segments[i].SampledPoints; in EvalSegmentedFn()
596 return g ->Evals[i](g->Segments[i].Type, g ->Segments[i].Params, R); in EvalSegmentedFn()
634 … cmsInt32Number nSegments, const cmsCurveSegment Segments[]) in cmsBuildSegmentedToneCurve() argument
641 _cmsAssert(Segments != NULL); in cmsBuildSegmentedToneCurve()
644 if (nSegments == 1 && Segments[0].Type == 1) { in cmsBuildSegmentedToneCurve()
646 nGridPoints = EntriesByGamma(Segments[0].Params[0]); in cmsBuildSegmentedToneCurve()
649 g = AllocateToneCurveStruct(ContextID, nGridPoints, nSegments, Segments, NULL); in cmsBuildSegmentedToneCurve()
672 // A segmented tone curve should have function segments in the first and last positions in cmsBuildTabulatedToneCurveFloat()
766 if (Curve ->Segments) { in cmsFreeToneCurve()
772 if (Curve ->Segments[i].SampledPoints) { in cmsFreeToneCurve()
773 _cmsFree(ContextID, Curve ->Segments[i].SampledPoints); in cmsFreeToneCurve()
774 Curve ->Segments[i].SampledPoints = NULL; in cmsFreeToneCurve()
783 _cmsFree(ContextID, Curve ->Segments); in cmsFreeToneCurve()
784 Curve ->Segments = NULL; in cmsFreeToneCurve()
820 …if (In == NULL || In ->InterpParams == NULL || In ->Segments == NULL || In ->Table16 == NULL) retu… in cmsDupToneCurve()
822 …eStruct(In ->InterpParams ->ContextID, In ->nEntries, In ->nSegments, In ->Segments, In ->Table16); in cmsDupToneCurve()
931 if (InCurve ->nSegments == 1 && InCurve ->Segments[0].Type > 0 && in cmsReverseToneCurveEx()
932 /* InCurve -> Segments[0].Type <= 5 */ in cmsReverseToneCurveEx()
933 …GetParametricCurveByType(InCurve ->InterpParams->ContextID, InCurve ->Segments[0].Type, NULL) != N… in cmsReverseToneCurveEx()
936 -(InCurve -> Segments[0].Type), in cmsReverseToneCurveEx()
937 InCurve -> Segments[0].Params); in cmsReverseToneCurveEx()
1207 return t ->Segments[0].Type; in cmsGetToneCurveParametricType()