# lane-av1-422k — intra-in-inter chroma prediction sized from the plane block; frame 1's INTRA 16x16 passes; refusal stays ## Outcome The frame-1 panic at `decode.rs:3845` (`index out of bounds: the len is 128 but the index is 128`) is fixed by sizing `decode_inter_block`'s INTRA arm's chroma prediction/reconstruction from the 4:2:2 plane block (`side >> ss_x`, `side >> ss_y`) instead of the enclosing square. The panic was NOT the residual-slice class: the len-128 slice was the CfL AC SIGNAL. The 16-frame stream is NOT pixel-exact — the frontier moved to the INTER chroma rect-set table (a clean named refusal, different machinery) — so the 4:2:2 header refusal STAYS (re-verified firing by default; the local `EC_AV1_ALLOW_422_PROBE` bypass was reverted before commit). ## Root cause and fix Frame 1's block at px=192 py=96 is a SKIPPED 16x16 INTRA block inside the inter frame (DC_PRED + CFL, zero residual), decoded by `decode_inter_block`'s intra arm. That arm pushed/read chroma at the 422j enclosing square `chroma_side = max(side >> ss_x, side >> ss_y)` = 16 for a 16x16 luma block, but the 4:2:2 chroma plane block is 8x16: - The skip arm (`push_intra(1/2, cpx, cpy, chroma_side, ...)`) pushed a SQUARE 16x16 op with `ZERO_RESIDUAL` and CFL armed. `ac = cfl_src(px, py, side)` builds the AC signal over the LUMA 16x16, which `cfl_ac_ss` downsamples to the true plane shape 8x16 = 128 samples. The square `reconstruct` walked `row * 16 + col` and read `ac_q3[128]` — the panic. (Instrumented `exec_intra`: `plane=1 x=96 y=96 bw=16 bh=16 rect=false res_len=0 cfl=true`.) Even without the panic the square predict would have written 8 columns of wrong chroma past the plane block. Fix (decode.rs, intra arm only): 1. `let chroma_w = side >> ss_x(fctx); let chroma_h = side >> ss_y(fctx);` 2. Skip arm: `push_intra_unit(1/2, cpx, cpy, chroma_w, chroma_h, ...)` with `ZERO_RESIDUAL[..chroma_w * chroma_h]` (routes rect to `push_intra_rect`/`reconstruct_rect`); the neighbour write-back grids are `Grid::Zero(chroma_w * chroma_h)`. 3. Non-skip arm: `chroma_w == chroma_h` keeps the square `read_plane` verbatim; at 4:2:2 both planes go through `read_rect_chroma_unit` with the key-frame path's proven set/scan rows keyed on the LUMA side (16 -> `ChromaRect16x8` + `SCAN_8X16`, 8 -> `ChromaRect8x4`, 32 -> `ChromaRect32x16`) and the per-chroma-cell context read (`around_mi_422_chroma`), exactly the decode_block 422f idiom. Byte-identical at 4:2:0 and 4:4:4: `chroma_w == chroma_h == chroma_side` there, so every replaced call keeps its exact arguments and `push_intra_unit` routes to the same square `push_intra`. Fixture `/tmp/t422.obu` sha256 `d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129` panicked before the change and passes the block after it. ## Frontier (EC_AV1_ALLOW_422_PROBE=1, local only, bypass since reverted) Next stop is a clean refusal, not a panic: `rect_inter_chroma_set` (decode.rs:22401, refusal string at decode.rs:22429) — "a rectangular inter chroma transform unit whose shape has no coefficient table set here". A later inter block in frame 1 codes a chroma rect unit whose (w, h) has no row in that table (the 422j square rows (16,16)/(8,8)/(4,4) and the rect rows listed there are present; the new shape is none of them). That is the inter chroma entropy-set table, not the intra prediction class this lane owns — left as the named stop; an `EC_*` print of the refusing (w, h) at that site is the first step for the owning lane. ## State - Source change: `crates/ec-av1/src/decode.rs` only (intra-arm chroma_w/h, skip-arm unit pushes + grid sizes, non-skip rect routing). Temporary exec_intra/push_intra traces and the stream.rs probe bypass are REVERTED; default refusal re-verified firing: `REFUSED: unsupported: AV1 decode_stream (a chroma format of 4:2:2 ...)`. - 420 gates green (target dir `$HOME/.cache/cargo-target-av1422k`): `a_non_420_subsampled_sequence_header_is_refused_by_name` + `a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_whose_tx_split_decodes_ pixel_exact` under `EC_AV1_REQUIRE_AOMENC=1`: 3 passed, 0 failed. Real 420 decode over the shared intra arm, confirming the change is bit-neutral at 4:2:0. `cargo check -p ec-av1`: 0 warnings. - No push.