forge
Explore
Log in

Don't you dare go Hollow

ec-av1: lane-av1-422kf -- the frame-0 U (0,23) first diff fixed: decode_rect_split's chroma_tiled arm never set the uv-palette prediction, so the square 4:2:2 chroma rows of a uv-palette strip decoded as plain DC (entropy in sync: pre-filter luma byte-exact and the unit's coefficient read pairs with aomdec by rng at both ends 48179/64520, levels identical); the arm now windows m.palette_uv per unit like every other chroma arm; U (0,23) decodes 49 == oracle, frame-0 U final diffs 4491->1774, V 4888->2165, pre-filter 3148->533, chroma422_square=24 (non-vacuity); remaining class named for the next lane at U (108,72)/V (48,0); header refusal stays unconditional, read_coeffs_rect untouched, cargo check 0 warnings, refusal-by-name + 420 aomenc gate green; report lanes/av1422kf.report.md

Browse files at this commit

d785309b2f40dd3b23f64abd7db82846ab28559eAhmet Kaan GümüşParent: 410f9c8
crates/ec-av1/src/decode.rsmodified+14 -0
@@ -10666,6 +10666,20 @@ fn decode_rect_split(
10666 ),10666 ),
10667 )10667 )
10668 });10668 });
10669+ // lane-av1-422kf: the palette colour map is consumed per
10670+ // unit here like every other chroma arm (`av1_visit_palette`
10671+ // feeds the whole plane block; window it to this unit).
10672+ // Without this the square chroma rows decoded a uv-palette
10673+ // strip's chroma as plain DC (class same-symbols-silent-
10674+ // prediction: the rng stayed in sync, only the prediction
10675+ // was dropped).
10676+ if let Some((ub, vb)) = &m.palette_uv {
10677+ let buf = if plane_idx == 1 { ub } else { vb };
10678+ set_palette_pred(
10679+ palette_window(buf, chroma_w, cu_col * uw, cu_row * uh, uw, uh),
10680+ fctx,
10681+ );
10682+ }
10669 // 32x32 does not fit read_coeffs_rect's scratch (768). The10683 // 32x32 does not fit read_coeffs_rect's scratch (768). The
10670 // square reader is the path every other 32x32 chroma unit uses.10684 // square reader is the path every other 32x32 chroma unit uses.
10671 let levels = if uw == uh {10685 let levels = if uw == uh {
lanes/av1422kf.report.mdadded+82 -0
@@ -0,0 +1,82 @@
1+# lane-av1-422kf — the frame-0 U (0, 23) first diff: NAMED and FIXED (one
2+# missing arm in [`decode_rect_split`]'s chroma_tiled walk: the uv-palette
3+# prediction was never set, so the square 4:2:2 chroma rows decoded a
4+# uv-palette strip's chroma as plain DC)
5+
6+## Outcome
7+
8+1. NAMED the sample: frame 0, plane U, row 0, col 23, ours 50 vs oracle 49.
9+ The parent attributed the class to [`decode_rect_split`]'s own-chroma
10+ keyframe gap; this lane localized it to the exact unit and mechanism.
11+2. The owning unit: chroma 8x8 at chroma px (24, 0) — the square chroma of a
12+ 16x8 luma strip at luma px (48..63, rows 0..7) — pushed by
13+ [`decode_rect_split`]'s chroma_tiled `(8, 8)` arm through `read_plane`
14+ (backtrace: inline_intra ← read_plane ← decode_rect_split ←
15+ decode_leaf_rect).
16+3. Entropy PROVEN in sync: pre-loop-filter frame-0 LUMA is byte-exact against
17+ the oracle's `EC_AV1_PREFILT_DUMP`, and the U/V coefficient read of the
18+ unit pairs with the oracle by rng at BOTH ends (ours rng0=48179 / rng1=
19+ 64520 == the oracle's `EC_COEFF plane=1 tx_size=1 mi_row=0 mi_col=12
20+ rng=48179` and the following V unit's rng=64520). Same symbols, same
21+ levels (±1 at scan c=9/10/21, libaom dequant ±63 == ac_q(8-bit, 56)=63 —
22+ note the oracle's `pos=` fields are column-major; 3/4/6 there == raster
23+ 24/32/48 here), so the divergence was prediction-side only.
24+4. The paired oracle EC_ISTEP ladder for the strip (skip/cdef/dq/mode/
25+ angle_y/uv_mode/angle_uv — every value and rng identical to ours) plus the
26+ oracle's EC_PALSYN line (`y=2`) identified the mechanism: the strip is a
27+ **uv-PALETTE block**. Our `chroma_tiled` arm — uniquely among the chroma
28+ arms — never called `set_palette_pred`, so `read_plane` consumed no palette
29+ prediction and reconstructed plain DC (ours flat 97 where the oracle has
30+ the palette colour map). Class: same-symbols-silent-prediction.
31+5. FIX (14 lines, one arm): the chroma_tiled unit loop now sets the palette
32+ prediction per unit per plane (`palette_window` of `m.palette_uv` to the
33+ unit's rect), mirroring the skip/lossless/unsplit arms. 4:2:0 and 4:4:4
34+ untouched unless `m.palette_uv` is Some (previously broken output anyway).
35+6. MEASURED (pinned fixture, frame 0, single-frame cut sha256
36+ `3dd3f768ef553c02316848c2d3184c3765030c0a6fcb95887e4719add9ded3af` — first
37+ OBU prefix of the pinned 22-frame t422.obu; local `EC_AV1_ALLOW_422_PROBE`
38+ bypass, reverted byte-identical after):
39+ - U (0, 23) now decodes **49 == oracle final 49** — the named sample is
40+ EXACT.
41+ - U final diffs 4491 → **1774**; V final diffs 4888 → **2165**; U
42+ pre-filter recon diffs 3148 → **533**.
43+ - `chroma422_square` counter = 24 on this frame (the fixed arm provably
44+ ran; non-vacuity).
45+7. REMAINING class for the next lane: U pre-filter diffs now start at
46+ (108, 72) (rows 72..79, then 104+; V first diff (48, 0)) — chroma of the
47+ 16x8 strip at chroma (96, 72) and the 16x32 strip at (112, 64): NOT the
48+ palette arm fixed here (both decoded with their own modes); needs its own
49+ localization. Frame 0 is still not pixel-exact, so the
50+ "delete the header refusal" condition stays unmet.
51+
52+## Decision
53+
54+- The named col-23 sample WAS one arm in [`decode_rect_split`] — fixed, not
55+ punted. The frame-9 [`read_coeffs_rect`] scratch panic is untouched
56+ (another lane's, and the single-frame cut sidesteps it). The four TX_4X8
57+ chunk and the Some(3) offset are untouched. `read_coeffs_rect` untouched.
58+- Header refusal STAYS in `stream.rs`, unconditional (no env gate in the
59+ commit; verified firing by name without the env after revert).
60+
61+## Verification
62+
63+- `cargo check -p ec-av1` (target `~/.cache/cargo-target-av1422kf`): 0
64+ warnings, 0 errors.
65+- 420 gate green under `EC_AV1_REQUIRE_AOMENC=1`:
66+ `stream::tests::a_real_aomenc_stream_with_a_skipped_8x8_intra_leaf_
67+ whose_tx_split_decodes_pixel_exact`: 1 passed, 0 failed.
68+- `stream::tests::a_non_420_subsampled_sequence_header_is_refused_by_name`:
69+ 1 passed, 0 failed (and the example probe refuses the fixture by name
70+ without the env).
71+- `git diff` after the bypass revert carries ONLY the decode.rs fix; all
72+ temporary EC_KF422DBG/TEMPQM probes and the local bypass are out.
73+
74+## State
75+
76+- Commit on lane-av1-422kf (no push): the chroma_tiled palette fix + this
77+ report.
78+- Next stop named for the owning lane: U (108, 72) / V (48, 0) pre-filter
79+ recon class at the (96, 72) 16x8 and (112, 64) 16x32 strips' own chroma —
80+ same localization recipe applies (single-frame fixture + rng pairing
81+ against `$HOME/.cache/aom-oracle/build` aomdec, `EC_AV1_ALLOW_422_PROBE`
82+ local-only).