Skip to content

Commit

Permalink
Add DISPLAY - CIE-XYZ-D65_to_DisplayP3-HDR builtin transform.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Nov 16, 2024
1 parent 9bc5b8e commit 16948ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/OpenColorIO/transforms/builtins/Displays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ void RegisterAll(BuiltinTransformRegistryImpl & registry) noexcept
registry.addBuiltin("DISPLAY - CIE-XYZ-D65_to_DisplayP3",
"Convert CIE XYZ (D65 white) to Apple Display P3",
CIE_XYZ_D65_to_DisplayP3_Functor);

// NOTE: This builtin is defined to be able to partition SDR and HDR view transforms under two separate
// displays rather than a single one.
registry.addBuiltin("DISPLAY - CIE-XYZ-D65_to_DisplayP3-HDR",
"Convert CIE XYZ (D65 white) to Apple Display P3 (HDR)",
CIE_XYZ_D65_to_DisplayP3_Functor);
}

{
Expand Down
3 changes: 3 additions & 0 deletions tests/cpu/transforms/BuiltinTransform_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ AllValues UnitTestValues
{ "DISPLAY - CIE-XYZ-D65_to_DisplayP3",
{ 1.0e-6f,
{ 0.5f, 0.4f, 0.3f }, { 0.882580907776f, 0.581526360743f, 0.5606367050000f } } },
{ "DISPLAY - CIE-XYZ-D65_to_DisplayP3-HDR",
{ 1.0e-6f,
{ 0.5f, 0.4f, 0.3f }, { 0.882580907776f, 0.581526360743f, 0.5606367050000f } } },

{ "CURVE - ST-2084_to_LINEAR",
{ 4.0e-5f,
Expand Down

0 comments on commit 16948ca

Please sign in to comment.