8. Color Management
This page gives in-depth technical details on rendering and color management in Cinecred. If you are not familiar with color spaces, it will be hardly interesting.
Cinecred renders in 32-bit floating point RGBA and converts from/to the actually ingested or outputted pixel format as the first respectively last step. Color math is implemented by the zimg library.
ICC profiles of embedded pictures and CICP tags (ISO/IEC 23091-2) of embedded videos are observed. If this information is missing, Cinecred assumes sRGB for pictures and BT.709 for videos.
Gamut
The rendering gamut is equivalent to the particular output gamut, e.g., when delivering in BT.2020, rendering will also occur in BT.2020. Rendering is color-managed: when necessary, colors will be converted between gamuts in a relative colorimetric way.
Out-of-gamut colors will be reduced to the rendering gamut by just clipping the RGB channels. This can naturally lead to artifacts for very out-of-gamut colors. In such cases, try to use suitable software to conform embedded pictures and videos to the rendering gamut ahead of time.
Transfer Characteristics
Rendering is not done in linear light but with a gamma of 2.2. There are multiple reasons for this:
- Over decades of computer graphics, users became used to blending happening in the sRGB transfer characteristics, and gamma 2.2 is very close to them.
- Linear light wouldn’t be perceptually uniform, i.e., doubling the color value (which for linear light directly corresponds to the number of photons) doesn’t lead to double the perceived brightness. In contrast, gamma 2.2 does a better job of modelling this, so it provides a pretty good scale of perceived brightness. Due to this, in gamma 2.2 linearly increasing the alpha is actually perceived as a linear fade-in.
- Additionally, in linear light, the antialiasing of text and other vector graphics would make white-on-black text appear thicker than black-on-white text. The perceptual brightness modelling of gamma 2.2 fixes this imbalance.
Ingested and outputted colors with other transfer characteristics are of course accurately converted. Some transfer characteristics specify different functions for the scene-referred case (OETF: opto-electronic transfer function) and the display-referred case (EOTF: electro-optical transfer function). Cinecred always uses the display-referred EOTF and its inverse. This is communicated in the UI: the term EOTF is prevalent, and the BT.709 transfer characteristics are referred to as BT.1886.
HDR
Cinecred is fully capable of processing HDR brightness ranges. When ingesting or outputting with an HDR EOTF, SDR white (the color where all RGB channels in any traditional gamma are 1) needs to be mapped to a particular encoded pixel value:
- For PQ, SDR white is mapped to a luminance of 203 cd/m², as recommended by BT.2408.
- For HLG, SDR white is mapped to an encoded pixel value of 0.75. When this value is displayed on a 1000 cd/m² display, it also comes out as 203 cd/m².
Thanks to those fixed mappings, when you, e.g., insert a PQ video into your credits and then deliver also in PQ, the embedded video’s brightness will be exactly preserved.
Color Picker
Cinecred offers a color picker that lets you input colors in any color space, so you could, e.g., specify exact BT.2020 PQ pixel values of the credits text. If you then deliver in BT.2020 PQ, the delivered video will naturally exhibit exactly those pixel values thanks to the color management.