When HDR in Windows is turned on, videos have wrong colors
Categories
(Core :: Graphics: Color Management, defect)
Tracking
()
People
(Reporter: HaitraMysh, Unassigned, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
2.58 MB,
image/jpeg
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Steps to reproduce:
My monitor is PG32UQX. I use it with HDR in Windows settings turned on. After updating from Firefox 114.0b1 to 114.0b3, all videos have wrong colors. I have seen the problem on all sites (YouTube and several others).
Actual results:
I don't know how to describe it but it looks like the sun is shining through the video. Colors are too bright and there are many details lost. I am attaching a file containing pictures I took with my phone camera. However, it is not as pronounced as when viewing it on the screen. The left pictures show wrong colors and the right ones show correct colors. When I take a screenshot, the colors of the video in the screenshot are correct. When I disable HDR in Windows settings or disable hardware acceleration in Firefox, the problem is gone.
I used mozregression GUI tool and found out that the problem was caused by this differential revision: https://phabricator.services.mozilla.com/D177707
Expected results:
The colors should be correct even when HDR and hardware acceleration are turned on.
Comment 1•11 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•11 months ago
|
Comment 2•11 months ago
|
||
Can you reproduce this on the very latest release (113.0.1)?
Comment 3•11 months ago
|
||
I see the same here, with Nightly 115.0a1 (Build ID 20230513092159), on Windows 10 (22H2) and a HDR monitor (MPG321UR-QD). Chrome and Edge show videos correctly (both SDR and HDR). I know that previous Nightly versions did show videos correctly, so I will go over a few of the latest nightly builds to see which one made it regress.
Comment 4•11 months ago
|
||
Okay, Nightly Build ID 20230511213213 works correctly, 20230512094914 have "washed out" colors. Interestingly I can't take a proper screenshot of it, since Window then appears to correct the colors! If making a photo before/after is useful, let me know.
Comment 5•11 months ago
|
||
Possibly related to bug 1831820 and https://hg.mozilla.org/mozilla-central/rev/d014625bd4b6 ? (Apologies if that change hasn't got anything to do with it, but it seems like one of the few things that could be the cause, if you look at the range 20230511213213 .. 20230512094914)
Comment 6•11 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2a3a45421336c52fdcb337accef77094b19947c6
bug 1832215
Is also a likely cause.
What happens if you flip the pref gfx.color_management.native_srgb in about:config?
Comment 7•11 months ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #6)
What happens if you flip the pref gfx.color_management.native_srgb in about:config?
Yes, that's it. gfx.color_management.native_srgb=false (default) -> bad video, gfx.color_management.native_srgb=true -> good video.
Only now did I see that HaitraMysh had already found that, sorry!
Reporter | ||
Comment 8•11 months ago
|
||
Version 113.0.1 (with default Firefox settings, i.e. clean profile) works correctly for me.
In version 114.0b3, it behaves the same way for me as Dimitry Andric says. When gfx.color_management.native_srgb=false colors are wrong, if it is set to true, colors are correct.
Comment 9•11 months ago
|
||
:jgilbert, since you are the author of the regressor, bug 1832215, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Updated•11 months ago
|
Updated•10 months ago
|
Comment 10•7 months ago
|
||
It appears that Firefox is applying the ICC color profile, but Windows uses it already for sRGB so it is applied twice.
Usually that profile says the screen supports all BT.2020 which is not true, but that only means the screen tone maps from that to its native gamut.
So in case the screen is in HDR mode on Windows, Firefox should not apply any screen ICC profiles by default. Preferably it should use a HDR window with scRGB colorspace or BT.2020 PQ colorspace, while scaling the sRGB content appropriately with a matrix.
The same behavior should apply if SDR advanced color management is in use in Windows 11.
Description
•