Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adsk Contrib - Issues #1968 (mirrored) and #1992 (LUT-free builtins) #2029

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2ce223f
Adsk Contrib - Issues #1968 (mirrored builtins) and #1992 (LUT-free b…
cozdas Aug 27, 2024
bbcb91b
- Renderer_PQ_TO_LINEAR_SSE high precision implementation is now limi…
cozdas Sep 4, 2024
c8136db
- Reversing the forward direction of the PQ curve, now the forward di…
cozdas Sep 6, 2024
044c9c2
- Ah! gcc and clang being more picky about the unused variable bit me…
cozdas Sep 6, 2024
b2e45f3
- Completed outstanding to-do items.
cozdas Sep 9, 2024
9736733
- Adding few missing pieces I noticed for PQ and HLG fixed functions
cozdas Sep 12, 2024
9dc9d9a
- unbreak gcc and clang compilers
cozdas Sep 12, 2024
067187c
- Adding GpuShaderText::floatXGreaterThanEqual() functions which are …
cozdas Sep 17, 2024
caa82ef
- HLG fixed-function is now parametrized and the previously hard-code…
cozdas Sep 18, 2024
5e3528d
- Adding a new parameter to the HLG fixed-function to control the poi…
cozdas Sep 19, 2024
fb7923b
- Unlike msvc, gcc and clang could not auto-determine the template pa…
cozdas Sep 19, 2024
1bc48e2
- gcc and clang are still failing. Removing the template for the HLG,…
cozdas Sep 19, 2024
3653239
- handling the unused variable warning/error when the LUT-support is …
cozdas Sep 19, 2024
ecb79df
- Fighting with more unused variable warning turned into error. At th…
cozdas Sep 19, 2024
92e85e7
silencing more unused vars.
cozdas Sep 19, 2024
e2e3345
- now that all the compiler are happy when the lut-support is turned …
cozdas Sep 19, 2024
183ddc7
- minor fixes, mostly formatting.
cozdas Sep 19, 2024
e431ebd
Refine enums
doug-walker Sep 21, 2024
32cd570
Add opdata test
doug-walker Sep 21, 2024
7ddcaf0
Add hlg oetf builtin
doug-walker Sep 21, 2024
83cc827
Merge branch 'main' into ozdasc/main/BuiltIns_LutFreePt1_Mirrored
doug-walker Sep 26, 2024
7519878
Update CTF version
doug-walker Sep 26, 2024
cea0a23
Add builtin version tests
doug-walker Sep 26, 2024
b625192
Merge branch 'main' into ozdasc/main/BuiltIns_LutFreePt1_Mirrored
doug-walker Sep 26, 2024
da5313c
Fix typo
doug-walker Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/api/python/frozen/pyopencolorio_fixedfunctionstyle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

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

FIXED_FUNCTION_PQ_TO_LINEAR : SMPTE ST 2084:2014 EOTF Linearization Equation

.. py:method:: name() -> str
:property:

Expand Down Expand Up @@ -104,6 +106,11 @@
:value: <FixedFunctionStyle.FIXED_FUNCTION_XYZ_TO_xyY: 7>


.. py:attribute:: FixedFunctionStyle.FIXED_FUNCTION_PQ_TO_LINEAR
:module: PyOpenColorIO
:value: <FixedFunctionStyle.FIXED_FUNCTION_PQ_TO_LINEAR: 13>


.. py:property:: FixedFunctionStyle.value
:module: PyOpenColorIO

