# lane-av1-422kf2 — the remaining frame-0 class at U (108, 72) / V (48, 0): # NAMED and FIXED — the sub-8x8 4:2:2 chroma unit decoded at the wrong # position, wrong reach table and half-visible neighbour mode (three related # one-index defects, all in [`sub8_leaf_chroma422`]); frame-0 PRE-FILTER # reconstruction is now pixel-exact (Y, U and V) against the oracle's # `EC_AV1_PREFILT_DUMP` ## Outcome 1. REMEASURED first (pinned fixture, single-frame cut `/tmp/t422f0.obu` sha256 `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af` — first OBU prefix of the pinned 22-frame t422.obu; the frame is **256x144**, chroma planes 128x144; local `EC_AV1_ALLOW_422_PROBE` bypass applied, reverted byte-identical after): at the parent's baseline the pre-filter chroma diffs were U 533 / V 869, first U (108, 72) — confirming the parent's sample. 2. NAMED the class at U (108, 72): the 8x8 luma block at luma (216, 72) splits into four 4x4 leaves; 4:2:2's `is_chroma_reference` (`av1_common_int.h:1454`) puts the chroma syntax on the ODD-column leaves (`(mi_col & 1) || !(bw & 1) || !ss_x` — the port already read uv_mode there, entropy in sync, luma byte-exact), but libaom ANCHORS the leaf's TX_4X4 chroma unit at the floored chroma cell (`(mi_col & !1) * MI >> ss_x` = chroma px 108), not at the odd leaf's own chroma x (110). Ours reconstructed at 110: px 108..109 were never written (zeros at exactly the parent's sample), px 112..113 got the unit's right columns. Oracle ground truth: the mi(18,55) unit's reconstruction is a pure V-copy of the row above AT 108..111. Fix 1: anchor `cpx` at `(lmi.1 & !1) * MI >> ss_x`. U/V prefilt 533/869 → 477/813, first diff moved to (96, 104). 3. The (96, 104) cluster named the next layer: an 8x4 strip's chroma unit (mi(27,44), uv D45) read undecoded pixels to its upper right. The oracle's own `EC_PRED` trace prints `n_tr=0` there: libaom answers `has_top_right`/`has_bottom_left` from the LEAF's OWN rect shape (`has_tr_8x4`/`has_tr_4x8` at the leaf's mi — bit 6 of byte 22 is 0), while the port used the standalone square-4x4 `Reach::of(4, ..)` lookup (same bit = 1). Fix 2: `sub8_leaf_chroma422` takes the leaf's shape and uses `Reach::of(4, ..)` only for a BLOCK_4X4 leaf, `Reach::of_rect(8, 4)` / `(4, 8)` for a rect pair's strip. Prefilt chroma 477/813 → 8/15. 4. The last 8/15 samples (chroma (100..103, 120..123), the H-mode unit at mi(30,50)) named the third defect: the unit's left neighbour mi(30,48) is an 8x4 strip with uv SMOOTH_V, but its `record_uv_mode_mi(…, 1, 1, …)` stamped only ONE of the strip's two mi columns, so mi(30,50)'s `chroma_left_mbmi` lookup hit an empty cell, lost the smooth neighbour and skipped libaom's always-on strength-1 intra edge filter (`get_intra_edge_filter_type` 1 vs our 0; prediction sums 6139/6307 vs 6142/6312). Fix 3: record the uv mode over the leaf's whole mi footprint (`(w_mi, h_mi)` from the leaf shape). All three fixes are inside [`sub8_leaf_chroma422`] and its five call sites. 5. MEASURED after the three fixes: **PREFILT Y EXACT, U EXACT, V EXACT** (byte-identical frame-0 pre-loop-filter reconstruction against the oracle dump). FINAL dumps: U 1774 → 1236, V 2165 → 1263 — every remaining final diff is introduced by the LOOP FILTER (pre-filter row 0 is exact; the filter propagates damage to the top rows). Non-vacuity: `chroma422_square` = 24, `chroma422_rect` = 96, `chroma422_sub8` = 26 on this frame — all three touched arms provably ran. 6. REMAINING class for the next lane: the 4:2:2 LOOP FILTER. With pre-filter recon byte-exact, the 1236/1263 final-diff samples are deblock/CDEF/LR chroma work (the parent's V (48, 0) is this class's first final sample — pre-filter V at row 0 is exact). Frame 0 is still not final-pixel-exact, so the "delete the header refusal" condition stays unmet. ## Decision - The palette set in 93c4dff5 is untouched (chroma422_square still 24; the chroma_tiled arm's `set_palette_pred` intact). - `read_coeffs_rect` untouched. The frame-9 rect scratch panic is untouched. The 4:2:0 group-tail SKIP arm untouched. Header refusal STAYS unconditional in `stream.rs` — verified firing by name on this very fixture after the bypass revert, plus the named gate test. - The bypass was local-only (`EC_AV1_ALLOW_422_PROBE` on the env, one `&& std::env::var(…).is_err()` clause), reverted byte-identical before the commit; `git diff` after the revert carries ONLY the decode.rs fix. ## Verification - `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422kf2`): 0 warnings, 0 errors. - 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`: `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_ whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed. - `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name`: 1 passed, 0 failed. - Stage dumps compared sample-for-sample (cropped `PREFILT_WIDE_DUMP` vs the oracle `EC_AV1_PREFILT_DUMP`, same 73728-byte layout, 256x144 / 128x144): post-fix Y/U/V all exact; symbol-level pairing via the oracle's `EC_ISTEP`/`EC_PALSYN`/`EC_PRED`/`EC_PREDOUT8` rungs against our `EC_TRACE_MODE_STEP`/`EC_PRED` traces (rng and values matched at every step of every unit named above). ## State - Commit on lane-av1-422kf2 (no push): the three sub8-422 chroma fixes + this report. - Next stop named for the owning lane: the 4:2:2 loop filter — deblock/CDEF chroma extents against `$HOME/.cache/aom-oracle/build` aomdec dumps (`EC_AV1_POSTDEBLOCK_DUMP` rungs exist on both sides); the decode-side frame-0 recon it consumes is now proven exact.