MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / update

Method update

src/OpenColorIO/ops/cdl/CDLOpCPU.cpp:62–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void RenderParams::update(ConstCDLOpDataRcPtr & cdl)
63{
64 double slope[3], offset[3], power[3];
65 cdl->getSlopeParams().getRGB(slope);
66 cdl->getOffsetParams().getRGB(offset);
67 cdl->getPowerParams().getRGB(power);
68
69 const float saturation = (float)cdl->getSaturation();
70 const CDLOpData::Style style = cdl->getStyle();
71
72 m_isReverse = (style == CDLOpData::CDL_V1_2_REV) || (style == CDLOpData::CDL_NO_CLAMP_REV);
73
74 m_isNoClamp = (style == CDLOpData::CDL_NO_CLAMP_FWD) || (style == CDLOpData::CDL_NO_CLAMP_REV);
75
76 if (isReverse())
77 {
78 // Reverse render parameters
79 setSlope(Reciprocal((float)slope[0]),
80 Reciprocal((float)slope[1]),
81 Reciprocal((float)slope[2]));
82
83 setOffset((float)-offset[0], (float)-offset[1], (float)-offset[2]);
84
85 setPower(Reciprocal((float)power[0]),
86 Reciprocal((float)power[1]),
87 Reciprocal((float)power[2]));
88
89 setSaturation(Reciprocal(saturation));
90 }
91 else
92 {
93 // Forward render parameters
94 setSlope((float)slope[0], (float)slope[1], (float)slope[2]);
95 setOffset((float)offset[0], (float)offset[1], (float)offset[2]);
96 setPower((float)power[0], (float)power[1], (float)power[2]);
97 setSaturation(saturation);
98 }
99}
100
101
102#if OCIO_USE_SSE2

Callers 9

setValueMethod · 0.45
setStyleMethod · 0.45
setDirectionMethod · 0.45
GetCDLGPUShaderProgramFunction · 0.45
CDLOpCPUMethod · 0.45
OCIO_ADD_TESTFunction · 0.45
shuffle.min.jsFile · 0.45

Calls 4

ReciprocalFunction · 0.85
getRGBMethod · 0.45
getSaturationMethod · 0.45
getStyleMethod · 0.45

Tested by 1

OCIO_ADD_TESTFunction · 0.36