diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 08187edb..a852ed77 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -14212,6 +14212,11 @@ impl PlaneBuf<'_> { ); } let residual = dense_residual(residual, bw * bh); + if crate::envflags::env_flag!("EC_DBG192") && y == 168 && (x == 224 || x == 232) { + let res0: Vec = residual[..bw.min(8)].to_vec(); + let pred0: Vec = prediction[..bw.min(8)].to_vec(); + eprintln!("DBG192 rect x={x} y={y} bw={bw} bh={bh} mode={mode} pred0={pred0:?} res0={res0:?}"); + } for row in 0..bh { // Same bottom/right frame-edge clip as [`Self::reconstruct`]'s // (lane-sb128c r8) -- a 64x128 block at the right edge of a frame @@ -14337,6 +14342,11 @@ impl PlaneBuf<'_> { ); } let residual = dense_residual(residual, side * side); + if crate::envflags::env_flag!("EC_DBG192") && y == 168 && (x == 224 || x == 232) { + let res0: Vec = residual[..side.min(8)].to_vec(); + let pred0: Vec = prediction[..side.min(8)].to_vec(); + eprintln!("DBG192 sq x={x} y={y} side={side} mode={mode} cfl={} pred0={pred0:?} res0={res0:?}", cfl.is_some()); + } for row in 0..side { // lane-sb128c r8: libaom's frame buffer is superblock // aligned; ours is padded to 32 (`block_grid`), so a 64x64 diff --git a/lanes/av1444.report.md b/lanes/av1444.report.md index ef498b46..d7036bc0 100644 --- a/lanes/av1444.report.md +++ b/lanes/av1444.report.md @@ -176,6 +176,56 @@ Full suite NOT run this round (budget wall). 4. Full suite `--test-threads=1` (NOT run this round), 0-warning parity (build IS warning-clean), update this report. +## Continuation 6 (2026-09-23, Tuna — budget-wall WIP) + +Round-5's frame-18 target was mis-aimed: the visible 2-pixel U diff is +INHERITED. Per-frame prefilt diff (EC_AV1_PREFILT_DUMP, crop-aware): +f0..f18 byte-exact (f1: one V sample (224,272) ours +1, non-propagating), +**f19 (hidden) = 122 U/V diffs** around rows 168..179 / cols 225..247, +f20 = exactly the known 2 U samples, f22 = 50 U diffs. The root lives in +hidden frame idx 19; f20/f22 inherit it through MC. + +Enum correction (class stale-assumption): libaom's UV_PREDICTION_MODE has +UV_CFL_PRED **at index 13** (after PAETH/SMOOTH_H), not 1; uv=1 is +UV_V_PRED. So f19's leaf (42,56) is V_PRED (not CFL) and leaf (42,58) is +**CFL** (not smooth/palette). Round-5's read_palette_colors_uv suspicion +was a dead end — the (42,56) block reads no palette and (42,58) reads no +palette; both sides' PALSYN rows agree rng-for-rng (47240 anchor). + +Verified bit-exact this round (instrumented C-only oracle build at +~/.cache/aom-oracle/build-c plus new EC_DQCOEFF / EC_PREDB8 / EC_TXIN8 / +EC_TXOUT8 / EC_FINAL8 dumps): coefficient levels+signs, dqcoeff grids +(OUR_DQ == aom EC_DQCOEFF after reading aom's buffer column-major), +qindex 123 (delta-q applied correctly on both sides), quant tables, the +dequant formula, the 1D idct8 + row/col shift composition (python replica +matches oracle TXIN/TXOUT exactly), CFL weights/scaling, and the leaf's +residual: OUR res0 == aom TXOUT row0 exactly +([14,-31,-67,-63,-17,5,-17,-23]). + +**Localized defect:** f19 leaf (42,58) V (UV_CFL_PRED, alpha=-1): aom +composes base 146 + CFL + residual; ours composes base **145** + identical +CFL + identical residual → every sample exactly -1. The -1 is in the +chroma DC_PRED base: aom 146 = round((Σabove 960 + Σleft 1369)/16) with +Σleft including (175,231)=166; our 145 is one rounding/edge-sample step +off (candidates: missing rounding bias (2329>>4), or the left edge sample +set). Our (168,231)=180 vs aom 181 is leaf A's own diff, not leaf B's +edge (smooth_v not in play; leaf B's below-left (175,231)=166 identical). + +Still open (next steps): 1) pin the DC_PRED edge/rounding divergence in +our intra DC path for this leaf (DBG192 build committed: EC_DBG192=1 +dumps pred0/res0 at x=224/232 y=168); 2) leaf (42,56) V_PRED's scattered +±1 U/V diffs (base = clean above-row copy, residual identical ⇒ its own +edge/availability wrinkle — needs the same treatment); 3) f1's single V +sample; 4) re-run the fixture end-to-end + witness gate + regression +arms + full suite after the fix. + +Oracle/oracle-build notes: EC_AV1_PREFILT_DUMP crops at true dims on the +aom side; ours writes padded planes (Y 240x320, U/V stride 320 with a +16-row top border, offsets 81920 / 163840 in the fN file). aomdec's +EC_COEFF `pos` is a zigzag raster pos; EC_COEFF_VAL is per-unit, not +per-coefficient. The f9 unit at the same mi/rng anchor was a red herring +— always pair units by EC_FINAL8 pixel values, not by rng. + ## Continuation 5 (2026-09-23, Semiha) Round-4's wall was misdiagnosed: aom's divergent eob read was