HDR - wang-bin/mdk-sdk GitHub Wiki
Tone Map to SDR
It's the default. You can also call Player.set(ColorSpaceBT709)
to set SDR target. Supported by all renderers
scRGB and Extended Linear sRGB
On windows it's recommended and confirmed to work perfectly. D3D11/12 renderer is required. https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range#option-1-use-fp16-pixel-format-and-scrgb-color-space
player.set(ColorSpaceSCRGB);
// render target pixel format MUST be rgba16f
examples:
glfwplay.exe -colorspace scrgb -d3d11 -c:v MFT:d3d=11,CUDA,FFmpeg,dav1d test.mp4
glfwplay.exe -colorspace scrgb -d3d12 -c:v MFT:d3d=11,CUDA,FFmpeg,dav1d test.mp4
- qt rhi set environment var
QSG_RHI_HDR=scrgb
- OBS Studio Plugin
HDR10 Metadata Passthrough
Player.set(ColorSpaceUnknown)
to detect display hdr capability and enabled automatically(on windows gfx context must be created by mdk via updateSurface()
. Player.set(ColorSpaceBT2100_PQ)
to force hdr metadata passthrough, SDR images will be tone mapped to HDR10 too.
- Metal:
MetalRenderAPI.layer
must be provided. example code - D3D11/12
- Vulkan
- EGL
examples:
glfwplay.exe -d3d11 -c:v MFT:d3d=11,CUDA,FFmpeg,dav1d test.mp4
glfwplay.exe -colorspace bt2100 -d3d11 -c:v MFT:d3d=11,CUDA,FFmpeg,dav1d test.mp4
glfwplay.exe -metal -c:v VT,FFmpeg,dav1d test.mp4
glfwplay.exe -colorspace bt2100 -metal -c:v VT,FFmpeg,dav1d test.mp4
- qt rhi set environment var
QSG_RHI_HDR=hdr10
Dolby Vision
- Profile 5 is supported by all renderers, i.e. OpenGL, D3D11/2, Metal and Vulkan renderer.
- Dolby vision dynamic metadata parsing is supported for all decoders. For FFmpeg software decoder(hevc, av1 etc.) and hwaccels(d3d11va, d3d12va, nvdec, vulkan, vaapi, vdpau etc.), metadata is parsed by FFmpeg. For FFmpeg external decoders(qsv, cuvid, mediacodec, v4l2m2m etc.) and mdk builtin decoders(MFT, CUDA, AMediaCodec, VT etc.), metadata is parsed by mdk.
- Support SDR and HDR10 display