This source file includes following definitions.
- _cmsToFixedDomain
- _cmsFromFixedDomain
- _cmsQuickFloor
- _cmsQuickFloorWord
- _cmsQuickSaturateWord
- _cmsLockPrimitive
- _cmsUnlockPrimitive
- _cmsInitMutexPrimitive
- _cmsDestroyMutexPrimitive
- _cmsEnterCriticalSectionPrimitive
- _cmsLeaveCriticalSectionPrimitive
- _cmsLockPrimitive
- _cmsUnlockPrimitive
- _cmsInitMutexPrimitive
- _cmsDestroyMutexPrimitive
- _cmsEnterCriticalSectionPrimitive
- _cmsLeaveCriticalSectionPrimitive
- _cmsLockPrimitive
- _cmsUnlockPrimitive
- _cmsInitMutexPrimitive
- _cmsDestroyMutexPrimitive
- _cmsEnterCriticalSectionPrimitive
- _cmsLeaveCriticalSectionPrimitive
#ifndef _lcms_internal_H
#ifndef _lcms_plugin_H
# include "lcms2_plugin.h"
#endif
#include <ctype.h>
#include <assert.h>
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
#ifndef M_LOG10E
# define M_LOG10E 0.434294481903251827651
#endif
#if defined(__BORLANDC__) || (_MSC_VER < 1400)
#define sinf(x) (float)sin((float)x)
#define sqrtf(x) (float)sqrt((float)x)
#endif
#define _cmsALIGNLONG(x) (((x)+(sizeof(cmsUInt32Number)-1)) & ~(sizeof(cmsUInt32Number)-1))
#define _cmsALIGNMEM(x) (((x)+(sizeof(void *) - 1)) & ~(sizeof(void *) - 1))
#define MAX_ENCODEABLE_XYZ (1.0 + 32767.0/32768.0)
#define MIN_ENCODEABLE_ab2 (-128.0)
#define MAX_ENCODEABLE_ab2 ((65535.0/256.0) - 128.0)
#define MIN_ENCODEABLE_ab4 (-128.0)
#define MAX_ENCODEABLE_ab4 (127.0)
#define MAX_STAGE_CHANNELS 128
#define cmsUNUSED_PARAMETER(x) ((void)x)
#if defined(_MSC_VER) || defined(__BORLANDC__)
# define cmsINLINE __inline
#else
# define cmsINLINE static inline
#endif
#ifdef _MSC_VER
# ifndef snprintf
# define snprintf _snprintf
# endif
# ifndef vsnprintf
# define vsnprintf _vsnprintf
# endif
#endif
#define FROM_8_TO_16(rgb) (cmsUInt16Number) ((((cmsUInt16Number) (rgb)) << 8)|(rgb))
#define FROM_16_TO_8(rgb) (cmsUInt8Number) ((((rgb) * 65281 + 8388608) >> 24) & 0xFF)
#ifdef _MSC_VER
# if (_MSC_VER >= 1500)
# define _cmsAssert(a) { assert((a)); __analysis_assume((a)); }
# else
# define _cmsAssert(a) assert((a))
# endif
#else
# define _cmsAssert(a) assert((a))
#endif
#define MATRIX_DET_TOLERANCE 0.0001
#define FIXED_TO_INT(x) ((x)>>16)
#define FIXED_REST_TO_INT(x) ((x)&0xFFFFU)
#define ROUND_FIXED_TO_INT(x) (((x)+0x8000)>>16)
cmsINLINE cmsS15Fixed16Number _cmsToFixedDomain(int a) { return a + ((a + 0x7fff) / 0xffff); }
cmsINLINE int _cmsFromFixedDomain(cmsS15Fixed16Number a) { return a - ((a + 0x7fff) >> 16); }
cmsINLINE int _cmsQuickFloor(cmsFloat64Number val)
{
#ifdef CMS_DONT_USE_FAST_FLOOR
return (int) floor(val);
#else
const cmsFloat64Number _lcms_double2fixmagic = 68719476736.0 * 1.5;
union {
cmsFloat64Number val;
int halves[2];
} temp;
temp.val = val + _lcms_double2fixmagic;
#ifdef CMS_USE_BIG_ENDIAN
return temp.halves[1] >> 16;
#else
return temp.halves[0] >> 16;
#endif
#endif
}
cmsINLINE cmsUInt16Number _cmsQuickFloorWord(cmsFloat64Number d)
{
return (cmsUInt16Number) _cmsQuickFloor(d - 32767.0) + 32767U;
}
cmsINLINE cmsUInt16Number _cmsQuickSaturateWord(cmsFloat64Number d)
{
d += 0.5;
if (d <= 0) return 0;
if (d >= 65535.0) return 0xffff;
return _cmsQuickFloorWord(d);
}
#ifndef CMS_NO_PTHREADS
#ifdef CMS_IS_WINDOWS_
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
typedef CRITICAL_SECTION _cmsMutex;
#define CMS_MUTEX_INITIALIZER {(PRTL_CRITICAL_SECTION_DEBUG) -1,-1,0,0,0,0}
#ifdef _MSC_VER
# if (_MSC_VER >= 1800)
# pragma warning(disable : 26135)
# endif
#endif
cmsINLINE int _cmsLockPrimitive(_cmsMutex *m)
{
EnterCriticalSection(m);
return 0;
}
cmsINLINE int _cmsUnlockPrimitive(_cmsMutex *m)
{
LeaveCriticalSection(m);
return 0;
}
cmsINLINE int _cmsInitMutexPrimitive(_cmsMutex *m)
{
InitializeCriticalSection(m);
return 0;
}
cmsINLINE int _cmsDestroyMutexPrimitive(_cmsMutex *m)
{
DeleteCriticalSection(m);
return 0;
}
cmsINLINE int _cmsEnterCriticalSectionPrimitive(_cmsMutex *m)
{
EnterCriticalSection(m);
return 0;
}
cmsINLINE int _cmsLeaveCriticalSectionPrimitive(_cmsMutex *m)
{
LeaveCriticalSection(m);
return 0;
}
#else
#include <pthread.h>
#define CMS_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
typedef pthread_mutex_t _cmsMutex;
cmsINLINE int _cmsLockPrimitive(_cmsMutex *m)
{
return pthread_mutex_lock(m);
}
cmsINLINE int _cmsUnlockPrimitive(_cmsMutex *m)
{
return pthread_mutex_unlock(m);
}
cmsINLINE int _cmsInitMutexPrimitive(_cmsMutex *m)
{
return pthread_mutex_init(m, NULL);
}
cmsINLINE int _cmsDestroyMutexPrimitive(_cmsMutex *m)
{
return pthread_mutex_destroy(m);
}
cmsINLINE int _cmsEnterCriticalSectionPrimitive(_cmsMutex *m)
{
return pthread_mutex_lock(m);
}
cmsINLINE int _cmsLeaveCriticalSectionPrimitive(_cmsMutex *m)
{
return pthread_mutex_unlock(m);
}
#endif
#else
#define CMS_MUTEX_INITIALIZER 0
typedef int _cmsMutex;
cmsINLINE int _cmsLockPrimitive(_cmsMutex *m)
{
cmsUNUSED_PARAMETER(m);
return 0;
}
cmsINLINE int _cmsUnlockPrimitive(_cmsMutex *m)
{
cmsUNUSED_PARAMETER(m);
return 0;
}
cmsINLINE int _cmsInitMutexPrimitive(_cmsMutex *m)
{
cmsUNUSED_PARAMETER(m);
return 0;
}
cmsINLINE int _cmsDestroyMutexPrimitive(_cmsMutex *m)
{
cmsUNUSED_PARAMETER(m);
return 0;
}
cmsINLINE int _cmsEnterCriticalSectionPrimitive(_cmsMutex *m)
{
cmsUNUSED_PARAMETER(m);
return 0;
}
cmsINLINE int _cmsLeaveCriticalSectionPrimitive(_cmsMutex *m)
{
cmsUNUSED_PARAMETER(m);
return 0;
}
#endif
void* _cmsPluginMalloc(cmsContext ContextID, cmsUInt32Number size);
cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterInterpPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterFormattersPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterTagTypePlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterTagPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterOptimizationPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
cmsBool _cmsRegisterMutexPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
typedef struct _cmsSubAllocator_chunk_st {
cmsUInt8Number* Block;
cmsUInt32Number BlockSize;
cmsUInt32Number Used;
struct _cmsSubAllocator_chunk_st* next;
} _cmsSubAllocator_chunk;
typedef struct {
cmsContext ContextID;
_cmsSubAllocator_chunk* h;
} _cmsSubAllocator;
_cmsSubAllocator* _cmsCreateSubAlloc(cmsContext ContextID, cmsUInt32Number Initial);
void _cmsSubAllocDestroy(_cmsSubAllocator* s);
void* _cmsSubAlloc(_cmsSubAllocator* s, cmsUInt32Number size);
void* _cmsSubAllocDup(_cmsSubAllocator* s, const void *ptr, cmsUInt32Number size);
typedef enum {
UserPtr,
Logger,
AlarmCodesContext,
AdaptationStateContext,
MemPlugin,
InterpPlugin,
CurvesPlugin,
FormattersPlugin,
TagTypePlugin,
TagPlugin,
IntentPlugin,
MPEPlugin,
OptimizationPlugin,
TransformPlugin,
MutexPlugin,
MemoryClientMax
} _cmsMemoryClient;
typedef struct {
_cmsMallocFnPtrType MallocPtr;
_cmsMalloZerocFnPtrType MallocZeroPtr;
_cmsFreeFnPtrType FreePtr;
_cmsReallocFnPtrType ReallocPtr;
_cmsCallocFnPtrType CallocPtr;
_cmsDupFnPtrType DupPtr;
} _cmsMemPluginChunkType;
void _cmsInstallAllocFunctions(cmsPluginMemHandler* Plugin, _cmsMemPluginChunkType* ptr);
struct _cmsContext_struct {
struct _cmsContext_struct* Next;
_cmsSubAllocator* MemPool;
void* chunks[MemoryClientMax];
_cmsMemPluginChunkType DefaultMemoryManager;
};
struct _cmsContext_struct* _cmsGetContext(cmsContext ContextID);
void* _cmsContextGetClientChunk(cmsContext id, _cmsMemoryClient mc);
typedef struct {
cmsLogErrorHandlerFunction LogErrorHandler;
} _cmsLogErrorChunkType;
extern _cmsLogErrorChunkType _cmsLogErrorChunk;
void _cmsAllocLogErrorChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
cmsUInt16Number AlarmCodes[cmsMAXCHANNELS];
} _cmsAlarmCodesChunkType;
extern _cmsAlarmCodesChunkType _cmsAlarmCodesChunk;
void _cmsAllocAlarmCodesChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
cmsFloat64Number AdaptationState;
} _cmsAdaptationStateChunkType;
extern _cmsAdaptationStateChunkType _cmsAdaptationStateChunk;
void _cmsAllocAdaptationStateChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
extern _cmsMemPluginChunkType _cmsMemPluginChunk;
void _cmsAllocMemPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
cmsInterpFnFactory Interpolators;
} _cmsInterpPluginChunkType;
extern _cmsInterpPluginChunkType _cmsInterpPluginChunk;
void _cmsAllocInterpPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cmsParametricCurvesCollection_st* ParametricCurves;
} _cmsCurvesPluginChunkType;
extern _cmsCurvesPluginChunkType _cmsCurvesPluginChunk;
void _cmsAllocCurvesPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cms_formatters_factory_list* FactoryList;
} _cmsFormattersPluginChunkType;
extern _cmsFormattersPluginChunkType _cmsFormattersPluginChunk;
void _cmsAllocFormattersPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cmsTagTypeLinkedList_st* TagTypes;
} _cmsTagTypePluginChunkType;
extern _cmsTagTypePluginChunkType _cmsTagTypePluginChunk;
extern _cmsTagTypePluginChunkType _cmsMPETypePluginChunk;
void _cmsAllocTagTypePluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
void _cmsAllocMPETypePluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cmsTagLinkedList_st* Tag;
} _cmsTagPluginChunkType;
extern _cmsTagPluginChunkType _cmsTagPluginChunk;
void _cmsAllocTagPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cms_intents_list* Intents;
} _cmsIntentsPluginChunkType;
extern _cmsIntentsPluginChunkType _cmsIntentsPluginChunk;
void _cmsAllocIntentsPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cmsOptimizationCollection_st* OptimizationCollection;
} _cmsOptimizationPluginChunkType;
extern _cmsOptimizationPluginChunkType _cmsOptimizationPluginChunk;
void _cmsAllocOptimizationPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
struct _cmsTransformCollection_st* TransformCollection;
} _cmsTransformPluginChunkType;
extern _cmsTransformPluginChunkType _cmsTransformPluginChunk;
void _cmsAllocTransformPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
_cmsCreateMutexFnPtrType CreateMutexPtr;
_cmsDestroyMutexFnPtrType DestroyMutexPtr;
_cmsLockMutexFnPtrType LockMutexPtr;
_cmsUnlockMutexFnPtrType UnlockMutexPtr;
} _cmsMutexPluginChunkType;
extern _cmsMutexPluginChunkType _cmsMutexPluginChunk;
void _cmsAllocMutexPluginChunk(struct _cmsContext_struct* ctx,
const struct _cmsContext_struct* src);
typedef struct {
cmsUInt16Number Language;
cmsUInt16Number Country;
cmsUInt32Number StrW;
cmsUInt32Number Len;
} _cmsMLUentry;
struct _cms_MLU_struct {
cmsContext ContextID;
int AllocatedEntries;
int UsedEntries;
_cmsMLUentry* Entries;
cmsUInt32Number PoolSize;
cmsUInt32Number PoolUsed;
void* MemPool;
};
typedef struct {
char Name[cmsMAX_PATH];
cmsUInt16Number PCS[3];
cmsUInt16Number DeviceColorant[cmsMAXCHANNELS];
} _cmsNAMEDCOLOR;
struct _cms_NAMEDCOLORLIST_struct {
cmsUInt32Number nColors;
cmsUInt32Number Allocated;
cmsUInt32Number ColorantCount;
char Prefix[33];
char Suffix[33];
_cmsNAMEDCOLOR* List;
cmsContext ContextID;
};
#define MAX_TABLE_TAG 100
typedef struct _cms_iccprofile_struct {
cmsIOHANDLER* IOhandler;
cmsContext ContextID;
struct tm Created;
cmsUInt32Number Version;
cmsProfileClassSignature DeviceClass;
cmsColorSpaceSignature ColorSpace;
cmsColorSpaceSignature PCS;
cmsUInt32Number RenderingIntent;
cmsUInt32Number flags;
cmsUInt32Number manufacturer, model;
cmsUInt64Number attributes;
cmsUInt32Number creator;
cmsProfileID ProfileID;
cmsUInt32Number TagCount;
cmsTagSignature TagNames[MAX_TABLE_TAG];
cmsTagSignature TagLinked[MAX_TABLE_TAG];
cmsUInt32Number TagSizes[MAX_TABLE_TAG];
cmsUInt32Number TagOffsets[MAX_TABLE_TAG];
cmsBool TagSaveAsRaw[MAX_TABLE_TAG];
void * TagPtrs[MAX_TABLE_TAG];
cmsTagTypeHandler* TagTypeHandlers[MAX_TABLE_TAG];
cmsBool IsWrite;
void * UsrMutex;
} _cmsICCPROFILE;
cmsBool _cmsReadHeader(_cmsICCPROFILE* Icc);
cmsBool _cmsWriteHeader(_cmsICCPROFILE* Icc, cmsUInt32Number UsedSpace);
int _cmsSearchTag(_cmsICCPROFILE* Icc, cmsTagSignature sig, cmsBool lFollowLinks);
cmsTagTypeHandler* _cmsGetTagTypeHandler(cmsContext ContextID, cmsTagTypeSignature sig);
cmsTagTypeSignature _cmsGetTagTrueType(cmsHPROFILE hProfile, cmsTagSignature sig);
cmsTagDescriptor* _cmsGetTagDescriptor(cmsContext ContextID, cmsTagSignature sig);
void _cmsTagSignature2String(char String[5], cmsTagSignature sig);
cmsInterpParams* _cmsComputeInterpParams(cmsContext ContextID, int nSamples, int InputChan, int OutputChan, const void* Table, cmsUInt32Number dwFlags);
cmsInterpParams* _cmsComputeInterpParamsEx(cmsContext ContextID, const cmsUInt32Number nSamples[], int InputChan, int OutputChan, const void* Table, cmsUInt32Number dwFlags);
void _cmsFreeInterpParams(cmsInterpParams* p);
cmsBool _cmsSetInterpolationRoutine(cmsContext ContextID, cmsInterpParams* p);
struct _cms_curve_struct {
cmsInterpParams* InterpParams;
cmsUInt32Number nSegments;
cmsCurveSegment* Segments;
cmsInterpParams** SegInterp;
cmsParametricCurveEvaluator* Evals;
cmsUInt32Number nEntries;
cmsUInt16Number* Table16;
};
struct _cmsStage_struct {
cmsContext ContextID;
cmsStageSignature Type;
cmsStageSignature Implements;
cmsUInt32Number InputChannels;
cmsUInt32Number OutputChannels;
_cmsStageEvalFn EvalPtr;
_cmsStageDupElemFn DupElemPtr;
_cmsStageFreeElemFn FreePtr;
void* Data;
struct _cmsStage_struct* Next;
};
cmsStage* _cmsStageAllocLab2XYZ(cmsContext ContextID);
cmsStage* _cmsStageAllocXYZ2Lab(cmsContext ContextID);
cmsStage* _cmsStageAllocLabPrelin(cmsContext ContextID);
cmsStage* _cmsStageAllocLabV2ToV4(cmsContext ContextID);
cmsStage* _cmsStageAllocLabV2ToV4curves(cmsContext ContextID);
cmsStage* _cmsStageAllocLabV4ToV2(cmsContext ContextID);
cmsStage* _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList, cmsBool UsePCS);
cmsStage* _cmsStageAllocIdentityCurves(cmsContext ContextID, int nChannels);
cmsStage* _cmsStageAllocIdentityCLut(cmsContext ContextID, int nChan);
cmsStage* _cmsStageNormalizeFromLabFloat(cmsContext ContextID);
cmsStage* _cmsStageNormalizeFromXyzFloat(cmsContext ContextID);
cmsStage* _cmsStageNormalizeToLabFloat(cmsContext ContextID);
cmsStage* _cmsStageNormalizeToXyzFloat(cmsContext ContextID);
cmsStage* _cmsStageClipNegatives(cmsContext ContextID, int nChannels);
cmsToneCurve** _cmsStageGetPtrToCurveSet(const cmsStage* mpe);
typedef void (* _cmsPipelineEvalFloatFn)(const cmsFloat32Number In[],
cmsFloat32Number Out[],
const void* Data);
struct _cmsPipeline_struct {
cmsStage* Elements;
cmsUInt32Number InputChannels, OutputChannels;
void *Data;
_cmsOPTeval16Fn Eval16Fn;
_cmsPipelineEvalFloatFn EvalFloatFn;
_cmsFreeUserDataFn FreeDataFn;
_cmsDupUserDataFn DupDataFn;
cmsContext ContextID;
cmsBool SaveAs8Bits;
};
cmsPipeline* _cmsReadInputLUT(cmsHPROFILE hProfile, int Intent);
cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent);
cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent);
cmsBool _cmsReadMediaWhitePoint(cmsCIEXYZ* Dest, cmsHPROFILE hProfile);
cmsBool _cmsReadCHAD(cmsMAT3* Dest, cmsHPROFILE hProfile);
cmsPipeline* _cmsLinkProfiles(cmsContext ContextID,
cmsUInt32Number nProfiles,
cmsUInt32Number TheIntents[],
cmsHPROFILE hProfiles[],
cmsBool BPC[],
cmsFloat64Number AdaptationStates[],
cmsUInt32Number dwFlags);
cmsSEQ* _cmsReadProfileSequence(cmsHPROFILE hProfile);
cmsBool _cmsWriteProfileSequence(cmsHPROFILE hProfile, const cmsSEQ* seq);
cmsSEQ* _cmsCompileProfileSequence(cmsContext ContextID, cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[]);
cmsUInt16Number _cmsQuantizeVal(cmsFloat64Number i, int MaxSamples);
int _cmsReasonableGridpointsByColorspace(cmsColorSpaceSignature Colorspace, cmsUInt32Number dwFlags);
cmsBool _cmsEndPointsBySpace(cmsColorSpaceSignature Space,
cmsUInt16Number **White,
cmsUInt16Number **Black,
cmsUInt32Number *nOutputs);
cmsBool _cmsOptimizePipeline(cmsContext ContextID,
cmsPipeline** Lut,
int Intent,
cmsUInt32Number* InputFormat,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags );
cmsPipeline* _cmsCreateGamutCheckPipeline(cmsContext ContextID,
cmsHPROFILE hProfiles[],
cmsBool BPC[],
cmsUInt32Number Intents[],
cmsFloat64Number AdaptationStates[],
cmsUInt32Number nGamutPCSposition,
cmsHPROFILE hGamut);
#define cmsFLAGS_CAN_CHANGE_FORMATTER 0x02000000
cmsBool _cmsFormatterIsFloat(cmsUInt32Number Type);
cmsBool _cmsFormatterIs8bit(cmsUInt32Number Type);
cmsFormatter _cmsGetFormatter(cmsContext ContextID,
cmsUInt32Number Type,
cmsFormatterDirection Dir,
cmsUInt32Number dwFlags);
#ifndef CMS_NO_HALF_SUPPORT
cmsFloat32Number _cmsHalf2Float(cmsUInt16Number h);
cmsUInt16Number _cmsFloat2Half(cmsFloat32Number flt);
#endif
struct _cmstransform_struct;
typedef struct {
cmsUInt16Number CacheIn[cmsMAXCHANNELS];
cmsUInt16Number CacheOut[cmsMAXCHANNELS];
} _cmsCACHE;
typedef struct _cmstransform_struct {
cmsUInt32Number InputFormat, OutputFormat;
_cmsTransformFn xform;
cmsFormatter16 FromInput;
cmsFormatter16 ToOutput;
cmsFormatterFloat FromInputFloat;
cmsFormatterFloat ToOutputFloat;
_cmsCACHE Cache;
cmsPipeline* Lut;
cmsPipeline* GamutCheck;
cmsNAMEDCOLORLIST* InputColorant;
cmsNAMEDCOLORLIST* OutputColorant;
cmsColorSpaceSignature EntryColorSpace;
cmsColorSpaceSignature ExitColorSpace;
cmsCIEXYZ EntryWhitePoint;
cmsCIEXYZ ExitWhitePoint;
cmsSEQ* Sequence;
cmsUInt32Number dwOriginalFlags;
cmsFloat64Number AdaptationState;
cmsUInt32Number RenderingIntent;
cmsContext ContextID;
void* UserData;
_cmsFreeUserDataFn FreeUserData;
} _cmsTRANSFORM;
cmsHTRANSFORM _cmsChain2Lab(cmsContext ContextID,
cmsUInt32Number nProfiles,
cmsUInt32Number InputFormat,
cmsUInt32Number OutputFormat,
const cmsUInt32Number Intents[],
const cmsHPROFILE hProfiles[],
const cmsBool BPC[],
const cmsFloat64Number AdaptationStates[],
cmsUInt32Number dwFlags);
cmsToneCurve* _cmsBuildKToneCurve(cmsContext ContextID,
cmsUInt32Number nPoints,
cmsUInt32Number nProfiles,
const cmsUInt32Number Intents[],
const cmsHPROFILE hProfiles[],
const cmsBool BPC[],
const cmsFloat64Number AdaptationStates[],
cmsUInt32Number dwFlags);
cmsBool _cmsAdaptationMatrix(cmsMAT3* r, const cmsMAT3* ConeMatrix, const cmsCIEXYZ* FromIll, const cmsCIEXYZ* ToIll);
cmsBool _cmsBuildRGB2XYZtransferMatrix(cmsMAT3* r, const cmsCIExyY* WhitePoint, const cmsCIExyYTRIPLE* Primaries);
#define _lcms_internal_H
#endif