edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-av1-422blockhalf — decode_inter_block's 4:2:2 chroma half ported to the
per-axis plane-block model (per-axis pred buffers + real-subsampling masked
compound blend), the EC_RECTCHROMA_GAP 16x8 / 8x32 chroma shapes coded as
the (4, 8) unit tiling the Release oracle's OOB `max_txsize_rect_lookup[
BLOCK_INVALID]byte produces, anddecode_inter_sub8_rect2`'s has_chroma
gating moved from i == 1 to the per-piece is_chroma_reference rule;
frame 0 stays byte-exact at PREFILT/POSTDEB/POSTCDEF, all 16 frames now
decode (the frame-11 (4, 32) refusal is gone), and the inter-frame
divergence is REMEASURED and REATTRIBUTED to a partition-dispatch defect
upstream of the chroma half (ours dispatches SPLIT4 where the oracle codes
HORZ at mi(8,10)) — frame exactness NOT claimed for frames 1+
Outcome
decode_inter_block's chroma PREDICTION buffers (compound and single-ref arms, OBMC plan, interintra stride, skip pushes, su/sv Pred strides, theread_inter_rect_chroma/read_inter_chroma_losslesspred strides) are keyed to the PLANE BLOCK's own per-axis shape at ss (1, 0):(chroma_stride, chroma_buf_h) = (write_chroma_w, write_chroma_h)instead of the enclosing squarechroma_side. The two masked-compound blend sites now pass the plane's REAL subsampling shifts — the stop-note's pre-port direct luma-resolution mask read is gone (aom_dsp/blend-a64-mask.c's(1, 0)branch at 4:2:2). Every replaced expression reduces to the parent values at 4:2:0/4:4:4 (chroma_stride == chroma_buf_h == chroma_sidethere), byte-identical by construction.read_inter_rect_chromanow takes the per-axis stride correctly: its assembled block grid isstride x plane-height(assembled_h), the single-unit embed included — the old squarechroma_side * chroma_sideallocation panicked (range end index 20 out of range for slice of length 16) the moment the per-axis stride reached it.decode_rect_split's 4:2:2 BLOCK_INVALID chroma planes: the tall/wide 1:2 and 1:4 strips (8x16, 16x32, 32x64, 8x32, 16x64, +64x128for 128-SB streams) have NO chroma plane block (av1_ss_size_lookup[...][1][0] == BLOCK_INVALID); the plane is still coded, tiled into (4, 8) rect units — the Release oracle's out-of-boundsmax_txsize_rect_lookup[BLOCK_INVALID]byte is TX_4X8 (lane-av1-422m's measurement), anddecode_token_recon_blocksteps the plane in that unit shape. Units readTxbSet::ChromaRect8x4/SCAN_4X8witharound_mi_422_chromactx, mode-indexed intra tx type (the< 32square-up rule, pre-existing rect units unchanged at DctDct), per-unit stamps + units replay. SKIP strips predict per (4, 8) unit as well (decode_token_recon_block's per-TU plane walk runs before the skip guard) — the old single whole-plane zero push asked the intra predictor for a 1:8 rect (dc_rect_multiplierpanic, bw=8 bh=64).EC_RECTCHROMA_GAPnow prints only truly-unhandled shapes (it used to misfire on every tiled square — the parent lane'schroma=8x8rows); it prints ZERO times on the fixture now.chroma422_chunk= 344 on the full fixture (new units provably fire).decode_inter_sub8_rect2's has_chroma gating: per-pieceis_chroma_reference— 4:4:4 every piece, 4:2:2 both horz pieces (!(bw & 1)) / the odd-column vert piece (mi_col & 1), 4:2:0 keepsi == 1verbatim. The inter pieces take a per-piece inline chroma arm at 4:2:2 (U then V TX_4X4 at the floored cell,around_mi_422_chromactx, inherited piece tx type; horz predicts whole-from-own mv, vert predicts halvesbuild_inter_predictors_sub8x8-style, left half from the in-group left piece or the decoded grid neighbour when the group starts on an odd column — filters unavailable on the grid, so an outside neighbour borrows this piece's filters). The 4:2:0 group tail (and the group DC stamp) are gated off at 4:2:2.- MEASURED (17-frame probe, per-OBU cut harness
/tmp/i422/cut_frames.py, comparator ours-padded-u8-cropped vs instrumented$HOME/.cache/aom-oracle/buildaomdec-cropped-u8; fixture/tmp/t422.obusha256d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129):- frame 0: byte-exact at PREFILT, POSTDEB and POSTCDEF on Y, U and V — 0 diffs everywhere (FINAL not re-run this round; frame 0's final state is bracketed by POSTCDEF on a key frame).
- all 16 frames decode, exit 0 — the parent lane's frame-11 refusal
(
a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here, theluma=8x32 tx=8x8 chroma=4x32GAP) is gone. - frames 1..15 still diverge (~24-36k Y, ~13-18k U/V per stage; ladder
in
/tmp/i422/ladder/). Frame exactness is NOT claimed.
- REATTRIBUTION (the round's real finding): the frames-1+ divergence is
NOT the chroma half. Strict stream-order EC_ISTEP pairing on the
frames-0-1 cut puts the first entropy divergence at index 167 — the
8x8 group at mi(8,10): the ORACLE codes PARTITION_HORZ (pieces (8,10)
and (9,10) only, both intra with uv; oracle partition trace
EC_PART mi_row=8 mi_col=10 bsize=3 ctx=0 value=1) while OURS dispatches decode_inter_sub8_split4 (EC_SUB8INTRA:shape=4x4 sub=0 has_chroma=false mi=8,10... four pieces, one extra uv_mode consumption on the (9,11) odd piece). Same bits, different partition outcome at the 8x8-leaf partition read (partition_w8ctx/value — oursctx=2at the (8,8) sibling). Every downstream diff in the ladder is walk-shift noise from that point. This is a pre-existing defect upstream of the named chroma surfaces, newly visible now that the chroma shapes no longer refuse.
Decision
- The header refusal STAYS unconditional in
stream.rs; the bypass was local-only, applied and reverted byte-identical (0 occurrences left;stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_namegreen after the revert). - 4:2:0/4:4:4 untouched by construction (ss-keyed arms; the 4:2:0 sub8
group tail and
i == 1rule verbatim). read_coeffs_rectuntouched; the 4:2:0 group-tail SKIP arm untouched.
Deferred
(a) The (8,10)-class partition-dispatch defect (ours SPLIT4 vs oracle
HORZ) — the frames-1+ exactness blocker. Unblock: capture the 8x8
leaf partition context both sides (ours EC_TRACE_PART, oracle's
shipped partition probe) and compare partition_ctx_mi vs libaom's
partition_context gather at that leaf; the chroma half itself is
now shape-honest and rides on the fix.
(b) 4-wide strips (4x16, 4x8 luma) at 4:2:2: decode_rect_split still
refuses (2, 16) chroma by name (no pair-anchor machinery there; the
4:2:0 (4, 16) single-unit arm would be wrong at ss (1, 0)).
Unblock: the split4-style floored-pair anchor ported to the 1-mi-wide
strip callers, then the OOB (4, 8) tiling.
(c) 128-root 4:2:2 chroma chunking (decode_inter_block's side > 64
mu-chunk chroma) still passes the square chroma_side geometry —
unreachable on <=64-superblock streams (this fixture is 64-SB);
flagged for whoever lands 4:2:2 128-SB support.
Verification
cargo check -p ec-av1(target~/.cache/cargo-target-av1422blockhalf): 0 warnings, 0 errors.- Refusal gate green post-revert (1 passed).
- Probe:
OK: 16 frames decoded; 0EC_RECTCHROMA_GAPprints;chroma422_chunk=344,chroma422_square=197on the full fixture. - Ladder: frame 0 = 0 diffs at PREFILT/POSTDEB/POSTCDEF (Y=U=V); frames 1..15 divergent (see 5/6 — attributed, not claimed).
State
- Commit on lane-av1-422blockhalf (no push): the per-axis decode_inter_block chroma half, the read_inter_rect_chroma stride fix, the decode_rect_split (4, 8) chroma tiling incl. per-unit skip prediction, the rect2 per-piece has_chroma gating, and this report.
- Ladder dumps under
/tmp/i422/ladder/(scratch, not committed).