code wiki / _hdl_build / nx_jpeg_block_enc.nx
nx_jpeg_block_enc.nx
buildroot/runtime/_hdl_build/nx_jpeg_block_enc.nx
about
nx_jpeg_block_enc.nx -- SOVEREIGN JPEG baseline block entropy coder (J2). Encodes one 8x8 block's
zigzag-ordered quantized coefficients into JPEG baseline entropy bits: DC as a difference from the
previous block's DC (Huffman category + sign-magnitude), AC as run-length of zeros + (run,size)
Huffman with ZRL (16-zero) runs and a trailing EOB. The matched decoder reverses it. Composes the
audited pieces: nx_jpeg_huff_enc (J1 tables/emit/decode) over nx_h264_bitwriter. Patent-clean
(JPEG/Annex K public since 1992). Self-proof = block encode->decode round-trip. license_tier: ORIGINAL
dependencies 3 imports · 9 importers
imports: nx_syscalls.nxnx_h264_bitwriter.nxnx_jpeg_huff_enc.nx
imported by: nx_cam_poster.nxnx_codec_rd2_gate.nxnx_codec_rd_gate.nxnx_jpeg_block_enc_gate.nxnx_jpeg_color_write.nxnx_jpeg_color_write_gate.nxnx_jpeg_rst_gate.nxnx_jpeg_write.nxnx_jpeg_write_gate.nx
structs
| none |
consts
| none |
functions
| 12 | func jbe_encode_block(bw: *BitWriter, dcCO: *i64, dcSI: *i64, acCO: *i64, acSI: *i64, zz: *i64, prevdc: i64) -> i64 |
| 32 | func jbe_decode_block(buf: *u8, pos: *i64, dcCO: *i64, dcSI: *i64, acCO: *i64, acSI: *i64, prevdc: i64, zz: *i64) -> i64 |