code wiki / (root) / nx_skintex_probe.nx

nx_skintex_probe.nx

buildroot/runtime/nx_skintex_probe.nx

3836 B89 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

nx_skintex_probe.nx -- decode a real skin texture and report what is actually in it. The arousal skin model computes reflectance from melanin + haemoglobin and was generating flat colour with hash-noise micro-variation standing in for pores. A real Std_Skin_*_Diffuse map IS the melanin/albedo term, measured off an actual character asset instead of invented -- so the physiology can MODULATE a real albedo rather than replace it. This probe exists before any wiring: prove the decode, learn the resolution, and measure the tone distribution. Building the shader path on an unverified decode would be building on a guess. usage: nx_skintex_probe <file.jpeg> license_tier: ORIGINAL expect_exit: 0 ⚠NOT nx_jpeg_ascii: that module's decode_rgb only probes the SOF for dimensions (it backs the JPEG->ASCII-art path). It returned rc=0 with correct 2048x2048 dims and ONE non-black pixel out of 16384 sampled -- a success code over an empty buffer. nx_jpeg_decoder is the real baseline DCT decoder (DQT/DHT/SOS/Huffman). Picking the first symbol that matched the name cost a build cycle.

dependencies 1 imports · 0 importers

nx_jpeg_decoder.nx nx_skintex_probe.nx

imports: nx_jpeg_decoder.nx

imported by: nobody (leaf or entry point)

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

main sp_puts nx_jpeg_decode sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ _jpg_read_u16_be _jpg_zigzag nx_huffman_build sys_mmap ↻ _jpg_destuff_entropy nx_bitstream_alloc sys_mmap ↻ nx_dct8_init _jpg_decode_block nx_huffman_decode_msb nx_bitstream_read_msb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_read_msb ↻ _jpg_extend _jpg_zigzag ↻ nx_dct8_inverse_2d nx_dct8_inverse_1d _jpg_clamp_u8 _jpg_ycbcr_to_rgb _jpg_clamp_u8 ↻ sp_putn

structs

none

consts

none

functions

19func sp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
20func sp_putn(v: i64) -> i64
called by 1: main
33func main(argc: i64, argv: *i64) -> i64