forge
Explore
Log in

Don't you dare go Hollow

lane-av1422warp: correct defect 3's class and hand it off with paired dumps

Browse files at this commit

287d154213bed4d6f5a5a22749c8bb807e6a2e77Ahmet Kaan GümüşParent: 10647bf
Report only. No code change; the tree is byte-identical to 4b9c4cd8 and the
EC_AV1_ALLOW_422_PROBE bypass stays reverted.

The previous Defect 3 section mis-attributed the class as 4:2:2
transform-size selection for a twice-as-tall plane block. Paired traces
refute that and the report now says so explicitly.

What the paired evidence actually shows, on a clean single-frame cut of
a1.obu's frame 0 (a1_f0.obu, 11802 B, one frame on both sides):

- Two independent ladders agree on the boundary. The coefficient ladder
  (EC_COEFF_STEP vs ours, paired on all_zero + post-read rng) and the
  prediction ladder (EC_PREDOUT8 vs OUR_PRED, paired on sum + shape) both
  pair exactly through index 1418 and first mismatch at 1419. Oracle
  2512 units, ours 1959.

- It is an ENTROPY DESYNC, not a transform choice. EC_TRACE_MODE_STEP
  exists on both sides: at mi(50,28) the oracle reads uv_mode 4 and
  use_filter_intra 1, we read uv_mode 13 and use_filter_intra 0, from
  different reader states at the block's first read. Our unit 1419
  averages 89.0 against the oracle's 89.3 over the same footprint, so the
  luma CONTENT agrees and only the tiling differs -- the TX_8X8-vs-TX_4X4
  split is downstream damage.

- Ruled out for the desync, with libaom citations in the report: the
  tx_size lookup (both read tx_size_cdf[0] at ctx 2; bsize_to_tx_size_cat
  maps both BLOCK_8X8 and BLOCK_16X8 to 0, blockd.h:1344), the tx_size
  context (pred_common.h:348-384 is the above+left form we already
  implement), the frame header (read_tx_mode, decodeframe.c:139, matches
  crates/ec-av1-syntax/src/frame.rs:1039), and the 4:2:2 chroma sharing
  (mi(50,26) is even and owns the shared chroma; all three of its units
  pair and the oracle codes no block at mi(50,27)).

One symbol is consumed or skipped between mi(50,26)'s last unit and
mi(50,28)'s skip, and this lane did not identify which. The report says
so rather than guessing, and records why the obvious instrument cannot
close it: the oracle's EC_ISTEP has no tx_depth print anywhere (a rung
gap, not a missing read) and its line order is not comparable with ours.
The unblock is to bisect the BIT POSITION directly with an EC_BITPOS rung
on both sides rather than the 16-bit rng the rungs print, which collides
and interleaves differently.

