nx_video_h2h.nx
buildroot/runtime/nx_video_h2h.nx
about
nx_video_h2h.nx -- THE VIDEO-CALL HEAD-TO-HEAD JUDGE, SOVEREIGN AND RECEIPTED (2026-09-02).
Operator: "get nishifamily.com/video properly evaluated ... true jitsi and above performance ... using MSU VQMT as the
benchmark and oracle ... native first byte up nishi on everything". Jitsi and native WebRTC are REFEREES here, never the
direction: every arm plays the SAME index-strip test card (akiyo_cif + a machine-readable frame index burned into the top
luma rows) through a real browser client, and the SAME 20 ms strip reader records what each receiver actually RENDERED.
This organ is the only thing that computes or judges: the drivers dump raw samples and never a number.
GLASS-TRUTH DELIVERY (per receiver): effective displayed fps, delivered fraction (distinct frames shown over the source
index span), stalls (a gap longer than VH_STALL_MULT source intervals, the WebRTC freezeCount rule), glass-to-glass
latency (receiver first shows index i minus the sender's own preview first showing index i -- one machine clock).
FULL-REFERENCE FIDELITY (VQMT class): PSNR and SSIM of the received 352x288 luma against the SENDER'S preview of the
same index (both rendered by the same browser pixel pipeline = the fair reference), strip band excluded, using the
estate's sovereign metric organ nx_quality_metric (the seed of the sovereign VQMT; MS-SSIM/VMAF-class are the gap).
Writes ONE receipt (<dom>.bench grammar, nx_bench_receipt_lib -- the reader the /compare generators and gates share):
min_us/median_us = glass-to-glass latency, checksum = the test card (every arm must have played the same card or its
row is VOID), note = the delivery + fidelity numbers. A receiver that never rendered a remote is a RUN-FAIL row that
SAYS so, never a missing row.
usage: nx_video_h2h <out.bench> <ref-arm-name> <samples.txt> [samples2.txt ...] (frames come from <samples>.frames.idx/.bin)
exit: 0 VALID . 1 VOID (an arm played a different card) . 2 usage . 3 UNMEASURABLE (no ref arm / ref not VALID)
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_bench_receipt_lib.nxnx_quality_metric.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
| 24 | const VH_MAX_ROWS: i64 = 262144 |
| 25 | const VH_MAX_SERIES: i64 = 128 |
| 26 | const VH_KEY_BYTES: i64 = 160 |
| 27 | const VH_MAX_FILES: i64 = 8 |
| 28 | const VH_STR_BYTES: i64 = 512 |
| 29 | const VH_MAX_CHG: i64 = 65536 |
| 30 | const VH_MAX_FRAMES: i64 = 4096 |
| 31 | const VH_WRAP: i64 = 256 |
| 32 | const VH_HALF_WRAP: i64 = 128 |
| 33 | const VH_LAT_WINDOW_MS: i64 = 8000 |
| 34 | const VH_STALL_MULT: i64 = 3 |
| 35 | const VH_FREEZE_ADD_MS: i64 = 150 // WebRTC freezeCount: gap > max(3*avg_frame_duration, avg_frame_duration + 150 ms) |
| 36 | const VH_SNAP_W: i64 = 352 |
| 37 | const VH_SNAP_H: i64 = 288 |
| 38 | const VH_STRIP_ROWS: i64 = 32 |
| 39 | const VH_MIN_PAIRS: i64 = 10 |
| 40 | const VH_MIN_DISTINCT: i64 = 30 |
| 41 | const VH_CAP_RECEIPT: i64 = 65536 |
| 42 | const VH_NOTE_BYTES: i64 = 1024 |
| 43 | const VH_MODE_RW: i64 = 420 |
| 44 | const VH_PATH: i64 = 1024 |
| 45 | const VH_EXIT_VALID: i64 = 0 |
| 46 | const VH_EXIT_VOID: i64 = 1 |
| 47 | const VH_EXIT_USAGE: i64 = 2 |
| 48 | const VH_EXIT_UNMEASURABLE: i64 = 3 |
| 49 | const VH_ROLE_IGNORE: i64 = 0 |
| 50 | const VH_ROLE_SELF: i64 = 1 |
| 51 | const VH_ROLE_REMOTE: i64 = 2 |
| 52 | const VH_FILE_STRIDE: i64 = 8 |
| 53 | const VH_F_ARM: i64 = 0 |
| 54 | const VH_F_HOST: i64 = 1 |
| 55 | const VH_F_CARDSHA: i64 = 2 |
| 56 | const VH_F_FPS: i64 = 3 |
| 57 | const VH_F_START: i64 = 4 |
| 58 | const VH_F_DUR: i64 = 5 |
| 59 | const VH_F_URLA: i64 = 6 |
| 60 | const VH_F_URLB: i64 = 7 |
| 61 | const VH_CH_NL: i64 = 10 |
| 62 | const VH_CH_HASH: i64 = 35 |
| 63 | const VH_CH_SPACE: i64 = 32 |
| 64 | const VH_CH_PIPE: i64 = 124 |
| 65 | const VH_CH_EQ: i64 = 61 |
| 66 | const VH_CH_MINUS: i64 = 45 |
| 67 | const VH_CH_ZERO: i64 = 48 |
| 68 | const VH_CH_A: i64 = 65 |
| 69 | const VH_CH_B: i64 = 66 |
| 70 | const VH_HEX_DIGITS: i64 = 15 |
| 71 | const VH_DEFAULT_FPS: i64 = 30 |
| 72 | const VH_MS_PER_S: i64 = 1000 |
| 73 | const VH_US_PER_MS: i64 = 1000 |
| 74 | const VH_PERMIL: i64 = 1000 |
| 75 | const VH_P90_NUM: i64 = 9 |
| 76 | const VH_P90_DEN: i64 = 10 |
| 77 | const VH_UA_KEEP: i64 = 96 |
| 78 | const VH_URL_KEEP: i64 = 200 |
functions
| 80 | func vh_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 81 | func vh_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 94 | func vh_putn(v: i64) -> i64 { let b: *u8 = sys_mmap(32); let o: i64 = vh_catn(b, 0, v); sys_write(1, b, o); return 0 } |
| 96 | func vh_has(s: *u8, needle: *u8) -> i64 |
| 110 | func vh_line_end(b: *u8, n: i64, p: i64) -> i64 { var e: i64 = p; while e < n { if b[e] == (VH_CH_NL as u8) { return e } e = e + 1 } return n } called by 1: main |
| 112 | func vh_field(b: *u8, s: i64, e: i64, k: i64, fs: *i64, fe: *i64) -> i64 called by 1: main |
| 128 | func vh_atoi_range(b: *u8, s: i64, e: i64) -> i64 called by 1: main |
| 141 | func vh_copy_range(dst: *u8, cap: i64, b: *u8, s: i64, e: i64) -> i64 called by 1: main |
| 151 | func vh_kv(b: *u8, s: i64, e: i64, key: *u8, vs: *i64, ve: *i64) -> i64 called by 1: main |
| 173 | func vh_hexval(c: i64) -> i64 called by 1: vh_hex15 |
| 180 | func vh_hex15(s: *u8) -> i64 |
| 192 | func vh_role(key: *u8) -> i64 |
| 207 | func vh_isort(a: *i64, n: i64) -> i64 called by 1: main |
| 221 | func vh_write_atomic(path: *u8, buf: *u8, n: i64) -> i64 |
| 236 | func vh_ser_find(ser_file: *i64, ser_br: *i64, ser_keys: *u8, nser: i64, f: i64, br: i64, key: *u8) -> i64 |
| 248 | func vh_changes(ser: i64, row_ser: *i64, row_t: *i64, row_idx: *i64, nrows: i64, out_t: *i64, out_u: *i64, out_raw: *i64, cap: i64) -> i64 called by 1: main |
| 270 | func main(argc: i64, argv: *i64) -> i64 |