Skip to content

Commit 79e7b7b

Browse files
cozdasdoug-walker
andauthored
Adsk Contrib - Issues #1968 (mirrored) and #1992 (LUT-free builtins) (#2029)
* Adsk Contrib - Issues #1968 (mirrored builtins) and #1992 (LUT-free builtins Pt.1) For issue #1992 - "Make LUT-free implementations of certain built-in transforms" - Adding fixed-functions PQ_TO_LINEAR and LINEAR_TO_PQ. These will be used to handle following built-in transforms if the LUT support is turned off: -- CURVE - ST-2084_to_LINEAR -- CURVE - LINEAR_to_ST-2084 -- DISPLAY - CIE-XYZ-D65_to_REC.2100-PQ -- DISPLAY - CIE-XYZ-D65_to_ST2084-P3-D65 - Implemented CPU renderers for scalar, SSE2 (with fastPower) and SSE2 (with Intel SVML) intrinsics targets for the new fixed-function. - Implemented GPU shader generator for the new fixed-function - Remaining fixed-functions will be implemented in an upcoming PR. For issue #1968 - "Make display EOTFs in built-in transforms mirrored and unclamped to preserve sub-black and super-white" - Existing LUT-based HLG curve is now unclamped at both ends and mirrored around origin. - Both the existing LUT-based and the new LUT-free implementations of the PQ curve are now unclamped at both ends and mirrored around origin. Aux Changes - GetFixedFunctionCPURenderer() now takes a new bool parameter fastLogExpPow. - Added a stand-in OCIO_LUT_SUPPORT preprocessor macro in preparation for ocio-lite where the lut support can be turned off. - Added util functions to Config_tests.cpp to help creating configs with arbitrary version. - Added ability to test fixed-function cpu renderers with and without fastLogExpPow. - Added capability to specify custom extended ranges in the GPU unit tests. Default value is [-1.0,2.0] same as the previously hard-coded range. - Fixed a bug in the GPU unit tests where the computed domain values would overshoot. Signed-off-by: cuneyt.ozdas <[email protected]> * - Renderer_PQ_TO_LINEAR_SSE high precision implementation is now limited to MSVC 2019+ compiler as it has the built-in intel _mm_pow_ps() SVML implementation. - LUT-based PQ to Linear implementation now uses half-domain LUT to handle extended range. Linear to PQ direction was alredy using half-domain lut (probably due to normal input range being 0 to 100. - BT_2100 namespace is renamed to HLG - In BuiltinTransform_tests it's now possible (and necessary) to specify the error threshold for each built-in transform. This was needed as the hard-coded 1e-6 threshold was too tight for the PQ curve which uses nested power functions and thus numerical stability was depending on the implantation flavor. Signed-off-by: cuneyt.ozdas <[email protected]> * - Reversing the forward direction of the PQ curve, now the forward direction is linear -> PQ . Changed the enum names accordinly, updated the tests etc. - Adding a new Hybrid Log Gamma fixed function. Similar to the PQ curve, the forward direction is linear -> HLG. SIMD implementation is currently missing, can be done in the future. - minor fixes in the PQ cpu op - some adjustments to the CPU test values and thresholds. Signed-off-by: cuneyt.ozdas <[email protected]> * - Ah! gcc and clang being more picky about the unused variable bit me again. Signed-off-by: cuneyt.ozdas <[email protected]> * - Completed outstanding to-do items. - Code beautification. Signed-off-by: cuneyt.ozdas <[email protected]> * - Adding few missing pieces I noticed for PQ and HLG fixed functions - Since we changed the default direction of the PQ and HLG fixed functions, I moved the order of the functions in the source files so that forward becomes before inverse. - Adding the first cut of the FIXED_FUNCTION_LINEAR_TO_DOUBLE_LOG_AFFINE fixed function. This is still in WIP, needs some optimizations and tests implemented. Also to be able to handle the Apple Camera curve, it needs to be extended a bit. But currently it can handle the Canon CLog2 and CLog3 curves with all tests passing. Signed-off-by: cuneyt.ozdas <[email protected]> * - unbreak gcc and clang compilers Signed-off-by: cuneyt.ozdas <[email protected]> * - Adding GpuShaderText::floatXGreaterThanEqual() functions which are needed for precise break-point handling in non-continuous piecewise functions. - changes for double log gamma fixed function -- Fixed couple of bugs -- Added basic parameter validation -- implemented fwd and inv gpu shaders -- Fixed CLog2 and CLog3 double log gamma constants. -- implemented cpu and gpu shaders Signed-off-by: cuneyt.ozdas <[email protected]> * - HLG fixed-function is now parametrized and the previously hard-coded Rec.2100 HLG curve parameters are now passed to the fixed-function by the built-in transforms and by some of the test suites. Signed-off-by: cuneyt.ozdas <[email protected]> * - Adding a new parameter to the HLG fixed-function to control the point mirroring is applied. Below the mirror point the input values will be mirrored around that point and the output sign will be flipped. Although this does not guarantee by itself a monotonously increasing (thus invertible) and a continuous function, when the parameters are proper these properties will be achieved. - Both the Rec.2100 HLG curve and Apple camera curve are now implemented by the HLG fixed-function when the LUT-support is turned off. for now checking-in with LUT_SUPPORT turned off to run the CI tests on the implementation. I'll turn it on later. Signed-off-by: cuneyt.ozdas <[email protected]> * - Unlike msvc, gcc and clang could not auto-determine the template parameter for the base class. I'm making it explicit, hope that it'll unbreak the builds. - minor comment fix :) Signed-off-by: cuneyt.ozdas <[email protected]> * - gcc and clang are still failing. Removing the template for the HLG, hope this will un-confuse the compilers. Signed-off-by: cuneyt.ozdas <[email protected]> * - handling the unused variable warning/error when the LUT-support is turned off. Signed-off-by: cuneyt.ozdas <[email protected]> * - Fighting with more unused variable warning turned into error. At this stage I'm not sure that turning this warning on the compilers is a good idea or not. Almost all cases are simple unused variabled due to different cmake switches and will be happily optimized out by the compiler without any side-effect. I'm curious to see if that compiler flag helped anyone to catch a bug early on at all. Signed-off-by: cuneyt.ozdas <[email protected]> * silencing more unused vars. Signed-off-by: cuneyt.ozdas <[email protected]> * - now that all the compiler are happy when the lut-support is turned off, turning it back on. Signed-off-by: cuneyt.ozdas <[email protected]> * - minor fixes, mostly formatting. Signed-off-by: cuneyt.ozdas <[email protected]> * Refine enums Signed-off-by: Doug Walker <[email protected]> * Add opdata test Signed-off-by: Doug Walker <[email protected]> * Add hlg oetf builtin Signed-off-by: Doug Walker <[email protected]> * Update CTF version Signed-off-by: Doug Walker <[email protected]> * Add builtin version tests Signed-off-by: Doug Walker <[email protected]> * Fix typo Signed-off-by: Doug Walker <[email protected]> --------- Signed-off-by: cuneyt.ozdas <[email protected]> Signed-off-by: Doug Walker <[email protected]> Co-authored-by: Doug Walker <[email protected]>
1 parent 5c80c0b commit 79e7b7b

