code wiki / (root) / nx_skinsample_gate.nx

nx_skinsample_gate.nx

buildroot/runtime/nx_skinsample_gate.nx

8060 B139 linesdepth 10pulls 33 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_skinsample_gate.nx -- the referee for nx_skinsample_lib (aesthetictwin AT23, 2026-09-16). In-process on synthetic pixels (no network, no real card): a known sRGB skin patch on a blue field measures to its known CIELAB values and typology angle within a stated tolerance, the mask counts exactly the patch, an all-blue image is UNMEASURED rather than a colour, the arctangent reproduces its known answers, white maps to L* 100 with no chroma, and a card write refuses to clobber an existing row while appending four measured rows to a bare card. Values are printed with gv_kv; the verdict line stays LAST. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_skinsample_lib.nx nx_skinsample_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_skinsample_lib.nx

imported by: nobody (leaf or entry point)

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

main gv_head gv_puts sys_write gv_ctr 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 ↻ sys_mmap ↻ sg_fill gv_check gv_puts ↻ sks_is_skin sks_measure_rgb sks_is_skin ↻ si_linear_of_byte si_root5_e3 sys_mmap ↻ sks_lab_of_linear sks_f_e5 si_cbrt_e5 sks_ita_deg10 fq_ctx sys_mmap ↻ fq_atan_small fq_mul fq_atanh_small fq_mul ↻

structs

none

consts

11const SG_W: i64 = 100
12const SG_H: i64 = 100
13const SG_PATCH: i64 = 50
14const SG_PATCH_X: i64 = 25
15const SG_PATCH_Y: i64 = 25
16const SG_R: i64 = 200
17const SG_G: i64 = 150
18const SG_B: i64 = 120
19const SG_BLUE: i64 = 255
20const SG_WHITE: i64 = 255
22const SG_EXP_L_E3: i64 = 66080
23const SG_EXP_A_E3: i64 = 14850
24const SG_EXP_B_E3: i64 = 23120
25const SG_EXP_ITA_DEG10: i64 = 348
26const SG_TOL_L_E3: i64 = 400
27const SG_TOL_AB_E3: i64 = 600
28const SG_TOL_ITA_DEG10: i64 = 8
29const SG_WHITE_L_E3: i64 = 100000
30const SG_TOL_WHITE_L_E3: i64 = 600
32const SG_ATAN45_L_E3: i64 = 60000
33const SG_ATAN45_B_E3: i64 = 10000
34const SG_ATAN45_DEG10: i64 = 450
35const SG_ATANHALF_L_E3: i64 = 55000
36const SG_ATANHALF_DEG10: i64 = 266
37const SG_TOL_ATAN: i64 = 2
38const SG_DIR: *u8 = "/tmp/skinsample_gate"
39const SG_KDIR: *u8 = "/tmp/skinsample_gate/knowledge"
40const SG_CARD_DIR: *u8 = "/tmp/skinsample_gate/knowledge/twincard"
41const SG_CARD_FULL: *u8 = "/tmp/skinsample_gate/knowledge/twincard/fx.card"
42const SG_CARD_BARE: *u8 = "/tmp/skinsample_gate/knowledge/twincard/fy.card"
43const SG_CARD_FULL_TEXT: *u8 = "card|fx|Fixture Full|2026-09-16|fixture\naxis|skin|skin_L|C|60|observed|fx1|2026-09\n"
44const SG_CARD_BARE_TEXT: *u8 = "card|fy|Fixture Bare|2026-09-16|fixture\n"
45const SG_CARD_ROWS: i64 = 4
46const SG_BPP: i64 = 3
47const SG_MODE644: i64 = 420
48const SG_MODE755: i64 = 493
49const SG_I64: i64 = 8

functions

51func sg_fill(rgb: *u8, w: i64, h: i64, x0: i64, y0: i64, pw: i64, ph: i64, r: i64, g: i64, b: i64) -> i64
called by 1: main
66func sg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
67func sg_write(path: *u8, text: *u8) -> i64
75func main(argc: i64, argv: *i64) -> i64