code wiki / _hdl_build / nx_critic_visual.nx
nx_critic_visual.nx
buildroot/runtime/_hdl_build/nx_critic_visual.nx
about
nx_critic_visual.nx -- the PHOTOREAL image critic WIRED UNDER the epistemic Nishi Critic (nx_critic), so the
critic GROWS in capability under guidance (operator 2026-07-04: "wired to the critic so the critic can grow
in capabilities under your guidance"). Each measurement axis is a scientific BELIEF held provisionally:
nx_critic grades it LAW / THEORY / CONTESTED / REFUTED from reproductions + counter-strength + whether it was
RED-TEAMED, and queues the un-red-teamed axes as BLIND SPOTS = the critic's own improvement worklist.
★THE FIRST GROWTH (motivated by wiring): naive local stats are GAMED BY NOISE -- random noise has high
fine_detail/chroma/'specular' but is NOT photoreal (the PSNR blind-spot the Critic exists to catch). So we
ADD a STRUCTURE axis (low-frequency coherence: a real object has form; noise averages to flat) that REJECTS
noise, red-teaming fine_detail. GATE GREEN = the GROWN critic correctly rejects BOTH flat clay AND noise
(a strictly better discriminator than v1), and honestly grades + queues its own weak metrics.
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_critic.nxnx_sdfrender.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const K_MAGIC_65536: i64 = 65536 |
| 17 | const K_MAGIC_2654435761: i64 = 2654435761 |
| 18 | const K_MAGIC_1013904223: i64 = 1013904223 |
functions
| 20 | func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 21 | func pn(v: i64) -> i64 |
| 33 | func cv_lum(g: i64) -> i64 { return ((g & 255) + ((g >> 8) & 255) + ((g >> 16) & 255)) / 3 } |
| 34 | func cv_pl(g: i64) -> i64 { let r: i64 = g & 255; let b: i64 = (g >> 16) & 255; if r >= b { return 1 } return 0 } |
| 35 | func cv_chroma(g: i64) -> i64 called by 1: ax_chroma |
| 41 | func cv_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 42 | func cv_clamp(v: i64) -> i64 { if v < 0 { return 0 } if v > 1000 { return 1000 } return v } called by 1: cv_score |
| 46 | func ax_fine_detail(fb: *i64, w: i64, h: i64) -> i64 |
| 67 | func ax_structure(fb: *i64, w: i64, h: i64) -> i64 |
| 93 | func ax_chroma(fb: *i64, w: i64, h: i64) -> i64 |
| 106 | func cv_score(fb: *i64, w: i64, h: i64) -> i64 |
| 115 | func cv_verdict(s: i64) -> *u8 called by 1: main |
| 120 | func cv_statusname(s: i64) -> *u8 called by 1: main |
| 127 | func main() -> i64 |