mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.69k stars 2.83k forks source link

[vo=gpu-next] --tone-mapping-mode=hybrid near black behaviour #9781

Closed NSQY closed 2 years ago

NSQY commented 2 years ago

Reproduction steps

Tonemap HDR file to SDR/709 mpv foo --vo=gpu-next --tone-mapping=bt.2390 --tone-mapping-mode=hybrid --gamut-mapping-mode=clip

Expected behavior

Similar shadow/black levels to --tone-mapping-mode rgb

Actual behavior

Elevated near or at black levels with perceptually strong chrominance

Log file

mpv.log

Sample files

Please see https://slow.pics/c/U01RjDNo

From LG 'Colors' demo https://0x0.st/ooOY.mkv https://0x0.st/oHop.mkv

natural-harmonia-gropius commented 2 years ago

especially the red image image

haasn commented 2 years ago

especially the red image image

What file is this screenshot from?

natural-harmonia-gropius commented 2 years ago

What file is this screenshot from?

0:40 https://b23.tv/QDN3u6T, but need some trick to unlock dolby vision. Also available in https://youtu.be/TZR1P4ClZLY but hlg only.

I will upload it later.

haasn commented 2 years ago

For testing, 1-frame clips are very helpful:

ffmpeg -ss MM:SS -i FILE -vframes 1 -c copy -an clip.mkv

haasn commented 2 years ago

See https://code.videolan.org/videolan/libplacebo/-/merge_requests/226

natural-harmonia-gropius commented 2 years ago

https://user-images.githubusercontent.com/50797982/151584713-2a208636-5e60-414e-811c-efe27008d1b6.mp4

quietvoid commented 2 years ago

The saturation issue in that video is caused by the tone mapping increasing saturation in SDR parts of the image. Or pixels with luma that doesn't exceed the target peak.

It's not really clear what saturation is correct because there doesn't seem to be a useful reference to compare against. For what it's worth, madVR maps in RGB for pixels with original luma that already fits within the target peak.

NSQY commented 2 years ago

See https://code.videolan.org/videolan/libplacebo/-/merge_requests/226

Looking much better https://slow.pics/c/szP2v2S5