code wiki / (root) / nx_flac_gate.nx

nx_flac_gate.nx

buildroot/runtime/nx_flac_gate.nx

7008 B166 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic flac
docsdependenciesstructsconstsfunctions

about

nx_flac_gate.nx -- proves the FLAC decoder core. Two of these tests guard defects that produce NO error and NO crash: T1 zigzag unfolding -- invert it and every residual has the right magnitude and the wrong sign. Output is noise, nothing reports it. T8 mid/side low-bit -- the encoder drops the low bit of mid and hides it in the low bit of side. Forget to re-insert it and every odd-summed sample pair is off by one: inaudible, invisible on a spectrum, and fatal to the word 'lossless'. T8 uses an ODD sum specifically. NON-VACUITY: T14/T15 are negative controls -- a non-FLAC magic, an over-order fixed predictor and a zero-order LPC must each be REFUSED. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_bitstream.nx nx_flac.nx nx_flac_gate.nx

imports: nx_syscalls.nxnx_bitstream.nxnx_flac.nx

imported by: nobody (leaf or entry point)

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

main nx_flac_unfold nx_flac_fold nx_flac_fixed_predict sys_mmap nx_flac_restore_fixed nx_flac_fixed_predict ↻ nx_flac_restore_lpc nx_flac_undo_stereo nx_flac_block_size nx_flac_sample_rate nx_flac_bit_depth nx_flac_crc8 nx_bitstream_alloc sys_mmap ↻ nx_flac_read_rice nx_bitstream_read_msb nx_bitstream_bits_remainin _bs_peek_byte nx_flac_unfold ↻ nx_flac_is_stream g_puts sys_write sys_exit

structs

none

consts

none

functions

19func g_puts(s: *u8) -> i64
called by 1: main calls 1: sys_write
26func main() -> i64