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