R1 report -- 2 refusals lifted with gates, recipe sweep, film probe
Browse files at this commit927a0fd818f9cf1fa9c2321ab9609704750e782eParent: aedec07- docs
- r1 report -- 2 refusals lifted with gates, recipe sweep, film probe
1 changed file +88 -0
- lanes/rectsplit-r1.report.md +88 -0
lanes/rectsplit-r1.report.mdadded+88 -0
| @@ -0,0 +1,88 @@ | ||
| 1 | +# lane-rectsplit r1 — HORZ/VERT strips with a split transform, and filter intra on a strip | |
| 2 | + | |
| 3 | +Branch `lane-rectsplit` off main `3808cf8`; continues the orchestrator's WIP snapshot | |
| 4 | +`c5de1b6` (previous builder's uncommitted state), commit `16baa0f` is this round. | |
| 5 | + | |
| 6 | +## What changed | |
| 7 | + | |
| 8 | +- `crates/ec-av1/src/decode.rs:3159` `decode_rect_split` (from the WIP snapshot, kept): | |
| 9 | + a HORZ/VERT strip with `tx_depth != 0` predicts and reconstructs PER TRANSFORM UNIT in | |
| 10 | + raster order (spec 5.11.36), each unit taking its edges from the units already | |
| 11 | + reconstructed inside the same strip, with per-unit `has_top_right`/`has_bottom_left` | |
| 12 | + (libaom `reconintra.c`) instead of the standalone-block table; chroma stays one un-split | |
| 13 | + rect transform. `sub_tx_size_map[TX_32X16] == TX_16X16`, so every unit is square and reads | |
| 14 | + through the ordinary square `read_plane`. | |
| 15 | +- `crates/ec-av1/src/decode.rs:3453` — refusal "filter intra on a HORZ/VERT strip (this | |
| 16 | + decoder predicts square-only)" REMOVED from `decode_block_rect`, replaced by the | |
| 17 | + `FILTER_INTRA_RECT_HITS` counter. | |
| 18 | +- `crates/ec-av1/src/intra.rs:733` `predict_filter_intra` now takes `bw`x`bh` instead of one | |
| 19 | + square `side` (`av1_filter_intra_predictor_c` walks its 4x2 patches over a rectangle just | |
| 20 | + as happily; `av1_filter_intra_allowed_bsize` genuinely allows every strip with both sides | |
| 21 | + <= 32). Two call sites updated (`reconstruct_rect` passes `bw, bh`, `reconstruct` passes | |
| 22 | + `side, side`). | |
| 23 | +- `crates/ec-av1/src/decode.rs:3833` — the below-16x16 leaf arm (`decode_leaf_rect`) keeps | |
| 24 | + BOTH refusals; its split-transform one is renamed to name the size ("a HORZ/VERT intra | |
| 25 | + strip below 16x16 with a split transform ...") because the 32x32-level string it shared is | |
| 26 | + now lifted, and it is added to `refusal_inventory.rs:41`. | |
| 27 | +- `crates/ec-av1/src/stream.rs:9337` gate (a), `:9503` gate (c), `:9700` gate (b, `#[ignore]`d | |
| 28 | + RED, from the WIP snapshot). | |
| 29 | + | |
| 30 | +## Refusals lifted (each with its gate) | |
| 31 | + | |
| 32 | +| refusal | gate | result | | |
| 33 | +| --- | --- | --- | | |
| 34 | +| "a HORZ/VERT intra strip with a split transform (per-unit rect prediction is not ported)" | `a_real_aomenc_stream_with_a_split_transform_horz_vert_strip_decodes_pixel_exact` | GREEN, 20/20 pixel-exact, `rect_split_tx_hits` > 0 | | |
| 35 | +| "filter intra on a HORZ/VERT strip (this decoder predicts square-only)" (at the 32x32 level only) | `a_real_aomenc_stream_with_filter_intra_on_a_horz_vert_strip_decodes_pixel_exact` | GREEN, 40/40 pixel-exact, `filter_intra_rect_hits`=3 | | |
| 36 | + | |
| 37 | +Not lifted: | |
| 38 | +- "a superblock-level HORZ/VERT strip with a split transform (per-unit rect prediction is not | |
| 39 | + ported)" — the port itself is wired at that level too, but gate (b) | |
| 40 | + `a_real_aomenc_stream_with_a_split_transform_superblock_strip_decodes_pixel_exact` is | |
| 41 | + MEASURED RED: seed 50 decodes one sample off, luma (171, 56) ours 147 vs ffmpeg 148, inside | |
| 42 | + the 64x32 strip at mi=(8,32) whose transform resolved to depth 2 (TX_16X16). Seeds 42-49 | |
| 43 | + (depth 1 / TX_32X32 units) are pixel-exact. `#[ignore]`d with that number. | |
| 44 | + disposition: deferred(a range-ladder/prefilt-dump bisection of that one TU's top-right edge | |
| 45 | + availability) — the refusal stays, so no wrong pixels ship. | |
| 46 | +- "filter intra on a HORZ/VERT strip" / "a HORZ/VERT intra strip below 16x16 with a split | |
| 47 | + transform" at `decode_leaf_rect` (below 16x16): that arm only ports the skip case and has no | |
| 48 | + gate of its own. disposition: deferred(a below-16x16 strip gate, lane-sub8's territory). | |
| 49 | + | |
| 50 | +## Gate-recipe search (the part that cost the round) | |
| 51 | + | |
| 52 | +`--enable-filter-intra=1` alone never fires filter intra on a strip. Measured, 192x128 | |
| 53 | +`gradients` + `hue=s=0`, `--min/max-partition-size=16/32`, `--threads=1 --row-mt=0`: | |
| 54 | + | |
| 55 | +| recipe | rect strips | filter-intra blocks (any shape) | filter intra ON a strip | | |
| 56 | +| --- | --- | --- | --- | | |
| 57 | +| cq 45, smooth/paeth/directional/angle-delta all OFF (the square filter-intra gate's recipe), 20 seeds | 0 | 23 | 0 | | |
| 58 | +| cq 45, every intra mode ON, 100 seeds | 18 | 136 | 0 | | |
| 59 | +| cq 25, every intra mode ON, 100 seeds | 130 | 61 | 5 | | |
| 60 | +| cq 25, every intra mode ON, 40 seeds (PINNED) | 56 | 16 | 3 | | |
| 61 | + | |
| 62 | +Disabling the directional/smooth/paeth competitors — the trick the square filter-intra gate | |
| 63 | +uses — makes aomenc stop choosing rect partitions altogether (class `gate-recipe-confound`). | |
| 64 | +The knob that actually works is the quantiser: at cq 25 strips are ~7x more common. `smptebars` | |
| 65 | +and `testsrc2` sources were tried and are unusable here (every attempt refused, 0 decodes). | |
| 66 | +`EC_RECTSPLIT_CQ` / `EC_RECTSPLIT_OFF` / `EC_RECTSPLIT_GATE_ATTEMPTS` stay as diagnosis knobs | |
| 67 | +with the pinned recipe as default. | |
| 68 | + | |
| 69 | +## Evidence | |
| 70 | + | |
| 71 | +EVIDENCE: `cargo test -p ec-av1 --lib -- a_real_aomenc_stream_with_a_split_transform_horz_vert_strip_decodes_pixel_exact` | aomenc `--enable-rect-partitions=1`, tx-size search ON, 20 seeds, each decoded by ours and by ffmpeg | 20 pixel-exact matches, 0 refusals, `rect_split_tx_hits` delta > 0, test ok | |
| 72 | +EVIDENCE: `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -- a_real_aomenc_stream_with_filter_intra_on_a_horz_vert_strip_decodes_pixel_exact` | aomenc `--enable-filter-intra=1 --cq-level=25`, 40 seeds | 40 pixel-exact matches, 0 refusals, `filter_intra_rect_hits` delta=3, test ok | |
| 73 | + | |
| 74 | +## Film check (ReelB) | |
| 75 | + | |
| 76 | +``` | |
| 77 | +ffmpeg -v error -t 0.4 -i ".../reelb.mkv" -c:v copy -f obu hg.obu # 1817 bytes | |
| 78 | +cargo run -p ec-av1 --example decode_probe -- hg.obu | |
| 79 | +REFUSED: unsupported: AV1 tile (a partition below 8x8 (this decoder codes no leaf smaller than 8x8)) | |
| 80 | +``` | |
| 81 | + | |
| 82 | +EVIDENCE: /tmp/.../scratchpad/hg.obu | `ffmpeg -t 0.4 -c:v copy -f obu` then `decode_probe` on this branch | stops at "a partition below 8x8", NOT at any refusal this lane owns | |
| 83 | + | |
| 84 | +The charter's premise that this extract stops at a rect-split refusal is stale for the film's | |
| 85 | +first 0.4s: the blocker there is the below-8x8 partition refusal (lane-sub8's, still open per | |
| 86 | +`memory/`). "Before" was not re-measured on main — the refusal reached is upstream of every | |
| 87 | +line this lane touched, so the branch cannot have moved it. | |
| 88 | +disposition: deferred(lane-sub8's below-8x8 leaf) — nothing this lane can do about it. |