edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-av1-422l — inter-strip pairing underflow fixed; the rect-set refusal is real and names (4, 32), which libaom marks invalid — no row added, refusal stays
Outcome
Two results.
- The k report's frontier attribution was measured under a release build:
at_mi.0 - 1subtract-overflow WRAPPED silently there, so decode continued torect_inter_chroma_set. A debug build panics first — the true first stop at 8e7238b2 was a hard underflow panic in the inter-strip chroma pairing (decode.rs~41531:42 horzat_mi.0 - 1, then ~41544:55 vertat_mi.1 - 1), hit becausestrip_has_chroma's|| ss_y(fctx) == 0clause makes every strip chroma-bearing at 4:2:2 including strip i = 0 at mi row/col 0. Fixed in its own commit (below); 4:2:0 and 4:4:4 are byte-identical by construction. - After the fix the frontier is exactly the refusal the k report named:
rect_inter_chroma_setfires with (w, h) = (4, 32) — the 4:2:2 plane residual of an 8x32 luma block. libaom itself marks that size invalid, so per the lane charter NO table row is invented and the refusal stays.
Fix 1 (own commit): strip pairing keys on the strip's own subsampled axis
decode_inter_frame_tile_with_cdfs's 1:4 strip walk
(PARTITION_HORZ_4/VERT_4, 16x4 / 4x16 strips):
strip_has_chroma: horz keepsi % 2 == 1 || ss_y == 0(no chroma row parity at ss_y == 0 — every 16x4 strip is its own reference, mirroring the intra strip arm'selse if ss_y(fctx) == 0at the 14700s key-frame path); vert becomesi % 2 == 1 || ss_x == 0(column parity governs, 4:4:4 keeps self-paired strips, 4:2:2 keeps the proven 4:2:0 column pairing, and an odd strip's left neighbour always exists soat_mi.1 - 1cannot underflow).pair_mi: self when the strip's pair axis is not subsampled (horz && ss_y == 0, or vert && ss_x == 0), otherwise the existing pair merge.prev: pair motion only when the strip actually pairs (horz && ss_y == 1, vert && ss_x == 1); self-coded chroma predicts from its own motion.
Format-by-format equivalence to the pre-lane code: 4:2:0 horz/vert and
4:4:4 horz/vert produce identical has_chroma/pair_mi/prev in every
branch; only 4:2:2 changes (horz self-pairs, vert pairs as at 4:2:0).
Fail-before witness: HEAD 8e7238b2 + env-gated header bypass panics
attempt to subtract with overflow at the two lines above under
EC_AV1_ALLOW_422_PROBE=1; after the fix the same run reaches the named
refusal. Fail-after does not apply (this is a panic, not a test).
Fix 2: the refusing shape, named — and why no row is added
EC_AV1_TRACE_422 at the _ => arm of rect_inter_chroma_set prints
(w,h)=(4,32) on /tmp/t422.obu (sha256
d3fa4beeb1309033e4a03f5ae5c431c8fa8386ba1ada088684710423c7938129, the k
report's fixture). 4x32 is the 4:2:2 plane residual of an 8x32 luma block
(write rect 8x32 -> >> ss_x = 4x32). Against the pinned oracle source
(~/.cache/aom-oracle/src):
av1_ss_size_lookup[BLOCK_8X32][1][0] = BLOCK_INVALID(av1/common/common_data.c:38) — an 8x32 luma block HAS NO 4:2:2 plane residual block.TX_4X32/TX_32X4do not exist: zero occurrences inav1/common/enums.h; the largest 4-px-axis transform isTX_4X16.max_txsize_rect_lookup[BLOCK_8X32] = TX_8X32— libaom reaches that chroma through luma-granular chunking, never as a standalone 4-px unit.
So the ticket's escape hatch ("if libaom marks it invalid, stop and name
it") applies: adding a (4, 32) row would invent a size libaom never codes.
The owning lane's next step is modelling the 8x32-at-(1,0) chroma merge
(get_vartx_max_txsize / decode_token_recon_block chunking), not an
entropy set. The trace print stays (env-gated, env_flag!, zero-cost).
Verification
- Counters on the probe run prove real 4:2:2 chroma units read before the
stop:
chroma422_square: 25,chroma422_rect: 100,chroma422_sub8: 26. - Default refusal fires (bypass reverted):
REFUSED: unsupported: AV1 decode_stream (a chroma format of 4:2:2 ...). - 420 gates green under
EC_AV1_REQUIRE_AOMENC=1(target dir~/.cache/cargo-target-av1422l):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: 2 passed, 0 failed. cargo check -p ec-av1: 0 warnings.- Header refusal NOT deleted (16-frame stream is not pixel-exact; it is refused at the named (4, 32) stop).
- The k lane's intra-arm chroma prediction sizing is untouched.
Latent site named (not fixed, out of reach)
decode.rs ~14107 (INTRABC 16x4/4x16 dense path) subtracts
lmi.0 - 1 / lmi.1 - 1 under has_chroma with no subsampled-axis key.
Unreachable at 4:2:2 today (the header refusal precedes any INTRABC
decode), so no test can exercise it; flagged for the INTRABC lane so the
pairing class lands there too when 4:2:2 INTRABC is chartered.
State
- Commits on lane-av1-422l (no push): (1) strip-pairing fix, (2) the (4, 32) trace print + this report.
- No table row added to
rect_inter_chroma_set. The 4:2:0 group-tail chroma SKIP arm was not touched.