Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccMpeCalc.h
Go to the documentation of this file.
1/** @file
2File: IccMpeCalc.h
3
4Contains: Header for implementation of Channel Calculator element
5 and supporting classes
6
7Version: V1
8
9Copyright: (c) see ICC Software License
10*/
11
12/*
13 * The ICC Software License, Version 0.1
14 *
15 *
16 * Copyright (c) 2003-2006 The International Color Consortium. All rights
17 * reserved.
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 *
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 *
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in
28 * the documentation and/or other materials provided with the
29 * distribution.
30 *
31 * 3. In the absence of prior written permission, the names "ICC" and "The
32 * International Color Consortium" must not be used to imply that the
33 * ICC organization endorses or promotes products derived from this
34 * software.
35 *
36 *
37 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
38 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
39 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
41 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
44 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
45 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
46 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
47 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 * SUCH DAMAGE.
49 * ====================================================================
50 *
51 * This software consists of voluntary contributions made by many
52 * individuals on behalf of the The International Color Consortium.
53 *
54 *
55 * Membership in the ICC is encouraged when this software is used for
56 * commercial purposes.
57 *
58 *
59 * For more information on The International Color Consortium, please
60 * see <http://www.color.org/>.
61 *
62 *
63 */
64
65//////////////////////////////////////////////////////////////////////
66// HISTORY:
67//
68// -Jan 30, 2005
69// Initial CIccMpeent prototype development
70// -June 16, 2006
71// CIccCalculatorElement prototype development
72//
73//////////////////////////////////////////////////////////////////////
74
75#ifndef _ICCELEMCALC_H
76#define _ICCELEMCALC_H
77
78#include "IccTagMPE.h"
79#include "IccSolve.h"
80#include <vector>
81
82//CIccFloatTag support
83#ifdef USEREFICCMAXNAMESPACE
84namespace refIccMAX {
85#endif
86
87//Declare forward references
88class CIccMpeCurveSet;
89class CIccMpeMatrix;
90class CIccMpeCLUT;
93class IIccOpDef;
94
95#define icMaxDataStackSize 65535
96
97
98
99/************************************************************************
100 * Channel Function signature
101 ************************************************************************/
102typedef enum {
103 icSigChannelFunction = 0x66756e63, /* 'func' */
105
106
107/************************************************************************
108 * Calculator operator signatures
109 ************************************************************************/
110typedef enum {
111 //Floating point constant operation
112 icSigDataOp = 0x64617461, /* 'data' */
113 icSigPiOp = 0x70692020, /* 'pi ' */
114 icSigPosInfinityOp = 0x2b494e46, /* '+INF' */
115 icSigNegInfinityOp = 0x2d494e46, /* '-INF' */
116 icSigNotaNumberOp = 0x4e614e20, /* 'NaN ' */
117
118 //Variable operations
119 icSigInputChanOp = 0x696e2020, /* 'in ' */
120 icSigOutputChanOp = 0x6f757420, /* 'out ' */
121 icSigTempGetChanOp = 0x74676574, /* 'tget' */
122 icSigTempPutChanOp = 0x74707574, /* 'tput' */
123 icSigTempSaveChanOp = 0x74736176, /* 'tsav' */
124
125 //Environment variable operation
126 icSigEnvVarOp = 0x656e7620, /* 'env ' */
127
128 //Sub-element operations
129 icSigApplyCurvesOp = 0x63757276, /* 'curv' */
130 icSigApplyMatrixOp = 0x6d747820, /* 'mtx ' */
131 icSigApplyCLutOp = 0x636c7574, /* 'clut' */
132 icSigApplyTintOp = 0x74696e74, /* 'tint' */
133 icSigApplyToJabOp = 0x744a6162, /* 'tJab' */
134 icSigApplyFromJabOp = 0x664a6162, /* 'fJab' */
135 icSigApplyCalcOp = 0x63616c63, /* 'calc' */
136 icSigApplyElemOp = 0x656c656d, /* 'elem' */
137
138 //Stack operations
139 icSigCopyOp = 0x636f7079, /* 'copy' */
140 icSigRotateLeftOp = 0x726f746c, /* 'rotl' */
141 icSigRotateRightOp = 0x726f7472, /* 'rotr' */
142 icSigPositionDupOp = 0x706f7364, /* 'posd' */
143 icSigFlipOp = 0x666c6970, /* 'flip' */
144 icSigPopOp = 0x706f7020, /* 'pop ' */
145
146 //Variable length operations
147 icSigSumOp = 0x73756d20, /* 'sum ' */
148 icSigProductOp = 0x70726f64, /* 'prod' */
149 icSigMinimumOp = 0x6d696e20, /* 'min ' */
150 icSigMaximumOp = 0x6d617820, /* 'max ' */
151 icSigAndOp = 0x616e6420, /* 'and ' */
152 icSigOrOp = 0x6f722020, /* 'or ' */
153
154 //Vector Function operations
155 icSigNegOp = 0x6e656720, /* 'neg ' */
156 icSigAddOp = 0x61646420, /* 'add ' */
157 icSigSubtractOp = 0x73756220, /* 'sub ' */
158 icSigMultiplyOp = 0x6d756c20, /* 'mul ' */
159 icSigDivideOp = 0x64697620, /* 'div ' */
160 icSigModulusOp = 0x6d6f6420, /* 'mod ' */
161 icSigPowOp = 0x706f7720, /* 'pow ' */
162 icSigGammaOp = 0x67616d61, /* 'gama' */
163 icSigScalarAddOp = 0x73616464, /* 'sadd' */
164 icSigScalarSubtractOp = 0x73737562, /* 'ssub' */
165 icSigScalarMultiplyOp = 0x736d756c, /* 'smul' */
166 icSigScalarDivideOp = 0x73646976, /* 'sdiv' */
167 icSigSquareOp = 0x73712020, /* 'sq ' */
168 icSigSquareRootOp = 0x73717274, /* 'sqrt' */
169 icSigCubeOp = 0x63622020, /* 'cb ' */
170 icSigCubeRootOp = 0x63627274, /* 'cbrt' */
171 icSigSignOp = 0x7369676e, /* 'sign' */
172 icSigAbsoluteValOp = 0x61627320, /* 'abs ' */
173 icSigFloorOp = 0x666c6f72, /* 'flor' */
174 icSigCeilingOp = 0x6365696c, /* 'ceil' */
175 icSigTruncateOp = 0x74726e63, /* 'trnc' */
176 icSigRoundOp = 0x726f6e64, /* 'rond' */
177 icSigExpOp = 0x65787020, /* 'exp ' */
178 icSigLogrithmOp = 0x6c6f6720, /* 'log ' */
179 icSigNaturalLogOp = 0x6c6e2020, /* 'ln ' */
180 icSigSineOp = 0x73696e20, /* 'sin ' */
181 icSigCosineOp = 0x636f7320, /* 'cos ' */
182 icSigTangentOp = 0x74616e20, /* 'tan ' */
183 icSigArcSineOp = 0x6173696e, /* 'asin' */
184 icSigArcCosineOp = 0x61636f73, /* 'acos' */
185 icSigArcTangentOp = 0x6174616e, /* 'atan' */
186 icSigArcTan2Op = 0x61746e32, /* 'atn2' */
187 icSigCartesianToPolarOp = 0x63746f70, /* 'ctop' */
188 icSigPolarToCartesianOp = 0x70746f63, /* 'ptoc' */
189 icSigRealNumberOp = 0x726e756d, /* 'rnum' */
190 icSigLessThanOp = 0x6c742020, /* 'lt ' */
191 icSigLessThanEqualOp = 0x6c652020, /* 'le ' */
192 icSigEqualOp = 0x65712020, /* 'eq ' */
193 icSigNotEqualOp = 0x6e657120, /* 'neq ' */
194 icSigNearOp = 0x6e656172, /* 'near' */
195 icSigGreaterThanEqualOp = 0x67652020, /* 'ge ' */
196 icSigGreaterThanOp = 0x67742020, /* 'gt ' */
197 icSigNotOp = 0x6e6f7420, /* 'not ' */
198 icSigToLabOp = 0x744c6162, /* 'tLab' */
199 icSigToXYZOp = 0x7458595a, /* 'tXYZ' */
200 icSigVectorMinimumOp = 0x766d696e, /* 'vmin' */
201 icSigVectorMaximumOp = 0x766d6178, /* 'vmax' */
202 icSigVectorAndOp = 0x76616e64, /* 'vand' */
203 icSigVectorOrOp = 0x766f7220, /* 'vor ' */
204
205 //Matrix Operations
206 icSigSolveOp = 0x736f6c76, /* 'solv' */
207 icSigTransposeOp = 0x7472616e, /* 'tran' */
208
209 //Conditional operation
210 icSigIfOp = 0x69662020, /* 'if ' */
211 icSigElseOp = 0x656c7365, /* 'else' */
212
213 //Selection operation
214 icSigSelectOp = 0x73656c20, /* 'sel ' */
215 icSigCaseOp = 0x63617365, /* 'case' */
216 icSigDefaultOp = 0x64666c74, /* 'dflt' */
217
218 //Boolean operation
220
221
222
223/**
224****************************************************************************
225* Structure: SIccCalcOp
226*
227* Purpose: A structure to keep track of channel operations
228*****************************************************************************
229*/
231{
232public:
234 union {
237 struct {
238#ifndef ICC_BYTE_ORDER_LITTLE_ENDIAN
241#else
244#endif
245 } select;
246 }data;
247 unsigned long extra;
249
250 void Describe(std::string &desc, int nVerboseness=100);
251
252 static bool IsValidOp(icSigCalcOp sig);
253
254 bool IsValidOp(CIccMpeCalculator *pCalc);
255 icUInt16Number ArgsUsed(CIccMpeCalculator *pCalc);
256 icUInt16Number ArgsPushed(CIccMpeCalculator *pCalc);
257};
258
259typedef std::list<SIccCalcOp> CIccCalcOpList;
261typedef std::list<CIccCalcOpListPtr> CIccCalcOpListPtrList;
262
263typedef std::vector<icFloatNumber> CIccFloatVector;
264
265/**
266****************************************************************************
267* Structure: SIccOpState
268*
269* Purpose: Keep everything in one place for IIccOpDef Exec
270*****************************************************************************
271*/
283
284/**
285****************************************************************************
286* Interface: IIccOpDef
287*
288* Purpose: A structure to keep track of channel operations
289*****************************************************************************
290*/
292{
293public:
295 virtual ~IIccOpDef() {}
296
297 virtual int ArgsPushed(CIccMpeCalculator *pCalc, SIccCalcOp &op) { return op.ArgsPushed(pCalc);}
298 virtual int ArgsUsed(CIccMpeCalculator *pCalc, SIccCalcOp &op) { return op.ArgsUsed(pCalc);}
299
300 virtual void Describe(SIccCalcOp &op, std::string &desc, int nVerboseness) {op.Describe(desc, nVerboseness);}
301
302 virtual bool IsValid(CIccMpeCalculator *pCalc, SIccCalcOp &op) { return op.IsValidOp(pCalc); }
303
304 virtual bool Exec(SIccCalcOp *op, SIccOpState &s) {return false;}
305};
306
307
317
318#define icSigBeginBlockOp ((icSigCalcOp)0x7b202020)
319#define icSigEndBlockOp ((icSigCalcOp)0x7d202020)
320#define icSigBadOp ((icSigCalcOp)0)
321
323{
324public:
325 CIccFuncTokenizer(const char *szText, bool bAllowReferences = false);
326 virtual ~CIccFuncTokenizer();
327
328 bool GetNext(bool bForceNoRefs = false);
329 const char *GetPos() { return m_text; }
330 void SetPos(const char *szText) { m_text = szText; }
331
332 icSigCalcOp GetSig();
333 bool GetIndex(icUInt16Number &v1, icUInt16Number &v2, icUInt16Number initV1=0, icUInt16Number initV2=0);
334 icFloat32Number GetValue();
335 bool GetEnvSig(icSigCmmEnvVar &envSig);
336
337 //The following are used by XML variable and macro parsing
338 std::string GetName() const;
339 std::string GetReference() const;
340
341 std::string &GetLast() { return *m_token; }
342
343protected:
344 bool IsWhiteSpace();
345 bool IsComment();
346 void SkipComment();
347
348 const char *m_text;
349 std::string *m_token;
350
352};
353
355
356/**
357****************************************************************************
358* Class: CIccCalculatorFunc
359*
360* Purpose: The Calculator function sequence
361*****************************************************************************
362*/
364{
365public:
368 CIccCalculatorFunc &operator=(const CIccCalculatorFunc &ICF);
369 virtual CIccCalculatorFunc *NewCopy() const { return new CIccCalculatorFunc(*this);}
370 virtual ~CIccCalculatorFunc();
371
373 virtual const icChar *GetClassName() const { return "CIccChannelFunction"; }
374
375 virtual void Describe(std::string &sDescription, int nVerboseness=0, int nBlanks=0);
376
377 virtual bool Read(icUInt32Number size, CIccIO *pIO);
378 virtual bool Write(CIccIO *pIO);
379
380 virtual bool Begin(const CIccMpeCalculator *pChannelMux, CIccTagMultiProcessElement *pMPE);
381 virtual bool Apply(CIccApplyMpeCalculator *pApply) const;
382 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport,
383 const CIccMpeCalculator* pChannelCalc=NULL, const CIccProfile* pProfile = NULL) const;
384
385 icFuncParseStatus SetFunction(const char *szFuncDef, std::string &sReport);
386 icFuncParseStatus SetFunction(CIccCalcOpList &opList, std::string &sReport);
387
388 icUInt32Number GetMaxTemp() const;
389 int CheckUnderflowOverflow(SIccCalcOp *op, icUInt32Number nOps, int nArgs, bool bCheckUnderflow, std::string &sReport) const;
390 icFuncParseStatus DoesStackUnderflowOverflow(std::string &sReport) const;
391 bool HasValidOperations(std::string &sReport) const;
392 bool HasUnsupportedOperations(std::string &sReport, const CIccProfile *pProfile) const;
393 bool DoesOverflowInput(icUInt16Number nInputChannels) const;
394 bool DoesOverflowOutput(icUInt16Number nOutputChannels) const;
395 bool NeedTempReset(icUInt8Number *tempUsage, icUInt32Number nMaxTemp);
396 bool SetOpDefs();
397
398protected:
399
400 bool InitSelectOps();
401 bool InitSelectOp(SIccCalcOp *ops, icUInt32Number nOps);
402
403 bool SequenceNeedTempReset(SIccCalcOp *op, icUInt32Number nOps, icUInt8Number *tempUsage, icUInt32Number nMaxTemp);
404
405 void InsertBlanks(std::string &sDescription, int nBlanks);
406 void DescribeSequence(std::string &sDescription,
407 icUInt32Number nOps, SIccCalcOp *op, int nBlanks);
408 bool ApplySequence(CIccApplyMpeCalculator *pApply, icUInt32Number nOps, SIccCalcOp *op) const;
409
410 const char *ParseFuncDef(const char *szFuncDef, CIccCalcOpList &m_list, std::string &sReport);
411
413
415
418
419};
420
422
424{
425public:
426 CIccSubCalcApply(CIccApplyMpe *pApplyMpe) { m_pApply = pApplyMpe; }
427 ~CIccSubCalcApply() { if (m_pApply) delete m_pApply; }
428
429 icUInt16Number NumInputChannels() { return m_pApply->GetElem()->NumInputChannels(); }
430 icUInt16Number NumOutputChannels() { return m_pApply->GetElem()->NumOutputChannels(); }
431
432 void Apply(icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) { if (m_pApply) m_pApply->Apply(pDestPixel, pSrcPixel); }
433
434protected:
436};
437
438
439/**
440****************************************************************************
441* Class: CIccMpeCalculator
442*
443* Purpose: The Calculator process element
444*****************************************************************************
445*/
447{
448public:
449 CIccMpeCalculator(icUInt16Number nInputChannels=0, icUInt16Number nOutputChannels=0);
450 CIccMpeCalculator(const CIccMpeCalculator &curveSet);
451 CIccMpeCalculator &operator=(const CIccMpeCalculator &curveSet);
452 virtual CIccMpeCalculator *NewCopy() const { return new CIccMpeCalculator(*this);}
453 virtual ~CIccMpeCalculator();
454
455 void Reset() { SetSize(0,0); }
456 void SetSize(icUInt16Number nInputChannels, icUInt16Number nOutputChannels);
457
458 icFuncParseStatus SetCalcFunc(icCalculatorFuncPtr newFunc);
459 icFuncParseStatus SetCalcFunc(const char *szFuncDef, std::string &sReport);
460
461 bool SetSubElem(icUInt32Number idx, CIccMultiProcessElement *pElem) { return SetElem(idx, pElem, m_nSubElem, &m_SubElem); }
462
464 virtual const icChar *GetClassName() const { return "CIccMpeCalculator"; }
465
466 virtual void Describe(std::string &sDescription, int nVerboseness);
467
468 virtual bool Read(icUInt32Number size, CIccIO *pIO);
469 virtual bool Write(CIccIO *pIO);
470
471 virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
472 virtual CIccApplyMpe *GetNewApply(CIccApplyTagMpe *pApplyTag);
473 virtual void Apply(CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const;
474 virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL, const CIccProfile* pProfile = NULL) const;
475
477
478 virtual bool IsLateBinding() const;
479 virtual bool IsLateBindingReflectance() const;
480
481protected:
482
483 bool SetElem(icUInt32Number idx, CIccMultiProcessElement *pElem, icUInt32Number &count, CIccMultiProcessElement ***pArray);
484
487
490
492
494};
495
496
497/**
498****************************************************************************
499* Class: CIccApplyMpeCalculator
500*
501* Purpose: The Calculator process element apply data
502*****************************************************************************
503*/
505{
506 friend class CIccMpeCalculator;
507public:
508 virtual ~CIccApplyMpeCalculator();
509
511 virtual const icChar *GetClassName() const { return "CIccApplyMpeCalculator"; }
512
513 const icFloatNumber *GetInput() { return m_input; }
514 icFloatNumber *GetOutput() { return m_output; }
515 icFloatNumber *GetTemp() { return m_temp; }
516
517 CIccFloatVector *GetStack() { return m_stack; }
518
519 CIccFloatVector *GetScratch() { return m_scratch; }
520
521 CIccSubCalcApply* GetApply(icUInt16Number index);
522
523 bool GetEnvVar(icSigCmmEnvVar sigEnv, icFloatNumber &val);
524
525protected:
527
530
531 //Use member storage for calls between Apply and ApplySequence
535
536 //Apply storage for sub-elements
539
541};
542
544{
545public:
546 static void SetDebugger(IIccCalcDebugger *pDebugger);
547
548 virtual ~IIccCalcDebugger() {}
549
550 virtual void BeginApply() = 0;
551 virtual void EndApply() = 0;
552
553 virtual bool BeforeOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)=0;
554 virtual bool AfterOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)=0;
555
556 virtual void Error(const char *msg) = 0;
557};
558
559#define icCalcDebuggerNone ((IIccCalcDebugger*)0)
560#define icCalcDebuggerConsole ((IIccCalcDebugger*)-1)
561
562//CIccMPElements support
563#ifdef USEREFICCMAXNAMESPACE
564}
565#endif
566
567#endif //_ICCELEMCALC_H
icArraySignature sig
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
char icChar
Definition IccDefs.h:109
icValidateStatus
Definition IccDefs.h:118
icSigCalcOp
Definition IccMpeCalc.h:110
@ icSigPiOp
Definition IccMpeCalc.h:113
@ icSigCubeOp
Definition IccMpeCalc.h:169
@ icSigEnvVarOp
Definition IccMpeCalc.h:126
@ icSigArcTangentOp
Definition IccMpeCalc.h:185
@ icSigSquareRootOp
Definition IccMpeCalc.h:168
@ icSigFloorOp
Definition IccMpeCalc.h:173
@ icSigApplyFromJabOp
Definition IccMpeCalc.h:134
@ icSigOrOp
Definition IccMpeCalc.h:152
@ icSigScalarAddOp
Definition IccMpeCalc.h:163
@ icSigMinimumOp
Definition IccMpeCalc.h:149
@ icSigApplyCLutOp
Definition IccMpeCalc.h:131
@ icSigSineOp
Definition IccMpeCalc.h:180
@ icSigSumOp
Definition IccMpeCalc.h:147
@ icSigSignOp
Definition IccMpeCalc.h:171
@ icSigProductOp
Definition IccMpeCalc.h:148
@ icSigPolarToCartesianOp
Definition IccMpeCalc.h:188
@ icSigTempPutChanOp
Definition IccMpeCalc.h:122
@ icSigCosineOp
Definition IccMpeCalc.h:181
@ icSigNaturalLogOp
Definition IccMpeCalc.h:179
@ icSigNegInfinityOp
Definition IccMpeCalc.h:115
@ icSigLessThanOp
Definition IccMpeCalc.h:190
@ icSigAndOp
Definition IccMpeCalc.h:151
@ icSigSquareOp
Definition IccMpeCalc.h:167
@ icSigNotOp
Definition IccMpeCalc.h:197
@ icSigGreaterThanOp
Definition IccMpeCalc.h:196
@ icSigRotateRightOp
Definition IccMpeCalc.h:141
@ icSigModulusOp
Definition IccMpeCalc.h:160
@ icSigNegOp
Definition IccMpeCalc.h:155
@ icSigGammaOp
Definition IccMpeCalc.h:162
@ icSigNotaNumberOp
Definition IccMpeCalc.h:116
@ icSigApplyCurvesOp
Definition IccMpeCalc.h:129
@ icSigFlipOp
Definition IccMpeCalc.h:143
@ icSigArcSineOp
Definition IccMpeCalc.h:183
@ icSigEqualOp
Definition IccMpeCalc.h:192
@ icSigNearOp
Definition IccMpeCalc.h:194
@ icSigDataOp
Definition IccMpeCalc.h:112
@ icSigPowOp
Definition IccMpeCalc.h:161
@ icSigVectorMaximumOp
Definition IccMpeCalc.h:201
@ icSigScalarSubtractOp
Definition IccMpeCalc.h:164
@ icSigSelectOp
Definition IccMpeCalc.h:214
@ icSigCartesianToPolarOp
Definition IccMpeCalc.h:187
@ icSigArcCosineOp
Definition IccMpeCalc.h:184
@ icSigAddOp
Definition IccMpeCalc.h:156
@ icSigRealNumberOp
Definition IccMpeCalc.h:189
@ icSigRoundOp
Definition IccMpeCalc.h:176
@ icSigApplyElemOp
Definition IccMpeCalc.h:136
@ icSigAbsoluteValOp
Definition IccMpeCalc.h:172
@ icSigOutputChanOp
Definition IccMpeCalc.h:120
@ icSigLessThanEqualOp
Definition IccMpeCalc.h:191
@ icSigDefaultOp
Definition IccMpeCalc.h:216
@ icSigCopyOp
Definition IccMpeCalc.h:139
@ icSigSubtractOp
Definition IccMpeCalc.h:157
@ icSigCubeRootOp
Definition IccMpeCalc.h:170
@ icSigPopOp
Definition IccMpeCalc.h:144
@ icSigLogrithmOp
Definition IccMpeCalc.h:178
@ icSigScalarDivideOp
Definition IccMpeCalc.h:166
@ icSigApplyToJabOp
Definition IccMpeCalc.h:133
@ icSigDivideOp
Definition IccMpeCalc.h:159
@ icSigTangentOp
Definition IccMpeCalc.h:182
@ icSigApplyTintOp
Definition IccMpeCalc.h:132
@ icSigTruncateOp
Definition IccMpeCalc.h:175
@ icSigRotateLeftOp
Definition IccMpeCalc.h:140
@ icSigApplyCalcOp
Definition IccMpeCalc.h:135
@ icSigIfOp
Definition IccMpeCalc.h:210
@ icSigApplyMatrixOp
Definition IccMpeCalc.h:130
@ icSigScalarMultiplyOp
Definition IccMpeCalc.h:165
@ icSigPositionDupOp
Definition IccMpeCalc.h:142
@ icSigArcTan2Op
Definition IccMpeCalc.h:186
@ icSigGreaterThanEqualOp
Definition IccMpeCalc.h:195
@ icSigToXYZOp
Definition IccMpeCalc.h:199
@ icSigVectorOrOp
Definition IccMpeCalc.h:203
@ icSigSolveOp
Definition IccMpeCalc.h:206
@ icSigToLabOp
Definition IccMpeCalc.h:198
@ icSigInputChanOp
Definition IccMpeCalc.h:119
@ icSigCaseOp
Definition IccMpeCalc.h:215
@ icSigVectorMinimumOp
Definition IccMpeCalc.h:200
@ icSigExpOp
Definition IccMpeCalc.h:177
@ icSigTransposeOp
Definition IccMpeCalc.h:207
@ icSigNotEqualOp
Definition IccMpeCalc.h:193
@ icSigVectorAndOp
Definition IccMpeCalc.h:202
@ icSigPosInfinityOp
Definition IccMpeCalc.h:114
@ icSigTempSaveChanOp
Definition IccMpeCalc.h:123
@ icSigMultiplyOp
Definition IccMpeCalc.h:158
@ icSigTempGetChanOp
Definition IccMpeCalc.h:121
@ icSigMaximumOp
Definition IccMpeCalc.h:150
@ icSigCeilingOp
Definition IccMpeCalc.h:174
@ icSigElseOp
Definition IccMpeCalc.h:211
std::list< SIccCalcOp > CIccCalcOpList
Definition IccMpeCalc.h:259
CIccCalcOpList * CIccCalcOpListPtr
Definition IccMpeCalc.h:260
icChannelFuncSignature
Definition IccMpeCalc.h:102
@ icSigChannelFunction
Definition IccMpeCalc.h:103
icFuncParseStatus
Definition IccMpeCalc.h:308
@ icFuncParseStackOverflow
Definition IccMpeCalc.h:313
@ icFuncParseSyntaxError
Definition IccMpeCalc.h:310
@ icFuncParseNoError
Definition IccMpeCalc.h:309
@ icFuncParseStackUnderflow
Definition IccMpeCalc.h:312
@ icFuncParseEmptyFunction
Definition IccMpeCalc.h:315
@ icFuncParseInvalidOperation
Definition IccMpeCalc.h:311
@ icFuncParseInvalidChannel
Definition IccMpeCalc.h:314
std::vector< icFloatNumber > CIccFloatVector
Definition IccMpeCalc.h:263
std::list< CIccCalcOpListPtr > CIccCalcOpListPtrList
Definition IccMpeCalc.h:261
CIccCalculatorFunc * icCalculatorFuncPtr
Definition IccMpeCalc.h:421
#define ICCPROFLIB_API
File: IccSolve.h.
File: IccTagMPE.h.
icElemInterp
Definition IccTagMPE.h:93
unsigned int icUInt32Number
Class: CIccApplyMpeCalculator.
Definition IccMpeCalc.h:505
CIccFloatVector * GetStack()
Definition IccMpeCalc.h:517
icFloatNumber * m_output
Definition IccMpeCalc.h:533
icUInt32Number m_nSubElem
Definition IccMpeCalc.h:537
CIccFloatVector * GetScratch()
Definition IccMpeCalc.h:519
virtual const icChar * GetClassName() const
Definition IccMpeCalc.h:511
icFloatNumber * GetTemp()
Definition IccMpeCalc.h:515
const icFloatNumber * m_input
Definition IccMpeCalc.h:532
virtual icElemTypeSignature GetType() const
Definition IccMpeCalc.h:510
CIccSubCalcApply ** m_SubElem
Definition IccMpeCalc.h:538
const icFloatNumber * GetInput()
Definition IccMpeCalc.h:513
icFloatNumber * m_temp
Definition IccMpeCalc.h:534
icFloatNumber * GetOutput()
Definition IccMpeCalc.h:514
CIccFloatVector * m_stack
Definition IccMpeCalc.h:528
CIccFloatVector * m_scratch
Definition IccMpeCalc.h:529
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
Definition IccMpeCalc.h:540
Class: CIccApplyMpe.
Definition IccTagMPE.h:203
Class: CIccTagMultiProcessElement.
Definition IccTagMPE.h:321
Class: CIccCalculatorFunc.
Definition IccMpeCalc.h:364
icUInt32Number m_nReserved
Definition IccMpeCalc.h:414
CIccMpeCalculator * m_pCalc
Definition IccMpeCalc.h:412
SIccCalcOp * m_Op
Definition IccMpeCalc.h:417
icUInt32Number m_nOps
Definition IccMpeCalc.h:416
virtual const icChar * GetClassName() const
Definition IccMpeCalc.h:373
virtual CIccCalculatorFunc * NewCopy() const
Definition IccMpeCalc.h:369
virtual icChannelFuncSignature GetType() const
Definition IccMpeCalc.h:372
std::string & GetLast()
Definition IccMpeCalc.h:341
void SetPos(const char *szText)
Definition IccMpeCalc.h:330
const char * GetPos()
Definition IccMpeCalc.h:329
const char * m_text
Definition IccMpeCalc.h:348
std::string * m_token
Definition IccMpeCalc.h:349
Type: Class.
Definition IccIO.h:97
Class: CIccMpeCLUT.
Class: CIccMpeCalculator.
Definition IccMpeCalc.h:447
icUInt32Number m_nTempChannels
Definition IccMpeCalc.h:485
icCalculatorFuncPtr m_calcFunc
Definition IccMpeCalc.h:491
virtual icElemTypeSignature GetType() const
Definition IccMpeCalc.h:463
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
Definition IccMpeCalc.h:493
virtual CIccMpeCalculator * NewCopy() const
Definition IccMpeCalc.h:452
icUInt32Number m_nSubElem
Definition IccMpeCalc.h:488
CIccMultiProcessElement ** m_SubElem
Definition IccMpeCalc.h:489
virtual const icChar * GetClassName() const
Definition IccMpeCalc.h:464
bool SetSubElem(icUInt32Number idx, CIccMultiProcessElement *pElem)
Definition IccMpeCalc.h:461
Class: CIccMpeCurveSet.
Class: CIccMpeMatrix.
Class: CIccMultiProcessElement.
Definition IccTagMPE.h:146
CIccSubCalcApply(CIccApplyMpe *pApplyMpe)
Definition IccMpeCalc.h:426
icUInt16Number NumInputChannels()
Definition IccMpeCalc.h:429
CIccApplyMpe * m_pApply
Definition IccMpeCalc.h:435
void Apply(icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel)
Definition IccMpeCalc.h:432
icUInt16Number NumOutputChannels()
Definition IccMpeCalc.h:430
Class: CIccTagMultiProcessElement.
Definition IccTagMPE.h:358
virtual void EndApply()=0
virtual bool BeforeOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)=0
virtual bool AfterOp(SIccCalcOp *op, SIccOpState &os, SIccCalcOp *ops)=0
virtual ~IIccCalcDebugger()
Definition IccMpeCalc.h:548
virtual void Error(const char *msg)=0
virtual void BeginApply()=0
Type: Class.
Definition IccUtil.h:401
Interface: IIccOpDef.
Definition IccMpeCalc.h:292
virtual int ArgsUsed(CIccMpeCalculator *pCalc, SIccCalcOp &op)
Definition IccMpeCalc.h:298
virtual void Describe(SIccCalcOp &op, std::string &desc, int nVerboseness)
Definition IccMpeCalc.h:300
virtual int ArgsPushed(CIccMpeCalculator *pCalc, SIccCalcOp &op)
Definition IccMpeCalc.h:297
virtual ~IIccOpDef()
Definition IccMpeCalc.h:295
virtual bool IsValid(CIccMpeCalculator *pCalc, SIccCalcOp &op)
Definition IccMpeCalc.h:302
virtual bool Exec(SIccCalcOp *op, SIccOpState &s)
Definition IccMpeCalc.h:304
unsigned char icUInt8Number
Number definitions.
float icFloat32Number
unsigned short icUInt16Number
icElemTypeSignature
Multi-Processing Element type signatures.
@ icSigCalculatorElemType
icSigCmmEnvVar
Structure: SIccCalcOp.
Definition IccMpeCalc.h:231
static bool IsValidOp(icSigCalcOp sig)
Name: SIccCalcOp::IsValidOp.
icUInt16Number v2
Definition IccMpeCalc.h:242
IIccOpDef * def
Definition IccMpeCalc.h:248
icUInt16Number v1
Definition IccMpeCalc.h:243
icUInt16Number ArgsUsed(CIccMpeCalculator *pCalc)
Name: SIccCalcOp::ArgsUsed.
icSigCalcOp sig
Definition IccMpeCalc.h:233
unsigned long extra
Definition IccMpeCalc.h:247
void Describe(std::string &desc, int nVerboseness=100)
Name: SIccCalcOp::Describe.
icUInt32Number size
Definition IccMpeCalc.h:236
icUInt16Number ArgsPushed(CIccMpeCalculator *pCalc)
Name: SIccCalcOp::ArgsPushed.
icFloat32Number num
Definition IccMpeCalc.h:235
Structure: SIccOpState.
Definition IccMpeCalc.h:273
icUInt32Number idx
Definition IccMpeCalc.h:280
icFloatNumber * temp
Definition IccMpeCalc.h:277
icUInt32Number nOps
Definition IccMpeCalc.h:281
icFloatNumber * output
Definition IccMpeCalc.h:279
CIccFloatVector * pScratch
Definition IccMpeCalc.h:276
CIccFloatVector * pStack
Definition IccMpeCalc.h:275
const icFloatNumber * pixel
Definition IccMpeCalc.h:278
CIccApplyMpeCalculator * pApply
Definition IccMpeCalc.h:274