AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.76k stars 434 forks source link

Heuristics should avoid Lut3D transforms #1860

Closed doug-walker closed 8 months ago

doug-walker commented 11 months ago

There are some API calls such as GetProcessorToBuiltinColorSpace, isColorSpaceLinear, IdentifyInterchangeSpace, and IdentifyBuiltinColorSpace that generate Processors and evaluate pixel values. These are not currently properly avoiding color spaces where the transform stack involves a Lut3D. On some configs, this may result in very long delays if calling one of these functions.

This issue has been reported in OpenImageIO.

doug-walker commented 8 months ago

This was fixed by PR #1913 for GetProcessorToBuiltinColorSpace, IdentifyInterchangeSpace, and IdentifyBuiltinColorSpace. The fix will be in OCIO 2.3.1.

The isColorSpaceLinear method is more challenging to fix and has not been adjusted yet. However, at least in this case the user is calling it manually on individual color spaces, so the potential problem is easier to work around.