Files
rustguac/static/guac
pletch 14490cbab5 Revert "fix(h264): convert 4:4:4 chroma in the stream's own colour space"
This reverts 8988165, restoring the unconditional full-range BT.709
conversion. The commit it undoes identified a real inconsistency and
resolved it toward the wrong side.

Its reasoning was that the 4:2:0 path never reaches the shader, so the
combined 4:4:4 picture converted differently from the 4:2:0 one beside
it, and that adopting the decoded frame's colour space would make the two
agree. The two did then agree -- as limited range, on hosts that send
full range. Before it, 4:4:4 was correct and 4:2:0 was crushed; after it,
both were crushed. The symptom it describes, "the combined 4:4:4 picture
renders visibly flatter", was the correct picture beside a crushed one.

What every RDP host actually sends is now read out of the SPS rather than
assumed. Windows writes video_full_range_flag=1 with no colour
description. The xrdp fork writes it with a complete BT.709 description.
Stock xrdp 0.10.6 omits the video_signal_type block altogether -- it
passes x264 no VUI parameters -- while naming its own conversion
XRDP_yuv444_709fr. All three encode full-range BT.709, which is what
MS-RDPEGFX defines.

What the browser reports for those streams is a different question.
Chrome's hardware decoder ignores a bare range flag with no description
beside it and reports limited for a host that plainly declared full, so
a shader that adopts the frame's colour space expands 16-235 to 0-255 on
full-range samples: blacks crushed to zero, whites clipped, chroma
over-saturated by 255/224.

The inconsistency this reinstates is real and is not being dismissed: a
session can render 4:4:4 correctly and 4:2:0 crushed. One path right
beats both wrong, and the repair belongs upstream of the browser --
completing the host's SPS on the wire, so that neither path has to guess
and third-party clients benefit too. That follows separately; it is
server-side and does not belong in this PR.

The coefficients are exact BT.709 rather than the 8-bit approximations
the original cited from FreeRDP's prim_internal.h. Under passthrough
FreeRDP never decodes these streams, so matching its rounding was never
the point.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Rxg4cT87G9czw4nUxKhHG
2026-09-10 09:51:39 -04:00
..
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00
2026-02-06 14:38:53 +11:00