Skip to content

Commit 0c77e71

Browse files
committed
Remove ProPhoto sRGB-gamma variant and tests
Remove the ROMM_RGB_SRGB_GAMMA implementation and its registration for the PROPHOTO builtins. Deleted the sRGB-style GammaOpData helper functions and the PROPHOTO-RGB-SRGB-GAMMA_to_ACES2065-1 registry entry from src/OpenColorIO/transforms/builtins/ProPhotoRGB.cpp. Also remove the leftover commented test reference from tests/cpu/transforms/builtins/BuiltinTransformRegistry_tests.cpp. This cleans up an obsolete ProPhoto (sRGB-gamma) variant and its test artifact. Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
1 parent 05f0616 commit 0c77e71

2 files changed

Lines changed: 0 additions & 51 deletions

File tree

src/OpenColorIO/transforms/builtins/ProPhotoRGB.cpp

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -82,36 +82,6 @@ namespace OCIO_NAMESPACE
8282
} // namespace ROMM_RGB_GAMMA_18
8383

8484

85-
// ProPhoto RGB with sRGB gamma curve.
86-
// This is a common variant used by Adobe and other applications.
87-
// Uses the sRGB transfer function (gamma 2.4, offset 0.055) instead of
88-
// the standard ROMM RGB gamma 1.8 curve.
89-
namespace ROMM_RGB_SRGB_GAMMA
90-
{
91-
92-
void GenerateLinearToEncodedOps(OpRcPtrVec& ops)
93-
{
94-
// sRGB gamma encoding: gamma=2.4, offset=0.055
95-
// This uses the MONCURVE model which is efficient for sRGB-style curves.
96-
const GammaOpData::Params rgbParams = { 2.4, 0.055 };
97-
const GammaOpData::Params alphaParams = { 1.0, 0.0 };
98-
auto gammaData = std::make_shared<GammaOpData>(GammaOpData::MONCURVE_FWD,
99-
rgbParams, rgbParams, rgbParams, alphaParams);
100-
CreateGammaOp(ops, gammaData, TRANSFORM_DIR_FORWARD);
101-
}
102-
103-
void GenerateEncodedToLinearOps(OpRcPtrVec& ops)
104-
{
105-
// sRGB gamma decoding: gamma=2.4, offset=0.055
106-
const GammaOpData::Params rgbParams = { 2.4, 0.055 };
107-
const GammaOpData::Params alphaParams = { 1.0, 0.0 };
108-
auto gammaData = std::make_shared<GammaOpData>(GammaOpData::MONCURVE_REV,
109-
rgbParams, rgbParams, rgbParams, alphaParams);
110-
CreateGammaOp(ops, gammaData, TRANSFORM_DIR_FORWARD);
111-
}
112-
113-
} // namespace ROMM_RGB_SRGB_GAMMA
114-
11585

11686
namespace PROPHOTO
11787
{
@@ -155,26 +125,6 @@ namespace OCIO_NAMESPACE
155125
ROMM_to_CIE_XYZ_D65_BFD_Functor);
156126
}
157127

158-
// ProPhoto RGB with sRGB gamma to ACES2065-1.
159-
{
160-
auto ROMM_RGB_SRGB_to_ACES2065_1_Functor = [](OpRcPtrVec& ops)
161-
{
162-
// 1. Decode sRGB gamma to linear.
163-
ROMM_RGB_SRGB_GAMMA::GenerateEncodedToLinearOps(ops);
164-
165-
// 2. Convert color space from ROMM RGB (D50) to ACES AP0 (D60).
166-
MatrixOpData::MatrixArrayPtr matrix
167-
= build_conversion_matrix(ROMM_RGB::primaries,
168-
ACES_AP0::primaries,
169-
ADAPTATION_BRADFORD);
170-
CreateMatrixOp(ops, matrix, TRANSFORM_DIR_FORWARD);
171-
};
172-
173-
registry.addBuiltin("PROPHOTO-RGB-SRGB-GAMMA_to_ACES2065-1",
174-
"Convert ProPhoto RGB (sRGB gamma encoded) to ACES2065-1",
175-
ROMM_RGB_SRGB_to_ACES2065_1_Functor);
176-
}
177-
178128
}
179129

180130
} // namespace PROPHOTO

tests/cpu/transforms/builtins/BuiltinTransformRegistry_tests.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,5 +407,4 @@ OCIO_ADD_TEST(Builtins, version_2_3_validation)
407407
// ProPhotoRGB / ROMM RGB builtin transforms.
408408
TestStyle("ROMM_to_CIE-XYZ-D65_BFD");
409409
TestStyle("LINEAR-RIMM_to_ACES2065-1_BFD");
410-
//TestStyle("PROPHOTO-RGB-SRGB-GAMMA_to_ACES2065-1");
411410
}

0 commit comments

Comments
 (0)