code wiki / _hdl_build / nx_natstat_corpus.nx
nx_natstat_corpus.nx
buildroot/runtime/_hdl_build/nx_natstat_corpus.nx
about
nx_natstat_corpus.nx -- N2: fit the NATURAL-IMAGE model from a real-photo CORPUS (replaces hand-set thresholds
with corpus-derived mean/spread per NSS feature = the Mahalanobis natural model NIQE/BRISQUE use). Fetches a
dozen real photographs over our sovereign HTTPS+JPEG stack, computes [mscn_rho, subject-kurtosis, colourful,
scale-spread] on each, and prints mean+std per feature (paste into nx_natstat). Statistics only -- no image is
stored or shown. expect_exit: 0
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_jpeg_ascii.nxnx_natstat.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 12 | const K_MAGIC_4194304: i64 = 4194304 |
| 13 | const K_MAGIC_99999: i64 = 99999 |
| 14 | const K_MAGIC_65536: i64 = 65536 |
functions
| 16 | func w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } calls 1: sys_write |
| 17 | func pn(v: i64) -> i64 |
| 28 | func isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x + 1) / 2; while y < x { x = y; y = (x + v / x) / 2 } return x } |
| 30 | func find_soi(buf: *u8, n: i64) -> i64 |
| 38 | func build_url(buf: *u8, c: i64) -> i64 |
| 46 | func main() -> i64 |