Bug 301850

Summary: [GStreamer][GL] HDR10 tone mapping missing
Product: WebKit Reporter: Philippe Normand <philn>
Component: PlatformAssignee: Carlos Bentzen <cadubentzen>
Status: RESOLVED FIXED    
Severity: Normal CC: cadubentzen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Life Untouched as displayed in Epiphany
none
Life Untouched with correct Tone Mapping
none
Life Untouched with Tone Mapping in MiniBrowser none

Philippe Normand
Reported 2025-11-03 01:50:29 PST
We currently hardcode sRGB: DestinationColorSpace MediaPlayerPrivateGStreamer::colorSpace() { return DestinationColorSpace::SRGB(); } Also our compositor doesn't handle GST_VIDEO_COLORIMETRY_BT2100_PQ.
Attachments
Life Untouched as displayed in Epiphany (1.05 MB, image/png)
2025-11-03 03:37 PST, Carlos Bentzen
no flags
Life Untouched with correct Tone Mapping (1.34 MB, image/png)
2025-11-03 03:38 PST, Carlos Bentzen
no flags
Life Untouched with Tone Mapping in MiniBrowser (1.29 MB, image/png)
2025-11-03 11:44 PST, Carlos Bentzen
no flags
Philippe Normand
Comment 1 2025-11-03 03:30:19 PST
The are likely other things to fix :) We'd probably need some UIProcess/WebProcess IPC to query the monitor capabilities too.
Carlos Bentzen
Comment 2 2025-11-03 03:31:43 PST
IIUC, BT2100-PQ has the same YUV->RGB matrix as BT2020, but it has a different EOTF which is non-linear. So to fully support tone-mapping it to sRGB, an extra step in the fragment shader would be needed.
Carlos Bentzen
Comment 3 2025-11-03 03:37:57 PST
Created attachment 477257 [details] Life Untouched as displayed in Epiphany
Carlos Bentzen
Comment 4 2025-11-03 03:38:24 PST
Created attachment 477258 [details] Life Untouched with correct Tone Mapping
Carlos Bentzen
Comment 5 2025-11-03 03:38:46 PST
FWIW here an HDR10 sample file for testing: https://4kmedia.org/life-untouched-hdr-uhd-4k-demo/
Carlos Bentzen
Comment 6 2025-11-03 09:37:12 PST
Got something working for the tone-mapping. I'll submit a patch soon.
Carlos Bentzen
Comment 7 2025-11-03 11:42:52 PST
Carlos Bentzen
Comment 8 2025-11-03 11:44:59 PST
Created attachment 477266 [details] Life Untouched with Tone Mapping in MiniBrowser
EWS
Comment 9 2025-11-07 14:30:57 PST
Committed 302751@main (1c03de58be74): <https://commits.webkit.org/302751@main> Reviewed commits have been landed. Closing PR #53351 and removing active labels.
Radar WebKit Bug Importer
Comment 10 2025-11-07 14:31:12 PST
Note You need to log in before you can comment on or make changes to this bug.