code wiki / (root) / nx_deadair_gate.nx

nx_deadair_gate.nx

buildroot/runtime/nx_deadair_gate.nx

5765 B153 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_deadair_gate.nx -- REFEREE for MEDIA-STUDIO R0 (nx_deadair). Frames are 64x48 grayscale, base luma 128. noise_floor=12, active=20 permille. POSITIVE (dead-air): two identical static frames -> activity 0 -> DEAD-AIR. POSITIVE (active): a 16x16 subject block appears -> high activity -> ACTIVE. NEG-CONTROL #1 (noise): per-pixel noise in [-11,+11] (all below the floor). With the floor it MUST read DEAD-AIR. With floor=0 (naive diff) the SAME frame reads ACTIVE -- printed side-by-side to PROVE the floor does real work and the metric is not just raw difference. (metric != raw-diff) NEG-CONTROL #2 (debounce): a single changed pixel MUST read DEAD-AIR, not trip "active" on one hot pixel. Every measured value is PRINTED (no fabricated greens). Evidence -> stdout + knowledge/status/deadair_gate.log. Exit 0 GREEN / 1 RED. Sovereign: syscalls (-> nx_syscalls) + nx_image + nx_deadair only. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

syscalls.nx nx_image.nx nx_deadair.nx nx_deadair_gate.nx

imports: syscalls.nxnx_image.nxnx_deadair.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_append gp gn nx_image_alloc sys_mmap fill nx_image_set nx_image_set ↻ fill_noise nx_image_set ↻ nx_deadair_activity_permil nx_image_get report nx_deadair_classify gp ↻ gn ↻ nx_deadair_classify ↻

structs

none

consts

22const W: i64 = 64
23const H: i64 = 48
24const FLOOR: i64 = 12
25const ACTV: i64 = 20

functions

27func gp(logfd: i64, s: *u8) -> i64
called by 2: reportmain
34func gn(logfd: i64, v: i64) -> i64
called by 2: reportmain
49func fill(img: *Image, v: i64) -> i64
called by 1: main calls 1: nx_image_set
60func fill_noise(img: *Image, seed: i64) -> i64
called by 1: main calls 1: nx_image_set
77func report(logfd: i64, label: *u8, act: i64) -> i64
called by 1: main calls 3: nx_deadair_classifygpgn
88func main() -> i64