Aleksoid1978 / VideoRenderer

Внешний видео-рендерер
GNU General Public License v3.0
997 stars 110 forks source link

HDR output is full range and black level goes wrong? #87

Closed ocwins closed 1 year ago

ocwins commented 1 year ago

Hi.

First, thank you for your work.

If I understand it correctly, HDR Monitor accepts range 64-940,but MpcVideoRender output is 0-1024 as default, that makes black detail crushed.

WIth the shader 0 255->16 235, everything is OK.

Could you make limited range as default when HDR content is played on HDR monitor (with HDR enabled)? Considering different HDR monitors may have different implementation and request different input range, give an option to set output range for HDR may be good.

Thank you again.

ocwins commented 1 year ago

Btw, setting output range for monitor itself in the NVIDIA control panel does not have any effect when HDR is enabled :(

Aleksoid1978 commented 1 year ago

I simply call IDXGISwapChain3::SetColorSpace1() with DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 parameter, as it is written in the documentation and examples in the internet.

P.S. The option is not planned.

clsid2 commented 1 year ago

Your TV/Monitor should have a range option where you can specify the input range.

ocwins commented 1 year ago

I simply call IDXGISwapChain3::SetColorSpace1() with DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 parameter, as it is written in the documentation and examples in the internet.

P.S. The option is not planned.

I would humbly suggest if you could reconsider this.

There is no convenience method to manage the range between media player and the monitor. Many people just complain of the black crush but they even don't know what is going wrong. They (and I) need help.

ocwins commented 1 year ago

Your TV/Monitor should have a range option where you can specify the input range.

Sadly many monitors do not have the option. They just follow the HDR10 PQ standard, which laid down the output lumiance corresponding to input value. Some manufacturers think that they do everything "standard", many of them even disable all options when HDR is enabled :(

Experienced TV manufacturers are better because they had already learnt these lessons from the period of SDR.

On the other hand, many developers are changing their positions. Games for example, with HDR enabled, early games employ full range, like the shadow of tomb raider; later games employ limited range, like cyberpunk 2077.

Aleksoid1978 commented 1 year ago

As i already say - options for this not planned.

clsid2 commented 1 year ago

This is really something that NVIDIA needs to fix. If the driver outputs limited range, it should do a range conversion.

ocwins commented 1 year ago

This is really something that NVIDIA needs to fix. If the driver outputs limited range, it should do a range conversion.

I agree. Or if they (MSFT & NVIDIA) decide to respect app settings, they should announce their decision clearly.

If we could make sure they leave this to apps, then adding an option for this in player/renderer settings may become reasonable.

v0lt commented 1 year ago
  1. You can use the PostResize shader. This functionality has been present in MPC VR for a long time and is supported by different players.
  2. You can adjust the brightness and contrast in MPC-BE.
  3. You can try disabling DXVA2/D3D11 VP and always use Shader VP.

We do not plan to break the correct operation of MPC VR due to external factors.

ocwins commented 1 year ago
  1. You can use the PostResize shader. This functionality has been present in MPC VR for a long time and is supported by different players.

    1. You can adjust the brightness and contrast in MPC-BE.

    2. You can try disabling DXVA2/D3D11 VP and always use Shader VP.

We do not plan to break the correct operation of MPC VR due to external factors.

I did some more tests. It seems that the problem comes from HDR "Passthrough".

When I play SDR content, or play HDR content without "Passthrough" Enabled, Black detail won't be crushed, output/input range matches perfectly. (of course the colors of HDR content washed out because of wrong gamma)

I think that it means windows/NVIDIA driver actually do the range conversion when HDR is enabled. But with "Passthrough", there is no range conversion. I don't have enough knowledge to find out things underhood, could you investigate at this?