nx_nack.nx
buildroot/runtime/nx_nack.nx
about
nx_nack.nx -- SOVEREIGN NACK (negative-acknowledgement selective retransmit), the loss-recovery rung
that partners FEC + the jitter buffer. BENCHMARK: WebRTC's rtx/NACK -- when a frame is lost and FEC
can't cover it, the receiver ASKS for it again, but ONLY if a retransmit can still arrive before its
playout deadline (otherwise the request is wasted bandwidth). Built from scratch, pure integer, no third
party, transport-agnostic. The DECISION is the whole game: request iff (time-to-deadline >= one RTT +
a frame), rate-limited to one request per RTT (a retransmit can't have arrived sooner), capped at
NACK_MAX_RETRIES (give up, let concealment handle it -- no NACK storm). Sender keeps a small history
ring so it can honor requests. license_tier: ORIGINAL
dependencies 0 imports · 1 importers
imports: none
imported by: nx_nack_gate.nx
structs
| none |
consts
| 10 | const NACK_MAX_RETRIES: i64 = 3 |
functions
| 13 | func nack_should_request(seq: i64, now: i64, anchor_play: i64, anchor_seq: i64, frame_us: i64, |
| 24 | func nack_hist_put(hist_seq: *i64, H: i64, seq: i64) -> i64 { hist_seq[seq % H] = seq; return 0 } called by 1: main |
| 25 | func nack_hist_has(hist_seq: *i64, H: i64, seq: i64) -> i64 { if hist_seq[seq % H] == seq { return 1 } return 0 } called by 1: main |
| 27 | func main() -> i64 { return 0 } |