diff --git a/lanes/d792.report.md b/lanes/d792.report.md new file mode 100644 index 00000000..7bdff1c1 --- /dev/null +++ b/lanes/d792.report.md @@ -0,0 +1,71 @@ +# lane-d792 — the reference-ladder decode failures on the 1920x792 (straddling) crop + +Working notes, kept current from the first commit. Streams and logs under +`$HOME/.cache/d792/` (`streams/`, `small/`, `stage/`). + +## Reproduction (standalone, without the 7-minute BD gate) + +12 frames of film A from `00:35:00`, `crop=1920:792:0:0` (film A IS coded +1920x792, so the gate's `EC_AV1_NATIVE_CROP=1920x792` is its whole frame), +encoded with the gate's own ladder recipes and decoded through +`examples/dump_yuv` vs `ffmpeg -pix_fmt yuv420p`: + +| point | our decode vs ffmpeg | +|---|---| +| libaom `-cpu-used 6 -crf 5/20/35/45` | **EXACT, all 4** | +| rav1e `speed=6 quantizer=50/100/150/200` | **DIFFERS, all 4, every frame** (4-6 k samples/frame, max abs 24) | + +So the chartered "libaom crf-5 Golomb refusal" does NOT reproduce at +046dbe0e on this source/recipe; only the rav1e ±1 class does. (Charter +premise re-checked, not assumed.) + +## Where the rav1e divergence lives + +All diffs sit in the LAST rows of the frame: luma rows 760..791 of 792, +chroma 382..395 of 396 — the bottom straddle (792 = 12*64 + 24). + +Stage bisect (our `EC_AV1_*_DUMP` vs the instrumented aomdec's twin dumps, +`$HOME/.cache/d792/stage/`), rav1e q150 frame 0: + +| stage | first differing row (luma) | +|---|---| +| pre-filter reconstruction | **769** | +| post-deblock | 766 | +| post-CDEF | 760 | +| final (post-LR) | 760 | + +So the loop filters only SPREAD it: the defect is in **reconstruction**, in +mi rows 192..197 — the 24 px the frame edge cuts off the last superblock row. + +## Small repro (fast iteration) + +`$HOME/.cache/d792/small/f100.obu`: 4 frames of film A cropped to +**384x152** (= 2*64 + 24 straddle), rav1e `speed=6 quantizer=100`. Our +pre-filter reconstruction differs from aomdec's in rows **144..151** only +(the last 8 rows), all columns; ~1800 luma samples on frame 0. + +## What is ruled OUT so far + +* **Parse (block level) is in sync**: `EC_TRACE_MODE_STEP` on both decoders + gives identical `mode`/`skip`/`uv_mode`/`angle_y`/`angle_uv` sequences for + the 1518 blocks of the 1920x792 key frame (the only surplus lines in ours + are intra-in-inter `y_mode` rungs aomdec names differently). +* **Intra prediction is byte-exact** at the first differing block. The + oracle was patched this round with an `EC_PREDOUT8` rung (8-bit predicted + block; the existing one was high-bitdepth only) and the block at + `mi_row=36 mi_col=0` of the small repro gives `sum=6959 + row0=82,74,65,56,50,47,46,45 col0=82,85,85,85,85,85,85,85` on BOTH sides. + Edge lengths agree too (`n_left = 8` for a 16-tall TU with 8 rows inside, + i.e. libaom's `AOMMIN(txhpx, yd + txhpx)` clip is already ours). +* Loop restoration's last-stripe substitution matches libaom's + `get_stripe_boundary_info` (`copy_below = 0` at the frame bottom). + +## Where it IS (open, in progress) + +The residual. `EC_TRACE_COEFF` on both decoders over the small repro: +`eob` sequences are IDENTICAL (514 transform units) but the symbol streams +below them are not — ours reads **extra `br` (base-range) symbols** and +fewer `sign`/`base` ones (aom 23085 base / 7966 sign / 3338 br; ours 23634 / +7715 / 3351). First divergence is an extra `br` at trace line ~22951 of +44647. Next: resolve that line to its transform unit and read the rule that +differs there.