Expand description
Pure-Rust EVC — MPEG-5 Essential Video Coding (ISO/IEC 23094-1).
Round-10 status: a working Baseline-profile IDR + P + B decoder
with residual coding (RLE + dequant + IDCT for nTbS up to 64),
deblocking (§8.8.2 luma + chroma path), Main-profile CABAC init
tables (Tables 40-90, §9.3.4.2 ctxInc helpers, eq. 1425/1426),
full reference-picture-list parsing (§7.3.7 / §7.4.8) for
non-IDR slices (sps_rpl_flag = 1), the HMVP candidate list
(§8.5.2.7 / §8.5.2.4.4) wired through the inter pipeline, the
round-9 multi-ref DPB + POC reordering, and the round-10
spatial-neighbour MV grid AMVP (§8.5.2.4) +
LTRP RPL → DPB resolution (§8.3.2 / §8.3.5) +
flush() drain of the output queue.
The crate decomposes into:
bitreader— MSB-first bit reader (§9.2 helpers).nal— 2-byte NAL header (§7.3.1.2) + length-prefixed framing.sps/pps/aps— parameter-set parsers (§7.3.2.x).slice_header—slice_header()parse (§7.3.4).cabac— full CABAC parsing process (§9.3): arithmetic decoding engine (regular + bypass + terminate) plus the FL / U / TR / EGk binarization helpers. The Baselinesps_cm_init_flag == 0path uses a single ctxTable=0 / ctxIdx=0 context.cabac_init— Main-profile (sps_cm_init_flag == 1) initValue tables (Tables 40-90 of §9.3.5) + the §9.3.2.2 init pipeline (cabac_init::init_main_profile_contexts) + the §9.3.4.2 per- syntax-element ctxInc helpers (btt_split_flag,last_sig_coeff_x/y_prefix,sig_coeff_flag,coeff_abs_level_greaterA/B_flag, etc.).slice_data—slice_data()walker plus the round-3 IDR pixel pipeline (slice_data::decode_baseline_idr_slice) and the round-4 inter pipeline (slice_data::decode_baseline_inter_slice).intra— intra prediction (§8.4.4) for the Baseline 5-mode set (DC, HOR, VER, UL, UR;sps_eipd_flag == 0path).inter— round-4 inter prediction (§8.5): MV resolution + 8-tap luma + 4-tap chroma sub-pel interpolation (Tables 25 / 27 — Baseline subset only) + AMVP candidate construction + default-weighted bipred.transform— inverse DCT-II for nTbS ∈ {2, 4, 8, 16, 32, 64} (eq. 1062-1076). The 64-point matrix is built from the closed-formM[m][n] = round(64·√2·cos(π·m·(2n+1)/128))(m≥1, M[0][n]=64), verified against every printed entry of eq. 1072 / 1074.dequant— scaling + transform + final renorm (§8.7.2 / §8.7.3 / §8.7.4) for thesps_iqt_flag == 0Baseline path.picture— yuv420p 8-bit picture buffer + per-CU intra reconstruct glue (§8.7.5).decoder— registered decoder factory returning a workingDecoderfor Baseline IDR + P/B bitstreams (8-bit 4:2:0, no residuals, single reference).rpl— round-8ref_pic_list_struct()parser (§7.3.7 / §7.4.8). Handles STRP + LTRP entries with the per-entrydelta_poc_st/strp_entry_sign_flag/poc_lsb_ltshape.hmvp— round-8 history-based MV prediction (§8.5.2.7 LRU update + §8.5.2.4.4 derive_default_mv walk). 23-entry list with per-CTU-row reset.
Round-8 deliberate omissions (pending follow-up rounds):
- 10-bit support,
- advanced deblocking (
sps_addb_flag = 1— round-6 supports thesps_addb_flag = 0baseline filter only, now for both luma and chroma; addb is a Main-profile feature), - multi-reference DPB + reference list reordering (round 8 parses
the RPL and the slice-side
num_ref_idx_active_minus1[], but the inter pipeline still keys off the previous picture only), - Main-profile decode — round 7 lands the CABAC infrastructure
(Tables 40-90 + ctxInc helpers); round 8 lands the RPL parse path
and the HMVP candidate list. The actual Main-profile syntax
decode (BTT / SUCO / ADMVP / EIPD / IBC / ATS / ADCC / ALF / DRA
/ AMVR / MMVD / affine / DMVR) still bubbles up
Error::Unsupported.
All section / clause numbers refer to ISO/IEC 23094-1:2020(E) at
docs/video/evc/ISO_IEC_23094-1-EVC-2020.pdf. Every module is
spec-only — clauses, equations, and table numbers cite the
Recommendation directly.
Modules§
- alf
- EVC Adaptive Loop Filter (ISO/IEC 23094-1 §8.9 / §7.3.5).
- alf_
tables - EVC ALF fixed filter tables (ISO/IEC 23094-1 §8.9.4 eq. 102 + 103).
- aps
- EVC adaptation parameter set parser (ISO/IEC 23094-1 §7.3.2.3).
- bitreader
- MSB-first bit reader plus 0-th-order Exp-Golomb helpers for EVC RBSPs.
- cabac
- EVC CABAC parsing process (ISO/IEC 23094-1 §9.3).
- cabac_
init - EVC Main-profile CABAC context initialization tables (ISO/IEC 23094-1 §9.3.2.2 + §9.3.4.2).
- deblock
- EVC deblocking filter (ISO/IEC 23094-1 §8.8.2).
- decoder
- Registry glue + minimal decode pipeline for the EVC crate.
- dequant
- EVC dequantization / scaling process (ISO/IEC 23094-1 §8.7.3 + §8.7.2 final renormalisation).
- dra
- EVC Dynamic Range Adjustment (ISO/IEC 23094-1 §8.10 / §7.3.6).
- hmvp
- History-based motion vector prediction (ISO/IEC 23094-1 §8.5.2.7, §8.5.2.4.4).
- ibc
- Intra Block Copy (IBC) primitives — ISO/IEC 23094-1 §8.6.
- inter
- EVC inter prediction (ISO/IEC 23094-1 §8.5).
- intra
- EVC intra prediction (ISO/IEC 23094-1 §8.4.4).
- nal
- EVC NAL unit framing (ISO/IEC 23094-1 §7.3.1, §7.4.2, Annex B).
- neighbour
- EVC neighbouring-block availability derivations (ISO/IEC 23094-1:2020 §6.4).
- picture
- EVC reconstructed picture buffer + per-CU pipeline glue (ISO/IEC 23094-1 §8.7.5).
- pps
- EVC picture parameter set parser (ISO/IEC 23094-1 §7.3.2.2).
- rpl
- Reference picture list parsing (ISO/IEC 23094-1 §7.3.7 / §7.4.8).
- scan
- EVC scanning processes (ISO/IEC 23094-1:2020 §6.5).
- slice_
data - EVC
slice_data()walker (ISO/IEC 23094-1 §7.3.8). - slice_
header - EVC slice header parser (ISO/IEC 23094-1 §7.3.4 / §7.4.5).
- sps
- EVC sequence parameter set parser (ISO/IEC 23094-1 §7.3.2.1, §7.4.3.1).
- transform
- EVC inverse transform (ISO/IEC 23094-1 §8.7.4).
Structs§
- EvcFile
Info - Summary info recoverable from a bare EVC SPS — the public return type
of
probe.
Constants§
- CODEC_
ID_ STR - Public codec id string. Matches the aggregator feature name
evc.
Functions§
- decode_
idr_ slice - Round-3 end-to-end decode of a Baseline-profile IDR slice.
- probe
- Probe a buffer for an EVC bitstream and return summary info from the
first parseable SPS. Accepts either Annex B raw-bitstream framing
(
u(32)length prefix, the canonical case per ISO/IEC 23094-1 Annex B) or the tolerant0x000001/0x00000001start-code scanner. - register
- Register the EVC implementation (currently parser-only) with a codec registry. The registered decoder factory returns an unsupported-error decoder per the round-1 deliverable.
- walk_
idr_ slice - Walk an IDR slice’s
slice_data()end-to-end given the active SPS and PPS. The slice’s RBSP is split into the slice header + the (byte-aligned) slice-data payload; this helper invokes the slice header parser then drivesslice_data::walk_baseline_idr_sliceacross the rest of the RBSP. Returns theslice_data::SliceWalkStatsonce the engine terminates cleanly.