lane-av1422444b: the census annotations are folded in (additive, nothing rewritten), and my own comparator's three bugs are written down with their fixes
Browse files at this commit4fe36ff59e6ab6ce2ffaca22acb4666834b29aacParent: 18aa2112 changed files +120 -24
- lanes/av1422444b.report.md +64 -24
- lanes/av1422census2.report.md +56 -0
lanes/av1422444b.report.mdmodified+64 -24
| @@ -123,17 +123,46 @@ disagreeing about what the pixels are. | |||
| 123 | **Control C — the mutated tree reds on this exact comparator** (§4), which rules out | 123 | **Control C — the mutated tree reds on this exact comparator** (§4), which rules out |
| 124 | the comparator being unable to see a 4:4:4 chroma defect at all. | 124 | the comparator being unable to see a 4:4:4 chroma defect at all. |
| 125 | 125 | ||
| 126 | -Two of my own instrument bugs were found and fixed by these controls rather than by | 126 | +### 3.2 Three comparator bugs this lane hit, each with its fix |
| 127 | -reading a verdict; both are recorded here because each would have produced a confident | 127 | + |
| 128 | -wrong number: | 128 | +All three were caught by the controls above rather than by reading a verdict, and each |
| 129 | - | 129 | +would have produced a CONFIDENT wrong number rather than an obvious failure. They are |
| 130 | -* the first `cmp.py` indexed the ORACLE buffer with the frame offset but read the OURS | 130 | +the class that produced two wrong tables elsewhere this wave, so the next lane that |
| 131 | - buffer at a per-plane-zero offset, reporting 1.36 M wrong chroma samples on a cell that | 131 | +writes a comparator should read this list before writing one. |
| 132 | - is in fact exact. It surfaced as an implausible count, not as a plausible one. | 132 | + |
| 133 | -* `cmp.py` hardcoded `bps=2` and `cmp.sh` parsed geometry out of the cell's FILE NAME, | 133 | +1. **Missing plane offset on the OURS buffer.** The first `cmp.py` indexed the ORACLE |
| 134 | - which reported the 4:2:0 cells as "ours=16 ref=8" — a name-parsing artefact, since | 134 | + buffer as `fi * fsz + plane_base + i * bps` but read the OURS buffer as |
| 135 | - `ffprobe -count_frames` says 16 and the ref file is 16 frames of 230400 B. Both are | 135 | + `i * bps` — per-plane-zero — so every plane after Y was compared against the wrong |
| 136 | - fixed: `bps` is an argument, and geometry comes from the oracle's own `ffprobe`. | 136 | + region. It reported **1362686 / 1362769** wrong chroma samples on a cell that is in |
| 137 | + fact byte-exact, with a first divergence of U(0,0) that was obviously absurd. **Fix:** | ||
| 138 | + derive ONE `base` per plane and add it to BOTH buffers' indices | ||
| 139 | + (`a[base + i*bps] != b[fbase + base + i*bps]`); never let the two sides index | ||
| 140 | + differently. **Tell:** an implausible magnitude, and a first divergence at sample | ||
| 141 | + (0,0) of a non-luma plane. Note the same class in the other direction — a plane | ||
| 142 | + offset applied to one side and not the other still moves the count in the right | ||
| 143 | + direction, so a plausible-looking number is not evidence the instrument is right. | ||
| 144 | +2. **Geometry parsed from the cell's FILE NAME.** The sweep driver read | ||
| 145 | + `s444_320x240` as `320x320` (the name carries the height after an `x`, so a naive | ||
| 146 | + split yields width twice) and reported the 4:2:0 cells as `ours=16 ref=8`, which | ||
| 147 | + reads like a decoder dropping half its frames. It is a name-parsing artefact: | ||
| 148 | + `ffprobe -count_frames` says 16, and the ref file is 16 frames of 230400 B. **Fix:** | ||
| 149 | + take `width`, `height` and `pix_fmt` from `ffprobe` on the cell itself | ||
| 150 | + (`-select_streams v:0 -show_entries stream=width,height,pix_fmt -of csv=p=0`), and | ||
| 151 | + derive chroma extents as `ceil(w / 2**ss_x) x ceil(h / 2**ss_y)`. **Tell:** a frame | ||
| 152 | + count that disagrees with `-count_frames`; and a hard error naming both numbers beats | ||
| 153 | + a tolerated difference. | ||
| 154 | +3. **`bps` hardcoded to 2.** With `bps` fixed at 2, every 8-bit cell's frame size was | ||
| 155 | + computed at double the truth, so the oracle length stopped being a multiple of the | ||
| 156 | + frame size ("ref len 3717120 not a multiple of frame size 614400") — an error that | ||
| 157 | + reads like a truncated oracle rather than a constant. **Fix:** `bps` is an argument | ||
| 158 | + derived from the cell's own `pix_fmt` (1 byte for `yuv* p`, 2 for `*10le`/`*12le`); | ||
| 159 | + never infer it from the cell's name or from a "10b" suffix. **Tell:** the | ||
| 160 | + not-a-multiple hard error, and the fact that it fired ONLY on the 8-bit cells. | ||
| 161 | + | ||
| 162 | +The general lesson, which is why the controls are ordered before the verdicts: each of | ||
| 163 | +these three is a comparator that reports a number rather than refusing to. A comparator | ||
| 164 | +that hard-errors on a geometry it cannot account for would have caught all three at the | ||
| 165 | +first cell instead of after a sweep. | ||
| 137 | 166 | ||
| 138 | ## 4. The gate, and proof that it bites (red-before by mutation, on the current tree) | 167 | ## 4. The gate, and proof that it bites (red-before by mutation, on the current tree) |
| 139 | 168 | ||
| @@ -237,19 +266,30 @@ horizontal arm of the same 32-capped walk in `decode_block_rect64`, on 640x480 1 | |||
| 237 | 266 | ||
| 238 | ## 6. Correction to the census of record, stated plainly | 267 | ## 6. Correction to the census of record, stated plainly |
| 239 | 268 | ||
| 240 | -`lanes/av1422census2.report.md` needs three edits, and this lane does not make them | 269 | +`lanes/av1422census2.report.md` is annotated in this lane, additively — every original |
| 241 | -because that report is another lane's artifact and its owner may still be amending it: | 270 | +sentence and table row left standing, each correction appended as a bracketed |
| 242 | - | 271 | +`[CORRECTED 2026-09-30 by lane-av1422444b: ...]` note naming the tree, the fix and the |
| 243 | -1. §3.2's table row `s444_352x242_10b | 0 | 17/17 | 4:4:4, chroma only` — the cell is | 272 | +numbers, so the record still shows what was believed on which tree. Four sites: |
| 244 | - byte-exact at `main`; the row is superseded by `f3afa5b7`. | 273 | + |
| 245 | -2. §3.4's "4:4:4 controls: 21 of 22 byte-exact, the single exception `s444_352x242_10b` | 274 | +1. **§3.2's still-diverging table**, after the `s444_352x242_10b | 0 | 17/17` row — that |
| 246 | - (0/1166/1413, identical counts on both trees)" — that "identical on both trees" was | 275 | + row is superseded; the cell is byte-exact at main, fixed by `f3afa5b7` (an ancestor of |
| 247 | - true only of the two trees the census had; a third tree closes it. | 276 | + main; `ed7c99bc` was 36 commits behind `affe70dc`). Carries the 0/0/0 measurements on |
| 248 | -3. §7's "a lift would NOT fix class D: `s444_352x242_10b` is a 4:4:4 defect" — still | 277 | + both bases and the mutation red-proof. |
| 249 | - true as a statement about the 4:2:2 lift, but class D is now empty, so it no longer | 278 | +2. **§3.4's "4:4:4 controls: 21 of 22, single exception `s444_352x242_10b` (identical |
| 250 | - constrains the lift. | 279 | + counts on both trees)"** — that "identical on both trees" was true only of the census's |
| 251 | - | 280 | + own two trees; at main all 22 of 22 are byte-exact, and the control this paragraph |
| 252 | -The census's own numbers were not wrong; they were bound to `ed7c99bc`, and it said so. | 281 | + carried now holds twice over (the §3.1 delta is 4:2:2-specific AND the 4:4:4 palette |
| 282 | + fix left 4:2:0 bit-identical). | ||
| 283 | +3. **§7.1's class D row** in the failure-class table — class D is now EMPTY, with the | ||
| 284 | + 4:4:4-specific mechanism and the note that the sensitive axis is chroma UNIT COUNT, | ||
| 285 | + not frame width or height, so the cell's "geometry-sensitive" framing was misleading. | ||
| 286 | + The note is placed AFTER the table so the table is not split. | ||
| 287 | +4. **§7.2's "A lift would not fix class D"** — the constraint is GONE: no 4:4:4 exception | ||
| 288 | + remains to bound a lift, and every cell outside 4:2:2 is byte-exact. The two 4:2:2 | ||
| 289 | + bullets in that section are explicitly untouched by this correction. | ||
| 290 | + | ||
| 291 | +The census's own numbers were not wrong; they were bound to `ed7c99bc`, and the census | ||
| 292 | +said so itself. Nothing in it was rewritten. | ||
| 253 | 293 | ||
| 254 | ## 7. What is NOT measured here | 294 | ## 7. What is NOT measured here |
| 255 | 295 | ||
lanes/av1422census2.report.mdmodified+56 -0
| @@ -199,6 +199,23 @@ cells by their **first-divergence decode frame**: | |||
| 199 | | `s422_352x242_10b` | 0 | 17/17 | chroma only | | 199 | | `s422_352x242_10b` | 0 | 17/17 | chroma only | |
| 200 | | `s444_352x242_10b` | 0 | 17/17 | 4:4:4, chroma only | | 200 | | `s444_352x242_10b` | 0 | 17/17 | 4:4:4, chroma only | |
| 201 | | `s422_384x240` | **1** | 11/17 | chroma only | | 201 | | `s422_384x240` | **1** | 11/17 | chroma only | |
| 202 | +[CORRECTED 2026-09-30 by lane-av1422444b: the `s444_352x242_10b` row above is | ||
| 203 | +SUPERSEDED and this cell is NOT among the still-diverging cells at current main. The | ||
| 204 | +row is a true reading of `ed7c99bc`, which was 36 commits behind `affe70dc` when this | ||
| 205 | +correction was made; the fix is `f3afa5b7` ("window the 32-capped chroma palette | ||
| 206 | +buffer per unit"), an ancestor of main, and it is 4:4:4-SPECIFIC — `decode_block_rect64` | ||
| 207 | +caps chroma units at 32, so at `ss=00` a 64-axis luma strip's chroma is TILED and each | ||
| 208 | +tiled unit had been handed the WHOLE block's palette prediction buffer, which | ||
| 209 | +`PlaneBuf::reconstruct` reads as its first `side*side` entries. Measured at `affe70dc`: | ||
| 210 | +0/0/0 vs ffmpeg 8.1.3 (`-pix_fmt yuv444p10le`) on all 16 shown frames AND 0/0/0 vs | ||
| 211 | +instrumented aomdec on all 17 decode-order frames (16 shown + 1 hidden altref), with no | ||
| 212 | +first divergence and an empty wrong-sample bbox. The pinned gate | ||
| 213 | +`a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit` | ||
| 214 | +(`crates/ec-av1/src/stream.rs:51024`) was proven to bite by mutation on the current | ||
| 215 | +tree: with `palette_window` reverted in both tiled arms it fails at decode frame 0 | ||
| 216 | +byte 328192 (ours 209 vs 216), 0/1112/1362 through the ffmpeg comparator. Original | ||
| 217 | +figures left standing above as the record of what was believed on `ed7c99bc`. Full | ||
| 218 | +report: `lanes/av1422444b.report.md`.] | ||
| 202 | 219 | ||
| 203 | `S_odd326x242_10b` and `s422_352x250_10b` were 10-bit cells that closed; `s422_352x242_10b` | 220 | `S_odd326x242_10b` and `s422_352x250_10b` were 10-bit cells that closed; `s422_352x242_10b` |
| 204 | and `s422_416x242_10b` are 10-bit cells that did not. So **bit depth does not separate | 221 | and `s422_416x242_10b` are 10-bit cells that did not. So **bit depth does not separate |
| @@ -284,6 +301,19 @@ trees. | |||
| 284 | 301 | ||
| 285 | That the supported formats are bit-identical across the fix is the load-bearing control: | 302 | That the supported formats are bit-identical across the fix is the load-bearing control: |
| 286 | the delta in §3.1 is 4:2:2-specific. | 303 | the delta in §3.1 is 4:2:2-specific. |
| 304 | +[CORRECTED 2026-09-30 by lane-av1422444b: the "4:4:4 controls: 21 of 22, with the | ||
| 305 | +single exception `s444_352x242_10b` (0/1166/1413 — identical counts on both trees)" | ||
| 306 | +sentence above is true only of the TWO trees this census had (`cc9f2668` and | ||
| 307 | +`ed7c99bc`). At current main `affe70dc` — 36 commits past `ed7c99bc` — that exception | ||
| 308 | +is GONE: `f3afa5b7` fixed it, so all 22 of 22 4:4:4 cells are byte-exact and the | ||
| 309 | +"identical counts on both trees" reading was a property of the census's own tree pair, | ||
| 310 | +not of the format. Measured at main: `s444_352x242_10b` is 0/0/0 vs ffmpeg 8.1.3 on all | ||
| 311 | +16 shown frames and 0/0/0 vs instrumented aomdec on all 17 decode-order frames. The | ||
| 312 | +control this paragraph was carrying still holds, and now holds twice over: the §3.1 | ||
| 313 | +delta is 4:2:2-specific, AND the 4:4:4 palette fix left 4:2:0 bit-identical (69 of 69 | ||
| 314 | +committed 4:2:0 fixtures and 18 of 18 fresh 4:2:0 sweep cells byte-exact at main, zero | ||
| 315 | +skips) — 4:2:0 is structurally immune, since `nw * nh == 1` on every 4:2:0 block so the | ||
| 316 | +32-cap never tiles. Original sentence left standing above.] | ||
| 287 | 317 | ||
| 288 | --- | 318 | --- |
| 289 | 319 | ||
| @@ -420,6 +450,21 @@ and shipped pixels. | |||
| 420 | | **D — not 4:2:2: 10-bit 4:4:4 chroma** | 1: `s444_352x242_10b` | `--cpu-used 0`, 352x242 10-bit 4:4:4 | 2579 samples | | 450 | | **D — not 4:2:2: 10-bit 4:4:4 chroma** | 1: `s444_352x242_10b` | `--cpu-used 0`, 352x242 10-bit 4:4:4 | 2579 samples | |
| 421 | | **E — NEW, found here: luma desync at `--cpu-used 2`** | 1: `rc2_s422_320x242` | **`--cpu-used 2`**, 320x242 8-bit | **890107 samples** | | 451 | | **E — NEW, found here: luma desync at `--cpu-used 2`** | 1: `rc2_s422_320x242` | **`--cpu-used 2`**, 320x242 8-bit | **890107 samples** | |
| 422 | 452 | ||
| 453 | +[CORRECTED 2026-09-30 by lane-av1422444b: class D is now EMPTY. `f3afa5b7` fixed | ||
| 454 | +`s444_352x242_10b` and is an ancestor of main; `ed7c99bc`, the tree this table was | ||
| 455 | +measured on, was 36 commits behind `affe70dc` at the time of this correction. Measured | ||
| 456 | +at main: 0/0/0 vs ffmpeg 8.1.3 on all 16 shown frames and 0/0/0 vs instrumented aomdec | ||
| 457 | +on all 17 decode-order frames, and the whole 4:4:4 surface is clean — 18/18 fresh 4:4:4 | ||
| 458 | +sweep cells, 18/18 fresh 4:2:0 controls, 36/36 committed 4:4:4 fixtures, 69/69 | ||
| 459 | +committed 4:2:0 fixtures, zero skips. The defect was 4:4:4-SPECIFIC and had nothing to | ||
| 460 | +do with the 4:2:2 family: `decode_block_rect64` caps chroma units at 32, so at `ss=00` a | ||
| 461 | +64-axis luma strip's chroma is TILED and each tiled unit was handed the whole block's | ||
| 462 | +palette prediction buffer. The sensitive axis is CHROMA UNIT COUNT, not frame width or | ||
| 463 | +height, which is why the sibling geometries at the same depth were already exact and | ||
| 464 | +why this cell's "geometry-sensitive" framing was misleading. The class D row above is | ||
| 465 | +left standing as the record of what was believed on `ed7c99bc`. Full report: | ||
| 466 | +`lanes/av1422444b.report.md`.] | ||
| 467 | + | ||
| 423 | **Worst current 4:2:2 divergence:** `s422_416x250_10b`, 230275 wrong samples. Worst | 468 | **Worst current 4:2:2 divergence:** `s422_416x250_10b`, 230275 wrong samples. Worst |
| 424 | overall including the new class E: `rc2_s422_320x242`, 890107 wrong samples including | 469 | overall including the new class E: `rc2_s422_320x242`, 890107 wrong samples including |
| 425 | 436945 luma. Smallest current 4:2:2: `s422_384x240`, 4063. | 470 | 436945 luma. Smallest current 4:2:2: `s422_384x240`, 4063. |
| @@ -436,6 +481,17 @@ overall including the new class E: `rc2_s422_320x242`, 890107 wrong samples incl | |||
| 436 | and class E if a `--cpu-used 2` stream ever arrives) fail in the **luma plane**. | 481 | and class E if a `--cpu-used 2` stream ever arrives) fail in the **luma plane**. |
| 437 | * A lift would **not** fix class D: `s444_352x242_10b` is a 4:4:4 defect, already | 482 | * A lift would **not** fix class D: `s444_352x242_10b` is a 4:4:4 defect, already |
| 438 | reachable, already diverging with the refusal standing, unchanged by the fix. | 483 | reachable, already diverging with the refusal standing, unchanged by the fix. |
| 484 | + [CORRECTED 2026-09-30 by lane-av1422444b: this constraint is GONE. Class D is empty | ||
| 485 | + at main — `f3afa5b7` fixed `s444_352x242_10b` and is an ancestor of main, while | ||
| 486 | + `ed7c99bc` (the tree these numbers were measured on) was 36 commits behind `affe70dc` | ||
| 487 | + at the time of this correction. Re-measured at main: 0/0/0 vs ffmpeg 8.1.3 on all 16 | ||
| 488 | + shown frames and 0/0/0 vs instrumented aomdec on all 17 decode-order frames, and the | ||
| 489 | + full 4:4:4 surface is clean (18/18 fresh 4:4:4 sweep cells, 36/36 committed 4:4:4 | ||
| 490 | + fixtures, zero skips). So a lift is no longer constrained by a 4:4:4 exception: every | ||
| 491 | + cell outside 4:2:2 is byte-exact, and 4:2:0 is structurally immune to that fix | ||
| 492 | + (`nw * nh == 1` on every 4:2:0 block, so the 32-cap never tiles) — 69/69 committed | ||
| 493 | + 4:2:0 fixtures and 18/18 fresh 4:2:0 sweep cells byte-exact at main. The two 4:2:2 | ||
| 494 | + bullets above are unaffected by this correction. Sentence left standing above.] | ||
| 439 | * A lift would **not** reach class E, which is invisible at every recipe the census swept. | 495 | * A lift would **not** reach class E, which is invisible at every recipe the census swept. |
| 440 | * The lift's blast radius is not bounded by this census: §8. | 496 | * The lift's blast radius is not bounded by this census: §8. |
| 441 | 497 | ||