nx_recording.nx
buildroot/runtime/nx_recording.nx
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
imports: syscalls.nxnx_simhash.nx
imported by: nx_recording_gate.nx
structs
| none |
consts
| 28 | const NX_REC_LIVE: i64 = 0 |
| 29 | const NX_REC_RECORDING: i64 = 1 |
functions
| 32 | func nx_rec_max_hold(fps: *i64, n: i64, near: i64) -> i64 |
| 48 | func nx_rec_has_loop(fps: *i64, n: i64, near: i64, min_period: i64) -> i64 |
| 63 | func nx_rec_classify(fps: *i64, n: i64, near: i64, hold_frames: i64, min_period: i64) -> i64 |