Skip to content

txdemo: SvcTxDemo — per-temporal-layer UEP injector for SVC-T video#112

Merged
josephnef merged 1 commit into
masterfrom
feat/svc-temporal-uep
Jun 27, 2026
Merged

txdemo: SvcTxDemo — per-temporal-layer UEP injector for SVC-T video#112
josephnef merged 1 commit into
masterfrom
feat/svc-temporal-uep

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

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 PHY TxMode, 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 WiFiDriver core behaviour; it just consumes TxMode / build_stream_radiotap / send_packet.

Changes

  • txdemo/svc_tx_demo/svc_tx.hLayerPolicy (TID→TxMode ladder + critical override), parse_hevc_nal (TID + IRAP/param-set classification from the 2-byte HEVC header), default_policy, and policy_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} — factor parse_tx_mode_env → reusable parse_tx_mode_str(spec), so each ladder rung is a DEVOURER_TX_RATE string.
  • 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.txt target; 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 --build clean; ctest passes.

  • 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:

    layer → MCS witness frames ratio
    critical → MCS0 318 1.0
    T0 → MCS1 1238 3.9
    T1 → MCS4 2450 7.7
    T2 → MCS7 4712 14.8

    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

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>
@josephnef josephnef force-pushed the feat/svc-temporal-uep branch from 086aa04 to 29958ea Compare June 27, 2026 08:08
@josephnef josephnef merged commit 6f1c494 into master Jun 27, 2026
6 checks passed
@josephnef josephnef deleted the feat/svc-temporal-uep branch June 27, 2026 08:13
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.

1 participant