Skip to content

colorspace: update interpretation of SDR white

Niklas Haas requested to merge ref_white into master

Based on ITU-R Report BT.2408, and general recommendations within the industry, the "SDR white level", i.e. the level at which to map SDR into HDR signals, is not 100 cd/m^2 but a value closer to 203 cd/m^2.

For PQ signals this results in a relatively straightforward change of the code, but for HLG signals things get more complicated. For HLG, rather than targeting a fixed brightness in cd/m^2, the recommendation is to map SDR white levels to the 75% point in HLG, which calculates to a value of about roughly 3.17955 in scene-referred space (where the nominal peak is at 12.0). To fit this into the libplacebo interpretation of these values (where 1.0 maps to the SDR white levels), we scale things down by this factor, giving rise to a new scene-referred signal range of 12.0/3.17955 = 3.774, and adjust the OOTF to compensate.

This commit does put into question to what extent the default tone mapping settings need to be altered to account for this change in interpretation when going from HDR back to SDR.

Also add tests to ensure this stuff round-trips.

Bump the API version because, apart from the fact that we changed a public header, this is quite a drastic change in functionality.

Merge request reports