3 changes: 2 additions & 1 deletion include/OpenColorIO/OpenColorTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ enum FixedFunctionStyle
FIXED_FUNCTION_XYZ_TO_LUV, ///< CIE XYZ to 1976 CIELUV colour space (D65 white)
FIXED_FUNCTION_ACES_GAMUTMAP_02, ///< ACES 0.2 Gamut clamping algorithm -- NOT IMPLEMENTED YET
FIXED_FUNCTION_ACES_GAMUTMAP_07, ///< ACES 0.7 Gamut clamping algorithm -- NOT IMPLEMENTED YET
FIXED_FUNCTION_ACES_GAMUT_COMP_13 ///< ACES 1.3 Parametric Gamut Compression (expects ACEScg values)
FIXED_FUNCTION_ACES_GAMUT_COMP_13, ///< ACES 1.3 Parametric Gamut Compression (expects ACEScg values)
FIXED_FUNCTION_PQ_TO_LINEAR, ///< SMPTE ST-2084 EOTF linearization, scaled with 100 nits at 1.0, and with negative values mirrored
};

/// Enumeration of the :cpp:class:`ExposureContrastTransform` transform algorithms.
Expand Down
12 changes: 11 additions & 1 deletion src/OpenColorIO/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5300,17 +5300,27 @@ void Config::Impl::checkVersionConsistency(ConstTransformRcPtr & transform) cons
}
else if (ConstFixedFunctionTransformRcPtr ff = DynamicPtrCast<const FixedFunctionTransform>(transform))
{
auto ffstyle = ff->getStyle();
if (m_majorVersion < 2)
{
throw Exception("Only config version 2 (or higher) can have "
"FixedFunctionTransform.");
}

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

if (m_majorVersion == 2 && m_minorVersion < 4 )
{
if(ffstyle == FIXED_FUNCTION_PQ_TO_LINEAR)
{
throw Exception("Only config version 2.4 (or higher) can have "
"FixedFunctionTransform style 'PQ_TO_LINEAR'.");
}
}
}
else if (DynamicPtrCast<const GradingPrimaryTransform>(transform))
{
Expand Down
2 changes: 2 additions & 0 deletions src/OpenColorIO/ParseUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ const char * FixedFunctionStyleToString(FixedFunctionStyle style)
case FIXED_FUNCTION_XYZ_TO_xyY: return "XYZ_TO_xyY";
case FIXED_FUNCTION_XYZ_TO_uvY: return "XYZ_TO_uvY";
case FIXED_FUNCTION_XYZ_TO_LUV: return "XYZ_TO_LUV";
case FIXED_FUNCTION_PQ_TO_LINEAR: return "PQ_TO_LINEAR";
case FIXED_FUNCTION_ACES_GAMUTMAP_02:
case FIXED_FUNCTION_ACES_GAMUTMAP_07:
throw Exception("Unimplemented fixed function types: "
Expand Down Expand Up @@ -391,6 +392,7 @@ FixedFunctionStyle FixedFunctionStyleFromString(const char * style)
else if(str == "xyz_to_xyy") return FIXED_FUNCTION_XYZ_TO_xyY;
else if(str == "xyz_to_uvy") return FIXED_FUNCTION_XYZ_TO_uvY;
else if(str == "xyz_to_luv") return FIXED_FUNCTION_XYZ_TO_LUV;
else if(str == "pq_to_linear") return FIXED_FUNCTION_PQ_TO_LINEAR;

// Default style is meaningless.
std::stringstream ss;
Expand Down
4 changes: 2 additions & 2 deletions src/OpenColorIO/ops/fixedfunction/FixedFunctionOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ std::string FixedFunctionOp::getCacheID() const
return cacheIDStream.str();
}

ConstOpCPURcPtr FixedFunctionOp::getCPUOp(bool /*fastLogExpPow*/) const
ConstOpCPURcPtr FixedFunctionOp::getCPUOp(bool fastLogExpPow) const
{
ConstFixedFunctionOpDataRcPtr data = fnData();
return GetFixedFunctionCPURenderer(data);
return GetFixedFunctionCPURenderer(data, fastLogExpPow);
}

void FixedFunctionOp::extractGpuShaderInfo(GpuShaderCreatorRcPtr & shaderCreator) const
Expand Down
Loading
Loading