nx_ventropy.nx
buildroot/runtime/nx_ventropy.nx
about
nx_ventropy.nx -- sovereign ENTROPY CODING of a quantized 4x4 coefficient block (V-R3). After transform+quant
a block is mostly zeros clustered toward high frequency; this scans it in ZIG-ZAG order (low->high freq, so
zeros bunch at the end), run-length-codes (zeros-run, level) pairs, and bit-packs them with an EOB terminator
+ variable-length signed levels. A near-static block -> ~1 byte; a few nonzeros -> a few bytes (vs 32 raw).
This is the CAVLC-family stage VP8/H.264 use. Composes nx_bitio (MSB bit writer/reader). license_tier: ORIGINAL
dependencies 1 imports · 11 importers
diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.
imports: nx_bitio.nx
imported by: nx_rangecoder.nxnx_rangecoder_sig.nxnx_rd_intra_gate.nxnx_rdcurve_gate.nxnx_vcodec.nxnx_vcodec_mrbits_gate.nxnx_vcodec_tsize_rd_gate.nxnx_ventropy_gate.nxnx_ventropy_pack_gate.nxnx_vmvpred_gate.nxnx_vmvres.nx
structs
| none |
consts
| none |
functions
| 9 | func ve_zz_idx(k: i64) -> i64 { |
| 17 | func ve_zze(v: i64) -> i64 { if v < 0 { return ((0 - v) << 1) - 1 } return v << 1 } |
| 18 | func ve_zzd(z: i64) -> i64 { if (z & 1) == 1 { return 0 - ((z + 1) >> 1) } return z >> 1 } |
| 19 | func ve_blen(z: i64) -> i64 { var n: i64 = 0; var x: i64 = z; while x > 0 { n = n + 1; x = x >> 1 } return n } |
| 21 | func ve_vput(buf: *u8, bp: i64, v: i64) -> i64 { |
| 27 | func ve_vlen(buf: *u8, bp: i64) -> i64 { return 5 + nx_br_get(buf, bp, 5) }
called by 5: vc_dec_mb_part8_intervc_dec_block_packed_eve_decode_atve64_decode_atmvr_len calls 1: nx_br_get |
| 28 | func ve_vval(buf: *u8, bp: i64) -> i64 {
called by 5: vc_dec_mb_part8_intervc_dec_block_packed_eve_decode_atve64_decode_atmvr_get calls 2: nx_br_getve_zzd |
| 38 | func ve_encode_at(coeffs: *i64, buf: *u8, bp0: i64) -> i64 { |
| 57 | func ve_decode_at(buf: *u8, coeffs: *i64, bp0: i64) -> i64 { |
| 76 | func ve_encode(coeffs: *i64, buf: *u8) -> i64 { return ve_encode_at(coeffs, buf, 0) } |
| 78 | func ve_decode(buf: *u8, coeffs: *i64) -> i64 { return ve_decode_at(buf, coeffs, 0) } |
| 84 | func ve_cost(coeffs: *i64) -> i64 { |
| 94 | func ve64_cost(coeffs: *i64, zz8: *i64) -> i64 { |
| 110 | func ve64_encode_at(coeffs: *i64, buf: *u8, bp0: i64, zz8: *i64) -> i64 { |
| 127 | func ve64_decode_at(buf: *u8, coeffs: *i64, bp0: i64, zz8: *i64) -> i64 { |