code wiki / (root) / nx_deadair.nx

nx_deadair.nx

buildroot/runtime/nx_deadair.nx

2741 B65 linesdepth 5pulls 6 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_deadair.nx -- per-interval temporal-activity metric for cam-stream dead-air detection / TiVo-style trimming. R0 of the MEDIA-STUDIO arc. "Dead air" = the subject/scene is not changing (static hold, frozen recording, empty room). We measure the FRACTION of pixels whose frame-to-frame luma change exceeds a sensor-noise floor, expressed in per-mille (parts per thousand, 0..1000). Why a noise floor is REQUIRED (not optional): Real sensor noise makes nearly every pixel differ by a small amount frame-to-frame. A naive sum/count of |a-b| therefore reads a static but noisy frame as "active" -- a false positive that would defeat trimming. Flooring counts a pixel as "changed" only when its luma delta exceeds the noise floor, so only genuine subject/scene motion survives. The gate proves this with floor=0 vs floor=N contrast. Thresholds are CALLER-SUPPLIED -- the metric carries NO magic numbers. Callers source noise_floor and active_permille from svc-config. genealogy_id: frame_differencing + scene_change_detection (commercial/dead-air advance lineage -- attribution UNVERIFIED, record-hint only; do not cite as sourced) lineage_id: frame_difference + noise_floor + changed_pixel_fraction nx_safety_envelope: intended_use: "Temporal activity classification for recording trim/cut. Foundation for the media-studio editor." verdict: NOT_YET_EVALUATED license_tier: ORIGINAL

dependencies 2 imports · 1 importers

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

imports: syscalls.nxnx_image.nx

imported by: nx_deadair_gate.nx

structs

none

consts

34const NX_DEADAIR_ACTIVE: i64 = 1
35const NX_DEADAIR_DEAD: i64 = 0

functions

40func nx_deadair_activity_permille(a: *Image, b: *Image, noise_floor: i64) -> i64
called by 1: main calls 1: nx_image_get
62func nx_deadair_classify(activity_permille: i64, active_permille: i64) -> i64
called by 2: reportmain