lane-av1444altref: FIX the 4:4:4 lossless alt-ref cell -- the 8x8 compound leaf warped LUMA only and left both CHROMA planes translational (0 wrong bytes now, was 317)
ROOT CAUSE, and it is not a rounding difference: decode_inter_block8's compound arm called
warp_affine_compound on the LUMA intermediates (49205 ref0, 49239 ref1) and left the chroma arms
(inter0_u/inter1_u/inter0_v/inter1_v) translational. libaom warps PER PLANE -- reconinter_template.inc:248
av1_init_warp_params + :262 build_one_inter_predictor -> reconinter.c:156 av1_warp_plane, both INSIDE
dec_build_inter_predictor's plane loop (decodeframe.c:701-768), i.e. run for every plane with that
plane's own subsampling/origin/extent -- with a per-plane bail at reconinter.c:61
'if (block_height < 8 || block_width < 8) return;'. So an 8x8 GLOBALMV (affine) compound leaf had its
chroma predicted by TRANSLATION from the block's top-left corner.
WHY THE SIGNATURE WAS +/-1 WITH A BOTTOM-RIGHT GRADIENT: a GLOBALMV block's MV is the affine's local
derivative at the block CENTRE, so a translation agrees with the warp at the centre and diverges
linearly with distance from it -- zero at the top-left, growing toward the bottom-right, 1-2 LSB on
this content. A wrong reference/weight would give a uniform offset and a rounding difference a +/-1
scatter with NO spatial gradient; the LUMA of the very same blocks was exact, which is the sharpest
refutation of the rounding class.
FIX: four chroma warp calls -- U ref0 (49333), U ref1 (49369), V ref0 (49432), V ref1 (49468) -- each
guarded by warp_plane_allowed(chroma_w, chroma_h) (mirrors reconinter.c:61) and passing the plane's
own origin/extent/subsampling.
SAME-CLASS SWEEP, and it found a latent defect: the 8x8 leaf's SINGLE-REF arm guarded its chroma warp
on WIDTH only (chroma_w >= 8), so a rect chroma block 8 wide and under 8 high (4:2:2 BLOCK_8X4) warped
where libaom bails on block_height < 8; now warp_plane_allowed(chroma_w, chroma_h) (50379). All four
inter arms now warp per plane.
RESULT: ll444_c 0 differing bytes (cmp -l vs aomdec --rawvideo empty), all 18 decode-order pictures 0 in
EC_AV1_PREFILT_WIDE_DUMP; parent 317 (0 Y / 147 U / 170 V), first diff decode picture 8.
PAIRING HOLE CLOSED: the oracle rung had no picture counter, so block identity was ambiguous -- the
oracle now carries aom_ec_pict_idx (decodeframe.c:89, bumped at :5493) and the rung (EC_CPRED,
decodeframe.c:691) prints picture + full block identity + every sample, moved to the end of the plane
loop to match the our-side rung (EC_CPRED, decode.rs:37184 in reconstruct_mc_rect); join is per PIXEL.
The 7 diff cells in decode picture 8 are all 8x8 blocks: mi(8,72), mi(20,28), mi(52,46) compound_idx=0
COMPOUND_WEDGE with GLOBALMV on BOTH refs, plus mi(20,30) the inter-intra leaf.
GATE: stream::tests::a_lossless_444_altref_leaf8_warp_chroma_is_byte_exact (stream.rs:8395) -- all 3
planes of all 16 displayed frames vs aomdec --rawvideo through the shared count_rawvideo_diffs
comparator (size mismatch is a failure, not a pass); arm 2 rotates ONE byte of the oracle's own output
(first U sample of frame 0) and requires the same comparator to report (0,1,0); reachability from
compound_warp_hits_8 delta > 0. Fixture committed byte for byte
(crates/ec-av1/fixtures/ll444_c_altref_leaf8_warp.obu, 512220 B, sha256
999a41d88a092840456d5e9de83590ab819a8a14686a694889e63c2258ff2bb8); scripts/fixture-library.tsv
regenerated.
MUTATION PROOF: with the fix reverted (4 chroma warp blocks deleted, the single-ref guard back to
chroma_w >= 8) the gate reds BY NAME -- left (0,147,170) right (0,0,0) at stream.rs:8437 -- and is green
again after restore. Verified by Main: cargo check clean; the new gate passes; lossless/444/422/warp/obmc
101 passed, 0 failed.