code wiki / _hdl_build / nx_room_qoe.nx
nx_room_qoe.nx
buildroot/runtime/_hdl_build/nx_room_qoe.nx
about
nx_room_qoe.nx -- X-ROOM (client-side, S-class): sovereign DETERMINISTIC INTEGER
call-quality (QoE/MOS) estimator -- the CLIENT-side sense that feeds nx_room_diag.
RESEARCH-GROUNDED (ITU-T G.107 E-model + WebRTC QoE literature, via WebSearch):
the published standard is the E-model R-factor R = 94 - Ie_eff - Id -> MOS, but it
is FLOATING-POINT and voice-only; modern WebRTC QoE (rtcscore, XGBoost/MLP MOS) are
ML BLACK BOXES -- non-reproducible (published RMSE ~0.28 MOS), need training data.
S-CLASS EXCEED (measured, honest): (1) DETERMINISTIC INTEGER E-model -- same stats
give the SAME MOS to the milli on any hardware (audit-replayable), where ML scores
are non-reproducible and the float E-model varies; (2) MULTI-DIMENSIONAL ATTRIBUTION
-- not one opaque number but per-impairment breakdown (loss/delay/jitter/bitrate) ->
the DOMINANT killer -> the sovereign FIX (loss->fec, jitter->jitterbuf, bitrate->sfu/
simulcast); (3) catches COMBINED SUB-THRESHOLD degradation a naive per-threshold
quality bar reports as "good" (impairments ADD in the E-model). No training, no float.
Inputs (client-observed): loss_pm (per-mille), rtt_ms, jitter_ms, delivered_kbps,
target_kbps. Output: MOS in milli (1000..4500), R-factor, dominant impairment + fix.
main() is the SELF-VALIDATING GATE. Evidence -> knowledge/status/room_qoe.log.
HONEST SCOPE: the deterministic QoE MODEL; the JS last-mile shim must collect the raw
counts (frame seq-gaps=loss, inter-arrival=jitter) and report them = the wiring rung.
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 25 | const QOE_MAGIC_4500: i64 = 4500 |
| 26 | const QOE_MAGIC_2500: i64 = 2500 |
| 27 | const QOE_MAGIC_4200: i64 = 4200 |
| 29 | const QOE_LOG: *u8 = "knowledge/status/room_qoe.log" |
| 30 | const QOE_BPL: i64 = 200 // packet-loss robustness (E-model Bpl, scaled to per-mille loss) |
| 33 | const IM_NONE: i64 = 0 |
| 34 | const IM_LOSS: i64 = 1 |
| 35 | const IM_DELAY: i64 = 2 |
| 36 | const IM_JITTER: i64 = 3 |
| 37 | const IM_BITRATE: i64 = 4 |
functions
| 39 | func qw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 40 | func qwn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 43 | func qoe_ie_loss(loss_pm: i64) -> i64 called by 1: qoe_eval |
| 49 | func qoe_id_delay(d: i64) -> i64 called by 1: qoe_eval |
| 55 | func qoe_mos_from_r(r: i64) -> i64 called by 1: qoe_eval |
| 65 | func qoe_eval(loss_pm: i64, rtt_ms: i64, jitter_ms: i64, deliv: i64, tgt: i64, out: *i64) -> i64 |
| 90 | func qoe_domname(c: i64) -> *u8 called by 1: main |
| 98 | func main() -> i64 |