code wiki / (root) / nx_critic_axes.nx

nx_critic_axes.nx

buildroot/runtime/nx_critic_axes.nx

4319 B114 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic critic
docsdependenciesstructsconstsfunctions

about

nx_critic_axes.nx -- the SHARED measured-quality AXES (extracted so every loop/gate scores emitted output with the SAME rulers as the critic -- one formula, many callers; nx_critic_visual/nx_photoreal_critic are the calibration/epistemics home, this is the reusable measurement lib; consolidation: point them here later). Axes: fine_detail (1px micro-contrast over foreground) · structure (8x8 block-mean variance -- a real object has low-freq form, noise/flat do not) · chroma MAD. Overall = MIN axis (hard chain). license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_critic_axes.nx nx_face_carve_gate.nx nx_face_vs_target.nx nx_genloop_gate.nx nx_person_face_gate.nx

imports: nx_syscalls.nx

imported by: nx_face_carve_gate.nxnx_face_vs_target.nxnx_genloop_gate.nxnx_person_face_gate.nx

structs

none

consts

none

functions

8func ca_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
9func ca_clamp(v: i64) -> i64 { if v < 0 { return 0 } if v > 1000 { return 1000 } return v }
called by 1: ca_score
10func ca_lum(g: i64) -> i64 { return ((g & 255) + ((g >> 8) & 255) + ((g >> 16) & 255)) / 3 }
11func ca_fg(g: i64) -> i64 { let r: i64 = g & 255; let b: i64 = (g >> 16) & 255; if r >= b { return 1 } return 0 }
12func ca_chromaof(g: i64) -> i64
called by 1: ca_chroma_mad
25func ca_fgcount(fb: *i64, w: i64, h: i64) -> i64
called by 3: mainmainmain calls 1: ca_fg
32func ca_fine_detail(fb: *i64, w: i64, h: i64) -> i64
called by 3: ca_scoremainmain calls 3: ca_fgca_lumca_abs
53func ca_structure(fb: *i64, w: i64, h: i64) -> i64
called by 4: ca_scoremainmainmain calls 2: sys_mmapca_lum
88func ca_chroma_mad(fb: *i64, w: i64, h: i64) -> i64
called by 2: ca_scoremain calls 3: ca_fgca_chromaofca_abs
101func ca_score(fb: *i64, w: i64, h: i64) -> i64
110func ca_verdict(s: i64) -> *u8
called by 4: mainrowmainmain