Fused FEC: sub-block integrity + Reed-Solomon + per-layer UEP#113
Merged
Conversation
Cross-layer FEC for the video downlink: keep FCS-failed frames (DEVOURER_RX_KEEP_CORRUPTED) and salvage their CRC-valid sub-blocks instead of discarding the whole frame as one erasure. A frame's all-or-nothing FCS becomes fine-grained per-symbol erasures, multiplying the outer code's recovery when corruption is localized. tools/precoder/: - fec_subblock.py — sub-block-integrity (SBI) layer: pack/unpack fixed-size, individually CRC-guarded sub-blocks (one sub-block == one outer-code symbol); stream_id multiplexing; numpy-free so it imports into the GNU Radio env. - stream_fec_rs.py — Reed-Solomon outer scheme (systematic GF(2^8) Vandermonde, Rizzo/zfec construction, poly 0x11d), registered as a third scheme alongside RaptorQ/RLC in stream_fec.py. - svc_uep_fec.py — per-SVC-layer FEC-rate UEP (HEVC NAL -> temporal layer -> RS redundancy); the application-FEC half of cross-layer UEP that complements the MCS ladder in svc_tx.h. - fused_fec_link.py + fused_fec_tx.py/fused_fec_rx.py — chip-path sender/receiver + CLIs; the RX runs baseline and SBI decoders in lockstep and reports the gain. - fec_fusion_sim.py — offline simulation quantifying the SBI gain and sizing the sub-blocks, no hardware. - 22 new unit tests (suite 130/130 green). tests/: - fused_fec_onair.sh — chip<->chip on-air gain harness (8812 TX -> 8821 RX). - sdr_interferer.py — USRP B210 calibrated co-channel AWGN/CW source, a reproducible SNR knob when no attenuator is available. txdemo/stream_tx_demo/main.cpp — DEVOURER_TX_PWR_OVERRIDE (absolute per-rate TXAGC index 0..63) for the marginal-SNR bench setups that exercise the salvage. On-air, real silicon (8812->8821, MCS7, 15 s): +129 RS blocks recovered that the drop-whole-frame baseline lost. Full architecture + results: docs/fused-fec.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
A cross-layer fused FEC stack for the long-range video downlink. Today three error-correction resources never cooperate: the PHY-MCS inner code, an application-layer erasure code, and
DEVOURER_RX_KEEP_CORRUPTED(kept FCS-failed frames). This wires them together: instead of discarding a CRC-failed frame as one whole-frame erasure, it salvages the frame's CRC-valid sub-blocks — turning the chip's all-or-nothing FCS into fine-grained per-symbol erasures the outer code already knows how to recover from.Full architecture, design rationale, and results:
docs/fused-fec.md.Contents (
tools/precoder/, all numpy-light Python)fec_subblock.py— the sub-block-integrity (SBI) layer: fixed-size, individually CRC-guarded sub-blocks (one sub-block == one outer-code symbol), withstream_idmultiplexing. Fixed-size on purpose so a corrupted length byte can't desync neighbours.stream_fec_rs.py— Reed-Solomon outer scheme (systematic GF(2⁸) Vandermonde, Rizzo/zfec construction), added as a third scheme alongside RaptorQ/RLC; MDS, best for small low-latency blocks.svc_uep_fec.py— per-SVC-layer FEC-rate UEP (HEVC NAL → temporal layer → RS redundancy); the application-FEC half complementing the MCS ladder insvc_tx.h.fused_fec_link.py+fused_fec_tx/rx.py— chip-path sender/receiver + CLIs; the RX runs baseline and SBI decoders in lockstep and reports the gain.fec_fusion_sim.py— offline simulation quantifying the SBI gain and sizing the sub-blocks (no hardware).tests/:fused_fec_onair.sh(chip↔chip on-air harness),sdr_interferer.py(USRP B210 calibrated co-channel source — a reproducible SNR knob without an attenuator).txdemo/stream_tx_demo/main.cpp:DEVOURER_TX_PWR_OVERRIDE.Results
Notes
docs/fused-fec.md.WiFiDrivercore RX/TX behaviour beyond the additiveDEVOURER_TX_PWR_OVERRIDEknob.🤖 Generated with Claude Code