R2 report -- PARTIAL, mvstack caller fix narrows pin, not yet byte-exact
Browse files at this commit519a167e6a91fbfed75a25b3f378d90ea824ff75Parent: 4a33f95- docs
- r2 report -- PARTIAL, mvstack caller fix narrows pin, not yet byte-exact
1 changed file +94 -0
- lanes/rect-r2.report.md +94 -0
lanes/rect-r2.report.mdadded+94 -0
| @@ -0,0 +1,94 @@ | ||
| 1 | +# lane-rect r2 report | |
| 2 | + | |
| 3 | +VERDICT: PARTIAL -- HORZ/VERT arms resurrected and two real bugs fixed (mvstack | |
| 4 | +bw4/bh4 derivation + MiGrid stamp footprint), pin's mismatch region shrank | |
| 5 | +drastically but is NOT byte-exact yet; lib suite green (no regression). | |
| 6 | + | |
| 7 | +## What landed | |
| 8 | +- `decode_inter_block`'s `bw4`/`bh4` locals (single-ref path ~5887 and compound | |
| 9 | + path ~5225) now derive from `write_w`/`write_h` (the true rect footprint r1's | |
| 10 | + plumbing already threads through) instead of the old `side`-square / | |
| 11 | + `reject_residual ? bw4/2 : bw4` HORZ_B-only heuristic. This feeds | |
| 12 | + `find_mv_stack_with_sign_bias`/`find_mv_stack_compound`'s row/col scan | |
| 13 | + lengths, weights, DRL ctx and `clamp_mv_ref` with the block's real extent | |
| 14 | + (mvstack.rs itself was ALREADY fully bw4/bh4-rect-capable -- scan_row uses | |
| 15 | + bw4, scan_col uses bh4, correctly split; scope item 1 in the charter turned | |
| 16 | + out to be a no-op, the defect was entirely in the caller). | |
| 17 | +- `overlappable_left`'s call site (motion_mode eligibility, ~6053) now passes | |
| 18 | + `bh4` instead of `bw4` (libaom asymmetry: above-row scan uses width, | |
| 19 | + left-col scan uses height). | |
| 20 | +- REAL found-and-fixed bug beyond the charter's scope-1 read: `grid.set` (the | |
| 21 | + mvstack module's own `MiGrid`, distinct from `Neighbours`) in both the | |
| 22 | + single-ref (~6199) and compound (~5298) decode paths stamped a square | |
| 23 | + `bw4`x`bw4` footprint even for a rect block -- a HORZ strip's top half was | |
| 24 | + claiming its own bottom strip's mi rows before that strip ever decoded, | |
| 25 | + corrupting every subsequent mvstack scan that reads those cells back. Fixed | |
| 26 | + to `0..bh4` (rows) x `0..bw4` (cols). This dominated the pin's actual | |
| 27 | + mismatch, not the (already-correct) mvstack row/col split. | |
| 28 | +- `PARTITION_HORZ`/`PARTITION_VERT` arms resurrected from `4782e57` verbatim | |
| 29 | + (side=BLOCK, reject_residual=true, write_w/write_h = 32/16 or 16/32), | |
| 30 | + `RECT_PARTITION_HITS` counter wired. | |
| 31 | + | |
| 32 | +## Gate state (NOT closed) | |
| 33 | +`pinned_warp_stream_decodes_pixel_exact` with | |
| 34 | +`EC_AV1_GATE_DUMP_PIN=fixtures/rect-flake-1.obu`: before this round's fix the | |
| 35 | +mismatch grid was dense from block row 12 on (most of the frame). After the | |
| 36 | +bw4/bh4 + grid-stamp fixes the mismatch region shrank to a handful of scattered | |
| 37 | +`o` cells starting at grid row 429 (of ~450), growing denser toward the frame | |
| 38 | +edge -- still FAILS (`assertion left == right failed: frame 16 luma vs ffmpeg`). | |
| 39 | +NOT localized further within budget: the remaining defect is downstream of the | |
| 40 | +two fixes above, likely one of the audited-but-unfixed items below (Done | |
| 41 | +criteria's ladder step (a) is not met). | |
| 42 | + | |
| 43 | +Lib suite: 220/0, 17 ignored -- no regression from either fix. | |
| 44 | +Free-partition gate un-clamp (scope item 4c) and the 6x hammer sweep were NOT | |
| 45 | +attempted (budget). HORZ_B top-strip sweep (scope item 5) NOT attempted. | |
| 46 | + | |
| 47 | +## Audited but left unfixed (scope items 2/3, budget) | |
| 48 | +- `find_samples`/`num_proj_ref` (warp sample gathering) still take a single | |
| 49 | + `bw4` param and use it for BOTH the above-row AND left-column scans/limits | |
| 50 | + (~4344-4462) -- a real bug for a rect block's warp path, unconfirmed against | |
| 51 | + this pin (strip 1 in the pin is WARPED_CAUSAL and already matched aomdec | |
| 52 | + byte-exact before AND after this round's fixes, so it's not implicated | |
| 53 | + here, but it is real for any rect block whose warp-eligible strip has | |
| 54 | + neighbours needing the true bh4). | |
| 55 | +- The OBMC blend build function (~4670, distinct from the eligibility check | |
| 56 | + fixed above) also takes one `bw4` param used for both `overlappable_above` | |
| 57 | + and `overlappable_left` (~4697/4718) -- same class, unfixed, unconfirmed | |
| 58 | + against this pin (pin's blocks are WARPED/NEARMV skip, no OBMC selected). | |
| 59 | +- CDF size-class indexing (`bsize_idx = side.trailing_zeros()-3`, | |
| 60 | + `cdfs.motion_mode`/`cdfs.obmc` only 4 rows for square 8/16/32/64) was NOT | |
| 61 | + audited against libaom's real per-BLOCK_SIZE indexed tables (scope item 3). | |
| 62 | + Circumstantial evidence it is NOT the cause of the remaining mismatch: the | |
| 63 | + pin's strip 1 (WARPED_CAUSAL, `bsize_idx=2` for side=32) already decodes | |
| 64 | + byte-exact before AND after this round, at the SAME `side`-derived index a | |
| 65 | + true 32x16 block would also hit under the current corner-cut. | |
| 66 | +- `MiInfo::size` is a single scalar (can't record a neighbour's true | |
| 67 | + width/height separately) -- structural limitation of `mvstack::MiGrid`, | |
| 68 | + noted but not touched. | |
| 69 | + | |
| 70 | +## Class | |
| 71 | +decision-at-wrong-granularity, but the caller-side instance (grid stamp | |
| 72 | +footprint), not the table-derivation instance the charter's scope-1 named | |
| 73 | +(mvstack.rs itself was already correct). | |
| 74 | + | |
| 75 | +## Next round seed | |
| 76 | +1. Localize the remaining mismatch (grid row ~429+): recon dump + range | |
| 77 | + ladder against aomdec `EC_TRACE`, starting from the first diverging block | |
| 78 | + near that region (frame 16, likely a later strip or an HORZ_B/other | |
| 79 | + partition in the same frame -- the pin decodes multiple partition types). | |
| 80 | +2. Once localized, check whether it lands in find_samples/OBMC-blend/CDF-class | |
| 81 | + (the three unaudited items above) or is a fourth defect. | |
| 82 | +3. Un-clamp the free-partition gate (scope 4c) and hammer once the pin is | |
| 83 | + green; sweep HORZ_B's top strip (scope 5). | |
| 84 | + | |
| 85 | +## Evidence | |
| 86 | +- Compiles clean (`cargo build -p ec-av1 --release`). | |
| 87 | +- `cargo test -p ec-av1 --release --lib`: 220 passed, 0 failed, 17 ignored. | |
| 88 | +- `EC_AV1_GATE_DUMP_PIN=fixtures/rect-flake-1.obu cargo test ... pinned_warp_stream_decodes_pixel_exact -- --ignored --nocapture`: | |
| 89 | + still FAILS (frame 16 luma), mismatch region reduced from dense (rows 12+) | |
| 90 | + to sparse (rows 429+) by this round's two fixes. | |
| 91 | +- Committed `c5b21ad` on `lane-rect2`. | |
| 92 | + | |
| 93 | +/tmp usage at report time: not re-checked this round (budget); no scratch | |
| 94 | +builds written under /tmp, CARGO_TARGET_DIR private per charter. |