code wiki / _hdl_build / nx_bmp_tiff_gate.nx

nx_bmp_tiff_gate.nx

buildroot/runtime/_hdl_build/nx_bmp_tiff_gate.nx

15106 B346 linesdepth 10pulls 50 transitivereach 0 importersview sourcekind gate/prooftopic bmp
docsdependenciesstructsconstsfunctions

about

nx_bmp_tiff_gate.nx -- gate for C4 of the codec-chokepoint program (debt 1785903075): BMP READER (1/8/24-bit, RLE8, bottom-up AND top-down) + baseline TIFF READER (LE+BE, strips, none+PackBits, gray/RGB/palette) + chokepoint wiring. Fixtures are hand-assembled byte-exact files; the LZW tooth proves the TIFF reader REFUSES what it cannot decode instead of emitting a wrong image; the BMP witness is a real on-disk screenshot from the nishi-os lane. Inherits nx_gate_verdict. license_tier: ORIGINAL expect_exit: 0

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_bmp_decode.nx nx_tiff_decode.nx nx_img_bytes_to_rgb.nx nx_image.nx nx_bmp.nx nx_bmp_tiff_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_bmp_decode.nxnx_tiff_decode.nxnx_img_bytes_to_rgb.nxnx_image.nxnx_bmp.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 gv_head gv_puts sys_write sys_mmap ↻ bt_bmp_hdr bt_w32 bt_w16 bmp_decode_rgb bd_u32 bd_s32 bd_u32 ↻ bd_u16 sys_mmap ↻ gv_check gv_puts ↻ bt_w32 ↻ gv_bite gv_puts ↻ bt_e16 bt_w16 ↻ bt_ent bt_e16 ↻ bt_e32 bt_w32 ↻ bt_e32 ↻ tiff_decode_rgb tf_u32 tf_val1 tf_find tf_u16 tf_val tf_u16 ↻ tf_u32 ↻ tf_type_w tf_find ↻ sys_mmap ↻ tf_val ↻

structs

none

consts

none

functions

15func bt_w16(b: *u8, o: i64, v: i64) -> i64 { b[o]=(v&255) as u8; b[o+1]=((v>>8)&255) as u8; return o+2 }
called by 2: bt_e16bt_bmp_hdr
16func bt_w32(b: *u8, o: i64, v: i64) -> i64 { b[o]=(v&255) as u8; b[o+1]=((v>>8)&255) as u8; b[o+2]=((v>>16)&255) as u8; b[o+3]=((v>>24)&255) as u8; return o+4 }
18func bt_e16(b: *u8, o: i64, v: i64, le: i64) -> i64 { if le==1 { return bt_w16(b,o,v) } b[o]=((v>>8)&255) as u8; b[o+1]=(v&255) as u8; return o+2 }
called by 2: bt_entmain calls 1: bt_w16
19func bt_e32(b: *u8, o: i64, v: i64, le: i64) -> i64 { if le==1 { return bt_w32(b,o,v) } b[o]=((v>>24)&255) as u8; b[o+1]=((v>>16)&255) as u8; b[o+2]=((v>>8)&255) as u8; b[o+3]=(v&255) as u8; return o+4 }
called by 2: bt_entmain calls 1: bt_w32
21func bt_ent(b: *u8, o: i64, tag: i64, ty: i64, cnt: i64, val: i64, le: i64) -> i64
called by 1: main calls 2: bt_e16bt_e32
33func bt_bmp_hdr(b: *u8, w: i64, h: i64, bits: i64, comp: i64, data_off: i64, imgsz: i64) -> i64
called by 1: main calls 2: bt_w32bt_w16
51func main() -> i64