Skip to content

ironrdp: decode the graphics pipeline's h264 on the phone - #13

Open
ElCruncharino wants to merge 4 commits into
pgaskin:masterfrom
ElCruncharino:gpu-video-ironrdp
Open

ElCruncharino wants to merge 4 commits into
pgaskin:masterfrom
ElCruncharino:gpu-video-ironrdp

Conversation

@ElCruncharino

@ElCruncharino ElCruncharino commented Oct 23, 2026 •

Copy link
Copy Markdown

The graphics pipeline offers H.264 through the phone's decoder, and the
frames go to the GPU as planes. ironrdp-egfx gets a hook that hands over
decoded frames. It ships as patches in patches/ironrdp, which apply through
the usual patch.sh workflow.

The GPU is now the only video path, so the CPU conversion and the GPU video
option are gone. A saved connection with the old GpuVideo setting ignores it.

New option: colour range, per connection, full by default. It applies only
when the server does not say which range its video is in.

Tested against a KRDP server on a Pixel 9a. The output was BT.709, full
range, which matches the host's encoder.

Stacked on #12 and #25, since this branch includes the graphics pipeline offer.

Nick Haghiri added 2 commits October 23, 2026 15:49
backends that get h264 from their protocol can hand the frames to mediacodec and get nv12 planes back. the decoder lives in common so every backend uses the same one. frames carry their colour matrix and range, and the jni callback is optional, so backends without video don't notice.
a gl layer behind the desktop view draws each video region from its nv12 planes, so the colour conversion happens on the gpu.

damage over a video region hands it back to the cpu. what the video had left of that region is repainted from its last frame, so the mirror doesn't flash the old picture.

screenshots and the session thumbnail paint video over the backend's picture, which is stale under video.
@ElCruncharino
ElCruncharino marked this pull request as draft October 23, 2026 19:57
Nick Haghiri added 2 commits October 23, 2026 16:02
h264 from the rdp graphics pipeline goes to mediacodec and out to the gpu as planes now. ironrdp-egfx needs a hook for that, shipped as a patch in patches/ironrdp.

the cpu conversion and the gpu video option are gone, so the gpu is the only path. the new colour range option defaults to full and only applies when the server doesn't say which range it uses.
@ElCruncharino ElCruncharino changed the title Decode the graphics pipeline's H.264 on the phone ironrdp: decode the graphics pipeline's h264 on the phone Oct 23, 2026
@ElCruncharino
ElCruncharino marked this pull request as ready for review October 23, 2026 20:07
@pgaskin

pgaskin commented Oct 23, 2026

Copy link
Copy Markdown
Owner

So unfortunately, I've already implemented this (and a lot of the stuff in your other PRs) on another branch and will be merging it soon (along with a big refactor of the backends folder)...

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants