code wiki / (root) / nx_av1_tile_gate.nx

nx_av1_tile_gate.nx

buildroot/runtime/nx_av1_tile_gate.nx

7484 B170 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic av1
docsdependenciesstructsconstsfunctions

about

nx_av1_tile_gate.nx -- proves AV1/AV2 tile geometry and tile_info. T2 pins the mode-info count against the OBVIOUS-BUT-WRONG formula. MiCols is 2 * ((w + 7) >> 3): round to 8 pixels first, THEN count 4x4 units. The natural (w + 3) >> 2 agrees on multiples of 8 and disagrees everywhere else, so the test uses 1, 4, 7, 8, 9 and 1920 -- a 1x1 frame has TWO mode-info columns, not one, and only the correct formula gives that. T3 pins ns(): small values cost w-1 bits and large ones w. Reading it as a fixed-width field consumes one bit too few on every large value. The test round-trips every value of several non-power-of-two alphabets, so a fixed-width reader cannot pass. T4 round-trips real tile_info at 1920x1080 and 3840x2160, with both 64 and 128 superblocks, across the legal log2 range. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_bitstream.nx nx_av1_seq.nx nx_av1_tile.nx nx_av1_tile_gate.nx

imports: nx_syscalls.nxnx_bitstream.nxnx_av1_seq.nxnx_av1_tile.nx

imported by: nobody (leaf or entry point)

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

main nx_av1_tile_log2 nx_av1_mi_cols nx_av1_mi_rows nx_av1_sb_cols nx_av1_sb_rows sys_mmap nx_av1_bw_new sys_mmap ↻ nx_av1_ns_write nx_av1_floorlog2b nx_av1_bw_put nx_bitstream_alloc sys_mmap ↻ nx_av1_ns_read nx_av1_floorlog2b ↻ nx_bitstream_read_msb nx_bitstream_bits_remainin _bs_peek_byte nx_av1_tile_write_uniform nx_av1_mi_cols ↻ nx_av1_mi_rows ↻ nx_av1_sb_cols ↻ nx_av1_sb_rows ↻ nx_av1_tile_log2 ↻ nx_av1_min2 nx_av1_max2 nx_av1_bw_put ↻ nx_av1_tile_parse nx_av1_mi_cols ↻ nx_av1_mi_rows ↻ nx_av1_sb_cols ↻ nx_av1_sb_rows ↻ nx_av1_tile_log2 ↻ nx_av1_min2 ↻ nx_av1_max2 ↻ nx_bitstream_read_msb ↻ g_puts sys_write sys_exit

structs

none

consts

none

functions

23func g_puts(s: *u8) -> i64
called by 2: g_putnmain calls 1: sys_write
30func g_putn(v: i64) -> i64
called by 1: main calls 3: sys_mmapg_putssys_write
44func main() -> i64