Commit 937fdeab authored by Sebastian Wick's avatar Sebastian Wick
Browse files

color: adjust the docs for the new dynamic range concept


Signed-off-by: Sebastian Wick's avatarSebastian Wick <sebastian@sebastianwick.net>
parent 50ebf6a6
Pipeline #236079 passed with stages
in 24 seconds
......@@ -406,102 +406,88 @@ through the compositor practically unaltered. With SDR color management they
use the output color space, and with HDR color management they use also the
output dynamic range.
The output and content dynamic range is expressed as an extended dynamic range
value. When content dynamic range differs from that of an output, the Wayland
compositor in a system is expected to compensate by applying a suitable tone
mapping.
The output and content dynamic range is expressed with the black and white
levels relative to the SDR black and white levels. When content dynamic range
differs from that of an output, the Wayland compositor in a system is expected
to compensate by applying a suitable tone mapping.
Extended Dynamic Range for Relative Luminance
---------------------------------------------
In this extension the dynamic range (or luminance range) is communicated as
Extended Dynamic Range (EDR) value. The `definition of EDR`_ as used here comes
from Apple but with consideration to luminance of black. EDR value is the
luminance ratio of the HDR maximum white and the SDR maximum white using the
black level (which may be higher than 0 cd/m²) as the origin. Therefore, EDR
value 1.0 means purely SDR as there is no difference between SDR and HDR
maximum white luminances. EDR value 4.0 means the full (HDR) range is four
times the SDR range. In other words,
::
HDR maximum white - black
EDR = ------------------------- .
SDR maximum white - black
black and white levels relative to the SDR black and white levels. The idea of
using levels relative to SDR comes from `Apple's EDR concept`_ but with
consideration to luminance of black.
The black and white levels are represented on a relative luminance log10 scale
where 10⁰ is the SDR black level and 10¹ is the SDR white level. SDR displays
and SDR content therefore have a black level of zero and a white level of one. A
white level of two means that there is more dynamic range available in the
whites with the size 10 times of the standard dynamic range. Equally a black
level of minus one means that there is more dynamic range available in the
blacks with the size 1/10th of the standard dynamic range.
Not all monitors present SDR content with the same luminance. There are
standards that use the values of 80 or 200 cd/m² as the SDR maximum white
luminance, but varying viewing conditions and user preferences may call for any
value. Therefore the absolute luminance for the SDR maximum white is not a fixed
value. Therefore the absolute luminance for the SDR white level is not a fixed
quantity. Monitors do have some absolute maximum luminance they can reach, so
how much dynamic range there is left for HDR may well depend on the monitor's
"normal" (SDR) brightness, or in other words the user's preferred nominal
brightness.
An output's EDR value depends on several things: the monitor capabilities (the
minimum luminance, the maximum HDR luminance), the monitor settings (adjustment
knobs), and user preference for the SDR maximum white level which is affected
by the viewing environment. Therefore Wayland compositors should allow users to
configure an output's EDR value. This could be in the form of setting the
relative SDR maximum white level as a percentage of the video signal, the
absolute luminance of the SDR maximum white in cd/m² if you can trust EDID on
the maximum luminance, or the output's EDR value as is.
A default EDR value for a HDR video mode output may be possible to approximate
from EDID denoted maximum luminance if the compositor wants to default to one
cd/m² number for the SDR maximum white, but that assumes certain viewing
conditions, e.g. average office environment. Using a percentage of the video
signal range for the default EDR value is not recommended because of monitors
differing wildly in their maximum luminance, assuming the video signal encodes
relative and not absolute luminance. Quantization effects or artifacts due to
framebuffer pixel format and the pixel bit depth in the video signal may also
factor in. With low bit depth it might be better to settle for brighter overall
image from smaller EDR value than to risk losing details in the SDR range. For
an SDR video mode, the default EDR value is 1.0.
`Figure 3`_ shows three EDR values and their relative SDR and HDR maximum white
luminance levels as well as the black level. EDR value represents the ratio
between HDR and SDR compared to black, not the overall image brightness as can
be seen in case c) whose EDR value is smaller than for the other less bright
examples. This reflects the intent of HDR: brighter and more detailed
highlights rather than brighter image.
An output's black and white levels depends on several things: the monitor
capabilities (the minimum luminance, the maximum HDR luminance), the monitor
settings (adjustment knobs), and user preference for the SDR white level which
is affected by the viewing environment. Therefore Wayland compositors should
allow users to configure an output's black and white levels.
This could be in the form of setting the levels as a percentage of the video
signal, the absolute luminance of the levels in cd/m² if you can trust EDID on
the luminance, or the values as is.
Default black and white levels for a HDR video mode output may be possible to
approximate from EDID denoted maximum/minimum luminance if the compositor wants
to default to fixed cd/m² numbers for the black and white levels, but that
assumes certain viewing conditions, e.g. average office environment. Using a
percentage of the video signal range for the default levels is not recommended
because of monitors differing wildly in their maximum luminance, assuming the
video signal encodes relative and not absolute luminance. Quantization effects
or artifacts due to framebuffer pixel format and the pixel bit depth in the
video signal may also factor in. With low bit depth it might be better to settle
for brighter overall image than to risk losing details in the SDR range.
`Figure 3`_ shows five ranges described by the black and white levels relative
to SDR. Note that the diagram is missing absolute luminance units since the
absolute luminance of SDR levels depends on the viewing environment.
.. _Figure 3:
.. figure:: images/monitor-edr.svg.png
:alt: EDR value diagram
.. figure:: images/dynamic-range.svg.png
:alt: black and white level diagram
Figure 3.
Three different monitor or content luminance characteristics.
The ratio of black to HDR maximum white luminance and black to SDR maximum
white luminance determines the EDR value. The black level may be greater
than 0 cd/m² and may differ.
Content provided by Wayland clients have their own EDR values per
``wl_surface``. Content EDR value is calculated similarly to output EDR value.
Content HDR maximum white luminance, content SDR maximum white luminance, and
content black luminance as all chosen by the content creator. If content is
encoded with relative luminance, calculating the EDR value does not require
mapping to absolute luminance.
If content is encoded with display-referred absolute luminance, the Wayland
client needs to know the content (encoding) HDR maximum white luminance, the
(movie) SDR maximum white luminance and the black luminance that fit the
artistic intention of the content creator to calculate the appropriate EDR
value. Note, that if the content SDR maximum white luminance changes during a
movie to follow the scene average brightness, changing the content EDR value to
match has the opposite effect: bright scenes get toned down and dark scenes get
toned up while the SDR maximum white level stays the same on display. Therefore
for content encoded in absolute luminance, the SDR maximum white luminance is
merely an arbitrary scaling factor that the client needs to choose.
The use of EDR value to describe content dynamic range means that content
encoded with absolute luminance cannot be presented with absolute luminance
(nit-for-nit). This is intentional to avoid assuming a standard viewing
environment which is usually relatively dark and therefore could lead to a too
dark image for the actual viewing environment.
.. _`definition of EDR`: https://developer.apple.com/documentation/metal/drawable_objects/displaying_hdr_content_in_a_metal_layer/performing_your_own_tone_mapping
Five different monitor or content luminance characteristics.
The black and white levels determine the dynamic range size and position
relative to the standard dynamic range.
Content provided by Wayland clients have their own black and white levels per
``wl_surface``. Content levels are calculated similarly to output levels.
Content black and white levels are all chosen by the content creator. If content
is encoded with relative luminance, calculating the levels does not require
mapping to absolute luminance. If content is encoded with display-referred
absolute luminance the display as well as the viewing environment should be
specified which can be used to determine the SDR black and white levels of the
content.
The use of SDR relative black and white levels to describe content dynamic range
means that content encoded with absolute luminance cannot be presented with
absolute luminance (nit-for-nit). This is intentional to avoid assuming a
standard viewing environment which is usually relatively dark and therefore
could lead to a too dark image for the actual viewing environment.
.. _`Apple's EDR concept`: https://developer.apple.com/documentation/metal/drawable_objects/displaying_hdr_content_in_a_metal_layer/performing_your_own_tone_mapping
Absolute Luminance Content
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment