High Dynamic Range (HDR) output

Describes the process of enabling High Dynamic Range (HDR) and Wide Color Gamut (WCG) output.

Overview

High Dynamic Range (HDR) and Wide Color Gamut (WCG) provides the best visual quality through greater brightness and contrast enabling not-seen-before details in darks and not-seen-before details in whites to be visible at the same time and through more colors than previously available.

For more details about HDR, refer to the Xfest 2016 presentation entitled An Introduction to HDR and Wide Color Gamut on UHD Displays, and search for the supported HDR and WCG standards:

Initialization

To output HDR and WCG, a title needs to call Windows::Xbox::Graphics::Display::DisplayConfiguration::TrySetHdrModeAsync during initialization (refer to the DisplayConfiguration and HdrModeInfo classes). If the connected TV supports HDR and WCG and the console settings also have HDR enabled, then the TV will be switched into HDR mode by this call, and the result of the call will be true. If the TV advertises max and min luminance, then those values will be returned as well.

TrySetHdrModeAsync is the only mechanism for a title to switch the TV from SDR to HDR mode. There is no mechanism for a title to switch the TV in and out of HDR mode. It is recommended that TrySetHdrModeAsync be called once during initialization. Switching in and out of HDR mode might cause the TV to black out and mute anywhere from hundreds of milliseconds to a second or two. The amount of time is dependent on the TV and any other HDMI devices between the console and the TV. The TV will get switched out and back into HDR mode if the user launches another app that takes up more screen space than the title; that is, if the other app is running Full Screen or in Fill mode. Going Home will not cause a mode change. Terminating the title or launching a different title will cause the TV to switch back to SDR mode.

Swap chains

After initialization a title should create two swap chains, one with an HDR image and the other with an SDR (standard dynamic range) image. This is because HDR is inherently 10-bit and the Xbox One hardware video encoder is 8-bit, so to support GameDVR and screenshots while in HDR, the title must provide the tone mapped SDR image. Having the title provide the SDR GameDVR swap chain enables the title to provide the highest quality SDR GameDVR frames. Here are details of the swapchain:

  1. The HDR swap chain must be in the format DXGI_FORMAT_R10G10B10A2_UNORM and must use the DXGIX_SWAP_CHAIN_FLAG_COLORIMETRY_RGB_BT2020_ST2084 swap chain flag to indicate that the swap chain data is HDR and WCG encoded with ST.2084 transfer curve using BT.2020 primaries. Refer to DXGI_SWAP_CHAIN_FLAG.
  2. The SDR swap chain must use the BT.709 color primaries, and can be DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, or DXGI_FORMAT_R10G10B10A2_UNORM.

The two swapchains must then be presented with DXGIXPresentArray (no other Present call supports HDR).

Automatic tone mapping

Alternatively a title may create a single HDR swap chain in the format DXGI_FORMAT_R10G10B10A2_UNORM and using the DXGIX_SWAP_CHAIN_FLAG_COLORIMETRY_RGB_BT2020_ST2084 combined with DXGIX_SWAP_CHAIN_FLAG_AUTOMATIC_GAMEDVR_TONEMAP swap chain flags to indicate that the swap chain data is HDR and that the driver should perform SDR tone mapping automatically. The title does not need to create the second SDR swap chain when using this flag as it will be handled automatically.

When using DXGIX_SWAP_CHAIN_FLAG_AUTOMATIC_GAMEDVR_TONEMAP, only the single HDR swap chain need be presented with DXGIXPresentArray (no other Present call supports HDR).

Note

For the highest-quality recording and best performance its recommended that titles perform tone mapping manually by omitting DXGIX_SWAP_CHAIN_FLAG_AUTOMATIC_GAMEDVR_TONEMAP and using the separate HDR and SDR swap chains.

See also

Graphics Overviews