0% found this document useful (0 votes)
44 views

HDR Display SDK App Guide

Uploaded by

Larry Yellow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

HDR Display SDK App Guide

Uploaded by

Larry Yellow
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

HDR Display SDK app Guide

Walking through the HDR Display test app


While our other blog posts have been about explaining aspects of the tech behind HDR displays and
using them this post is meant as a guide to our sample application. After having many people use it, it
has become abundantly clear to me that the number of options we like to have around for this sort of
tool makes it a bit intimidating , and that I just generally suck at UI development. As a result, a step-by-
step walkthrough of the options, what they do, and how you can use them seems like a good helper.

At its heart, our HDRDisplay SDK app is an image viewer. It provides a way to take raw HDR data and
display it on regular or HDR displays. In doing so, it enables you to examine how data from your own
game works on an HDR display. As long as you can dump HDR data from your game and convert it
either to EXR or HDR files, this application will allow you to test what your game looks like with HDR.

General Operation
The HDRDisplay SDK application has a fairly wide array of settings. All of these are exposed directly
through a user interface driven by Ant Tweak Bar. As such, it should very much be considered a
programmer’s tool. Figure 2 shows the initial view that a user will see when starting the application. The
data in the upper right is the color presently under the cursor, so you can see what the input values
were. The panel in the upper left contains the main settings; it has a drop down to select between the
presently loaded images and a drop down to select among several tone mapping modes. Below the
main settings panel is the panel for the presently selected tone mapper. By default this is a shader-
driven implementation of the parameterized ACES tone mapper. Each tone mapper has its own
collection of settings. (or none at all) Finally, the bottom left corner contains a set of iconified panels
with other controls and settings.

Figure 1 - Basic HDR Display interface


Quick Start Guide

Launching
Make HDR display your primary display. Optionally, go into the NVIDIA control panel and look at the
options for this display. You can likely select 10 or 12 bit output and YUV or RGB along with 4:4:4, 4:2:2,
or 4:2:0. The best options to use are RGB and as high a bit depth as possible. Launch the run_hdr.bat
batch file. The app should go full screen, and you will probably see some flashing or mode changing on
the display.

Testing HDR
In the settings panel at the upper left, select "Test Pattern" for the Texture, and select "Linear" for the
tone mapper. Now, open the iconified panel in the lower left corner of the screen labeled
"TestPatternParameters". For the pattern, select HDR check. If things are all working correctly, you'll see
a washed out version of the test pattern. If things aren't working correctly, you'll only see white. If you
only see white, consult the display manual. You might need to enable on option from the display's
controls, or you might need to use a particular HDMI port.

Examining an image
Select the image you want from the texture list on the Settings panel. Switch to the "Parameterized
ACES" tone mapper. Now, switch between the 1000 nit, 1000 nit sharpened, and SDR preset buttons.
You should see the image change as different options are selected.

Comparing SDR and HDR


Select the 1000 nit sharpened preset for the ACES tone mapper. Open the Composite panel ( iconified at
the lower left), and select split-screen or tiled. You now see the HDR tone map compared to the SDR
tone map at the reference luminance level. You should be able to see enhanced detail and color richness
in the HDR image. It is possible that the SDR image will look dim to you at this point. If so, open the
iconified panel labeled "SplitScreen" and adjust the "Post Scale" parameter. Setting it to 2.0 will make
the SDR white be 160 nits, and setting it to 4 will make it 320 nits (about as bright as a desktop monitor
ever is). If you are in a really bright environment, where you feel that you need to boost this a lot, some
of the darker colors on the HDR version make start to appear dimmer or duller than the SDR version. In
this case, you should adjust the viewing environment parameters on the HDR tone mapper.

Adjusting for the Surrounding Environment


In the settings panel for the Parameterized ACES, adjust the surround gamma to enhance or decrease
contrast in the HDR image. In a brighter environment, you want to reduce the value of Surround Gamma
to reduce the contrast in the image and make it appear a bit brighter overall. This is compensating for
your eyes being in too bright an environment to discern the details at the lower ranges. 0.8 is probably a
reasonable setting for a pretty bright room.
Detailed controls and commands

