feat(pdu,graphics): add RemoteFX Progressive codec primitives#1196
Merged
Benoît Cortier (CBenoit) merged 2 commits intoDevolutions:masterfrom Apr 2, 2026
Merged
Conversation
2 tasks
f8a2536 to
bab32e5
Compare
Add wire-format types for RemoteFX Progressive Codec (MS-RDPRFX Progressive Extension) and the computational primitives required for progressive refinement: ironrdp-pdu: Progressive codec block types (SYNC, CONTEXT, REGION, TILE_SIMPLE, TILE_FIRST, TILE_UPGRADE, FRAME_BEGIN, FRAME_END), quantization values with band-level accessors, tile header parsing. ironrdp-graphics: Reduce-extrapolate discrete wavelet transform (DWT) for 64x64 tile decomposition into 10 subbands. SRL (Subband Reconstruction Layer) entropy codec for progressive coefficient transmission with zero-run encoding and sign-magnitude packing.
bab32e5 to
9c4219e
Compare
There was a problem hiding this comment.
Pull request overview
Adds foundational RemoteFX Progressive codec support across ironrdp-pdu (wire-format block/types + stream parsing) and ironrdp-graphics (reduce-extrapolate DWT + SRL entropy codec), as part of the multi-codec EGFX initiative (#1158 §4).
Changes:
- Introduce progressive RFX wire block types (SYNC/CONTEXT/REGION/TILE_* / FRAME_*) plus stream encode/decode helpers.
- Add reduce-extrapolate 3-level DWT implementation for 64×64 tiles and expose it via
ironrdp-graphics. - Add an SRL entropy codec module intended for progressive upgrade passes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/ironrdp-pdu/src/codecs/rfx/progressive.rs | New progressive wire types + region/tile parsing and stream (en/de)code helpers |
| crates/ironrdp-pdu/src/codecs/rfx/mod.rs | Exposes the new progressive module |
| crates/ironrdp-graphics/src/srl.rs | New SRL entropy codec implementation + unit tests |
| crates/ironrdp-graphics/src/lib.rs | Exposes new dwt_extrapolate and srl modules |
| crates/ironrdp-graphics/src/dwt_extrapolate.rs | New reduce-extrapolate DWT implementation + layout helpers/tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SRL codec: fix encode/decode asymmetry for zero-run handling at k=0 and unary magnitude coding. Encoder now processes zero runs at all k values and recomputes k after each kp update to stay in sync with the decoder. Aligned magnitude coding to standard quotient/remainder scheme. Strengthened round-trip tests to check exact values including mixed zero/non-zero inputs. Progressive PDU: replace num_derive/num_traits with manual from_u16 match. Replace expect() panics with cast_length! in encode paths. Add numRects >= 1 and numQuant <= 7 guards, tile quant index bounds check, and fixed-size block blockLen validation per MS-RDPEGFX spec. Correct band index doc comment in dwt_extrapolate.
Greg Lamberson (glamberson)
pushed a commit
to lamco-admin/IronRDP
that referenced
this pull request
Apr 6, 2026
The merged progressive primitives PR (Devolutions#1196) added validation that a ProgressiveRegion must contain at least one rectangle. The test used an empty rects vec which now fails decoding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the multi-codec EGFX implementation described in #1158 (Section 4).
Summary
Add wire-format types for RemoteFX Progressive Codec (MS-RDPRFX Progressive Extension) and the computational primitives required for progressive refinement.
ironrdp-pdu: Progressive codec block types (SYNC, CONTEXT, REGION, TILE_SIMPLE, TILE_FIRST, TILE_UPGRADE, FRAME_BEGIN, FRAME_END), quantization values with band-level accessors, tile header parsing.
ironrdp-graphics: Reduce-extrapolate discrete wavelet transform (DWT) for 64x64 tile decomposition into 10 subbands. SRL (Subband Reconstruction Layer) entropy codec for progressive coefficient transmission with zero-run encoding and sign-magnitude packing.
Changes
5 files, 2,326 lines. No changes to existing code.
Test plan