Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccOpDefSubElement Class Reference
+ Inheritance diagram for CIccOpDefSubElement:
+ Collaboration diagram for CIccOpDefSubElement:

Public Member Functions

virtual bool Exec (SIccCalcOp *op, SIccOpState &os)
 
- Public Member Functions inherited from IIccOpDef
virtual int ArgsPushed (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual int ArgsUsed (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual void Describe (SIccCalcOp &op, std::string &desc, int nVerboseness)
 
 IIccOpDef ()
 
virtual bool IsValid (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual ~IIccOpDef ()
 

Detailed Description

Definition at line 352 of file IccMpeCalc.cpp.

Member Function Documentation

◆ Exec()

virtual bool CIccOpDefSubElement::Exec ( SIccCalcOp * op,
SIccOpState & os )
inlinevirtual

Reimplemented from IIccOpDef.

Definition at line 355 of file IccMpeCalc.cpp.

356 {
357 CIccSubCalcApply *pElemApply = os.pApply->GetApply(op->data.select.v1);
358 if (!pElemApply)
359 return false;
360
361 icUInt16Number nSrc = pElemApply->NumInputChannels();
362 icUInt16Number nDst = pElemApply->NumOutputChannels();
363
364 size_t ss = os.pStack->size();
365 if (nSrc>ss)
366 return false;
367 icFloatNumber *s = &(*os.pStack)[ss - nSrc];
368
369 if (os.pScratch->size()<(size_t)nDst)
370 os.pScratch->resize(nDst);
371
372 icFloatNumber *d = &(*os.pScratch)[0];
373
374 pElemApply->Apply(d, s);
375
376 int ns = (int)ss + (int)nDst - (int)nSrc;
377
378 if (ns != ss)
379 os.pStack->resize(ns);
380
381 s = &(*os.pStack)[ns - nDst];
382 memcpy(s, d, nDst*sizeof(icFloatNumber));
383 return true;
384 }
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
CIccSubCalcApply * GetApply(icUInt16Number index)
Name: CIccApplyMpeCalculator::GetSubApply.
icUInt16Number NumInputChannels()
Definition IccMpeCalc.h:429
void Apply(icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel)
Definition IccMpeCalc.h:432
icUInt16Number NumOutputChannels()
Definition IccMpeCalc.h:430
unsigned short icUInt16Number
icUInt16Number v1
Definition IccMpeCalc.h:243
struct SIccCalcOp::@1::@2 select
union SIccCalcOp::@1 data
CIccFloatVector * pScratch
Definition IccMpeCalc.h:276
CIccFloatVector * pStack
Definition IccMpeCalc.h:275
CIccApplyMpeCalculator * pApply
Definition IccMpeCalc.h:274

References CIccSubCalcApply::Apply(), SIccCalcOp::data, CIccApplyMpeCalculator::GetApply(), CIccSubCalcApply::NumInputChannels(), CIccSubCalcApply::NumOutputChannels(), SIccOpState::pApply, SIccOpState::pScratch, SIccOpState::pStack, SIccCalcOp::select, and SIccCalcOp::v1.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: