code wiki / _hdl_build / nx_faceanat_gate.nx

nx_faceanat_gate.nx

buildroot/runtime/_hdl_build/nx_faceanat_gate.nx

8651 B166 linesdepth 9pulls 34 transitivereach 0 importersview sourcekind gate/prooftopic faceanat
docsdependenciesstructsconstsfunctions

about

nx_faceanat_gate.nx -- prove the INSIDE-OUT face (nx_faceanat: canon proportions + tissue-depth relief) is a principled, MEASURED improvement over the eyeballed sdf_face -- the operator's "skeleton->muscle->skin" call, tested not asserted. T1 CANON proportions hold in the EMITTED parts (rule of fifths: eye centers +-258 symmetric on the eye line; thirds: brow->subnasale and subnasale->chin within the anthropometric band) T2 TISSUE-DEPTH relief is real: the cheekbone (proud ~10mm) sits FORWARD (-z) of the forehead (shallow ~4.5mm) and FORWARD of the recessed temple -- differential relief DERIVED from the depth table, not sculpted flat T3 ★THE FIT TEST: rs_err (render-vs-reference luma over mapped correspondences) of the anatomical face must be COMPARABLE-OR-BETTER than the hand-tuned sdf_face -- inside-out derivation is not worse than eyeballing T4 determinism + PNG knowledge/nx_faceanat.png license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_jpeg_ascii.nx nx_sdfrender_mt.nx nx_faceanat.nx nx_png.nx nx_faceanat_gate.nx

imports: nx_syscalls.nxnx_jpeg_ascii.nxnx_sdfrender_mt.nxnx_faceanat.nxnx_png.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main hw sys_write sys_mmap sdf_bytes faceanat_build sdf_clear_ops sdf_set_floor sdf_set_mtx_amp fa_tissue_z sdf_set_op sdf_set_mat sdf_set_rot it_cos4096 it_sin4096 it_sin4096 ↻ pn sys_mmap ↻ sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_jpeg_decode_rgb sys_mmap ↻ nx_jpeg_dec_ctx_init sys_mmap ↻ _jpeg_ascii_probe_sof sys_mmap ↻ nx_jpeg_seg_init nx_jpeg_seg_next nx_jpeg_classify_marker nx_jpeg_marker_is_lengthle nx_jpeg_sof_parse nx_jpeg_is_progressive prog_be16 nx_jpeg_prog_decode sys_mmap ↻

structs

none

consts

22const P_UC: i64 = 256
23const P_VC: i64 = 329
24const P_SU: i64 = 333
25const P_SV: i64 = 350
26const P_VLO: i64 = 240
27const P_VHI: i64 = 440

functions

18func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
19func pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 }
called by 1: main calls 2: sys_mmapsys_write
20func fbdiff(a: *i64, b: *i64, n: i64) -> i64 { var d: i64=0; var i: i64=0; while i<n { if a[i]!=b[i] { d=d+1 } i=i+1 } return d }
called by 1: main
31func rs_err(fb: *i64, rgb: *u8, tw: i64, th: i64) -> i64
called by 1: main
71func main() -> i64