* Update RTD build OS
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Attempt to fix dependencies-latest fail
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Attempt to fix dependencies-latest fail - take 2
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Allow Linux 2023 to use the latest container
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Reorder link libraries
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Fetch matching prebuilt OpenColorIO for OIIO app builds in CI
The aswf/ci-ocio container images intentionally omit OpenColorIO since
the whole point of the image is to build it from source. But the
container's prebuilt OpenImageIO is dynamically linked against a
specific OpenColorIO release that isn't present, causing link
failures for ociolutimage/ocioconvert/ociodisplay whenever
OCIO_USE_OIIO_FOR_APPS=ON. Fetch that matching release from the ASWF
Conan remote and stage it on the linker path before configuring, so
apps link against both the from-source build (used directly) and the
container's expected release (used transitively via OpenImageIO).
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Revert "Reorder link libraries"
This reverts commit fa79c589e0fbb5bb380a5f5406612e48849d9f6a.
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Fail configure when OCIO_USE_OIIO_FOR_APPS is ON but OIIO is missing
Previously, requesting OCIO_USE_OIIO_FOR_APPS=ON while OpenImageIO
could not be found silently fell back to OpenEXR (or skipped building
ociolutimage/ocioconvert/ociodisplay entirely), with only a WARNING.
This let CI silently stop exercising the OIIO code path in those apps
without failing, masking the fact that OIIO wasn't actually being
tested. Turn this into a hard configure-time error instead, so a
missing OpenImageIO is caught immediately when it was explicitly
requested.
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Fix OIIO build on macOS
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Try to identify source of crash in OpOptimizers test
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Print SKIPPED rather than PASSED for new CPU test
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Ensure the new test runs even if the existing test crashes
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Turn off AVX512 support for EPYC 9V45
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
---------
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Add to PathUtils
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Python test switch to ExceptionMissingFile
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Updated tests to use ExceptionMissingFile instead
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Revert PathUtil related changes.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Remove PathUtils changes
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Switch exception raised for filepath not provided in CreateFromFile.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Remove TODO
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Add CVE to security (#2311)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Adsk Contrib - Fix 2023.3 Linux container break (#2315)
* Fix 2023.3 Linux container break
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Adjust to keep the name constant to use the existing GitHub branch rules
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
---------
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Add DirectX 12 GPU backend for automated unit testing on Windows (#2271)
* Add DirectX 12 GPU backend for automated unit testing on Windows
Introduce a DirectX 12 / HLSL rendering backend alongside the existing OpenGL / GLSL and Metal / MSL backends, enabling the GPU unit test suite to run natively on Windows without requiring an OpenGL context.
Key changes:
GraphicalApp abstract interface (graphicalapp.h/cpp)
Backend-agnostic base class extracted from OglApp. OglApp and MetalApp now inherit from it.
DxApp (dxapp.h/cpp) -- DirectX 12 backend
Off-screen RGBA32F render target, full-screen triangle via SV_VertexID, staging readback, SM 6.0 DXC shader compilation.
HLSLBuilder (hlsl.h/cpp) -- HLSL shader generation
Translates GpuShaderDesc into HLSL pixel shaders with 1D and 3D LUT texture uploads in RGBA32F format.
CMake integration
OCIO_DIRECTX_ENABLED option, FetchContent for DirectX-Headers, auto-copy of DXC runtime DLLs to the test output directory.
Test tolerance adjustments
Minor epsilon increases for 4 tests due to DX12/SM6.0 FMA and pow() precision differences.
All 263 GPU tests pass on the DirectX 12 backend.
Build and run:
# Configure (OCIO_DIRECTX_ENABLED defaults to ON on Windows)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# Build the GPU test binary
cmake --build build --target test_gpu_exec --config Release
# Run GPU tests with the DX12 backend
ctest --test-dir build -C Release -R test_dx
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Fix post-rebase issues found in code review
- HeadlessOglApp::printGraphicsInfo() was calling pure virtual base (crash on headless EGL)
- graphicalapp.cpp included oglapp.h unconditionally; guard under OCIO_GL_ENABLED
- tests/gpu/CMakeLists.txt early-return guard excluded Vulkan-only builds
- Add missing test_vulkan ctest entry
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Minor additional comments, formatting and fixes.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Speed up DX12 GPU test backend (~19%)
The DX12 test suite was noticeably slower than the OpenGL and Vulkan backends. Profiling the run showed the gap was almost entirely in DXC shader
compilation, not in Present, fence waits, or DxcCreateInstance as initially suspected.
Three low-risk changes:
- Cache IDxcUtils and IDxcCompiler3 as DxApp members instead of recreating them on every setShader() call. The COM instances are thread-safe and
perfectly reusable; recreating them per test added no value.
- Compile the full-screen-triangle vertex shader exactly once and reuse the bytecode across all tests. The VSMain HLSL is a hard-coded
SV_VertexID-driven triangle with no test-specific state — the bytecode is identical every time. Extracted into a new ensureVertexShaderCompiled()
helper. This alone eliminated the biggest redundancy (263 duplicate VS compiles).
- Present(1, 0) → Present(0, 0). VSync is meaningless for an off-screen test harness that reads back from a float render target. Locally the win shows
up mostly in waitForPreviousFrame, which was being throttled by the swap-chain pipeline even on an invisible window.
All 263/263 tests still pass; no tolerance changes, no DXIL codegen changes (except for a UTF8 fix), no precision risk.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Several small fixes tidying up the recently-added GPU test infrastructure.
- Fix unused-variable warnings (fatal on macOS with warnings-as-errors): guard useDxRenderer and useVulkanRenderer declarations with the same ifdefs as their usage sites. useMetalRenderer
stays unconditional because it's referenced on all platforms.
- Propagate the MSVC+shared-libs PATH workaround to test_vulkan so it can find OpenColorIO_*.dll at runtime, matching what's already done for test_dx.
- Upgrade the dxcompiler.dll detection message from STATUS to WARNING and rewrite it to name OCIO_DIRECTX_ENABLED and offer concrete recovery paths. The previous STATUS message was easy
to miss, leaving users with a silent degradation until test_dx failed at runtime.
- Rename the OpenGL ctest from test_gpu to test_opengl now that sibling backend-specific tests (test_dx, test_vulkan, test_metal) exist. The test_gpu_exec binary keeps its name since it's
backend-agnostic and selects via CLI flags.
- Declare OCIO_VULKAN_ENABLED as a first-class CMake option with mark_as_advanced, matching the existing OCIO_DIRECTX_ENABLED. It was previously used in conditionals without ever being
declared, so it never appeared as a toggle in ccmake/cmake-gui.
- Document both OCIO_DIRECTX_ENABLED and OCIO_VULKAN_ENABLED in docs/quick_start/installation.rst, noting that Vulkan requires an external SDK.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Integrate DirectX-Headers with OCIO's external-package pattern
Previously InstallDirectXHeaders.cmake was included unconditionally from oglapphelpers/CMakeLists.txt, so DirectX-Headers was always fetched from GitHub regardless of whether the user had
a local copy installed. There was no way to use a system install, a vendored copy, or an air-gapped build, and the dep didn't respect OCIO_INSTALL_EXT_PACKAGES. DirectX-Headers is now a
first-class OCIO dependency, handled the same way as Imath, ZLIB, yaml-cpp, etc.: try find_package first, fall back to FetchContent only if not found and OCIO_INSTALL_EXT_PACKAGES allows
it.
Changes:
- New share/cmake/modules/FindDirectX-Headers.cmake, modeled on FindImath.cmake.
- InstallDirectXHeaders.cmake → InstallDirectX-Headers.cmake (the hyphen matches OCIO's Install convention).
- oglapphelpers/CMakeLists.txt now calls ocio_handle_dependency(DirectX-Headers ...) with MIN_VERSION 1.606.0 (Windows SDK 22H2 era — old enough to cover most installed copies) and
RECOMMENDED_VERSION 1.619.1 (the version OCIO pins and validates).
For users: a local DirectX-Headers install can now be supplied via any of the standard CMake mechanisms — -DDirectX-Headers_DIR, -DDirectX-Headers_ROOT, -DDirectX-Headers_INCLUDE_DIR, or
globally with -DOCIO_INSTALL_EXT_PACKAGES=NONE to forbid any network fetch.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Improve dxcompiler.dll diagnostics and allow overriding its path
Addresses test crashes seen on stuck Windows 10 hosts caused by an old dxcompiler.dll shipped in that host's Windows SDK Redist.
- Print the version of the found dxcompiler.dll at configure time so crash reports identify the exact DXC build without follow-up diagnostics.
- Emit a standing hint pointing at the DirectX Shader Compiler releases page, which is the documented workaround.
- New -DOCIO_DXCOMPILER_DLL=<path> overrides the Windows SDK Redist search, letting users supply a newer DLL pre-build instead of copying it by hand after.
- Extracted the DXC-runtime logic into share/cmake/utils/LocateDXCompilerRuntime.cmake so tests/gpu/CMakeLists.txt stays focused on the test target.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Minor comment tweaks in LocateDXCompilerRuntime.cmake.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Use OCIO_DirectX-Headers_RECOMMENDED_VERSION in InstallDirectX-Headers.cmake
ocio_install_dependency already propagates the RECOMMENDED_VERSION from the
ocio_handle_dependency call site. Consume it instead of hardcoding the
version a second time. Matches the pattern in Installyaml-cpp.cmake and
Installpystring.cmake.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Address local cleanup notes from PR #2271 Claude review.
* Name CbvSrvHeapSize and throw in setShader if a shader needs more SRV slots than the heap holds.
* Guard ~DxApp() so the GPU wait/CloseHandle are skipped when sync objects were never created (constructor partial-init).
* Comment the 16-byte float4 stride used when packing UNIFORM_VECTOR_FLOAT/INT arrays into the HLSL constant buffer.
* Only record m_windowClassName when RegisterClassExA actually succeeds, so cleanup won't unregister a class owned by another DxApp.
* Drop the redundant trailing else in GPUUnitTest.cpp's shadingLanguage selector (initializer already covers it).
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
---------
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Mei Chu <meimchu@gmail.com>
---------
Signed-off-by: Mei Chu <meimchu@gmail.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Éric Renaud-Houde <eric.renaud.houde@gmail.com>
* Add DirectX 12 GPU backend for automated unit testing on Windows
Introduce a DirectX 12 / HLSL rendering backend alongside the existing OpenGL / GLSL and Metal / MSL backends, enabling the GPU unit test suite to run natively on Windows without requiring an OpenGL context.
Key changes:
GraphicalApp abstract interface (graphicalapp.h/cpp)
Backend-agnostic base class extracted from OglApp. OglApp and MetalApp now inherit from it.
DxApp (dxapp.h/cpp) -- DirectX 12 backend
Off-screen RGBA32F render target, full-screen triangle via SV_VertexID, staging readback, SM 6.0 DXC shader compilation.
HLSLBuilder (hlsl.h/cpp) -- HLSL shader generation
Translates GpuShaderDesc into HLSL pixel shaders with 1D and 3D LUT texture uploads in RGBA32F format.
CMake integration
OCIO_DIRECTX_ENABLED option, FetchContent for DirectX-Headers, auto-copy of DXC runtime DLLs to the test output directory.
Test tolerance adjustments
Minor epsilon increases for 4 tests due to DX12/SM6.0 FMA and pow() precision differences.
All 263 GPU tests pass on the DirectX 12 backend.
Build and run:
# Configure (OCIO_DIRECTX_ENABLED defaults to ON on Windows)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# Build the GPU test binary
cmake --build build --target test_gpu_exec --config Release
# Run GPU tests with the DX12 backend
ctest --test-dir build -C Release -R test_dx
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Fix post-rebase issues found in code review
- HeadlessOglApp::printGraphicsInfo() was calling pure virtual base (crash on headless EGL)
- graphicalapp.cpp included oglapp.h unconditionally; guard under OCIO_GL_ENABLED
- tests/gpu/CMakeLists.txt early-return guard excluded Vulkan-only builds
- Add missing test_vulkan ctest entry
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Minor additional comments, formatting and fixes.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Speed up DX12 GPU test backend (~19%)
The DX12 test suite was noticeably slower than the OpenGL and Vulkan backends. Profiling the run showed the gap was almost entirely in DXC shader
compilation, not in Present, fence waits, or DxcCreateInstance as initially suspected.
Three low-risk changes:
- Cache IDxcUtils and IDxcCompiler3 as DxApp members instead of recreating them on every setShader() call. The COM instances are thread-safe and
perfectly reusable; recreating them per test added no value.
- Compile the full-screen-triangle vertex shader exactly once and reuse the bytecode across all tests. The VSMain HLSL is a hard-coded
SV_VertexID-driven triangle with no test-specific state — the bytecode is identical every time. Extracted into a new ensureVertexShaderCompiled()
helper. This alone eliminated the biggest redundancy (263 duplicate VS compiles).
- Present(1, 0) → Present(0, 0). VSync is meaningless for an off-screen test harness that reads back from a float render target. Locally the win shows
up mostly in waitForPreviousFrame, which was being throttled by the swap-chain pipeline even on an invisible window.
All 263/263 tests still pass; no tolerance changes, no DXIL codegen changes (except for a UTF8 fix), no precision risk.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Several small fixes tidying up the recently-added GPU test infrastructure.
- Fix unused-variable warnings (fatal on macOS with warnings-as-errors): guard useDxRenderer and useVulkanRenderer declarations with the same ifdefs as their usage sites. useMetalRenderer
stays unconditional because it's referenced on all platforms.
- Propagate the MSVC+shared-libs PATH workaround to test_vulkan so it can find OpenColorIO_*.dll at runtime, matching what's already done for test_dx.
- Upgrade the dxcompiler.dll detection message from STATUS to WARNING and rewrite it to name OCIO_DIRECTX_ENABLED and offer concrete recovery paths. The previous STATUS message was easy
to miss, leaving users with a silent degradation until test_dx failed at runtime.
- Rename the OpenGL ctest from test_gpu to test_opengl now that sibling backend-specific tests (test_dx, test_vulkan, test_metal) exist. The test_gpu_exec binary keeps its name since it's
backend-agnostic and selects via CLI flags.
- Declare OCIO_VULKAN_ENABLED as a first-class CMake option with mark_as_advanced, matching the existing OCIO_DIRECTX_ENABLED. It was previously used in conditionals without ever being
declared, so it never appeared as a toggle in ccmake/cmake-gui.
- Document both OCIO_DIRECTX_ENABLED and OCIO_VULKAN_ENABLED in docs/quick_start/installation.rst, noting that Vulkan requires an external SDK.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Integrate DirectX-Headers with OCIO's external-package pattern
Previously InstallDirectXHeaders.cmake was included unconditionally from oglapphelpers/CMakeLists.txt, so DirectX-Headers was always fetched from GitHub regardless of whether the user had
a local copy installed. There was no way to use a system install, a vendored copy, or an air-gapped build, and the dep didn't respect OCIO_INSTALL_EXT_PACKAGES. DirectX-Headers is now a
first-class OCIO dependency, handled the same way as Imath, ZLIB, yaml-cpp, etc.: try find_package first, fall back to FetchContent only if not found and OCIO_INSTALL_EXT_PACKAGES allows
it.
Changes:
- New share/cmake/modules/FindDirectX-Headers.cmake, modeled on FindImath.cmake.
- InstallDirectXHeaders.cmake → InstallDirectX-Headers.cmake (the hyphen matches OCIO's Install convention).
- oglapphelpers/CMakeLists.txt now calls ocio_handle_dependency(DirectX-Headers ...) with MIN_VERSION 1.606.0 (Windows SDK 22H2 era — old enough to cover most installed copies) and
RECOMMENDED_VERSION 1.619.1 (the version OCIO pins and validates).
For users: a local DirectX-Headers install can now be supplied via any of the standard CMake mechanisms — -DDirectX-Headers_DIR, -DDirectX-Headers_ROOT, -DDirectX-Headers_INCLUDE_DIR, or
globally with -DOCIO_INSTALL_EXT_PACKAGES=NONE to forbid any network fetch.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Improve dxcompiler.dll diagnostics and allow overriding its path
Addresses test crashes seen on stuck Windows 10 hosts caused by an old dxcompiler.dll shipped in that host's Windows SDK Redist.
- Print the version of the found dxcompiler.dll at configure time so crash reports identify the exact DXC build without follow-up diagnostics.
- Emit a standing hint pointing at the DirectX Shader Compiler releases page, which is the documented workaround.
- New -DOCIO_DXCOMPILER_DLL=<path> overrides the Windows SDK Redist search, letting users supply a newer DLL pre-build instead of copying it by hand after.
- Extracted the DXC-runtime logic into share/cmake/utils/LocateDXCompilerRuntime.cmake so tests/gpu/CMakeLists.txt stays focused on the test target.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Minor comment tweaks in LocateDXCompilerRuntime.cmake.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Use OCIO_DirectX-Headers_RECOMMENDED_VERSION in InstallDirectX-Headers.cmake
ocio_install_dependency already propagates the RECOMMENDED_VERSION from the
ocio_handle_dependency call site. Consume it instead of hardcoding the
version a second time. Matches the pattern in Installyaml-cpp.cmake and
Installpystring.cmake.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Address local cleanup notes from PR #2271 Claude review.
* Name CbvSrvHeapSize and throw in setShader if a shader needs more SRV slots than the heap holds.
* Guard ~DxApp() so the GPU wait/CloseHandle are skipped when sync objects were never created (constructor partial-init).
* Comment the 16-byte float4 stride used when packing UNIFORM_VECTOR_FLOAT/INT arrays into the HLSL constant buffer.
* Only record m_windowClassName when RegisterClassExA actually succeeds, so cleanup won't unregister a class owned by another DxApp.
* Drop the redundant trailing else in GPUUnitTest.cpp's shadingLanguage selector (initializer already covers it).
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
---------
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* - Adding a CMake utility function to setup debugger environments so that the debugger can locate the run-time dependencies. This makes it possible to compile and launch the projects directly within visual studio for example.
- Calling the above function in projects that need it.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - white space fix
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - group the source files in IDE to replicate the source tree structure
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Grouping the cpu test project sources to replicate the source tree structure. OCIO library files and the test files are separately grouped for better clarity.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Make the gpu test CTest paths modification more robust
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
1) Expat: 'MD' suffix is added on MSVC only, 'd' suffix is added on WIN32
2) ZLib: 'd' suffix is added only on MSVC
Signed-off-by: Dmitry Kazakov <dimula73@gmail.com>
* Add release signing workflow using Sigstore (#2229)
This adds a GitHub Actions workflow that signs release artifacts
using Sigstore, following the OpenSSF Best Practices Badge
recommendations. The workflow is triggered on release publication
and:
1. Creates a .tar.gz archive of the source tree
2. Signs the archive using sigstore/gh-action-sigstore-python
3. Uploads both the tarball and .sigstore.json credential bundle
Based on the OpenEXR release-sign.yml workflow template.
Closes#2034
Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: pmady <pavan4devops@gmail.com>
* gpu: Add Vulkan unit test framework
Add initial Vulkan support for GPU unit testing in OpenColorIO.
This commit introduces:
- vulkanapp.h/cpp: Headless Vulkan rendering framework for GPU tests
- CMakeLists.txt updates: Conditional Vulkan build support with OCIO_VULKAN_ENABLED
- GPUUnitTest.cpp: --vulkan flag to run tests with Vulkan renderer
The Vulkan implementation uses compute shaders for color processing,
similar to the existing OpenGL and Metal implementations. It supports
headless rendering suitable for CI environments.
Note: GLSL to SPIR-V compilation requires linking against glslang or
shaderc library (marked as TODO in the implementation).
Issue Number: close#2209
Signed-off-by: pmady <pavan4devops@gmail.com>
* gpu: Implement GLSL to SPIR-V compilation using glslang
Add glslang library dependency for runtime GLSL to SPIR-V compilation
in the Vulkan unit test framework. This enables the Vulkan GPU tests
to actually run by compiling OCIO-generated GLSL shaders to SPIR-V.
Changes:
- CMakeLists.txt: Add find_package(glslang) and link glslang libraries
- vulkanapp.cpp: Implement compileGLSLToSPIRV() using glslang API
The implementation:
- Initializes glslang process (thread-safe, one-time init)
- Configures Vulkan 1.2 / SPIR-V 1.5 target environment
- Parses GLSL compute shader source
- Links shader program
- Generates optimized SPIR-V bytecode
Signed-off-by: pmady <pavan4devops@gmail.com>
* docs: Add comprehensive Vulkan testing guides for PR #2243
Add detailed testing documentation to help reviewers and contributors
test the Vulkan unit test framework locally.
Files added:
- VULKAN_TESTING_GUIDE.md: Comprehensive guide with installation
instructions for macOS, Linux, and Windows, build configuration,
troubleshooting, and platform-specific notes
- QUICK_TEST_STEPS.md: Quick reference guide with fast-track
installation and testing steps for each platform
These guides address the request from @doug-walker to provide
instructions for installing Vulkan SDK and glslang dependencies
needed to test the Vulkan branch locally.
Signed-off-by: pmady <pavan4devops@gmail.com>
* Remove testing guide files - will provide as PR comment instead
Signed-off-by: pmady <pavan4devops@gmail.com>
* fix: Change Vulkan CMake definitions from PRIVATE to PUBLIC
Address feedback from @doug-walker regarding build issues:
- Change target_include_directories from PRIVATE to PUBLIC
- Change target_link_libraries from PRIVATE to PUBLIC
- Change target_compile_definitions from PRIVATE to PUBLIC
This allows dependent targets (like test_gpu_exec) to properly
access the OCIO_VULKAN_ENABLED definition and Vulkan libraries.
Signed-off-by: pmady <pavan4devops@gmail.com>
* fix: Add MoltenVK portability extension for macOS
Add VK_KHR_PORTABILITY_ENUMERATION extension and flag for macOS
to enable Vulkan instance creation with MoltenVK.
Signed-off-by: pmady <pavan4devops@gmail.com>
* feat: Integrate Vulkan test framework into GPU unit tests
Complete Vulkan test integration for OpenColorIO GPU unit tests:
- Add Vulkan-specific helper functions in GPUUnitTest.cpp:
- AllocateImageTexture for VulkanApp
- UpdateImageTexture for VulkanApp
- UpdateOCIOVulkanState for VulkanApp
- ValidateImageTexture for VulkanApp
- Wire VulkanApp into test execution loop with proper branching
- Fix VulkanApp initialization:
- Add MoltenVK portability extension for macOS
- Add bounds checking in compute shader
- Fix cleanup order to destroy VulkanBuilder before device
- Fix CMake: Change PRIVATE to PUBLIC for Vulkan definitions
Test Results (macOS with MoltenVK):
- 155 tests PASSED (all non-LUT operations)
- 108 tests FAILED (LUT1D/LUT3D - require texture sampler support)
The LUT tests fail because 3D texture sampler support is not yet
implemented in VulkanBuilder. This is a known limitation that
requires additional work to implement texture allocation and
descriptor set updates for LUT textures.
Signed-off-by: pmady <pavan4devops@gmail.com>
* Add Vulkan uniform buffer and LUT texture support
- Implement VulkanBuilder uniform buffer creation and update for dynamic parameters
- Add 3D LUT texture allocation with RGBA format (RGB32F not supported on MoltenVK)
- Add 1D/2D LUT texture allocation with proper format handling
- Fix shader generation to use correct descriptor bindings for textures and uniforms
- Add std140 layout qualifier to OCIO uniform blocks
- Update descriptor set layout and pool sizes to include uniforms and textures
- Call updateUniforms() before each dispatch for dynamic parameter updates
Test results: 216/263 tests pass (82%)
Remaining failures are complex uniform blocks with vec3 types that need
additional std140 alignment handling.
Signed-off-by: pmady <pavan4devops@gmail.com>
* Fix Vulkan uniform buffer layout and 1D texture handling
- Use OCIO's getUniformBufferSize() and m_bufferOffset for correct std140 layout
- Write array data with 16-byte stride per element (std140 requirement)
- Add std140 layout qualifier to uniform blocks in shader generation
- Disable 1D textures for Vulkan (use 2D instead) for MoltenVK compatibility
- Add better exception handling in GPU unit tests for debugging
This fixes 108 additional Vulkan GPU tests, bringing the pass rate from
155/263 (59%) to 260/263 (98.9%). The 3 remaining failures are ACES2
precision-sensitive edge cases that may need Vulkan-specific tolerance
adjustments.
Signed-off-by: pmady <pavan4devops@gmail.com>
* Use OCIO's getTextureShaderBindingIndex API for Vulkan texture bindings
- Remove manual sampler declarations in buildShader(), use OCIO-generated ones
- Configure shader descriptor with setDescriptorSetIndex(0, 2) for Vulkan
to start texture bindings at 2 (after input/output storage buffers)
- Use get3DTextureShaderBindingIndex() and getTextureShaderBindingIndex()
for correct texture binding indices
- Add GPU diagnostic output to verify MoltenVK uses actual GPU hardware
This addresses review feedback from PR #2243 to use the new texture binding
API added in OCIO 2.5.1 (PR #2226) instead of manually declaring samplers.
Test results: 260/263 tests pass (98.9%)
Remaining 3 failures are ACES2 precision-sensitive edge cases.
GPU confirmed: Apple M2 Pro (Integrated GPU), not CPU emulation.
Signed-off-by: pmady <pavan4devops@gmail.com>
* Address PR review comments for Vulkan unit test framework
- Fix switch warning by explicitly handling VK_PHYSICAL_DEVICE_TYPE_OTHER
and VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM cases
- Fix unused format parameter warning in transitionImageLayout
- Move input/output buffers to high bindings (100, 101) to avoid conflicts
with OCIO's uniform binding at 0, eliminating need to edit shader text
- Refactor GPUUnitTest.cpp to share code between GL and Vulkan:
- Extract PrepareInputValues helper for UpdateImageTexture
- Extract ValidateResults and ValidateImageTextureImpl template for
ValidateImageTexture
- Preserve Mac ARM ifdef for NaN/Infinity test disabling in Vulkan path
- Update texture binding start to 1 (was 2) since binding 0 is now used
for OCIO uniforms
Signed-off-by: pmady <pavan4devops@gmail.com>
* Address PR review: use consecutive bindings and increase tolerances
- Change input/output buffer bindings from 100/101 to 1/2
- Update setDescriptorSetIndex(0, 3) so textures start at binding 3
- Increase test tolerances as requested:
- Test 39 (line 306): 3e-6f -> 3e-5f
- Test 49 (line 659): 0.018f -> 0.019f
- Test 51 (line 696): 0.03f -> 0.032f
- Update comments to reflect the new binding strategy
Signed-off-by: pmady <pavan4devops@gmail.com>
---------
Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Adding reading and writing support for SMPTE ST 2036-1 compliant CLF files.
- Added "Id" element support per the spec.
- Extended the CTFVersion class to handle non-numeric formats per the spec (which uses xmlns as the version)
- CLF xml parser now strips the namespaces from the elements by default. This makes it possible to parse files with simple name spaces but complex name-spaced clf files may still fail. There is an internal switch to turn on/off the name space stripping. This way elements which need to retain the name spaces (such as the Info element) can still get the un-stripped names.
- Extended the Input and Output Descriptor collection to hold multiple entries (similar to Description field)
- CLF writer now writes the SMPTE xmlns version as well as the CompCLFVersion attribute. The resulting files can be read both by the Academy CLF parsers and SMPTE CLF parsers.
- Generated cache hash IDs are now in the 8-4-4-4-12 UUID format to help complying with SMPTE id requirements
- ociomakeclf tool now takes "--generateid" switch to for inserting newly added "Id element" into the target clf file.
TODO:
- Description and Descriptor elements need to collect the language attribute.
- non-default namespace attributes (e.g. xmlns:foo) needs to be collected as root level attributes.
- Those two TODO items need some re-factoring in the data collection code.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Per the code review, exposing the newly added constant METADATA_ID_ELEMENT in python too.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - re-worked some part of the CLF parser and the CTFReaderTransform class to be able to collect richer metadata.
- Now collecting the language attribute of the Description, input and output descriptor elements.
- Also collecting the non-default xmlns attributes at the root level.
- Updated the tests accordingly.
- Replaced clf/pre-smpte_only/matrix_example.clf with clf/matrix_example_utf8.clf in some for some Reference tests.
- Added format information to the ociomakeclf tool's help text.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - nmake the compilers happy.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - make the compilers happy pt2
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - make the compilers happy pt3
(we need to make Windows compiler settings as picky as other platforms)
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
This adds a GitHub Actions workflow that signs release artifacts
using Sigstore, following the OpenSSF Best Practices Badge
recommendations. The workflow is triggered on release publication
and:
1. Creates a .tar.gz archive of the source tree
2. Signs the archive using sigstore/gh-action-sigstore-python
3. Uploads both the tarball and .sigstore.json credential bundle
Based on the OpenEXR release-sign.yml workflow template.
Closes#2034
Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Add dependabot.yml to enable automated dependency updates for:
- GitHub Actions workflows (weekly)
- Python pip packages (weekly)
This follows OpenSSF Best Practices Badge recommendations and
is part of the Step Security hardening measures.
Part of #2035
Signed-off-by: pmady <pavan4devops@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Add test to reproduce bug 2220
Code incorrectly deals with edge cases where atan2() returns end of range [-pi, pi]
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extend tables to have an additonal entry to allow for boundary condition to not over flow table bounds during lookup
All tables are now 1 entry larger and should have valid data wrapped into the extra entries
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Clarify ACES OT 2.0 edge-case test comments around hue-angle table access bug
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
---------
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
This turned out to be not a UAF issue but an out-of-bounds-access issue where the throw was accessing the incorrect (and potentially shorter) string with an index derived from another (and potentially longer) string.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Addressing issue #1915, remove [0, 1] clamping from ICC profiles.
Currently the clamping is removed ONLY when the the type 0 (simple gamma) TRC is used. In this case the the mirroring around origin is used for the negative values.
Other parametric curves are currently implemented as 1DLuts thus will not handle out of bound values properly. In a later wave we can either convert LUTs to half-domain ones or try to implement them with more complex ops (such as exponent with linear).
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Fixing the op tests in the inverse direction
- More detailed explanation for the clamp removal in pure-gamma TRC cases.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* adding unit test for applyRGB buffer, check in the applyRGB if the buffer is C order or not, for now throw error
Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
* Adsk Contrib - Detect C/F order, if not C order : RuntimeError shown, test is still not passing
Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
* remove 1d arrays from the test, since even after Transpose, 1d arrays are still contiguous
Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
---------
Signed-off-by: Afsaneh Sheikhmiri <afsaneh.sheikhmiri@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Adding interchange attributes to ViewTransforms and Looks
- Currently only the amf_transform_ids key is supported. That key is needed for ACES 2 built-in configs.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Fixing the build by propagating the last minute wording change.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Fixing a bug in ViewTransform python tests
- Removing the ColorSpace amf_transform_ids_serialization test as almost all of the cases are now exercised in the Config interchange_attributes test.
- minor cleanup
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Adding 3 new attributes to the color space: interop_id, amf_transform_ids and icc_profile_name
- Addressing the issues #1975, #2152 and #2153
- Bumped the config version to 2.5
- newly added attributes require v2.5 config both for serialization and de-serialization and will throw if they appear in older configs.
- Hardened multiple existing functions against null parameters. Previously those functions were crashing if null is passed, as assigning null to std::string is undefined behavior.
- Expanded tests to some affected functions' unit tests to include null passing. Setters will take null as empty string. compare functions will throw.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* As discussed in the TSC meeting, adding a namespace field separator logic to the interop_id field.
- only zero or one ":" is allowed in the interop_id name
- ":" can not be the last character
- added cpp and python unit tests.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Adding interop_id verification in ociocheck.
Non-namespaced IDs are checked against the known CIF values and warning is issued if not found.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* minor touches.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* fix the failing test.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Disallow non-ASCII characters (outside of [0..127] range) in the interopID field.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Fixing the tests which were failing due to exception wording change.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - replacing getAMFTransformIDs and getICCProfileName with more generic getInterchangeAttribute function. Same with the setters
- getInterchangeAttribute() and setInterchangeAttribute() functions currently knows and accepts "amf_transform_ids" and "icc_profile_name" keys. other keys will throw.
- ColorSpace serializer will list all of the key/value pairs.
- InteropID and interchangeAttributes are now allowed in earlier config versions down to 2.0 too. Config::checkVersionConsistency() will throw only for version smaller than 2.0.
- YAML loader and saver now supports the "interchange" section. Any unknown keys under that section will be ignored upon load and will generate a warning but won't throw.
- Generic str key/value loader/saver is extended for re usability (and fixed incorrect throw message).
- since the amf keywords are separated by newline characters, the newline sanitizer that was used for the description is also generalized and applied to all of the current and possible future interchange fields.
- ColorSpace_test.cpp file updated to test the current state and behavior of the API.
- ComputeValues function in the CPUProcessor_tests.cpp was taking the linenumber as as template parameter. This was a very bad idea as that means each invocation of the function would create a separate copy of the function which was causing all sorts of issues in the debugger and failing to compile when the line numbers are not constants (happens in JIT debug sessions). Fixed by making the line number a normal parameter.
- Python ColorSpace object no longer takes the amf of icc parameters in the constructor. User needs to set them explicitely later on.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - ocioconvert now writes the ColorIntropID attribute of of the output color space.
- ociocheck now does extended validity check on the interopID string.
- preliminary implementation of getColorSpaceFromInteropID().
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Another cleanup pass. After some deliberation, we decided to remove getColorSpaceFromInteropID() which will be done in a later pass.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Config::getColorSpaceFromInteropID() function is removed.
- another round of cleanup.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* minor comment fix
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* minor fixes to unknown interchange key warning and its unit test.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Adding the missing interop_id validation check along with couple of unit-tests.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - typo fix and minor cleanup
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Looks like Doxygen doesn't like URLs in the doxygen comment section. Removing the url to see if this fixes the CI issue.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - minor typo fix
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - deduplicating the newline sanitize code in OCIOYaml.cpp
- exposing the interchange attributes as a standard python dictionary through the "interchangeAttributes" read-only property.
- adding python tests on the new interchangeAttributes property.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - per code-review, converting the interchangeAttributes propery on python colorspace object to getInterchangeAttributes() function to stick with the existing conventions.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Remove frozen docs
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Make opencolorio RTD requirement
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Only install from PyPi on RTD_BUILD
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Trigger PR RTD build
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Restructure pip command
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Fallback to latest PyPi version
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Increase sphinx verbosity for debugging
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update sphinx verbosity
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Try another verbosity adjustment
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Fix sphinx build command
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Adjusting relative path
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Trying alt build structure
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Another alt build structure
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Try pre-install of OCIO
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Testing platform build
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Revert conf.py __doc__ test
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update CI to use windows-2022, and linux builds to use apt
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Handle dnf/yum/apt for different workflows
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Fix wheel builds on Linux
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Skip epel install
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add manual doxygen install option
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Make dnf scripts executable
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* special doxygen case for centos
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Trying doxygen 1.9.0 on centos-7
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Try latest yum install of doxygen
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Turn off docs on CentOS-7 builds
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add Windows CI with docs
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Use apt for linux wheel builds
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Testing linux distro on wheel builds
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update yum repos on CentOS-7
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* remove sudo
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Adjust CentOS-7 vault repo URLs
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add altarch doxygen handling
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Inspect Windows docs env
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Remove status checks
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Re-enable linux-old docs builds
Signed-off-by: Michael Dolan <michdolan@gmail.com>
---------
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Renaming the newly added view helper functions to follow the OCIO conventions.
- The wording order {object(s)}{Is|Are|Has|Have}{State} for the newly added function names are different than the more typical convention of {is|are|have|has}{Object(s)}{State}.
- Config class already has functions in the second form, such as Config::isColorSpaceUsed() or Config::isColorSpaceLinear(). We also have functions named in yet another form like Config::isInactiveColorSpace(). So not to introduce a 3rd variant, I'm renaming these newly added ones.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* capitalizing two function names per request.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Add view helper functions to Config class
Signed-off-by: annie <annieyhlin09@gmail.com>
* add view helper functions to Config class and unit tests
Signed-off-by: annie <annieyhlin09@gmail.com>
* add view helper functions as python bindings
Signed-off-by: annie <annieyhlin09@gmail.com>
* add unit tests for view helper py bindings
Signed-off-by: annie <annieyhlin09@gmail.com>
* update with style changes and comments
Signed-off-by: annie <annieyhlin09@gmail.com>
* comprehensive unit tests for ViewsAreEqual and displayHasView
Signed-off-by: annie <annieyhlin09@gmail.com>
* improved in-line comments for unit tests
Signed-off-by: annie <annieyhlin09@gmail.com>
* test suite for comparing virtual displays, fix to getVirtualDisplayViewTransformName when shared
Signed-off-by: annie <annieyhlin09@gmail.com>
* update briefs for ViewsAreEqual + VirtualViewsAreEqual, remove redunant lines in tests, add virtualViewIsShared checks to getVirtualView-related functions
Signed-off-by: annie <annieyhlin09@gmail.com>
* move virtual_display_exceptions test from tests/cpu/Config_tests.cpp to tests/cpu/Display_tests.cpp
Signed-off-by: annie <annieyhlin09@gmail.com>
* move display_view_order test from tests/cpu/Config_tests.cpp to tests/cpu/Display_tests.cpp
Signed-off-by: annie <annieyhlin09@gmail.com>
* add usage of viewIsShared to compare_displays test
Signed-off-by: annie <annieyhlin09@gmail.com>
* add test of clearSharedViews to basic test module in tests/cpu/Display_tests.cpp
Signed-off-by: annie <annieyhlin09@gmail.com>
* change configs for compare_virtual_displays in tests/cpu/Config_tests.cpp to use looks, rules, and description
Signed-off-by: annie <annieyhlin09@gmail.com>
* improve test cases for python config tests
Signed-off-by: annie <annieyhlin09@gmail.com>
* restore old tests to Config_tests.cpp and move new tests compare_displays, compare_virtual_displays to Display_tests.cpp
Signed-off-by: annie <annieyhlin09@gmail.com>
* add null/empty view name handling to viewIsShared and virtualViewIsShared
Signed-off-by: annie <annieyhlin09@gmail.com>
---------
Signed-off-by: annie <annieyhlin09@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* ci: Use ARM-native runners for linux ARM Python wheels
Signed-off-by: Zach Lewis <zachcanbereached@gmail.com>
* fix: Make build system compatible with CMake-4.0
Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for our ZLIB and pybind11 build scripts and modules.
Update the cmake_minimum_required syntax in the top-level CMakeLists.txt
Signed-off-by: Zach Lewis <zachcanbereached@gmail.com>
---------
Signed-off-by: Zach Lewis <zachcanbereached@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* ACES 2.0 Output Transform performance optimisation (#2119)
* Extend ocioperf to take config file parameter on CLI
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extend ocioconvert to take config on command line
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extract tonescale_fwd function
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extract inverse tonescale function
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Combine c and Z variables in J calculation exponent
replace 100.0 entries when referring to the scale of J
Extract calculation of nonlinear compression into functions
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Split RGB<->JMh function into two parts to expose opponent intermediate values
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Use function to compute matrix multiply for LMS calculations
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove unused member variable from JMhParams structure
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Combine chromatic adaptation weights into LMS matrix (and inverse) - CHANGES PIXEL OUTPUT
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Use matrix form for transforming cone responses to Aab
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Normalise the F_L parameter
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove ra and ba related variables to avoid them being out of sync with opponent calculation
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Make A<->J conversion function generic
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Deduplicate Y<->J conversions
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Factor JMh scaling parameters into Aab matrices
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* factor our references to PI, 360 and 180 constants
Avoid looking up cusp twice during inverse
Whilst searching for the cusp we have already constrained the search so we do not need to clamp
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Add functions to explain some of the calculations
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Further clarify when 100 means reference luminance
Migrate rescaling into tonescale s_2 parameter
Rename model_gamma to reflect it is actually the inverse
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* migrate init steps performed within other init functions to the top level to avoid repeat init of precomputed values.
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* extract some of the fixed values that only depend on the hue to reduce recomputation during inverse gamut mapping
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Avoid double lookup for reachMaxM value by resolving once the hue is known.
also reduces size of object on stack by not passing the whole table.
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Push wrapping of hues to the boundary,
mark up conversion points from external inputs etc
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Store gamma values as reciprocals
move more magic constants into const variables
factor some of the complex expressions into function (temporarily makes things slower)
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Add some missing includes to headers
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* minor cleanup to use std::array instead of plain array for test samples
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Inline reach boundary finding
restructure find_gamut_boundary_intersection to highlight common patterns.
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extract gamut mapper compression function
rework get_focus_gain to directly computer the slope_gain
Share calculation of analytical thereshold
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Rework gamut mapper to compress absolute M then only recalculate calculate J
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Precalculate maximum search range for cusp lookup
next steps would be to factor hue into separate table to improve cache hits followed by redistribution to more uniform hues which should narrow search range
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Experiment with reusing slope calculations in gamut mapper
presmooth cusp values
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Add a collection of TODO's
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Restore function mapping table index to hue
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Minor tweaks to tonescale inverse clamp
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove duplicate table whilst calculating upper hull gamma
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Add some additional sample points for the upper hull gamma finder
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Slight tidy up of gamma fitting code
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Experiment with alternate smin implementation
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove unused function and tidy up comments
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extract hue search into separate function
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Extract hues into separate table, merge gamma values into their place (gamma values now sampled on cusp hue intervals). Removes extra texture from GPU path.
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Simplify upper hull gamma hue lookup to avoid unneeded lerping as we are sampling the table entries directly
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Split out tonescale function, minor tweaks to Aab->JMh
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Build tables more uniformly, needs some clean up and lots of testing
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Speed up reach corner finding by switching to testing against the Achromatic rather than J limit
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Speed up hull gamma finding by computing values which depend only on the test points and not the gamma values themselves
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Adjust GPU hue lookup to take advantage of more uniform distribution
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Fix GLSL compatibility with hue lookup
Remove compiler warnings for unused parameters
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Attempt to simplify table generation code
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Explicilty allow GCC to perform additional optimisations - Needs some discussion
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Add extra entries to reach table to avoid needing to clamp to range during pixel processing
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* GPU move reach Max M sampling to avoid looking it up multiple times per pixel
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove smoothing from GPU path, it is baked into the csup
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Fix bug with reach lookup
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Try only wrap hues on input to the shaders
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* rework GPU camut compressor to follow the same algorithm as CPU. Not 100% the same GPU still recalculates some values
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Rework solve_J_intersect to have fewer div instructions
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Adjust GPU code to better align with CPU code's structure, some additional precomputation is now applied during shader generation
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Precompute more scaling factors into matrices and nonlinear functions
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Experiment with unsigned integers for array access
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Bypass one J-> A conversion by saving the Aab computed earlier
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Test intrinsics for compression Norm calculation
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Attempt to calculate sin/cos only once per pixel.
Some minor micro optimisations.
Further alignment of GPU with CPU code,
Tests values need evaluating
Some GPU results are different - TBD
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove unused parameters
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Try tree vectoriser for gcc
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Add Vectorise option for MSVC
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove unused function
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Constexpr std::max is only available in C++ 14 for now avoid the call to it
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Try to fir intrinsic based errors on osome build configurations
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Another C++ 14 usage fix
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Remove check for CLANG left over from testing
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
---------
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
* Update ACES2 CPU non-SIMD path (#2122)
* - Commenting out the ACES2 SIMD implementation for now to focus on validity of the scalar math. For SIMD we need to do implement run-time switching logic too.
- Slight improvements to the unit tests so that we print out the computed error metric as well as the actual and expected values. Helps to see the magnitude of the error.
- FixedFunctionOpCPU and BuiltinTransform tests now produce error lines with the same structure & syntax, including the computed error.
- Updated the expected values for ACES2 tests with the values the new optimized code produces, this makes all of the of CPU tests pass now.
- For ACES2 ops and builtin transforms, the error threshold is increased to 1e-4
- added few, temporary code snippets that dumps the currently produced results, making it easier to update the golden values if needed again.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Fixing Linux build
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Making Linux build happy is never easy.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Address GPU unit test failures (#2123)
* - Weights for cos(3h) and sin(h) in chroma_compress_norm() looks wrong. Fixing the weights makes the GPU tests pass now (except of the inverse output transform which seems to have a separate issue).
- If the new weights are correct, I'll need to update the CPU test target values too.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Updating the expected values in the CPU tests
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - The remaining GPU test failures were caused by a simple typo where we were passing h instead of J to ocio_tonescale_inv() function. With the fix all the unit tests are happy now.
- Since we decided not to include any SIMD implementation in this version, I removed the conditional code paths and left the current SSE & AVX implementations as commented out for future guidence.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Remove unused code for old gamut table calculations (#2124)
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Minor code cleanup
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Adding negative A trap on Aab_to_JMh_Shader() per code review
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Adding copysign to tonescale to make it aligned with the CPU implementation.
It's possible that on GPU we may never receive negative J due to prior guarding, but for now aligning with the CPU to be on the safer side.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Add built-in transform round-trip test
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Loosen tolerance for other machines
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Add GPU round-trip tests
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Loosen tolerances for other GPUs
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
---------
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Ticket #2111
- Do not use config proxy for absolute paths while computing file hash or loading LUT data.
- Added the unit test provided in the ticket.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Changing the logic so that for abs paths we first try the configProxy and if that fails fall back to file system. For relative paths, we don't fall back to file system though, proxy is expected to handle those.
- Removed the unnecessary closeLutStream() function. We're using unique pointers, that means RAII is in place. The whole idea behind RAII is we don't need to worry about the cleanup or the type of the object wrapped by the RAII handler (unique_ptr in this case).
- Cleaned up some unnecessary conversions, type shuffling and copies around the code I touched.
- Cleaned up some unsafe type casts which are prone to dereferencing null pointers.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Ah! make_unique is a c++14 feature and we support C++11. I wonder why windows build is configured to use c++14+ while other platforms use C++11. Replacing make_unique with the new syntax to make the other platforms happy too.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Minor cleanup
- Added a test for absolute path to inexistent file.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Issue #2116 : Improves Metal Backend Perf. moves the constant float/int declaration to constant space so it doesnt get initialized per thread. This improved color correction performance on M4 Max 3-4 times better.
Signed-off-by: Morteza <smostajabodaveh@apple.com>
* Tiny refactoring to improve code maintainability
Signed-off-by: Morteza <smostajabodaveh@apple.com>
---------
Signed-off-by: Morteza <smostajabodaveh@apple.com>
* Iridas .cube and other text format parsing optimizations
Primarily driven by a wish to increase performance of parsing .cube
files. But the functions that are added or changed are used across
parsing of all/most of text based formats.
With these changes, parsing "Khronos PBR Neutral" .cube file (5.4MB)
on Ryzen 5950X / VS2022 Release build: 167ms -> 123ms.
- Add locale independent IsSpace(char). Somewhat similar to 3aab90d,
whitespace trimming perhaps should not be locale dependent.
- Add IsEmptyOrWhiteSpace() and use that inside ParseUtils::nextline,
instead of doing Trim(line).empty().
- Add StringUtils::StartsWith(char) and use that in various parsers
that were constructing whole std::string object just to check for a
single character.
- When building for C++17 or later, NumberUtils can use standard
<charconv> from_chars functions (except on Apple platforms, where
those are not implemented for floating point types as of Xcode 15).
This has advantage of not having to deal with errno or locales. Saves
some thread local storage accesses and function calls (e.g. on Windows
errno is actually a function call).
- There's a CMake setup change that adds /Zc:__cplusplus flag for MSVC;
for backwards compat reasons it does not report proper C++ version
detection defines otherwise.
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
* Fix test failures (char can be signed, doh)
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
* Tests: add unit test coverage for NumberUtils::from_chars directly
Currently it was only tested indirectly via XMLReaderUtils_tests and
file format tests
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
* Fix from_chars in C++17 code path to understand hex prefix (0x) and skip optional whitespace
To match the pre-C++17 behavior that was there before
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
* Fix detection of <charconv> float from_chars availability
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
* Tests: Fix missing <limits> include for gcc
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
* Tests: fix uninitialized variable warning-as-error on gcc
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
---------
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* fix: modernize Hugo setup
* Replace use of deprecated `.Site.IsMultiLingual` with preferred `hugo.isMultilingual`
* Adjust pagination settings in config.toml
Signed-off-by: Zach Lewis <zachcanbereached@gmail.com>
* ci: Add GHA workflow for triggering site rebuilds
Whenever a change to a file under "docs/site" is pushed to the `main` branch, rebuild docs/site/homepage with Hugo and publish to `gh-pages` branch, taking care to preserve the contents of the "old" directory.
Signed-off-by: Zach Lewis <zachcanbereached@gmail.com>
---------
Signed-off-by: Zach Lewis <zachcanbereached@gmail.com>
Instead of creating temporary LUT files for GPU tests,
read them from the testdata directory instead.
This removes the need to clean them up after each run.
Signed-off-by: Ananth Bhaskararaman <ananth.b@qubecinema.com>
By default Visual Studio projects do not compile source files in
parallel. Add "/MP" flag to enable that.
From scratch OCIO build on Ryzen 5950X, VS2022: 580sec -> 208sec.
Most of remaining single-threaded time is cloning external libraries
or building external libraries (most of them don't do parallel
compilation either). But within building OCIO itself, CPU usage
goes close to 100% instead of 5%.
Signed-off-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Update usage_examples.rst
Changed Displaying an image, using the GPU (Full Viewport Pipeline) to CPU, added Python section and added Displaying an image, using the GPU with C++ example.
Signed-off-by: shaneantrim <shaneantrim@gmail.com>
* removed main() call
Signed-off-by: shaneantrim <shaneantrim@gmail.com>
* Removed Legacy C++ section
Signed-off-by: shaneantrim <shaneantrim@gmail.com>
---------
Signed-off-by: shaneantrim <shaneantrim@gmail.com>
* For issue #1999 adding the new cg and studio configs.
- Added new configs cg-config-v2.2.0_aces-v1.3_ocio-v2.4.ocio and studio-config-v2.2.0_aces-v1.3_ocio-v2.4.ocio
- Made default config cg-config-v2.2.0_aces-v1.3_ocio-v2.4
- Updated the tests accordingly.
TODO: Some documents such as aces_cg.rst and aces_studio.srt need to be updated.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - minor white-space fixes.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* renaming P3 display scene referred aliases:
-- lin_displayp3_scene --> lin_p3d65_scene
-- srgb_displayp3_scene --> srgb_p3d65_scene
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Make CIE-XYZ Scene-referred inactive
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* 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 <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - Ah! gcc and clang being more picky about the unused variable bit me again.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - Completed outstanding to-do items.
- Code beautification.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - unbreak gcc and clang compilers
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* - gcc and clang are still failing. Removing the template for the HLG, hope this will un-confuse the compilers.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - handling the unused variable warning/error when the LUT-support is turned off.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - 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 <cuneyt.ozdas@autodesk.com>
* silencing more unused vars.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - now that all the compiler are happy when the lut-support is turned off, turning it back on.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* - minor fixes, mostly formatting.
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
* Refine enums
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Add opdata test
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Add hlg oetf builtin
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Update CTF version
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Add builtin version tests
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Fix typo
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
---------
Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* black code formatting
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Handle empty image in chromaticities inspector
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Allow unsetting shared view rule
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Qt6 compatibility fixes
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Bug fixes, unit test framework setup
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add initial unit tests
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add application mode
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add new color space combo
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Use color space menu helper
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Move mode select to top of window
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Fix mode viewer context switching
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Recombine viewers
Signed-off-by: Michael Dolan <michdolan@gmail.com>
---------
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: Thomas Mansencal <thomas.mansencal@gmail.com>
* Add initial `pyproject.toml` file to setup *ocioview* development environment.
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
* Implement initial chromaticity inspector.
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
* Rename `ocioview.ocioview.utils.color_space_to_RGB_Colourspace` definition to `color_space_to_rgb_colourspace`.
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
* Removed unneeded string formatting in `ocioview.ocioview.utils.py` module.
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
* Add `wgpu` to direct dependencies.
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
---------
Signed-off-by: Thomas Mansencal <thomas.mansencal@gmail.com>
* Improve ocioview exit, view, and icon UX
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Fix message router property routing
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add processor context
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Revise item type data descriptions
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Split item name from item label
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update processor context direction handling
Signed-off-by: Michael Dolan <michdolan@gmail.com>
---------
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add FileTransform::IsFormatExtensionSupported()
Signed-off-by: Mei Chu <meimchu@gmail.com>
* IsFormatExtensionSupported ignores dot at start.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Add C++ tests for new function.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Fix a small bug in the new C++ tests.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Add python binding, python tests and address feedbacks.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Change extension accepted to IsFormatExtensionSupported() to case-insensitive.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Bugfix to account for single dot input.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Cleanup isFormatExtensionSupported() structure a bit to look nicer.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* Reset whitespace cleanup. Also add a guard against invalid pointer.
Signed-off-by: Mei Chu <meimchu@gmail.com>
---------
Signed-off-by: Mei Chu <meimchu@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Initial AVX512 support
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Lut1DOp add AVX512 implementation
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Lut3DOp add AVX512 implementation
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Don't use SIMD if only 1 pixel is requested
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Remove #if, f16c is always available with AVX512
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Cast pointers to __m512 instead of __m256
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Use size method from vector being tested
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Add to help message that f16c is only used with AVX/AVX2
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Clarify test case by using uint8 maxValue
Signed-off-by: Mark Reid <mindmark@gmail.com>
---------
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Fix CPUProcessor/optimizations on arm64 Arm64 has fma instructions that can lead to different results Break the manual computaion into multiple steps
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Compare strings by float value
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Enable macarm runners by default
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Move mac arm runner to main workflow
Signed-off-by: Mark Reid <mindmark@gmail.com>
* fix rosetta typo
Signed-off-by: Mark Reid <mindmark@gmail.com>
* move StringFloatVecClose to testutils
Signed-off-by: Mark Reid <mindmark@gmail.com>
---------
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Built-In Transform support for Apple Log
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
* Add Apple Log to Linear curve
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
* Don't allow use of Apple Log in pre-2.4 configs; create half LUT to avoid clipping input
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
* Insert std:: in front of that square root
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
* Bump minor version number to 4 in testing config (stored as string literal); bump LastSupportedMinorVersion to 4
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
* Adjust string literal against which maximum minor version is tested to be 4, not 3
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
---------
Signed-off-by: Joseph Goldstone <jgoldstone@arri.com>
* Fix AVX instructions used on CPUs that don't support them
It's supposed to check all bits are enabled, not just one of them.
This causes a crash using OpenColorIO on older CPUs.
Thanks to Ray Molenkamp for help tracking this down.
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
* Fix another case pointed out in review
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
---------
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
* Enhance ociochecklut to print the output after each step in a multi-transform LUT
Signed-off-by: pylee <penne.y.lee@intel.com>
* Review feedback to enable printe of transforms list when using -s flag.
Signed-off-by: pylee <penne.y.lee@intel.com>
* Print transform description for each step instead.
Signed-off-by: pylee <penne.y.lee@intel.com>
---------
Signed-off-by: pylee <penne.y.lee@intel.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Create ci-macarm.yml
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Update ci_workflow.yml
Remove macos arm builds from regular CI pipeline
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Updates based on review comments
1. Update trigger to run at 8:00AM on the 27th of every month.
2. Switch runner to macos-13-xlarge to trigger builds on ARM-based machines.
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Revert "Update ci_workflow.yml"
This reverts commit d8cadc2583be0c6f04850bee49f068c54f2fb8fb.
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Additional fixes based on PR feedback
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Allow workflow to run against base branch for PRs
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Switch to Python 3.11 and add arm64 as arch type
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Update on trigger from pull_request_target to pull_request
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
* Enable GPU acceleration
Enable GPU acceleration to run metal unit tests per input from Remi and Doug.
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
---------
Signed-off-by: Chandy Navaratan <chandy@raje.sh>
This fixes compatibility with yaml-cpp 0.8, which previously failed
because of a `get_property` call with the wrong target name.
I took the liberty to add a few simplifications along the way.
Signed-off-by: Tobias Mayer <tobim@fastmail.fm>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Curve inspector improvements
- Move README to root app folder
- Change curve inspector grid to always render as a square with 10 segments.
- Add transform init callback to set new transform subscriptions to the current viewer if set to passthrough.
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Improve log range calculation
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Improve channel sample comparison
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update src/apps/ocioview/ocioview/inspect/curve_inspector.py
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
---------
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
In v1 of OCIO FileTransforms are able to load .cc files
without specifying a cccid. In v2 this broke causing an
exception to be raised instead of using the first cc found
in the file.
Signed-off-by: Kevin Wheatley <kevin.wheatley@framestore.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Remove unused includes
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Use neon hardware support for f16 conversions
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Add some small neon optimizations
use blendv,floor and fma intrinsics were possible
Signed-off-by: Mark Reid <mindmark@gmail.com>
---------
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Merging the previous ARM Neon branch
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Testing each SIMD variants using a small code snippet and first pass on unifying the way related cmake variables
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing the usage of USE_SSE in favor of the new OCIO_USE_SSE2 as they serve the same purpose
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using try_compile instead of check_cxx_source_compiles as it was given false positive. Stubbing cpuinfo for Apple ARM plateform. Handling Apple M1 correctly and adding support for SSE2NEON.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Comments clean up and refactor some comments and documentations
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Added something in the documentation for Rosetta and small change in cmake
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing the build under Rosetta and fixing issue in the MacOS CI.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using try_compile for CheckSupportSSEUsingSSE2NEON to standardize the code and fixed CheckSupport compiler flags.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* use emmintrin.h for only sse2 features
Signed-off-by: Mark Reid <mindmark@gmail.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Allow F16C to be completely turned off
Signed-off-by: Mark Reid <mindmark@gmail.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Seperate SIMD test code from code that adds unit tests.
This isolates the compulation units and
avoids executing illegal hardware instructions
Signed-off-by: Mark Reid <mindmark@gmail.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* remove uneeded checks
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* use software implementations of f16c intrinsics for SSE2
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Added preprocessor checks for ARM as it is needed for universal build on APPLE platform
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding missing checks for "not arm64"
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Ease the future maintainability a the new OCIO_USE_xyz be moving the logic into CPUInfoConfig.h.in as well as fixing issue on ARM when building with OCIO_USE_SSE2NEON=OFF.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing some spacing, documentations and making some cmake conditions clearer.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding a build in ci_workflow for macos USE_OCIO_SSE2NEON=OFF
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* typo
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing back all the macOS (except one) builds to x86_64 only as it takes double the time to do the universal build.
OCIO no longuer build a universal binary by default
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Update the CMakeLists.txt logic to accomodate all scenario and fixing documentations.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Update documentation and remove ocio_use_sse2neon from the CI matrix
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Mark Reid <mindmark@gmail.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
Co-authored-by: Mark Reid <mindmark@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Initial commit of ocioview
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Improve config version selection and reloading
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Bug fixes and improved warnings
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Improve async log and code routing
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add settings, improve transform interface
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Fix viewer and code view update bugs
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add README and inspector panel with curve viewer
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Curve viewer log fix
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add curve view labels
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update README, improve curve grid rendering
Signed-off-by: Michael Dolan <michdolan@gmail.com>
---------
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
* Use `TARGET` for the config if-statements.
The check would always evaluate to true otherwise.
Signed-off-by: Pierre Wendling <pierre.wendling.4@gmail.com>
* Use PACKAGE_PREFIX_DIR from PACKAGE_INIT.
This avoids guessing the path to the prefix.
Signed-off-by: Pierre Wendling <pierre.wendling.4@gmail.com>
* Add compatibility with yaml-cpp 0.8.0 target.
The target was renamed to `yaml-cpp::yaml-cpp`, which breaks when using
the upstream CMake package over the Find module.
Signed-off-by: Pierre Wendling <pierre.wendling.4@gmail.com>
---------
Signed-off-by: Pierre Wendling <pierre.wendling.4@gmail.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Added GetProcessorFromConfigs variants for displays and views.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Added display-view processor from two configs tests, moved direction argument last.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
---------
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Michael Dolan <michdolan@gmail.com>
* Fixing a warning in one of the python unit test
Removing expected info log in some python unit test
Removing expected info log about inactive colorspace in Cpp unit test
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using sudio config instead of cg config where it makes sense
renaming unit test inactive_colospace to is_inactive
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Exposed option to allow/disallow 1D texture GPU resources for 1D LUTs.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* New API to get or add 1D LUT textures with the specified dimensions.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Fix errors relevealed by CIS related to texture dimension API change.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Update gpu shader tests away from now deprecated get/add texture functions.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Converted deprecated get/add texture functions from pure virtual to virtual.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Commenting out unused parameters on deprecated functions to mitigate warnings.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Addressing review notes.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Updated python addTexture/getTextures test with latest interface.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Further update python and metal samples to new texture dimensions API.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Improvements: moved default deprecated implementations to base classes, avoided asserts, fixed typo and naming.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Follow spacing/formatting convention arguments.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
* Removed the original addTexture and getTexture methods.
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
---------
Signed-off-by: Eric Renaud-Houde <eric.renaud.houde@gmail.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Added ResolveConfigPath function
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Added support for ocio://cg-config-latest and ocio://studio-config-latest
Added unit tests that covers the new names.
CreateFromBuiltinConfig now supports the URI interface directly as well. Previously, it was supporting only the built-in config name (not a URI). The config name was parsed out of the URI before passing it to CreateFromBuiltConfig by CreateFromFile.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentations and typos
Tweaking unit tests
Other minor changes
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* documentations
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using OCIO_BUILTIN_URI_PREFIX where we can in the code (not in tests)
Adding missing type in PyTypes.cpp
Change name of constexpr to follow the others in OCIO (all in capital)
Moved them to the cpp file since they can be useful in tests
Comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* documentation
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing error : ISO C++ forbids converting a string constant to 'char*' that was brought up with Clang under Linux and macos.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Remove deprecation for getDefaultBuiltinConfigName. Will wait for 2.3 release.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing issue with the rebase
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Add AVX2/AVX/SSE2 accelerated pack/unpacking function templates
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Add AVX2/AVX/SSE2 accelerated Lut3D Tetrahedral implementations
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Add AVX2/AVX/SSE2 accelerated linear Lut1D implementations
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Fix a bunch of typos
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Remove USE_SSE code that is no longer needed
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Use alignas specifier
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Move x86 simd checking code to seperate file
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Fix cacheID test, compare lengths and everything but the cacheID hash
Signed-off-by: Mark Reid <mindmark@gmail.com>
* Remove debug gather code
Signed-off-by: Mark Reid <mindmark@gmail.com>
* fixed outBD typo
Signed-off-by: Mark Reid <mindmark@gmail.com>
---------
Signed-off-by: Mark Reid <mindmark@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* - Implementation of identifyInterchangeSpace, identifyBuiltinColorSpace and AreProcessorsEquivalent.
- Remove some include of Processor.h where it wasn't needed.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Moving code from Config.cpp to ConfigUtils.cpp and using wrapper in Config.cpp instead.
Fixing identations issues.
Fixing styling issues.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Typo and comments tweaks
Moving the creation of the editable config into the wrapper of isColorSpaceLinear instead of doing it inside the function.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Splitting identifyInterchangeSpace into two methods, one for source config and one for builtin.
Adding back isColorSpaceLinear inside Config.cpp since we need access to getProcessorWithoutCaching.
Refactor some of config utils function to return index instead of string.
Creating editable config in the two wrappers to prevent processor caching.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Tentative change to phase out isProcessorEquivalent.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Refactor code and add tests
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Remove unused method
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Remove unused method, tk 2
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Tweak comments
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Python binding for IdentifyInterchangeSpace and IdentifyBuiltinColorSpace methods.
Adding a couple python unit tests to cover the new methods (same unit test as the C++ side, but not all of them)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* - Implementation of identifyInterchangeSpace, identifyBuiltinColorSpace and AreProcessorsEquivalent.
- Remove some include of Processor.h where it wasn't needed.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Moving code from Config.cpp to ConfigUtils.cpp and using wrapper in Config.cpp instead.
Fixing identations issues.
Fixing styling issues.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Typo and comments tweaks
Moving the creation of the editable config into the wrapper of isColorSpaceLinear instead of doing it inside the function.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Splitting identifyInterchangeSpace into two methods, one for source config and one for builtin.
Adding back isColorSpaceLinear inside Config.cpp since we need access to getProcessorWithoutCaching.
Refactor some of config utils function to return index instead of string.
Creating editable config in the two wrappers to prevent processor caching.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Tentative change to phase out isProcessorEquivalent.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Refactor code and add tests
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Remove unused method
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Remove unused method, tk 2
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Tweak comments
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
* Python binding for IdentifyInterchangeSpace and IdentifyBuiltinColorSpace methods.
Adding a couple python unit tests to cover the new methods (same unit test as the C++ side, but not all of them)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing problem with the rebase
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Make sure the unit test is using the static method
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Changed OCIO_PYTHON_LOAD_DLLS_FROM_PATH to opt-in instead of opt-out
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Restrict the version of urllib3 to version <2 because version above this is not compatible with the OCIO container images
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Revert unwanted change from this branch
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Implements isInactiveColorSpace and getRoleColorSpace.
Implements basic unit tests for those two methods.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Added header for the two new methods.
Added the python bindings equivalents.
Tweak C++ unit tests and added python unit tests.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Minimize usage for getRoleName
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentations
Moving the new unit tests
Adding extra tests for un-tested methods
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Tweaking unit tests and documentions
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix build failure on Linux and Mac.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix comment
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Adding a method to clear the processor cache.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Do not clear the cache when enabling the cache
Adding test for the cache enable/disable cycle
Adding test to test clearProcessorCache
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Unrelated: Changing zlib version to 1.2.8 (adding it to this PR to minimize PRs)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentations
Tweak unit tests
FIx implementation for clearProcessorCache
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentations
reverting zlib version and will do it in another PR
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentation and python binding
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding python unit tests and minor fixes
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Missing change from last commit
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Fixinactive colorspaces in cg-config.
Fix OpenColorIO errors that was introduced a while ago in the unit test because of requirement for config.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Reverting changes in cg-config
Other warnings are not muted anymore when we check for role warnings.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Refactoring the new function in unit test log utils.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Integrating the code into LogGuard
Changing some misuses of StartsWith
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding a MuteLogging class for python side
Mute log from built-in config test
Comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding new utilities function to mute inactive colorspace info log while not muting all logs (C++ side)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* findAllAndRemove method from LogGuard now takes a regex pattern instead of just the line to find
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Tentative fix for macos failure
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* checking for llvm@15 instead as that version is installed by homebrew in the runner
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Trying to trigger the dependencies workflow by making a temporary changes in it.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using same version of compiler as LLVM_ROOT when building OSL
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding LLVM_ROOT for macOS only and testing the usage of "llvm" only instead of llvm@15.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing back to llvm@15
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* last test to confirm
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* removing temporary change in dependencies_workflow
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Implementation of ocio_find_package and ocio_install_package macro.
Implemention of minimum, maximum and recommended version.
Refactor the FindOpenImageIO to be inline with the rest of the custom find module (OCIO_USE_OIIO_CMAKE_CONFIG is no longer needed).
Added a new option called OCIO_VERBOSE. It allow the user to tell OCIO to display more information when searching and building the dependencies.
Splitted the find and install part into two files - Find<pkg>.cmake and Install<pkg>.cmake.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing a duplicate call to set_property in OpenImageIO find module.
Setting policy CMP0042 when building ZLIB since that project is using an old CMake version as the cmake_minimum_required and that version has no knowledge of the policy.
Fixing a potential issue in Installopenfx. Changing back the version to 1.4 as before.
Ignoring warning from OpenImageIO for imageioapphelpers. The same warning are ignored for ociodisplay, ocioconvert and ociolutimage.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixed an issue with FindOpenImageIO that was found while testing on macOS.
Renamed FindOpenShadingLanguage to FindOSL to match the project name used the OSL's CMakefile.
Cleanup the code for FindOSL and removed duplicate warning about needed C++14.
Updated the header comments for all Find and Install modules.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing typo
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Renamed ocio_find_package to ocio_handle_dependency
Renamed ocio_install_package to ocio_install_dependency
The "Installing [...]" message from Install module is now under OCIO_VERBOSE variable. Added a message in ocio_install_dependency instead
Improve the colors usage in the logging
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changed prefix for ocio_install_dependency since it was conflicting with the prefix of ocio_handle_dependency since they were the same.
Removed FindOpenEXR.cmake and FindOpenImageIO.cmake since they are not needed anymore (for differente reason).
Added PROMOTE_TARGET option for ocio_handle_dependency which promote the target to GLOBAL.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Mostly comments and documentations
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Small update of the Existing Install Hints section
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changed RECOMMENDED_MIN_VERSION to RECOMMENDED_VERSION
Re-worded some of the comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing issue with ocio_handle_dependency macro where it wasn't respecting OCIO_INSTALL_EXT_PACKAGES option correctly.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding more documentations and dropping support to look for static zlib since the user can update their cmake in order to do that.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentations
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Documentations
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* fixing typo
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix typo and fix issue when OCIO is installing ZLIB
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Tentative fix for Linux CI failure
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Ignoring specifics warnings on OpenImageIO target directly.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing OCIO_USE_OIIO_CMAKE_CONFIG as it is not needed anymore.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Allow PyOpenColorIO module to load DLLs from Windows PATH environment variable with an opt-out option in case the user want the default behavior of Python 3.8+.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing typos in comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
---------
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* - Refactoring how OCIO search for minizip-ng. The first step is to search for an external minizip-ng. If not found, search for minizip-ng with MZ_COMPAT=ON (libminizip). If it is not found either, download and install minizip-ng with MZ_COMPAT=OFF.
- Removing the minizip-ng part for the includes for minizip-ng headers.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Update comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Improved find_package in Config mode (adding it back)
Added missing scripts to install minizip-ng and zlib for the analysis workflow
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding +x permissions for install_minizip_ng and zlib
Fixing path to find zlib in install_minizip-ng.sh
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing target name to match the one used by minizip-ng library (+ using the imported target instead of creating a new one when minizip-ng is found)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* First pass for the OpenColorIOConfig.cmake file with the required dependencies only.
A few extra fixes for OpenEXR, ZLIB and Minizip-ng.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding a informative message when building static ocio instead of per module.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding an extra step to test the consumer app with static OpenColorIO for Windows, Linux and MacOS.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Re-using the same test instead of creating a new one by removing the condition on build-shared.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing spacing, typo and adding back the NOT in the condition. (it was removed for debugging purpose)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing directory where we share OCIO custom find modules (now in <install dir>/share/cmake/modules).
Adding a cmake macro when installing OCIO since it is needed by some custom find modules.
The find modules are only installed when building OCIO as a static library.
The config.cmake.in files now only looks for the dependency when OCIO was built as a static library.
Tentative (ci-workflow): Adding cmake-consumer test for static builds.
Overhaul of the Findzlib module to be more inline with the FindZLIB from cmake and to be more robust.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding missing backward slashes and saving the build path in an existing step instead of creating a new step.
Adding a check for CMake version for a section in Findzlib.cmake.
Re-phrasing some comments.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Prevent the download of the dependencies in the scenario where static OCIO is linked to a consumer project. Since OCIO_INSTALL_EXT_PACKAGES is not defined, our find module tries to download the dependencies, but we don't want that mecanism for consumer project.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing path where OCIO install its own custom find module.
Removing custom Findzlib and making modifications to use CMake FindZLIB.
Created a InstallZLIB module which does the download and install part if OCIO_INSTALL_EXT_PACAKGES is ALL or MISSING.
Tweaked config.cmake.in to use CMake FindZLIB.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding more details in comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing an extra "shell" property in CI workflow.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix issues discovered with the failing CI workflow:
Cmake-consumer test now prefer the static version of the dependencies.
Fix an issue where yaml-cpp is not found by a consumer app (variable spelled incorectly in Findyaml-cpp).
Fix an issue expat library is not found by a consumer app on Windows.
Adding support for OCIO's <pkg_name>_STATIC_LIBRARY for ZLIB while supporting ZLIB_USE_STATIC_LIBS (CMake 3.24+) from CMake's FindZLIB.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing pystring_STATIC_LIBRARY does not exists in CI workflow.
Detecting if the build is Debug in the find module that OCIO installs since they can't rely on variables set by OCIO CMakefiles.
Fix issue with yaml-cpp library naming in debug.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix issues on Windows with expat and minizip-ng library naming when building static OCIO.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Added option for macOS CI job in order to get more info on a failed job. Will be reverted once the issue is found.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing a issue on macOS.
Improving ZLIB usage comments.
Bumping minizip-ng to the latest version - 3.0.7.
Bumping ZLIB to the latest version 2.1.13 to fix a vulnerability (CVE-2022-37434)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Proposing to remove Findminizip module since external minizip-ng build need to be done with the same option as the internal build.
Otherwise, linking and symbols issues are going to happend if the other libraries are not linked in correctly.
It is going to simplify the maintainability of OCIO.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing findminizip.cmake from the install since it does not exist anymore.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
* Configure the OpenColorIO.pc file on Windows and fix an issue where CMAKE_INSTALL_PREFIX wasn't included in the cmake build command in ocio.bat.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing pkconfig folder since that PC file is not used.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Small tweak in the configuration of OpenColorIO.cmake.in to handle absolute path with CMAKE_INSTALL_LIBDIR or CMAKE_INSTALL_INCLUDEDIR.
Keeping exec_prefix for CMAKE_INSTALL_INCLUDE_DIR since it was changed for a specific issue on Mac (see PR #1120).
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using ${prefix} for includedir
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* For Looks that has a FileTransform and for Colorspace with FileTransfrom, add the CCCID to the processor's cache key for that transform.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing the workaround in the related unit tests and fixing the issue by adding the environment variable to the context using setStringVar. The processor's cache key is using the context cache ID which has all the context variables taken into account.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Now using addStringVars and creating a new context instead of reusing the one used for the filename.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding cccid to the context when there are no context variable.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding a few unit tests to test that the processor is different when changing the FileTransform's CCCID.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Using setStringVar to set CCNUM context variable in unit test.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding a test in FileTransform to test CollectContextVariables directly.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Minor tweaks for the unit test
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* - Refactoring how OCIO search for minizip-ng. The first step is to search for an external minizip-ng. If not found, search for minizip-ng with MZ_COMPAT=ON (libminizip). If it is not found either, download and install minizip-ng with MZ_COMPAT=OFF.
- Removing the minizip-ng part for the includes for minizip-ng headers.
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Update comments
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Improved find_package in Config mode (adding it back)
Added missing scripts to install minizip-ng and zlib for the analysis workflow
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding +x permissions for install_minizip_ng and zlib
Fixing path to find zlib in install_minizip-ng.sh
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing target name to match the one used by minizip-ng library (+ using the imported target instead of creating a new one when minizip-ng is found)
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Set function will affects all variables in current directory. If sse
flags are added in CheckSupportSSE2.cmake, they will remain in
Findminizip-ng.cmake which will cause liblzma cannot be detected. This
patch keep CMAKE_REQUIRED_FLAGS being changed only in current file
scope. This patch has been tested on riscv64.
Signed-off-by: Letu Ren <fantasquex@gmail.com>
Signed-off-by: Letu Ren <fantasquex@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Check for channel crosstalk on optimised processors when baking
Signed-off-by: Rémi Achard <remiachard@gmail.com>
* Use lossless optimization
Signed-off-by: Rémi Achard <remiachard@gmail.com>
* Handle NamedTransform used in Baker shaper space
Signed-off-by: Rémi Achard <remiachard@gmail.com>
Signed-off-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Michael Dolan <michdolan@gmail.com>
* Add NamedTransform Processor constructors
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update frozen Python API docs
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Add NamedTransform::GetTransform static function to public API
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Move function from NamedTransformImpl to NamedTransform
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update Python frozen rst with API changes
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* Update comment and variable naming
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Signed-off-by: Michael Dolan <michdolan@gmail.com>
* First iteration of isColorspaceLinear.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Comments.
- Added a private getProcessor method that ignore caching.
- Fix the algorithm for isColorspaceLinear. - Now testing R, G, B and neutral values.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Passing in the config reference instead of using this in the capture clause of the lambda function as this was causing issue on other platforms than Windows.
- Remove unused variable in unit test.
- other minors changes
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing a comment and removing the helper function as it is not needed.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Get in sync with changes on the public repository for isColorspaceLinear.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - C++ implemention for getProcessorToBuiltinColorSpace with a few utilitiy functions
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Changed getProcessorToBuiltinColorSpace to getProcessorToOrFromBuiltinColorspace and it not accessible through the API anymore
- Added getProcessorFromBuiltInColorspace (API)
- Added getProcessorToBuiltinColorspace (API)
- rename "bi" variables to "builtin"
- Added the swaping of colorspace when TRANSFORM_DIR_INVERSE
- Added C++ unit test
std::cout debug print will be removed in the next commit.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding ColorSpaceUtils
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Comments and styling
- Refactor the code in order to use apply()
- Move everything to ColorSpaceUtils so that all the helper functions are private to ColorSpaceUtils
- Remove the std::cout
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Now using getProcessorWithoutCaching and moved logics into Config::Impl.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing combineGroupTransform, small refactor of getRefToSRGBTransform and styling issues.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Python Bindings
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Changing new helper methods to const and minor styling issues.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Minor styling issues
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Changed a comment to fit on one line and styling issue.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing extra qualifiers that returns an error on Linux and Mac and fixing warnings on Linux and Mac.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing issue with documentation
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Rename checkForLinearColorSpace ---> getReferenceSpaceFromLinearSpace
- Fix an issue where the wrong config object was used for getProcessorWithoutCaching.
- Added a comment about about 0.0030399346397784323.
- Using std::pow instead of pow
- Small refactor of getReferenceSpaceFromLinearSpace to avoid duplicate code.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Renaming checkForSRGBTextureColorSpace to getReferenceSpaceFromSRGBSpace and adding "Utility - Linear - Rec.2020" to the builtin linear spaces.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cédrik Fuoco <105517825+cedrik-fuoco-adsk@users.noreply.github.com>
* First iteration of isColorspaceLinear.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Comments.
- Added a private getProcessor method that ignore caching.
- Fix the algorithm for isColorspaceLinear. - Now testing R, G, B and neutral values.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Passing in the config reference instead of using this in the capture clause of the lambda function as this was causing issue on other platforms than Windows.
- Remove unused variable in unit test.
- other minors changes
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing a comment and removing the helper function as it is not needed.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Tweaking algorithm. Returns true at the end since the color space matches the desired reference space type, is not a data space, and has no transforms, so it is equivalent to the reference space and hence linear.
- Added a color space in the test config to cover that.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding python binding for isColorSpaceLinear and python unit test.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* OCIOZ archive feature (#1627)
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Add OCIOZ extension if not present.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Changing getLutData (return vector instead of passing by reference) in order to respect C++ idiom and letting compiler optimize with NRVO and Copy elision
- Improving how cmake find zlib (renamed getZLIB to Findzlib)
- Make sure that ZLIB is statically linked on all platform (it wasn't on windows)
- Fix issue with Python Unit test when using Python 2 (problem discovered on OSX)
- Change how OpenEXR finds ZLIB by using our custom Findzlib
- Patching Minizip-ng makefile to change cmake minimum version
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Remove the minizip-ng patch as it doesn't work and further discussion needs to happend.
- Responding to Remi's comments.
Notable changes:
- Comments typo and styles fix.
- Unit tests fixes.
- Removing the usage of std::ifstream in getLutData and getConfig since it is not needed at all - It was slowing down getLutData.
- Implicitly converting python list to std::vector<uint8_t> (for getLutData)
- When archiving a config, the file won't added (overwridden) multiple times if the file matches multiple supported format.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Added implicit conversion from bytearray to std::vector<uint8_t>
- In ConfigIOProxy Python Unit test, changed getLutData to return a bytearray instead of a list. I think this makes more sense and it works with Python 2 and 3.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Update comments to be in line with the current implementations
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Changing ci workflow in order to install cmake version 3.13.3 for Linux (matrix.vfx-cy == '2019').
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* - Fixing issue with the install location of zlib library
- Removing unused CMAKE variables from ZLIB_CMAKE_ARGS
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Support for ICC Parametric curves type 1-4
Signed-off-by: Rémi Achard <remiachard@gmail.com>
* Add warning about paraCurve characteristics, fix clamp and improve unit tests
Signed-off-by: Rémi Achard <remiachard@gmail.com>
* Windows CI fixes
Signed-off-by: Rémi Achard <remiachard@gmail.com>
Signed-off-by: Rémi Achard <remiachard@gmail.com>
* First version of built-in configs feature
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Generating configs header into generated_include folder
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Added comments, move some code, added a test for public interface, changed how CG.h get generated and other minors fixes
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding support for ocio://default and a unit test for it
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Renamed methods to get align with BuiltinConfig class name and to remove confusion with Config class.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Refactor the test suite for Built-in config and comments/descriptions changes
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding guard for setenv, added two tests and other minor changes
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Added readme file to help add a new config, minors fixes, changed some built-in config unit tests and created a generic guard for set/unset env.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix some coding styles and remove try catch that was not really needed.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Updating setenv/unset to the guard pattern in config_tests module.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Python bindings
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing styling issues and minor modifications in python unit tests
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing problem with test_create_builtin_config
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Remove the check for the number of colorspaces in the python tests for now - only checking the name, removed readme and fix issue around config begin null in test by adding a OCIO_REQUIRE_ASSERT.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing styling and comments issues and adding back the tests for the number of colorspaces using len().
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* missing spaces in comments.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding display name and getBuiltinConfigUIName.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix a few issues with the builds - Replacing get_filename_component/NAME_WLE by a regex, replacing assetRaisesRegex with a combination of assertRaises/assertEqual and fixing the link issue with Doxygen in OpenColorIO.h
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding missing comment and changing "displayName" to "uiName" to remove confusion within ocio
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixing build issue on Linux and Mac : config string was not null terminated
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* minor fixes
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* A more Pythonic interface
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Adding more information into the tuple and modified corresponding tests.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* returning reference instead of smart pointer as it is not needed.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Removed getNumBuiltinConfig from python binding since we have iterator and modified __contains__ magic method to not throw exception.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix wrong type in for loop. (linux and mac issue)
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Scripts to facilitate OCIO builds on Windows
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fixed an issue with spaces in python path
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Using delayed variable expansion instead of normal expansion for variables that can changes based on arguments
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Updating the quick start > installations documentation to mention the windows scripts and re-writing obsolete section.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Implement invertview for ocioconvert, ocioperf and ociowrite
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix issue with operator precedence warning on Linux
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Added comment on why ocioconvert is changing the output buffer bit-depth and changed bitwise AND operator into logicla AND operator (same result but makes more sense here)
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Fix issue with --gpu path
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* Fix issues when building OCIO with MS Visual Studio 2022
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Removing GLEW_LIBRARY variable as it is not needed
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Bumping CI to use VC 2022 as per Doug Walker request (see #1634)
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Reverting the changes on ci_workflow.yml and adding a check for MSVC for the Glew fix.
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Typo for the windows action in ci workflow
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
* Typo for the windows action in ci workflow
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
* * Adds Metal Shading Language (MSL) Generation support
Signed-off-by: Morteza Mostajabodaveh <smostajabodaveh@apple.com>
Co-authored-by: Ingthor Hjalmarsson <ihjalmarsson@apple.com>
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Fixes warnings triggered due to unused variables.
Signed-off-by: Morteza Mostajabodaveh <smostajabodaveh@apple.com>
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Fixes compilation error on Mac and Windows:
- vector of const objects causing compiler errors on windows.
- Wrong string was used for Metal language python binding.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Removes class wrapping interface from OpenColorIO interface and move it to implementation
* Adding more tests for metal code path
* Proper generated Metal code indentation
* Fixes a few coding style inconsistencies and unneeded include files
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Remove the unneeded empty line to reset OpenColorIO.h to what it was before the metal change.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * switching from c-like getFunctionParameters function to c++-like one since it is not in the opencolorio interface anymore.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Missing include causing compiler errors on windows
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Fixes and improvements follow up to change that was trying to move metal related code in implementation, and hide them from OCIO interface.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* - remove unused variables.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Adds support for uniform parameters and proper handling of them in metal code.
* Adds two new tests for uniforms and helper functions.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * making declaration parsing more C++-like. Functions like sscanf are problematic when it comes to multiple platform support and may not be safe
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Switching from clf/lut1d_half_domain_raw_half_set.clf to clf/lut1d_long.clf. Due to decimal number outputting difference between different platforms, some tests were failing.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Moving Metal only functionalities to MetalClassWrappingInterface
* remove unnecessary functions and data types
* code clean up and quality improvement
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Adds support for uniforms that are array
* Removing getTextureKeyword() and getTextureDeclaration() as they are not needed.
* code clean up and quality improvement
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Remove unnecessary changes to GpuShaderUtils_tests.cpp
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Removed unnecessary included files
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Removing unnecessary include
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Apply style improvement suggestions
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * changed from msl_metal to msl_2 so it matches with `GpuLanguageFromString` function.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Move MetalShaderClassWrappingInterface to a separate file and generalise it
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* header files inlcudes clean up
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Still the else path is needed in case we set language from MSL2 to something else.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* [minor] Showing the GpuShaderClassWrapper.h also in the vc15 aftereffect project.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Run ClassWrapper function for all backends. It only produces code in metal shading language code generation case.
operator= for GpuShaderClassWrapper
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* use factory pattern instead of updateClassWrappingInterface
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Replace assignment operator with clone function that is more explicit.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* use Assignment operator instead of setting members in clone member function
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* add include guards.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* make output of MetalShaderClassWrapper::operator= non-const
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Update default branch name (#1532)
Signed-off-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Adsk Contrib - Default to C++14 and remove OIIO from ocioperf (#1516)
* Adsk Contrib - Default to C++14 and remove OIIO from ocioperf
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Fix cmake breaks
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Fix bit-depths
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Fix Linux build break
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Improve the image generation
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Improve the image generation
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Add metal rendering support to ociodisplay
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Adds support for metal only input texture
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Returning correct value for maximum texture width
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Add GPU rendering tests for metal renderer
Fixes incorrect shader generation code for arrays in uniform buffer
Adds support for vector comparison in Metal
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Fixes failing test_cpu_exec test
Fixes compilation error on Linux, older clang compiler
Makes the app working on x64 Macs
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Add support for test that apply color correction multiple times with different setups
replaces asserts with exception
Disables fast math to get more accurate results
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Matching the uniform buffer size elements for array of ints and float to fix two gpu tests
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* enables -gpuinfo to print shader
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Revert "Matching the uniform buffer size elements for array of ints and float to fix two gpu tests"
This reverts commit c1695e20b336c54c618a541cc47311a61399457b.
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Enables uniform data binding for metal without touching OCIO interface
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* set dummy buffers for the vectors that are empty.
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Update metal test to reflect latest changes in metal shader generator
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Improving coding style
Adds metal gpu unit tests to the one executing
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Updating the test so it reflects latest code changes.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* sets the opengl state even when no valid ocio config is loaded.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Handles metal resources lifecycles correctly. Fixes the crash on transform change.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Applying improvements to code and minor fixes
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Disable testing NaN and Infinity on Apple Silicon that causes test failures and precision errors
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* make the condition for disabling NaN and INFs more accurate.
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
* Improving code quality
Fixing possible texture mem leaks
Signed-off-by: Morteza Mostajab <smostajabodaveh@apple.com>
Co-authored-by: Ingthor Hjalmarsson <ihjalmarsson@apple.com>
Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
Co-authored-by: Michael Dolan <michdolan@gmail.com>
This commit adds support for parsing numbers without being influenced by
the current system locale. We implement a from_chars
shim that forwards the call to strto*_l along with a statically
initialized locale constant.
Fixes AcademySoftwareFoundation#297
Fixes AcademySoftwareFoundation#379
Fixes AcademySoftwareFoundation#1322
Co-Authored-By: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
Signed-off-by: L. E. Segovia <13498015+amyspark@users.noreply.github.com>
* Adsk Contrib - Fix some weaknesses in the search path validation
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Fix the Windows path in the unit test validations
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* Fix the Windows path in the unit test validations, part II
Signed-off-by: Patrick Hodoul <Patrick.Hodoul@autodesk.com>
* * Fix add_test in cmake files. This notation allows it to understand that the command portion is a target and to translate it to the proper executable.
* Remove starting backslash if present from temporary filename. A starting backslash mean that it is safe to create it in the current working directory.
* Implement a public TempFile class.
* Change relevant tests to use TempFile class.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
* * Revert back changes for TempFile class.
* Add comment on temporary file functions fix.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
* Add FIXME comments.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
* Add -C flag to ctest commands.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
* Add `-C Release` to ctest commands in `analysis_workflow.yml`.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
* * Adds Metal Shading Language (MSL) Generation support
Signed-off-by: Morteza Mostajabodaveh <smostajabodaveh@apple.com>
Co-authored-by: Ingthor Hjalmarsson <ihjalmarsson@apple.com>
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Fixes warnings triggered due to unused variables.
Signed-off-by: Morteza Mostajabodaveh <smostajabodaveh@apple.com>
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Fixes compilation error on Mac and Windows:
- vector of const objects causing compiler errors on windows.
- Wrong string was used for Metal language python binding.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Removes class wrapping interface from OpenColorIO interface and move it to implementation
* Adding more tests for metal code path
* Proper generated Metal code indentation
* Fixes a few coding style inconsistencies and unneeded include files
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Remove the unneeded empty line to reset OpenColorIO.h to what it was before the metal change.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * switching from c-like getFunctionParameters function to c++-like one since it is not in the opencolorio interface anymore.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Missing include causing compiler errors on windows
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Fixes and improvements follow up to change that was trying to move metal related code in implementation, and hide them from OCIO interface.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* - remove unused variables.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Adds support for uniform parameters and proper handling of them in metal code.
* Adds two new tests for uniforms and helper functions.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * making declaration parsing more C++-like. Functions like sscanf are problematic when it comes to multiple platform support and may not be safe
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Switching from clf/lut1d_half_domain_raw_half_set.clf to clf/lut1d_long.clf. Due to decimal number outputting difference between different platforms, some tests were failing.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Moving Metal only functionalities to MetalClassWrappingInterface
* remove unnecessary functions and data types
* code clean up and quality improvement
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Adds support for uniforms that are array
* Removing getTextureKeyword() and getTextureDeclaration() as they are not needed.
* code clean up and quality improvement
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Remove unnecessary changes to GpuShaderUtils_tests.cpp
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Removed unnecessary included files
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Removing unnecessary include
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * Apply style improvement suggestions
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* * changed from msl_metal to msl_2 so it matches with `GpuLanguageFromString` function.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Move MetalShaderClassWrappingInterface to a separate file and generalise it
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* header files inlcudes clean up
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Still the else path is needed in case we set language from MSL2 to something else.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* [minor] Showing the GpuShaderClassWrapper.h also in the vc15 aftereffect project.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Run ClassWrapper function for all backends. It only produces code in metal shading language code generation case.
operator= for GpuShaderClassWrapper
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* use factory pattern instead of updateClassWrappingInterface
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* Replace assignment operator with clone function that is more explicit.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* use Assignment operator instead of setting members in clone member function
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* add include guards.
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
* make output of MetalShaderClassWrapper::operator= non-const
Signed-off-by: Morteza Mostajab <smostajabodaveh@Apple.com>
Co-authored-by: Ingthor Hjalmarsson <ihjalmarsson@apple.com>
Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
* -ConfigTest: Python unit test updated with additional virtual display tests.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* -ConfigTest: Addressed feedbacks.
Signed-off-by: Mei Chu <meimchu@gmail.com>
* -ConfigTest: Addressing feedbacks on typos.
Signed-off-by: Mei Chu <meimchu@gmail.com>
Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
* Fixes Unicode paths on Windows
Unlike most other platforms, Windows' Unicode is standardized around
UTF-16, an encoding not compatible with "char *" arrays common in
C/C++. As such, to support Unicode correctly when using Win32 APIs,
strings must be converted to and from UTF-16 and the Unicode
versions of the APIs must be used over the ANSI versions.
This commit introduces the following:
- Utility funcions for converting between UTF-8 and UTF-16LE on all
platforms:
- Platform::Utf8ToUtf16
- Platform::Utf16ToUtf8
- Adds test for these conversion functions to ensure the conversion
to and from UTF-8 and UTF-16LE is correct.
- Utility wrappers for "std::ifstream" that automatically convert
to and from UTF-16 so that filenames requiring Unicode encoding
function correctly:
- Platform::CreateInputFileStream
- Platform::OpenInputFileStream
- Moves the file default compute hash function to the Platform
class (Platform::CreateFileContentHash) and switches to the
Win32 UTF-16 variant on Windows.
- Adds the "UNICODE" macro before including "Windows.h" which
ensures all functions called are the Unicode variants instead of
the default ANSI variants.
- Implicitly changes functions such as GetEnvironmentVariable and
SetEnvironmentVariable to their Unicode variants.
- Changes the following environment variable related functions to
their Win32 Unicode variants on Windows:
- environ -> _wenviron
- _putenv_s -> _wputenv_s
- Updates tests using SetEnvironmentVariable to use wide string
literals since that function has been switched to the Unicode
variant.
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* Moved UNICODE and _UNICODE definitions to CMake
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* handle empty strings and use const references
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* only use wenviron when unicode is enabled
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* add ANSI Win32 version of Getenv
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* Add CMake option for compiling with Win32 Unicode support
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* Throw exception if UTF functions are called on non-Windows platforms
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* Throw OCIO Exception
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* Don't run UTF-8/16 conversion test on non-Windows
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* Fix CMake error
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* minor CMake adjustment
Signed-off-by: itsmattkc <itsmattkc@gmail.com>
* Clarified CMake option for Win32 unicode
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* minor improvements
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* fix macro in cpu test cmake
Signed-off-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
This duplicate seems to come from the PR #1371.
This PR spanned April 15 - August 24 (2021).
Meanwhile, PR #1410 (June 13 - June 21),
changed the CMake logic around `find_package(pybind11 ...)`.
It looks like former PR mishandled the merge of the latter.
Signed-off-by: Guillaume Papin <guillaume.papin@epitech.eu>
* Add support for OpenGL ES as a shading language
This commit adds two new entries to `GpuLanguage`,
`GPU_LANGUAGE_GLSL_ES_1_0` and `GPU_LANGUAGE_GLSL_ES_3_0`.
The only meaningful differences w.r.t. stock OpenGL are:
- the 1D texture optimization isn't applied to ES, as they are not
supported at all;
- the texture<N>D() calls are replaced in GLSL ES 3 by a call to
texture().
Fixes#1486
Signed-off-by: L. E. Segovia <13498015+amyspark@users.noreply.github.com>
* GLSL ES: remove ABI break
Signed-off-by: L. E. Segovia <13498015+amyspark@users.noreply.github.com>
* OpenGLBuilder: use switch to check GLSL version
Signed-off-by: L. E. Segovia <13498015+amyspark@users.noreply.github.com>
@@ -52,7 +52,7 @@ This charter (the "Charter") sets forth the responsibilities and proce
7. Intellectual Property Policy
* **a.** Participants acknowledge that the copyright in all new contributions shall be retained by the copyright holder as independent works of authorship and that no contributor or copyright holder will be required to assign copyrights to the Project.
* **b.** Except as described in Section 7.c., all code contributions to the Project are subject to the following:
* **i.** All new inbound code contributions to the Project must be made using the **BSD 3-Clause License (available here: [https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/master/LICENSE](https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/master/LICENSE))** (the "Project License").
* **i.** All new inbound code contributions to the Project must be made using the **BSD 3-Clause License (available here: [https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/main/LICENSE](https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/main/LICENSE))** (the "Project License").
* **ii.** All new inbound code contributions must:
1. be made pursuant to a duly executed Project Contribution License Agreement (the "CLA"), available on the Project's web site; and
2. be accompanied by a Developer Certificate of Origin ([http://developercertificate.org](http://developercertificate.org)) sign-off in the source code system that is submitted through a TSC-approved contribution process which will bind the authorized contributor and, if not self-employed, their employer to the applicable license;
* Do a patch against 1.1 that fixes a few minor things?
* Consensus is that we should make 1.1.1 with some important non-breaking patches and release that fix right away.
* **TODO**: Patrick will send Slack the list of candidate commits for a 1.1.1.
* Do we make an intermediate release from master before v2.0? People want a "developer preview" to be able to use the new GPU path.
* Do we make an intermediate release from main before v2.0? People want a "developer preview" to be able to use the new GPU path.
* Patrick reluctant to make a full release.
* Proposal: just make a "developer preview" tag in master to designate a point we think is stable and has some helpful new features, but we don't promise any support or compatibility with the eventual v2.
* Proposal: just make a "developer preview" tag in main to designate a point we think is stable and has some helpful new features, but we don't promise any support or compatibility with the eventual v2.
* Down side: people will use it and expect us to support it.
* No consensus that this is a good idea. Mark especially doesn't like unsupported dev preview tag.
* But v2 will NOT be ready by SIGGRAPH 2019. In light of this, Mark thinks maybe we should have a real intermediate release.
option(OCIO_USE_SIMD"Specify whether to enable SIMD CPU performance optimizations"ON)
option(OCIO_USE_OIIO_FOR_APPS"Request OIIO to build apps (ociolutimage, ocioconvert and ociodisplay), the default uses OpenEXR."OFF)
option(OCIO_USE_SSE"Specify whether to enable SSE CPU performance optimizations"ON)
option(OCIO_USE_OPENEXR_HALF"Specify whether to use an OpenEXR/IlmBase install of the Half library (<=v2.5) instead of the newer Imath library (>=v3.0)"OFF)
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: Baker
:module:PyOpenColorIO
In certain situations it is necessary to serialize transforms into a variety of application specific LUT formats. Note that not all file formats that may be read also support baking.
Set the looks to be applied during baking. Looks is a potentially comma (or colon) delimited list of lookNames, where +/- prefixes are optionally allowed to denote forward/inverse look specification. (And forward is assumed in the absence of either).
Override the default shaper LUT size. Default value is -1, which allows each format to use its own most appropriate size. For the CLF format, the default uses a half-domain LUT1D (which is ideal for scene-linear inputs).
Set an *optional*:ref:`ColorSpace` to be used to shape / transfer the input colorspace. This is mostly used to allocate an HDR luminance range into an LDR one. If a shaper space is not explicitly specified, and the file format supports one, the :ref:`ColorSpace` Allocation will be used (not implemented for all formats).
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: BitDepth
:module:PyOpenColorIO
Used in a configuration file to indicate the bit-depth of a color space, and by the :ref:`Processor` to specify the input and output bit-depths of images to process. Note that :ref:`Processor` only supports: UINT8, UINT10, UINT12, UINT16, F16 and F32.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: BuiltinTransform
:module:PyOpenColorIO
A built-in transform is similar to a :ref:`FileTransform`, but without the file. OCIO knows how to build a set of commonly used transforms on-demand, thus avoiding the need for external files and simplifying config authoring.
Select an existing built-in transform style from the list accessible through :cpp:class:`:ref:`BuiltinTransformRegistry``. The style is the ID string that identifies which transform to apply.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: CDLTransform
:module:PyOpenColorIO
An implementation of the ASC Color Decision List (CDL), based on the ASC v1.2 specification.
**ASC_SOP**
Slope, offset, power:: out = clamp( (in * slope) + offset ) ^ power
..note::
If the config version is 1, negative values are clamped if the power is not 1.0. For config version 2 and higher, the negative handling is controlled by the CDL style.
Load the CDL from the src .cdl, .cc, or .ccc file.
..note::
The cccid can be the ID of a CDL or the index of the CDL (as string). If cccid is NULL or empty the first CDL is returned. The cccid is case-sensitive. The src must be an absolute path reference, no relative directory or envvar resolution is performed. Throws if file does not contain any CDL or if the specified cccid is not found.
Load all of the CDLs in a .cdl or .ccc file into a single :ref:`GroupTransform`.
..note::
This may be useful as a quicker way for applications to check the contents of each of the CDLs. The src must be an absolute path reference, no relative directory or envvar resolution is performed.
Use CDL_ASC to clamp values to [0,1] per the ASC spec. Use NO_CLAMP to never clamp values (regardless of whether power is 1.0). The NO_CLAMP option passes negatives through unchanged (like the NEGATIVE_PASS_THRU style of :ref:`ExponentTransform`). The default style is CDL_NO_CLAMP.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:function:: ClearAllCaches() -> None
:module:PyOpenColorIO
During normal usage, OpenColorIO tends to cache certain global information (such as the contents of LUTs on disk, intermediate results, etc.). Calling this function will flush all such information. The global information are related to LUT file identifications, loaded LUT file content and CDL transforms from loaded CDL files.
Under normal usage, this is not necessary, but it can be helpful in particular instances, such as designing OCIO profiles, and wanting to re-read luts without restarting.
..note::
The method does not apply to instance specific caches such as the processor cache in a config instance or the GPU and CPU processor caches in a processor instance. Here deleting the instance flushes the cache.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: ColorSpace
:module:PyOpenColorIO
The *:ref:`ColorSpace`* is the state of an image with respect to colorimetry and color encoding. Transforming images between different *ColorSpaces* is the primary motivation for this library.
While a complete discussion of color spaces is beyond the scope of header documentation, traditional uses would be to have *ColorSpaces* corresponding to: physical capture devices (known cameras, scanners), and internal 'convenience' spaces (such as scene linear, logarithmic).
*ColorSpaces* are specific to a particular image precision (float32, uint8, etc.), and the set of ColorSpaces that provide equivalent mappings (at different precisions) are referred to as a 'family'.
Add an alias for the color space name (the aliases may be used as a synonym for the name). Nothing will be added if the alias is already the color space name, one of its aliases, or the argument is null. The aliases must not conflict with existing roles, color space names, named transform names, or other aliases. This is verified when adding the color space to the config.
If this colorspace needs to be transferred to a limited dynamic range coding space (such as during display with a GPU path), use this allocation to maximize bit efficiency.
It is sometimes useful for applications to group color spaces based on how the color values are digitally encoded. For example, images in scene-linear, logarithmic, video, and data color spaces could have different default views. Unlike the Family and EqualityGroup attributes of a color space, the list of Encodings is predefined in the OCIO documentation (rather than being config-specific) to make it easier for applications to utilize.
Here is an example config entry that could appear under a :ref:`ColorSpace`:
..code-block:: cpp
encoding: scene-linear
Encoding strings are not case-sensitive. Although users may add their own encodings, the strings will typically come from a fixed set listed in the documentation (similar to roles).
Get the :ref:`ColorSpace` group name (used for equality comparisons) This allows no-op transforms between different colorspaces. If an equalityGroup is not defined (an empty string), it will be considered unique (i.e., it will not compare as equal to other ColorSpaces with an empty equality group). This is often, though not always, set to the same value as 'family'.
A category is used to allow applications to filter the list of color spaces they display in menus based on what that color space is used for.
Here is an example config entry that could appear under a :ref:`ColorSpace`:
..code-block:: cpp
categories: [ file-io, working-space, basic-3d ]
The example contains three categories: 'file-io', 'working-space' and 'basic-3d'.
..note::
Category strings are not case-sensitive and the order is not significant.
There is no limit imposed on length or number. Although users may add their own categories, the strings will typically come from a fixed set listed in the documentation (similar to roles).
ColorSpaces that are data are treated a bit special. Basically, any colorspace transforms you try to apply to them are ignored. (Think of applying a gamut mapping transform to an ID pass). However, the setDataBypass method on :ref:`ColorSpaceTransform` and :ref:`DisplayViewTransform` allow applications to process data when necessary. (Think of sending mattes to an HDR monitor.)
This is traditionally used for pixel data that represents non-color pixel data, such as normals, point positions, ID information, etc.
Add a new color space to the config instance. The output of the userTransform must be in the specified connectionColorSpace.
Note: If the config does not already use categories, we do not add them since that would make a big change to how existing color spaces show up in menus.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: ColorSpaceMenuHelper
:module:PyOpenColorIO
Helper class to create menus for the content of a config.
Menu can list color spaces, roles, named transforms. Each entry has a name, a UI name, a description, and a family. Family can also be accessed as hierarchy levels; levels are created by splitting the family using the 'family separator'. Hierarchy levels are meant to be used as sub-menus.
The UI name is what is intended to be put in application menus seen by the end-user. However, please note that the UI name is not guaranteed to remain stable between releases and so if applications need to save something it should be the 'name' rather than the 'UI name'. Currently, the only difference between the 'name' and 'UI name' is for roles.
The overall ordering of items is: color spaces, named transforms, roles, and additional color spaces. The display color spaces will either come before or after the other color spaces based on where that block of spaces appears in the config. The order of items returned by the menu helper preserves the order of items in the config itself for each type of elements, thus preserving the intent of the config author. For example, if you call getName at idx and idx+1, the name returned at idx+1 will be from farther down in the config than the one at idx as long as both are of the same type. (An application may ask for only the items in one of those blocks if it wants to handle them separately.) If the application makes use of hierarchical menus, that will obviously impose a different order on what the user sees in the menu. Though even with hierarchical menus, applications should try to preserve config ordering (which is equivalent to index ordering) for items within the same sub-menu.
Get the name to use in the menu UI. This might be different from the config name, for example in the case of roles. Will be empty if the index is out of range.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: ColorSpaceMenuParameters
:module:PyOpenColorIO
Parameters controlling which color spaces appear in menus.
The :ref:`ColorSpaceMenuHelper` class is intended to be used by applications to get the list of items to show in color space menus.
The :ref:`ColorSpaceMenuParameters` class is used to configure the behavior as needed for any given menu. Here is the algorithm used to produce a list of "items" (or strings) that will appear in a menu:
1) Use setRole to identify a role that controls a given menu. If the config has this role, then only that color space is returned. The name is set to the color space name, the UIName is presented as "<role name> (<color space name>)". It may be useful for the application to then grey-out the menu or otherwise indicate to the user that the value for this menu is not user selectable since it was pre-determined by the config. If the config does not have that role, the algorithm continues to the remaining steps.
2) The IncludeColorSpaces, SearchReferenceSpaceType, and IncludeNamedTransforms parameters are used to identify a set of items from the config that are potential candidates for use in the menu, as follows:
- IncludeColorSpaces: Set to true to include color spaces in the menu.
- SearchReferenceSpaceType: Use this to control whether the menu should include all color spaces, only display color spaces, or only non-display color spaces.
- IncludeNamedTransforms: Set to true to include named transforms in the menu.
3) The set of items from step 2 is then filtered in step 3 using the following parameters:
- AppCategories: A list of strings specified by the application based on the purpose of the menu. For example, if the menu is used to select a color space for importing an image, the application might specify the 'file-io' category, whereas if it is to select a working color space, it might specify the 'working-space' category. Application developers should document what strings they are using for each menu so that config authors know what categories to use in their configs. Alternatively, an application could let advanced users customize the string to use for a given menu in the application.
- Encodings: A list of strings used to further refine the items selected from the AppCategories. For example, an application might specify 'working-space' as the category and then specify 'scene-linear' as the encoding to only use items that have both of those properties (e.g., only select scene-linear working color spaces).
- UserCategories: A list of strings specified by the end-user of the application. OCIO will check for these strings in an environment variable, or they may be passed in from the application.
Basically the intent is for the filtering to return the intersection of the app categories, encoding, and user categories. However, some fall-backs are in place to ensure that the filtering does not remove all menu items. Here is the detailed description:
3a) The items from step 2 are filtered to generate a list of appItems containing only the ones that contain at least one of the AppCategories strings in their "categories" property and one of the encodings in their "encoding" property. If this list is empty, an attempt is made to generate a non-empty appItems list by only filtering by AppCategories. If that is empty, an attempt is made to only filter by Encodings.
3b) The items from step 2 are filtered to generate a list of userItems containing only the ones that have at least one of the UserCategories strings in their "categories" property.
3c) If both appItems and userItems are non-empty, a list of resultItems will be generated as the intersection of those two lists.
3d) If the resultItems list is empty, the appList will be expanded by only filtering by AppCategories and not encodings. The resultItems will be formed again as the intersection of the appItems and userItems.
3e) If the resultItems is still empty, it will be set to just the appItems from step 3a.
3f) If the resultItems is still empty, it will be set to just the userItems.
3g) If the resultItems is still empty, the items are not filtered and all items from step 2 are returned. The rationale is that if step 2 has produced any items, it is not acceptable for step 3 to remove all of them. An application usually expects to have a non-zero number of items to display in the menu. However, if step 2 produces no items (e.g. the application requests only named transforms and the config has no named transform), then no items will be returned.
4) If IncludeRoles is true, the items from step 3 are extended by including an item for each role. The name is set to the role name, the UIName is presented as "<role name> (<color
space name>)", and the family is set to "Roles".
5) If AddColorSpace has been used to add any additional items, these are appended to the final list.
Add an additional color space (or named transform) to the menu.
Note that an additional color space could be:
- an inactive color space,
- an active color space not having at least one of the selected categories,
- a newly created color space. Will throw when creating the menu if color space is not part of the config. Nothing is done if it is already part of the menu. It's ok to call this multiple times with the same color space, it will only be added to the menu once. If a role name is passed in, the name in the menu will be the color space name the role points to.
App categories is a comma separated list of categories. If appCategories is not NULL and not empty, all color spaces that have one of the categories will be part of the menu.
Include all roles (or not) to :ref:`ColorSpaceMenuHelper`. Default is not to include roles. Roles are added after color spaces with an single hierarchy level named "Roles".
User categories is a comma separated list of categories. If OCIO_USER_CATEGORIES_ENVVAR env. variable is defined and not empty, this parameter is ignored and the value of the env. variable is used for user categories.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: ColorSpaceSet
:module:PyOpenColorIO
The *:ref:`ColorSpaceSet`* is a set of color spaces (i.e. no color space duplication) which could be the result of :ref:`Config::getColorSpaces` or built from scratch.
..note::
The color spaces are decoupled from the config ones, i.e., any changes to the set itself or to its color spaces do not affect the original color spaces from the configuration. If needed, use :ref:`Config::addColorSpace` to update the configuration.
If another color space is already registered with the same name, this will overwrite it. This stores a copy of the specified color space(s). Throws if one of the aliases is already assigned as a name or alias to an existing color space.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: Context
:module:PyOpenColorIO
:ref:`Context`
A context defines some overrides to a :ref:`Config`. For example, it can override the search path or change the value of a context variable.
..note::
Only some :ref:`Config::getProcessor` methods accept a custom context; otherwise, the default context instance is used (see Config::getCurrentContext).
:ref:`Context` Variables
The context variables allow changes at runtime using environment variables. For example, a color space name (such as src & dst for the :ref:`ColorSpaceTransform`) or a file name (such as LUT file name for the :ref:`FileTransform`) could be defined by context variables. The color transformation is then customized based on some environment variables.
In a config the context variables support three syntaxes (i.e. ${VAR}, $VAR and VAR%) and the parsing starts from longest to shortest. So, the resolve works like '$TEST_$TESTING_$TE' expands in this order '2 1 3'.
:ref:`Config` authors are recommended to include the "environment" section in their configs. This improves performance as well as making the config more readable. When present, this section must declare all context variables used in the config. It may also provide a default value, in case the variable is not present in the user's environment.
A context variable may only be used in the following places:
- the `:ref:`ColorSpaceTransform`` to define the source and the destination color space names,
- the `:ref:`FileTransform`` to define the source file name (e.g. a LUT file name),
- the search_path,
- the cccid of the `:ref:`FileTransform`` to only extract one specific transform from the CDL & CCC files.
Some specific restrictions are worth calling out:
- they cannot be used as either the name or value of a role,
- the context variable characters $ and % are prohibited in a color space name.
Build the resolved and expanded filepath using the search_path when needed, and check if the filepath exists. If it cannot be resolved or found, an exception will be thrown. The method argument is directly from the config file so it can be an absolute or relative file path or a file name.
..note::
The filepath existence check could add a performance hit.
..note::
The context variable resolution is performed using :cpp:func:`resolveStringVar`.
Resolve all the context variables from the string. It could be color space names or file names. Note that it recursively applies the context variable resolution. Returns the string unchanged if it does not contain any context variable.
Resolve all the context variables from the string and return all the context variables used to resolve the string (empty if no context variables were used).
The returned pointer may be used to set the value of any dynamic properties of the requested type. Throws if the requested property is not found. Note that if the processor contains several ops that support the requested property, only one can be dynamic.
..note::
The dynamic properties in this object are decoupled from the ones in the :ref:`Processor` it was generated from. For each dynamic property in the :ref:`Processor`, there is one in the CPU processor.
Get the processor from the working color space to (display, view) pair (forward) or (display, view) pair to working (inverse). The working color space name could be a role name or a color space name. ChannelView can be empty. If not already present, each of these functions adds ExposureContrastTransforms to enable changing exposure, contrast, and gamma after the processor has been created using dynamic properties.
Add a new (display, view) pair and the new color space to a configuration instance. The input to the userTransform must be in the specified connectionColorSpace.
Remove a (display, view) pair including the associated color space (only if not used). Note that the view is always removed but the display is only removed if empty.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: DynamicProperty
:module:PyOpenColorIO
Allows transform parameter values to be set on-the-fly (after finalization). For example, to modify the exposure in a viewport. Dynamic properties can be accessed from the `:ref:`CPUProcessor`` or `:ref:`GpuShaderCreator`` to change values between processing.
Get the property as DynamicPropertyDoubleRcPtr to access the double value. Will throw if property type is not a type that holds a double such as DYNAMIC_PROPERTY_EXPOSURE.
Get the property as DynamicPropertyGradingPrimaryRcPtr to access the :ref:`GradingPrimary` value. Will throw if property type is not DYNAMIC_PROPERTY_GRADING_PRIMARY.
Get the property as DynamicPropertyGradingRGBCurveRcPtr to access the GradingRGBCurveRcPtr value. Will throw if property type is not DYNAMIC_PROPERTY_GRADING_RGBCURVE.
Get the property as DynamicPropertyGradingToneRcPtr to access the :ref:`GradingTone` value. Will throw if property type is not DYNAMIC_PROPERTY_GRADING_TONE.
Get the property as DynamicPropertyDoubleRcPtr to access the double value. Will throw if property type is not a type that holds a double such as DYNAMIC_PROPERTY_EXPOSURE.
Get the property as DynamicPropertyGradingPrimaryRcPtr to access the :ref:`GradingPrimary` value. Will throw if property type is not DYNAMIC_PROPERTY_GRADING_PRIMARY.
Get the property as DynamicPropertyGradingRGBCurveRcPtr to access the GradingRGBCurveRcPtr value. Will throw if property type is not DYNAMIC_PROPERTY_GRADING_RGBCURVE.
Get the property as DynamicPropertyGradingToneRcPtr to access the :ref:`GradingTone` value. Will throw if property type is not DYNAMIC_PROPERTY_GRADING_TONE.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:exception:: ExceptionMissingFile
:module:PyOpenColorIO
An exception class for errors detected at runtime.
Thrown when OCIO cannot find a file that is expected to exist. This is provided as a custom type to distinguish cases where one wants to continue looking for missing files, but wants to properly fail for other error conditions.
Copyright Contributors to the OpenColorIO Project.
Do not edit! This file was automatically generated by share/docs/frozendoc.py.
..py:class:: ExponentTransform
:module:PyOpenColorIO
Represents exponent transform: pow( clamp(color), value ).
..note::
For configs with version == 1: Negative style is ignored and if the exponent is 1.0, this will not clamp. Otherwise, the input color will be clamped between [0.0, inf]. For configs with version > 1: Negative value handling may be specified via setNegativeStyle.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.