28 files changed

+2597
-259
lines changed

docs/api/python/frozen/pyopencolorio_fixedfunctionstyle.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636

3737
FIXED_FUNCTION_ACES_GAMUT_COMP_13 : ACES 1.3 Parametric Gamut Compression (expects ACEScg values)
3838

39+
FIXED_FUNCTION_LIN_TO_PQ : SMPTE ST-2084 OETF, scaled with 100 nits at 1.0 (neg vals mirrored)
40+
41+
FIXED_FUNCTION_LIN_TO_GAMMA_LOG : Parametrized gamma and log segments with mirroring
42+
43+
FIXED_FUNCTION_LIN_TO_DOUBLE_LOG : Two parameterized LogAffineTransforms with a middle linear segment
44+
3945
.. py:method:: name() -> str
4046
:property:
4147

@@ -104,6 +110,18 @@
104110
:value: <FixedFunctionStyle.FIXED_FUNCTION_XYZ_TO_xyY: 7>
105111

106112

113+
.. py:attribute:: FixedFunctionStyle.FIXED_FUNCTION_LIN_TO_PQ
114+
:module: PyOpenColorIO
115+
:value: <FixedFunctionStyle.FIXED_FUNCTION_PQ_TO_LIN: 13>
116+
117+
.. py:attribute:: FixedFunctionStyle.FIXED_FUNCTION_LIN_TO_GAMMA_LOG
118+
:module: PyOpenColorIO
119+
:value: <FixedFunctionStyle.FIXED_FUNCTION_LIN_TO_GAMMA_LOG: 14>
120+
121+
.. py:attribute:: FixedFunctionStyle.FIXED_FUNCTION_LIN_TO_DOUBLE_LOG
122+
:module: PyOpenColorIO
123+
:value: <FixedFunctionStyle.FIXED_FUNCTION_LIN_TO_DOUBLE_LOG: 15>
124+
107125
.. py:property:: FixedFunctionStyle.value
108126
:module: PyOpenColorIO
109127

