code wiki / (root) / nx_vp8_kf.nx

nx_vp8_kf.nx

buildroot/runtime/nx_vp8_kf.nx

22501 B589 linesdepth 3pulls 5 transitivereach 41 importersview sourcekind librarytopic vp8
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_vp8.nx nx_vp8_tables.nx nx_vp8_pred.nx nx_vp8_kf.nx nx_vp8_kf_gate.nx nx_vp8probe.nx nx_webp.nx

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

30const NX_MAGIC_1056: i64 = 1056
33const NX_VP8KF_OUT_Y: i64 = 0
34const NX_VP8KF_OUT_U: i64 = 1
35const NX_VP8KF_OUT_V: i64 = 2
36const NX_VP8KF_OUT_W: i64 = 3
37const NX_VP8KF_OUT_H: i64 = 4
38const NX_VP8KF_OUT_YS: i64 = 5
39const NX_VP8KF_OUT_UVS: i64 = 6
42const NX_VP8KF_BANDS: i64 = 0
43const NX_VP8KF_ZZ: i64 = 16
44const NX_VP8KF_LIDX: i64 = 32
45const NX_VP8KF_AIDX: i64 = 57
46const NX_VP8KF_TREE: i64 = 82
47const NX_VP8KF_CATB: i64 = 100
48const NX_VP8KF_CATL: i64 = 107
49const NX_VP8KF_CATP: i64 = 120
50const NX_VP8KF_AR_N: i64 = 200

functions

52func vp8kf_arena() -> *i64
called by 1: nx_vp8_kf_decode calls 1: sys_mmap
90func vp8kf_btree() -> *i64
called by 1: nx_vp8_kf_decode calls 1: sys_mmap
99func vp8kf_tree_read(bd: *NxVp8Bool, tree: *i64, probs: *u8) -> i64
called by 1: nx_vp8_kf_decode calls 1: nx_vp8_bool_get
109func vp8kf_read_ymode(bd: *NxVp8Bool) -> i64
called by 1: nx_vp8_kf_decode calls 1: nx_vp8_bool_get
120func vp8kf_read_uvmode(bd: *NxVp8Bool) -> i64
called by 1: nx_vp8_kf_decode calls 1: nx_vp8_bool_get
127func vp8kf_read_segid(bd: *NxVp8Bool, tp: *u8) -> i64
called by 1: nx_vp8_kf_decode calls 1: nx_vp8_bool_get
135func vp8kf_implied_b(ymode: i64) -> i64
called by 1: nx_vp8_kf_decode
146func vp8kf_decode_block(bd: *NxVp8Bool, tp: *u8, toff: i64, ctx0: i64,
216func vp8kf_mb_tokens(bd: *NxVp8Bool, tp: *u8, has_y2: i64,
called by 1: nx_vp8_kf_decode calls 1: vp8kf_decode_block
258func vp8kf_skip_ctx(lctx: *u8, actx: *u8, has_y2: i64) -> i64
called by 1: nx_vp8_kf_decode
268func nx_vp8_kf_decode(raw: *u8, n: i64, outp: *i64) -> i64