code wiki / (root) / nx_uxf_mp4box_gate.nx

nx_uxf_mp4box_gate.nx

buildroot/runtime/nx_uxf_mp4box_gate.nx

7631 B128 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic uxf
docsdependenciesstructsconstsfunctions

about

nx_uxf_mp4box_gate.nx -- the D001 MIGRATION of nx_uxf_mp4box_test onto nx_gate_verdict (2026-09-06). IT DRIVES THE EXTRACTED LIB, NOT A THIRD COPY. nx_uxf_mp4box_test carried its own mp4_w32, mp4_r32, mp4_4cc, mp4_box_begin and mp4_box_end, which are the same primitives now shipping in nx_uxf_remux.nx as uxr_w32, uxr_r32, uxr_4cc, uxr_box_begin and uxr_box_end. Pointing the teeth at the lib keeps ONE MP4 box writer in the estate. The 4cc comparison is done here with the lib's own uxr_bytes_eq rather than by adding a helper to a lib that is already bite-proven, because editing a proven lib to satisfy a test invalidates the proof for no capability gain. ALL FOUR ORIGINAL TEETH PRESERVED IN PREDICATE, split where the original bundled several claims into one boolean: the walk's ALIGNMENT and its BOX COUNT are separate teeth, and each of the three expected box types is its own tooth, so a failure names which box is wrong rather than reporting that the tree is wrong. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_gate_verdict.nx nx_syscalls.nx nx_uxf_remux.nx nx_uxf_mp4box_gate.nx

imports: nx_gate_verdict.nxnx_syscalls.nxnx_uxf_remux.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ uxr_box_begin uxr_w32 uxr_4cc uxr_4cc ↻ uxr_w32 ↻ uxr_box_end uxr_w32 ↻ um_walk_count uxr_r32 gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check ↻ uxr_bytes_eq

structs

none

consts

18const UM_OUT: i64 = 65536
19const UM_TAG: i64 = 8
20const UM_WANT_FTYP_SIZE: i64 = 24 // 8 header + isom + minor + isom + mp41
21const UM_WANT_TOPLEVEL: i64 = 2 // ftyp and moov
22const UM_MVHD_PAYLOAD: i64 = 100
23const UM_HDR: i64 = 8
24const UM_TYPE_OFF: i64 = 4 // the 4cc type sits at box_start+4, not box_start
25const UM_HIGHBYTE_KAT: i64 = 16909060 // 0x01020304 -- FOUR DISTINCT NON-ZERO BYTES. Every box size this

functions

34func um_walk_count(buf: *u8, n: i64, out_count: *i64) -> i64
called by 1: main calls 1: uxr_r32
48func main(argc: i64, argv: *i64) -> i64