diff --git a/crates/ec-av1/fixtures/444_lossy_palette_chroma_352x242_10b.obu b/crates/ec-av1/fixtures/444_lossy_palette_chroma_352x242_10b.obu new file mode 100644 index 0000000000000000000000000000000000000000..2f742b5237260eed1ae51bbdb56ef8e16262bc7c GIT binary patch literal 24875 zcmV(eK>NQE0165q000C%f5rd#!ZO4?6ab-6H2H0eVYK%oqb$)KWS?&mBo$jXRnpY< z?8SL@1dwW_S?aBeVvO{U*xg^0j8U*#h_eoaA40gA!2OWAJ#$*1UR5~W>wTpvGu|+x z%hnoAu5n}U`k1`RfA;3@cjq1hpOkqBcN(rdy#!=EY$EV7B(dq0(keRxzn><5K66>w z$Ov>o^H7qZ(=5AKam8-%YFM2s$i<$ESW4thrOX{1DLN>8Elb@Ib=@E5p@q0t@b?8cyWBkYOPlwBbx9 z1||5q`ULOcIba{4eFLhPiv*!9=&cIVtEG_bMel;%R z^h;O;oML(YT+GqpVwr?0vm@c!Q`;2kaA>xmB7uq0G}|=Wp9V!kpnGzA;xpR=3X%m~ zrCLP;FSjrQD+(xB`gb4L(k%v`XMFnQ?}dE;uy5umHW>iMESRMlr!tm{-_wr(09R^J zb3$cGDB(o%k?odFzhrdvSMSkq*_Ia}?ItS0_LW$Y%yxLscjecC+vj{(J%@aHZ{8bQ z16bw(O#9AJ#}U}FncC_#ta^mqL?8~RGP0$LzHpN9DFW_S7w?sozAoUHs;-|4E?@}4 zD*f$y$(1FkhJELAoaj(J#MDZ9gB=dR3!_;RBxp+Z0`)hgN#FiqKA5tPNkzq#9bCK7 zuDD?UNmO;q8TAW>L`@u5|Kj4>?MJhI+M!jLk5VWjOBD}xi-03~d?cky{{Hx)J@icO zB9g8YuAg^+w9zY<*44QARg?4tj`hvarn7OfwnHD3H=@{_yy|tAlO11J@xK=gn$xLt zJ+`Z5hG8%KeNJk1Us|f&3t5JlqBreSmrZ;VLe|fwX#>hH#(^;FN>6Y{zuM`F5Ns9p z8~M}?;;HXY%h0dqW&7X6#`j+$`}Gn>sdzmN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-wLQ27&T7%S1=yqzilahz|04Rotc z=5G+g)J$A^2Ugw!9lia-qY>kp-$KJ+*lWyqQ|ykl)@7v$S55SQ!XQqwEbHhEXHWIl zZ}?48kUHUxVdo}jp(_ZDCudGfeSA7-6izN`4xCbX;vAgAGkkuGDA|+#8Vokdzw-hu zmr+2|VGK8`2_th4LX`?n+oMv!cBZ2%ERsAG6X_=$>d)as8h zaD-2j-3%U1!Jip;N5l0zd=!T0WJ3G|=`1#5a5eKREF~M;l8<-s)2|`INm9!T98?c` zx#FqB=e1@SukT8oy_0+)qk(LL)SfxebkVLTRlk&RL4c^gEZa|NOy&Z^+v?I_D;v({ z{~c3i0*(6dM@Fh27zrIU6w0kkc`BHk`PY+G=tNc~y_~~?W5h+fmO`zggYt9q{Q7|Z z2pk;7`(OgN%SN%qkTB8AD1hl-W`b-itjK0T0+?e@l)bs-3NKFQlbV!#us`6ZfT1d; zhEOi35;a*v!tX!B%2eAbkC`O>s1N+SrPY zHiRxY2X)AlUXBY2>F@K;>ZrxiFf;R~H4%pIt}d7rUhL-pDlEuhV+OsdQxh907^27X zYrY$ktE1P=+xApUB*5`I;-IHIN>Y63I~ iybxP{v46r605TLZ4*(AkxPwUG1q>j?00031r usize { PALETTE_SPLIT_TX_HITS.with(|c| c.get()) } +thread_local! { + /// lane-av1444d10: chroma PREDICTION units on the 32-capped tiled chroma + /// walk (`decode_block_rect`'s `uw/uh = min(chroma, 32)` units) that were + /// handed a WINDOWED slice of their block's palette buffer -- i.e. the + /// units that are NOT the block's top-left corner. Counts units, not + /// blocks, and only units whose block actually has a UV palette, so a + /// stream without a tiled palette chroma block leaves it at zero. + static CHROMA_PALETTE_WINDOW_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// Current value of [`CHROMA_PALETTE_WINDOW_HITS`]. +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn chroma_palette_window_hits() -> usize { + CHROMA_PALETTE_WINDOW_HITS.with(|c| c.get()) +} + +/// Zeroes [`CHROMA_PALETTE_WINDOW_HITS`] so a gate can read it as a DELTA +/// (it is process-wide, like every counter here). +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates +pub(crate) fn reset_chroma_palette_window_hits() { + CHROMA_PALETTE_WINDOW_HITS.with(|c| c.set(0)); +} + thread_local! { /// lane-pal8 r1: square 8x8 LEAVES ([`decode_leaf8`]) that actually use a /// palette (Y or UV) -- the shape every 8-bit `--tune-content=screen` @@ -20082,7 +20105,12 @@ 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, + ); + hit!(CHROMA_PALETTE_WINDOW_HITS); } read_plane( dec, @@ -20136,7 +20164,12 @@ 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, + ); + hit!(CHROMA_PALETTE_WINDOW_HITS); } push_intra_rect( plane_idx, diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 08fb6129..4dd3274f 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -50712,6 +50712,116 @@ exit 0 } } + /// lane-av1444d10: the 10-bit 4:4:4 352x242 cell the 4:2:2 census + /// (`lanes/av1422census.report.md` §4 class D) found diverging on chroma + /// only -- 0 / 1166 / 1413 over 17 of 17 decode frames, first bad sample + /// at decode frame 0 plane U row 224 col 64 -- and the fix for it, a byte + /// exact gate. 4:4:4 is a format this decoder claims to support, so the + /// cell is not probe-only evidence. + /// + /// **Why this cell and not its five same-depth controls.** `s444_*_10b` + /// at 320x242, 320x250, 352x250, 416x242 and 416x250, same encoder recipe, + /// same 10-bit depth, were all byte-exact before the fix and still are; only + /// 352x242 diverged. What 352x242 has is the first block of the cell whose + /// chroma is TALLER than the 32-pixel unit cap at ss (0,0): a 32x64 luma + /// strip keeps its 32x64 chroma, and `decode_block_rect`'s tiled chroma + /// walk splits it into `nh = 2` units of 32x32. Every other cell's chroma + /// blocks are <= 32 on both axes, so `nw * nh == 1` and the whole-block + /// buffer IS the unit's window -- the bug is invisible there. That is why + /// the census could report "geometry-sensitive" without the mechanism: + /// the sensitive axis is chroma UNIT COUNT, not frame width or height. + /// + /// **The defect.** Both tiled arms handed the unit the WHOLE block's + /// palette prediction buffer, and `PlaneBuf::reconstruct` reads its first + /// `side * side` entries, so unit (0,1) at pixel (64, 224) reconstructed + /// the block's row-192 palette values (flat 209) where libaom writes + /// row 224's (216). The neighbouring 32x32 `PAETH_PRED` block at + /// (96, 224), whose left edge sample IS that pixel, then propagated 19 + /// more wrong columns along its own top row -- which is why the census saw + /// 53 wrong columns rather than 32. + /// + /// **Red before the fix, by this gate's own name:** with the two + /// `palette_window` calls reverted the first wrong sample is decode frame + /// 0 plane U row 224 col 64 (ours 209, oracle 216) and the totals are + /// 0 / 1166 / 1413 over 17 decode frames. + /// + /// **Non-vacuity, four ways.** (1) The pinned bytes: length 24875 and + /// FNV-1a64 `0x7fda_dbb4_3bbf_9af3`, sha256 + /// `84df2f37cc7982f9a572443d85dfcc13bf366a64f3fb567391dcd5acd58a0ad2`. + /// (2) 17 decode-order frames at 352x242 with FULL-RESOLUTION chroma, so + /// a decoder that kept the 4:2:0 extent cannot pass the compare. + /// (3) `decode::chroma_palette_window_hits()` read as a delta must be at + /// least 1: the fixed lines are the only thing that increments it, so a + /// gate that passes without them running would be + /// gate-blind-to-feature. (4) The oracle comparator this gate leans on has + /// its own per-plane one-byte-flip liveness control in the crate + /// (`every_oracle_comparator_reds_on_a_one_byte_wrong_oracle`). + #[test] + fn a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit() { + const NAME: &str = "a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit"; + const FIXTURE: &str = "fixtures/444_lossy_palette_chroma_352x242_10b.obu"; + const LEN: usize = 24875; + const FNV: u64 = 0x7fda_dbb4_3bbf_9af3; + const W: usize = 352; + const H: usize = 242; + // 16 SHOWN frames (`--limit=16`); the oracle compare below is the one + // that walks all 17 DECODE-order pictures (16 shown + 1 hidden altref). + const FRAMES: usize = 16; + // measured 4 on this stream (two tiled palette chroma blocks x U and V) + const MIN_WINDOWED_UNITS: usize = 4; + let _guard = lock_gate_counters(); + let obu = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(FIXTURE); + let stream = std::fs::read(&obu).unwrap_or_else(|e| { + panic!( + "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \ + which is a failure, not a skip", + obu.display() + ) + }); + assert_eq!(stream.len(), LEN, "{NAME}: {FIXTURE} length moved"); + assert_eq!(fnv1a64(&stream), FNV, "{NAME}: {FIXTURE} bytes moved"); + + // Process-wide with no reset: read as a DELTA, or a full-suite run + // leaves residue that would make the reachability assert vacuous. + crate::decode::reset_chroma_palette_window_hits(); + let frames = decode_stream(&stream) + .unwrap_or_else(|e| panic!("{NAME}: {FIXTURE} no longer decodes cleanly: {e}")); + let windowed = crate::decode::chroma_palette_window_hits(); + assert!( + windowed >= MIN_WINDOWED_UNITS, + "{NAME}: {FIXTURE} ran {windowed} windowed palette chroma unit(s), \ + expected at least {MIN_WINDOWED_UNITS} -- the tiled chroma walk did \ + not reach a palette block, so the fixed lines never ran and this \ + gate is blind to the defect (class gate-blind-to-feature)" + ); + assert_eq!( + frames.len(), + FRAMES, + "{NAME}: {FIXTURE} decode-order frame count" + ); + for (i, f) in frames.iter().enumerate() { + assert_eq!( + (f.width, f.height), + (W, H), + "{NAME}: {FIXTURE} frame {i} dimensions" + ); + assert_eq!( + f.u.len(), + W * H, + "{NAME}: {FIXTURE} frame {i} chroma plane is {} samples; at 4:4:4 \ + it must be full resolution ({W}x{H})", + f.u.len() + ); + } + if aomdec_available(NAME) { + let (decoded, hidden) = decode_all_frames_vs_oracle(&stream, NAME); + eprintln!( + "{NAME}: {FIXTURE} {decoded} decode-order frame(s) ({hidden} hidden) \ + byte-exact vs aomdec, {windowed} windowed palette chroma unit(s)" + ); + } + } + /// lane-av1cfl: the 4:4:4 CfL AC body is a DIFFERENT function from the /// 4:2:0 one, and this gate is the proof that the format-blind /// `cfl_ac_q3_at` (`bw / 2, bh / 2`, a 2x2 luma average per chroma diff --git a/lanes/av1444d10.report.md b/lanes/av1444d10.report.md new file mode 100644 index 00000000..102f916f --- /dev/null +++ b/lanes/av1444d10.report.md @@ -0,0 +1,373 @@ +# lane-av1444d10 — the 10-bit 4:4:4 352x242 chroma divergence is a chroma PALETTE PREDICTION window, fixed, and gated byte-exact + +**Status: FIXED and GATED.** The census cell `s444_352x242_10b` is byte-exact on all +17 decode-order frames against the instrumented aomdec, and so are all 106 committed +fixtures except the nine 4:2:2 ones that refuse by name. Two commits: +`f3afa5b7` (the fix) and `eb73ef89` (the fixture + the byte-exact gate + the +reachability counter). Base `ed7c99bc`. + +The census was right that this cell diverged and right that it was outside the 4:2:2 +question. It was not, however, "geometry-sensitive" in the way its own framing +implies: **352x242's distinction is not frame width or height at all — it is the +number of CHROMA TRANSFORM UNITS in one block.** + +--- + +## 0. The cell, pinned + +| field | value | +|---|---| +| name | `s444_352x242_10b` (census) → `fixtures/444_lossy_palette_chroma_352x242_10b.obu` (committed) | +| sha256 | `84df2f37cc7982f9a572443d85dfcc13bf366a64f3fb567391dcd5acd58a0ad2` | +| size | 24 875 B | +| FNV-1a64 | `0x7fda_dbb4_3bbf_9af3` | +| shape | 352x242, `ss_x = ss_y = 0` (4:4:4), 10-bit, profile 1 | +| frames | 17 decode-order (16 shown + 1 hidden altref) | + +Recipe — the census's own sweep driver, re-run here and byte-reproduced (the sha256 +matched the census cell exactly, so the recipe is the census's, not a re-derivation): + +```text +ffmpeg -v error -f lavfi -i "testsrc2=size=352x242:rate=25" -frames:v 16 \ + -pix_fmt yuv444p10le -f rawvideo cell.raw -y +# y4m built by hand: header line, then "FRAME\n" + 352*242*3*2 bytes per frame +# (libaom's y4minput.c:1163-1171 requires the six bytes "FRAME\n" before EVERY frame) +aomenc --codec=av1 --profile=1 --input-bit-depth=10 --bit-depth=10 --limit=16 \ + --lag-in-frames=25 --auto-alt-ref=1 --enable-global-motion=1 --pass=1 \ + --cq-level=24 --threads=4 --kf-min-dist=0 --kf-max-dist=999999 \ + --width=352 --height=242 --cpu-used=0 --obu -o cell.obu cell.y4m +``` + +Driver: `~/.cache/lanes/av1444d10/mksweep.sh` (a copy of the census's, unmodified), +invoked as `OUT=... DEPTHS=10 WIDTHS="320 352 416" HEIGHTS="242 250" bash mksweep.sh`. +The four other 4:4:4 10-bit cells named as controls reproduce byte-identically too +(sha256 in §4). + +Instrument: my own driver, `~/.cache/lanes/av1444d10/run.py` / +`corpus.py`, over the census's `cmp422.py` comparator — geometry parsed from +**aomdec's own y4m header**, never from a file size; per-plane spans from each +frame's own plane lengths; wrong sample counted at the stream's own sample depth +(2 B here, so a 10-bit difference in the top bits cannot hide); hard error on an +empty frame set. Both sides are `EC_AV1_FINAL_DUMP` (`.f` indexed by DECODE index, +hidden alt-refs included), so every total below is on the **decode-order** basis. + +--- + +## 1. Reproduction on my tip + +The census measured at its own parent. Nothing moved. `repro_before.json`: + +| cell | status | frames | Y | U | V | first bad (decode frame, plane, row, col, ours, oracle) | +|---|---|---|---|---|---|---| +| `s444_320x242_10b` | BYTE-EXACT | 17 | 0 | 0 | 0 | — | +| `s444_320x250_10b` | BYTE-EXACT | 17 | 0 | 0 | 0 | — | +| **`s444_352x242_10b`** | **DIVERGES** | 17 | **0** | **1166** | **1413** | **0, U, 224, 64, 209, 216** | +| `s444_352x250_10b` | BYTE-EXACT | 17 | 0 | 0 | 0 | — | +| `s444_416x242_10b` | BYTE-EXACT | 17 | 0 | 0 | 0 | — | +| `s444_416x250_10b` | BYTE-EXACT | 17 | 0 | 0 | 0 | — | + +17 of 17 decode frames carry at least one wrong sample, first bad at decode frame 0 +— identical to the census. **Comparator liveness, three planes, one run each:** with +the tip build the cell is `0/0/0`, and flipping bit 0 of the low byte of ONE oracle +sample per plane at decode frame 0 (so `+1` is exact by construction) moves the +count by exactly `+1` in that plane and leaves the other two at 0: + +``` +baseline (tip build) Y/U/V: 0 0 0 +flip Y (frame 0): Y +1 U +0 V +0 (abs 1/0/0) +flip U (frame 0): Y +0 U +1 V +0 (abs 0/1/0) +flip V (frame 0): Y +0 U +0 V +1 (abs 0/0/1) +``` + +Per-decode-frame Y/U/V, before (all 17 frames, every one bad): + +| frame | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | +|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| +| U | 53 | 54 | 54 | 54 | 170 | 54 | 162 | 54 | 58 | 54 | 61 | 54 | 54 | 61 | 61 | 54 | 54 | +| V | 51 | 51 | 51 | 52 | 160 | 52 | 158 | 52 | 58 | 52 | 158 | 52 | 51 | 156 | 156 | 52 | 51 | + +Y is 0 in every frame. The per-plane wrong-sample bounding box over all 17 frames is +`U rows 222..226, cols 63..118` and `V rows 222..226, cols 63..114`. + +--- + +## 2. PREDICTION or RESIDUAL: the filter chain is exonerated, and it is a PREDICTION defect + +The brief asked me to check the frame header before assuming the filter chain is +inert. It is inert here, and the check does not need the header: **the oracle's own +pre-filter dump equals the oracle's own final dump.** + +| oracle rung | what it is | frame-0 size | vs FINAL (low byte), every sample | +|---|---|---|---| +| `EC_AV1_PREFILT_DUMP` | after tile decode, before ANY loop filter, `p[c] & 0xFF` | 255 552 B (352x242x3, 1 B/sample) | **0 differences** | +| `EC_AV1_FINAL_DUMP` | after CDEF + superres + LR, u16 LE | 511 104 B | (the reference) | + +Both rungs narrow to the same projection (`narrow[c] = p[c] & 0xFF`, per the +rung's own `ec_dump_narrow_row`), so the comparison is apples to apples: **deblock, +CDEF, loop restoration and superres changed no low byte anywhere in this cell.** + +Ours, same way: our `EC_AV1_PREFILT_DUMP` (352x256 aligned, 1 B/sample) against the +oracle's over the crop region has **exactly 104 differences — U row 224 cols 64..116 +(53) and V row 224 cols 64..114 (51)** — i.e. the *same set* as our FINAL diff set, +and not one more. The defect is therefore pre-filter: **reconstruction**, and inside +reconstruction, **prediction, not residual**: + +| stage | measured | what it rules out | +|---|---|---| +| entropy decode | in lockstep: 17/17 frames on both sides, no desync, byte-identical bitstream parse | syntax / mode / coefficient read | +| residual (probe) | `res0 = [0,0,0,0,0,0,0,0]`, `rescol0 = [0,…]` on the owning unit; the residual is read identically on both sides | inverse transform, dequant | +| **prediction (probe)** | **the owning unit's prediction buffer is wrong**: see §3 | — | +| deblock / CDEF / LR / superres | oracle PREFILT == oracle FINAL, low byte, every sample | all four | + +`EC_PRED=1` on our side (the `OUR_PRED` / `OUR_RECON` rungs, `decode.rs:4650`) prints, +for the owning unit: + +```text +OUR_PRED x=64 y=224 plane=1 side=32 mode=0 sum=442144 row0=[209 x32] col0=[209,216,216,…] +``` + +against the oracle's, which for that block prints **nothing at all** — because the +oracle's `EC_PREDND` only fires for non-directional predictions and a palette block +returns before it. Aligning the two traces by `(plane, txw, txh, sum)` (the oracle's +`mi_row`/`mi_col` in that print are not pixel/8, so coordinates do not align) the +sides agree on every event until this one, where ours has TWO extra +`plane=1 txw=32 txh=32 mode=0` events the oracle does not have. + +--- + +## 3. The owning block, and the named expression + +**Block.** A 32x64 luma strip at pixel (64, 192) — the oracle's own rung says +`plane=0 row_off=0 col_off=0 txw=32 txh=64`. At `ss_x = ss_y = 0` its chroma plane +block is **also 32x64**, which `decode_block_rect` tiles into `nh = 2` units of 32x32 +at pixel (64, 192) and **(64, 224)**. + +**Chroma mode: PALETTE.** `EC_DEBUG_PAL=1` shows the unit at (64, 224) consuming a +2048-entry (= 32x64, the whole plane block) palette prediction buffer handed over by +`set_palette_pred` at `decode.rs:20086`, with `stale=false`. `EC_PRED=1` on our side +confirms the `pred: Option>` override was taken (`pred_opt=true`) while the +neighbouring block at (96, 224) took the ordinary `PAETH_PRED` path +(`pred_opt=false`). + +**THE EXPRESSION — ours vs libaom.** + +| | libaom | ours (before) | +|---|---|---| +| where a palette chroma unit's prediction comes from | `av1_visit_palette` → `av1_predict_intra_block_palette` (`reconintra.c:1707`) hands `av1_predict_intra_block` a `ref` pointer at the unit's own origin, and `read_coeffs` walks the plane block with each unit's own `blk_row`/`blk_col` | `FrameCtx::palette_pred` (thread-local `Option>`), `decode.rs:20086`, handed **the whole block buffer** | +| the read | the unit's pixels are the unit's | `PlaneBuf::reconstruct` (`decode.rs:21336`) does `prediction[idx]` for `idx in 0..side*side` (write loop at `decode.rs:21406-21433`) — **the first `side*side` entries, i.e. always the buffer's top-left corner** | + +So on the 32-capped tiled chroma walk, unit (0, 1) at pixel (64, 224) reconstructed +**the block's row-192 palette values** (flat 209) where libaom writes **row 224's** +(216). Both arms were wrong: the `uw == uh` square-unit arm (`decode.rs:20086`) and +the rect-unit arm (`decode.rs:20140`) — both line numbers PRE-fix, quoted as they stood +at `ed7c99bc`. + +`palette_window` already existed for exactly this (`decode.rs:2968-2974`: "A unit reads +its prediction at ITS OWN stride, so handing it the whole-block buffer makes every +unit reconstruct the block's top-left corner … the luma split-transform paths already +window; the chroma ones did not"). Its doc comment records the 4x4 **lossless** chroma +instance as fixed. The 32-capped 4:4:4 instance was still un-windowed: the same +defect, a second walk. + +**Why 53 wrong columns and not 32 — the halo is the same bug, not a second one.** +Unit (0,1) writes 209 at col 95, row 224. The neighbouring 32x32 `PAETH_PRED` block at +(96, 224) has that pixel as its left edge, and `EC_DEBUG_EDGES=1` prints its edges as + +```text +above=[216 x18, 215, 220, 228, 185, 95, 49, 59, 63, 63, 64, 64, 65, 64, 63] +left =[209, 216, 216, …] corner=216 +``` + +`paeth(above, left[0], corner)` with `left[0]=209` returns `left` exactly where +`|above − corner| <= |above + left − 2·corner|`, i.e. for `above ∈ {216, 215}` — 19 +columns — and returns `above` for `above ∈ {220, 228}` (the two columns where it is +wrong for the other reason) and from col 117 on. That reproduces our observed row +`[209 x19, 216, 216, 185, 95, …]` term for term, and the 53 = 32 + 19 + 2 span the +census measured. **One defect, one fix, both symptoms.** I did not chase the halo as a +second bug, and §4 shows the fix removes it. + +**The fix** (post-commit `decode.rs:20106-20113` and `:20164-20172`): + +```rust +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, +); +``` + +--- + +## 4. The geometry question, answered + +The brief asked what 352x242 has that 320x242 / 352x250 / 416x242 / 416x250 do not. +Measured, it is **not** a partial column at a block or tile boundary, not a plane +extent landing on a 4:4:4 granularity edge, and not a sub-8x8 leaf at the right edge. +It is: + +> **a block whose CHROMA is taller than the 32-pixel unit cap at `ss (0,0)`, so +> `decode_block_rect`'s chroma walk has `nh = 2` and every unit after the first is +> handed the wrong window.** + +`352 = 5.5 superblocks at 64` and `242` odd were the census's tells, and both are real +facts about the frame — but neither is the discriminator, which is why the census could +only say "geometry-sensitive". The 416x250 cell has an odd height too and is exact; +the 352x250 cell has the same width and is exact; 320x242 has the same odd height and +is exact. What separates 352x242 is that its partition happens to contain a 32x64 +chroma plane block with a UV palette. + +Same recipe, same 10-bit depth, six cells, before → after: + +| cell | sha256 (16) | before | after | +|---|---|---|---| +| `s444_320x242_10b` | `e73548ca94270469` | 0 / 0 / 0 | **0 / 0 / 0** | +| `s444_320x250_10b` | `a6dfbd67f3ff662f` | 0 / 0 / 0 | **0 / 0 / 0** | +| **`s444_352x242_10b`** | `84df2f37cc7982f9` | **0 / 1166 / 1413** | **0 / 0 / 0** | +| `s444_352x250_10b` | `a46036e9926dc0db` | 0 / 0 / 0 | **0 / 0 / 0** | +| `s444_416x242_10b` | `48a48fa8596887d4` | 0 / 0 / 0 | **0 / 0 / 0** | +| `s444_416x250_10b` | `5973d87cc934cbb7` | 0 / 0 / 0 | **0 / 0 / 0** | + +(The five controls were already exact before the fix and are unchanged after it, so the +fix is not "the comparator got weaker" — the cell that moved is the only one that +could.) + +--- + +## 5. The gate + +Committed, reachable, and it bites. + +```text +fixture crates/ec-av1/fixtures/444_lossy_palette_chroma_352x242_10b.obu +sha256 84df2f37cc7982f9a572443d85dfcc13bf366a64f3fb567391dcd5acd58a0ad2 +size 24875 B +FNV-1a64 0x7fda_dbb4_3bbf_9af3 +gate stream::tests::a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit +reach decode::chroma_palette_window_hits() (reset_chroma_palette_window_hits() first) +``` + +Four non-vacuity arms, all required to pass: + +1. the pinned bytes — length 24 875 and FNV-1a64 `0x7fda_dbb4_3bbf_9af3` (a missing + file is a **failure**, not a skip); +2. 16 shown frames at 352x242 with `f.u.len() == 352*242` — full-resolution chroma, so + a decoder that kept the 4:2:0 extent cannot pass the byte compare; +3. `chroma_palette_window_hits()` read as a **delta** with a **measured floor of 4** + (two tiled palette chroma blocks x U and V). It is incremented on the two fixed + lines and nowhere else, so a gate that passed without them running would be + gate-blind-to-feature, not byte-exact; +4. the oracle comparator has its own per-plane one-byte-flip liveness control in the + crate (`every_oracle_comparator_reds_on_a_one_byte_wrong_oracle`), and my own + three-plane flip run above. + +**Green:** + +```text +a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit: + fixtures/444_lossy_palette_chroma_352x242_10b.obu 17 decode-order frame(s) + (1 hidden) byte-exact vs aomdec, 4 windowed palette chroma unit(s) +test result: ok. 1 passed; 0 failed +``` + +**Mutation proof — red, by name, then green.** The two `palette_window` calls were +replaced by the whole-buffer hand-off, the `hit!` left in place so the reachability arm +still fires (the gate must bite on the BYTES, not on the counter): + +```text +thread 'stream::tests::a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit' +panicked at crates/ec-av1/src/stream.rs:10848:17: +a_444_lossy_palette_chroma_unit_window_is_byte_exact_at_352x242_10bit: + decode-order frame 0 of 17 (16 shown, 1 hidden) differs from the oracle at + byte 328192 (ours 209 vs 216), 104 bytes differ +test result: FAILED. 0 passed; 1 failed +``` + +Byte 328192 = frame 0, past the 170 368-byte Y plane, `157824 / 2 = 78 912` samples +in = `row 224, col 64` — **the census's own first bad sample**, from a gate written +after the fix. Restored: green (the message above). + +--- + +## 6. Corpus-wide, every committed fixture + +All 106 `.obu` files under `crates/ec-av1/fixtures/`, both binaries, same instrument, +same comparator, decode-order basis. Base = `ed7c99bc` build; tip = this lane. + +| | BYTE-EXACT | DIVERGES | REFUSES (by name) | oracle refused | +|---|---|---|---|---| +| base `ed7c99bc` | 95 | **1** | 9 | 1 | +| tip `eb73ef89` | **96** | **0** | 9 | 1 | + +The single status change is `444_lossy_palette_chroma_352x242_10b`: `DIVERGES +(0/1166/1413)` → `BYTE-EXACT`. No fixture changed status in the other direction and no +sample count moved on any exact cell. + +The 9 refusals are the 4:2:2 fixtures, all with the sequence-header refusal string +(`unsupported: AV1 decode_stream (a chroma format of 4:2:2 (su…`) — untouched by this +lane; the 4:2:2 header guard was not read for edit and is not in either diff. The one +oracle refusal is `440_request_is_422.obu`, a request-only file aomdec itself rejects. + +--- + +## 7. Regression + +```text +cargo test -p ec-av1 --lib -- 444 420 lossless warp intra \ + --skip bitrate_target_lands_within_5_percent_over_48_frames +test result: ok. 178 passed; 0 failed; 2 ignored; 0 measured; 623 filtered out; 302.41s +``` + +The two ignored are pre-existing `#[ignore]`d gates, not new ones — this lane adds no +`#[ignore]`. + +--- + +## 8. What I did NOT do, and what a reviewer should attack + +* **Not a superblock/tile-boundary, odd-dimension or sub-8 defect.** I checked the + three hypotheses the brief named and refuted all three on the controls: same-depth + same-width (352x250), same-depth same-height (320x242, 416x242) and wider 4:4:4 at + the same odd height are all exact. The discriminator is chroma unit count. +* **No filter stage involved**, and that is measured, not assumed (§2). +* **Not the 4:2:0 group-tail chroma SKIP arm** — different format, different write + path, and that arm is left exactly as it was. +* **The 4:2:2 sequence-header guard was not touched.** Both diffs are + `decode.rs` (the two `palette_window` arms + the counter) and `stream.rs` (the gate), + plus one new binary fixture. +* **The mutation proof is the strongest single check here and it is honest**: the + windowing was removed while the counter stayed, so the byte compare — not the + reachability assert — is what reddened. +* **What a reviewer should attack first.** The counter's floor of 4 is measured on this + one stream. It is a *reachability* floor, not a census: a second palette-chroma + fixture would move it, and the gate would then need its floor re-measured. The + byte-exactness arm is the one that carries the exactness claim and it does not + depend on the number. +* **Not swept beyond the one walk.** I audited every `set_palette_pred` call site in + `decode.rs` (~100). All the others either pass a whole-block buffer to exactly ONE + push (correct by construction) or already window with `palette_window`. The two I + changed were the only whole-buffer hand-offs inside a tiled unit loop. I did not + build a 4:4:4 12-bit or a `nw > 1` variant to prove the `nw > 1` arm; on this + stream `nw == 1` always and the horizontal windowing is unmeasured. + +--- + +## 9. Handover + +* Fixed lines: `crates/ec-av1/src/decode.rs:20106-20113` and `:20164-20172` + (`palette_window` in the two arms of `decode_block_rect`'s 32-capped tiled chroma + walk). +* Counter: `decode.rs:2721-2743` (`CHROMA_PALETTE_WINDOW_HITS`, + `chroma_palette_window_hits` at `:2734`, `reset_chroma_palette_window_hits` at + `:2741`). +* Gate: `crates/ec-av1/src/stream.rs:50715-50823`. +* Fixture: `crates/ec-av1/fixtures/444_lossy_palette_chroma_352x242_10b.obu`. +* Driver + instruments (not committed; probe evidence): + `~/.cache/lanes/av1444d10/{run.py,corpus.py,cmp422.py,mksweep.sh,sweep/,work/,stage/}`, + results `repro_before.json`, `after.json`, `corpus_base.json`, `corpus_tip.json`, + `flipctl.txt`. + +The census was right that this cell diverged and right that it was outside the 4:2:2 +question. It was not, however, "geometry-sensitive" in the way its own framing +implies: **352x242's distinction is not frame width or height at all — it is the +number of CHROMA TRANSFORM UNITS in one block.** +