lanes: record av1intrabc r5 verification (skip-stride fix, corpus sweep, suite 599/0/60)
Browse files at this commitc70a8ec52f4489db4db35f9064b6a2ce3cb1fbf8Parent: 226d2c81 changed file +82 -0
- lanes/av1intrabc.report.md +82 -0
lanes/av1intrabc.report.mdmodified+82 -0
| @@ -455,3 +455,85 @@ shrunk to 8192 bytes (a fresh pipe on this box is 65536). Both sides sat in | |||
| 455 | `deferred(concurrent stdin/stdout drain for aomenc spawns that write_all | 455 | `deferred(concurrent stdin/stdout drain for aomenc spawns that write_all |
| 456 | before wait_with_output -- unblocked by a charter that may edit the spawn | 456 | before wait_with_output -- unblocked by a charter that may edit the spawn |
| 457 | helper)`. | 457 | helper)`. |
| 458 | + | ||
| 459 | +## 4e. Round 5 (2026-09-23) -- the skip arm's residual slice was sized `bw * bh`, not `side * side` | ||
| 460 | + | ||
| 461 | +### Root cause (the reviewer's one P1) | ||
| 462 | + | ||
| 463 | +`decode_intrabc_rect`'s skip arm (pre-fix `decode.rs:11047-11049`) passed | ||
| 464 | +`push_mc_rect(..., stride = side = bw.max(bh), w = bw, h = bh, ..., | ||
| 465 | +&ZERO_RESIDUAL[..bw * bh])` (chroma: `cw * ch`). `PlaneBuf::reconstruct_mc_rect` | ||
| 466 | +(`decode.rs:25726-25731`) indexes `residual[row * side .. row*side + w]` for | ||
| 467 | +`row in 0..h`, needing up to `(bh-1)*side + bw` elements. For a VERT strip | ||
| 468 | +(`bh > bw`) that EXCEEDS the slice: a skipped 8x32 strip reads a 256-element | ||
| 469 | +slice at stride 32 and panics at row 8 -- `range end index 264 out of range | ||
| 470 | +for slice of length 256`. The panic is a bounds check, never silent | ||
| 471 | +corruption; a HORZ strip (`bw > bh`) never overruns (`(bh-1)*side + bw <= | ||
| 472 | +bw*bh` when `bw == side`). | ||
| 473 | + | ||
| 474 | +### Why every gate missed it | ||
| 475 | + | ||
| 476 | +Two stacked blind spots. (1) Only the default single-threaded path crashes: | ||
| 477 | +at `EC_AV1_RECON_THREADS == 1` the rect is reconstructed inline through | ||
| 478 | +`ReconPlanes` (the `dense_residual` read above); on the wavefront path the | ||
| 479 | +`Residual::done` ZERO_RESIDUAL pointer-compare maps the slice to the empty | ||
| 480 | +marker and never indexes it. (2) Every existing VERT intrabc witness was | ||
| 481 | +CODED (`skip == 0`), so no gate ever walked the skip arm on a VERT strip | ||
| 482 | +(`gate-blind-to-feature`: the counters counted neither the skip flag nor the | ||
| 483 | +orientation for skipped blocks). | ||
| 484 | + | ||
| 485 | +### Fix (bug-for-bug with the proven inter path) | ||
| 486 | + | ||
| 487 | +Three lines, `decode.rs` skip arm: `&ZERO_RESIDUAL[..side * side]` and | ||
| 488 | +`&ZERO_RESIDUAL[..cside * cside]` (x2), exactly what the inter skip arm at | ||
| 489 | +`decode.rs:28906-28916` passes. `(h-1)*side + w <= side*side` for every rect | ||
| 490 | +shape. | ||
| 491 | + | ||
| 492 | +### Repro (before) / verdict (after) | ||
| 493 | + | ||
| 494 | +Reviewer's corpus at `~/.cache/tmp-av1ibcreview/repro`. Pre-fix, stock | ||
| 495 | +release `decode_probe sweep_testsrc2_cq30_p0.obu` panics with the exact | ||
| 496 | +message above (`decode.rs:25731:32`); post-fix it decodes clean, rc=0. The | ||
| 497 | +new gate arm was also proven fail-pre-fix: with only the three fix lines | ||
| 498 | +reverted, `a_coded_rect_intrabc_block_reconstructs_in_both_orientations` | ||
| 499 | +panics at the same index (`264 out of range for slice of length 256`, | ||
| 500 | +`decode.rs:25755:32` after the counter edit shifted lines). | ||
| 501 | + | ||
| 502 | +### New gate arm (non-vacuous) | ||
| 503 | + | ||
| 504 | +`stream::tests::a_coded_rect_intrabc_block_reconstructs_in_both_orientations` | ||
| 505 | +gains two SKIPPED-strip arms, `vert-skip-512-cq30-pal0-txs0` and | ||
| 506 | +`vert-skip-512-cq30-pal1-txs0` (testsrc2 512x384, `--cq-level=30`, palette | ||
| 507 | +off AND on, txs off -- the reviewer's panic recipe family). Each arm decodes | ||
| 508 | +the stream at 1 AND 4 recon threads and asserts byte-exact vs ffmpeg on | ||
| 509 | +BOTH paths, and a new counter `decode::intrabc_rect_skipped_hits()` (bump in | ||
| 510 | +`decode_intrabc_rect`, `[horz, vert]` split, reset with the coded one) | ||
| 511 | +HARD-asserts a SKIPPED VERT 2:1 strip was actually reconstructed -- an arm | ||
| 512 | +that stops producing one fails instead of passing vacuously. Measured this | ||
| 513 | +round: | ||
| 514 | + | ||
| 515 | +``` | ||
| 516 | +vert-skip-512-cq30-pal0-txs0 1 frame(s) exact at 1 recon thread(s), skipped rect intrabc horz=11 vert=2 | ||
| 517 | +vert-skip-512-cq30-pal0-txs0 1 frame(s) exact at 4 recon thread(s), skipped rect intrabc horz=11 vert=2 | ||
| 518 | +vert-skip-512-cq30-pal1-txs0 1 frame(s) exact at 1 recon thread(s), skipped rect intrabc horz=1 vert=2 | ||
| 519 | +vert-skip-512-cq30-pal1-txs0 1 frame(s) exact at 4 recon thread(s), skipped rect intrabc horz=1 vert=2 | ||
| 520 | +``` | ||
| 521 | + | ||
| 522 | +### Corpus sweep (post-fix, release `decode_probe` on the committed tree) | ||
| 523 | + | ||
| 524 | +All 39 obus in `~/.cache/tmp-av1ibcreview/repro` decode without panic | ||
| 525 | +(rc=0, no `panicked` in output). Byte-exactness where the reviewer compared: | ||
| 526 | + | ||
| 527 | +| group | result | | ||
| 528 | +|---|---| | ||
| 529 | +| sweep_* 16 streams with a non-zero ffmpeg ref | all 16 `cmp`-EXACT (294912 B each) | | ||
| 530 | +| sweep_* 14 streams whose ref is 0 B (the reviewer's panicking cells) | all decode clean now, no ref to compare | | ||
| 531 | +| A.obu / B.obu / C_gradients / C_mandelbrot / C_smptebars | all `cmp`-EXACT vs `*_ref.raw` | | ||
| 532 | +| D.obu | probe dispatches 0 frames (unchanged: reviewer's own `D_ours.raw`/`D_ours2.raw` are 0 B too) | | ||
| 533 | +| gray60.obu, av1-monochrome.obu | `cmp`-EXACT vs `gray_ref.raw` / `mono_ref.raw` | | ||
| 534 | +| reelb_* 10-bit (8 fixtures, `EC_PROBE_OUT16`) | all 8 `cmp`-EXACT vs `ref_reelb_*.raw` | | ||
| 535 | +| av1-profile1-444.obu | still REFUSED by name (`a chroma format other than 4:2:0`) | | ||
| 536 | + | ||
| 537 | +### Full suite | ||
| 538 | + | ||
| 539 | +`test result: ok. 599 passed; 0 failed; 60 ignored; 0 measured; 0 filtered out; finished in 9555.99s` — hub-supervised `--test-threads=1` on the committed tree (`86ba99f6`), exit 0. | ||