Wayland color management (CM) has a long history of discussions, most of which could be found here:
wayland-devel-2014-March Niels's CM proposal with a prototype
wayland-devel-2016-December Niels's enhanced CM proposal
wayland-devel-2017-December Ville's HDR POC
wayland-devel-2017-January Niels's CM protocol proposal
wayland-devel-2019-March Graeme's HDR TM comment
wayland-devel-2019-January Shashank's HDR proposal
wayland-weston-MR124 Harish's HDR implemetation
wayland-devel-2019-November Sebastian's CM proposal
wayland-protocols-MR14 Sebastian's CM MR
These are very interesting yet heated debates that deserves special attention.
The most proposals here are about usage of ICC profiles for colour management.
There are input and output colour spaces. Profile defines the colour space attributes and viewing requirements. Profile connection space(PCS) is used for concatenation of more than one profiles to create a mapping from source to target colour space. The above HDR proposals are not based on ICC profiles due to lack of HDR support in ICC.
I want to quote Jan Morovic ('Color Gamut Mapping',2008, p.93) that explains why HDR images are different from traditional images and as a result, ICC spec could not applied to HDR.
"The reason for this gap is two-fold:
Most implementations about HDR tone mapping I have found are listed below
Most implementations use shaders, some do 3D LUT creation which combines all the transforms; the question is how to connect ICC profiles with tone mapping as flexible workflow.After conducting extensive research, I decided to use LMCS - colour ICC engine library, world-acclaimed, mature, evolving since 1998. The author of LCMS Marti was very supportive and helped me to write a plugin to LCMS .Pekka and Sebastian also participated in these discussions.I implemented luminance compression pipeline, known as EETF, using ITU-R BT.2390.
LCMS has a built-in operator for sophisticated viewing conditions and many other features which can be used for HDR solution.
Here is the result of this work :MR1
In addition, there is a WIP proposal about user mode slider
Rebase color management to Weston master branch WIP color-management-rebase-master
I am proposing to take as base the spec 2390 and implement the following HDR use cases
This solution has very flexible design for HDR uses cases:
The color transform looks as following :input ICC profile + Tone mapping profile + Output profile.Profile vendors or colour scientists can override the tone mapping profile as necessary to provide superior quality which can be comparable with mastering metadata or rendering intent parameter.
The solution could be used as-is for hardware composition, but not all chips have 3DLUT and LCMS can address this by using optimization plugin as DEGAM/CTM/GAMMA pipeline. The implementation could be part of LCMS or a separate plugin( subject to discussions with Marti) that would fit to embedded and workstation systems.
Thanks to Pekka who inspired me to write this article.