code wiki / (root) / nx_jpegprobe.nx

nx_jpegprobe.nx

buildroot/runtime/nx_jpegprobe.nx

5597 B144 linesdepth 9pulls 26 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_jpegprobe.nx -- DIAGNOSTIC: why does the image indexer skip real web JPEGs? nx_imgsearch walkdir over 64 real gathered images indexed only 12 (187 permille). All 64 passed magic sniff at gather time, so the loss is in the DECODER. This names the failing tooth mechanically instead of guessing: for every file in a directory it reports SOF2-progressive yes/no, the nx_jpeg_decode_LUMA return code (the path nx_img_to_gray -> nx_imgsearch actually uses), and -- only when luma failed -- the nx_jpeg_decode_RGB return code. The cross-tab progressive AND luma-fail AND rgb-ok is the smoking gun for a branch that exists in one sibling and not the other. usage: nx_jpegprobe <dir>

dependencies 5 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_dir.nx nx_jpeg_ascii.nx nx_jpeg_progressive.nx nx_jpegprobe.nx

imports: nx_str.nxnx_syscalls.nxnx_dir.nxnx_jpeg_ascii.nxnx_jpeg_progressive.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_dir_list nx_openat nx_dirent_read nx_dirent_iter nx_dir_is_dotlike nx_dir_name_strlen nx_dir_arena_copy_name jp_puts sys_write nx_str_len jp_pi sys_mmap ↻ sys_write ↻ nx_dir_row_at nx_dir_row_is_regular_file jp_cat sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_jpeg_is_progressive prog_be16 nx_jpeg_decode_luma sys_mmap ↻ nx_jpeg_dec_ctx_init sys_mmap ↻ _jpeg_ascii_probe_sof 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_is_progressive ↻ nx_jpeg_prog_decode sys_mmap ↻

structs

none

consts

18const JP_MAXROWS: i64 = 4096
19const JP_ARENA: i64 = 1048576
20const JP_PATH: i64 = 4096

functions

22func jp_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
24func jp_pi(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
38func jp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: main
40func main(argc: i64, argv: *i64) -> i64