[GH-ISSUE #5] HDR Support #5

Open
opened 2026-10-15 12:47:18 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @ABeltramo on GitHub (Jun 22, 2024).
Original GitHub issue: https://github.com/games-on-whales/gst-wayland-display/issues/5

  • Step 1: buy an HDR monitor
Originally created by @ABeltramo on GitHub (Jun 22, 2024). Original GitHub issue: https://github.com/games-on-whales/gst-wayland-display/issues/5 - Step 1: buy an HDR monitor
Author
Owner

@ydoc-afk commented on GitHub (Sep 30, 2026):

Some notes on what HDR would take, from looking at it on the streaming-server side (we track the server part in ydoc-afk/Heeler#52, a Wolf fork).

Where the compositor is today (at b15285a): everything is 8-bit. The allocator only maps 8-bit fourccs (Abgr8888, Argb8888, Xrgb8888, … in wayland-display-core/src/utils/allocator/mod.rs, defaulting to Abgr8888), and waylanddisplaysrc only advertises 8-bit RGB/RGBA formats. So even with a 10-bit encoder downstream, frames are 8-bit when they leave the compositor. On the Wolf side, the VA-API zero-copy path currently strips the P010/AR30 formats for exactly this reason.

Roughly what's needed in the compositor

  1. 10-bit buffers end to end: render and allocate in a 10-bit format (e.g. Xrgb2101010/Abgr2101010, or convert to P010 on the GPU) and advertise it in the src caps, so encoders (VA-API vapostproc → P010, NVENC 10-bit) can pick it up without an 8-bit hop.
  2. A way for clients to submit HDR content: implement a colour-management protocol (wp_color_management_v1), so that gamescope/games running inside can hand over PQ/BT.2020 surfaces instead of sRGB. This probably needs Smithay support (or work in the games-on-whales/smithay fork).
  3. Composition that preserves it: at least a pass-through for a single fullscreen HDR surface (the common gaming case), before worrying about blending mixed SDR/HDR content.
  4. Expose the HDR metadata: the mastering display colour volume and content light level from the client's image description, e.g. as GStreamer caps or messages, so the streaming side can forward them to Moonlight.

Server side (not compositor work, listed for context): negotiate HDR in RTSP (dynamic range mode), advertise the HDR codec modes in serverinfo, use HEVC Main10 / AV1 10-bit encoder settings, and send the HDR metadata to the client over the control stream.

A possible first milestone: 10-bit SDR (BT.709 in 10-bit buffers). It only needs item 1, already reduces banding, and lays the path for real HDR.

<!-- gh-comment-id:5921226536 --> @ydoc-afk commented on GitHub (Sep 30, 2026): Some notes on what HDR would take, from looking at it on the streaming-server side (we track the server part in ydoc-afk/Heeler#52, a Wolf fork). **Where the compositor is today** (at `b15285a`): everything is 8-bit. The allocator only maps 8-bit fourccs (`Abgr8888`, `Argb8888`, `Xrgb8888`, … in `wayland-display-core/src/utils/allocator/mod.rs`, defaulting to `Abgr8888`), and `waylanddisplaysrc` only advertises 8-bit RGB/RGBA formats. So even with a 10-bit encoder downstream, frames are 8-bit when they leave the compositor. On the Wolf side, the VA-API zero-copy path currently strips the P010/AR30 formats for exactly this reason. **Roughly what's needed in the compositor** 1. **10-bit buffers end to end:** render and allocate in a 10-bit format (e.g. `Xrgb2101010`/`Abgr2101010`, or convert to P010 on the GPU) and advertise it in the src caps, so encoders (VA-API `vapostproc` → P010, NVENC 10-bit) can pick it up without an 8-bit hop. 2. **A way for clients to submit HDR content:** implement a colour-management protocol (`wp_color_management_v1`), so that gamescope/games running inside can hand over PQ/BT.2020 surfaces instead of sRGB. This probably needs Smithay support (or work in the games-on-whales/smithay fork). 3. **Composition that preserves it:** at least a pass-through for a single fullscreen HDR surface (the common gaming case), before worrying about blending mixed SDR/HDR content. 4. **Expose the HDR metadata:** the mastering display colour volume and content light level from the client's image description, e.g. as GStreamer caps or messages, so the streaming side can forward them to Moonlight. **Server side** (not compositor work, listed for context): negotiate HDR in RTSP (dynamic range mode), advertise the HDR codec modes in `serverinfo`, use HEVC Main10 / AV1 10-bit encoder settings, and send the HDR metadata to the client over the control stream. **A possible first milestone:** 10-bit SDR (BT.709 in 10-bit buffers). It only needs item 1, already reduces banding, and lays the path for real HDR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/gst-wayland-display#5
No description provided.