forge
Explore
Log in

Don't you dare go Hollow

lane-av1444d10: window the 32-capped chroma palette buffer per unit (the 352x242 4:4:4 chroma divergence)

Browse files at this commit

7f2ca308cf5eba123eaedae33ed7ba92711450b9Ahmet Kaan GümüşParent: ca69286
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.rsmodified+10 -2
@@ -20082,7 +20082,11 @@ fn decode_block_rect64(
2008220082 let levels = if uw == uh {
2008320083 let plane = if plane_idx == 1 { &mut *u } else { &mut *v };
2008420084 if let Some((ub, vb)) = &palette_uv_bufs {
20085- set_palette_pred((if plane_idx == 1 { ub } else { vb }).clone(), fctx);
20085+ let pbuf = if plane_idx == 1 { ub } else { vb };
20086+ set_palette_pred(
20087+ palette_window(pbuf, chroma_w, cu_col * uw, cu_row * uh, uw, uh),
20088+ fctx,
20089+ );
2008620090 }
2008720091 read_plane(
2008820092 dec,
@@ -20136,7 +20140,11 @@ fn decode_block_rect64(
2013620140 block_iqmatrix(fctx, plane_idx, uw, uh, tx_type),
2013720141 );
2013820142 if let Some((ub, vb)) = &palette_uv_bufs {
20139- set_palette_pred((if plane_idx == 1 { ub } else { vb }).clone(), fctx);
20143+ let pbuf = if plane_idx == 1 { ub } else { vb };
20144+ set_palette_pred(
20145+ palette_window(pbuf, chroma_w, cu_col * uw, cu_row * uh, uw, uh),
20146+ fctx,
20147+ );
2014020148 }
2014120149 push_intra_rect(
2014220150 plane_idx,