code wiki / (root) / nx_webpprobe.nx

nx_webpprobe.nx

buildroot/runtime/nx_webpprobe.nx

5248 B142 linesdepth 8pulls 17 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_webpprobe.nx -- DIAGNOSTIC: which WebP variant is actually on the wire? Our webp_decode() searches for the VP8L (lossless) fourcc and returns 0 for anything else, so wiring it in blind would fix an unknown fraction of the gap. RIFF layout: 'RIFF' <size> 'WEBP' <fourcc> -- so the variant is bytes 12..15. This walks a directory and reports the split, which decides whether closing the WebP gap is a WIRING job (VP8L) or a CODEC job (VP8 lossy intra). usage: nx_webpprobe <dir>

dependencies 4 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_dir.nx nx_webp.nx nx_webpprobe.nx

imports: nx_str.nxnx_syscalls.nxnx_dir.nxnx_webp.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 wp_puts sys_write nx_str_len wp_pi sys_mmap ↻ sys_write ↻ nx_dir_row_at nx_dir_row_is_regular_file wp_cat sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close wp_fourcc_is webp_decode wb_fourcc_is wb_u32le sys_mmap ↻ nx_vp8_kf_decode sys_mmap ↻ nx_vp8_frame_parse nx_vp8_at nx_vp8_bool_init sys_mmap ↻ nx_vp8_at ↻ nx_vp8_bool_literal nx_vp8_bool_bit nx_vp8_bool_get nx_vp8_at ↻

structs

none

consts

15const WP_MAXROWS: i64 = 4096
16const WP_ARENA: i64 = 1048576
17const WP_PATH: i64 = 4096

functions

19func wp_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
21func wp_pi(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
35func wp_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
37func wp_fourcc_is(b: *u8, off: i64, a: i64, c: i64, d: i64, e: i64) -> i64
called by 1: main
45func main(argc: i64, argv: *i64) -> i64