Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
63b3f8f
ProPhotoRGB builtin transforms
ssh4net Oct 30, 2025
f594bdc
reverting ocio rst and white space in BuiltinTransforRegistry
ssh4net Oct 31, 2025
078b30c
Revert colorspaces doc. Removed inverse transforms
ssh4net Oct 31, 2025
ae4bf52
Tests update
ssh4net Oct 31, 2025
73fa432
Update ProPhotoRGB transform and tests
ssh4net Nov 3, 2025
46f75db
Fix test data structure in BuiltinTransform_tests.cpp
ssh4net Nov 3, 2025
c53956a
Merge branch 'AcademySoftwareFoundation:main' into ROMM
ssh4net Apr 7, 2026
a970185
Remove ProPhoto sRGB-gamma variant and tests
ssh4net Apr 7, 2026
4680cbf
fix CPU test sources
ssh4net Apr 8, 2026
4667582
Add ROMM->CIE-XYZ builtin and update tests
ssh4net Apr 8, 2026
07bb550
Use ROMM RGB -> XYZ(D50) matrix and adapt
ssh4net Apr 9, 2026
c653713
Update ProPhotoRGB conversion matrix and cleanup
ssh4net Apr 14, 2026
26d5d00
Update ProPhotoRGB conversion matrix and cleanup
ssh4net Apr 14, 2026
7381983
Update ProPhotoRGB conversion matrix and cleanup
ssh4net Apr 14, 2026
728cbac
Merge branch 'ROMM' of https://github.com/ssh4net/OpenColorIO into ROMM
ssh4net Apr 14, 2026
4d42e43
Merge branch 'ROMM' of https://github.com/ssh4net/OpenColorIO into ROMM
ssh4net Apr 14, 2026
6be541c
Merge branch 'ROMM' of https://github.com/ssh4net/OpenColorIO into ROMM
ssh4net Apr 14, 2026
4516b53
Build ROMM->CIE XYZ D65 matrix dynamically
ssh4net Apr 15, 2026
68a797e
Update expected BFD values in BuiltinTransform tests
ssh4net Apr 15, 2026
5b62bea
Require config v2.6 for ROMM/LINEAR builtins
ssh4net Apr 16, 2026
f0a41a9
Fix parentheses in version consistency check
ssh4net Apr 16, 2026
80d0fd1
Support OCIO config minor version 2.6 and tests
ssh4net Apr 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/OpenColorIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ set(SOURCES
transforms/builtins/CanonCameras.cpp
transforms/builtins/Displays.cpp
transforms/builtins/PanasonicCameras.cpp
transforms/builtins/ProPhotoRGB.cpp
transforms/builtins/RedCameras.cpp
transforms/builtins/SonyCameras.cpp
transforms/BuiltinTransform.cpp
Expand Down
2 changes: 2 additions & 0 deletions src/OpenColorIO/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5647,6 +5647,8 @@ void Config::Impl::checkVersionConsistency(ConstTransformRcPtr & transform) cons
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-1000nit-REC2020-D60-in-REC2020-D65_2.0")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-2000nit-REC2020-D60-in-REC2020-D65_2.0")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-4000nit-REC2020-D60-in-REC2020-D65_2.0")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ROMM_to_CIE-XYZ-D65_BFD")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "LINEAR-RIMM_to_ACES2065-1_BFD")
Comment thread
ssh4net marked this conversation as resolved.
Outdated
// NB: This one was added in OCIO 2.4.1.
|| 0 == Platform::Strcasecmp(blt->getStyle(), "DISPLAY - CIE-XYZ-D65_to_DisplayP3-HDR") )
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "transforms/builtins/CanonCameras.h"
#include "transforms/builtins/Displays.h"
#include "transforms/builtins/PanasonicCameras.h"
#include "transforms/builtins/ProPhotoRGB.h"
#include "transforms/builtins/RedCameras.h"
#include "transforms/builtins/SonyCameras.h"
#include "utils/StringUtils.h"
Expand Down Expand Up @@ -117,6 +118,9 @@ void BuiltinTransformRegistryImpl::registerAll() noexcept
CAMERA::RED::RegisterAll(*this);
CAMERA::SONY::RegisterAll(*this);

