Best of existing LUT formats

It would be ideal if CLF was able to encapsulate a LUT from any other LUT format without modification. But I think that is unfortunately not possible. The issue that springs immediately to mind is .csp , with its ability to have arbitrarily spaced input entries in its preLUTs. This can be represented as an IndexMap in the current CLF format, but since IndexMaps with length >2 are not required under the current spec (and therefore not supported in either the Resolve or Autodesk implementations) .csp LUTs with non-uniform input domains cannot be reliably represented as a CLF using that approach.

My work-in-progress CLF code in Colour Science for Python can load any of the valid sample Cinespace LUTs from here, and save them as CLF LUTs which will work in Colour. However @hpduiker 's Python sample implementation is the only other place I have found that they work properly. Only some work in Resolve and Flame, due to the “un-required” elements of CLF. And we are looking at removing such components from the spec.

So the question is how to accurately replicate the transform from a .csp with a non-uniform domain when translating it to CLF. The options I can see are:

  • IndexMap
  • halfDomain

The issue with the use of an IndexMap are that is is difficult to implement in a real-time system, which I gather is why it is currently not a required component of CLF. The benefit is that it could be translated back exactly to the original .csp preLUT.

A possible concern with halfDomain is that it is not implemented in any other mainstream LUT format, so if a transform is ‘translated’ from another LUT format to halfDomain it cannot be easily automatically translated back. The benefits are that it can efficiently implement a 1D transform on any value representable in half-float, with no interpolation required if the output is also to be half-float.

So I guess the question is, how many people are using the non-uniform input domain capabilities of Cinespace LUTs? Would it be an issue if these could not be directly replicated in CLF?