Skip to content

WIP: Color management and HDR

This MR is a continuation of @pq, @swick, @NaveenKumar MR14.

There is also rebase work of this to Weston master. It is not fully functional yet.

What is included on top of @pq, @swick, @NaveenKumar CM work:

  • Luminance compression pipeline based on spec ITU-R BT.2390.See page 23 Calculating the EETF, RGB case. It is implemented using a plugin to LCMS.

    It is the first use case from the following road map.

  • The tone mapping is done into ICtCp color space. Please see Dolby White paper.

    The knee roll-off is calculated using a Hermite spline to create a mapping that will reduce the luminance range to the capability of the target display.

image

  • client application simple-hdr-video-gbm

How the flow works:

  1. The method into '/shared/color_utils.c' 'color_space_conversion_utils' accept two profiles : source and destination. Blending is currently temporally omitted for ease of explanation. Also, EDR value is not used.

  2. The assumption is that source and destination profiles have 'lumi' tag.

  3. Method 'CreateRGB_PrefixPQ' creates a virtual profile on the fly. PQ name appears because it was prototyped first for PQ EOTF, we expect to rename this. The function denormalizes to [0-1.0] and linearizes the input signal based on the OETF type. The next step is conversion to XYZ color space known as PCS (profile connected space).

  4. Method 'Create_csc_tm_profile' builds a virtual profile on the fly to do tone mapping based on BT2390 EETF as it mentioned above. The input signal is in XYZ color space linear, the output signal is in XYZ color space linear, but tone-mapped.

  5. Function 'CreateRGB_SuffixPQ' creates a destination profile. It uses PQ or 2.2, but it would be changed to 'vcgt' tag .
    The input signal is XYZ linear tone mapped, the output signal is target color space, nonlinear. The signal is normalized back to the destination luminance. Blending is currently omitted here.

  6. The 3 profiles transform is 'smelted' into resulting 3DLUT.

Edited by Vitaly Prosyak

Merge request reports