Command line parameters


HDRdisplay [arguments] [images to display]

-fullscreen – starts the app in fullscreen, at native res by default

-w – specifies a width for the window

-h – specifies a height for the window

-hdr – set display to hdr mode at startup (will require fullscreen)

-display – start on a different display than the primary (0, 1, 2, etc with 0 being primary)

Presently, only images in hdr format and OpenEXR format are accepted. DDS format support is expected
in future releases.

The <TAB> key toggles the display of the user interface, allowing less clutter when examining images.

The <ESC> key exits the application.

Stages of Operation
The HDRDisplay application has a pretty simple four stage pipeline. First, it computes an exposure level
on the input image via a geometric mean using a compute shader. Next, it runs an "Input Transform"
pass which applies filtering and color transformations to the input image, including exposure adjustment
and some color grading operations. Next, the image is tone mapped in two different ways. Once using
the selected tone mapper, and once using a special "SplitScreen" tone map operator that uses ACES, but
defaults to an SDR reference level. Finally, the application runs a compositing pass to generate the
output. The composite pass enables side by side comparison of SDR and HDR on the same screen.

Input Transform Pass


The input transformation panel allows for adjustment of input images prior to application of the tone
mapping operator. This covers aspects, like adjusting the exposure levels, altering how the image is
scaled or stretched, and finally, some simple color grading tools.

The exposure adjustment consists of two independent controls. First, there is the auto-exposure setting.
Enabling this rescales the image so that the geometric mean of its luminance is 0.18 (photographic
middle gray). Additionally, the exposure bias parameter scales the image by a number of photographic
stops to handle the concept of low or high key. Setting the bias to -1 has the impact of scaling every
pixel in the image by 0.5, and setting the bias to +1 has the impact of scaling every pixel in the image by
2.0. The sample images included in the binary download are all pre-exposed and work properly with the
default 0.5 stop bias.
Figure 2 - Results of boosting exposure levels. Left image is log luminance visualization and right image is tone mapped.

Finally, the input transformation pass has the ability to apply a simplified degree of color grading to
demonstrate how some of the color grading previously done on the output referred data can be moved
to scene referred data. The controls are fairly simplistic, and they are really only meant as a starting
point. There are two separate sets of color grading controls, which can be used simultaneously. They
differ in the color space used, one working in the ACES RGB space, and the other operating in the IPT
space where luminance and chromaticity are separated.

Figure 3 - Color grading in RGB space reducing RG and boosting B.


Figure 4 - Color grading in IPT space, reducing luminance contract and boosting colorfulness.

Tone Mappers
The drop down to select the active tone mapper can be seen in Figure 6. Whenever a new tone mapper
is selected, its parameter panel will pop open to display any applicable settings. Presently, five different
options are available as tone mapper choices.

Figure 5 - Tone mapper drop down.


Linear Tone Mapper

Figure 6 - Linear tone mapper

The linear path is the simplest case. It provides what amounts to a pass-through capability. It has the
capability to rescale and apply an arbitrary gamma function.

Visualize Range

Figure 7 - Range visualization tone mapper, colorized log luminance

The visualize range tone mapper applies a false color ramp to log luminance to facilitate debugging of
input levels such as light source levels being out of sync with the light they cast. Cyan is mapped to
middle gray (0.18) with pure green representing two stops higher luminance or (0.72). Yellow, red,
magenta, and white continue this pattern with each being four times more luminous than the prior
level. With this scheme, anything colored white is 10 stops above middle gray or 1024 times more
luminous than 0.18. The same pattern holds with blue being two stops below middle gray and black
being two stops lower than blue.
Reinhard
This is a simple implementation of the Reinhard tone map operator. ( x/ (x +1) ) It serves as a
comparison since many have used it in the past. When the output mode is set to scRGB, the display
luminance setting allows you to adjust the peak brightness instead of simply relying on the standard 0-1
behavior. This allows you to see what happens tone map operator that isn't designed to deal with
variable output levels.

