# lane av1lr422: 4:2:2 + loop restoration refusal (Defect 3 of av1chroma) Base: main `2ccef013`. Branch `lane/av1lr422`. ## Verdict The refusal was NOT a wrong check. `chroma_plane_block_codable` and the `PLANE_BLOCK_INVALID_422` table match libaom `ss_size_lookup`, and the refusal is correct for conformant streams. The stream had already desynced upstream. Root cause: the 32x8 / 8x32 rect4 general arm in `crates/ec-av1/src/decode/rect4.rs` (`decode_block_rect4`) gathered the chroma dc-sign and skip votes per mi (`around_mi_rect`, which double-counts for 4:2:2). For 4:2:2 the above votes must be sampled once per 4-px chroma column (`Neighbours::around_mi_422_chroma`). After the fix, the chroma planes of those blocks use `around_mi_422_chroma` when ss_x=1, ss_y=0. Luma is unchanged. ## Change - `crates/ec-av1/src/decode/rect4.rs`: `chroma_around` selection in the general arm; skip_ctx and dc_sign_ctx for chroma read from it. - `crates/ec-av1/fixtures/s422_lr_10bit_200x120.obu`: the reproducer (10-bit 4:2:2, LR on, 200x120, 8 frames, 129409 bytes, sha256 `5d6bc195934709390191c9ea8af167d385552c5b1330e8abd38f76a4416ba751`, fnv1a64 `0xc5d5489355fdc2df`). Generated with the lane's libaom recipe. - `crates/ec-av1/src/stream/tests/t01.rs`: `a_422_10bit_lr_stream_decodes_pixel_exact`, pinned, asserts pixel-exact against ffmpeg libdav1d rawvideo. ## Evidence - The 10-bit 200x120 LR refuser decodes byte-exact against dav1d (8/8 frames). - Regenerated 12-bit LR clip (`r_lr_yuv422p12le.obu`) decodes byte-exact. - Sweep (10-bit and 12-bit 4:2:2, LR on, various sizes/seeds): no refusals. Remaining DIFFs are chroma-only, see Open below. - Method: patched libaom (`~/.cache/aom-trace` on host b) with read_partition, TXB, EOBV, CUL, COEF and DCS prints, compared with ours by difflib alignment. The first divergent symbol localised the dc-sign vote bug. ## Verify - `cargo fmt` check: rect4.rs clean. t01.rs has pre-existing rustfmt drift (not touched by this lane). - Gates on server (`scripts/remote-run.sh av1lr422 --host auto -- ...`): `cargo test --release -p ec-av1 --no-fail-fast` and `cargo clippy -p ec-av1 --all-targets -- -D warnings`. Result: GATE_PENDING (see the final line of this report). - AOM 4:2:0 conformance 242/242: GATE_PENDING (part of the test run above). - Largest source file in `crates/ec-av1/src`: under 5000 lines (checked). ## Open 1. 8-bit 4:2:2 with LR on (report D1 family): not tested in this lane. The scratchpad `g_200x128_1` clip is 10-bit, so it does not count. 2. Remaining chroma-only 4:2:2 DIFFs against dav1d: 10-bit 64x64 (all seeds), 10-bit 192x120 seed 2, 10-bit 256x120 seeds 2 and 4, 10-bit 160x96 seed 4, 12-bit 64x64 seeds 1 and 4. Parse correctness for these is not confirmed. A libaom DCS/EOB/BLK comparison was started on the 64x64 case but our trace was too sparse to align. Likely another 4:2:2 chroma context issue. 3. Commit attribution: the lane preamble forbids AI attribution lines, while a later reminder asked for a `Claude-Session:` trailer. This commit follows the lane rule (no trailer). Flagged for the orchestrator.