forge
Explore
Log in

Don't you dare go Hollow

Round 2 on H2/H3 — both pre-filter, and not one defect

Browse files at this commit

989dfceda19e7661fb8139d25de050f54a1ef257Ahmet Kaan GümüşParent: 2fa693f
  • docs
    • round 2 on H2/H3 — both pre-filter, and not one defect
Show full message
docs(av1formatsweep): round 2 on H2/H3 — both pre-filter, and not one defect

Exoneration first: EC_AV1_PREFILT_DUMP on both sides shows H2's 847 wrong
chroma samples in frame 2 and H3's 90 wrong key-frame samples are already
there BEFORE deblock, CDEF and LR, with luma exact in both. The filter chain
is off the table for both.

H2: the oracle's per-unit census (EC_COEFF) shows every chroma unit in the
stream is tx_size=3 (TX_32X32), so the av1_get_adjusted_tx_size clamp the
first suspect named is already applied correctly on both sides
(decode_inter_block's 4:4:4 arm computes if side >= 64 { 32 }) — and there is
no chroma unit at mi_row 8 at all. The wrong pixels are exactly the left
column of chroma units of the frame-edge PARTIAL block row (96-high frame,
64 blocks: the second row has 32 real luma rows, so its chroma band is 32
rows at ss 0/0 where 4:2:0 would give 16). Remaining candidates: that partial
block's unit_height / ROUND_POWER_OF_TWO clamp at ss 0, and its above/left
prediction reach.

H3: frames 1-5 are byte-exact although they predict from the wrong key frame,
so the wrong samples are never read as a prediction source — that points at
the key frame's chroma output/crop or reference-store path, not at
reconstruction arithmetic every frame shares. H2 and H3 share a stage and a
plane, not a root: no single fix claimed.

Also renames the matrix cell to 'even, not a multiple of 8' and states
plainly that the odd-luma-dimension cell is neither gateable nor refutable
from an aomenc recipe (aomenc rounds the coded size down to even), and adds
the declared-debt line for gates B and C.
lanes/av1formatsweep.report.mdmodified+63 -15
@@ -50,16 +50,27 @@ name (no exactness claim possible or wanted); **–** = not measured.
5050 | cell | 8-bit | 10-bit | 12-bit |
5151 |---|---|---|---|
5252 | even dims, key+inter | Y (≈120 gates) | Y (≈40 gates) | Y (4 gates) |
53-| **odd coded dims** (`w%8≠0` or `h%8≠0`) | **y → gate A** | **y → gate A** | **y → gate A** |
53+| **even, not a multiple of 8** (`w%8≠0` or `h%8≠0`, both even) | **y → gate A** | **y → gate A** | **y → gate A** |
54+| luma dimension itself ODD | not producible¹ | not producible¹ | not producible¹ |
5455 | partial-superblock edge (72, 136, …) | Y (`tiny_frame_size_sweep`) | Y | – |
5556 | tile columns / rows | Y (2 and 4, both axes) | Y (multi-tile family) | – |
5657 | superres | Y | Y | – |
5758 | film grain / warp / CDEF+LR | Y | Y | Y |
5859
59-Odd coded dimensions had **no committed gate at any depth**: every frame size
60-in the crate (the tiny-size ladder included — 8, 16, 24, 32, 48, 64, 72, 136,
61-192, 200…248) is a multiple of 8, so the partial-chroma-plane walk had no
62-exactness evidence. Measured exact, and gated.
60+¹ **Neither gateable nor refutable from this recipe:** aomenc rounds a 4:2:0
61+frame's coded size DOWN to even, so no stream it produces from a lavfi source
62+codes an odd luma dimension at all. Verified: a `testsrc2 131x131` yuv420p
63+y4m (ffmpeg accepts it) encodes to a sequence header of `max_frame=130x130`,
64+which this decoder decodes correctly; the ffmpeg reference for the same file
65+comes back 131x131 because ffmpeg pads to the y4m header. Closing that cell
66+needs a hand-built stream (the `Av1Parser` header writer the sweep's own
67+`every_frame_size_a_header_can_code_has_a_mode_info_grid` gate already uses),
68+not an aomenc recipe.
69+
70+Even non-multiple-of-8 dimensions had **no committed gate at any depth**:
71+every frame size in the crate (the tiny-size ladder included — 8, 16, 24, 32,
72+48, 64, 72, 136, 192, 200…248) is a multiple of 8, so the partial-chroma-plane
73+walk had no exactness evidence. Measured exact, and gated.
6374
6475 ### 4:4:4 (`ss 0,0`) — the whole committed base is LOSSLESS 8-bit
6576
@@ -157,8 +168,13 @@ is not producible through the aomenc + lavfi recipe, so it can be neither
157168 gated nor refuted from here; the sweep's odd-dimension cell is "even, not a
158169 multiple of 8".
159170
160-**Still unproven:** gates B and C carry no mutation proof — they inherit the
161-`aomdec` byte-compare proof the 180 existing gates run on.
171+**Declared debt:** gates B (4:4:4 lossless 10-bit) and C (4:4:4 12-bit)
172+carry NO targeted mutation proof. They inherit the `aomdec` byte-compare the
173+180 existing gates run on, plus their own header/counter non-vacuity asserts
174+(`rect_split_lossless_chroma444_hits()`, `mc_subpel_hits()`, the full-resolution
175+chroma extent). A future lane that touches the 4:4:4 unit geometry should
176+spend a mutation on them; the shape of the proof is the one in gate A's doc
177+comment — mutate the site the CELL depends on, not a nearby helper.
162178
163179 ## 3. Divergences, localized
164180
@@ -216,11 +232,29 @@ only, luma exactly zero wrong**, magnitude ±1 (up to ±20 at cq 40).
216232 `EC_SYMR` on both sides: **140820 reads, zero divergence** — the entropy
217233 decode is bit-identical, so this is pure reconstruction arithmetic, not a
218234 fork. `--enable-tx-size-search=0` → exact; every filter toggle changes
219-nothing. Prime suspect is the chroma transform-unit shape at `ss (0,0)`: at
220-4:2:0 the chroma rect is halved and a `TX_32X64` chroma unit cannot arise,
221-while at 4:4:4 it can, and libaom clamps it —
222-`max_txsize_rect_lookup[BLOCK_32X64] = TX_32X64` then
223-`av1_get_adjusted_tx_size` (`blockd.h` ~1363) reduces TX_32X64 to TX_32X32.
235+nothing.
236+
237+**Round 2 (this lane, deeper).** The pre-filter dumps exonerate the whole
238+filter chain: `EC_AV1_PREFILT_DUMP` on both sides shows frame 2 already
239+carries 847 wrong CHROMA samples (luma 0 wrong) BEFORE deblock, CDEF and LR.
240+The oracle's per-unit census (`EC_COEFF plane=… row=… col=… tx_size=…`) shows
241+every chroma unit in this stream is `tx_size=3` (TX_32X32) at mi_row 0 / 0 and
242+mi_row 16, mi_col 0 and 8 — i.e. the `av1_get_adjusted_tx_size` clamp the
243+first suspect pointed at is ALREADY being applied correctly on both sides
244+(`decode_inter_block`'s 4:4:4 arm computes `if side >= 64 { 32 }`), and there
245+is no chroma unit at mi_row 8 at all. The wrong pixels are exactly the left
246+column of chroma units of the BOTTOM, frame-edge PARTIAL block row (frame is
247+96 high, blocks 64: the second block row has 32 real luma rows, so its chroma
248+band is 32 rows at `ss (0,0)` where 4:2:0 would give 16). Both sides walk the
249+same units with the same coefficients, so the defect is in what happens to
250+that partial block's chroma — its `unit_height` /
251+`ROUND_POWER_OF_TWO` clamp at `ss 0` (decodeframe.c:989) or its above/left
252+prediction reach at the frame edge — not in the transform-size rule.
253+
254+Named next step for the follow-up lane: dump both sides'
255+`EC_PRED`/`EC_MCB` at the mi_row-16 chroma unit and compare the predicted
256+plane before the residual add, which splits "prediction reach" from
257+"reconstruction arithmetic" in one run.
224258
225259 ### H3 — 4:4:4 lossless + 2 tile columns: 90 chroma samples wrong in the key frame
226260
@@ -228,6 +262,17 @@ while at 4:4:4 it can, and libaom clamps it —
228262 aomdec-confirmed (not an ffmpeg artefact). Frame 0: exactly 90 wrong
229263 samples, U and V, ±1, first at U(237,58). Frames 1–5: byte-exact.
230264
265+**Round 2 (this lane).** Also pre-filter: the same `EC_AV1_PREFILT_DUMP`
266+pair shows all 90 samples wrong BEFORE deblock/CDEF/LR, luma 0 wrong. The
267+decisive new fact is that frames 1–5 are byte-exact even though they predict
268+from that same key frame — so the wrong samples are never read as a
269+prediction source, which points at the key frame's chroma OUTPUT/crop or
270+reference-store path rather than at reconstruction arithmetic every frame
271+shares. **H2 and H3 therefore do NOT reduce to one defect:** same stage
272+(pre-filter reconstruction), same plane (chroma only), same magnitude (±1) —
273+but H2 fires on inter frames at a frame-edge partial block row and H3 fires
274+on a lossless key frame and never propagates.
275+
231276 ### H4 — 4:4:4 lossless + 2 tile ROWS: hard divergence
232277
233278 Same recipe with `--tile-rows=1`. Frames 0–2 exact; frame 3 onwards the whole
@@ -266,9 +311,12 @@ dimensions; 4:4:4 at 10/12-bit with tiles; 12-bit 4:4:4 lossless; 4:4:0
266311 (single-tile-row frame-edge walk).
267312 3. **H5** 4:4:4 10-bit lossless 128-root — a cell the 8-bit 444 gates
268313 suggest is safe and is not.
269-4. **H2** 4:4:4 lossy + tx size search chroma ±1 — reconstruction-only,
270- entropy-clean, so the `av1_get_adjusted_tx_size` clamp is the first thing
271- to check.
314+4. **H2** 4:4:4 lossy + tx size search chroma ±1 — reconstruction-only and
315+ entropy-clean; round 2 exonerated the filter chain AND the tx-size clamp
316+ (both sides already read TX_32X32 chroma units), so the remaining
317+ candidates are the frame-edge partial block row's chroma `unit_height`
318+ clamp and its prediction reach. One `EC_PRED`/`EC_MCB` pair at the
319+ mi_row-16 chroma unit splits those two.
272320 5. **H3** 4:4:4 lossless + tile columns, 90 chroma samples — smallest
273321 magnitude, likely the same root as H2.
274322