forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 84fa44cfe66f76e22181d4ff8bc06ef6ea78db07Filtered to crates/ec-vp9/src/decode.rsClear filter

2026-09-19

vp9444: decode profiles 1/3 (4:4:4/4:2:2/4:4:0) and 12-bitAhmet Kaan Gümüş · f81eeb9
vp9444: decode profiles 1/3 (4:4:4/4:2:2/4:4:0) and 12-bit

Thread the frame's subsampling through plane geometry, n4 counts, uv
transform size, crop extents and the loop-filter plane dispatch; add the
non420 loop filter, the uv_txsize_lookup table and the 18-bit CAT6 token
for 12-bit. Byte-exact vs a libvpx 1.15.0 oracle across the full corpus.
Merge lane-vp9-refsetup: intra-only frames + scaled references onto the u16 planesAhmet Kaan Gümüş · c67d95a
Merge lane-vp9-refsetup: intra-only frames + scaled references onto the u16 planes

The lane was cut from 79984549 and wrote its scaling against the u8 kernels;
main had since absorbed lane-vp9-hbd, which converted every ec-vp9 plane to
u16 (`ec_vp9::Sample`) and threaded `bd` through every kernel. Not a
mechanical merge — resolved by porting the lane's semantics onto the u16
substrate.

- mc.rs (conflicts at the convolve signatures / inter_predictor / the
  predictor entry): main's u16 kernels + `bd` win as the substrate; the lane's
  `ScaleFactors`, step-aware `convolve_horiz`/`convolve_vert` (x_step/y_step
  alongside bd, both defaults `SUBPEL_SHIFTS`), the scaled dispatch in
  `inter_predictor`, the extracted `convolve_2d` and the scaled block/MV
  mapping in `build_inter_predictors` are ported onto it. The scale arithmetic
  is depth-independent and kept verbatim.
- decode.rs (conflict was the capability doc only): combined doc; the lane's
  `decode_intra_only_frame`, `frame_is_intra_only` dispatch, `ScaleFactors`
  setup + `valid_ref_frame_size` refusal, and the removed size-change refusal
  kept as written.
- The lane's tests compared u16 planes against ffmpeg's u8 rawvideo; they now
  go through `as u8` like the rest of the crate.

Verified on the merged tree: full `cargo test -p ec-vp9` green (0 failed,
0 ignored), warning parity = the 5 pre-existing, and the 10-stream corpus
re-swept from this build byte-identical vs libvpx 1.15.0 (8-bit, 10-bit,
odd, scaled-reference, intra-only).
ec-vp9: decode intra-only frames and scaled references, byte-exact vs libvpxAhmet Kaan Gümüş · 2251b71
ec-vp9: decode intra-only frames and scaled references, byte-exact vs libvpx

Two header/frame-setup refusals replaced with the libvpx 1.15.0 behaviour:

* intra-only frames (an INTER frame with intra_only=1, show_frame=0) decode
  through the keyframe body, but load their frame context from storage
  (reset only for reset_frame_context 2/3 or error-resilient mode), read the
  const vp9_kf_partition_probs, and refresh only the slots their
  refresh_frame_flags names.
* a reference whose coded size differs from the current frame is SCALED during
  prediction: ScaleFactors (vp9_setup_scale_factors_for_frame / vp9_scale_mv),
  the sf->predict kernel selection and the step-aware convolve walk.

Witnesses (committed fixtures, generators in lanes/vp9refsetup/) are
byte-identical to libvpx; the whole 8-bit regression corpus is unchanged
(including the 120-frame 60fps stream and the 2160p stream). The odd reference
case (1279x719 -> 640x360) is covered too. Tests fail pre-fix with the named
refusals.
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.
Merge lane-vp9-f72: inter context write-back zeroes the window's tailAhmet Kaan Gümüş · 177bb19
Merge lane-vp9-f72: inter context write-back zeroes the window's tail

The lane fixes the frame-72 tile desync: `write_tx_context` must narrow
libvpx's context spread to the transform window's width before applying
the frame-edge shift, so the shift zeroes the window's tail rather than
bytes past it. The odd-dims lane (e8152b9b) touched only RefPlane
extents/crop_picture; the two regions are disjoint and the merge is clean.

Fold in the reviewer's P3 nit: the `TDK` diagnostic (gated by
`EC_VP9_TOKDGB`) now prints the CLEARED window at the reset offset per
plane, mirroring the oracle's `SKIPCTX` print, instead of the whole
rolling left buffer from base index 0.
vp9: inter context write-back zeroes the window's tail, not bytes past itAhmet Kaan Gümüş · 6743870
vp9: inter context write-back zeroes the window's tail, not bytes past it

