forge
Explore
Log in

Don't you dare go Hollow

Merge lane/av1witness2recheck: the two witness2 4:4:4 panics are closed on main

Browse files at this commit

fcbe228077b702af62f16d1937e95a97ee5fdcf9Ahmet Kaan GümüşParent: 269e1fdb407ed7
A measurement lane: no code changed. It rebuilt the hunt's two exact recipes (sha256
68773f2c.. and 72bed279.., byte-identical to the hunt's, so the recipe did not drift) and
decoded both with a provenance-checked probe built from its own tree.

Both decode clean on current main -- 3 frames, 320x256, empty stderr, no refusal -- and
both are byte-identical to aomdec --rawvideo AND to ffmpeg -pix_fmt yuv444p rawvideo. At
fe3e8418, P1 panicked at decode.rs:17631 (the chroma-tiling assert) and P2 panicked at
decode.rs:3766 (index 16 of a 16-entry table in reconstruct). Both are closed: P1 by
349b3918 (lane-av1-444sb), P2 by b6d4b528 (lane-av1leaf8oob), and the byte-exactness of
BOTH traces to one shared commit fa70a68c (4:4:4 intrabc rect chroma: size the plane block
from ss_size_lookup, not a halving) -- exact at that commit, not exact one before.

No Wave-1 lane to charter. P1's bytes are not pinned in-tree (the existing 4:4:4 sb128
fixture is a different stream); the bytes and the recipe are preserved in the report.
lanes/av1witness2recheck.report.mdadded+150 -0
@@ -0,0 +1,150 @@
1+# lane-av1-witness2recheck: W1-7 — do the two witness2 4:4:4 panics still fire on current main?
2+
3+Measurement lane. No decoder edit, no fixture committed. Tree: lane/av1witness2recheck
4+at `b8385c93` (main, worktree `/home/user/.cache/wt/av1witness2recheck`).
5+
6+**Verdict: 0 / 2 still panic.** Both recipes reproduce the *hunt's exact bytes*
7+(sha256 identical to the `fe3e8418` report) and both decode clean AND byte-exact
8+against the aomdec oracle on current main. No Wave-1 lane exists for either site;
9+both are CLOSED, and both were closed by named landed lanes, bisected here.
10+
11+## Provenance of the measuring binary
12+
13+`CARGO_TARGET_DIR=/home/user/.cache/tgt/av1witness2recheck cargo build -p ec-av1
14+--example decode_probe`, binary sha256
15+`23f9083717e1d75f6ae29b18d0cef23ae7af054fa6ce426e0d1fb7d9316494bf`. Provenance
16+check: `strings -a` over the binary yields exactly one tree path,
17+`/home/user/.cache/wt/av1witness2recheck` — no sibling lane or primary-checkout
18+path appears in its embedded strings. The control binary (below) built at
19+`fe3e8418` in `/home/user/.cache/wt/av1w2r-old` embeds only its own tree path.
20+
21+## Recipes — bytes reproduced, no drift
22+
23+Encoder `$HOME/.cache/aom-oracle/build/aomenc`, ffmpeg 8.1.2 lavfi, exactly the
24+hunt's command lines (`lanes/av1witness2.report.md` Annex A).
25+
26+| # | stream | hunt sha256 | mine sha256 | bytes |
27+|---|---|---|---|---|
28+| P1 | `s1d.obu` (bands444 + sb128 128-root rect) | `68773f2c6e01a2d…1925b1` | `68773f2c6e01a2d211bf0213479accb4c2c360132c0e1bc3b326eab7861925b1` | 595 |
29+| P2 | `s1e.obu` (testsrc2 444 + sb64 rect/1:4) | `72bed2791d1ceba8…d3593af` | `72bed2791d1ceba8be7926a052c7838c5d96d4f9d56d28fb69789a753d3593af` | 3577 |
30+
31+Both hashes match the hunt's byte for byte: **the recipes did not drift**, so these
32+are the same witnesses, not lookalikes. Input y4ms hashed too
33+(`bands444.y4m` `fa6218399cce8dd…`, `busy444.y4m` `53115212caaefda4…`).
34+
35+## Outcome on current main
36+
37+Both: `OK: 3 frames decoded, 320x256`, rc=0, empty stderr, no refusal string.
38+Oracle comparison (three independent runs of our decode are byte-identical to each
39+other — no nondeterminism):
40+
41+| stream | ours vs `aomdec --rawvideo` | ours vs `ffmpeg -pix_fmt yuv444p -f rawvideo` |
42+|---|---|---|
43+| s1d.obu | **identical** (737280 B) | **identical** |
44+| s1e.obu | **identical** (737280 B) | **identical** |
45+
46+(aomdec and ffmpeg outputs are themselves byte-identical on both streams, so the
47+two oracles agree.)
48+
49+Census on main (proves the arms are reached, not that the run was vacuous):
50+`s1d`: `sb128_rect: edge_vert=6`, `part128: vert=6 intra_vert=6`,
51+`rect4_32: vert=8 coded=8` — the 128-root VERT strip path the old assert guarded
52+fires 6 times. `s1e`: `leaf8_intrabc_hits: 7`, `cfl_ac: 444=72`,
53+`rect_intrabc_vartx: 6`, `inter_rect: 32x8=4`.
54+
55+## Control: the hunt's panics are real at `fe3e8418`
56+
57+Same two byte-identical streams, binary built from a detached `fe3e8418` worktree:
58+
59+- s1d.obu → rc=101, `panicked at crates/ec-av1/src/decode.rs:17631:5:
60+ assertion failed: lossless_frame || (chroma_w / chroma_tx, chroma_h / chroma_tx)
61+ == (nch_x, nch_y)` — the hunt's P1, at the hunt's line.
62+- s1e.obu → rc=101, `panicked at crates/ec-av1/src/decode.rs:3766:16: index out of
63+ bounds: the len is 16 but the index is 16`, backtrace
64+ `PlaneBuf::reconstruct` (16305) ← `exec_intra` (3766) ← `inline_intra` (3379) ←
65+ `push_intra` (3426) ← `decode_leaf8` — the hunt's P2, at the hunt's line.
66+
67+So the streams are still live witnesses of the old defects; only main has moved.
68+
69+## What closed each
70+
71+`git bisect` over `b8385c93 … fe3e8418` in the old worktree, verdict = panic
72+reproduces (bisect `good`) vs not (`bad`):
73+
74+**P1 — closed by `349b3918` (lane-av1-444sb).** First commit where the
75+`decode_block_128rect` chroma-tiling assert no longer fires is `349b3918`, whose
76+own message states the cause: the 128-rect chroma unit walk was hardcoded to the
77+4:2:0 mu-chunk span, so at 4:4:4 a 128-root HORZ/VERT block coded half its chroma
78+units. The site is now the per-axis invariant at `decode.rs:24515`:
79+`(chroma_w/chroma_tx, chroma_h/chroma_tx) == (nch_x*((64>>ss_x)/chroma_tx),
80+nch_y*((64>>ss_y)/chroma_tx))`. Bisect trace (s1d): panic at `b3f815c8` and
81+`76f8c3fe`, clean from `349b3918` on.
82+
83+**P2 — closed by `b6d4b528` (lane-av1leaf8oob).** First commit where the OOB no
84+longer fires. Its report names the one site: `decode_leaf8`'s intrabc frame-copy
85+closure sized the leaf chroma buffers with the literal 4:2:0 halving
86+(`vec![0u16; 4*4]`) while at 4:4:4 the leaf's chroma block is 8x8, so the 16-sample
87+override reached `reconstruct` as an 8x8 prediction and indexed `prediction[16]`.
88+Its gate `an_intrabc_8x8_leaf_chroma_frame_copy_at_444_decodes_without_the_oob`
89+pins these exact bytes as `crates/ec-av1/fixtures/444_leaf8_oob.obu` (sha256
90+`72bed279…d3593af`, byte-identical to mine) and passes on this tree
91+(`cargo test -p ec-av1 --lib an_intrabc_8x8_leaf_chroma_frame_copy_at_444_decodes_without_the_oob`
92+→ 1 passed, 0 failed).
93+
94+**Byte-exactness is a later, separate fix — `fa70a68c` for BOTH streams.**
95+`b6d4b528` removed the P2 panic but its own report deferred the pixel divergence
96+("281306 / 737280 wrong"). Bisecting the *oracle comparison* (not the panic) shows
97+both s1d and s1e are byte-exact from `fa70a68c`
98+("4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a
99+halving") and diverging at its parent `f33b9d41` — measured directly, both
100+streams: `fa70a68c` EXACT, `f33b9d41` not exact (213706 B for s1d, 281306 B for
101+s1e). So the two defects the hunt recorded are two defects plus one shared
102+pixel-exactness fix, all landed.
103+
104+## Per-recipe verdict
105+
106+| recipe | on `fe3e8418` | on `b8385c93` (main) | verdict |
107+|---|---|---|---|
108+| P1 `s1d.obu` `68773f2c…` | panic, `decode.rs:17631` 128-rect chroma assert | clean 3/3, **byte-exact** vs aomdec + ffmpeg | **CLOSED** by `349b3918`; exactness by `fa70a68c` |
109+| P2 `s1e.obu` `72bed279…` | panic, `decode.rs:3766` OOB in `PlaneBuf::reconstruct` | clean 3/3, **byte-exact** vs aomdec + ffmpeg | **CLOSED** by `b6d4b528`; exactness by `fa70a68c` |
110+
111+No Wave-1 lane to charter for either site. No fixture bytes needed for a Wave-1
112+pin: P2's bytes are already pinned in-tree, P1's (`68773f2c…`) are **not pinned
113+anywhere** — the only 4:4:4 sb128 fixture in the tree is
114+`444_sb128rect_lr_witness.obu` (`27825e14…`, 794 B), a different stream from
115+`s1d.obu`. The P1 bytes live only at `/tmp/av1w2r/s1d.obu` plus the recipe above;
116+if anyone wants a permanent pin for the 128-rect 4:4:4 shape, this is the stream,
117+and it is now byte-exact so it would make a good regression fixture.
118+
119+## Commands
120+
121+```
122+# recipes (hunt's exact lines; ffmpeg 8.1.2 -> $HOME/.cache/aom-oracle/build/aomenc)
123+ffmpeg -f lavfi -i "nullsrc=s=320x256:rate=30:d=1,geq=lum='mod(floor((Y+T*160)/8)*67,255)':cb='128+20*sin(Y/17+T)':cr='128+20*sin(X/23+T*2)'" -pix_fmt yuv444p bands444.y4m
124+aomenc --codec=av1 --obu -o s1d.obu --passes=1 --threads=1 bands444.y4m --limit=3 --kf-max-dist=1 --cpu-used=2 --end-usage=q --cq-level=20 --sb-size=128 --enable-rect-partitions=1 --enable-1to4-partitions=1 --min-partition-size=4
125+ffmpeg -f lavfi -i testsrc2=size=320x256:rate=30:duration=1 -pix_fmt yuv444p busy444.y4m
126+aomenc --codec=av1 --obu -o s1e.obu --passes=1 --threads=1 busy444.y4m --limit=3 --cpu-used=0 --end-usage=q --cq-level=45 --sb-size=64 --enable-rect-partitions=1 --enable-1to4-partitions=1 --min-partition-size=4
127+
128+# current main
129+CARGO_TARGET_DIR=$HOME/.cache/tgt/av1witness2recheck cargo build -p ec-av1 --example decode_probe
130+~/.cache/tgt/av1witness2recheck/debug/examples/decode_probe s1d.obu # OK: 3 frames decoded, 320x256
131+~/.cache/tgt/av1witness2recheck/debug/examples/decode_probe s1e.obu # OK: 3 frames decoded, 320x256
132+EC_NOMEMGUARD=1 EC_PROBE_OUT=ours.raw ~/.cache/tgt/av1witness2recheck/debug/examples/decode_probe s1d.obu
133+~/.cache/aom-oracle/build/aomdec --rawvideo -o oracle.raw s1d.obu ; cmp ours.raw oracle.raw # identical
134+ffmpeg -i s1d.obu -pix_fmt yuv444p -f rawvideo ff.raw -y ; cmp ours.raw ff.raw # identical
135+
136+# control at fe3e8418 (detached worktree /home/user/.cache/wt/av1w2r-old)
137+CARGO_TARGET_DIR=$HOME/.cache/tgt/av1w2r-old cargo build -p ec-av1 --example decode_probe
138+~/.cache/tgt/av1w2r-old/debug/examples/decode_probe s1d.obu # rc=101, decode.rs:17631 assert
139+~/.cache/tgt/av1w2r-old/debug/examples/decode_probe s1e.obu # rc=101, decode.rs:3766 OOB
140+```
141+
142+## Instrument limits
143+
144+- The two bisects are over commits in this repo only; they say which landed commit
145+ flips the measured predicate, not that no other commit also touches the site.
146+- The oracle comparison uses one stream per predicate (s1d for P1, s1e for P2), so
147+ `fa70a68c` is "the first commit at which *these two streams* are byte-exact", not
148+ a claim about the whole 4:4:4 class.
149+- Local scoped runs only (two example builds, one named gate test). No full suite
150+ was run on this lane.