code wiki / _hdl_build / nx_jpeg_sym.nx

nx_jpeg_sym.nx

buildroot/runtime/_hdl_build/nx_jpeg_sym.nx

2668 B61 linesdepth 4pulls 4 transitivereach 5 importersview sourcekind librarytopic jpeg
docsdependenciesstructsconstsfunctions

about

nx_jpeg_sym.nx -- SOVEREIGN JPEG "modeling" layer: separates a block's entropy into (a) a SYMBOL stream (DC categories + AC (run<<4|size) bytes + EOB/ZRL) and (b) the raw sign-magnitude additional bits. This is exactly the modeling JPEG does before Huffman -- but here the symbols are emitted as plain bytes so a DIFFERENT final coder (our rANS) can entropy-code them. Comparing rANS(symbols) vs Huffman(symbols) with identical magnitude bits isolates the pure entropy-coder question at identical quality. Reuses the J1 substrate (jhe_mag_cat / jhe_mag_bits / jhe_decode_mag) over nx_h264_bitwriter. license_tier: ORIGINAL

dependencies 3 imports · 5 importers

nx_syscalls.nx nx_h264_bitwriter.nx nx_jpeg_huff_enc.nx nx_jpeg_sym.nx nx_codec_rd2_gate.nx nx_codec_real_rd2.nx nx_codec_real_rd2f.nx nx_codec_real_rd2g.nx nx_codec_real_rd3.nx

imports: nx_syscalls.nxnx_h264_bitwriter.nxnx_jpeg_huff_enc.nx

imported by: nx_codec_rd2_gate.nxnx_codec_real_rd2.nxnx_codec_real_rd2f.nxnx_codec_real_rd2g.nxnx_codec_real_rd3.nx

structs

none

consts

none

functions

13func jsym_encode_block(sym: *u8, sp: *i64, bwmag: *BitWriter, zz: *i64, prevdc: i64) -> i64
40func jsym_decode_block(sym: *u8, sp: *i64, magbuf: *u8, magpos: *i64, prevdc: i64, zz: *i64) -> i64
called by 5: mainmainmainmainmain calls 1: jhe_decode_mag