Lines Matching refs:NewElem
212 _cmsStageToneCurvesData* NewElem; in CurveSetDup() local
215 …NewElem = (_cmsStageToneCurvesData*) _cmsMallocZero(mpe ->ContextID, sizeof(_cmsStageToneCurvesDat… in CurveSetDup()
216 if (NewElem == NULL) return NULL; in CurveSetDup()
218 NewElem ->nCurves = Data ->nCurves; in CurveSetDup()
219 …NewElem ->TheCurves = (cmsToneCurve**) _cmsCalloc(mpe ->ContextID, NewElem ->nCurves, sizeof(cmsTo… in CurveSetDup()
221 if (NewElem ->TheCurves == NULL) goto Error; in CurveSetDup()
223 for (i=0; i < NewElem ->nCurves; i++) { in CurveSetDup()
226 NewElem ->TheCurves[i] = cmsDupToneCurve(Data ->TheCurves[i]); in CurveSetDup()
227 if (NewElem ->TheCurves[i] == NULL) goto Error; in CurveSetDup()
231 return (void*) NewElem; in CurveSetDup()
235 if (NewElem ->TheCurves != NULL) { in CurveSetDup()
236 for (i=0; i < NewElem ->nCurves; i++) { in CurveSetDup()
237 if (NewElem ->TheCurves[i]) in CurveSetDup()
238 cmsFreeToneCurve(NewElem ->TheCurves[i]); in CurveSetDup()
241 _cmsFree(mpe ->ContextID, NewElem ->TheCurves); in CurveSetDup()
242 _cmsFree(mpe ->ContextID, NewElem); in CurveSetDup()
251 _cmsStageToneCurvesData* NewElem; in cmsStageAllocToneCurves() local
259 NewElem = (_cmsStageToneCurvesData*) _cmsMallocZero(ContextID, sizeof(_cmsStageToneCurvesData)); in cmsStageAllocToneCurves()
260 if (NewElem == NULL) { in cmsStageAllocToneCurves()
265 NewMPE ->Data = (void*) NewElem; in cmsStageAllocToneCurves()
267 NewElem ->nCurves = nChannels; in cmsStageAllocToneCurves()
268 NewElem ->TheCurves = (cmsToneCurve**) _cmsCalloc(ContextID, nChannels, sizeof(cmsToneCurve*)); in cmsStageAllocToneCurves()
269 if (NewElem ->TheCurves == NULL) { in cmsStageAllocToneCurves()
277 NewElem ->TheCurves[i] = cmsBuildGamma(ContextID, 1.0); in cmsStageAllocToneCurves()
280 NewElem ->TheCurves[i] = cmsDupToneCurve(Curves[i]); in cmsStageAllocToneCurves()
283 if (NewElem ->TheCurves[i] == NULL) { in cmsStageAllocToneCurves()
344 _cmsStageMatrixData* NewElem; in MatrixElemDup() local
347 NewElem = (_cmsStageMatrixData*) _cmsMallocZero(mpe ->ContextID, sizeof(_cmsStageMatrixData)); in MatrixElemDup()
348 if (NewElem == NULL) return NULL; in MatrixElemDup()
352 …NewElem ->Double = (cmsFloat64Number*) _cmsDupMem(mpe ->ContextID, Data ->Double, sz * sizeof(cmsF… in MatrixElemDup()
355 NewElem ->Offset = (cmsFloat64Number*) _cmsDupMem(mpe ->ContextID, in MatrixElemDup()
358 return (void*) NewElem; in MatrixElemDup()
383 _cmsStageMatrixData* NewElem; in cmsStageAllocMatrix() local
399 NewElem = (_cmsStageMatrixData*) _cmsMallocZero(ContextID, sizeof(_cmsStageMatrixData)); in cmsStageAllocMatrix()
400 if (NewElem == NULL) return NULL; in cmsStageAllocMatrix()
403 NewElem ->Double = (cmsFloat64Number*) _cmsCalloc(ContextID, n, sizeof(cmsFloat64Number)); in cmsStageAllocMatrix()
405 if (NewElem->Double == NULL) { in cmsStageAllocMatrix()
411 NewElem ->Double[i] = Matrix[i]; in cmsStageAllocMatrix()
417 … NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Rows, sizeof(cmsFloat64Number)); in cmsStageAllocMatrix()
418 if (NewElem->Offset == NULL) { in cmsStageAllocMatrix()
424 NewElem ->Offset[i] = Offset[i]; in cmsStageAllocMatrix()
429 NewMPE ->Data = (void*) NewElem; in cmsStageAllocMatrix()
491 _cmsStageCLutData* NewElem; in CLUTElemDup() local
494 NewElem = (_cmsStageCLutData*) _cmsMallocZero(mpe ->ContextID, sizeof(_cmsStageCLutData)); in CLUTElemDup()
495 if (NewElem == NULL) return NULL; in CLUTElemDup()
497 NewElem ->nEntries = Data ->nEntries; in CLUTElemDup()
498 NewElem ->HasFloatValues = Data ->HasFloatValues; in CLUTElemDup()
503 …NewElem ->Tab.TFloat = (cmsFloat32Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.TFloat, Data ->n… in CLUTElemDup()
504 if (NewElem ->Tab.TFloat == NULL) in CLUTElemDup()
507 …NewElem ->Tab.T = (cmsUInt16Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.T, Data ->nEntries * s… in CLUTElemDup()
508 if (NewElem ->Tab.T == NULL) in CLUTElemDup()
513 NewElem ->Params = _cmsComputeInterpParamsEx(mpe ->ContextID, in CLUTElemDup()
517 NewElem ->Tab.T, in CLUTElemDup()
519 if (NewElem->Params != NULL) in CLUTElemDup()
520 return (void*) NewElem; in CLUTElemDup()
522 if (NewElem->Tab.T) in CLUTElemDup()
524 _cmsFree(mpe ->ContextID, NewElem -> Tab.T); in CLUTElemDup()
525 _cmsFree(mpe ->ContextID, NewElem); in CLUTElemDup()
557 _cmsStageCLutData* NewElem; in cmsStageAllocCLut16bitGranular() local
572 NewElem = (_cmsStageCLutData*) _cmsMallocZero(ContextID, sizeof(_cmsStageCLutData)); in cmsStageAllocCLut16bitGranular()
573 if (NewElem == NULL) { in cmsStageAllocCLut16bitGranular()
578 NewMPE ->Data = (void*) NewElem; in cmsStageAllocCLut16bitGranular()
580 NewElem -> nEntries = n = outputChan * CubeSize(clutPoints, inputChan); in cmsStageAllocCLut16bitGranular()
581 NewElem -> HasFloatValues = FALSE; in cmsStageAllocCLut16bitGranular()
589 NewElem ->Tab.T = (cmsUInt16Number*) _cmsCalloc(ContextID, n, sizeof(cmsUInt16Number)); in cmsStageAllocCLut16bitGranular()
590 if (NewElem ->Tab.T == NULL) { in cmsStageAllocCLut16bitGranular()
597 NewElem ->Tab.T[i] = Table[i]; in cmsStageAllocCLut16bitGranular()
601 …NewElem ->Params = _cmsComputeInterpParamsEx(ContextID, clutPoints, inputChan, outputChan, NewElem… in cmsStageAllocCLut16bitGranular()
602 if (NewElem ->Params == NULL) { in cmsStageAllocCLut16bitGranular()
648 _cmsStageCLutData* NewElem; in cmsStageAllocCLutFloatGranular() local
663 NewElem = (_cmsStageCLutData*) _cmsMallocZero(ContextID, sizeof(_cmsStageCLutData)); in cmsStageAllocCLutFloatGranular()
664 if (NewElem == NULL) { in cmsStageAllocCLutFloatGranular()
669 NewMPE ->Data = (void*) NewElem; in cmsStageAllocCLutFloatGranular()
672 NewElem -> nEntries = n = outputChan * CubeSize(clutPoints, inputChan); in cmsStageAllocCLutFloatGranular()
673 NewElem -> HasFloatValues = TRUE; in cmsStageAllocCLutFloatGranular()
680 NewElem ->Tab.TFloat = (cmsFloat32Number*) _cmsCalloc(ContextID, n, sizeof(cmsFloat32Number)); in cmsStageAllocCLutFloatGranular()
681 if (NewElem ->Tab.TFloat == NULL) { in cmsStageAllocCLutFloatGranular()
688 NewElem ->Tab.TFloat[i] = Table[i]; in cmsStageAllocCLutFloatGranular()
692 …NewElem ->Params = _cmsComputeInterpParamsEx(ContextID, clutPoints, inputChan, outputChan, NewEle… in cmsStageAllocCLutFloatGranular()
693 if (NewElem ->Params == NULL) { in cmsStageAllocCLutFloatGranular()