code wiki / (root) / nx_colordesc_gate.nx

nx_colordesc_gate.nx

buildroot/runtime/nx_colordesc_gate.nx

9889 B205 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_colordesc_gate.nx -- referee for the chroma color-layout descriptor (nx_colordesc). PROVES the color axis grayscale throws away. Corpus = 4 color classes (red/green/blue/yellow), 4 instances each varying additive brightness + per-channel noise. row1 RETRIEVAL: precision@3 by COLOR class (each image has 3 same-color peers). row2 BEYOND-GRAYSCALE (headline exceed): a luma-MATCHED red field and green field have identical grayscale (dHash Hamming == 0 -> the gray engine cannot tell them apart) yet a LARGE colordesc L1 -> color sees what dHash/visdesc structurally cannot. row3 BRIGHTNESS INVARIANCE: +uniform brightness leaves chroma unchanged (L1 ~ 0, by construction). row4 DETERMINISM: same image twice -> identical descriptor (L1 == 0). row5 SEPARATION: cross-color avg L1 >> same-color avg L1 (no collapse). GREEN iff 5/5. Durable verdict -> knowledge/status/colordesc_gate.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_colordesc.nx nx_phash.nx nx_colordesc_gate.nx

imports: nx_colordesc.nxnx_phash.nx

imported by: nobody (leaf or entry point)

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

main g_puts g_synth_rgb g_clamp255 nx_colordesc_extract cd_clamp255 nx_colordesc_l1 g_num g_fill_rgb g_clamp255 ↻ g_rgb_to_gray g_clamp255 ↻ nx_phash_dhash nx_phash_downscale nx_simhash_hamming nx_bits_popcount64_soft sys_openat_append g_w g_wn

structs

none

consts

none

functions

15func g_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
16func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main
17func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main
18func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 1: main
20func g_clamp255(v: i64) -> i64 { if v<0 { return 0 } if v>255 { return 255 } return v }
23func g_fill_rgb(buf: *u8, w: i64, h: i64, r: i64, g: i64, b: i64) -> i64
called by 1: main calls 1: g_clamp255
30func g_synth_rgb(buf: *u8, w: i64, h: i64, r: i64, g: i64, b: i64, dbright: i64, phase: i64) -> i64
called by 1: main calls 1: g_clamp255
46func g_rgb_to_gray(rgb: *u8, gray: *u8, w: i64, h: i64) -> i64
called by 1: main calls 1: g_clamp255
59func main() -> i64