code wiki / (root) / nx_rangecoder_sig.nx

nx_rangecoder_sig.nx

buildroot/runtime/nx_rangecoder_sig.nx

6125 B126 linesdepth 3pulls 3 transitivereach 108 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_rangecoder_sig.nx -- SIGNIFICANCE-MAP coefficient coder with NEIGHBOR CONTEXT (R2a rung-1, the CABAC- class technique nx_vcodec_entropy_gap MEASURED at -36.8% on the significance map). Replaces the run-length coefficient syntax: code a coded-block-flag, then a raster significance map whose context is the count of already-coded significant neighbors (left/up/up-left) plus a position band, then the levels of the significant coefficients. Bit-exact by construction (enc + dec share the sigmap fill order + contexts). Own context block (24 ctx, seed 2048): 0=CBF · 1..16=significance(posband x nbcount) · 17..21=level-length · 22=level-magnitude · 23=sign. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_rangecoder.nx nx_ventropy.nx nx_rangecoder_sig.nx nx_vcodec.nx nx_vcodec_ffv1_entropy_gate.nx nx_vcodec_sigcoder_gate.nx

imports: nx_rangecoder.nxnx_ventropy.nx

imported by: nx_vcodec.nxnx_vcodec_ffv1_entropy_gate.nxnx_vcodec_sigcoder_gate.nx

structs

none

consts

11const RC_SIG_NCTX: i64 = 24

functions

14func rcs_nb(sigmap: *i64, p: i64, wd: i64) -> i64
22func rcs_sigctx(p: i64, n: i64, nb: i64) -> i64
30func rcs_enc_level(st: *i64, out: *u8, probs: *i64, val: i64) -> i64
called by 1: rc_sig_encode calls 2: ve_blenrc_enc_ctx
40func rcs_dec_level(st: *i64, in_: *u8, probs: *i64) -> i64
called by 1: rc_sig_decode calls 1: rc_dec_ctx
55func rcs_nb_c(coeffs: *i64, p: i64, wd: i64) -> i64
called by 1: rc_sig_cost_q8
63func rcs_level_cost_q8(probs: *i64, val: i64) -> i64
called by 1: rc_sig_cost_q8 calls 2: ve_blenrc_bits_q8
75func rc_sig_cost_q8(coeffs: *i64, n: i64, wd: i64, probs: *i64) -> i64
93func rc_sig_encode(coeffs: *i64, n: i64, wd: i64, st: *i64, out: *u8, probs: *i64, sigmap: *i64) -> i64
110func rc_sig_decode(coeffs: *i64, n: i64, wd: i64, st: *i64, in_: *u8, probs: *i64, sigmap: *i64) -> i64
126func main() -> i64 { return 0 }