Skip to content

Conversation

@UjinT34
Copy link
Contributor

@UjinT34 UjinT34 commented Dec 31, 2025

Describe your PR, what does it fix/add?

Fixes image description info events according to proto description. Should fix #12775
Stores EDID primaries and luminances as target values.
Always sends some target_primaries as suggested by https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/305
Might fix #12810, needs testing
Applies HDR edid overrides to HDR modes only.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

chromium and other EXT_LINEAR apps might need a HDR image description for correct CM. chromium currently sets an EXT_LINEAR image description with SDR luminances if it gets an SDR image description as preferred one. That trips both SDR and HDR mode. quirks:prefer_hdr = 1 fixes this behaviour. The resulting brightness with a single monitor will use the value from EDID or from monitorv2:max_avg_luminance override. With multiple monitors it'll use the default HDR luminance 203.
Might be reasonable to change the default SDR luminance to 203 as it seems to be the desired value for SDR -> HDR transformation and will fix chromium without the need to set quirks:prefer_hdr = 1. But it can break some other apps.

Is it ready for merging, or does it need work?

Ready

@vaxerski
Copy link
Member

can someone test this

@fufexan
Copy link
Member

fufexan commented Dec 31, 2025

Does not seem to fix the issue. In my case, colors are off only when mpv is in fullscreen.

@UjinT34
Copy link
Contributor Author

UjinT34 commented Dec 31, 2025

Fullscreen can look different when DS or passthrough is active or when HDR activates in fullscreen. Also if SDR/HDR switch is triggered then it'll send a new preferred image description which is handled by mpv and can result in color changes.
Other than that there should be no difference between windowed and fullscreen. And this PR doesn't alter anything regarding fullscreen specifically.

@fufexan
Copy link
Member

fufexan commented Dec 31, 2025

DS is active by default, and I don't have HDR enabled, nor HDR display capabilities. I guess mpv should take that into account even though the source video is HDR.

@UjinT34
Copy link
Contributor Author

UjinT34 commented Dec 31, 2025

That's not an mpv fault that CM is different with DS active. render:non_shader_cm = 1 or 2 will block DS when CM without shader isn't supported. The default is currently 3 which disables the feature and ignores any DS issues because it produces less issues with hyprsunset and similar tools.

@UjinT34
Copy link
Contributor Author

UjinT34 commented Jan 2, 2026

Needs a retest. DS and cm_fs_passthrough should be off because they aren't fully supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants