Decoder::set_draft: non-reference pictures skip the deblocking filter and are
flagged Picture::draft; all other pictures stay bit-exact (conformance test,
single- and frame-threaded). Conformance fixtures now also decode with 3
threads. Decoder::threads / default_threads for perf.stats.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- hand-built CAVLC and CABAC bitstreams (test-only CABAC encoder) with I_PCM
and P_Skip macroblocks exercising long-term references, MMCO 1-6,
frame_num gaps and reference list modification (idc 0 and 2); expected
output is known exactly and cross-checked with ffmpeg when available
- avcC configuration + length-prefixed samples with pts round trip
- corrupted / truncated / garbage input never panics or deadlocks
(single- and multi-threaded)
- Decoder::stats() coverage counters and an ignored coverage report test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- frame-level parallelism: the calling thread handles headers, POC, DPB and
reference lists; each picture decodes as a job on a rayon pool (feature
'threads') and publishes deblocked macroblock rows into a shared Frame;
motion compensation and co-located lookups block per row on references
still being decoded (safe Rust, OnceLock per MB row); outputs are handed
out once their job has finished
- row-pipelined deblocking inside a picture (row r filtered after row r+1 is
reconstructed), picture buffer recycling, panic/error isolation per job
- faster luma/chroma interpolation (row-wise filters, window fetch), direct
interpolation into the picture for unweighted single-list blocks, merged
motion compensation for uniform direct macroblocks, 8x8 direct derivation
with direct_8x8_inference, vectorisable weighted prediction, deblocking
with per-edge parameters and cached reference identities
- conformance tests now decode every fixture single- and multi-threaded and
check pts/POC output order; ignored perf test (1080p High CRF20, 120 frames)
1080p: ~100 fps single-threaded, ~600 fps with 14 threads (M4 Pro, heavily
loaded machine).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CAVLC residual parsing (coeff_token / total_zeros / run_before tables taken
from the spec text, level decoding with escape codes), macroblock layer for
I/P/B slices (mb_type, sub_mb_type, mb_pred, sub_mb_pred, me(v) cbp,
mb_qp_delta), I_PCM
- intra prediction: Intra4x4 (9 modes), Intra8x8 with reference filtering,
Intra16x16, chroma; constrained_intra_pred
- dequantisation with flat/custom scaling matrices; 4x4, 8x8, luma DC
Hadamard and 2x2 chroma DC inverse transforms
- inter prediction: median / directional mv prediction, P_Skip, B spatial and
temporal direct (direct_8x8_inference), B_Skip, 6-tap luma and bilinear
chroma interpolation, explicit and implicit weighted prediction
- reference lists (init + modification), DPB with sliding window, all MMCOs,
frame_num gaps, bumping / max_num_reorder_frames output order, IDR and
no_output_of_prior_pics
- public Decoder/Picture API (Annex-B and avcC input, pts passes through
reordering)
Deblocking (M2.5) follows in the next commit, so the bit-exact fixtures in
this commit are the no-deblock ones. CABAC slices return Unsupported.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>