code wiki / (root) / nx_apng_write.nx

nx_apng_write.nx

buildroot/runtime/nx_apng_write.nx

4861 B119 linesdepth 3pulls 3 transitivereach 8 importersview sourcekind librarytopic apng
docsdependenciesstructsconstsfunctions

about

nx_apng_write.nx -- sovereign APNG (animated PNG) ENCODER: the test-evidence VIDEO-CLIP container (operator: "video clips of the functionality being tested"). APNG plays natively in every browser (grounded: knowledge/fetched/ev_apng.raw), so an evidence page just embeds the .png and it MOVES. Built ON nx_png_write's proven chunk/CRC/adler primitives (imported, not duplicated). Full-frame animation (blend SOURCE, dispose NONE), 8-bit RGB, zlib STORED (correct-first; deflate = a perf rung). Structure: sig + IHDR + acTL(nframes,loops) + [fcTL + IDAT] (frame0) + [fcTL + fdAT]* + IEND, with the shared fcTL/fdAT sequence counter the spec requires. license_tier: ORIGINAL

dependencies 1 imports · 8 importers

nx_png_write.nx nx_apng_write.nx nx_apng_write_gate.nx nx_being_showcase.nx nx_browser_find_gate.nx nx_browser_user_sim.nx nx_browser_xp.nx nx_donor_native.nx nx_native_turntable.nx nx_retarget_showcase.nx

imports: nx_png_write.nx

imported by: nx_apng_write_gate.nxnx_being_showcase.nxnx_browser_find_gate.nxnx_browser_user_sim.nxnx_browser_xp.nxnx_donor_native.nxnx_native_turntable.nxnx_retarget_showcase.nx

structs

11struct ApngState

consts

9const NX_MAGIC_65535: i64 = 65535
20const NX_APNG_STATE_BYTES: i64 = 56

functions

22func ap_be32(b: *u8, o: i64, v: i64) -> i64 { b[o]=((v>>24)&255) as u8; b[o+1]=((v>>16)&255) as u8; b[o+2]=((v>>8)&255) as u8; b[o+3]=(v&255) as u8; return 0 }
23func ap_be16(b: *u8, o: i64, v: i64) -> i64 { b[o]=((v>>8)&255) as u8; b[o+1]=(v&255) as u8; return 0 }
called by 1: apng_frame
26func apng_open(st: *ApngState, path: *u8, w: i64, h: i64, nframes: i64, delay_num: i64, delay_den: i64) -> i64
52func ap_zstream(rgb: *u8, w: i64, h: i64, z: *u8) -> i64
called by 1: apng_frame calls 2: pw_adler32ap_be32
87func apng_frame(st: *ApngState, rgb: *u8) -> i64
114func apng_close(st: *ApngState) -> i64
called by 6: mainmainmainmainmainmain calls 1: pw_chunk