lane-av1422seed: amend the report with the RESOLVED outcome -- the landed fix is 459e425d, and all three halves had to move
Browse files at this commit8f2738567f987c9edb65144987a6037c1a16ac7bParent: 2a729cd1 changed file +90 -10
- lanes/av1422seed.report.md +90 -10
lanes/av1422seed.report.mdmodified+90 -10
| @@ -4,7 +4,10 @@ | ||
| 4 | 4 | applied verbatim at ss (1,0) — proved by an unwritten-sample census, not inferred — |
| 5 | 5 | and the write-side half of the fix is not sufficient on its own: moving the chroma |
| 6 | 6 | write alone regresses luma, so the entropy-side half of the same arm must move with |
| 7 | -it. This branch therefore lands NO decoder change.** | |
| 7 | +it. The landed fix is `lane/av1422luma` `459e425d` (§3.3): the write, BOTH chroma | |
| 8 | +context gathers, AND the mi-map publication have to move together; with all | |
| 9 | +three, all six cells of this family are byte-exact vs ffmpeg. This branch | |
| 10 | +carries NO decoder change.** | |
| 8 | 11 | |
| 9 | 12 | Tip: `main` = `affe70dc`. Worktree `/home/user/.cache/wt/av1422seed`, branch |
| 10 | 13 | `lane/av1422seed`. `crates/ec-av1/src/decode.rs` and `src/stream.rs` are at |
| @@ -21,8 +24,11 @@ committed and the sequence-header refusal is intact. | ||
| 21 | 24 | and the per-frame counts. |
| 22 | 25 | 3. §4 — the localisation: the exact arm, the exact constants, and a census that |
| 23 | 26 | names the unwritten samples. |
| 24 | -4. §5 — the attempted fix, why it is **not** landed, and what the remaining half is. | |
| 25 | -5. §6 — what is NOT measured (stated, not hidden). | |
| 27 | +4. §3.3 — the RESOLVED outcome: the landed fix `459e425d`, its exact five-edit | |
| 28 | + shape, and the before/after table for all six cells of this family. | |
| 29 | +5. §4 — what this lane attempted and why the write-side half alone was not enough | |
| 30 | + (the two missing halves are now in `459e425d`). | |
| 31 | +6. §7 — what is NOT measured (stated, not hidden). | |
| 26 | 32 | |
| 27 | 33 | --- |
| 28 | 34 | |
| @@ -229,7 +235,80 @@ strip family, same two-row-pair displacement, five geometries. | ||
| 229 | 235 | |
| 230 | 236 | --- |
| 231 | 237 | |
| 232 | -## 4. The attempted fix, and why it is not landed | |
| 238 | +## 3.3 RESOLVED — the landed fix is `lane/av1422luma` commit `459e425d` | |
| 239 | + | |
| 240 | +**Supersedes §4's "not landed" verdict. One owner for this defect: | |
| 241 | +`lanes/av1422luma.report.md`, commit `459e425d`.** Two lanes converged on one | |
| 242 | +function, which is the strongest signal in this report. | |
| 243 | + | |
| 244 | +Measured there, ffmpeg 8.1.3, 16 shown frames per cell: | |
| 245 | + | |
| 246 | +| cell | pre | post | | |
| 247 | +|---|---|---| | |
| 248 | +| `s422_320x246` | 0/7810/5531 | **0/0/0** | | |
| 249 | +| `s422_322x240` | 0/22003/21625 | **0/0/0** | | |
| 250 | +| `s422_322x246` | 0/3437/2222 | **0/0/0** | | |
| 251 | +| `s422_352x242_10b` | 0/4653/3777 | **0/0/0** | | |
| 252 | +| `s422_416x242_10b` | 0/5740/4348 | **0/0/0** | | |
| 253 | +| `s422_416x250_10b` | 99011/61486/60106 | **0/0/0** | | |
| 254 | + | |
| 255 | +25 of 26 swept cells byte-exact; `s422_384x240` unchanged at 0/1780/1871 — a | |
| 256 | +DIFFERENT residual (luma-exact on both sides of the change, first bad frame 1), | |
| 257 | +so it must not be attributed to the 1:4-strip arm. All 4:2:0 and 4:4:4 controls | |
| 258 | +byte-exact before and after. | |
| 259 | + | |
| 260 | +**The landed shape** (`decode.rs`, `decode_rect4_16_intrabc`). One predicate | |
| 261 | +`own422 = ss_x == 1 && ss_y == 0 && horz`, `own_chroma = own444 || own422` | |
| 262 | +(`own444` unchanged), five edits: | |
| 263 | + | |
| 264 | +1. `cw, ch = if own_chroma { (bw >> ss_x(fctx), bh >> ss_y(fctx)) } else { (pw/2, ph/2) }` | |
| 265 | +2. `pair_mi = has_chroma ? (own_chroma ? lmi : horz ? (lmi.0-1, lmi.1) : (lmi.0, lmi.1-1)) : lmi` | |
| 266 | +3. `cpx, cpy = has_chroma ? (own_chroma ? (px >> ss_x(fctx), py >> ss_y(fctx)) : (pair_mi.1*MI/2, pair_mi.0*MI/2)) : (0, 0)` | |
| 267 | +4. **BOTH** chroma gathers (the non-lossless one and the `chroma_stamped_per_unit | |
| 268 | + = false` one; the lossless `read_inter_chroma_lossless` twin takes `pair_mi` / | |
| 269 | + `(cpx, cpy)` as arguments and inherits 1-3 for free): | |
| 270 | + | |
| 271 | + ```rust | |
| 272 | + let (gmi, gw, gh) = if own_chroma { (lmi, bw, bh) } else { (pair_mi, pw, ph) }; | |
| 273 | + let around = if own422 { | |
| 274 | + neighbours.around_mi_422_chroma(gmi, gw, gh) // ss (1,0) only | |
| 275 | + } else { | |
| 276 | + neighbours.around_mi_rect(gmi, gw, gh) // 4:2:0 pair, 4:4:4 own extent | |
| 277 | + }; | |
| 278 | + ``` | |
| 279 | + | |
| 280 | + 4:4:4 deliberately keeps `around_mi_rect`: at `ss_x == 0` a chroma column IS a | |
| 281 | + luma mi column, so the every-second-column sampling would halve its own above | |
| 282 | + span. | |
| 283 | +5. **the publication the NEXT block's context reads** — the half this lane never | |
| 284 | + named: | |
| 285 | + | |
| 286 | + ```rust | |
| 287 | + let (rmi, rw, rh) = if own_chroma { (lmi, bw, bh) } else { (pair_mi, pw, ph) }; | |
| 288 | + neighbours.record_uv_mode_mi(rmi.0, rmi.1, rw / MI, rh / MI, DC_PRED); | |
| 289 | + // and the two left/above skip loops over rh/MI and rw/MI at rmi | |
| 290 | + ``` | |
| 291 | + | |
| 292 | +**`has_chroma` is NOT the missing piece** — §4's open candidate 1 is disproved: | |
| 293 | +the caller's existing predicate already holds for every HORZ strip in the cell | |
| 294 | +(56 of them in frame 0; the U and V units at mi (51, 84) are read, so the oracle | |
| 295 | +reads chroma for an even-row strip too). | |
| 296 | + | |
| 297 | +**Why every half was needed — it is one constant read from three places.** The | |
| 298 | +entropy-side half is `around_mi_rect(pair_mi, pw, ph)`: at 4:2:2 the U/V | |
| 299 | +`txb_skip` read of the intra-BC 16x4 strip at mi (51, 84) took its **LEFT** flag | |
| 300 | +one mi row high (ours ctx 2, oracle ctx 8), so `all_zero` decoded 1 instead of 0 | |
| 301 | +and the frame desynced, luma included. That is exactly why this lane's | |
| 302 | +write-side-only attempt regressed luma 0 -> 5958: the write had moved to the | |
| 303 | +strip's own origin while the gather and the publication stayed on the 4:2:0 pair, | |
| 304 | +so the three halves disagreed about which block the chroma TU belonged to. | |
| 305 | + | |
| 306 | +This lane's branch carries **no decoder change** (`33cb2d0b` is the report plus | |
| 307 | +the comparator scripts); every hunk is Agent07-4's to carry, agreed by IRC message. | |
| 308 | +§4 is kept as the record of what was tried here and why the write-side half alone | |
| 309 | +was insufficient. | |
| 310 | + | |
| 311 | +## 4. The attempted fix, and why it was not sufficient on its own | |
| 233 | 312 | |
| 234 | 313 | The write-side half of the fix, applied and measured (this is the change that is |
| 235 | 314 | **not** in the tree): |
| @@ -311,7 +390,8 @@ Per-frame U counts, `s422_320x246` (display order, 16 frames): | ||
| 311 | 390 | **every** frame, growing with the altref's reference use, which is what a |
| 312 | 391 | frame-0 seed that later frames predict from looks like. |
| 313 | 392 | |
| 314 | -Post-fix: **none** — the change is not landed. | |
| 393 | +Post-fix (`459e425d`, measured by Agent07-4): **0/0/0 on all five**, plus `0/0/0` | |
| 394 | +on `s422_416x250_10b` — see §3.3. | |
| 315 | 395 | |
| 316 | 396 | **4:2:0 and 4:4:4 controls after the change attempt:** unchanged, `0/0/0` on all |
| 317 | 397 | five control cells (§1.1 re-run with the change in the tree: 5/5 BYTE-EXACT). The |
| @@ -335,15 +415,15 @@ Run against `main` instead, the five slice cells read the §2 numbers and | ||
| 335 | 415 | `s422_416x250_10b` reads the census's luma-wrong row. The sweep is here so the |
| 336 | 416 | next lane does not have to re-derive it: **`s422_384x240` is not this defect** |
| 337 | 417 | (its first bad frame is 1, and its region is not the 16-columns-from-the-right |
| 338 | -band), so closing this arm should leave exactly one 4:2:2 cell diverging in the | |
| 339 | -sweep. | |
| 418 | +band), so with `459e425d` landed that is exactly what happens: 25 of 26 swept cells are | |
| 419 | +byte-exact and `s422_384x240` is the one that remains, on its own residual. | |
| 340 | 420 | |
| 341 | 421 | ## 7. What is NOT measured |
| 342 | 422 | |
| 343 | 423 | * **The flip control was not run.** §1.1's controls are the five byte-exact cells, |
| 344 | 424 | not the sample-flip arms. Nothing here should be read as "the comparator was |
| 345 | 425 | proven to bite by a flip". |
| 346 | -* **No permanent gate was added.** The brief asked for a gate in the crate's test | |
| 426 | +* **No permanent gate was added by this lane.** The brief asked for a gate in the crate's test | |
| 347 | 427 | binary naming a cell; with the fix unlanded a gate would have to assert a |
| 348 | 428 | *failure*, and a gate that asserts a known defect is not a gate. The |
| 349 | 429 | `INTRABC_RECT4_OWN_CHROMA422_HITS` counter is the hook such a gate will need; |
| @@ -354,8 +434,8 @@ sweep. | ||
| 354 | 434 | * The 4:2:2 sequence-header refusal is **untouched** — `stream.rs:1803` reads |
| 355 | 435 | `if seq.subsampling_x != seq.subsampling_y` on this branch, verified by |
| 356 | 436 | `git status` clean for that file. |
| 357 | -* `s422_416x250_10b`'s luma desync is Agent07-4's slice; this report only records | |
| 358 | - that it is in the same function. | |
| 437 | +* `s422_416x250_10b`'s luma desync was Agent07-4's slice and is closed by the same | |
| 438 | + commit (§3.3). | |
| 359 | 439 | |
| 360 | 440 | ## 8. Reproducing this lane's numbers |
| 361 | 441 |