72#pragma warning( disable: 4786)
96 printf(
"\nBegin Calc Apply\n");
101 printf(
"End Calculator Apply\n\n");
111 printf(
"%9s\t", opDesc.c_str());
112 for (
int j = 0; j < (int)os.
pStack->size(); j++)
113 printf(
" %.4f", (*os.
pStack)[j]);
122 printf(
"%9s\t",
"data");
130 printf(
"%9s\t", opDesc.c_str());
133 for (
int j = 0; j < (int)os.
pStack->size(); j++)
134 printf(
" %.4f", (*os.
pStack)[j]);
143 virtual void Error(
const char *szMsg)
145 printf(
"%s\n", szMsg);
151#ifdef ICC_VERBOSE_CALC_APPLY
165#define OsPopArg(X) { \
166 if (!os.pStack->size()) \
168 X = *(os.pStack->rbegin()); \
169 os.pStack->pop_back(); \
172#define OsPopArgs(X, N) { \
173 icUInt32Number nv=(N); \
174 size_t ss = os.pStack->size(); \
177 icFloatNumber *sv = &(*os.pStack)[ss-nv]; \
178 memcpy((X), sv, nv*sizeof(icFloatNumber)); \
179 os.pStack->resize(ss-nv); \
183#define OsPushArg(X) { \
184 icFloatNumber V = (X); \
185 os.pStack->push_back(V); \
188#define OsPushArgs(X, N) { \
189 size_t ss = os.pStack->size(); \
190 icUInt32Number nv=(N); \
191 os.pStack->resize(ss+nv); \
192 icFloatNumber *sv = &(*os.pStack)[ss]; \
193 memcpy(sv, (X), nv*sizeof(icFloatNumber)); \
196#define OsShrinkArgs(N) { \
197 icUInt32Number nv = (N); \
198 size_t ss = os.pStack->size(); \
201 os.pStack->resize(ss-nv); \
204#define OsExtendArgs(N) { \
205 size_t ss = os.pStack->size(); \
206 os.pStack->resize(ss+(N)); \
220 std::string line =
"Unknown operator: ";
235 for (n=1; n+os.
idx<os.
nOps; n++)
243 size_t ss = os.
pStack->size();
246 for (j=0; j<n; j++) {
259 size_t ss = os.
pStack->size();
312 size_t ss = os.
pStack->size();
364 size_t ss = os.
pStack->size();
369 if (os.
pScratch->size()<(size_t)nDst)
374 pElemApply->
Apply(d, s);
376 int ns = (int)ss + (
int)nDst - (int)nSrc;
381 s = &(*os.
pStack)[ns - nDst];
392 size_t ss = os.
pStack->size();
405 for (j=0; j<t; j++) {
419 size_t ss = os.
pStack->size();
431 for (j=0; j<t; j++) {
445 size_t ss = os.
pStack->size();
451 for (j=0, k=n-1; j<k; j++, k--) {
470 if (os.
pScratch->size()<(
size_t)nCopy)
478 for (j=0; j<nCopy; j++) {
495 int next = nCopy - nPos;
496 if (os.
pScratch->size()<(size_t)nCopy)
504 for (j=0; j<nCopy; j++) {
517 size_t ss = os.
pStack->size();
528 if (os.
pScratch->size()<(
size_t)nSize)
536 for (k=0; k<c; k++) {
538 for (j=0; j<r; j++) {
555 size_t ss = os.
pStack->size();
559 int nSize = nMSize + c;
574 bool bResult =
false;
587 os.
pStack->resize(ss-nSize+r+1);
639 size_t ss = os.
pStack->size();
648 for (j=1; j<n; j++) {
663 size_t ss = os.
pStack->size();
672 for (j=1; j<n; j++) {
687 size_t ss = os.
pStack->size();
692 s[0] =
icMin(s[0], s[1]);
697 for (j=1; j<n; j++) {
714 size_t ss = os.
pStack->size();
719 s[0] =
icMax(s[0], s[1]);
724 for (j=1; j<n; j++) {
741 size_t ss = os.
pStack->size();
746 for (j=0; j<n; j++) {
750 s[0] = j<n ? 0.0f : 1.0f;
763 size_t ss = os.
pStack->size();
768 for (j=0; j<n; j++) {
772 s[0] = j<n ? 1.0f : 0.0f;
786 size_t ss = os.
pStack->size();
790 for (j=0; j<n; j++) {
791 s[j] =
icMin(s[j], s[j+n]);
805 size_t ss = os.
pStack->size();
809 for (j=0; j<n; j++) {
810 s[j] =
icMax(s[j], s[j+n]);
824 size_t ss = os.
pStack->size();
828 for (j=0; j<n; j++) {
829 s[j] = (s[j]>=0.5f && s[j+n]>=0.5) ? 1.0f : 0.0f;
843 size_t ss = os.
pStack->size();
847 for (j=0; j<n; j++) {
848 s[j] = (s[j]>=0.5f || s[j+n]>=0.5) ? 1.0f : 0.0f;
862 size_t ss = os.
pStack->size();
866 for (j=0; j<n; j++) {
881 size_t ss = os.
pStack->size();
885 for (j=0; j<n; j++) {
900 size_t ss = os.
pStack->size();
904 for (j=0; j<n; j++) {
919 size_t ss = os.
pStack->size();
923 for (j=0; j<n; j++) {
938 size_t ss = os.
pStack->size();
942 for (j=0; j<n; j++) {
957 size_t ss = os.
pStack->size();
962 for (j=0; j<n; j++) {
977 size_t ss = os.
pStack->size();
982 for (j=0; j<n; j++) {
997 size_t ss = os.
pStack->size();
1002 for (j=0; j<n; j++) {
1017 size_t ss = os.
pStack->size();
1022 for (j=0; j<n; j++) {
1037 size_t ss = os.
pStack->size();
1042 for (j=0; j<n; j++) {
1057 size_t ss = os.
pStack->size();
1061 for (j=0; j<n; j++) {
1076 size_t ss = os.
pStack->size();
1080 for (j=0; j<n; j++) {
1095 size_t ss = os.
pStack->size();
1099 for (j=0; j<n; j++) {
1114 size_t ss = os.
pStack->size();
1118 for (j=0; j<n; j++) {
1133 size_t ss = os.
pStack->size();
1137 for (j=0; j<n; j++) {
1152 size_t ss = os.
pStack->size();
1156 for (j = 0; j < n; j++) {
1171 size_t ss = os.
pStack->size();
1175 for (j=0; j<n; j++) {
1177 s[j] = (a1 < 0 ? -a1 : a1);
1189 size_t ss = os.
pStack->size();
1193 for (j=0; j<n; j++) {
1207 size_t ss = os.
pStack->size();
1211 for (j=0; j<n; j++) {
1224 size_t ss = os.
pStack->size();
1228 for (j=0; j<n; j++) {
1241 size_t ss = os.
pStack->size();
1245 for (j=0; j<n; j++) {
1262 size_t ss = os.
pStack->size();
1266 for (j=0; j<n; j++) {
1281 size_t ss = os.
pStack->size();
1285 for (j=0; j<n; j++) {
1300 size_t ss = os.
pStack->size();
1304 for (j=0; j<n; j++) {
1319 size_t ss = os.
pStack->size();
1323 for (j=0; j<n; j++) {
1338 size_t ss = os.
pStack->size();
1342 for (j=0; j<n; j++) {
1357 size_t ss = os.
pStack->size();
1361 for (j=0; j<n; j++) {
1376 size_t ss = os.
pStack->size();
1380 for (j=0; j<n; j++) {
1395 size_t ss = os.
pStack->size();
1399 for (j=0; j<n; j++) {
1414 size_t ss = os.
pStack->size();
1418 for (j=0; j<n; j++) {
1434 size_t ss = os.
pStack->size();
1438 for (j=0; j<n; j++) {
1456 size_t ss = os.
pStack->size();
1460 for (j=0; j<n; j++) {
1481 size_t ss = os.
pStack->size();
1485 for (j=0; j<n; j++) {
1504 size_t ss = os.
pStack->size();
1508 for (j=0; j<n; j++) {
1525 size_t ss = os.
pStack->size();
1530 for (j=0; j<n; j++) {
1549 size_t ss = os.
pStack->size();
1553 for (j=0; j<n; j++) {
1571 size_t ss = os.
pStack->size();
1576 for (j=0; j<n; j++) {
1581 ((!memcmp(&a1, &nan,
sizeof(
icFloatNumber)) && !memcmp(&a1, &a2,
sizeof(a1))) ?
1598 size_t ss = os.
pStack->size();
1603 for (j = 0; j < n; j++) {
1608 ((!memcmp(&a1, &nan,
sizeof(
icFloatNumber)) && !memcmp(&a1, &a2,
sizeof(a1))) ?
1625 size_t ss = os.
pStack->size();
1629 for (j=0; j<n; j++) {
1647 size_t ss = os.
pStack->size();
1651 for (j=0; j<n; j++) {
1669 size_t ss = os.
pStack->size();
1673 for (j=0; j<n; j++) {
1690 size_t ss = os.
pStack->size();
1694 for (j=0; j<n; j++) {
1709 size_t ss = os.
pStack->size();
1713 for (j=0; j<n; j++) {
1730 size_t ss = os.
pStack->size();
1734 for (j=0; j<n; j++) {
1756 size_t ss = os.
pStack->size();
1760 for (j=0; j<n; j++) {
1791 sprintf(buf,
"%.8g",
data.num);
1814 if (!
data.select.v2)
1815 sprintf(buf,
"[%d]",
data.select.v1);
1817 sprintf(buf,
"[%d,%d]",
data.select.v1,
data.select.v2+1);
1825 int l=(int)strlen(varName);
1830 for (l--; l>0; l--) {
1831 if (varName[l]!=
' ')
1836 sprintf(buf,
"(%s)", varName);
1849 sprintf(buf,
"(%d)",
data.select.v1);
1854 sprintf(buf,
"(%d)",
data.select.v1+1);
1860 sprintf(buf,
"(%d,%d)",
data.select.v1+1,
data.select.v2+1);
1866 sprintf(buf,
"(%d,%d)",
data.select.v1,
data.select.v2);
1871 if (!
data.select.v2) {
1872 if (
data.select.v1) {
1873 sprintf(buf,
"(%d)",
data.select.v1+1);
1878 sprintf(buf,
"(%d,%d)",
data.select.v1+1,
data.select.v2+1);
1890 if (
data.select.v1) {
1891 sprintf(buf,
"(%d)",
data.select.v1+2);
1945 if (
data.select.v1) {
1946 sprintf(buf,
"[%d]",
data.select.v1+1);
2172 icCalcOpMap::iterator pos;
2174 pos = inst->
m_map.find(opSig);
2175 if (pos==inst->
m_map.end())
2204 return pMpe != NULL;
2251 return data.select.v2+1;
2258 return data.select.v1+1;
2261 return (
data.select.v1+1)*(
data.select.v2+1) + (
data.select.v1+1);
2264 return (
data.select.v1+1)*(
data.select.v2+1);
2267 return data.select.v1+2;
2275 return data.select.v1+2;
2282 return data.select.v1+2;
2304 return (
data.select.v1+1)*2;
2328 return data.select.v1+1;
2332 return (
data.select.v1+1)*3;
2381 return data.select.v2+1;
2397 return (
data.select.v1+1)*(
data.select.v2+2);
2400 return (
data.select.v1+1);
2403 return (
data.select.v1+2);
2406 return data.select.v1+2+
data.select.v2;
2409 return (
data.select.v2+1) + 1;
2412 return (
data.select.v1+1)*(
data.select.v2+1);
2467 return data.select.v1+1;
2471 return (
data.select.v1+1)*2;
2475 return (
data.select.v1+1)*3;
2571 const unsigned char *szToken = (
unsigned char*)
m_token->c_str();
2574 if ((szToken[0]>=
'0' && szToken[0]<=
'9') || szToken[0]==
'.' || (szToken[0]==
'-' && szToken[1]!=
'I')) {
2578 if (szToken[0]==
'{')
2581 if (szToken[0]==
'}')
2584 if (szToken[0]==
'[')
2588 for (i=0; i<4 && szToken[i]; i++) {
2604 const char *pos =
m_token->c_str();
2606 while (*pos && *pos !=
'{' && *pos !=
'[' && *pos !=
'(') {
2616 const char *pos = strchr(
m_token->c_str(),
'{');
2622 while (*pos && *pos !=
'}') {
2632 unsigned int iv1, iv2;
2633 const char *pos =
GetPos();
2639 const char *szToken =
m_token->c_str();
2640 if (*szToken==
'[' || *szToken==
'(') {
2641 if (strchr(szToken,
',')) {
2643 sscanf(
m_token->c_str(),
"(%u,%u)", &iv1, &iv2);
2645 sscanf(
m_token->c_str(),
"[%u,%u]", &iv1, &iv2);
2649 sscanf(
m_token->c_str(),
"(%u)", &iv1);
2651 sscanf(
m_token->c_str(),
"[%u]", &iv1);
2666 const char * ascii =
m_token->c_str();
2668 double d = strtod( ascii, &p );
2675 const char *pos =
GetPos();
2679 const char *szToken =
m_token->c_str();
2680 int l=(int)strlen(szToken);
2681 if ((*szToken==
'[' && szToken[l-1]==
']') ||
2682 (*szToken==
'(' && szToken[l-1]==
')')) {
2688 sscanf(szToken+1,
"%x", &
sig);
2694 for (i=1; i<=4 && i<l-1; i++) {
2832 char blanks[21]=
" ";
2836 i = nBlanks < 20 ? nBlanks : 20;
2838 sDescription += blanks;
2849 std::string funcDesc;
2856 for (i=0; i<nOps;) {
2857 if (pos >nBlanks + 65) {
2866 pos += (int)opName.size() + 1;
2882 funcDesc +=
"else\n";
2908 for (n=0; i+n<nOps; ) {
2920 for (j=0; j<n; j++) {
2924 funcDesc +=
"case\n";
2926 funcDesc +=
"dflt\n";
2943 sDescription += funcDesc;
2962 sDescription +=
"Undefined Function!\n";
2968 CIccCalcOpList::const_iterator o;
2970 for (o=fromList.begin(); o!=fromList.end(); o++) {
2971 toList.push_back(*o);
3012 scanList.push_back(op);
3036 scanList.push_back(op);
3041 scanList.push_back(op);
3056 scanList.push_back(op);
3061 szFuncDef = scan.
GetPos();
3076 scanList.push_back(op);
3078 selList.push_back(pCaseList);
3086 delete pDefaultList;
3093 scanList.push_back(op);
3095 selList.push_back(pDefaultList);
3103 CIccCalcOpListPtrList::iterator l;
3104 for (l=selList.begin(); l!=selList.end(); l++) {
3120 scanList.push_back(op);
3129 scanList.push_back(op);
3141 scanList.push_back(op);
3148 scanList.push_back(op);
3161 scanList.push_back(op);
3175 scanList.push_back(op);
3230 scanList.push_back(op);
3238 sReport +=
"Invalid Operator \"";
3242 if (scanList.rbegin()!=scanList.rend()) {
3243 sReport +=
"Last Few operators in reverse:\n";
3245 CIccCalcOpList::reverse_iterator opi;
3247 for (i=0, opi=scanList.rbegin(); i<10 && opi!=scanList.rend(); i++, opi++) {
3248 opi->Describe(opDesc, 100);
3258 scanList.push_back(op);
3305 CIccCalcOpList::iterator i;
3310 for (i=opList.begin(), j=0; i!= opList.end(); i++, j++) {
3340 if (headerSize > size)
3377 for (i=0; i<
m_nOps; i++) {
3415 for (i=0; i<
m_nOps; i++) {
3442 for (i=0; i<
m_nOps; i++) {
3465 std::string sReport;
3502 for (i=0; i<
m_nOps; i++) {
3539 for (i=1; i<=n && pos<nOps; i++) {
3622 if (nDefOff >= nOps)
3628 if (os.
idx+1 + ops[nDefOff].
extra >= nOps)
3651 else if (op->
extra) {
3652 unsigned long nOff = os.
idx + op->
extra;
3713 const CIccProfile *pProfile)
const
3721 sReport += sSigPathName;
3722 sReport +=
" function has non zero reserved data.\n";
3728 sReport += sSigPathName;
3729 sReport +=
" accesses illegal temporary channels.\n";
3735 sReport += sSigPathName;
3736 sReport +=
" function has invalid operations.\n";
3742 sReport += sSigPathName;
3743 sReport +=
" function has unsupported operations.\r\n";
3749 sReport += sSigPathName;
3750 sReport +=
" accesses illegal input channels.\n";
3756 sReport += sSigPathName;
3757 sReport +=
" accesses illegal output channels.\n";
3764 sReport += sSigPathName;
3766 sReport +=
" causes an evaluation stack underflow.\n";
3768 sReport +=
" causes an evaluation stack overflow.\n";
3789 for (i=0; i<
m_nOps; i++) {
3828 for (i=0; i<nOps; i++) {
3833 for (j=0; j<n; j++) {
3834 if (!tempUsage[p+j]) {
3842 memset(tempUsage+p, 1, n);
3847 memset(tempUsage+p, 1, n);
3856 memcpy(ifTemps, tempUsage, nMaxTemp);
3868 memcpy(elseTemps, tempUsage, nMaxTemp);
3874 for (j=0; j<nMaxTemp; j++) {
3875 tempUsage[j] |= (ifTemps[j] && elseTemps[j]);
3910 int n, nIfArgs, nElseArgs, nSelArgs, nCaseArgs;
3912 for (i=0; i<nOps; i++) {
3918 printf(
"%s : %d %d\n", opstr.c_str(), n, nArgs);
3927 sReport +=
"Stack underflow at operation \"" + opDesc +
"\" in \"";
3964 nArgs = bCheckUnderflow ?
icIntMin(nIfArgs, nElseArgs) :
icIntMax(nIfArgs, nElseArgs) ;
3973 nArgs = bCheckUnderflow ?
icIntMin(nArgs, nIfArgs) :
icIntMax(nArgs, nIfArgs);
3982 for (n=1; i+n<nOps; ) {
3998 for (p=0; p<n; p++) {
4009 nSelArgs = nCaseArgs;
4011 nSelArgs = bCheckUnderflow ?
icIntMin(nSelArgs, nCaseArgs) :
icIntMax(nSelArgs, nCaseArgs);
4066 for (i=0; i<
m_nOps; i++) {
4070 sReport +=
"Invalid Operation (" + opDesc +
")\n";
4074 sReport +=
"A case operator does not follow a sel operator\n";
4080 sReport +=
"An else operator has no proceeding if operator\n";
4086 sReport +=
"A case operator has no proceeding sel or case operator\n";
4092 sReport +=
"An dflt operator has no proceeding case operator\n";
4118 for (i = 0; i <
m_nOps; i++) {
4126 icCalcOpMap::iterator
sig;
4127 sReport +=
"Calculator operator(s) not supported by profile version:";
4128 for (
sig = map.begin();
sig != map.end();
sig++) {
4133 sReport += std::string(
" (") + opname +
")";
4157 for (i=0; i<
m_nOps; i++) {
4180 for (i=0; i<
m_nOps; i++) {
4435 sDescription += buf;
4440 sprintf(buf,
"BEGIN_SUBCALCELEM %u\n", i);
4441 sDescription += buf;
4443 sprintf(buf,
"END_SUBCALCELEM %u\n\n", i);
4444 sDescription += buf;
4449 sDescription +=
"BEGIN_CALC_FUNCTION\n";
4451 sDescription +=
"END_CALC_FUNCTION\n";
4454 sprintf(buf,
"END_CALC_ELEMENT\n");
4455 sDescription += buf;
4488 if (headerSize > size)
4503 if (!pIO->
Read16(&nInputChannels))
4506 if (!pIO->
Read16(&nOutputChannels))
4509 SetSize(nInputChannels, nOutputChannels);
4513 if (!pIO->
Read32(&nSubElem))
4528 if (pIO->
Read32(posvals, n)!=n) {
4539 for (n=0; n<nSubElem; n++) {
4546 if (!pIO->
Read32(&elemSig)) {
4558 if (!pElem->
Read(pos->
size, pIO)) {
4630 if (pIO->
Write32(posvals, np)!=np) {
4641 posvals[0].
size = pIO->
Tell()-elemStart - posvals[nPos-1].
offset;
4665 if (pIO->
Write32(posvals, np)!=np) {
4787 pApplyCalc->
m_temp = pSrcTemp;
4788 pApplyCalc->
m_input = pSrcPixel;
4844 sReport += sSigPathName;
4845 sReport +=
" - Has an Empty Calculator Functions!\n";
4957 for (i=count; i<=idx; i++) {
4958 (*pArray)[i] = NULL;
4970 if ((*pArray)[idx]) {
4971 delete (*pArray)[idx];
4975 (*pArray)[idx] = pElem;
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
@ icValidateCriticalError
std::map< icUInt32Number, CIccCalculatorFunc * > icChannelFuncOffsetMap
std::map< icSigCalcOp, IIccOpDef * > icCalcOpMap
std::map< CIccCalculatorFunc *, icPositionNumber > icChannelFuncPtrMap
static void AppendOpList(CIccCalcOpList &toList, const CIccCalcOpList &fromList)
static CIccConsoleDebugger g_ConsoleDebugger
static IIccCalcDebugger * g_pDebugger
@ icSigPolarToCartesianOp
@ icSigCartesianToPolarOp
@ icSigGreaterThanEqualOp
std::list< SIccCalcOp > CIccCalcOpList
#define icMaxDataStackSize
CIccCalcOpList * CIccCalcOpListPtr
@ icFuncParseStackOverflow
@ icFuncParseStackUnderflow
@ icFuncParseEmptyFunction
@ icFuncParseInvalidOperation
#define icCalcDebuggerNone
std::vector< icFloatNumber > CIccFloatVector
std::list< CIccCalcOpListPtr > CIccCalcOpListPtrList
#define icCalcDebuggerConsole
#define icSigBeginBlockOp
IIccMatrixSolver * g_pIccMatrixSolver
Global Variable: g_pIccMatrixSolver.
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
std::string icGetSigPath(icUInt32Number nSig)
const char * icMsgValidateWarning
icFloatNumber icCubeth(icFloatNumber v)
void * icRealloc(void *ptr, size_t size)
Name: icRealloc.
icFloatNumber icICubeth(icFloatNumber v)
icFloatNumber icMin(icFloatNumber v1, icFloatNumber v2)
icUInt32Number icIntMax(icUInt32Number v1, icUInt32Number v2)
icFloatNumber icMax(icFloatNumber v1, icFloatNumber v2)
icUInt32Number icIntMin(icUInt32Number v1, icUInt32Number v2)
const char * icMsgValidateCriticalError
const icChar * icGetSigStr(icChar *pBuf, icUInt32Number nSig)
const icChar * icGetSig(icChar *pBuf, icUInt32Number nSig, bool bGetHexVal)
unsigned int icUInt32Number
Class: CIccApplyMpeCalculator.
CIccApplyMpeCalculator(CIccMultiProcessElement *pElem)
Name: CIccMpeCalculator::CIccApplyMpeCalculator.
CIccFloatVector * GetStack()
virtual ~CIccApplyMpeCalculator()
Name: CIccMpeCalculator::~CIccApplyMpeCalculator.
icUInt32Number m_nSubElem
CIccFloatVector * GetScratch()
icFloatNumber * GetTemp()
const icFloatNumber * m_input
CIccSubCalcApply ** m_SubElem
const icFloatNumber * GetInput()
CIccSubCalcApply * GetApply(icUInt16Number index)
Name: CIccApplyMpeCalculator::GetSubApply.
icFloatNumber * GetOutput()
bool GetEnvVar(icSigCmmEnvVar sigEnv, icFloatNumber &val)
Name: CIccApplyMpeCalculator::GetSubApply.
CIccFloatVector * m_stack
CIccFloatVector * m_scratch
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
Class: CIccTagMultiProcessElement.
static CIccCalcOpMgr * m_inst
static IIccOpDef * getOpDef(icSigCalcOp opSig)
static CIccCalcOpMgr * GetInstance()
CIccOpDefInvalid m_invalid
Class: CIccCalculatorFunc.
CIccCalculatorFunc & operator=(const CIccCalculatorFunc &ICF)
Name: &CIccCalculatorFunc::operator=.
void InsertBlanks(std::string &sDescription, int nBlanks)
void DescribeSequence(std::string &sDescription, icUInt32Number nOps, SIccCalcOp *op, int nBlanks)
bool DoesOverflowInput(icUInt16Number nInputChannels) const
Name: CIccChannelFunc::DoesOverflowInput.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccCalculatorFunc::Read.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccMpeCalculator *pChannelCalc=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccCalculatorFunc::Validate.
icUInt32Number m_nReserved
icFuncParseStatus SetFunction(const char *szFuncDef, std::string &sReport)
Name: CIccCalculatorFunc::SetFunction.
virtual ~CIccCalculatorFunc()
Name: CIccCalculatorFunc::~CIccChannelFunc.
virtual void Describe(std::string &sDescription, int nVerboseness=0, int nBlanks=0)
Name: CIccCalculatorFunc::Describe.
CIccMpeCalculator * m_pCalc
bool ApplySequence(CIccApplyMpeCalculator *pApply, icUInt32Number nOps, SIccCalcOp *op) const
Name: CIccCalculatorFunc::ApplySequence.
bool HasValidOperations(std::string &sReport) const
Name: CIccCalculatorFunc::HasValidOperations.
bool InitSelectOp(SIccCalcOp *ops, icUInt32Number nOps)
Name: CIccCalculatorFunc::InitSelectOp.
virtual bool Begin(const CIccMpeCalculator *pChannelMux, CIccTagMultiProcessElement *pMPE)
Name: CIccCalculatorFunc::Begin.
icUInt32Number GetMaxTemp() const
Name: CIccCalculatorFunc::GetMaxTemp.
icFuncParseStatus DoesStackUnderflowOverflow(std::string &sReport) const
Name: CIccCalculatorFunc::DoesStackUnderflowOverflow.
int CheckUnderflowOverflow(SIccCalcOp *op, icUInt32Number nOps, int nArgs, bool bCheckUnderflow, std::string &sReport) const
Name: CIccCalculatorFunc::CheckUnderflow.
bool SequenceNeedTempReset(SIccCalcOp *op, icUInt32Number nOps, icUInt8Number *tempUsage, icUInt32Number nMaxTemp)
Name: CIccCalculatorFunc::SequenceNeedTempReset.
bool DoesOverflowOutput(icUInt16Number nOutputChannels) const
Name: CIccChannelFunc::DoesOverflowOutput.
virtual bool Apply(CIccApplyMpeCalculator *pApply) const
Name: CIccCalculatorFunc::Apply.
CIccCalculatorFunc(CIccMpeCalculator *pCalc)
Name: CIccCalculatorFunc::CIccCalculatorFunc.
virtual bool Write(CIccIO *pIO)
Name: CIccCalculatorFunc::Write.
bool HasUnsupportedOperations(std::string &sReport, const CIccProfile *pProfile) const
Name: CIccCalculatorFunc::HasUnsupportedOperations.
bool InitSelectOps()
Name: CIccCalculatorFunc::InitSelectOps.
bool SetOpDefs()
Name: CIccCalculatorFunc::SetOpDefs.
const char * ParseFuncDef(const char *szFuncDef, CIccCalcOpList &m_list, std::string &sReport)
Name: CIccCalculatorFunc::ParseFuncDef.
virtual CIccCalculatorFunc * NewCopy() const
bool NeedTempReset(icUInt8Number *tempUsage, icUInt32Number nMaxTemp)
Name: CIccCalculatorFunc::NeedTempReset.
virtual icChannelFuncSignature GetType() const
virtual ~CIccConsoleDebugger()
virtual bool AfterOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)
virtual void Error(const char *szMsg)
virtual bool BeforeOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)
virtual void BeginApply()
bool GetEnvSig(icSigCmmEnvVar &envSig)
icFloat32Number GetValue()
CIccFuncTokenizer(const char *szText, bool bAllowReferences=false)
bool GetIndex(icUInt16Number &v1, icUInt16Number &v2, icUInt16Number initV1=0, icUInt16Number initV2=0)
std::string GetName() const
void SetPos(const char *szText)
virtual ~CIccFuncTokenizer()
std::string GetReference() const
bool GetNext(bool bForceNoRefs=false)
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
virtual icInt32Number Tell()
bool Align32()
Write operation to make sure that filelength is evenly divisible by 4.
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
std::string GetSigPathName(std::string sigPath)
Class: CIccMpeCalculator.
icFuncParseStatus SetCalcFunc(icCalculatorFuncPtr newFunc)
Name: CIccMpeCalculator::SetCalcFunc.
virtual bool IsLateBindingReflectance() const
Name: CIccMpeCalculator::IsLateBindingReflectance.
CIccMultiProcessElement * GetElem(icSigCalcOp op, icUInt16Number index)
Name: CIccMpeCalculator::GetSubApply.
icUInt32Number m_nTempChannels
void SetSize(icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
Name: CIccMpeCalculator::SetSize.
icCalculatorFuncPtr m_calcFunc
virtual icElemTypeSignature GetType() const
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Name: CIccMpeCalculator::Begin.
virtual void Describe(std::string &sDescription, int nVerboseness)
Name: CIccMpeCalculator::Describe.
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Name: CIccMpeCalculator::Read.
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Name: CIccMpeCalculator::Validate.
virtual bool Write(CIccIO *pIO)
Name: CIccMpeCalculator::Write.
CIccMpeCalculator(icUInt16Number nInputChannels=0, icUInt16Number nOutputChannels=0)
Name: CIccMpeCalculator::CIccMpeCalculator.
icUInt32Number m_nSubElem
virtual CIccApplyMpe * GetNewApply(CIccApplyTagMpe *pApplyTag)
Name: CIccMpeCalculator::Begin.
bool SetElem(icUInt32Number idx, CIccMultiProcessElement *pElem, icUInt32Number &count, CIccMultiProcessElement ***pArray)
Name: CIccMpeCalculator::GetSubApply.
CIccMultiProcessElement ** m_SubElem
CIccMpeCalculator & operator=(const CIccMpeCalculator &curveSet)
Name: &CIccMpeCalculator::operator=.
virtual bool IsLateBinding() const
Name: CIccMpeCalculator::IsLateBinding.
bool SetSubElem(icUInt32Number idx, CIccMultiProcessElement *pElem)
virtual ~CIccMpeCalculator()
Name: CIccMpeCalculator::~CIccMpeCalculator.
virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const
Name: CIccMpeCalculator::Apply.
Class: CIccMultiProcessElement.
virtual icUInt16Number NumInputChannels() const
icUInt16Number m_nOutputChannels
virtual icUInt16Number NumOutputChannels() const
virtual CIccMultiProcessElement * NewCopy() const =0
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
static CIccMultiProcessElement * Create(icElemTypeSignature sig)
Name: CIccMultiProcessElement::Create.
virtual icElemTypeSignature GetType() const =0
icUInt16Number m_nInputChannels
virtual void Describe(std::string &sDescription, int nVerboseness)=0
icUInt32Number m_nReserved
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
Name: CIccProcessElement::Validate.
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool IsValid(CIccMpeCalculator *pCalc, SIccCalcOp &op)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
virtual bool Exec(SIccCalcOp *op, SIccOpState &os)
icUInt16Number NumInputChannels()
void Apply(icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel)
icUInt16Number NumOutputChannels()
Class: CIccTagMultiProcessElement.
IIccCmmEnvVarLookup * GetCmmEnvLookup()
virtual void EndApply()=0
virtual bool BeforeOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)=0
virtual bool AfterOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)=0
static void SetDebugger(IIccCalcDebugger *pDebugger)
virtual void Error(const char *msg)=0
virtual void BeginApply()=0
virtual bool GetEnvVar(icSigCmmEnvVar sig, icFloatNumber &val)=0
virtual bool Solve(icFloatNumber *dXVector, const icFloatNumber *dMatrix, const icFloatNumber *dYVector, icUInt16Number nRows, icUInt16Number nCols)=0
Member Function: Solve.
virtual bool Exec(SIccCalcOp *op, SIccOpState &s)
static bool IsValidOp(icSigCalcOp sig)
Name: SIccCalcOp::IsValidOp.
icUInt16Number ArgsUsed(CIccMpeCalculator *pCalc)
Name: SIccCalcOp::ArgsUsed.
void Describe(std::string &desc, int nVerboseness=100)
Name: SIccCalcOp::Describe.
struct SIccCalcOp::@1::@2 select
union SIccCalcOp::@1 data
icUInt16Number ArgsPushed(CIccMpeCalculator *pCalc)
Name: SIccCalcOp::ArgsPushed.
CIccFloatVector * pScratch
const icFloatNumber * pixel
CIccApplyMpeCalculator * pApply