-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDR (DCI-P3 & Rec. 2020) support #129
Comments
There is another feature for the Display P3 colorspace support in canvas elements that was released in Chrome 104 (august 2022): Since that is easier to implement it has been added to the 2.37.25 version |
Any estimate of when this will be added? Have heard a lot of people using this to help uneven burn-in on ultrawide OLEDs but then we can't get proper HDR |
Regarding Firefox, that's up to the developers at Mozilla. I think you can follow this Firefox bug: Once they've implemented display-p3 support for the canvas it should work immediately. |
Then, are you using NVidia RTX to watch a non-hdr video in hdr? |
Interesting, I guess Firefox uses MPO's to display HDR videos directly through the graphics card driver so that Firefox doesn't have to do any color conversion. But do the colors in the canvas match with the video colors? |
Sorry, I'm not quite sure what this means? If i turn ambient lights on or off now, i see no difference in colors |
It's indeed hard to see in the screenshots and photographs. You can see the difference in my screenshot at the left side of the video. It's mainly visible in the purples/pinks and the greens, which are grayish/duller in the ambient light than in the video when the Rec.2020 colorspace simulation is enabled in Chrome: That's because the saturated colors of the Rec.2020 color space in the video are getting limited to the Rec.709 (srgb) colorspace in the ambient light canvas. Here is the difference in a graph: I can also see a similar effect in your screenshot. The only difference is that the screenshot and ambient light canvas is limited to the Rec.709 colorspace, causing getting reds to be crushed in the ambient light canvas. Because you have a HDR monitor: The photographs do look identical though. So I guess that the webgl.colorspaces.prototype is flag isn't doing anything at the moment. But I think you are not watching a HDR video, because your YouTube player is not showing the HDR quality label. It could be that the HDR video quality is not available in Firefox. I see these options and label when I enable the HDR colorspace simulation in Chrome for this video: https://www.youtube.com/watch?v=1MieluM0c6c |
Hmmm... this is weird |
Then you are not watching a HDR YouTube video. |
Chromium issue 358587920 might cause some color differences between the video and the ambient light as well. |
Creator of TestUFO here. Chrome/Edge is at "supported via feature flag" status now since version 110, for supporting rec2100-pq and rec2100-hlg
And confirmed colorspace in tests: Instructions to enable HDR + rec2100 are posted at the top of the HDR beta version of TestUFO (beta.testufo.com) as well as its new WCG/HDR tester (beta.testufo.com/hdr). rec2100(-pq,-hlg,-linear) tends to be a superset of rec2020 with HDR extensions. Basically, rec2020 is WCG and rec2100 adds HDR while keeping rec2020 WCG. What this means (in browser contexts, at least) is rec2100 implies rec2020. Since I have access to external laboratory equipment, I have successfully tested that 10,000-nit pixels (rec2100) with rec2020 colorspace, does format fine at the DisplayPort/HDMI cable level -- although will be severely clipped by consumer displays. No consumer display can support the whole color gamut nor brightness range of rec2100 gamuts+hdr.
And it works in Chrome/Edge/Brave. Not all GPUs support rec2020, mind you, so the rec2100 framebuffer (using rec2020 color gamut) will cross-convert to whatever OS gamut uses. Here's an example: On Chrome running on Mac XDR displays (e.g. MacBook Pros), the OS will cross-convert rec2020 to display-p3 HDR, so it will work on MacBooks too (HDR preserved, WCG converted). Link to photo of MacBook running Chrome doing WCG+HDR CANVAS, using rec2100 hdr, rec2020 colorspace, and displayed by OS in display-p3 (downconverted gamut). But, technically, rec2020 (via rec2100-pq, rec2100-hlg canvas) is now finally working in Chrome/Edge/Brave. You can draw to canvas using "color(rec2020 r g b)" anywhere you use "#rrggbb" (fillStyle etc) and even use r/g/b numbers bigger than 1.0 for colors brighter than #FFFFFF |
@mdrejhon I did some tests with the rec2100 framebuffer, but the canvas is always fainted or dark on my monitor.
|
Very interesting test results! The color space is limited by the monitor capabilities. HDR usually only becomes impressive to consumers on 1000+ nit displays. The way the color space is converted varies, but did you retest with a true HDR canvas framebuffer capable of brighter than sRGB white? Try Chrome on a MacBook with XDR display, with the Experimental Web Platform Features flag turned on in Chrome://flags to suddenly brighten the canvas when drawing HDR .avif images or using fillStyle with rec2020 colors). It does become a conversion rec2020 canvas -> display-p3 HDR display... though you can now finally use brighter lumens and colors outside of sRGB color space when drawing on canvas. Still needs improvement but it's more correct behaviour. |
I did set the drawingbuffers to But the canvas always remains very dark when it uses a So I guess Chromium's experimental implementation is still incomplete. Maybe Chromium or the gpu driver is mapping the rec2100-hlg drawbuffer of the 2d canvas to a srgb or display-p3 buffer in the drawImage or rendering pass? It could explain why the colors are so dark, because maximum values in the rec2020 color space are lower than the maximum values of the rec2100-hlg buffer. PS: I don't have any Apple devices or HDR10 capable devices, so I can't validate if the overly bright colors are correct. But I was able to validate that the overly bright pixels in the video are not overly bright in the canvas because all the canvas colors were pretty dark. |
If you need a HDR display to test on, I have an AW3423DWF which will manage 800-1000 nits (but on smaller window sizes) |
@Askejm Could you check if you are able to get YouTube's HDR quality options on a Chromium browser for the HDR video https://www.youtube.com/watch?v=1MieluM0c6c ? If not: |
@Askejm If you can get YouTube's HDR quality options to work, I can create a test version (hopefully this week) in which you can switch to various settings that were till now automatically decided for HDR videos. That way you can test what works and what doesn't. These 3 advanced settings will be available under the Quality section: Update:
Potential combinations that might work for HDR videos:These are the only combination of settings that display overbright highlights in the canvas on my Display P3 capable display. They might be correctly visible on a HDR10 capable display.
And these combinations are fainted on my Display P3 capable display, but might display correctly on a HDR10 capable display:
|
Some additional notes about video colors in Chromium (excluding the canvas colors) on a Since Chromium version 120 the colors of a srgb video are only mapped to the full color gamut of the display while the flag This bug was reported to me about a month ago: |
Hey there,
i need to appologize that i didnt reply to the last mail, i didnt mess further with the arc browser, since I am in my exams phase of this semester xD.
So thank you for updating me again and for the further information!
kind greetings 🙂
Von Outlook<http://aka.ms/weboutlook> gesendet.
…________________________________
Von: Wessel Kroos ***@***.***>
Gesendet: Montag, 9. September 2024 23:26
An: WesselKroos/youtube-ambilight ***@***.***>
Cc: Bilal Talleb ***@***.***>; Mention ***@***.***>
Betreff: Re: [WesselKroos/youtube-ambilight] HDR (DCI-P3 & Rec. 2020) support (Issue #129)
Some additional notes about video colors in Chromium (excluding the canvas colors) on a Display P3 D65 or ITU-R BT.2020 display:
Since Chromium version 120 the colors of a srgb video are only mapped to the full color gamut of the display while the flag chrome://flags/#use-angle is set to D3D11 and the browser displays the video via a MPO "Multi-plane overlay", also known as "direct video overlay". Because then the video frames are directly drawn by the graphics card instead of the browser.
There are several ways to disable the video MPO in Chromium: Scrolling the video half off-screen, overlaying the account menu in YouTube, resizing the browser tab, setting the angle flag to any other value than D3D11.
So all these situations cause a temporary change in video colors.
This bug was reported to me about a month ago:
"this video has exactly the same codec and also the colour changes but not so extreme, more like skin colour getting a bit more pale and then back again"<#252 (comment)> - @0x2bilal<https://github.com/0x2bilal>
And I've verified and forwarded this bug to the Chromium developers a week later: https://issues.chromium.org/issues/358587920
—
Reply to this email directly, view it on GitHub<#129 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A7ACJ2NTVXUGSDIFTPOSA6TZVYHAZAVCNFSM6AAAAABJL2K232VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGE2DKMJWHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@Askejm Here is a test version of the extension with the new experimental color options. youtube-ambilight-v2.38.11.color-experiments-mv3.zip
Update: After that, make sure to enable the flag at chrome://flags/#enable-experimental-web-platform-features and restart the browser. And this might be a good test video. It clearly shows when a color is brighter or darker in the video than in the ambient light: |
@Askejm A friendly reminder, could you look at the experimental HDR color options if you get the time someday? |
@WesselKroos Sorry for the late response, I've been busy the last couple weeks. I'm gonna test this now. As I mentioned, I'm using the AW3423DWF. HDR Peak 1000, Console Mode and Source Tone Map are all enabled, you can see a review of its HDR performance at this level here. But the main takeaway is 1000 nit at 2% window and 459 nit at 10% window. So it can only reach these crazy brightness levels at very small window sizes. |
I also tried checking out the angle backend
Not sure if this is for any use but I figured that I might as well |
@Askejm Regarding the Rec 2100 PQ and HLG crash, you'll need to enable the flag at Regarding the low contrasted/satured colors with other ANGLE backend options. That's correct, OpenGL and D3D9 only support the sRGB color gamut. |
@WesselKroos Woah! Rec2100 looks wayyyy better. Rec 2100 PQ seems to match nearly perfectly, and HLG seems to not still match perfectly but still closer. Note: these were done in normal desktop HDR mode |
Interesting, that looks a lot better. You might get a better result with 16bit colors and/or with the Color conversion patch disabled.
|
Sure. I'll take these with my camera then, but that's gonna have to be later |
@WesselKroos Here are the results. These are taken on my Z5 shot on a tripod with fully manual settings. Color balance is 6000K. I graded it a little bit to best match real life based off the Rec. 2100 PG 10 bit enabled and exported to JPG 100% in color space Display P3. This was some very minor changes to brightness and saturation of various colors. Also disclaimer this was also graded on my AW3423DWF. And if you want the raw files for some reason I'll upload them here but probably wont keep forever IMO the Rec. 2100 PQ 8 bits disabled is the closest to perfect. I think I can still see a little difference, especially when yellow is on the bottom. However compared to color conversion patch enabled the yellows are just completely dampened with enabled. If I was gonna do this again it'd probably shoot slightly out of focus, because right now there is a bit of screen door effect, maybe you can blur it to get a better blend. Either way the image gets as close to real life as I can make. It's important to note that the colors blend far better in real life, most notably between blue and yellow. Hope you find this useful! |
@Askejm Wow, I don't think I'll need the raw pictures since these non-raw pictures already look perfect. Thanks for taking the time to make these for me. The difference is clearly visible between the pictures with the Color Conversion Patch being disabled or enabled. The difference between the PQ/HLG color gamuts are interesting when you view at the pictures with a box blur and removed black borders. Here are the edited pictures circulated with a red/green line to indicate when the colors are (closely) matching: HLG matches on the bright saturated colors, while PQ matches on the darker colors. I suspect this happens because the 10-bit colors in the video frame are being cramped into a 8-bit color in the canvas. So we might need to wait for 10/16-bit color support in WebGL's texImage2D function in Chromium to resolve the black canvas and get perfectly matching colors. The only thing I'm still wondering is if the matching colors change when you move the SDR content appearance slider in the Windows settings. I don't expect it to, because we are using the Rec2100 color gamut, but we are displaying 8-bit colors, so who knows... |
@WesselKroos I'm glad you found the pictures useful! They were fun to make. As for the SDR brightness slider, it appears to have no effect to Chrome in HDR10 mode. Seems to be fixed at 50%? All other color spaces the SDR brightness slider will affect the brightness of the entire browser, including the HDR video. |
Waiting on the completion of the implementation of HDR support in the canvas element:
https://chromestatus.com/feature/5703719636172800
whatwg/html#9461
https://github.com/WICG/canvas-color-space/blob/main/CanvasColorSpaceProposal.md
https://github.com/w3c/ColorWeb-CG/blob/main/hdr_html_canvas_element.md
Which with users can finetune the minimum/maximum rgb values.
Note: The color space conversion remains incorrect.
(Currently not supported by Firefox)
Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1771373
The text was updated successfully, but these errors were encountered: