lane-av1-444: gate ss0/0 sub8 group uv stamp to 4:2:0 (intra-piece uv_mode survived); f19/f20/f22 + shown 0..48 byte-exact; report continuation 7 (new wall: f52 mi(52,16) chroma all_zero ctx 0 vs 8)
Browse files at this commit7d111254b1f22da256245eb5ec3802a4333a44bfParent: 37689702 changed files +86 -13
- crates/ec-av1/src/decode.rs +25 -12
- lanes/av1444.report.md +61 -1
crates/ec-av1/src/decode.rsmodified+25 -12
| @@ -32512,14 +32512,22 @@ fn decode_inter_sub8_split4( | ||
| 32512 | 32512 | neighbours.fill_lf_grid_rect(lmi, 1, 1, B4 as u8, B4 as u8, ref_frame.max(LAST_FRAME), fctx); |
| 32513 | 32513 | last_skip = skip; |
| 32514 | 32514 | } |
| 32515 | - // lane-sub8intra: when the chroma-reference sub-block was INTRA it coded | |
| 32515 | + // lane-av1-444: when the chroma-reference sub-block was INTRA it coded | |
| 32516 | 32516 | // and reconstructed the group's one chroma unit itself. |
| 32517 | - // lane-av1-444: at ss 0/0 the group unit does not exist -- every piece | |
| 32518 | - // coded its own U/V inside the loop above. The mode-level bookkeeping | |
| 32519 | - // below still runs for both subsamplings: an inter 4x4 piece's | |
| 32520 | - // `mbmi->uv_mode` is the DC_PRED default and no piece can be a palette | |
| 32521 | - // block, exactly as the 4:2:0 path already published. | |
| 32522 | - neighbours.record_uv_mode_mi(gr, gc, 2, 2, DC_PRED); | |
| 32517 | + // lane-av1-444 (f19): at ss 0/0 the group unit does not exist -- every | |
| 32518 | + // piece coded its own U/V inside the loop above, and every piece also | |
| 32519 | + // wrote its own `uv_mode` neighbour state: an inter piece through | |
| 32520 | + // `record_inter_rect_mi`'s is_inter DC stamp (libaom leaves `uv_mode` | |
| 32521 | + // unset on an inter mbmi, `is_smooth` reads 0), an INTRA piece through | |
| 32522 | + // [`decode_intra_sub8_leaf`]'s chroma_444 arm (libaom's per-sub-block | |
| 32523 | + // `mbmi->uv_mode` is real there -- frame 19 of the fixture reads | |
| 32524 | + // uv 12/11/9/12 on the four pieces of the (42,54) group, and the next | |
| 32525 | + // block's `get_intra_edge_filter_type` must see that SMOOTH_H left | |
| 32526 | + // neighbour, not the DC_PRED this stamp used to paint over it). So the | |
| 32527 | + // group-level stamp runs only where the 4:2:0 group unit is real. | |
| 32528 | + if !chroma_444 { | |
| 32529 | + neighbours.record_uv_mode_mi(gr, gc, 2, 2, DC_PRED); | |
| 32530 | + } | |
| 32523 | 32531 | // lane-t900 r23 (class [[new-map-ignores-tile-edge]]: a neighbour map |
| 32524 | 32532 | // needs EVERY writer): a sub-8x8 group published no palette state, so |
| 32525 | 32533 | // once an 8x8 leaf of the same row can BE a palette block, the group |
| @@ -33785,11 +33793,16 @@ fn decode_inter_sub8_rect2( | ||
| 33785 | 33793 | last_skip = skip; |
| 33786 | 33794 | } |
| 33787 | 33795 | // lane-av1-444: at ss 0/0 the group unit does not exist -- each piece |
| 33788 | - // coded its own U/V inside the loop above. The mode-level bookkeeping | |
| 33789 | - // below still runs for both subsamplings: an inter piece's | |
| 33790 | - // `mbmi->uv_mode` is the DC_PRED default and no piece can be a palette | |
| 33791 | - // block, exactly as the 4:2:0 path already published. | |
| 33792 | - neighbours.record_uv_mode_mi(gr, gc, 2, 2, DC_PRED); | |
| 33796 | + // coded its own U/V inside the loop above, and each piece wrote its own | |
| 33797 | + // uv neighbour state (inter pieces through `record_inter_rect_mi`'s | |
| 33798 | + // is_inter DC stamp, intra pieces through their own per-piece record). | |
| 33799 | + // The group-level DC stamp below stays 4:2:0-only: at ss 0/0 it painted | |
| 33800 | + // over an intra piece's real `uv_mode` and the next block's | |
| 33801 | + // `get_intra_edge_filter_type` lost the smooth neighbour (same class as | |
| 33802 | + // [`decode_inter_sub8_split4`]'s tail, frame 19 of the fixture). | |
| 33803 | + if !chroma_444 { | |
| 33804 | + neighbours.record_uv_mode_mi(gr, gc, 2, 2, DC_PRED); | |
| 33805 | + } | |
| 33793 | 33806 | // lane-t900 r23 (class [[new-map-ignores-tile-edge]]: a neighbour map |
| 33794 | 33807 | // needs EVERY writer): a sub-8x8 group published no palette state, so |
| 33795 | 33808 | // once an 8x8 leaf of the same row can BE a palette block, the group |
lanes/av1444.report.mdmodified+61 -1
| @@ -176,7 +176,67 @@ Full suite NOT run this round (budget wall). | ||
| 176 | 176 | 4. Full suite `--test-threads=1` (NOT run this round), 0-warning |
| 177 | 177 | parity (build IS warning-clean), update this report. |
| 178 | 178 | |
| 179 | -## Continuation 6 (2026-09-23, Tuna — budget-wall WIP) | |
| 179 | +## Continuation 7 (2026-09-23, Vefa — budget-wall WIP) | |
| 180 | + | |
| 181 | +Round-6's wall is RESOLVED; the fixture moved from "shown 18 seed" to a new, | |
| 182 | +exactly-localized wall at decode idx 52 (shown 49). | |
| 183 | + | |
| 184 | +1. **Root cause (leaf B was a victim, class stale-neighbour-mode):** leaf | |
| 185 | + (42,58)'s chroma DC base 145-vs-146 traced to its LEFT edge, not to the DC | |
| 186 | + gather. Our `dc()` already carries libaom's `(sum + count/2) / count` bias; | |
| 187 | + the sums differed because leaf A (42,56) output was wrong: its left | |
| 188 | + neighbour (42,55) coded `uv=SMOOTH_H` (11) on a 4x4 intra-in-inter piece, | |
| 189 | + but the inter sub8 group tails (`decode_inter_sub8_split4` / | |
| 190 | + `decode_inter_sub8_rect2`) stamped `DC_PRED` over the whole 2x2-mi group's | |
| 191 | + uv-mode neighbour cells AFTER the pieces had recorded their own modes | |
| 192 | + (trace: pieces 12/11/9/12 at (42,54..55) wiped to 0). libaom keeps every | |
| 193 | + sub-block's own `mbmi->uv_mode`. Consequence chain: aom | |
| 194 | + `get_intra_edge_filter_type`=1 for leaf A vs our 0 → libaom's type-1 | |
| 195 | + upsample cap (`blk_wh <= 8`) leaves the edge alone while our type-0 cap | |
| 196 | + (`blk_wh <= 16`) UPSAMPLES it for V_PRED p_angle=87 (dx=3): base row0 | |
| 197 | + [174,172,**179**,189,185,**183**,195,**182**] vs aom | |
| 198 | + [174,172,**178**,189,185,**182**,195,**183**] — every later sample | |
| 199 | + reproduced numerically. Leaf B's left column then differed at rows | |
| 200 | + 168/170, and the (correct) biased DC rounded 145 vs 146. | |
| 201 | +2. **Fix:** gate both group-tail uv stamps on `!chroma_444`. At ss 0/0 every | |
| 202 | + piece already writes its own state (inter pieces through | |
| 203 | + `record_inter_rect_mi`'s is_inter DC stamp, intra pieces through | |
| 204 | + `decode_intra_sub8_leaf`'s chroma_444 arm); the group stamp is 4:2:0-only. | |
| 205 | +3. **Verified:** w24 cut — ALL 26 decode-order frames prefilt byte-exact | |
| 206 | + (was f19=122 U/V diffs, f20, f22). Full fixture — decode 0..51 (shown | |
| 207 | + 0..48) byte-exact vs ffmpeg yuv444p; round-6's f1 single V sample is gone. | |
| 208 | +4. **New wall (localized, next round):** decode idx 52 first diverges at | |
| 209 | + Y(128,192) (ours 210, aom 209); prefilt 21735 diffs; the symbol ladder | |
| 210 | + desyncs INSIDE frame 52. Facts: aom f52 walk at mi(52,16) is | |
| 211 | + BLOCK_16X16 PARTITION_NONE (`EC_PART bsize=6 value=0`); luma ONE | |
| 212 | + TX_16X16 (matches ours); then chroma U TX_16X16 reads all_zero with | |
| 213 | + `txb_skip_ctx=8` = base 1 + offset 7 (`get_txb_ctx_general`: chroma | |
| 214 | + offset 10 iff plane_bsize bigger than the transform, else 7; | |
| 215 | + plane_bsize==BLOCK_16X16==tx → 7). OUR same-position read: all_zero | |
| 216 | + **ctx=0** — `decode_block`'s cn==1 chroma arm passes offset `None` | |
| 217 | + (only cn>1 passes `Some(3)`), and our above/left entropy flags read | |
| 218 | + 0 where aom's combine gives 1. Pinned with the rebuilt oracle's new | |
| 219 | + `EC_DBGCTX` print (cellsA/cellsL per unit): aom's U TX_16X16 cellsA | |
| 220 | + = 0,0,0,0 but cellsL = **21,21,21,21** — the left cells at mi rows | |
| 221 | + 52..55 were written by the 64x64 mi(48,0) block's U TX_32X32 (48,8) | |
| 222 | + unit with cul 21, while OUR left cells for the same rows/plane read 0. | |
| 223 | + So the desync is ONE symbol (the U all_zero) and the suspect is our | |
| 224 | + per-unit chroma context WRITE for the 64x64 inter path | |
| 225 | + (`record_mi_chroma` span/cul derivation) or its cell mapping — our | |
| 226 | + (48,8) U grid has its coefficients in the unit's TOP half (grid rows | |
| 227 | + 8..15), so a correct bottom-cell write would be 0 and the 21 must | |
| 228 | + come from aom's cul derivation over the whole 32x32 unit (cul is a | |
| 229 | + running count, not per-cell) — verify `read_coeffs`' cul accounting | |
| 230 | + against libaom's `read_coeffs_txb` loop. | |
| 231 | +5. **Infra note:** the oracle's `EC_AV1_POSTCDEF_DUMP` index is off by one | |
| 232 | + (aom pc.fK = decode K+1); under that alignment CDEF is byte-exact frames | |
| 233 | + 44..51, and post-deblock is byte-exact through idx 51 — the wall is NOT | |
| 234 | + loop-filter related. | |
| 235 | +6. NOT done this round (budget): regression arms (420/444 square, forced-64, | |
| 236 | + mono, 10-bit, qmatrix, cdf) and the full suite. Committed at the wall; | |
| 237 | + tree clean; no push. | |
| 238 | + | |
| 239 | + | |
| 180 | 240 | |
| 181 | 241 | Round-5's frame-18 target was mis-aimed: the visible 2-pixel U diff is |
| 182 | 242 | INHERITED. Per-frame prefilt diff (EC_AV1_PREFILT_DUMP, crop-aware): |