(2019-10-29, 17:53)_DMU_ Wrote: (2019-10-29, 16:38)fandangos Wrote: The bug consists of correctly outputing the HDR metadata and settings the correct R G B W, X and Y, coordinates to the driver but it refuses to passes BT.2020 to the display remaining in BT.709.
Not possible to fix on Kodi's end.
AMD need to fix it's drivers.
Have you considered the option of activating HDR using DXGI?
Quote:Note that the AGS HDR path is fine, but you might want to consider using DXGI 1.6 to enable HDR as that would be IHV agnostic. Microsoft have code on github showing the use of this.
The DXGI (DirectX) portion of the code is ready for more than a year now.
And if you look at the link you posted, I'm the one asking the question there.
As state before the swapchain that is set by try10bitout Advanced Settings in Kodi set it to DXGI_FORMAT_R10G10B10A2_UNORM.
Read here:
https://docs.microsoft.com/en-us/windows...xgi_format
Quote:
"A four-component, 32-bit unsigned-normalized-integer format that supports 10 bits for each color and 2 bits for alpha".
This takes care of 10bit output.
This part of the code starting in this line:
https://github.com/fandangos/xbmc/blob/m...D.cpp#L349
Selects the color space exposed to DirectX resulting in either
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020
- DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
Read about each one here:
https://docs.microsoft.com/en-us/windows...space_type
Finally this portion of the code here:
https://github.com/fandangos/xbmc/blob/m...D.cpp#L547
Output to DirectX the entire metadata to DXGI_HDR_METADATA_HDR10 populating the entire hdr10 object with:
- WhitePoint
- RedPrimary
- GreenPrimary
- BluePrimary
- MinMasteringLuminance
- MaxMasteringLuminance
- MaxContentLightLevel
- MaxFrameAverageLightLevel
You can read about structure here:
https://docs.microsoft.com/en-us/windows...data_hdr10
This fulfils all the requiement for DirectX implementation of HDR according to Microsoft documents.
It still doesn't work.
The HDR implementation by microsoft is imperfect and troublesome and M$ pretend it is not.
In the same thread I posted earlier Madshi (who is a much much more qualified developer than I am) states:
"Im aware of that the "HDR and Advanced Color" OS switch allows HDR for non-fullscreen HDR apps. However, to be brutally honest, I hate the OS switch with a vengeance, because it's a static switch. No user in his right mind is going to change the OS switch manually every time before and after he plays a HDR video (or game). That's a usability catastrophe! And no user in his right mind wants to drive his TV in HDR mode all the time, even when playing SDR videos/games. Which is why I'm very happy about the AMD HDR API, because it allows me to dynamically switch HDR on and off."
Link here:
https://github.com/GPUOpen-LibrariesAndS.../issues/14
TL;DR
The only reason Nvidia and AMD API exist is because Microsoft doesn't know how HDR works and doesn't seem to care.
The code is done, microsoft and AMD need to fix their software.