From c043c60b2ecab93c10cac47fee0902c3175e644c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Sep 2026 03:57:17 +0300 Subject: [PATCH] docs(palette2): r11 report -- merge of main 096f4b8, seed 46 localized to one block (entropy exact) The seed-46 gate is still RED and is NOT a lane regression in the entropy sense: the whole frame's symbol ladder is bit-exact vs instrumented aomdec, the mismatch is pre-loop-filter and confined to the frame's last superblock, and the first defective block is the TL 16x16 of a 32x32 PARTITION_VERT_A at px(128,64) (mode 7 / D203). Palette code, filter intra and the loop filter are ruled out with artifacts. Suite was still running at the tool cap. --- lanes/palette2-r11.report.md | 101 +++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 lanes/palette2-r11.report.md diff --git a/lanes/palette2-r11.report.md b/lanes/palette2-r11.report.md new file mode 100644 index 00000000..1ed437e6 --- /dev/null +++ b/lanes/palette2-r11.report.md @@ -0,0 +1,101 @@ +# lane-palette2 r11 -- merged main 096f4b8; the "regression" is a pre-existing defect the lifted refusal was hiding, localized to one block + +VERDICT: AMBER. STEP 1 (merge) done and committed. STEP 2 (seed 46) NOT fixed: +root cause is *not* the lane's palette code -- the entropy stream of seed 46 is +bit-exact against libaom for every symbol of the frame, and the mismatch is a +pure reconstruction defect in the last superblock of a screen-content frame, +which main never decodes because it refuses that frame class outright. The gate +stays RED; the lane must not merge until it is green. + +## STEP 1 -- merge main 096f4b8 (commit eb9472d) +`git merge --no-commit --no-ff main` -> one conflict only (`refusal_inventory.rs`); +`decode.rs`/`stream.rs`/`cdf.rs` auto-merged. +- `cdf.rs`: `git diff main -- crates/ec-av1/src/cdf.rs` = EMPTY, so main's NZ_MAP + tables are byte-for-byte; main's deletion of + `nz_map_ctx_offset_tables_match_the_rect_rule` taken (only + `base_ctx_rect_offsets_match_the_transcribed_tables_over_the_whole_domain` + remains, and it passes). +- `refusal_inventory.rs`: kept main's `"a superblock-level partition value + outside PARTITION_NONE..PARTITION_VERT_4"` + the lane's two palette strings; + dropped three strings no longer emitted by any `unsupported(` site (the + superblock 1:4 partition, `LAST_FRAME (round 2)`, `palette block with a split + luma transform (round 1)`) and main's screen-content strip string (the lane + lifted it; only a comment mentions it now). `refusal_inventory` + + `gate_coverage` green. +- `decode.rs` fix required by the merge (`decode_block_rect64`, main's SB-level + 1:4/HORZ-VERT path, ~decode.rs:5265): main's `RectStripModes` literal there + lacked the lane's `palette_y`/`palette_uv` fields (compile error), and its + split-tx early return had no palette neighbour stamp -- the SAME shape r10 + root-caused in `decode_block_rect`. Both applied, plus the + `PALETTE_SPLIT_TX_HITS` bump, so the class is closed at both sites (`grep -n + 'return Ok(())'` in the rect decoders: 2 hits, both stamped). +- NOTE: main moved to `5d33392` (lane-sub8merge, mi-granular y/uv mode maps) + WHILE this round ran. This lane is merged with 096f4b8, not 5d33392. + `deferred: merge main 5d33392 -- appeared mid-round -- next round's STEP 1`. + +## STEP 2 -- seed 46: what it actually is +Regenerated exactly (aomenc recipe copied from the gate, seed 46 gradients): +`s46.obu` 146 B, sha256 `a109adab439706035728f9348aba0801e06afa1f571540ce433a103a94377421`. + +1. **The entropy stream is exact.** `EC_TRACE_MODE_STEP=1` ladders from ours and + from the instrumented aomdec, aligned symbol by symbol (284 aomdec ISTEP + lines vs our 270 -- the 14-line gap is only the 8 rect strips, whose + `use_filter_intra`/`tx_depth` we print under `TRACE_RECT_*` instead): + **every common (name, value, range) triple matches**, including the rect + strips' own values read back from `TRACE_RECT_IMODE` (e.g. mi(8,40) + tx_depth rng=50787 on both sides). So the lifted screen-content refusal did + NOT introduce a desync: our rect palette syntax reads consume exactly what + libaom consumes (8 strips, all `allow_screen_content_tools=1`, all + `use_palette=0`). +2. **It is reconstruction, and it is not the loop filter.** `EC_AV1_PREFILT_DUMP` + ours vs aomdec: 2165 luma samples already wrong before filtering (post-filter + 2242), bbox x136..191 y64..127 -- i.e. exactly the FRAME'S LAST SUPERBLOCK + (128,64). Every other superblock, including the right-edge SB(128,0) and the + bottom-row SB(0,64)/(64,64), is byte-exact. +3. **First wrong block pinned.** In decode order the first defective block is the + TL 16x16 of a 32x32 `PARTITION_VERT_A` at px(128,64) (aomdec + `EC_IMODE mi_row=16 mi_col=32 bsize=6`, mode 7 = D203_PRED, uv 7, skip=0, + tx_depth=0). Its error is a 25-pixel diagonal wedge in rows 68..71, + x136..143, deltas +7..-116; the two 16x16 above it and everything left of + x128 are exact. The wedge then propagates: 16x32 strip at (144,64) 246/512, + 16x16 (160,64) 141/256, (176,64) 194/256, 32x16 (160,80) 512/512, 32x32 + (160,96) 1024/1024; the 32x32 at (128,96) is 0/1024. +4. Suspects RULED OUT this round: the `PALETTE_PRED` override wrapper and the + per-TU palette window (no block in this stream uses a palette -- every + `palette_y_mode`/`palette_uv_mode` symbol reads 0, so `set_palette_pred` is + never called); filter intra (`use_filter_intra` = 0 on every strip here); + any entropy-side cause (point 1); the loop filter (point 2). Availability was + checked by hand against `has_bottom_left` in the oracle source + (`~/.cache/aom-oracle/src/av1/common/reconintra.c`): for that TL block + `blk_col_in_sb == 0`, so libaom takes the leftmost-column branch + (`row_off_in_sb + 4 < 16` -> available) and never reaches the + partition-keyed `has_bl_table`; our `Reach::bottom_left`'s `col == 0` branch + returns the same, so the `VERT_AB_PARTITION` guard is NOT implicated for + this block. + `fix-now: r12 -- next step is to dump the TL block's prediction and residual + separately (EC_DEBUG_EDGES + EC_TRACE_COEFF) against libaom's; the wedge + shape with the entropy stream exact points at the inverse transform's + tx_type/scan for a D203 16x16 in the corner superblock, or at the intra edge + filter/upsample decision, not at availability.` + +## Files changed +- `crates/ec-av1/src/decode.rs` -- `decode_block_rect64` split-tx arm: palette + prediction fields + palette neighbour stamp at the early return. +- `crates/ec-av1/src/refusal_inventory.rs` -- merge resolution (list above). + +## EVIDENCE +EVIDENCE: scratchpad/s46.obu (146 B, sha256 a109adab4397...) + aomstep.log/ourstep.log | `EC_TRACE_MODE_STEP=1` on instrumented aomdec and on `decode_probe`, aligned by (mi_row, mi_col, name) | every common triple identical; only the 14 rect-path lines we print under other names are missing -- entropy exact +EVIDENCE: scratchpad/ourpre.yuv.f0 vs aompre.yuv.f0 | `EC_AV1_PREFILT_DUMP` both decoders, same stream | 2165 luma samples differ, bbox x136..191 y64..127 (the last superblock only); post-filter 2242, so the loop filter is not the source +EVIDENCE: scratchpad (per-block diff map) | counted prefilter diffs inside every block aomdec reported for SB(128,64) | first defective block = TL 16x16 at px(128,64) of a 32x32 VERT_A, 25/256 wrong, wedge rows 68..71 + +## STEP 3 -- suite status at the turn cap +`systemd-run --user --unit=palette2-suite-r11-1788310477` (full `cargo test -p ec-av1 --lib +-- --test-threads=1`, log `$HOME/.cache/palette2-suite-r11.log`) was still RUNNING when this +round hit its tool cap -- no `test result` line yet, so NO suite totals are claimed for r11. +The three tests run by name on the merged tree before it started: +`refusal_inventory` (3 tests) and `gate_coverage` (7 tests) PASS; +`a_real_aomenc_stream_with_filter_intra_on_a_horz_vert_strip_decodes_pixel_exact` FAILS, +same message as r10 (seed 46, first luma mismatch (188,62) ours=116 ffmpeg=115, 2242 samples, +bbox x135..191 y62..127). +`deferred: full-suite totals -- run was mid-flight at the cap -- read +$HOME/.cache/palette2-suite-r11.log (unit palette2-suite-r11-1788310477) at the start of r12`.