code wiki / _hdl_build / nx_natstat_corpus.nx

nx_natstat_corpus.nx

buildroot/runtime/_hdl_build/nx_natstat_corpus.nx

8986 B160 linesdepth 21pulls 166 transitivereach 0 importersview sourcekind orphan librarytopic natstat
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_jpeg_ascii.nx nx_natstat.nx nx_natstat_corpus.nx

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

12const K_MAGIC_4194304: i64 = 4194304
13const K_MAGIC_99999: i64 = 99999
14const K_MAGIC_65536: i64 = 65536

functions

16func 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
17func pn(v: i64) -> i64
28func 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 }
30func find_soi(buf: *u8, n: i64) -> i64
38func build_url(buf: *u8, c: i64) -> i64
46func main() -> i64