code wiki / (root) / nx_jpeg_decode_test.nx

nx_jpeg_decode_test.nx

buildroot/runtime/nx_jpeg_decode_test.nx

4586 B127 linesdepth 7pulls 14 transitivereach 0 importersview sourcekind gate/prooftopic jpeg
docsdependenciesstructsconstsfunctions

about

nx_jpeg_decode_test.nx -- KAT for top-level baseline-JPEG decoder. Constructs a minimal grayscale 8x8 JPEG byte-by-byte (137 bytes) then decodes it end-to-end via nx_jpeg_decode. Verifies the output plane is all 128 (zero-coefficient block + level shift). JPEG byte layout: FF D8 SOI FF DB 00 43 00 + 64x01 DQT (Pq=0 Tq=0, all-ones identity quant) FF C4 00 26 DHT (DC + AC stacked, 36-byte payload) 00 01 00...00 00 DC: tc=0 th=0, BITS={1,0...0}, HUFFVAL={0} 10 01 00...00 00 AC: tc=1 th=0, BITS={1,0...0}, HUFFVAL={0} FF C0 00 0B SOF0 (1 comp, 8x8) 08 00 08 00 08 01 01 11 00 FF DA 00 08 SOS (1 comp) 01 01 00 00 3F 00 00 entropy: DC cat 0 + AC EOB FF D9 EOI expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_jpeg_decode.nx nx_jpeg_decode_test.nx

imports: nx_syscalls.nxnx_jpeg_decode.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_jpeg_dec_ctx_init sys_mmap ↻ nx_jpeg_decode sys_mmap ↻ nx_jpeg_seg_init nx_jpeg_seg_next nx_jpeg_classify_marker nx_jpeg_marker_is_lengthle nx_jpeg_sof_parse nx_jpeg_dqt_parse nx_jpeg_dht_parse nx_jpeg_dht_build_decode_t nx_jpeg_sos_parse nx_jpeg_decode_image_resol _decoder_sof_for_scan_comp _decoder_lookup_huffman nx_jpeg_mcu_scratch_init sys_mmap ↻ nx_jpeg_idct_init_cos_tabl nx_jpeg_decode_image_walk_ nx_jpeg_sof_mcu_cols nx_jpeg_sof_mcu_pixel_widt nx_jpeg_sof_mcu_rows nx_jpeg_sof_mcu_pixel_heig nx_jpeg_mcu_decode_one_com nx_jpeg_mcu_decode_one_blo nx_jpeg_ent_decode_block nx_jpeg_huff_decode_symbol nx_jpeg_ent_receive nx_jpeg_ent_extend nx_jpeg_dequant_un_zigzag sys_mmap ↻ nx_jpeg_zigzag_inverse_tab nx_jpeg_idct_8x8 sys_mmap ↻ _decoder_consume_rst _fail sys_mmap ↻

structs

none

consts

none

functions

26func _fail(n: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
46func main() -> i64