mpv-player / mpv

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

BT.1886 slightly brighter and more banding with ICC profile vs. pre-generated 3D LUT #10442

Closed aufkrawall closed 1 year ago

aufkrawall commented 2 years ago

mpv 0.34.0-378-g8ef744d1b7 recent libplacebo git-master

mpv config:

vo=gpu-next
gpu-api=vulkan

dither-depth=8

#icc-profile=profile.icm
#vf=format:gamma=bt.1886

image-lut=bt1886.cube

keep-open=yes

With mpv's own generated 3D LUT, especially dark shades are slightly brighter and show a bit more banding vs. BT.1886 3D LUT generated by DisplayCal.

mpv ICC: icc

DisplayCal 3D LUT: 3dlut

Test image: orange

Log: output.txt

My display's ICC profile and 3D LUT generated by DisplayCal (with latest stable version on Windows): icc3dlut.zip

aufkrawall commented 1 year ago

In the (loose) context of testing stuff with new Windows 11 color management APIs (ACM), I've re-calibrated with Curves + matrix ICC profile format and the brightness difference between DisplayCal BT.1886 absolute colorimetric with white point scaling + mpv ICC (default intent) has vanished. Ooph? I suppose this is related to some of the previous ICC management changes in libplacebo + the curves format instead of XYZ LUT + matrix (that apparently has inherent black point compensation force-enabled)?

Used DisplayCal settings: 1 2 3 4

I'll try with my notebook display too.

Edit: Attaching the ICC profile in case you want to have a look: G27q-20 #1 2022-10-31 18-33 D6500 Rec. 1886 S 3xCurve+MTX.zip

aufkrawall commented 1 year ago

Also works with the notebook display when using the above settings (raised black point with default icc-intent=1 naturally is also fixed with such profiles for both displays).

Though I guess some users would still find that forced linear black point approximation option useful, e.g. when they don't have a colorimeter and only have access to a non-optimal XYZ LUT ICC profile. Perhaps also a note in the mpv manual could mention that curves + matrix format (black point compensation checkbox unticked) and perhaps also increased grayscale patches for profiling step (and calibrating to BT.1886?) should be ideal for mpv when creating a profile with DisplayCal.

I'll leave this open, feel free to close when you decide what to do with the aforementioned troublesome profiles.

haasn commented 1 year ago

Upsteam has decided to close the bug with the claim that the profiles are broken. If it works for you after an update, it might really just have been a broken profile?

aufkrawall commented 1 year ago

I don't think the profile was broken as in "a bug got fixed", since I haven't updated DisyplayCal/ArgyllCMS since then. But there is that forced black point compensation with XYZ LUT profiles, as described in https://github.com/mpv-player/mpv/issues/10442#issuecomment-1218203648 . And you made some changes to libplacebo's ICC profile handling since then, which might explain why curves + matrix format didn't yield perfect results for me in mpv at that time either, but apparently does now. Though this is speculative, I'd need to run some annoying extra calibrations and tests to be 100% sure.

Anyway, now it's perfect for me with recent libplacebo/mpv without any extra patching and the DisplayCal settings shown in the latest screenshots. And I guess this can make me sleep well enough. :)

I guess XYZ LUT profile format in DisplayCal should just be avoided at all costs, unless you only use 3D LUTs created directly by DisplayCal. Gamma/black point weirdness isn't worth the better handling of non-linearities that format offers, imho. Who knows for how many people it ruins results without them noticing in all kinds of color managed programs...

haasn commented 1 year ago

It's worth pointing out that I use an XYZLUT+MTX profile and it works perfectly for me.

But anyway, I guess I'll close this for the time being unless somebody else notices issues 🤷🏻

aufkrawall commented 1 year ago

@haasn With recent libplacebo & mpv git-master, icc-intent=0 doesn't work anymore to prevent black elevation with "faulty" profiles like this: LC133LF4L01 #1 2022-11-24 16-29 D6500 Rec. 1886 S 3xCurve+MTX.zip