libvpx's vp9_decode_block_tokens (vp9_detokenize.c:273-323) applies the
frame-edge shift from get_ctx_shift to a value whose WIDTH IS THE WRITTEN
WINDOW's -- a uint16_t for TX_8X8, uint32_t for TX_16X16, uint64_t for
TX_32X32 -- so (eob>0)*0x0101 >> 8 yields 0x0001, i.e. bytes [1,0]: the
shift zeroes the window's TAIL.

The port shifted a full 64-bit spread instead and then took byte k, so the
window's last slot kept its previous value. get_ctx_shift only fires for a
block that runs past an edge (mb_to_*_edge < 0), which at a 1080-tall frame
(mi_rows 135) is the last PARTIAL superblock row, so the defect is
invisible to every non-edge block: a bottom-row chroma transform block
handed a stale 1 to the next row's entropy-context read and the tile bool
decoder desynced on the 120-frame 60fps corpus stream at input frame 72.

That stream now decodes all 120 frames byte-identically to the libvpx 1.15
oracle, with every transform block's context read and every write window
equal to the oracle's on every tile.

Both token paths share a new write_tx_context helper, whose narrowing is
libvpx's cast; the intra path's per-width casts were already correct.

Witness: corpus_1080p_60fps_matches_ffmpeg_past_frame_72 (media-gated,
against ffmpeg's rawvideo) fails on the base tree with the desync and
passes here. lanes/vp9f72.report.md has the oracle recipe and the tables.
vp9: decode odd coded extents (chroma ceils at (w+1)/2)Ahmet Kaan Gümüş · 73605cd
vp9: decode odd coded extents (chroma ceils at (w+1)/2)

libvpx stores and crops 4:2:0 chroma at uv_crop_width = (w+1)/2 /
uv_crop_height = (h+1)/2, i.e. it ceils an odd coded extent. The
decoder used `>> 1` in two places, so an odd extent was one chroma
column/row short: the inter predictor's border/inside test clipped the
last sample and the returned Picture cropped floor(w/2) x floor(h/2).
For odd extents the two disagreed, and the lane refused them by name
("vp9 inter odd frame dimensions").

Unify on ceil:
- inter_predict_plane: RefPlane width/height = (coded + s) >> s, so
  chroma is (w+1)/2 (unchanged for luma, s = 0).
- crop_picture: chroma crop + uv_stride = (w+1)/2 x (h+1)/2.
- drop the odd-dimension refusal.

Witness: tests/odd_dimensions_exact.rs patches the keyframe size fields
of an even 322x242 encode to an odd target (mi-grid invariant) and
compares every decoded frame to ffmpeg's libvpx rawvideo byte for byte
for odd width, odd height, and both. The whole visible corpus re-sweeps
all-identical (1080p 48/48, 2160p 48/48, altref 60/60, both entry
streams 3/3) and the same streams patched to odd extents are all
byte-identical too (1080p 48/48, altref 60/60).

2026-09-18

vp9: decode inter-frame pixels byte-exactly (MC, residual, loop filter, ref slots)Ahmet Kaan Gümüş · 83125b4
vp9: decode inter-frame pixels byte-exactly (MC, residual, loop filter, ref slots)

decode() no longer refuses inter frames. New mc.rs ports libvpx's inter
predictor: umv-border MV clamping, per-block reference border extension
(build_mc_border), the direct path window read, the four 8-tap/bilinear
convolve kernels, compound averaging and average_split_mvs. decode.rs gains
the prediction/residual/reconstruction driver, an 8-slot reference DPB that
stores each frame at its 64-aligned extent after the loop filter, and the
skip/skip_inter loop-filter mask rules.

Byte-exact against a locally built libvpx 1.15 oracle: the 1080p single-tile
inter stream (3/3 frames), both static fixture GOPs (48 frames at 1080p and
2160p), the altref stream (60/60) and a two-tile-column stream (3/3). Loop
filter verified separately by per-superblock mask identity (0 of 510 SBs
differ) and by edge-set containment. A 120-frame 60fps stream decodes
identically through frame 71 and hits an open entropy desync at frame 72,
filed in lanes/vp9pix.report.md with its disposition.

Also fixes a two-entry mv_ref_list overflow in the merged inter syntax path:
the successful second candidate add inside the different-reference loop is a
goto Done in libvpx and must leave the loop; without the break a later
candidate wrote past the list (the altref fixture panicked at frame 14).

Refusals kept/added by name: intra-only, other profiles, other subsamplings,
a reference whose coded size differs from the current frame, odd dimensions.

2026-09-17

Merge lane-vp9-inter: VP9 inter syntax next to tile-row byte-exactnessAhmet Kaan Gümüş · 9f13c77
Merge lane-vp9-inter: VP9 inter syntax next to tile-row byte-exactness

Both sides descend from 43c9c913 and both touched the tile/context setup, so
decode.rs and modes.rs conflicted. Resolved by combining:

- decode.rs keeps the tile-row work's signatures: decode_block and
  decode_partition no longer carry tile_row_start, so the inter lane's
  read_inter_block_info and its own tile walk thread tile_col_start alone,
  and decode_block's keyframe call passes the whole FrameContext (&self.ctx)
  as the tile-row revision does. The inter parse path is semantically
  unchanged: it allocates a fresh MiState per tile, so a frame-scoped
  above-availability gate sees no decoded cell above that tile's own
  row_lo, exactly what the dropped tile_row_start gate saw.
- modes.rs keeps the tile-row frame-scoped MiState::above_mi (mi_row != 0)
  AND the inter lane's new MiState::at() helper.
- The inter walk's tile loop drops the tile_row_start argument it passed to
  decode_partition; inter.rs's InterBlockCtx loses its tile_row_start field.

Folded in (verifier policy finding): scratch_interdump.rs FAILS when
INTER_IVF is explicitly set to a file that does not exist; the loud SKIP is
kept only for the unset default.

Evidence on the merged tree: cargo test -p ec-vp9 green (18 suites, 27
passed, keyframe_exact 4/4 incl. inter_is_named_unsupported); cargo check
--all-targets adds no warning beyond the 5 baseline ones; inter gate
1213/1851 blocks; tr/tr2/w1366/h242 sweeps each "RESULT 3 of 3 frames
byte-exact"; explicit-missing-fixture run fails as required.
vp9kf: VP9 inter-frame syntax parses block-for-block identical to libvpxAhmet Kaan Gümüş · 834983e
vp9kf: VP9 inter-frame syntax parses block-for-block identical to libvpx

Slice 1 of inter-frame support: an inter frame is now parsed end to end
(compressed header, mode info, MVs, references) and every block matches
libvpx 1.15's own instrumented decoder on the test stream - frame 1
1213/1213, frame 2 1851/1851 on row/col/bsize/tx/mode/skip/seg/ref0/ref1/
interp/MV - with the frame-1 compressed header bit-identical (1200/1200
bools) and frame 2 likewise.

Causes closed while getting there, each ported from libvpx with its line:
update_mv_probs is MV_UPDATE_PROB + seven literal bits + (lit<<1)|1, NOT
diff_update_prob; keyframe partition probs are a const selected by
get_partition_probs and must never be stored in a FrameContext (stored
contexts are new(false), the active keyframe copy new(true) + a
reset_inter_partition before the save); vp9_switchable_interp_tree is
{0,2,-1,-2} (libvpx's EIGHTTAP/EIGHTTAP_SMOOTH/EIGHTTAP_SHARP #defines,
not the spec's naming order); mv_ref_blocks' POSITION is {row,col} and one
accessor added .0 to the column; clamp_mv_ref's edge arithmetic is signed
(usize underflowed on a frame's partial last row) and clamps the COLUMN
with the left/right edges and the ROW with the top/bottom ones; and the
mode-derived candidate-count override sits AFTER libvpx's Done: label, so
an early exit skips it - reproduced bug-for-bug.

This slice is SYNTAX ONLY: decode() still refuses inter frames by name and
no inter pixel is produced. The keyframe path still decodes to pixels and
keyframe_exact is green.

Verified by an independent reviewer in three passes (structural claims
re-derived from libvpx source, the identity comparison re-implemented
independently, a dropped-field audit of the two stale fields, and
delta re-verification of the clamp/error-propagation/gate fixes).
vp9kf: tile-ROW streams decode byte-exact -- MI-aligned extents, frame-scoped contextsAhmet Kaan Gümüş · 332f251
vp9kf: tile-ROW streams decode byte-exact -- MI-aligned extents, frame-scoped contexts

Tile-row streams (log2_tile_rows > 0) now decode byte-exact: tr.ivf and
tr2.ivf 3 of 3 frames, previously 0 of 3. Seven fixes, each ported from
libvpx with its line:

1. tx probabilities come from the frame's FrameContext tables
   (get_tx_probs, vp9_pred_common.h:173), not the TX_* const defaults.
2. the tx-size context carries libvpx's "if (!has_above) above_ctx =
   left_ctx" fallback (vp9_pred_common.h:156-170).
3. above availability is gated on the FRAME (mi_row != 0, set_mi_row_col
   vp9_onyxc_int.h:430), not on the tile-row start; tile_row_start is gone
   from the decode chain.
4. ectx/mi are frame-scoped: allocated once per frame, above cleared once,
   left per SB row (vp9_decodeframe.c:2079-2083 / :2260-2261).
5. the above entropy/partition arrays are sized mi_cols_aligned_to_sb,
   closing a pre-existing OOB panic at widths not a multiple of 8
   (decode.rs:767 on a 1366-wide frame; the baseline panicked too).
6. intra edge extension is a branch-for-branch port of
   vp9_reconintra.c:300-394: the extend-vs-direct decision comes from
   mb_to_bottom_edge/mb_to_right_edge, the extension length from the
   MI-ALIGNED buffer extent (vp9_alloc_frame_buffer sets y_width =
   (width+7)&~7 -- yv12config.c:173-174,250-251), and the arithmetic is
   isize, closing an "attempt to subtract with overflow" at intra.rs:72 on
   320x242.
7. the chroma loop filter takes no plane-width bound: all five uv_w column
   clamps are gone, matching vp9_filter_block_plane_ss11's unclamped
   MI_BLOCK_SIZE>>1 groups (vp9_loopfilter.c:1394, :313-399) which write
   into the padded plane. At 1366 wide the last chroma group overhangs the
   visible plane by 4, so every clamped edge was dropped: luma stayed
   byte-exact while chroma was off by one (U 4/5/6, V 37/33/16).

Matrix (scratch_realsweep, 3 frames each): h242, h1082, h1082tr, h1082trc,
tr, tr2, t1080, t1080-single, single1080, w1366, w1366tc and the 320x240
tile0 sweep are all byte-exact. Still unexercised: odd width x odd height x
tile ROWS -- the encoder declines -tile-rows at those heights.

Verified by an independent reviewer with revert-alone discrimination: a
visible-length extent fails h242/h1082, a 64-aligned extent fails the 1080p
fixtures, the MI-aligned extent passes all; restoring the uv_w clamps
reproduces the chroma-only residue exactly. cargo test -p ec-vp9 is green
and cargo check prints the 5 baseline warnings.

2026-09-16

vp9kf: real content decodes byte-exact -- per-SB-row left contexts, MI-row chroma extentsAhmet Kaan Gümüş · bd4fadc
vp9kf: real content decodes byte-exact -- per-SB-row left contexts, MI-row chroma extents

Two boundary bugs, both found by driving real content through the decoder
(a real 320x240 clip and a real 1920x1080 clip, all-intra VP9 transcodes):

1. decode.rs: the left entropy and partition contexts were zeroed only on the
   tile's FIRST superblock row (`if sb_row == row_lo`). libvpx zeroes them at
   the start of EVERY SB row - vp9_decodeframe.c:2256-2258 (plain decode_tiles;
   row-mt twin :2114-2115, per-tile-row twins :1825-1826 / :1898-1899). Our
   luma left index wraps at mi_row 16, so the first block of SB row 2 read a
   stale slot: ctx 1 instead of 0. First divergent bool of a real 320x240 frame
   was #74792, block mi_row 16 mi_col 0, coef_probs[TX_4X4][Y][band 0][ctx]:
   oracle prob 195 (ctx 0) vs ours 84 (ctx 1) - everything before it agreed
   bit-for-bit.
2. loopfilter.rs: the chroma ss11 row-group extents were gated on the visible
   chroma height; libvpx iterates MI rows (`r += 4`, vp9_loopfilter.c:1400;
   horizontal `r += 2`, :1431), so a group whose first MI row is inside the
   frame is filtered even when its 8 chroma rows overhang the visible height.
   1080p lost chroma rows 536-539 (last SB row, mi_rows 135); the level read
   also goes through a bounds-safe `level_at` now.

Evidence (all reproduced independently by a reviewer in hermetic scratch
copies): real 320x240 0/3 -> 3/3 byte-exact; 1080p single-tile 0/3 -> 3/3;
1080p with 4 tile columns refused -> 3/3 (both this and the BE tile-prefix fix
meet here); keyframe_exact 4/4 and the whole crate green; 5 lib warnings
unchanged. Reverting either hunk alone regresses the matching sweep.

Also: lanes/realdesync.report.md (the diagnosis: first divergent decision,
ranked causes, the tile-row class caveat) and a report section recording that
the tile-ROW path (log2_tile_rows > 0) is NOT correct yet - three pre-existing
defects isolated there, listed in lanes/vp9kf.report.md.
vp9kf: VP9 tile size prefixes are BIG-endianAhmet Kaan Gümüş · de9bde5
vp9kf: VP9 tile size prefixes are BIG-endian

decode.rs read the per-tile 4-byte size prefix as little-endian, so any frame
with more than one tile - ffmpeg's default at 1080p, cols_log2 = 2 - starved
the walk and refused a VALID stream as `Corrupt: truncated tile data`:
00 00 0D DC little-endian is 3691839488 against a 71110-byte tail.

libvpx `get_tile_buffer` reads it with `mem_get_be32`
(vp9_decodeframe.c:1688/1690; vpx_ports/mem_ops.h:88). One token changed,
plus the comment and the diagnostic probe's accounting print.

Evidence: an 8-tile 2560x1440 IVF now walks exactly (prefixes 120646 + last
tile 11383 == 132029 tail; frame 1 120851 + 11355 == 132206); a 4-tile stream
decodes 2/2 byte-exact against ffmpeg; keyframe_exact 4/4 (a single-tile frame
takes the whole tail, so that path cannot change); 5 lib warnings unchanged.
Reviewed independently: SAFE TO COMMIT.

Not this: the residual real-content divergence is tile-independent - the same
source re-encoded with -tile-columns 0 -tile-rows 0 still differs, so the tile
walk was never the entropy problem.
vp9kf: drop the aw/ah locals the extent change orphanedAhmet Kaan Gümüş · 07af9df
vp9kf: drop the aw/ah locals the extent change orphaned

filter_frame now takes mi_cols*8/mi_rows*8, so decode_keyframe_inner's aw/ah
reads were dead (two new unused-variable warnings). Warning set is back to the
base commit's five. keyframe_exact 4/4.
vp9kf: real-content sweep -- SB-padded plane buffers, honest Picture strides, and the desync it foundAhmet Kaan Gümüş · 3678cfd
vp9kf: real-content sweep -- SB-padded plane buffers, honest Picture strides, and the desync it found

Adds crates/ec-vp9/tests/scratch_realsweep.rs (all-intra VP9 transcode of a real
video, ours vs ffmpeg, per-frame diff counts) and scratch_tiledbg.rs. The
library holds no VP9 content of its own, so this is the first time the keyframe
path has seen real imagery - and it is NOT byte-exact: a real 320x240 frame is
exact for rows 0-127 and wrong from row 128 down (19477/15337 diffs), i.e. the
entropy decoder diverges at a block in SB row 2. "Byte-exact" was
fixture-exact.

Two real defects fixed (fixture suite re-verified green, 17 binaries):

1. Plane buffers were 8-aligned; libvpx decodes an edge block at full size and
   lets the overhang land in the frame border (decodeframe.c:1216). A 32x32
   block at mi_row 132 of a 1080-row frame wrote 8 rows past the buffer and
   panicked at intra.rs:380. Buffers are now SB-aligned, and filter_frame gets
   the MI-aligned visible extent (the padded size OOB'd the level grid).
2. Picture::stride/uv_stride reported the aligned aw while the crop packs rows;
   a consumer trusting stride misread any non-64-aligned width. Now width/2.

Reported, not fixed: multi-tile frames (ffmpeg's default at 1080p) refuse with
'Corrupt: truncated tile data' - either the tile walk or the tile-data offset
is wrong for >1 tile, and 'corrupt' is the wrong claim until that is known.
lanes/vp9kf.report.md carries the table, the next-lane charter seed, and a note
that the fixture recipes were never recorded.
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.
vp9-kf: loopfilter per-MI masks, 4-line kernel walk, flat_mask5 semanticsAhmet Kaan Gümüş · 9769de2
vp9-kf: loopfilter per-MI masks, 4-line kernel walk, flat_mask5 semantics

- luma edge masks per-MI (internal MI boundaries of wide blocks filter;
  left/above_64x64_txform_mask rules), luma edge set now matches the
  instrumented-libvpx trace 3044/3044 anchors
- lpf_edge walks the 4 pixel-lines of each chunk (was filtering only
  every 4th row/col)
- flat2 follows flat_mask5's shifted params: q7 vs q0, no |q0-p0| clause
- probes: EC_VP9_SKIP_LF, LFTRACE (ours + patched oracle), scratch_lfdump
  Y-plane dumps; HANDOFF #5 in lanes/vp9kf.report.md

keyframes_match_ffmpeg still FAIL: first diff (76,2) 47 vs 48; pre-LF
decode divergence from (88,24) tracked as the next dominant bug.
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.