Uh oh!
There was an error while loading. Please reload this page.
feat(win/video): add support for recombined YUV444 encoding - #2760
Conversation
mirh
commented
Jun 27, 2024
Awesomely crazy. Or perhaps not hitting encoding limits at higher resolutions. Like, is my understanding correct that this pixel doubling would not allow for 1440p on (say) older VCE versions that max out at 4K? |
ns6089
commented
Jun 27, 2024
mirh
commented
Jun 27, 2024
To be honest, I was more thinking of TVs than computers here. It's a mixed bag even there, but still it's not so rare.
You mean if the limit is actually implemented like 4096x2160 (usual old amd) vs 4096x4096 (usual old nvidia)? |
ns6089
commented
Jun 27, 2024
You can't encode 4:2:2 on nvidia gpus, implementing a path exclusively for intel will be too expensive.
I'm already calling it a day 😎 // Y U V// +-------+ +---+ +---+// | | | | | |// | Y | |UR | |VR |// | | | | | |// +---+---+ +---+ +---+// | | |// |UL |VL |// | | |// +---+---+ |
mirh
commented
Jun 27, 2024
You can't encode 4:4:4 on amd gpus either, and yet this is what this PR is about isn't it? |
ns6089
commented
Jun 27, 2024
Personally, I don't see a point in supporting recombination into 4:2:2 |
mirh
commented
Jun 28, 2024
I mean, sure, of course this is already miraculous. If any I guess the improvement isn't that clear cut, because unlike with a direct cable connection it's not like there aren't already compression artifacts anyway. So if 4:4:4 couldn't fit in some whatever doubled 4:2:0 4K scenario, just lowering the resolution could also be a possible (and if not any easily immediate) alternative? |
fc48f22 to
3a1115dCompare2cc6a6a to
a4ffe24Comparens6089
commented
Aug 25, 2024
The code in this pull request is Not a Contribution under LizardByte Individual Contributor License Agreement. The feature itself is completed on sunshine side. |
Convert absolute mouse input to relative deltas, accumulating fractional deltas so slow (sub-pixel) motion still moves the cursor on both axes. Moonlight TV clients send absolute positions; emitting relative deltas makes the COSMIC magnifier follow the cursor (PointerMotionAbsolute never updates the zoom focal point — pop-os/cosmic-comp LizardByte#2760).
Single squashed commit collecting the CachyOS-specific patches on top of upstream master (6ad5f97): - abs-mouse-relative v6: convert absolute mouse to relative deltas so the COSMIC screen magnifier tracks the cursor (PointerMotionAbsolute does not move its focal point; pop-os/cosmic-comp LizardByte#2760). Dead reckoning is the only thing in the smooth motion path (1:1); the estimate snaps to the real cursor position (published by the KMS cursor plane via platf::kms_cursor_* atomics) while the client is idle; a raw-saturated axis targets the matching host edge, with fresh feedback authoritative on that axis — phantom walls cannot persist. History: v1 walls, v2 partial, v3 jumps, v4 pseudo-acceleration, v5 zero-slide latch — see CACHYOS.md. - copy-framebuffer-reuse: no per-frame framebuffer allocation. - kms-prop-cache: cache DRM property IDs (~30-40 fewer ioctls per frame). - tools/set-accel-flat: flat pointer-acceleration profile helper. Shipped as sunshine 2026.818.1-9 (PKGBUILD lives in danalec/cachyos-rebuilds).
…, perf patches Single squashed commit collecting the CachyOS-specific patches on top of upstream master (f273ce8): - abs-mouse-relative v6: convert absolute mouse to relative deltas so the COSMIC screen magnifier tracks the cursor (PointerMotionAbsolute does not move its focal point; pop-os/cosmic-comp LizardByte#2760). Opt-in via the absolute_mouse_as_relative config flag. Dead reckoning is the only motion path (1:1); the estimate snaps to the real cursor position (published by the KMS cursor plane via platf::kms_cursor_feedback()) while the client is idle; a raw-saturated axis targets the matching host edge. Refactored to pass the upstream SonarQube gate (no globals, extracted functions, static_cast, seq_cst atomics). - copy-framebuffer-reuse: no per-frame framebuffer allocation. - kms-prop-cache: cache DRM property IDs (~30-40 fewer ioctls per frame). - tools/set-accel-flat: flat pointer-acceleration profile helper. Shipped as sunshine 2026.818.1-12 (PKGBUILD lives in danalec/cachyos-rebuilds).
…, perf patches Single squashed commit collecting the CachyOS-specific patches on top of upstream master (f273ce8): - abs-mouse-relative v6: convert absolute mouse to relative deltas so the COSMIC screen magnifier tracks the cursor (PointerMotionAbsolute does not move its focal point; pop-os/cosmic-comp LizardByte#2760). Opt-in via the absolute_mouse_as_relative config flag. Dead reckoning is the only motion path (1:1); the estimate snaps to the real cursor position (published by the KMS cursor plane via platf::kms_cursor_feedback()) while the client is idle; a raw-saturated axis targets the matching host edge. Refactored to pass the upstream SonarQube gate (no globals, extracted functions, static_cast, seq_cst atomics). - copy-framebuffer-reuse: no per-frame framebuffer allocation. - kms-prop-cache: cache DRM property IDs (~30-40 fewer ioctls per frame). - tools/set-accel-flat: flat pointer-acceleration profile helper. Shipped as sunshine 2026.818.1-12 (PKGBUILD lives in danalec/cachyos-rebuilds).
…, perf patches Single squashed commit collecting the CachyOS-specific patches on top of upstream master (f273ce8): - abs-mouse-relative v6: convert absolute mouse to relative deltas so the COSMIC screen magnifier tracks the cursor (PointerMotionAbsolute does not move its focal point; pop-os/cosmic-comp LizardByte#2760). Opt-in via the absolute_mouse_as_relative config flag. Dead reckoning is the only motion path (1:1); the estimate snaps to the real cursor position (published by the KMS cursor plane via platf::kms_cursor_feedback()) while the client is idle; a raw-saturated axis targets the matching host edge. Refactored to pass the upstream SonarQube gate (no globals, extracted functions, static_cast, seq_cst atomics). - copy-framebuffer-reuse: no per-frame framebuffer allocation. - kms-prop-cache: cache DRM property IDs (~30-40 fewer ioctls per frame). - tools/set-accel-flat: flat pointer-acceleration profile helper. Shipped as sunshine 2026.818.1-12 (PKGBUILD lives in danalec/cachyos-rebuilds).
…, perf patches Single squashed commit collecting the CachyOS-specific patches on top of upstream master (f273ce8): - abs-mouse-relative v6: convert absolute mouse to relative deltas so the COSMIC screen magnifier tracks the cursor (PointerMotionAbsolute does not move its focal point; pop-os/cosmic-comp LizardByte#2760). Opt-in via the absolute_mouse_as_relative config flag. Dead reckoning is the only motion path (1:1); the estimate snaps to the real cursor position (published by the KMS cursor plane via platf::kms_cursor_feedback()) while the client is idle; a raw-saturated axis targets the matching host edge. Refactored to pass the upstream SonarQube gate (no globals, extracted functions, static_cast, seq_cst atomics). - copy-framebuffer-reuse: no per-frame framebuffer allocation. - kms-prop-cache: cache DRM property IDs (~30-40 fewer ioctls per frame). - tools/set-accel-flat: flat pointer-acceleration profile helper. Shipped as sunshine 2026.818.1-12 (PKGBUILD lives in danalec/cachyos-rebuilds).




Description
The continuation of #2533. It's possible to emulate YUV 4:4:4 on gpus that don't support it natively by doubling the YUV 4:2:0 pixel count and running custom recombination shaders on both encoding and decoding side. Like Microsoft did it in MS-RDPEGFX.
Prototype stage. Requires changes on moonlight's side: I currently have custom libplacebo mpv shader implemented for plvk backend, in the future it should be possible to add Direct3D11 and OpenGL shaders.
https://github.com/ns6089/Sunshine/compare/yuv444..yuv444in420
moonlight-common-c pull request: TBD
moonlight-qt pull request: TBD, testing branch https://github.com/ns6089/moonlight-qt/tree/yuv444in420
What works and what doesn't
To Do
Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.