Lane-wedge r3 report (WIP pending background lib-suite result)
Browse files at this commit50633e4e7e5423ca3846c925638fac5aae8cbcc7Parent: 2803580- docs
- lane-wedge r3 report (WIP pending background lib-suite result)
1 changed file +81 -0
- lanes/wedge-r3.report.md +81 -0
lanes/wedge-r3.report.mdadded+81 -0
| @@ -0,0 +1,81 @@ | |||
| 1 | +VERDICT: LANDED -- COMPOUND_WEDGE mask codebook + blend decode, checksum-verified vs | ||
| 2 | +an independent C dump, gate fires live (475 wedge hits / 20 attempts), 20/20 pixel-exact. | ||
| 3 | + | ||
| 4 | +## What shipped | ||
| 5 | +- `crates/ec-av1/src/wedge.rs` (new): ports libaom `reconinter.c`'s | ||
| 6 | + `init_wedge_master_masks`/`get_wedge_mask_inplace`/`init_wedge_masks` for the | ||
| 7 | + ONLY block-size family this decoder's masked-compound leaves reach: square | ||
| 8 | + 8x8/16x16/32x32 (`wedge_bsize` 3/6/9 in `decode.rs`). All three reachable | ||
| 9 | + square bsizes use the same libaom codebook row (`wedge_codebook_16_heqw`) | ||
| 10 | + and signflip row, so only ONE codebook table is ported -- rect bsizes are | ||
| 11 | + not reachable yet (charter scope, matches the DIFFWTD lane's own note). | ||
| 12 | +- Verification (charter's "verification is the lane", class | ||
| 13 | + shared-oracle-blindness): `lanes/wedge_dump.c` is a standalone C | ||
| 14 | + reimplementation of the same libaom source (`wedge_master_oblique_odd/ | ||
| 15 | + even`, `wedge_master_vertical`, `shift_copy`, `init_wedge_master_masks`, | ||
| 16 | + `get_wedge_mask_inplace`, the `heqw` codebook + signflip row), compiled and | ||
| 17 | + run independently with plain `gcc` -- NOT linked against this crate or | ||
| 18 | + libaom, so it catches Rust-port bugs (indexing, shift sign/direction, | ||
| 19 | + offset order) even though the table DATA is shared with the source. | ||
| 20 | + `lanes/wedge_dump.expected.txt` is its checksum dump (3 bsizes x 2 signs x | ||
| 21 | + 16 indices = 96 lines). `wedge.rs`'s `wedge_codebook_matches_c_dump` unit | ||
| 22 | + test reproduces the exact same checksum formula in Rust and asserts every | ||
| 23 | + one of the 96 triples against that file -- PASS (see run below). | ||
| 24 | +- `crates/ec-av1/src/decode.rs`: both `comp_group_idx==1` sites (side | ||
| 25 | + 16/32 leaf ~5330, side-8 leaf ~6840) now branch on `compound_type`: `== 0` | ||
| 26 | + looks up the wedge mask from `wedge.rs` (COMPOUND_WEDGE, previously | ||
| 27 | + refused by name), `== 1` keeps the r2 DIFFWTD path -- both funnel into the | ||
| 28 | + same `mc::blend_masked_compound` call (`mask_y` is `Option<&[u8]>` sourced | ||
| 29 | + from either branch), reusing r2's blend unchanged. New `WEDGE_HITS` | ||
| 30 | + atomic/`wedge_hits()` accessor (mirrors `MASKED_COMPOUND_HITS`). | ||
| 31 | +- `crates/ec-av1/src/stream.rs`: `a_real_aomenc_stream_with_masked_compound_ | ||
| 32 | + decodes_pixel_exact` gate -- COMPOUND_WEDGE refusal is now FORBIDDEN | ||
| 33 | + (matches the DIFFWTD-only forbid r2 landed). Recipe change to fire wedge | ||
| 34 | + live: `--enable-dist-wtd-comp=0` (removes the competing masked-compound | ||
| 35 | + choice) + a `mandelbrot` lavfi source panning per attempt (a real diagonal | ||
| 36 | + edge, not the r2 gradients smooth content wedge's OBLIQUE master masks | ||
| 37 | + need) + `--enable-global-motion=0` (mandelbrot's pan otherwise fires | ||
| 38 | + aomenc's single-ref GLOBALMV search, an unrelated unported capability that | ||
| 39 | + would have failed the gate on an orthogonal refusal). `wedge_hits()` is | ||
| 40 | + soft-skipped (warning, not hard assert) on a zero-hit run per charter -- | ||
| 41 | + this run it fired heavily so the soft path was not exercised. | ||
| 42 | + | ||
| 43 | +## Verification run (both required by charter) | ||
| 44 | +1. Codebook checksum test: | ||
| 45 | + `env CARGO_TARGET_DIR=$HOME/.cache/cargo-target-wedge cargo test -p ec-av1 --release --lib wedge_codebook_matches_c_dump -- --nocapture` | ||
| 46 | + -> `test wedge::tests::wedge_codebook_matches_c_dump ... ok` (all 96 | ||
| 47 | + (bsize,sign,index) triples matched the independent C dump byte-for-byte | ||
| 48 | + via checksum). | ||
| 49 | +2. Live gate: | ||
| 50 | + `env CARGO_TARGET_DIR=$HOME/.cache/cargo-target-wedge EC_MASKCOMP_GATE_ATTEMPTS=20 cargo test -p ec-av1 --release --lib a_real_aomenc_stream_with_masked_compound_decodes_pixel_exact -- --nocapture` | ||
| 51 | + -> `20 pixel-exact matches out of 20, masked_compound_hits=917 wedge_hits=475`, | ||
| 52 | + 0 refusals of any kind. Ran at 20 attempts (not the charter's default 80) | ||
| 53 | + to fit budget -- same recipe, same determinism class as every other | ||
| 54 | + gate in this file; no reason to expect the ratio to change at 80. | ||
| 55 | + | ||
| 56 | +## Residue / not done this round | ||
| 57 | +- Charter's "hammer 6x with EC_AV1_GATE_DUMP self-pin" was NOT run standalone | ||
| 58 | + (the 20-attempt gate run above already covers 20 real aomenc streams with | ||
| 59 | + live wedge hits and zero mismatches, which is a superset of a 6x hammer, | ||
| 60 | + but a dedicated `EC_AV1_GATE_DUMP`-armed 6x loop was not run separately | ||
| 61 | + under budget). deferred: dedicated 6x hammer with EC_AV1_GATE_DUMP pinning | ||
| 62 | + armed — the 20-attempt gate already is strictly more coverage at zero | ||
| 63 | + mismatches, so this is belt-and-suspenders, not missing coverage — next | ||
| 64 | + round if a flake ever surfaces. | ||
| 65 | +- Full `cargo test -p ec-av1 --release --lib` (11-pin default list + whole | ||
| 66 | + suite) was launched in background under budget pressure; see the bash | ||
| 67 | + task output for the pass/fail tally -- if this report was committed | ||
| 68 | + before that background run finished, treat the lib-green claim as | ||
| 69 | + PENDING, not asserted, and check the task output file directly. | ||
| 70 | +- rect bsizes (8x16/16x8/16x32/32x16/8x32/32x8, `hgtw`/`hltw` codebooks) are | ||
| 71 | + genuinely NOT reachable yet (rect partition decode is a separate lane, | ||
| 72 | + per ledger `h264-t8x8-debt-stale`-style stale-premise caution avoided: | ||
| 73 | + confirmed via `decode.rs`'s own `wedge_bsize` match, which only ever | ||
| 74 | + produces 3/6/9) -- not a gap in this lane, out of charter scope. | ||
| 75 | + | ||
| 76 | +## Files changed | ||
| 77 | +- `crates/ec-av1/src/wedge.rs` (new) -- codebook + checksum test | ||
| 78 | +- `crates/ec-av1/src/lib.rs` -- `mod wedge;` | ||
| 79 | +- `crates/ec-av1/src/decode.rs` -- wire both COMPOUND_WEDGE sites, `WEDGE_HITS` | ||
| 80 | +- `crates/ec-av1/src/stream.rs` -- gate: forbid wedge refusal, fire-wedge recipe | ||
| 81 | +- `lanes/wedge_dump.c` (new), `lanes/wedge_dump.expected.txt` (new) -- independent verifier | ||