// ProPhoto RGB / ROMM RGB support.
PROPHOTO::RegisterAll(*this);

// Display support.
DISPLAY::RegisterAll(*this);
}
Expand Down
121 changes: 121 additions & 0 deletions src/OpenColorIO/transforms/builtins/ProPhotoRGB.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.

#include <cmath>

#include <OpenColorIO/OpenColorIO.h>

#include "ops/gamma/GammaOp.h"
#include "ops/matrix/MatrixOp.h"
#include "transforms/builtins/ACES.h"
#include "transforms/builtins/BuiltinTransformRegistry.h"
#include "transforms/builtins/ColorMatrixHelpers.h"
#include "transforms/builtins/OpHelpers.h"
#include "transforms/builtins/ProPhotoRGB.h"

namespace OCIO_NAMESPACE
{

// ProPhoto RGB / ROMM RGB (Reference Output Medium Metric RGB)
// Specified in ANSI/I3A IT10.7666:2003
//
// Primaries and white point.
namespace ROMM_RGB
{

static const Chromaticities red_xy(0.7347, 0.2653);
static const Chromaticities grn_xy(0.1596, 0.8404);
static const Chromaticities blu_xy(0.0366, 0.0001);
static const Chromaticities wht_xy(0.3457, 0.3585); // D50

const Primaries primaries(red_xy, grn_xy, blu_xy, wht_xy);

} // namespace ROMM_RGB

// ROMM RGB uses a piecewise gamma function with gamma 1.8.
//
// Encoded to Linear (decoding):
// if (encoded < 1.0 / 512.0): // breakpoint = 16 * 1.0 / 512.0
// linear = encoded / 16.0
// else:
// linear = encoded ^ 1.8
//
// Linear to Encoded (encoding):
// if (linear < 1.0 / 512.0):
// encoded = linear * 16.0
// else:
// encoded = linear ^ (1/1.8)
//
namespace ROMM_RGB_GAMMA_18
{

static constexpr double gamma = 1.8;
static constexpr double slope = 16.0; // Slope of linear segment.
static constexpr double breakEnc = 1.0 / 32.0; // Encoded breakpoint

void GenerateEncodedToLinearOps(OpRcPtrVec &ops)
{
// Encoded gamma 1.8 to linear curve using LUT for accuracy.
auto GenerateLutValues = [](double in) -> float
{
const double absIn = std::abs(in);
double out = 0.0;

if (absIn < breakEnc)
{
out = absIn / slope;
}
else
{
out = std::pow(absIn, gamma);
}

return float(std::copysign(out, in));
};

CreateHalfLut(ops, GenerateLutValues);
}

} // namespace ROMM_RGB_GAMMA_18

namespace PROPHOTO
{

void RegisterAll(BuiltinTransformRegistryImpl &registry) noexcept
{
// Linear ProPhoto RGB to ACES2065-1.
{
auto LINEAR_RIMM_to_ACES2065_1_BFD_Functor = [](OpRcPtrVec &ops)
{
// Convert from ROMM RGB (D50) to ACES AP0 (D60).
// Uses Bradford chromatic adaptation.
MatrixOpData::MatrixArrayPtr matrix = build_conversion_matrix(ROMM_RGB::primaries,
ACES_AP0::primaries,
ADAPTATION_BRADFORD);
CreateMatrixOp(ops, matrix, TRANSFORM_DIR_FORWARD);
};

registry.addBuiltin("LINEAR-RIMM_to_ACES2065-1_BFD",
"Convert ProPhoto RGB (linear) to ACES2065-1",
LINEAR_RIMM_to_ACES2065_1_BFD_Functor);
}

// Encoded ProPhoto RGB (gamma 1.8) to CIE XYZ D65.
{
auto ROMM_to_CIE_XYZ_D65_BFD_Functor = [](OpRcPtrVec &ops)
{
ROMM_RGB_GAMMA_18::GenerateEncodedToLinearOps(ops);

MatrixOpData::MatrixArrayPtr matrix = build_conversion_matrix_to_XYZ_D65(ROMM_RGB::primaries, ADAPTATION_BRADFORD);
CreateMatrixOp(ops, matrix, TRANSFORM_DIR_FORWARD);
};

registry.addBuiltin("ROMM_to_CIE-XYZ-D65_BFD",
"Convert ProPhoto RGB (gamma 1.8 encoded) to CIE XYZ D65",
Comment thread
ssh4net marked this conversation as resolved.
Outdated
ROMM_to_CIE_XYZ_D65_BFD_Functor);
}
}

} // namespace PROPHOTO
Comment thread
ssh4net marked this conversation as resolved.
Outdated

} // namespace OCIO_NAMESPACE
24 changes: 24 additions & 0 deletions src/OpenColorIO/transforms/builtins/ProPhotoRGB.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.