include/OpenColorIO/OpenColorTypes.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,13 @@ enum FixedFunctionStyle
487487
FIXED_FUNCTION_ACES_GAMUTMAP_02, ///< ACES 0.2 Gamut clamping algorithm -- NOT IMPLEMENTED YET
488488
FIXED_FUNCTION_ACES_GAMUTMAP_07, ///< ACES 0.7 Gamut clamping algorithm -- NOT IMPLEMENTED YET
489489
FIXED_FUNCTION_ACES_GAMUT_COMP_13, ///< ACES 1.3 Parametric Gamut Compression (expects ACEScg values)
490+
FIXED_FUNCTION_LIN_TO_PQ, ///< SMPTE ST-2084 OETF, scaled with 100 nits at 1.0 (neg vals mirrored)
491+
FIXED_FUNCTION_LIN_TO_GAMMA_LOG, ///< Parametrized gamma and log segments with mirroring
492+
FIXED_FUNCTION_LIN_TO_DOUBLE_LOG, ///< Two parameterized LogAffineTransforms with a middle linear segment
490493
FIXED_FUNCTION_ACES_OUTPUT_TRANSFORM_20, ///< ACES 2.0 Display Rendering -- EXPERIMENTAL
491494
FIXED_FUNCTION_ACES_RGB_TO_JMH_20, ///< ACES 2.0 RGB to JMh -- EXPERIMENTAL
492495
FIXED_FUNCTION_ACES_TONESCALE_COMPRESS_20, ///< ACES 2.0 Tonescale and chroma compression -- EXPERIMENTAL
493-
FIXED_FUNCTION_ACES_GAMUT_COMPRESS_20, ///< ACES 2.0 Gamut compression -- EXPERIMENTAL
496+
FIXED_FUNCTION_ACES_GAMUT_COMPRESS_20 ///< ACES 2.0 Gamut compression -- EXPERIMENTAL
494497
};
495498

496499
/// Enumeration of the :cpp:class:`ExposureContrastTransform` transform algorithms.

