txdemo: SvcTxDemo — per-temporal-layer UEP injector for SVC-T video#112
Merged
Conversation
Showcase of the per-packet radiotap path: map each HEVC NAL's temporal_id (and IRAP/parameter-set criticality) to a PHY TxMode, so base/IDR layers fly at a robust MCS and enhancement layers ride the fast MCS — a graceful degradation staircase instead of one MCS cliff. App-level only; no WiFiDriver core change. - svc_tx.h: LayerPolicy (TID->TxMode ladder + critical override), parse_hevc_nal, default_policy, and policy_from_env (DEVOURER_SVC_LADDER='CRIT=..;T0=..;T1=..'). - SvcTxDemo: reads length-prefixed HEVC NALs, classifies, fragments to MTU, injects each at its layer's rate via build_stream_radiotap + send_packet. - RadiotapBuilder: factor parse_tx_mode_env -> reusable parse_tx_mode_str(spec) so each ladder rung is a DEVOURER_TX_RATE-style string. - tests/gen_svc_nals.py (synthetic 1:4:8:16 IDR:T0:T1:T2 stream) + tests/svc_uep_onair.sh on-air harness; CLAUDE.md note. Hardware-verified (8814 TX -> 8821 monitor, ch6): the demo's TID counts and the witness MCS histogram both reproduce the 1:4:8:16 layer mix across MCS0/1/4/7, with the robust rungs over-delivered vs the fragile ones (the UEP payoff). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
086aa04 to
29958ea
Compare
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 demo that exploits the per-packet radiotap path (merged in #111) for SVC-T temporal-layer video: map each HEVC NAL's
temporal_id— and IRAP/parameter-set criticality — to a PHYTxMode, so the base/IDR layers fly at a robust MCS and the enhancement layers ride the fast MCS. The result is a graceful degradation staircase (60→30→15 fps as SNR drops) instead of a single MCS cliff — open-loop unequal-error-protection (UEP), a good fit for one-way wfb-ng-style links.App-level only — no change to
WiFiDrivercore behaviour; it just consumesTxMode/build_stream_radiotap/send_packet.Changes
txdemo/svc_tx_demo/svc_tx.h—LayerPolicy(TID→TxModeladder +criticaloverride),parse_hevc_nal(TID + IRAP/param-set classification from the 2-byte HEVC header),default_policy, andpolicy_from_env.txdemo/svc_tx_demo/main.cpp(SvcTxDemo) — reads length-prefixed HEVC NALs from stdin, classifies each, fragments to the radio MTU, and injects every fragment at its layer's rate.src/RadiotapBuilder.{h,cpp}— factorparse_tx_mode_env→ reusableparse_tx_mode_str(spec), so each ladder rung is aDEVOURER_TX_RATEstring.tests/gen_svc_nals.py(synthetic 1:4:8:16 IDR:T0:T1:T2 stream) +tests/svc_uep_onair.sh(on-air histogram harness);CMakeLists.txttarget; CLAUDE.md note.Config:
DEVOURER_SVC_LADDER="CRIT=MCS0/20/LDPC/STBC;T0=MCS1/20/LDPC/STBC;T1=MCS4;T2=MCS7/40/SGI"(unset → built-in default).Verification
cmake --buildclean;ctestpasses.On hardware (8814 TX → 8821 monitor, ch6): the demo's per-TID counts and the witness MCS histogram both reproduce the 1:4:8:16 layer mix across MCS0 / MCS1 / MCS4 / MCS7:
The robust rungs are over-delivered vs the fragile ones (3.9 vs 4, 14.8 vs 16) — the UEP payoff, observed. (The on-air histogram uses an all-20 MHz/no-LDPC-STBC ladder so a plain 20 MHz sniffer can decode every rung; the realistic default stacks 40 MHz/LDPC/STBC, which is a sniffer-decode limit, not a TX limit.)
🤖 Generated with Claude Code