mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Using vulkan/winvk in a Windows HDR environment, skipping from SDR to HDR file or vice versa messes up the colours

Open ixxbxxx opened this issue 10 months ago • 3 comments

Important Information

Provide following Information:

  • mpv version all versions since at least 2023 including latest 0.37 nightly
  • Windows Version Windows 11
  • Source of the mpv binary shinchiro
  • If known which version of mpv introduced the problem tested all the way back to 2023 binaries
  • GPU model, driver and version issue persist through various driver versions
  • Possible screenshot or video of visual glitches

If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

using a HDR monitor, windows in HDR mode, autoload.lua and the following config:

no-config
vo=gpu-next
target-colorspace-hint=yes
gpu-api=vulkan
gpu-context=winvk

However, when using the following config instead, the issue is resolved:

no-config
vo=gpu-next
target-colorspace-hint=yes
gpu-api=d3d11
gpu-context=d3d11

Expected behavior

When skipping from a SDR file to a HDR file or vice versa, the colour is correct.

Actual behavior

When skipping from a SDR file to a HDR file or vice versa, the colour is incorrect. Skipping from SDR to SDR or HDR to HDR appears fine.

Log file

N/A

Sample files

any HDR + SDR file in the same directory and skipping via autoload.lua

ixxbxxx avatar Apr 16 '24 14:04 ixxbxxx

[SDR2HDR] profile-desc=SDR 反向映射 HDR 参数 inverse-tone-mapping=yes

[HDR2SDR] profile-desc=HDR-SDR 映射参数 tone-mapping=auto #tone-mapping-param=1.0 #tone-mapping-max-boost=1.0 gamut-mapping-mode=auto hdr-contrast-recovery=0.30 #hdr-contrast-smoothness=3.5 hdr-compute-peak=auto hdr-peak-percentile=99.995 hdr-peak-decay-rate=20 hdr-scene-threshold-low=1.0 hdr-scene-threshold-high=3.0 allow-delayed-peak-detect=no

Set it up like this and take a look

laodaoxp avatar Apr 17 '24 08:04 laodaoxp

@laodaoxp I am not sure what this achieves - do you mean that I should also create conditional profiles depending on the underlying file type?

ixxbxxx avatar Apr 17 '24 12:04 ixxbxxx

@kasper93 are you sure this issue is with libplacebo since this appears to be a vulkan specific issue (issue is not that with d3d11 api/context.

ixxbxxx avatar May 18 '24 08:05 ixxbxxx