forge
Explore
Log in

Don't you dare go Hollow

lane-d792: reproduce the 1920x792 reference-ladder failures standalone and bisect them to reconstruction

Browse files at this commit

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