forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-vp8/src/mc.rsClear filter

2026-11-23

2026-10-23

Restore edith_codecs after local data loss (2026-10-23)Ahmet Kaan Gümüş · b7434a2
Restore edith_codecs after local data loss (2026-10-23)

On 2026-10-23 an automated agent ran `rm -rf $HOME` and deleted the local
repository with all of its history. This commit restores the working tree
from the newest surviving copy, the host-c server lane mirror. That mirror
matches local main as of the testcut Phase 2 reports, including the tool
cache, the nextest fast profile and changed-crates.sh. The history before
this commit was not recovered.

2026-09-12

ec-vp8: mc.rs blank-line tidyAhmet Kaan Gümüş · 1b64551Browse files
ec-vp8 perf: MC kernels -- AVX2 six-tap + bilinear passesAhmet Kaan Gümüş · c4fe596
ec-vp8 perf: MC kernels -- AVX2 six-tap + bilinear passes

sixtap_block and bilinear_block (18% of a decode: the sub-pel MC passes
for luma and chroma) now run on explicit std::arch::x86_64 AVX2 kernels
following the ec-av1 mc::simd pattern: the scalar functions stay as the
libvpx transcription and the reference oracle, feature-gated at the
block level via a LazyLock capability probe.

Both passes share one clamped u8 intermediate at a fixed 16-lane stride
(the first pass is clamped to 0..=255 by filter.c's clamp_pixel, so u8
storage is representation-only; lanes bw..16 hold discarded values).
The six-tap kernels pair adjacent samples into _mm*_madd_epi16 with
packed tap pairs -- exact in i32 (|byte*tap| <= 255*128, six-product
sums < 2^23) -- and the two-stage packs/packus narrowing reproduces the
per-pass clamp exactly: packs' i16 saturation provably never fires
(range [-76, 319]) and packus' u8 saturation IS clamp_pixel. Bilinear
taps are non-negative and sum to 128, so its i16 accumulator is exact.

Also repairs a debug-build regression from 2e4c5f96's chunked loop-
filter loads: the hoisted row address 'anchor - (4 - k) * stride'
underflows usize for k past the upper taps at frame-top edges (the
add-first form anchor + k*stride - 4*stride is what the per-pixel code
evaluated). The three h-edge kernels get the add-first form plus the
bounds contract as debug_asserts; the three driver tests that had been
panicking in debug builds are green again (57 lib tests now).

Witness suite: 57 lib + 4 header_parse + 4 keyframe_exact + 3
stream_exact, byte-exact, debug and release.
ec-vp8 M3: inter frames byte-exact vs ffmpeg on ALL fixturesAhmet Kaan Gümüş · 80115ee
ec-vp8 M3: inter frames byte-exact vs ffmpeg on ALL fixtures

Four bugs fixed this pass:
- inter-frame B_PRED subblock modes used the keyframe context table
  (KF_BMODE_PROB[a][l]); libvpx decodemv.c:467 reads fc.bmode_prob —
  the FLAT vp8_bmode_prob {120,90,79,133,87,85,80,111,151}, no context
- MC interpolation filter is per-frame from the tag version bits
  (vp8_setup_version): version 0 = six-tap for BOTH planes; chroma was
  hardcoded bilinear. Version 3 fullpixel_mask (~7) added to the chroma
  MV derivation
- SPLITMV chroma: quadrants are 4x4 CHROMA pixels at 4-px offsets; the
  old loop predicted 8x8 at 8-px offsets, so the residual add read the
  top-left quadrant's prediction for all four quadrants (whole-MB modes
  masked the bug; every SPLITMV MB got wrong chroma)
- key frame with refresh_entropy==0 now reverts to DEFAULTS (libvpx
  inits fc before lfc=fc), not the pre-keyframe context

keyframe_exact now witnesses full streams: gop/clip-obs/altref added as
interframe_streams_match_ffmpeg; suite 55 lib + 4 header_parse + 4
keyframe_exact green, zero rustc warnings. Model fixed to match libvpx
(inter ymode/uv defaults 112/86/140/37 + 162/101/204, flat inter bmode)
ec-vp8 M3 WIP: full inter-frame pipeline decodes; walled on one mode-record divergenceAhmet Kaan Gümüş · 10ef9be
ec-vp8 M3 WIP: full inter-frame pipeline decodes; walled on one mode-record divergence

Lands: inter mode/MV parse (prob_intra/last/gf, mv_ref census port of
libvpx read_mb_modes_mv incl. the dead CNT_SPLITMV merge, SPLITMV with
mbsplit leader/fill tables, NEAREST/NEAR clamps, NEW/SPLIT best-MV
deltas), chroma MV derivation (round-half-away mv/2 whole-MB; sum/8
SPLITMV), motion compensation in new mc.rs (6-tap luma + bilinear
chroma + 32px border extension; 6 unit tests plus 31,000-case
differential fuzz vs verbatim libvpx filter.c/extend.c - byte-identical;
chroma whole-MB path re-clamps unconditionally per reconinter.c:336),
reference buffer management in libvpx swap_frame_buffers order
(copy_arf, copy_gf, refresh_gf, refresh_arf, refresh_last), entropy
save/restore gated on refresh_entropy (probs only, like libvpx fc/lfc),
persisted segment map, inter LF levels with ref/mode deltas and
skip_lf inner-edge rule, EC_VP8_TRACE B-line per-read tracing in
BoolDecoder mirroring scripts/vp8ref_model.py.

State: inter frames decode end-to-end with no desync error; gop frame 1
matches ffmpeg 51% (frame 0 100%), diverging from MB(0,5) rightward -
one remaining mode-record/token divergence. Next: diff the B streams
(python3 scripts/vp8ref_model.py vs EC_VP8_TRACE=1) to localize it;
the python model still needs the inter-frame header/mode extension.

Suite: 55 lib (incl. 6 mc) + 4 header_parse + webp witness green;
keyframe_exact 1/3 (2 cases need the M3 fix to pass).