#ifndef INCLUDED_OCIO_PROPHOTO_RGB_H
#define INCLUDED_OCIO_PROPHOTO_RGB_H


namespace OCIO_NAMESPACE
{

class BuiltinTransformRegistryImpl;

namespace PROPHOTO
{

void RegisterAll(BuiltinTransformRegistryImpl& registry) noexcept;

} // namespace PROPHOTO
Comment thread
ssh4net marked this conversation as resolved.
Outdated

} // namespace OCIO_NAMESPACE


#endif // INCLUDED_OCIO_PROPHOTO_RGB_H
1 change: 1 addition & 0 deletions tests/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ set(SOURCES
transforms/builtins/Displays.cpp
transforms/builtins/OpHelpers.cpp
transforms/builtins/PanasonicCameras.cpp
transforms/builtins/ProPhotoRGB.cpp
transforms/builtins/RedCameras.cpp
transforms/builtins/SonyCameras.cpp
SystemMonitor.cpp
Expand Down
9 changes: 8 additions & 1 deletion tests/cpu/transforms/BuiltinTransform_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,14 @@ AllValues UnitTestValues
{ "DISPLAY - CIE-XYZ-D65_to_REC.2100-HLG-1000nit",
{ 6.0e-5f,
{ 0.5f, 0.4f, 0.3f, -0.1f, 1.01f, 0.2f },
{ 0.5649694f, 0.4038837f, 0.3751478f, -0.505630434f, 0.738133013f, 0.251128823f } } }
{ 0.5649694f, 0.4038837f, 0.3751478f, -0.505630434f, 0.738133013f, 0.251128823f } } },
{ "ROMM_to_CIE-XYZ-D65_BFD",
{ 1.0e-6f,
{ 0.5f, 0.4f, 0.3f, 0.03f, 0.02f, 0.01f},
{ 0.248054191470f, 0.216382518411f, 0.124372318387f, 0.001608968596f, 0.001407349831f, 0.000677472563f} } },
{ "LINEAR-RIMM_to_ACES2065-1_BFD",
{ 1.0e-6f,
{0.5f, 0.4f, 0.3f}, {0.47351069f, 0.39131449f, 0.29965645f} } }
};

} // anon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,8 @@ OCIO_ADD_TEST(Builtins, version_2_3_validation)
TestStyle("ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-1000nit-REC2020-D60-in-REC2020-D65_2.0");
TestStyle("ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-2000nit-REC2020-D60-in-REC2020-D65_2.0");
TestStyle("ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-4000nit-REC2020-D60-in-REC2020-D65_2.0");

// ProPhotoRGB / ROMM RGB builtin transforms.
TestStyle("ROMM_to_CIE-XYZ-D65_BFD");
TestStyle("LINEAR-RIMM_to_ACES2065-1_BFD");
}
Loading