future of hdr colorspaces

Boudewijn Rempt boud at valdyas.org
Thu May 31 09:58:12 UTC 2012

Right now, HDR colorspaces are implemented in the OpenCTL based ctlcs. 
I've recently added the erase composite op those, but finishing those 
colorspaces will be a lot of work.

If we want to make Simon and his colleages happy we need HDR painting,
though. Recently Cyrille suggested to check how easy it would be to
use LCMS's new floating point support to re-use our existing lcms-based 
template classes to support HDR painting.

I've created a test rgbaf32 colorspace in the 
calligra/pigment-lcms2_rgbaf32-rempt branch. It seems to work fine. I'm 
not sure whether the performance is better or worse than ctlcs; it's a bit 
slow for sure.

I'm also not sure about the way forward, both approaches have their pros 
and cons.


* doesn't support the "half" (f16) format, so we would have to convert to 
full 32 bits float on loading half-based exr files, and convert back on saving, 
plus we double memory requirements.

* suppors only a few profiles, though the default linear scRGB seems to 
work fine.

* it would be easy to just create lab, xyz, gray and cmyk f32 colorspaces 
like the rgb one I just did.

* it also supports f64 -- might be handy...

* all existing transformations are supported, as far as I can tell, so all 
filters work


* Cyrille said he wanted to redo the syntax for the composite ops, which 
should make it easier to write new composite ops. But that's not done,
and the set of composite ops is too small

* color transformation generally use the fallback mechanism, which means 
that applying a filter removes all the extra precision

* but: supports half (f16), so that's good for memory consumption and 

* I'm not sure, but it feels a bit faster perhaps?


In general, there are quite a few hdr painting bugs we need to fix:

242505 Krita converts an image from hdr to lab and back when applying a KisColorTransformationFilter-based filter
288719 16 and 32 bits float : Channels disable and lock don't work
288714 16 and 32 bits float : Layer "lock" when moving exposure
288722 16 and 32 bits float : Many filters don't work
288713 16 and 32 bits float : Multiply and other blending modes don't work
288716 	16 and 32 bits float : No way to select high range colors with current color selectors

Oh, and studios seem to be using a third color management thingie: 
OpenColorIO (http://opencolorio.org), but I haven't really looked into 
that yet.


More information about the kimageshop mailing list