code wiki / _hdl_build / nx_image_symmetry_lib.nx

nx_image_symmetry_lib.nx

buildroot/runtime/_hdl_build/nx_image_symmetry_lib.nx

2945 B66 linesdepth 8pulls 11 transitivereach 2 importersview sourcekind librarytopic image
docsdependenciesstructsconstsfunctions

about

nx_image_symmetry_lib.nx -- shared ImageBeauty core (NO main), so both the nx_image_beauty tool AND the nx_gen_rank tool score with ONE source of truth (OO/DRY, per the consolidate-via-atlas directive). go_image_symmetry = the objective_beauty.py _bilateral_symmetry integer port on the proven nx_png_decode. Object model: companion_arch.md. license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_png_decoder.nx nx_image_symmetry_lib.nx nx_gen_rank.nx nx_image_beauty.nx

imports: nx_syscalls.nxnx_png_decoder.nx

imported by: nx_gen_rank.nxnx_image_beauty.nx

structs

none

consts

7const K_MAGIC_1024: i64 = 1024

functions

9func ib_itoa(dst: *u8, off: i64, v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var neg: i64=0; if m<0 {neg=1; m=0-m} var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var o: i64=off; if neg==1 {dst[o]=45 as u8; o=o+1} var q: i64=k-1; while q>=0{dst[o]=t[q];o=o+1;q=q-1} return o }
called by 3: do_scoredo_rankmain calls 1: sys_mmap
10func ib_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i]; o=o+1; i=i+1} return o }
13func go_image_symmetry(png: *u8, plen: i64) -> i64
called by 2: maingo_score_cid calls 1: nx_png_decode
48func go_score_cid(cid: *u8) -> i64