nx_vp8_kf.nx
buildroot/runtime/nx_vp8_kf.nx
about
nx_vp8_kf.nx -- VP8 lossy KEYFRAME decoder (intra-only): the C3 rung.
Entropy half + driver. Bitstream order and all probability plumbing ported
against RFC 6386 reference decoder (dixie.c / modemv.c / tokens.c):
partition-1 header: colorspace(2b, must be 0) -> segmentation ->
loopfilter (parsed, v1 does not filter) -> token partition count+sizes ->
quantizer -> refresh_entropy -> 1056 coeff prob updates -> skip prob.
Then one mode pass over all MBs (partition 1), then per-row token decode
(partitions cycle by row) + reconstruction.
THE LOOP FILTER IS DELIBERATELY ABSENT (fingerprint-grade output): it
smooths block edges for display but does not feed back into intra
prediction of the same frame, so omitting it perturbs pixels only locally.
The gate bounds the perturbation against an independent oracle.
TOKEN CONTEXT RULES (the three easy-to-lose ones, from tokens.c):
- EOB is NOT tested for the token following a ZERO token.
- After a token, the next context is 0/1/2 for zero/one/bigger.
- A skipped MB zeroes its left+above contexts EXCEPT Y2 when the mode
has no Y2 block (B_PRED), which PRESERVES the stored Y2 context.
genealogy_id: vp8_rfc6386
lineage_id: nx_vp8_kf_v1
license_tier: ORIGINAL
dependencies 4 imports · 3 importers
imports: nx_syscalls.nxnx_vp8.nxnx_vp8_tables.nxnx_vp8_pred.nx
imported by: nx_vp8_kf_gate.nxnx_vp8probe.nxnx_webp.nx
structs
| none |
consts
| 30 | const NX_MAGIC_1056: i64 = 1056 |
| 33 | const NX_VP8KF_OUT_Y: i64 = 0 |
| 34 | const NX_VP8KF_OUT_U: i64 = 1 |
| 35 | const NX_VP8KF_OUT_V: i64 = 2 |
| 36 | const NX_VP8KF_OUT_W: i64 = 3 |
| 37 | const NX_VP8KF_OUT_H: i64 = 4 |
| 38 | const NX_VP8KF_OUT_YS: i64 = 5 |
| 39 | const NX_VP8KF_OUT_UVS: i64 = 6 |
| 42 | const NX_VP8KF_BANDS: i64 = 0 |
| 43 | const NX_VP8KF_ZZ: i64 = 16 |
| 44 | const NX_VP8KF_LIDX: i64 = 32 |
| 45 | const NX_VP8KF_AIDX: i64 = 57 |
| 46 | const NX_VP8KF_TREE: i64 = 82 |
| 47 | const NX_VP8KF_CATB: i64 = 100 |
| 48 | const NX_VP8KF_CATL: i64 = 107 |
| 49 | const NX_VP8KF_CATP: i64 = 120 |
| 50 | const NX_VP8KF_AR_N: i64 = 200 |
functions
| 52 | func vp8kf_arena() -> *i64 |
| 90 | func vp8kf_btree() -> *i64 |
| 99 | func vp8kf_tree_read(bd: *NxVp8Bool, tree: *i64, probs: *u8) -> i64 |
| 109 | func vp8kf_read_ymode(bd: *NxVp8Bool) -> i64 |
| 120 | func vp8kf_read_uvmode(bd: *NxVp8Bool) -> i64 |
| 127 | func vp8kf_read_segid(bd: *NxVp8Bool, tp: *u8) -> i64 |
| 135 | func vp8kf_implied_b(ymode: i64) -> i64 called by 1: nx_vp8_kf_decode |
| 146 | func vp8kf_decode_block(bd: *NxVp8Bool, tp: *u8, toff: i64, ctx0: i64, |
| 216 | func vp8kf_mb_tokens(bd: *NxVp8Bool, tp: *u8, has_y2: i64, |
| 258 | func vp8kf_skip_ctx(lctx: *u8, actx: *u8, has_y2: i64) -> i64 called by 1: nx_vp8_kf_decode |
| 268 | func nx_vp8_kf_decode(raw: *u8, n: i64, outp: *i64) -> i64 |