This is a 4:2:2-only desync. Both controls stayed byte-exact throughout.
lanes/av1422warp.report.mdmodified+90 -20
@@ -9,8 +9,8 @@ The charter asked for a pixel-exact 4:2:2 stream with real residuals, compound
99 and warped motion above the vertical midpoint. **The stream is not pixel-exact**,
1010 so it is NOT pinned and no coverage gate was written — a gate over a non-exact
1111 stream is a false claim. What it bought is two real 4:2:2 defects fixed (one a
12-decode-blocking panic) and a third localized to one site for its owner. The
13-sequence-header refusal **stays**.
12+decode-blocking panic) and a third localized to a single desync window and handed
13+off with paired dumps. The sequence-header refusal **stays**.
1414
1515 | commit | defect | before | after |
1616 |---|---|---|---|
@@ -118,29 +118,99 @@ with edge-filter strength 1 the prediction reproduces the oracle exactly (row0
118118 `132,150,157,148`, col0 `132,140,147,154,159,157,155,149`); with strength 0 it
119119 reproduces ours (`135,147,172,145`). The oracle printed `ft=1`, we computed 0.
120120
121-## Defect 3 — NOT fixed, for its owning lane
121+## Defect 3 — NOT fixed, HANDOFF with paired dumps
122122
123-After `a9611ea2` the first 1419 TUs of frame 0 pair exactly on prediction sum;
124-index 1419 is the first divergence and it is a shape difference, not a value one:
123+**The first version of this section mis-attributed the class** (it called this
124+transform-size selection for a twice-as-tall plane block). Paired traces refute
125+that: see "What the class actually is" below.
126+
127+### The measurement, on a clean single-frame stream
128+
129+`a1.obu`'s frame 0 cut at the second OBU temporal delimiter, `a1_f0.obu`
130+(11802 B, decodes 1 frame on both sides). With both sides frame-scoped, two
131+independent pairings agree on the same boundary:
132+
133+- **coefficient ladder** (`EC_TRACE_COEFF`, oracle `EC_COEFF_STEP` vs ours, paired
134+ on `all_zero` + post-read `rng`): units pair exactly through **1418**; unit
135+ **1419** is the first mismatch. Oracle 2512 units, ours 1959.
136+- **prediction ladder** (`EC_PREDOUT8` vs `OUR_PRED`, paired on sum + shape):
137+ same boundary, index **1419**.
138+
139+```
140+1413 O mi(50,26) plane 0 '8x8' 5799 M '8x8' 5799 <- mi(50,26) block is FINE
141+1414 O mi(50,26) plane 1 '4x8' 3784 M '4x8' 3784
142+1415 O mi(50,26) plane 2 '4x8' 2468 M '4x8' 2468
143+1416 O mi(48,28) plane 0 '16x8' 16683 M '16x8' 16683
144+1417 O mi(48,28) plane 1 '8x8' 5504 M '8x8' 5504
145+1418 O mi(48,28) plane 2 '8x8' 9024 M '8x8' 9024
146+1419 O mi(50,28) plane 0 '8x8' 5715 M '4x4' 1424 <- FIRST divergence
147+1420 O mi(50,28) plane 1 '4x8' 3370 M '4x4' 1344
148+1421 O mi(50,28) plane 2 '4x8' 2513 M '4x4' 1488
149+```
150+
151+Our unit 1419 averages 89.0 and the oracle's 89.3 over the same 8x8 footprint, so
152+the luma CONTENT agrees; only the tiling differs (one TX_8X8 vs four TX_4X4).
153+
154+### What the class actually is: a MODE desync at mi(50,28)
155+
156+`EC_TRACE_MODE_STEP` exists on BOTH sides and is directly comparable:
125157
126158 ```
127-1418 O (48,28,plane 2,'8x8', 9024) M ('8x8', 9024) <- matches
128-1419 O (50,28,plane 0,'8x8', 5715) M ('4x4', 1424) <- oracle codes ONE TX_8X8
129-1420 O (50,28,plane 1,'4x8', 3370) M ('4x4', 1344) <- luma TU first, chroma follows
130-1421 O (50,28,plane 2,'4x8', 2513) M ('4x4', 1488)
159+oracle mi(50,28): skip 35588 cdef 35588 dq 35588 mode val=0 41524
160+ angle_y 0 41524 uv_mode val=4 60976 angle_uv val=3 50488
161+ use_filter_intra val=1 38616 filter_intra_mode val=3 35858
162+ours mi(50,28): skip 52484 cdef 52484 dq 52484 mode val=0 61324
163+ angle_y 0 61324 uv_mode val=13 54978 angle_uv val=0 41424
164+ use_filter_intra val=0 39456 (no filter_intra_mode read)
131165 ```
132166
133-Class: 4:2:2 transform-size selection for a luma block whose plane block is twice
134-as tall — the luma max transform at mi(50,28) is TX_8X8 for the oracle and TX_4X4
135-for us, and the chroma units follow. This is the family
136-`lanes/av1422bigblock.report.md` already fingerprinted as "sub-8/odd-strip 4:2:2
137-chroma under the 128-rect intra path (the `ss_size_lookup` BLOCK_INVALID
138-family)" — a known class with a known owner, not a new one. Unblock: one look at
139-the 4:2:2 `max_txsize_rect_lookup` / chroma-tx derivation for an 8x8 luma block
140-whose plane block is 4x8.
141-
142-Our decoder also emits 3450 `OUR_PRED` lines where the oracle emits 2662
143-`EC_PREDOUT8` — same per-block unit-count family, worth the same lane's look.
167+Same mi, same luma `mode` value (0), but **`uv_mode` 4 (oracle) vs 13 (ours)** and
168+a different `use_filter_intra` bit. The reader is already at a different state
169+when mi(50,28)'s `skip` is read, so the divergence is at or before it — this is an
170+ENTROPY desync, not a transform-size choice. The transform-shape difference is
171+downstream damage, not the defect.
172+
173+What is **ruled out** for the desync:
174+
175+- Not the tx_size lookup. Both sides read `tx_size_cdf[0]` at `ctx = 2` for the
176+ same 8x8 block (oracle `EC_TXCTXB mi=50,26 ... maxw=8 maxh=8 ctx=2`; ours
177+ `read_tx_size mi=(50,26) side=8 max_tx=8 ctx=2`), and `bsize_to_tx_size_cat`
178+ gives cat 0 for both BLOCK_8X8 and BLOCK_16X8 (`blockd.h:1344`, depth table
179+ index 1 and 3 both map to 0). Same row, same alphabet (2 symbols).
180+- Not `get_tx_size_context`. `pred_common.h:348-384` is `above + left` with the
181+ inter-neighbour override — the form `tx_size_context_txfm` already implements;
182+ both compute ctx 2 here.
183+- Not the frame header. `read_tx_mode` (`decodeframe.c:139`) and our
184+ `crates/ec-av1-syntax/src/frame.rs:1039` are the same function, and the header
185+ parses identically (the block modes before this point pair).
186+- Not the chroma sharing. mi(50,26) is even, so it owns the 4:2:2 chroma block and
187+ mi(50,27) shares it; all three of mi(50,26)'s units pair, and the oracle's
188+ `EC_IMODE` shows no block at mi(50,27).
189+
190+**So: one symbol is consumed or skipped between mi(50,26)'s last unit and
191+mi(50,28)'s `skip`, and this lane did not identify which.** The oracle's
192+`EC_ISTEP` has no `tx_depth` print at all (it goes `angle_uv` straight to the
193+next block's `skip` at every site, including mi(48,26) and mi(48,28) where both
194+sides demonstrably stay aligned) — that is a rung-coverage gap, NOT evidence of
195+a missing read, and the `EC_ISTEP` line ORDER is not comparable between the two
196+builds (the oracle's trace jumps back from mi(50,26) to mi(48,28)), so the
197+step-by-step pairing cannot be used to bracket the extra read either.
198+
199+### Unblock
200+
201+Bisect the bit position directly, not through the 16-bit `rng` the rungs print
202+(it collides and the two traces interleave differently). Concretely: add an
203+`EC_BITPOS` rung to the oracle's `aom_read_symbol`/header read and to ours,
204+then diff the two symbol sequences between mi(50,26)'s last chroma unit and
205+mi(50,28)'s `skip`. The 4:2:2-only constructs in that window are the candidates:
206+the chroma-reference bookkeeping for the shared mi(50,27) column, and whatever
207+the 4:2:2 block tail reads after the shared chroma. Fixtures and dumps are in
208+`~/.cache/av1422warp/` (`a1_f0.obu`, `f0.opred`, `f0.mpred`, `f0.ocoeff`,
209+`f0.mcoeff`, `f0.ostep`, `f0.step`, `f0.otx`); the probe bypass
210+(`EC_AV1_ALLOW_422_PROBE`) is reverted and in no commit.
211+
212+This is a 4:2:2-only entropy desync; no 4:2:0 or 4:4:4 evidence points at it, and
213+both controls stayed byte-exact throughout.
144214
145215 ## Two refuted hypotheses — do not re-chase
146216