nx_quality_driver.nx
buildroot/runtime/nx_quality_driver.nx
about
nx_quality_driver.nx -- MINIMAL substrate driver: real image -> verdict JSON.
Reads /tmp/nx_img.raw (24-byte LE header + raw RGB bytes), runs the
safest detectors that don't trip the codegen bug (single function call,
no struct returns mid-chain), emits JSON to stdout. svc-quality
invokes this as a subprocess per render.
Inline-in-main pattern because nxc2 codegen bug forbids the wrapper
pattern for some detector compositions. The driver does each detector
inline; result fields packed into one flat-array and printed as JSON.
Output:
{"palette_kind":N,"warm_q10":N,"saturation_q10":N,"mean_r":N,"mean_g":N,"mean_b":N,"image_w":N,"image_h":N}
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_image.nxnx_image_load_raw.nxnx_color_palette.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
| 25 | const K_MAGIC_2048: i64 = 2048 |
functions
| 28 | func nx_qd_puts(buf: *u8, pos: i64, s: *u8) -> i64 called by 1: main |
| 40 | func nx_qd_putint(buf: *u8, pos: i64, v: i64) -> i64 called by 1: main |
| 64 | func main() -> i64 |