Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
|
File: RefIccMAXCmm.cpp. More...
#include <ApplicationServices/ApplicationServices.h>
#include <math.h>
#include <pthread.h>
#include "IccProfile.h"
#include "IccCmm.h"
Go to the source code of this file.
Classes | |
struct | CMMMatchRec |
struct | CMMStorageRec |
struct | sMemBlock |
Macros | |
#define | DoubToFract(x) (((x)<=0.0)?(0):(((x)>=2.0)?(65535):((x)*32768.0 + 0.5))) |
#define | DoubToUInt16(x) (((x)<=0.0)?(0):(((x)>=1.0)?(65535):((x)*65535.0 + 0.5))) |
#define | FractToDoub(x) ((double)(x)/32768.0) |
#define | FractToUInt16(x) ((x)<<1) |
#define | kCMMSTORAGE CFSTR("com.acme.DemoCMM") |
#define | UInt16ToDoub(x) ((double)(x)/65535.0) |
#define | UInt16ToFract(x) ((x)>>1) |
Typedefs | |
typedef struct CMMStorageRec * | CMMStoragePtr |
typedef void(* | MatchOneProc) (UInt16 *chan) |
Functions | |
CMError | CMM_CheckBitmap (CMWorldRef cw, const CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *chkMap) |
CMError | CMM_CheckColors (CMWorldRef cw, CMColor *myColors, UInt32 count, UInt8 *result) |
CMError | CMM_ConcatColorWorld (CMWorldRef cw, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon) |
CMError | CMM_MatchBitmap (CMWorldRef cw, CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *dstMap) |
CMError | CMM_MatchColors (CMWorldRef cw, CMColor *myColors, UInt32 count) |
static void * | cmmallocate (CFIndex size, CFOptionFlags hint, void *info) |
static CFAllocatorRef | CMMBytesDeallocator () |
CMError | CMMCheckBitmap (uintptr_t *cmmRefcon, const CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *chkMap) |
CMError | CMMCheckColors (uintptr_t *cmmRefcon, CMColor *colorBuf, UInt32 count, UInt8 *gamutResult) |
CMError | CMMClose (uintptr_t *cmmRefcon) |
CMError | CMMConcatInit (uintptr_t *cmmRefcon, CMConcatProfileSet *profileSet) |
static void | cmmdeallocate (void *ptr, void *info) |
CMError | CMMMatchBitmap (uintptr_t *cmmRefcon, CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *dstMap) |
CMError | CMMMatchColors (uintptr_t *cmmRefcon, CMColor *colorBuf, UInt32 count) |
CMError | CMMOpen (uintptr_t *cmmRefcon, void *hInstance) |
static void * | cmmreallocate (void *ptr, CFIndex size, CFOptionFlags hint, void *info) |
static void | create_allocator (void) |
static CMError | DoInit (CMMStoragePtr storage, CMProfileRef srcProf, CMProfileRef dstProf, UInt32 srcTransform, UInt32 dstTransform) |
static CMError | DoInitSampleICC (CMMStoragePtr storage, NCMConcatProfileSet *profileSet) |
static void | DoMatch (CMMStoragePtr storage, CMMMatchRec *pMatchInfo) |
static uintptr_t | GetCMMStorage (CMWorldRef cw) |
CIccProfile * | getIccProfLibProfileFromColorsyncProfile (CMProfileRef pref) |
static void | MatchOne_CMYK_Gray (UInt16 *chan) |
static void | MatchOne_CMYK_LAB (UInt16 *chan) |
static void | MatchOne_CMYK_RGB (UInt16 *chan) |
static void | MatchOne_CMYK_XYZ (UInt16 *chan) |
static void | MatchOne_Gray_CMYK (UInt16 *chan) |
static void | MatchOne_Gray_LAB (UInt16 *chan) |
static void | MatchOne_Gray_RGB (UInt16 *chan) |
static void | MatchOne_Gray_XYZ (UInt16 *chan) |
static void | MatchOne_LAB_CMYK (UInt16 *chan) |
static void | MatchOne_LAB_Gray (UInt16 *chan) |
static void | MatchOne_LAB_RGB (UInt16 *chan) |
static void | MatchOne_LAB_XYZ (UInt16 *chan) |
static void | MatchOne_RGB_CMYK (UInt16 *chan) |
static void | MatchOne_RGB_Gray (UInt16 *chan) |
static void | MatchOne_RGB_LAB (UInt16 *chan) |
static void | MatchOne_RGB_XYZ (UInt16 *chan) |
static void | MatchOne_XYZ_CMYK (UInt16 *chan) |
static void | MatchOne_XYZ_Gray (UInt16 *chan) |
static void | MatchOne_XYZ_LAB (UInt16 *chan) |
static void | MatchOne_XYZ_RGB (UInt16 *chan) |
CMError | NCMMConcatInit (uintptr_t *cmmRefcon, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon) |
CMError | NCMMInit (uintptr_t *cmmRefcon, CMProfileRef srcProf, CMProfileRef dstProf) |
Variables | |
static CFAllocatorRef | cmmAllocator = NULL |
static const CFAllocatorContext | context |
File: RefIccMAXCmm.cpp.
Contains: RefIccMAX CMM Component for ColorSync 2.x
Version: V1
Copyright: (c) see ICC Software License
Definition in file RefIccMAXCmm.cpp.
#define DoubToFract | ( | x | ) | (((x)<=0.0)?(0):(((x)>=2.0)?(65535):((x)*32768.0 + 0.5))) |
Definition at line 116 of file RefIccMAXCmm.cpp.
Referenced by MatchOne_Gray_XYZ(), MatchOne_LAB_XYZ(), and MatchOne_RGB_XYZ().
#define DoubToUInt16 | ( | x | ) | (((x)<=0.0)?(0):(((x)>=1.0)?(65535):((x)*65535.0 + 0.5))) |
Definition at line 114 of file RefIccMAXCmm.cpp.
Referenced by MatchOne_XYZ_LAB(), and MatchOne_XYZ_RGB().
#define FractToDoub | ( | x | ) | ((double)(x)/32768.0) |
Definition at line 117 of file RefIccMAXCmm.cpp.
Referenced by MatchOne_XYZ_LAB(), and MatchOne_XYZ_RGB().
#define FractToUInt16 | ( | x | ) | ((x)<<1) |
Definition at line 119 of file RefIccMAXCmm.cpp.
Referenced by MatchOne_XYZ_Gray().
#define kCMMSTORAGE CFSTR("com.acme.DemoCMM") |
Definition at line 1037 of file RefIccMAXCmm.cpp.
Referenced by CMM_ConcatColorWorld(), and GetCMMStorage().
#define UInt16ToDoub | ( | x | ) | ((double)(x)/65535.0) |
Definition at line 115 of file RefIccMAXCmm.cpp.
Referenced by MatchOne_Gray_XYZ(), MatchOne_LAB_XYZ(), and MatchOne_RGB_XYZ().
#define UInt16ToFract | ( | x | ) | ((x)>>1) |
Definition at line 118 of file RefIccMAXCmm.cpp.
typedef struct CMMStorageRec * CMMStoragePtr |
typedef void(* MatchOneProc) (UInt16 *chan) |
Definition at line 74 of file RefIccMAXCmm.cpp.
CMError CMM_CheckBitmap | ( | CMWorldRef | cw, |
const CMBitmap * | srcMap, | ||
CMBitmapCallBackUPP | progressProc, | ||
void * | refCon, | ||
CMBitmap * | chkMap ) |
Definition at line 1142 of file RefIccMAXCmm.cpp.
References CMMCheckBitmap(), and GetCMMStorage().
CMError CMM_CheckColors | ( | CMWorldRef | cw, |
CMColor * | myColors, | ||
UInt32 | count, | ||
UInt8 * | result ) |
Definition at line 1111 of file RefIccMAXCmm.cpp.
References CMMCheckColors(), and GetCMMStorage().
CMError CMM_ConcatColorWorld | ( | CMWorldRef | cw, |
NCMConcatProfileSet * | profileSet, | ||
CMConcatCallBackUPP | proc, | ||
void * | refCon ) |
Definition at line 1061 of file RefIccMAXCmm.cpp.
References CMMBytesDeallocator(), CMMClose(), CMMOpen(), kCMMSTORAGE, and NCMMConcatInit().
CMError CMM_MatchBitmap | ( | CMWorldRef | cw, |
CMBitmap * | srcMap, | ||
CMBitmapCallBackUPP | progressProc, | ||
void * | refCon, | ||
CMBitmap * | dstMap ) |
Definition at line 1127 of file RefIccMAXCmm.cpp.
References CMMMatchBitmap(), and GetCMMStorage().
CMError CMM_MatchColors | ( | CMWorldRef | cw, |
CMColor * | myColors, | ||
UInt32 | count ) |
Definition at line 1095 of file RefIccMAXCmm.cpp.
References CMMMatchColors(), and GetCMMStorage().
|
static |
Definition at line 1166 of file RefIccMAXCmm.cpp.
|
static |
Definition at line 1206 of file RefIccMAXCmm.cpp.
References cmmAllocator, and create_allocator().
Referenced by CMM_ConcatColorWorld().
CMError CMMCheckBitmap | ( | uintptr_t * | cmmRefcon, |
const CMBitmap * | srcMap, | ||
CMBitmapCallBackUPP | progressProc, | ||
void * | refCon, | ||
CMBitmap * | chkMap ) |
Definition at line 1026 of file RefIccMAXCmm.cpp.
Referenced by CMM_CheckBitmap().
CMError CMMCheckColors | ( | uintptr_t * | cmmRefcon, |
CMColor * | colorBuf, | ||
UInt32 | count, | ||
UInt8 * | gamutResult ) |
Definition at line 1015 of file RefIccMAXCmm.cpp.
Referenced by CMM_CheckColors().
CMError CMMClose | ( | uintptr_t * | cmmRefcon | ) |
Definition at line 661 of file RefIccMAXCmm.cpp.
References CMMStorageRec::cmm.
Referenced by CMM_ConcatColorWorld(), and cmmdeallocate().
CMError CMMConcatInit | ( | uintptr_t * | cmmRefcon, |
CMConcatProfileSet * | profileSet ) |
Definition at line 682 of file RefIccMAXCmm.cpp.
References DoInit().
|
static |
Definition at line 1178 of file RefIccMAXCmm.cpp.
References CMMClose().
CMError CMMMatchBitmap | ( | uintptr_t * | cmmRefcon, |
CMBitmap * | srcMap, | ||
CMBitmapCallBackUPP | progressProc, | ||
void * | refCon, | ||
CMBitmap * | dstMap ) |
Definition at line 737 of file RefIccMAXCmm.cpp.
References DoMatch(), CMMMatchRec::dstBuf, CMMMatchRec::dstChanBits, CMMMatchRec::dstColBytes, CMMMatchRec::dstRowBytes, CMMMatchRec::dstSwap, CMMMatchRec::height, CMMMatchRec::srcBuf, CMMMatchRec::srcChanBits, CMMMatchRec::srcColBytes, CMMMatchRec::srcRowBytes, CMMMatchRec::srcSwap, and CMMMatchRec::width.
Referenced by CMM_MatchBitmap().
CMError CMMMatchColors | ( | uintptr_t * | cmmRefcon, |
CMColor * | colorBuf, | ||
UInt32 | count ) |
Definition at line 705 of file RefIccMAXCmm.cpp.
References DoMatch(), CMMMatchRec::dstBuf, CMMMatchRec::dstChanBits, CMMMatchRec::dstColBytes, CMMMatchRec::dstRowBytes, CMMMatchRec::dstSwap, CMMMatchRec::height, CMMMatchRec::srcBuf, CMMMatchRec::srcChanBits, CMMMatchRec::srcColBytes, CMMMatchRec::srcRowBytes, CMMMatchRec::srcSwap, and CMMMatchRec::width.
Referenced by CMM_MatchColors().
CMError CMMOpen | ( | uintptr_t * | cmmRefcon, |
void * | hInstance ) |
Definition at line 640 of file RefIccMAXCmm.cpp.
References CMMStorageRec::cmm.
Referenced by CMM_ConcatColorWorld().
|
static |
Definition at line 1172 of file RefIccMAXCmm.cpp.
|
static |
Definition at line 1201 of file RefIccMAXCmm.cpp.
References cmmAllocator, and context.
Referenced by CMMBytesDeallocator().
|
static |
Definition at line 538 of file RefIccMAXCmm.cpp.
References CMMStorageRec::dstClass, CMMStorageRec::dstSpace, MatchOne_CMYK_Gray(), MatchOne_CMYK_LAB(), MatchOne_CMYK_RGB(), MatchOne_CMYK_XYZ(), MatchOne_Gray_CMYK(), MatchOne_Gray_LAB(), MatchOne_Gray_RGB(), MatchOne_Gray_XYZ(), MatchOne_LAB_CMYK(), MatchOne_LAB_Gray(), MatchOne_LAB_RGB(), MatchOne_LAB_XYZ(), MatchOne_RGB_CMYK(), MatchOne_RGB_Gray(), MatchOne_RGB_LAB(), MatchOne_RGB_XYZ(), MatchOne_XYZ_CMYK(), MatchOne_XYZ_Gray(), MatchOne_XYZ_LAB(), MatchOne_XYZ_RGB(), CMMStorageRec::proc, CMMStorageRec::srcClass, and CMMStorageRec::srcSpace.
Referenced by CMMConcatInit(), and NCMMInit().
|
static |
Definition at line 594 of file RefIccMAXCmm.cpp.
References CMMStorageRec::cmm, CMMStorageRec::dstClass, CMMStorageRec::dstSpace, getIccProfLibProfileFromColorsyncProfile(), icCmmStatOk, CMMStorageRec::srcClass, and CMMStorageRec::srcSpace.
Referenced by NCMMConcatInit().
|
static |
Definition at line 151 of file RefIccMAXCmm.cpp.
References CMMStorageRec::cmm, CMMMatchRec::dstBuf, CMMMatchRec::dstChanBits, CMMMatchRec::dstColBytes, CMMMatchRec::dstRowBytes, CMMMatchRec::dstSwap, CMMMatchRec::height, CMMMatchRec::srcBuf, CMMMatchRec::srcChanBits, CMMMatchRec::srcColBytes, CMMMatchRec::srcRowBytes, CMMMatchRec::srcSwap, and CMMMatchRec::width.
Referenced by CMMMatchBitmap(), and CMMMatchColors().
|
static |
Definition at line 1042 of file RefIccMAXCmm.cpp.
References kCMMSTORAGE.
Referenced by CMM_CheckBitmap(), CMM_CheckColors(), CMM_MatchBitmap(), and CMM_MatchColors().
CIccProfile * getIccProfLibProfileFromColorsyncProfile | ( | CMProfileRef | pref | ) |
Definition at line 1282 of file RefIccMAXCmm.cpp.
References ReadIccProfile().
Referenced by DoInitSampleICC().
|
static |
Definition at line 520 of file RefIccMAXCmm.cpp.
References MatchOne_CMYK_XYZ(), and MatchOne_XYZ_Gray().
Referenced by DoInit().
|
static |
Definition at line 475 of file RefIccMAXCmm.cpp.
References MatchOne_CMYK_RGB(), and MatchOne_RGB_LAB().
Referenced by DoInit().
|
static |
Definition at line 366 of file RefIccMAXCmm.cpp.
Referenced by DoInit(), MatchOne_CMYK_LAB(), and MatchOne_CMYK_XYZ().
|
static |
Definition at line 489 of file RefIccMAXCmm.cpp.
References MatchOne_CMYK_RGB(), and MatchOne_RGB_XYZ().
Referenced by DoInit(), and MatchOne_CMYK_Gray().
|
static |
Definition at line 527 of file RefIccMAXCmm.cpp.
Referenced by DoInit().
|
static |
Definition at line 455 of file RefIccMAXCmm.cpp.
Referenced by DoInit().
|
static |
Definition at line 513 of file RefIccMAXCmm.cpp.
Referenced by DoInit().
|
static |
Definition at line 434 of file RefIccMAXCmm.cpp.
References DoubToFract, and UInt16ToDoub.
Referenced by DoInit().
|
static |
Definition at line 482 of file RefIccMAXCmm.cpp.
References MatchOne_LAB_RGB(), and MatchOne_RGB_CMYK().
Referenced by DoInit().
|
static |
Definition at line 448 of file RefIccMAXCmm.cpp.
Referenced by DoInit().
|
static |
Definition at line 468 of file RefIccMAXCmm.cpp.
References MatchOne_LAB_XYZ(), and MatchOne_XYZ_RGB().
Referenced by DoInit(), and MatchOne_LAB_CMYK().
|
static |
Definition at line 306 of file RefIccMAXCmm.cpp.
References DoubToFract, and UInt16ToDoub.
Referenced by DoInit(), and MatchOne_LAB_RGB().
|
static |
Definition at line 352 of file RefIccMAXCmm.cpp.
Referenced by DoInit(), MatchOne_LAB_CMYK(), and MatchOne_XYZ_CMYK().
|
static |
Definition at line 503 of file RefIccMAXCmm.cpp.
References MatchOne_RGB_XYZ(), and MatchOne_XYZ_Gray().
Referenced by DoInit().
|
static |
Definition at line 461 of file RefIccMAXCmm.cpp.
References MatchOne_RGB_XYZ(), and MatchOne_XYZ_LAB().
Referenced by DoInit(), and MatchOne_CMYK_LAB().
|
static |
Definition at line 378 of file RefIccMAXCmm.cpp.
References DoubToFract, and UInt16ToDoub.
Referenced by DoInit(), MatchOne_CMYK_XYZ(), MatchOne_RGB_Gray(), and MatchOne_RGB_LAB().
|
static |
Definition at line 496 of file RefIccMAXCmm.cpp.
References MatchOne_RGB_CMYK(), and MatchOne_XYZ_RGB().
Referenced by DoInit().
|
static |
Definition at line 428 of file RefIccMAXCmm.cpp.
References FractToUInt16.
Referenced by DoInit(), MatchOne_CMYK_Gray(), and MatchOne_RGB_Gray().
|
static |
Definition at line 255 of file RefIccMAXCmm.cpp.
References DoubToUInt16, and FractToDoub.
Referenced by DoInit(), and MatchOne_RGB_LAB().
|
static |
Definition at line 403 of file RefIccMAXCmm.cpp.
References DoubToUInt16, and FractToDoub.
Referenced by DoInit(), MatchOne_LAB_RGB(), and MatchOne_XYZ_CMYK().
CMError NCMMConcatInit | ( | uintptr_t * | cmmRefcon, |
NCMConcatProfileSet * | profileSet, | ||
CMConcatCallBackUPP | proc, | ||
void * | refCon ) |
Definition at line 692 of file RefIccMAXCmm.cpp.
References DoInitSampleICC().
Referenced by CMM_ConcatColorWorld().
CMError NCMMInit | ( | uintptr_t * | cmmRefcon, |
CMProfileRef | srcProf, | ||
CMProfileRef | dstProf ) |
Definition at line 675 of file RefIccMAXCmm.cpp.
References DoInit().
|
static |
Definition at line 1163 of file RefIccMAXCmm.cpp.
Referenced by CMMBytesDeallocator(), and create_allocator().
|
static |
Definition at line 1188 of file RefIccMAXCmm.cpp.
Referenced by CalcProfileID(), create_allocator(), icMD5Final(), icMD5Init(), and icMD5Update().