OpenColorIO
OpenColorIO copied to clipboard
xyY calculation will fail
In the process of trying to fix this issue over at Colour, I'm 95% sure this function and the related XYZ function will fail on negatives, which as everyone know are a part of the vast majority of colour encodings for cameras and a few RGB colourspaces.
Plausible paths forward are loosely:
- Retain the signs as 1.0 or -1.0 for each of XYZ.
- Perform the flip flop math on the abs(XYZ) values.
- Return the sign accordingly for each of the x, y, or Y values, as well as Z calculations.
https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/1d36d5b70eae1180aeb50e0ec3f094f3466f6b5a/src/OpenColorIO/ops/fixedfunction/FixedFunctionOpGPU.cpp#L294