From 7f2ca308cf5eba123eaedae33ed7ba92711450b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 30 Sep 2026 16:04:23 +0300 Subject: [PATCH] lane-av1444d10: window the 32-capped chroma palette buffer per unit (the 352x242 4:4:4 chroma divergence) The census cell s444_352x242_10b (10-bit 4:4:4, 352x242) diverged on U/V only, 0/1166/1413 over 17 of 17 decode frames, first bad sample at decode frame 0 plane U row 224 col 64. The filter chain is exonerated: the oracle's own PREFILT dump equals its FINAL dump over every low byte, and our PREFILT divergence set is identical to our FINAL one, so deblock/CDEF/LR/superres are inert and this is a reconstruction defect. A 32x64 rect block's chroma is 32x64 at 4:4:4, tiled into two 32x32 units. Both units were handed the WHOLE block's palette prediction buffer, and PlaneBuf::reconstruct reads its first side*side entries, so every unit reconstructed the block's top-left corner. Unit (0,1) at pixel (64,224) wrote the block's row-192 palette values (flat 209) where libaom writes row 224's (216), and the neighbouring 32x32 PAETH block at (96,224), whose left edge is that sample, then propagated 19 more wrong columns along its own top row. Window both arms (the square-unit and the rect-unit one) with palette_window, the way the luma split-transform and the 4x4 lossless chroma walks already do. --- crates/ec-av1/src/decode.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index d4d01636..acd85eb5 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -20082,7 +20082,11 @@ fn decode_block_rect64( let levels = if uw == uh { let plane = if plane_idx == 1 { &mut *u } else { &mut *v }; if let Some((ub, vb)) = &palette_uv_bufs { - set_palette_pred((if plane_idx == 1 { ub } else { vb }).clone(), fctx); + let pbuf = if plane_idx == 1 { ub } else { vb }; + set_palette_pred( + palette_window(pbuf, chroma_w, cu_col * uw, cu_row * uh, uw, uh), + fctx, + ); } read_plane( dec, @@ -20136,7 +20140,11 @@ fn decode_block_rect64( block_iqmatrix(fctx, plane_idx, uw, uh, tx_type), ); if let Some((ub, vb)) = &palette_uv_bufs { - set_palette_pred((if plane_idx == 1 { ub } else { vb }).clone(), fctx); + let pbuf = if plane_idx == 1 { ub } else { vb }; + set_palette_pred( + palette_window(pbuf, chroma_w, cu_col * uw, cu_row * uh, uw, uh), + fctx, + ); } push_intra_rect( plane_idx,