Parameterized ACES

Figure 8 - Parameterized ACES tone mapper controls.

The ACES tone mapper is the most complex, in that it has many options to cover the range of settings
covered by our parameterized implementation of ACES. Parameterized ACES means that we implement
the ACES algorithms, but instead of encoding a single output device transform in the shader, we feed it a
set of parameters that cover all of the standard ODTs. Beyond this, the controls actually allow the
implementation of non-standard ODTs as well

Presets
For simplicity, the ACES tone mapper controls have a bunch of preset buttons. Each button applies
settings for common scenarios. The settings are as follows:

1000 nit - matches the ACES 1000 nit ODT, but outputs with scRGB

1000 nit sharpened - similar to 1000 nit, but the input range is compressed to bring out stronger
highlights and produce richer shadows

SDR - matches the ACES ODT for standard definition displays (what you want when not running
on an HDR monitor)
EDR - Settings appropriate for an enhanced dynamic range display (300+ nits and 10 bit color)
The display should be turned to full brightness. This enables a limited HDR effect on high end
monitors already in distribution

Extreme EDR - Settings appropriate for an HDR display that doesn't handle the standard HR
encodings, and expects data encoded similar to sRGB

The application defaults to the 1000 nit preset.

Color Space
Color space sets up the output color space for the image. It is important to understand that the function
of this control changes somewhat depending on the selected EOTF mode control described below. For
all modes except scRGB, the output is in the color space selected. Changing from sRGB to BT 2020 will
show the image get substantially desaturated. This is because it is outputting colro as if it is expecting
the display to directly take BT 2020. Since the code is trying to output the same absolute color no matter
which space you chose, choosing a wider color space means that the colors will appear more
desaturated. For more information on color spaces, please see our HDR white paper and blog posts.
When not using the scRGB mode, you almost always want sRGB. When the output mode is scRGB, the
actual output color values don't change. This is because scRGB specifies absolute color rather than
relative color. What changes is where the colors are clipped to. If sRGB is selected, it will ensure that no
colors more saturated than the sRGB primaries are produced.

EOTF Mode
EOTF stands for Electro-Optical Transfer Function. You should think of this as the modern “gamma”. This
setting controls how the data is encoded before being passed to the display driver. In standard ACES, the
EOTF is baked into each ODT. In our parameterized implementation, several EOTFs are selectable. The
data flowing to the EOTF is in the intended output nit level. The selected EOTF remaps it to a mode that
matches what the display or driver expects. In sRGB mode, this means mapping the entire supported
range to [0,1], then applying the sRGB transform. Figure 10 shows the result of doing this to data that
has been tone mapped for a 1000 nit display. Obviously, the overall range is much larger, so the image
looks dark when displayed on a regular display. (Also, displays aren’t generally setup to display HDR data
with this type of encoding.) Additionally, there is a ‘virtual’ EOTF mode supported labeled as scRGB. This
is what the driver expects for an HDR signal. It is a virtual EOTF in that no display takes this encoding. It
is merely a representation that the OS or display driver converts to the proper EOTF for the display.
Figure 11 shows the same 1000 nit tone map output with the scRGB EOTF. It appears much brighter, and
the brightest parts of the image all appear clipped. This is because scRGB maps values brighter than
standard sRGB white to values greater than 1.0. When displayed on an SDR monitor, all these values
clip.
Figure 9 - 1000 nit tone map with sRGB EOTF

Figure 10 - 1000 nit tone map with scRGB EOTF

Tone Map Luminance


While the standard ACES implementation applies the curves independently to each of the red, green,
and blue channels, some games have been designed against constant color tone mapping. This has been
a common method in many tone mappers over the years. By applying the compression only to
luminance, bright colors stay richly saturated at the cost of highlights clamping in an unnatural manner.
To aid for cases where the art is tuned toward this, we have added a control that can vary from 100%
per-channel tone mapping to 100% luminance tone mapping. Enabling the luminance mode, and
changing amount of luminance only weighting changes the results as depicted in Figure 11, Figure 12,
and Figure 13.
Figure 11 - Default SDR tone mapper

