Movie LUT’s inside ICC Profiles

Krita, a painting application with high dynamic range (HDR) support, is in the planning phase for the next release cycle. One hot topic is currently the discussion about what can be done to make movie makers even more happy. A good candidate is the marriage of film industry colour management with Krita’s inbuilt ICC style colour management. But Krita maintainer Boudewijn Rempt expressed surprise about movie style colour management in other apps.

This post tries to compare how both colour management worlds work and how they can better fit for the advantage of each other.

The ICC format standard is for its most popular flavors designed as a characterisation of one colour space conversion in reference to the standard observer colour space or in ICC terms the PCS. That allows a very flexible combining of ICC profiles from many different devices into colour transformations and is one of the basic principles of the ICC standard. The advantage of using existing ICC workflows is, that tools for on the fly monitor colour correction are almost all ICC based and well understood.

So, how does the movie industry currently define colour spaces in their workflows?

In short, film colour spaces are characterised by standards and not by ICC profiles. On a technically level the involved file formats use pretty much the same basics. That is, curves and 3D tables, which are available inside the ICC foraremat as well.

However colour tables of movie makers, called LUT’s, are very closely related to the intended usage during film production. These LUT’s can combine a colour space conversion from a source colour space: typically a linear gamma floating point encoding toward a final display.

A simple colour conversion with just two ICC profiles would not adequately represent how a good movie picture should look like. So adding of scaling curves is needed, to obtain a tonal representation of  brighter than white parts of a scene. That part can include logarithmic scaling or other methods. An S shaped gamma is sometimes used to get a closer to film look of the footage output and possibly more tricks are used to create a pleasing colour output. And last but not least, the simulation of the intended output device, as in a typical cinema, is most often baked into film production LUT’s.

So a LUT contains the original source colour space and many additional ingredients. Movie makers have searched for ways to use their LUTs inside traditional ICC colour managed software: in one approach, they simply placed the LUT inside a ICC profile and could use the LUT’s in more software, typical as a proofing profile. A proofing profile is a normal ICC output profile describing the colour behaviour of a single devices. For film makers that is pretty much the way they use LUT’s anyway: as colour conversions in their workflows.

The approach of LUT baking into ICC output profiles is semantically not a good fit. However, there exist two other not so well known ICC format flavors, which could be far better deployed in order to support film LUT’s style colour conversions.

The one which comes technically closest to a film LUT is the “device link profile class”. A device link profile represents a combination of a complete colour transformation over a arbitrary number of colour spaces and manipulations into one final colour profile. As input and output colour spaces are included, a device link profile is pretty much a fixed thing like a LUT. But that means, it completely misses the flexibility of normal ICC profiles: that is the ability to get combined with different devices in an almost automatic fashion, with little user interaction if at all.

Another ICC profile type candidate is the abstract or effect style” ICC profile. These profiles can be used to simulate a device, do a colour manipulation or a combination of different conversions. The big advantage of the “abstract or effect profile” class is the very common PCS reference for the input and output side. So these profiles can easily be chained between a input colour space and a monitor device profile.

Baking movie LUT’s inside abstract profiles instead of device profiles would work more nicely inside ICC style workflows. Then, applications which support effect profiles can simply select the right effect LUT without touching a source colour space or even the monitor profiles, which would, among most people familiar with ICC style colour management, be considered a hack, and with reason.

The idea of using abstract profiles inside a painting application is not new. It was demonstrated around 2004 inside the CinePaint open source application. The abstract profiles were, for convenience, called “look profiles” inside the UI. CinePaint allowed users to chain “look profiles” and comfortably enable and disable them in order to see their effect.

The “look profiles” where used on the fly, without touching the image colour space. It was also possible to apply “look profiles” irreversibly and persistently to a image. The decision for CinePaint’s “look profile” workflow was directly inspired by movie studio needs.

At the time the underlying lcms library supported only 8 and 16-bit per channel. With the upcoming half floating point support in lcms, the “look profile” workflow starts soon to make sense as well for OpenEXR images. Lcms implemented further support of floating point elements inside ICC profiles to meet higher precision needs of the film industry. It will be interesting to see how this can be utilised.