src/OpenColorIO/Config.cpp

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5234,6 +5234,8 @@ void Config::Impl::checkVersionConsistency(ConstTransformRcPtr & transform) cons
52345234
if (m_majorVersion == 2 && m_minorVersion < 4
52355235
&& ( 0 == Platform::Strcasecmp(blt->getStyle(), "APPLE_LOG_to_ACES2065-1")
52365236
|| 0 == Platform::Strcasecmp(blt->getStyle(), "CURVE - APPLE_LOG_to_LINEAR")
5237+
|| 0 == Platform::Strcasecmp(blt->getStyle(), "CURVE - HLG-OETF")
5238+
|| 0 == Platform::Strcasecmp(blt->getStyle(), "CURVE - HLG-OETF-INVERSE")
52375239
|| 0 == Platform::Strcasecmp(blt->getStyle(), "DISPLAY - CIE-XYZ-D65_to_DCDM-D65")
52385240
|| 0 == Platform::Strcasecmp(blt->getStyle(), "DISPLAY - CIE-XYZ-D65_to_ST2084-DCDM-D65")
52395241
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - SDR-100nit-REC709_2.0")
@@ -5333,40 +5335,34 @@ void Config::Impl::checkVersionConsistency(ConstTransformRcPtr & transform) cons
53335335
}
53345336
else if (ConstFixedFunctionTransformRcPtr ff = DynamicPtrCast<const FixedFunctionTransform>(transform))
53355337
{
5338+
auto ffstyle = ff->getStyle();
53365339
if (m_majorVersion < 2)
53375340
{
53385341
throw Exception("Only config version 2 (or higher) can have "
53395342
"FixedFunctionTransform.");
53405343
}
53415344

5342-
if (m_majorVersion == 2 && m_minorVersion < 1 && ff->getStyle() == FIXED_FUNCTION_ACES_GAMUT_COMP_13)
5345+
if (m_majorVersion == 2 && m_minorVersion < 1 && ffstyle == FIXED_FUNCTION_ACES_GAMUT_COMP_13)
53435346
{
53445347
throw Exception("Only config version 2.1 (or higher) can have "
53455348
"FixedFunctionTransform style 'ACES_GAMUT_COMP_13'.");
53465349
}
53475350

5348-
if (m_majorVersion == 2 && m_minorVersion < 4 && ff->getStyle() == FIXED_FUNCTION_ACES_OUTPUT_TRANSFORM_20)
5351+
if (m_majorVersion == 2 && m_minorVersion < 4 )
53495352
{
5350-
throw Exception("Only config version 2.4 (or higher) can have "
5351-
"FixedFunctionTransform style 'ACES_OUTPUT_TRANSFORM_20'.");
5352-
}
5353-
5354-
if (m_majorVersion == 2 && m_minorVersion < 4 && ff->getStyle() == FIXED_FUNCTION_ACES_RGB_TO_JMH_20)
5355-
{
5356-
throw Exception("Only config version 2.4 (or higher) can have "
5357-
"FixedFunctionTransform style 'ACES_RGB_TO_JMH_20'.");
5358-
}
5359-
5360-
if (m_majorVersion == 2 && m_minorVersion < 4 && ff->getStyle() == FIXED_FUNCTION_ACES_TONESCALE_COMPRESS_20)
5361-
{
5362-
throw Exception("Only config version 2.4 (or higher) can have "
5363-
"FixedFunctionTransform style 'ACES_TONESCALE_COMPRESS_20'.");
5364-
}
5365-
5366-
if (m_majorVersion == 2 && m_minorVersion < 4 && ff->getStyle() == FIXED_FUNCTION_ACES_GAMUT_COMPRESS_20)
5367-
{
5368-
throw Exception("Only config version 2.4 (or higher) can have "
5369-
"FixedFunctionTransform style 'ACES_GAMUT_COMPRESS_20'.");
5353+
if( ffstyle == FIXED_FUNCTION_LIN_TO_PQ ||
5354+
ffstyle == FIXED_FUNCTION_LIN_TO_GAMMA_LOG ||
5355+
ffstyle == FIXED_FUNCTION_LIN_TO_DOUBLE_LOG ||
5356+
ffstyle == FIXED_FUNCTION_ACES_OUTPUT_TRANSFORM_20 ||
5357+
ffstyle == FIXED_FUNCTION_ACES_RGB_TO_JMH_20 ||
5358+
ffstyle == FIXED_FUNCTION_ACES_TONESCALE_COMPRESS_20 ||
5359+
ffstyle == FIXED_FUNCTION_ACES_GAMUT_COMPRESS_20 )
5360+
{
5361+
std::ostringstream ss;
5362+
ss << "Only config version 2.4 (or higher) can have FixedFunctionTransform style '"
5363+
<< FixedFunctionStyleToString(ffstyle) << "'.";
5364+
throw Exception(ss.str().c_str());
5365+
}
53705366
}
53715367
}
53725368
else if (DynamicPtrCast<const GradingPrimaryTransform>(transform))

src/OpenColorIO/GpuShaderUtils.cpp

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,85 @@ std::string GpuShaderText::float4GreaterThan(const std::string & a,
11551155
return kw.str();
11561156
}
11571157

1158+
std::string GpuShaderText::float3GreaterThanEqual(const std::string& a,
1159+
const std::string& b) const
1160+
{
1161+
std::ostringstream kw;
1162+
switch (m_lang)
1163+
{
1164+
case GPU_LANGUAGE_GLSL_1_2:
1165+
case GPU_LANGUAGE_GLSL_1_3:
1166+
case GPU_LANGUAGE_GLSL_4_0:
1167+
case GPU_LANGUAGE_GLSL_ES_1_0:
1168+
case GPU_LANGUAGE_GLSL_ES_3_0:
1169+
case GPU_LANGUAGE_CG:
1170+
{
1171+
kw << float3Keyword() << "(greaterThanEqual( " << a << ", " << b << "))";
1172+
break;
1173+
}
1174+
case LANGUAGE_OSL_1:
1175+
case GPU_LANGUAGE_MSL_2_0:
1176+
case GPU_LANGUAGE_HLSL_DX11:
1177+
{
1178+
kw << float3Keyword() << "("
1179+
<< "(" << a << "[0] >= " << b << "[0]) ? 1.0 : 0.0, "
1180+
<< "(" << a << "[1] >= " << b << "[1]) ? 1.0 : 0.0, "
1181+
<< "(" << a << "[2] >= " << b << "[2]) ? 1.0 : 0.0)";
1182+
break;
1183+
}
1184+
1185+
default:
1186+
{
1187+
throw Exception("Unknown GPU shader language.");
1188+
}
1189+
}
1190+
return kw.str();
1191+
}
1192+
1193+
std::string GpuShaderText::float4GreaterThanEqual(const std::string& a,
1194+
const std::string& b) const
1195+
{
1196+
std::ostringstream kw;
1197+
switch (m_lang)
1198+
{
1199+
case GPU_LANGUAGE_GLSL_1_2:
1200+
case GPU_LANGUAGE_GLSL_1_3:
1201+
case GPU_LANGUAGE_GLSL_4_0:
1202+
case GPU_LANGUAGE_GLSL_ES_1_0:
1203+
case GPU_LANGUAGE_GLSL_ES_3_0:
1204+
case GPU_LANGUAGE_CG:
1205+
{
1206+
kw << float4Keyword() << "(greaterThanEqual( " << a << ", " << b << "))";
1207+
break;
1208+
}
1209+
case GPU_LANGUAGE_MSL_2_0:
1210+
case GPU_LANGUAGE_HLSL_DX11:
1211+
{
1212+
kw << float4Keyword() << "("
1213+
<< "(" << a << "[0] >= " << b << "[0]) ? 1.0 : 0.0, "
1214+
<< "(" << a << "[1] >= " << b << "[1]) ? 1.0 : 0.0, "
1215+
<< "(" << a << "[2] >= " << b << "[2]) ? 1.0 : 0.0, "
1216+
<< "(" << a << "[3] >= " << b << "[3]) ? 1.0 : 0.0)";
1217+
break;
1218+
}
1219+
case LANGUAGE_OSL_1:
1220+
{
1221+
kw << float4Keyword() << "("
1222+
<< "(" << a << ".rgb.r >= " << b << ".x) ? 1.0 : 0.0, "
1223+
<< "(" << a << ".rgb.g >= " << b << ".y) ? 1.0 : 0.0, "
1224+
<< "(" << a << ".rgb.b >= " << b << ".z) ? 1.0 : 0.0, "
1225+
<< "(" << a << ".a >= " << b << ".w) ? 1.0 : 0.0)";
1226+
break;
1227+
}
1228+
1229+
default:
1230+
{
1231+
throw Exception("Unknown GPU shader language.");
1232+
}
1233+
}
1234+
return kw.str();
1235+
}
1236+
11581237
std::string GpuShaderText::atan2(const std::string & y,
11591238
const std::string & x) const
11601239
{

src/OpenColorIO/GpuShaderUtils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,11 @@ class GpuShaderText
219219
std::string float3GreaterThan(const std::string& a, const std::string& b) const;
220220
std::string float4GreaterThan(const std::string& a, const std::string& b) const;
221221

222+
// Get the string for creating a three or four-elements 'greater than or equal' comparison
223+
// Each element i in the resulting vector is 1 if a>=b, or 0 otherwise.
224+
std::string float3GreaterThanEqual(const std::string& a, const std::string& b) const;
225+
std::string float4GreaterThanEqual(const std::string& a, const std::string& b) const;
226+
222227
// Get the string for taking the four-quadrant arctangent
223228
// (similar to atan(y/x) but takes into account the signs of the arguments).
224229
std::string atan2(const std::string& y, const std::string& x) const;

src/OpenColorIO/ParseUtils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ const char * FixedFunctionStyleToString(FixedFunctionStyle style)
368368
case FIXED_FUNCTION_XYZ_TO_xyY: return "XYZ_TO_xyY";
369369
case FIXED_FUNCTION_XYZ_TO_uvY: return "XYZ_TO_uvY";
370370
case FIXED_FUNCTION_XYZ_TO_LUV: return "XYZ_TO_LUV";
371+
case FIXED_FUNCTION_LIN_TO_PQ: return "Lin_TO_PQ";
372+
case FIXED_FUNCTION_LIN_TO_GAMMA_LOG: return "Lin_TO_GammaLog";
373+
case FIXED_FUNCTION_LIN_TO_DOUBLE_LOG: return "Lin_TO_DoubleLog";
371374
case FIXED_FUNCTION_ACES_GAMUTMAP_02:
372375
case FIXED_FUNCTION_ACES_GAMUTMAP_07:
373376
throw Exception("Unimplemented fixed function types: "
@@ -399,6 +402,9 @@ FixedFunctionStyle FixedFunctionStyleFromString(const char * style)
399402
else if(str == "xyz_to_xyy") return FIXED_FUNCTION_XYZ_TO_xyY;
400403
else if(str == "xyz_to_uvy") return FIXED_FUNCTION_XYZ_TO_uvY;
401404
else if(str == "xyz_to_luv") return FIXED_FUNCTION_XYZ_TO_LUV;
405+
else if(str == "lin_to_pq") return FIXED_FUNCTION_LIN_TO_PQ;
406+
else if(str == "lin_to_gammalog") return FIXED_FUNCTION_LIN_TO_GAMMA_LOG;
407+
else if(str == "lin_to_doublelog") return FIXED_FUNCTION_LIN_TO_DOUBLE_LOG;
402408

403409
// Default style is meaningless.
404410
std::stringstream ss;

src/OpenColorIO/fileformats/ctf/CTFTransform.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,25 @@ CTFVersion GetOpMinimumVersion(const ConstOpDataRcPtr & op)
250250

251251
auto ff = OCIO_DYNAMIC_POINTER_CAST<const FixedFunctionOpData>(op);
252252

253-
if (ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMP_13_FWD
254-
|| ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMP_13_INV)
253+
if ( ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMP_13_FWD
254+
|| ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMP_13_INV )
255255
{
256256
minVersion = CTF_PROCESS_LIST_VERSION_2_1;
257257
}
258-
else if (ff->getStyle() == FixedFunctionOpData::ACES_OUTPUT_TRANSFORM_20_FWD
258+
else if ( ff->getStyle() == FixedFunctionOpData::LIN_TO_PQ
259+
|| ff->getStyle() == FixedFunctionOpData::PQ_TO_LIN
260+
|| ff->getStyle() == FixedFunctionOpData::LIN_TO_GAMMA_LOG
261+
|| ff->getStyle() == FixedFunctionOpData::GAMMA_LOG_TO_LIN
262+
|| ff->getStyle() == FixedFunctionOpData::LIN_TO_DOUBLE_LOG
263+
|| ff->getStyle() == FixedFunctionOpData::DOUBLE_LOG_TO_LIN
264+
|| ff->getStyle() == FixedFunctionOpData::ACES_OUTPUT_TRANSFORM_20_FWD
259265
|| ff->getStyle() == FixedFunctionOpData::ACES_OUTPUT_TRANSFORM_20_INV
260266
|| ff->getStyle() == FixedFunctionOpData::ACES_RGB_TO_JMh_20
261267
|| ff->getStyle() == FixedFunctionOpData::ACES_JMh_TO_RGB_20
262268
|| ff->getStyle() == FixedFunctionOpData::ACES_TONESCALE_COMPRESS_20_FWD
263269
|| ff->getStyle() == FixedFunctionOpData::ACES_TONESCALE_COMPRESS_20_INV
264270
|| ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMPRESS_20_FWD
265-
|| ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMPRESS_20_INV)
271+
|| ff->getStyle() == FixedFunctionOpData::ACES_GAMUT_COMPRESS_20_INV )
266272
{
267273
minVersion = CTF_PROCESS_LIST_VERSION_2_4;
268274
}

src/OpenColorIO/fileformats/ctf/CTFTransform.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ static const CTFVersion CTF_PROCESS_LIST_VERSION_2_0 = CTFVersion(2, 0);
115115
// Version 2.1 2021-08 adds the 'FIXED_FUNCTION_ACES_GAMUT_COMP_13' style to FixedFunctionOp.
116116
static const CTFVersion CTF_PROCESS_LIST_VERSION_2_1 = CTFVersion(2, 1);
117117

118-
// Version 2.4 2024-08 adds the ACES 2 related FixedFunctionOps.
118+
// Version 2.4 2024-08 adds the ACES 2 related FixedFunctionOps and
119+
// the LIN_TO_PQ, LIN_TO_GAMMA_LOG, AND LIN_TO_DOUBLE_LOG FixedFunctionOps.
119120
static const CTFVersion CTF_PROCESS_LIST_VERSION_2_4 = CTFVersion(2, 4);
120121

121122
// Add new version before this line

src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ std::string FixedFunctionOp::getCacheID() const
119119
return cacheIDStream.str();
120120
}
121121

122-
ConstOpCPURcPtr FixedFunctionOp::getCPUOp(bool /*fastLogExpPow*/) const
122+
ConstOpCPURcPtr FixedFunctionOp::getCPUOp(bool fastLogExpPow) const
123123
{
124124
ConstFixedFunctionOpDataRcPtr data = fnData();
125-
return GetFixedFunctionCPURenderer(data);
125+
return GetFixedFunctionCPURenderer(data, fastLogExpPow);
126126
}
127127

128128
void FixedFunctionOp::extractGpuShaderInfo(GpuShaderCreatorRcPtr & shaderCreator) const

0 commit comments

Comments
 (0)