code wiki / (root) / nx_recording.nx

nx_recording.nx

buildroot/runtime/nx_recording.nx

2617 B67 linesdepth 5pulls 7 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_recording.nx -- LIVE vs RECORDING/advertisement classifier over a sequence of perceptual frame fingerprints. R1 of the MEDIA-STUDIO arc. A "recording" (a slate, advertisement, or a frozen/looping clip put up in place of a live feed) shows one of two temporal signatures: STATIC-HOLD : a sustained run of near-identical frames (a frozen image held for >= hold_frames frames). One static pair is just dead-air (R0); a long HOLD is a recording. LOOP : the same frame recurs after a gap of >= min_period frames (the clip is looping). Either signature => RECORDING; otherwise LIVE. Fingerprints are 64-bit perceptual hashes (nx_phash aHash/dHash); "near- identical" = Hamming distance <= near, reusing nx_simhash's Hamming kernel. All thresholds are CALLER-supplied (data-driven, no magic numbers here). genealogy_id: perceptual_hash_temporal_recurrence (record-hint, unverified) lineage_id: frame_fingerprint_sequence + run_length + periodic_recurrence nx_safety_envelope: intended_use: "Flag recorded/looped/advertisement segments in a stream so the trim planner (R3) can cut them." verdict: NOT_YET_EVALUATED license_tier: ORIGINAL

dependencies 2 imports · 1 importers

syscalls.nx nx_simhash.nx nx_recording.nx nx_recording_gate.nx

imports: syscalls.nxnx_simhash.nx

imported by: nx_recording_gate.nx

structs

none

consts

28const NX_REC_LIVE: i64 = 0
29const NX_REC_RECORDING: i64 = 1

functions

32func nx_rec_max_hold(fps: *i64, n: i64, near: i64) -> i64
48func nx_rec_has_loop(fps: *i64, n: i64, near: i64, min_period: i64) -> i64
63func nx_rec_classify(fps: *i64, n: i64, near: i64, hold_frames: i64, min_period: i64) -> i64
called by 1: main calls 2: nx_rec_max_holdnx_rec_has_loop