Expand description
HDR sources brought into the SDR working space.
The working space is display-referred linear light with BT.709 primaries,
where 1.0 is SDR white. An HDR source is linearized to
display light in nits (PQ by its EOTF, HLG by its inverse OETF and the
BT.2100 OOTF at its nominal peak), converted to BT.709 primaries, and
tone-mapped from its peak to SDR white by the ITU-R BT.2390 EETF applied to
the largest component, which keeps each pixel’s hue. Components the
narrower gamut cannot hold are clipped at zero.
These functions are the reference the YUV conversion shader implements; GPU tests compare the two.
Structs§
- HdrTone
Map - How an HDR source is tone-mapped: from
source_peak_nitsto SDR white.
Constants§
- DEFAULT_
HDR_ PEAK_ NITS - The peak an HDR source is assumed to reach when a project does not say.
- SDR_
WHITE_ NITS - The luminance of SDR white, and so of the working space’s
1.0, in nits.
Functions§
- bt2390_
eetf - The ITU-R BT.2390 EETF:
nitsfrom a source reachingsource_peakmapped onto a display reachingtarget_peak, both with black at zero. Below the knee the curve is the identity; above it a Hermite spline rolls highlights off to exactlytarget_peak. A source no brighter than the target passes unchanged. - gamut_
matrix - The linear-light matrix from
from’s primaries toto’s, both with a D65 white point, as rows. BT.601 is taken as BT.709, as the SDR decode path takes it. - hdr_
to_ working - Linear working-space RGB,
1.0at SDR white, of an HDR pixel’s nonlinear components in its own primaries. - hlg_
inverse_ oetf - Scene light in
0..=1of an HLG code value (the inverse OETF). - hlg_
ootf - Display light in nits of HLG scene light shown at
peak_nits: the BT.2100 OOTF, with the system gamma for that peak. - pq_eotf
- Display luminance, in nits, of a PQ code value in
0..=1. - pq_
inverse_ eotf - The PQ code value of a display luminance in nits.