code wiki / _hdl_build / nx_nv1_lpc_gate.nx

nx_nv1_lpc_gate.nx

buildroot/runtime/_hdl_build/nx_nv1_lpc_gate.nx

9464 B270 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic nv1
docsdependenciesstructsconstsfunctions

about

nx_nv1_lpc_gate.nx -- ENGINEER gate for the NV1 LPC rung (nx_nv1_lpc.nx). Evidence-driven, re-runnable, no network. Proves: 1. BIT-EXACT round-trip (decode(encode(x)) == x byte-for-byte) on every signal class: silence, DC, ramp, triangle, full-range LCG noise, speech-ish (triangle + dither), alternating extremes, tiny blocks. 2. FLAC-CLASS compression measured in permil of raw bytes (asserted ceilings per class; printed so the ratio is ON the log). 3. The verbatim escape: noise NEVER expands past 6 + 2n. 4. Container integration: an 'L' chunk validates under nv1_validate and its samples are counted. 5. Every decoder rejection class fires its named negative. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_nv1_lpc.nx nx_g_check_lib.nx nx_g_puts_lib.nx nx_nv1_lpc_gate.nx

imports: nx_nv1_lpc.nxnx_g_check_lib.nxnx_g_puts_lib.nx

imported by: nobody (leaf or entry point)

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

main g_puts sys_write g_rt nv1l_encode nv1_wr_u32 nv1l_rd_i16 nv1l_residuals nv1l_best_k nv1l_cost_bits nv1l_rice_put nv1l_bit_put nv1l_decode nv1_rd_u32 nv1l_rd_i16 ↻ nv1l_wr_i16 nv1l_rice_get nv1l_bit_get g_check g_puts ↻ g_ratio_line g_puts ↻ g_dec g_wr_i16 g_tri nv1l_encode ↻ nv1l_decode ↻ nv1_write_header nv1_wr_u32 ↻ nv1_write_chunk nv1_wr_u32 ↻ nv1_write_end nv1_wr_u32 ↻ nv1_validate nv1_rd_u32 ↻ nv1_wr_u32 ↻ g_dec ↻

structs

none

consts

none

functions

18func g_dec(v: i64) -> i64
called by 2: g_ratio_linemain
33func g_rt(pcm: *u8, n: i64, pay: *u8, dec: *u8) -> i64
called by 1: main calls 2: nv1l_encodenv1l_decode
47func g_wr_i16(b: *u8, idx: i64, v: i64) -> i64
called by 1: main
56func g_tri(i: i64) -> i64
called by 1: main
62func g_ratio_line(name: *u8, paylen: i64, rawlen: i64) -> i64
called by 1: main calls 2: g_putsg_dec
71func main() -> i64