forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on bede77e8a52fc53be7e4434c5ffb100b0c7dd9cfFiltered to crates/ec-vp9/src/transform.rsClear filter

2026-09-19

vp9: decode profile 2 (10-bit 4:2:0) byte-exact vs libvpx 1.15Ahmet Kaan Gümüş · 9025ed3
vp9: decode profile 2 (10-bit 4:2:0) byte-exact vs libvpx 1.15

Store every plane as u16 and thread the frame's bd through the pixel
kernels (clip_pixel_bd, bd-scaled loop-filter thresholds, base =
128 << (bd-8) intra fills, highbd idct guard), so one decode walk serves
8- and 10-bit. The one depth-dependent bitstream element is the CAT6
coefficient token: 14 bits/vp9_cat6_prob at 8-bit, 16 bits/
vp9_cat6_prob_high12 + 2 at 10/12-bit -- ported.

Profile gate now accepts 0 and 2; profiles 1/3 and 12-bit are refused
by name; non-4:2:0 subsampling stays refused.

Byte-exact vs libvpx 1.15 on both 10-bit corpus streams (48 and 120
frames) and the whole 8-bit regression corpus. cargo test -p ec-vp9
green; warning parity (the 5 pre-existing). See lanes/vp9hbd.report.md.

2026-09-16

vp9kf: keyframes byte-exact vs ffmpeg -- iadst16 stage 4, mask-driven loop filterAhmet Kaan Gümüş · 03cbf64
vp9kf: keyframes byte-exact vs ffmpeg -- iadst16 stage 4, mask-driven loop filter

keyframes_match_ffmpeg PASSES: FRAME=1 pre-LF Y 1310 diffs -> post-LF Y/U/V 0
(FRAME=0: Y pre 746 -> post 0). Byte dumps are the evidence channel.

1. iadst16 stage 4 + output permutation, ported from inv_txfm.c:520-554:
   negated sum for pairs (2,3)/(14,15), (-x_i + x_j) for the second slot of
   (6,7)/(10,11), output[13] = -x13. Reverting this alone fails frame 1 at
   Y(120,68) 209 vs 210.
2. The loop filter is now driven by vp9_setup_mask's masks for luma AND
   chroma: build_masks/build_y_mask (blocks <16x16: only the first 8x8
   touches the UV masks), then vp9_adjust_mask (TX_32->TX_16, 4-tap border
   promotion, rows/columns edge masks, rows==1 and rows==5 UV demotions,
   mask_uv_int for internal edges). All eight mask tables re-read against
   vp9_loopfilter.c:39-205 constant by constant.
3. Luma's V and H passes no longer interleave per mask bit (chroma already
   knew this); that was the last 19 Y diffs after the mask port.

Dead code: LfGrids.tx4 (write-only, drops a per-frame mi grid),
tables::uv_txsize_lookup and tables::BLOCK_INVALID (only user was the old
chroma tx-grid walk). Warning count back to HEAD's 5.

Suites: lib 8/8, keyframe_exact 4/4, dump_probe + 8 scratch harnesses PASS.
scratch_synth still fails on the tmpfs-gone /tmp/synth-kf-frame.bin
(pre-existing, fixture-dependent).

2026-09-14

vp9kf: d153 row, idct32 stage 8, flat2 q0, chroma tx-grid — Y byte-exactAhmet Kaan Gümüş · 82ca712
vp9kf: d153 row, idct32 stage 8, flat2 q0, chroma tx-grid — Y byte-exact

generic d153 no longer skips row 1; idct32 runs vpx stage 8; flat_mask5
compares q4..q7 to q0 (not p0). Pre-LF Y matches libvpx; post-LF Y matches
ffmpeg. Chroma still 16 U + 20 V off (HANDOFF #6). Not pushed.
vp9kf: entropy round 2 — trees, kf partition probs, 8x8 partition symbol, tile-info boundsAhmet Kaan Gümüş · c445467
vp9kf: entropy round 2 — trees, kf partition probs, 8x8 partition symbol, tile-info bounds

- INTRA_MODE_TREE leaf order fixed to libvpx vp9_intra_mode_tree; the invented
  spec-doc chain UV_MODE_TREE deleted (v1.15 decodes uv with the same tree,
  decodemv.c:232). SEGMENT_TREE corrected to vp9_seg_common.c:58 balanced form.
- Keyframes now code partitions with vp9_kf_partition_probs (added; spec 7.2),
  not the inter defaults. FrameContext::new(key_frame).
- The 8x8-level partition symbol is read (decodeframe.c:1188 runs before the
  !hbs branch); sub-8x8 shapes occupy the full 8x8 mi area (luma 2x2 4x4 TUs,
  chroma 4x4 once per 8x8). bsize_of_n4 mapping fixed (2->16x16, 1->8x8).
  Duplicate kf_uv_probs removed from modes.rs (kept in tables).
- ec-vp9-syntax DEVIATION (flagged for merge review): tile_cols_log2_bounds
  returned max-1, skipping the terminating tile-cols increment bit; bounds are
  now inclusive and rows mirrors vp9_get_tile_n_bits. Test re-pinned to
  libvpx/spec values (1920 -> (0,3), 3840 -> (0,4), 1 -> (0,1)).
- keyframes_match_ffmpeg still FAILING (ours 120 vs 72 at pixel (0,0); was 133).
  inter_is_named_unsupported PASSES as a named Error. Debug traces (TILE/B/C/RC,
  EC_VP9_FORCE_TAIL) and scratch_* harnesses kept for the next round; see
  lanes/vp9kf.report.md HANDOFF #2.