lanes: vp8.report.md — M2 blocker narrowed to one cross-MB token-context bug
Browse files at this commita8debcf6e2aee5d86cf0a864fa09cd4c115ecbd9Parent: d9a98661 changed file +25 -15
- lanes/vp8.report.md +25 -15
lanes/vp8.report.mdmodified+25 -15
| @@ -8,7 +8,7 @@ Never merged, never pushed. Pins untouched (no ec-av1 changes at all). | |||
| 8 | | Milestone | State | Evidence | | 8 | | Milestone | State | Evidence | |
| 9 | |---|---|---| | 9 | |---|---|---| |
| 10 | | M1 bool decoder + frame tag + full first-partition header | **done/verified** | commit `57b5a53a`; 12 unit tests green; real vpxenc/ffmpeg streams (6 sizes/q, 8-token-partition, WebP still) parse with exact partition tiling, correct dims (incl. 76x52 non-MB-aligned), 0 desyncs | | 10 | | M1 bool decoder + frame tag + full first-partition header | **done/verified** | commit `57b5a53a`; 12 unit tests green; real vpxenc/ffmpeg streams (6 sizes/q, 8-token-partition, WebP still) parse with exact partition tiling, correct dims (incl. 76x52 non-MB-aligned), 0 desyncs | |
| 11 | -| M2 key-frame-only decode, sample-exact vs ffmpeg | **implemented, NOT verified** | commit `20f7d742`; 49 lib tests + 4 header tests green (all kernels differential-fuzzed vs libvpx C); ffmpeg byte-compare witnesses (`tests/keyframe_exact.rs`) RED — see "known gap" | | 11 | +| M2 key-frame-only decode, sample-exact vs ffmpeg | **implemented, NOT verified — 2 of 3 root-cause bugs FIXED, 1 remaining, precisely localized** | commits `20f7d742`, `072f842f`; single-MB 16x16 black fixture decodes BYTE-EXACT vs ffmpeg; multi-MB witnesses still RED (decision 2563, see below) | |
| 12 | | M3 inter frames | **not attempted** (fixtures + spec recon done) | `clip-obs-320x192.ivf` (169 fr, 4 KFs), `altref-160x96.ivf`, `mparts-160x96.ivf` (8 partitions), `gop-160x96.ivf`; §16-18 read; inter trees/tables in `modes.rs` | | 12 | | M3 inter frames | **not attempted** (fixtures + spec recon done) | `clip-obs-320x192.ivf` (169 fr, 4 KFs), `altref-160x96.ivf`, `mparts-160x96.ivf` (8 partitions), `gop-160x96.ivf`; §16-18 read; inter trees/tables in `modes.rs` | |
| 13 | | M4 public API + docs | **not attempted** | `Decoder::decode(&[u8]) -> Result<Option<Picture>>` exists; ec-av1-style `decode_stream` not yet | | 13 | | M4 public API + docs | **not attempted** | `Decoder::decode(&[u8]) -> Result<Option<Picture>>` exists; ec-av1-style `decode_stream` not yet | |
| 14 | 14 | ||
| @@ -69,21 +69,31 @@ Never merged, never pushed. Pins untouched (no ec-av1 changes at all). | |||
| 69 | (`ffmpeg -v error -i F -f rawvideo -pix_fmt yuv420p -`) on 6 kf fixtures | 69 | (`ffmpeg -v error -i F -f rawvideo -pix_fmt yuv420p -`) on 6 kf fixtures |
| 70 | + mparts + WebP still. **FAILING — 0/3** (see below). | 70 | + mparts + WebP still. **FAILING — 0/3** (see below). |
| 71 | 71 | ||
| 72 | -## Known gap (the M2 blocker), localized as far as budget allowed | 72 | +## Known gap (the M2 blocker) — TWO of three root causes FIXED this session |
| 73 | 73 | ||
| 74 | -Single 16x16 black q=0 frame: chroma decodes exact (u=v=128), luma is | 74 | +Method: a dixie-faithful python model of the whole partition-0 + token |
| 75 | -~99-130 where ffmpeg says 16. The MB is B_PRED, coeffs plausible | 75 | +parse (`/tmp/vp8ref.py`, decision-for-decision trace) diffed against the |
| 76 | -(Y0 = [-216,-8,-4,4] dequantized, y1dc=4). Predicted: wrong luma | 76 | +Rust decoder's `EC_VP8_TRACE` decision stream. |
| 77 | -residual application or subblock-mode/border interaction in the B_PRED | 77 | + |
| 78 | -path; LF excluded (pixel (0,0) is never filtered; failure predates it). | 78 | +1. FIXED — MV probability updates were parsed on KEY frames (dixie |
| 79 | -Debug aids left in place: `EC_VP8_DEBUG=1` per-MB coeff dump, | 79 | + parses them only for interframes): 38 extra bool reads desynced |
| 80 | -`examples/dbg_first.rs`. Next steps for the session that picks this up: | 80 | + partition 0. Moved inside `!is_keyframe`. |
| 81 | -(1) hand-decode the 44-byte black frame partition-0 + token partition | 81 | +2. FIXED — decode_keyframe created a FRESH bool decoder over partition |
| 82 | -against dixie by script; (2) check B_PRED sub-mode context indexing | 82 | + 0 for the mode records (restarting the stream); `FrameHeader::parse` |
| 83 | -(above/left border MBs) and the per-subblock predict->write->add | 83 | + now returns its partition-0 decoder and the mode records CONTINUE |
| 84 | -sequencing against dixie predict.c/idct_add.c; (3) the missing | 84 | + from where the header stopped. |
| 85 | -`reset_left` per MB row was found and fixed during the sweep — re-check | 85 | +3. FIXED (earlier sweep) — per-MB-row token `reset_left` was never called. |
| 86 | -its dixie position (row start, after above reset). | 86 | + |
| 87 | +Result: `kf-16x16-black-q0.ivf` (single MB) decodes byte-exact vs | ||
| 88 | +ffmpeg. Multi-MB fixtures still diverge; the decision traces now match | ||
| 89 | +to decision 2562 and split at 2563 inside the token walk (MB(0,1) | ||
| 90 | +block 0): the reference consults probability 11, rust 4, at the same | ||
| 91 | +stream position — a coefficient-context/bookkeeping difference that | ||
| 92 | +only manifests from the second MB onward (cross-MB token contexts or a | ||
| 93 | +block-sequencing slip). Debug aids: `EC_VP8_TRACE` (decision + node | ||
| 94 | +trace), `EC_VP8_DEBUG` (per-MB coeff dump), `examples/dbg_first.rs`, | ||
| 95 | +python model at `/tmp/vp8ref.py` (re-create from this description if | ||
| 96 | +lost; it needs the RFC at ~/.cache/vp8/rfc6386.txt and tables.rs). | ||
| 87 | 97 | ||
| 88 | ## Repro | 98 | ## Repro |
| 89 | 99 | ||