code wiki / _hdl_build / nx_jpeg_block_enc.nx

nx_jpeg_block_enc.nx

buildroot/runtime/_hdl_build/nx_jpeg_block_enc.nx

2334 B51 linesdepth 4pulls 4 transitivereach 15 importersview sourcekind librarytopic jpeg
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_h264_bitwriter.nx nx_jpeg_huff_enc.nx nx_jpeg_block_enc.nx nx_cam_poster.nx nx_codec_rd2_gate.nx nx_codec_rd_gate.nx nx_jpeg_block_enc_gate.nx nx_jpeg_color_write.nx nx_jpeg_color_write_gate.nx nx_jpeg_rst_gate.nx nx_jpeg_write.nx nx_jpeg_write_gate.nx

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

12func jbe_encode_block(bw: *BitWriter, dcCO: *i64, dcSI: *i64, acCO: *i64, acSI: *i64, zz: *i64, prevdc: i64) -> i64
32func jbe_decode_block(buf: *u8, pos: *i64, dcCO: *i64, dcSI: *i64, acCO: *i64, acSI: *i64, prevdc: i64, zz: *i64) -> i64