Expand description
HDR sources brought into the SDR working space.
The working space is display-referred linear BT.709 with 1.0 at SDR white. HDR is
linearized to nits (PQ by its EOTF; HLG by inverse OETF plus the BT.2100 OOTF at its nominal
peak), converted to BT.709, and tone-mapped to SDR white by the BT.2390 EETF applied to the
largest component, preserving hue. Out-of-gamut components clip at zero.
The YUV conversion shader implements these; 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 - Assumed HDR source peak when a project does not specify one.
- SDR_
WHITE_ NITS - Luminance of SDR white (working-space
1.0), in nits.
Functions§
- bt2390_
eetf - ITU-R BT.2390 EETF mapping
nitsfromsource_peaktotarget_peak, black at zero. - gamut_
matrix - Linear RGB matrix (rows) from
fromtotoprimaries, D65 white. BT.601 is treated as BT.709, as the SDR path does. - hdr_
to_ working - Working-space linear RGB 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.