Figure 12 - Fully saturated luminance only SDR tone map


Figure 13 - 50% luminance tone map

CAT and desaturation


These are advanced controls that 99% of developers will want to ignore. The CAT control is a color
appearance transform to shift between white points. Since PC content is always intending a D65 white
point, this should essentially always be on. The desaturation control handles a desaturation phase used
in the SDR ACES implementation to compensate for the fact that the signal is generally fairly dim. The
effect on the image is actually quite minor.

Surround
The reference ACES shaders have a simple method to adjust for the brightness of the surrounding
environment. Since adapting to brighter environments changes the sensitivity of our eyes, they apply a
power function to adjust from their reference dark environment to a dim environment. (This same
adjustment also exists in related operations like color appearance models) In Figure 14 and Figure 15
you can see the impact of applying an adjustment level beyond the standard level ACES prescribes for
adjusting to dim. The 0.8 power function used here would be more appropriate for a pretty bright
viewing environment. The lower the power used, the more you cram the colors toward the bright end of
what the display can do. For instance a 0.8 will boost middle gray from 10 nits to 25 nits with the
reference ACES 1000 nit ODT.
Figure 14 - Adjusted for dark surround

Figure 15 - Adjusted for bright surround

Curve
The curve settings all apply to the sigmoid-like curve applied during the ODT. These are the heart of the
tone mapper, and the different ones provide the largest variance between target devices. We have a
handful of settings that controls the curve

Tone Curve
The tone curve control selects the base curve. As I mentioned above, we have implemented a solution
where the reference curves can be reshaped to conform to somewhat different conditions than the
reference. These tweak are all included in the other curve settings. While it is hard to show the
difference of HDR in an SDR document, the difference in the brighter regions of Figure 12 and Figure 13
should be apparent. The higher input level supported by the 1000 nit curve allows detail to be preserved
that otherwise would have just washed out. It is important to not that the control contains both
adjustable and reference versions of the curves. The reference versions all ignore the other curve
settings, while the adjustable ones all take them into account.

Figure 16 - SDR tone curve

Figure 17 - 1000 nit HDR tone curve

Min Stops and Max Stops


The min and max stop parameters control the black and white saturation levels for the curve. A max
stops value of 1 would mean that the curve reaches its peak output luminance with an input level of one
stop above middle gray or 0.36. Similarly, a min stops value of -1 would mean that minimum output
luminance (black) would occur with an input of 0.09. The list blow shows the values from the ACES
reference, as well as our sharpened 1000 nit curve.
1000 nit -12 stops to +10 stops

2000 nit -12 stops to +11 stops

4000 nit -12 stops to +12 stops

SDR -6.5 stops to +6.5 stops

1000 nit sharpened -8 stops to +8 stops

Max Level
This is the parameter that controls the maximum output luminance. -1 has the special value that it uses
the curve's native value. It is probably fairly obvious that the native values for 1000 nit, 2000 nit, and
4000 nit are 100, 2000, and 4000.

Middle Gray Scale


This parameter is a bit odd and unintuitive. It is a scale value on the output level for middle gray. For
instance, if you like where the curve has highlights and blacks, but you think that the middle gray values
are twice as bright as they should be, you could set this to 0.5. The place this is mostly useful is in the
context of EDR. The output level of middle gray is essentially a relative value of the maximum
luminance. In the standard SDR curve, this level is 10%. If you are tone mapping to acheive better
experiences on a really bright EDR monitor, you typically want to scale the middle gray back to where it
normally would be in nits, and then use the rest of the range to cover the extended highlights. Since
middle gray is normally 10% of max, and monitors are often set around 100 nits of brightness, this
means that the luminance of middle gray will be around 10 nits. When you turn up the monitor to 350
nits, you can either just make middle gray 35 nits (which may appear washed out unless you are in a
bright room), or you can scale middle gray back down to around 10 nits and extend the range of the
maximum stops to better represent brighter portions of the scene.

