R11 report -- merge of main 096f4b8, seed 46 localized to one block (entropy exact)
Browse files at this commitc043c60b2ecab93c10cac47fee0902c3175e644cParent: 652ab0d- docs
- r11 report -- merge of main 096f4b8, seed 46 localized to one block (entropy exact)
1 changed file +101 -0
- lanes/palette2-r11.report.md +101 -0
lanes/palette2-r11.report.mdadded+101 -0
| @@ -0,0 +1,101 @@ | |||
| 1 | +# lane-palette2 r11 -- merged main 096f4b8; the "regression" is a pre-existing defect the lifted refusal was hiding, localized to one block | ||
| 2 | + | ||
| 3 | +VERDICT: AMBER. STEP 1 (merge) done and committed. STEP 2 (seed 46) NOT fixed: | ||
| 4 | +root cause is *not* the lane's palette code -- the entropy stream of seed 46 is | ||
| 5 | +bit-exact against libaom for every symbol of the frame, and the mismatch is a | ||
| 6 | +pure reconstruction defect in the last superblock of a screen-content frame, | ||
| 7 | +which main never decodes because it refuses that frame class outright. The gate | ||
| 8 | +stays RED; the lane must not merge until it is green. | ||
| 9 | + | ||
| 10 | +## STEP 1 -- merge main 096f4b8 (commit eb9472d) | ||
| 11 | +`git merge --no-commit --no-ff main` -> one conflict only (`refusal_inventory.rs`); | ||
| 12 | +`decode.rs`/`stream.rs`/`cdf.rs` auto-merged. | ||
| 13 | +- `cdf.rs`: `git diff main -- crates/ec-av1/src/cdf.rs` = EMPTY, so main's NZ_MAP | ||
| 14 | + tables are byte-for-byte; main's deletion of | ||
| 15 | + `nz_map_ctx_offset_tables_match_the_rect_rule` taken (only | ||
| 16 | + `base_ctx_rect_offsets_match_the_transcribed_tables_over_the_whole_domain` | ||
| 17 | + remains, and it passes). | ||
| 18 | +- `refusal_inventory.rs`: kept main's `"a superblock-level partition value | ||
| 19 | + outside PARTITION_NONE..PARTITION_VERT_4"` + the lane's two palette strings; | ||
| 20 | + dropped three strings no longer emitted by any `unsupported(` site (the | ||
| 21 | + superblock 1:4 partition, `LAST_FRAME (round 2)`, `palette block with a split | ||
| 22 | + luma transform (round 1)`) and main's screen-content strip string (the lane | ||
| 23 | + lifted it; only a comment mentions it now). `refusal_inventory` + | ||
| 24 | + `gate_coverage` green. | ||
| 25 | +- `decode.rs` fix required by the merge (`decode_block_rect64`, main's SB-level | ||
| 26 | + 1:4/HORZ-VERT path, ~decode.rs:5265): main's `RectStripModes` literal there | ||
| 27 | + lacked the lane's `palette_y`/`palette_uv` fields (compile error), and its | ||
| 28 | + split-tx early return had no palette neighbour stamp -- the SAME shape r10 | ||
| 29 | + root-caused in `decode_block_rect`. Both applied, plus the | ||
| 30 | + `PALETTE_SPLIT_TX_HITS` bump, so the class is closed at both sites (`grep -n | ||
| 31 | + 'return Ok(())'` in the rect decoders: 2 hits, both stamped). | ||
| 32 | +- NOTE: main moved to `5d33392` (lane-sub8merge, mi-granular y/uv mode maps) | ||
| 33 | + WHILE this round ran. This lane is merged with 096f4b8, not 5d33392. | ||
| 34 | + `deferred: merge main 5d33392 -- appeared mid-round -- next round's STEP 1`. | ||
| 35 | + | ||
| 36 | +## STEP 2 -- seed 46: what it actually is | ||
| 37 | +Regenerated exactly (aomenc recipe copied from the gate, seed 46 gradients): | ||
| 38 | +`s46.obu` 146 B, sha256 `a109adab439706035728f9348aba0801e06afa1f571540ce433a103a94377421`. | ||
| 39 | + | ||
| 40 | +1. **The entropy stream is exact.** `EC_TRACE_MODE_STEP=1` ladders from ours and | ||
| 41 | + from the instrumented aomdec, aligned symbol by symbol (284 aomdec ISTEP | ||
| 42 | + lines vs our 270 -- the 14-line gap is only the 8 rect strips, whose | ||
| 43 | + `use_filter_intra`/`tx_depth` we print under `TRACE_RECT_*` instead): | ||
| 44 | + **every common (name, value, range) triple matches**, including the rect | ||
| 45 | + strips' own values read back from `TRACE_RECT_IMODE` (e.g. mi(8,40) | ||
| 46 | + tx_depth rng=50787 on both sides). So the lifted screen-content refusal did | ||
| 47 | + NOT introduce a desync: our rect palette syntax reads consume exactly what | ||
| 48 | + libaom consumes (8 strips, all `allow_screen_content_tools=1`, all | ||
| 49 | + `use_palette=0`). | ||
| 50 | +2. **It is reconstruction, and it is not the loop filter.** `EC_AV1_PREFILT_DUMP` | ||
| 51 | + ours vs aomdec: 2165 luma samples already wrong before filtering (post-filter | ||
| 52 | + 2242), bbox x136..191 y64..127 -- i.e. exactly the FRAME'S LAST SUPERBLOCK | ||
| 53 | + (128,64). Every other superblock, including the right-edge SB(128,0) and the | ||
| 54 | + bottom-row SB(0,64)/(64,64), is byte-exact. | ||
| 55 | +3. **First wrong block pinned.** In decode order the first defective block is the | ||
| 56 | + TL 16x16 of a 32x32 `PARTITION_VERT_A` at px(128,64) (aomdec | ||
| 57 | + `EC_IMODE mi_row=16 mi_col=32 bsize=6`, mode 7 = D203_PRED, uv 7, skip=0, | ||
| 58 | + tx_depth=0). Its error is a 25-pixel diagonal wedge in rows 68..71, | ||
| 59 | + x136..143, deltas +7..-116; the two 16x16 above it and everything left of | ||
| 60 | + x128 are exact. The wedge then propagates: 16x32 strip at (144,64) 246/512, | ||
| 61 | + 16x16 (160,64) 141/256, (176,64) 194/256, 32x16 (160,80) 512/512, 32x32 | ||
| 62 | + (160,96) 1024/1024; the 32x32 at (128,96) is 0/1024. | ||
| 63 | +4. Suspects RULED OUT this round: the `PALETTE_PRED` override wrapper and the | ||
| 64 | + per-TU palette window (no block in this stream uses a palette -- every | ||
| 65 | + `palette_y_mode`/`palette_uv_mode` symbol reads 0, so `set_palette_pred` is | ||
| 66 | + never called); filter intra (`use_filter_intra` = 0 on every strip here); | ||
| 67 | + any entropy-side cause (point 1); the loop filter (point 2). Availability was | ||
| 68 | + checked by hand against `has_bottom_left` in the oracle source | ||
| 69 | + (`~/.cache/aom-oracle/src/av1/common/reconintra.c`): for that TL block | ||
| 70 | + `blk_col_in_sb == 0`, so libaom takes the leftmost-column branch | ||
| 71 | + (`row_off_in_sb + 4 < 16` -> available) and never reaches the | ||
| 72 | + partition-keyed `has_bl_table`; our `Reach::bottom_left`'s `col == 0` branch | ||
| 73 | + returns the same, so the `VERT_AB_PARTITION` guard is NOT implicated for | ||
| 74 | + this block. | ||
| 75 | + `fix-now: r12 -- next step is to dump the TL block's prediction and residual | ||
| 76 | + separately (EC_DEBUG_EDGES + EC_TRACE_COEFF) against libaom's; the wedge | ||
| 77 | + shape with the entropy stream exact points at the inverse transform's | ||
| 78 | + tx_type/scan for a D203 16x16 in the corner superblock, or at the intra edge | ||
| 79 | + filter/upsample decision, not at availability.` | ||
| 80 | + | ||
| 81 | +## Files changed | ||
| 82 | +- `crates/ec-av1/src/decode.rs` -- `decode_block_rect64` split-tx arm: palette | ||
| 83 | + prediction fields + palette neighbour stamp at the early return. | ||
| 84 | +- `crates/ec-av1/src/refusal_inventory.rs` -- merge resolution (list above). | ||
| 85 | + | ||
| 86 | +## EVIDENCE | ||
| 87 | +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 | ||
| 88 | +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 | ||
| 89 | +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 | ||
| 90 | + | ||
| 91 | +## STEP 3 -- suite status at the turn cap | ||
| 92 | +`systemd-run --user --unit=palette2-suite-r11-1788310477` (full `cargo test -p ec-av1 --lib | ||
| 93 | +-- --test-threads=1`, log `$HOME/.cache/palette2-suite-r11.log`) was still RUNNING when this | ||
| 94 | +round hit its tool cap -- no `test result` line yet, so NO suite totals are claimed for r11. | ||
| 95 | +The three tests run by name on the merged tree before it started: | ||
| 96 | +`refusal_inventory` (3 tests) and `gate_coverage` (7 tests) PASS; | ||
| 97 | +`a_real_aomenc_stream_with_filter_intra_on_a_horz_vert_strip_decodes_pixel_exact` FAILS, | ||
| 98 | +same message as r10 (seed 46, first luma mismatch (188,62) ours=116 ffmpeg=115, 2242 samples, | ||
| 99 | +bbox x135..191 y62..127). | ||
| 100 | +`deferred: full-suite totals -- run was mid-flight at the cap -- read | ||
| 101 | +$HOME/.cache/palette2-suite-r11.log (unit palette2-suite-r11-1788310477) at the start of r12`. | ||