nx_vcodec_wasm.nx
buildroot/runtime/nx_vcodec_wasm.nx
about
nx_vcodec_wasm.nx -- the BROWSER entry wrapper for the sovereign video codec (nx_vcodec). Same wasm memory model as
nx_wasmvoxel/nx_wasmcube: fixed linear-memory offsets (the codec's "caller-owned scratch" become wasm offsets), a
handful of exported entry/accessor funcs, main()=0. This wrapper drives the TRANSMITTABLE PACKED codec -- the path
the gates prove and the daemon relays -- so the in-browser demo exercises the real encode->stream->INDEPENDENT-decode
(with directional intra prediction + the sovereign H.264 integer DCT), not just an encoder-side reconstruction.
JS only ferries raw bytes + blits to <canvas>; ALL codec logic is sovereign nx compiled nx_compile_wat ->
nx_wat_compiler -> .wasm. Frame cap 128x128 this rung. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_vcodec.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 10 | const O_CUR: i64 = 0 // current frame, 8bpp luma (up to 128*128 = 16384 B) |
| 11 | const O_PREV: i64 = 16384 // previous reconstructed reference (unused for a keyframe) |
| 12 | const O_ENC_RECON: i64 = 32768 // encoder-side reconstruction |
| 13 | const O_DEC_RECON: i64 = 49152 // INDEPENDENT decoder reconstruction (what the far side sees) |
| 14 | const O_STREAM: i64 = 65536 // the transmittable bitstream (up to 65536 B) |
| 15 | const O_BLK: i64 = 131072 // 16 i64 transform scratch |
| 16 | const O_MV: i64 = 131200 // 2 i64 motion vector |
functions
| 20 | func vc_wasm_encode(W: i64, H: i64, qp: i64, keyframe: i64, sad_thresh: i64) -> i64 calls 1: vc_enc_frame_packed |
| 25 | func vc_wasm_decode(W: i64, H: i64, qp: i64) -> i64 calls 1: vc_dec_frame_packed |
| 29 | func vc_cur_off() -> i64 { return O_CUR } |
| 30 | func vc_prev_off() -> i64 { return O_PREV } |
| 31 | func vc_enc_recon_off() -> i64 { return O_ENC_RECON } |
| 32 | func vc_dec_recon_off() -> i64 { return O_DEC_RECON } |
| 33 | func vc_stream_off() -> i64 { return O_STREAM } |
| 34 | func main() -> i64 { return 0 } |