LUT ACES
This is the operator I'd recommend to most game developers. It is an implementation of the same ACES
capabilities, but with the data all baked into a 3D LUT, so that the pixel shader consists of little more
than a single texture fetch. In addition to all the capabilities discussed above for the generic ACES
tone mapper, there are two additional properties. First, you can adjust the LUT dimensions. Second, you
can select what is called a shaper function. This function controls how the range of the input data is
mapped into the [0-1] space of the LUT. Since human vision is highly non-linear, a linear mapping of
values into the LUT does not make for an efficient representation. Further encoding of the values stored
in the LUT can potentially even further reduce the error over what is demonstrated here.

I think you'll find that this simple LUT-based approach produces results that are nearly indistinguishable
from the full ALU-driven approach, with a very low amount of GPU cost.

Split Screen
The "Split Screen" control panel provides yet another set of ACES tone mapping controls. However, this
set is always run, and it generates the alternate image for the compositing pass. This allows you to
compare different tone map implementations and settings side by side. By default, this panel is setup to
produce an LDR tone mapped image, allowing you to see ACES tone mapped for LDR and HDR side by
side. Since it is impossible to completely reproduce the exact same image displayed when the display is
in SDR and HDR mode, you may notice some difference. The biggest difference is that HDR mode
specifies all of its values with an absolute luminance level, and SDR has everything as a relative
luminance level. This means that when you output in SDR, you are more tied to the brightness settings
on the display. To help compensate for this, we have added a "post scale factor" to the panel. By
default, the SDR output will be at the reference 80 nits. Setting it to 2x will give you output at 160 nits
maximum luminance. Other settings like contrast boost or things like "vivid" mode are harder to account
for. In general, I have taken the position that most content developers are looking for a faithful
representation on the display, and modes like vivid are expressly not doing that. In general, SDR
displayed in split screen with HDR content is mostly akin to normal or cinema mode with brightness and
contrast set to 50%. This seems to be roughly the "no enhancement" settings for UHD TVs these days.

Composite
The composite control panel controls how the selected tone mapper and the alternate or "Split Screen"
tone mapper are composited together. By default, the primary tone mapper (labeled HDR) is displayed
in full screen. You can also split the screen vertically or tile it to see the second tone mapper (labeled
LDR) for simultaneous comparison.

Test Pattern
In addition to the loaded images, the SDK app has a simple pattern generator. The patterns and colors
are based on the photographic color checkers you may be familiar with. The test pattern can be
accessed through the drop-down list of images in the main settings panel.

The controls allow you to select a couple different test patterns as well as adjust the brightness of the
test pattern. The most important setting is probably the HDR test option. Selecting this option, and
selecting the Linear tone mapper provides a simple test to see whether your HDR display is working
correctly with the driver.

HDR Display Settings


Figure 18 - HDR display and metadata controls

The HDR settings panel enables the HDR Display app to enable and disable sending metadata to the
display. When it is disabled, most UHD displays will behave like normal displays.

The parameters on the panel correspond to the mastering data sent to the display. The mastering
primaries for a game today will almost always be sRGB or possible DCI. The max master setting is the
maximum mastering luminance in nits. (brightest value the display you ‘mastered’ on could handle) The
min master setting is obviously the inverse of this, the darkest that black could be. The max CLL is the
maximum content luminance level. This is the maximum luminance level generated by the content. For
dynamic content like games, it probably makes sense to have the max master and CLL to be the same
thing, and them to match the maximum output level of the selected tone mapper. The max FALL is the
maximum frame average luminance level. This is how much the average luminance of an entire frame
should be expected to be. For all of these values, the UHDA mastering specs state that values of zero
means that the display should expect the default mastering levels, which are 1000 nits maximum
brightness and DCI primaries. So far, many UHD devices appear to be doing little with this data. We have
provided what appear to be fairly reasonable defaults for a 1000 nit display. (Maybe FALL should be a bit
higher) As firmware improves, we intend to update and improve this advice.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy