code wiki / _hdl_build / _imgscramble.nx
_imgscramble.nx
buildroot/runtime/_hdl_build/_imgscramble.nx
about
_imgscramble.nx -- RED-TEAM INSTRUMENT for the image graders (operator 2026-08-04: "is this eval
doing the work or is it junk"): shuffle an image's PxP patches with a seeded deterministic permutation.
Scrambling DESTROYS all aesthetic/structural content (the face, the figure, the composition) while
approximately preserving LOCAL statistics -- so any judge that scores an image ~equal to its scramble
is measuring texture, not beauty, and cannot rank a styled character above a blob. license_tier: ORIGINAL
_imgscramble <in.png> <out.png> <patch_px>
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_png_decoder.nxnx_png.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
| 10 | const SCR_MAGIC_65536: i64 = 65536 |
| 11 | const SCR_LCG_A: i64 = 1103515245 |
| 12 | const SCR_LCG_C: i64 = 12345 |
| 13 | const SCR_LCG_M: i64 = 2147483647 |
| 14 | const SCR_SEED: i64 = 80404 |
functions
| 16 | func sc_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func sc_n(v: i64) -> i64 |
| 25 | func sc_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8) { let c: i64 = s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v } called by 1: main |
| 27 | func main(argc: i64, argv: *i64) -> i64 |