Round 5 report -- chroma edge-filter type root cause, gate green, suite 269/0/22
Browse files at this commit278df5f8c861b39dca43c4efad13197db835dd65Parent: f034839- docs
- round 5 report -- chroma edge-filter type root cause, gate green, suite 269/0/22
1 changed file +92 -0
- lanes/sub8-r5.report.md +92 -0
lanes/sub8-r5.report.mdadded+92 -0
| @@ -0,0 +1,92 @@ | |||
| 1 | +# lane-sub8 report (round 5) | ||
| 2 | + | ||
| 3 | +## Root cause of the 4-pixel chroma residue | ||
| 4 | + | ||
| 5 | +Recon vs filtering was separated FIRST (charter step 1): the gate's own aomenc | ||
| 6 | +recipe carries `--enable-cdef=0 --loopfilter-control=0`, and our | ||
| 7 | +`EC_AV1_PREFILT_DUMP` / `EC_AV1_POSTDEBLOCK_DUMP` dumps are byte-identical to | ||
| 8 | +the final planes -- so every filter stage is inert on this stream and the | ||
| 9 | +residue was pure reconstruction. (r4's `edge_params` experiment could not have | ||
| 10 | +moved it: there is no deblocking in this stream at all.) | ||
| 11 | + | ||
| 12 | +The mismatching block is NOT a sub-8x8 group: `EC_AV1_TRACE` shows | ||
| 13 | +`partition_w8 mi=(10,8) value=0` -- a plain `PARTITION_NONE` 8x8 leaf with | ||
| 14 | +`tx_depth=1` (four 4x4 luma TUs), luma mode H_PRED, `uv_mode=6` (D157_PRED), | ||
| 15 | +chroma 4x4 at (16,20). Subtracting the (bit-exact) residual from both recons | ||
| 16 | +isolates it to the *prediction*: ours and libaom's differ only at row 0, | ||
| 17 | +columns 2-3. | ||
| 18 | + | ||
| 19 | +**`get_intra_edge_filter_type` (reconintra.c:974) reads the CHROMA neighbours' | ||
| 20 | +`uv_mode` for planes 1/2**, never the luma mode. `decode_leaf8` and | ||
| 21 | +`decode_leaf_split4` passed a hardcoded `false` on every chroma | ||
| 22 | +`reconstruct`/`read_plane`, so a directional chroma block whose chroma | ||
| 23 | +neighbour is smooth filtered its above edge at `intra_edge_filter_strength` | ||
| 24 | +type 0 (kernel `{0,4,8,4,0}`, strength 1 at d=67) instead of type 1 | ||
| 25 | +(`{0,5,6,5,0}`, strength 2) -- deltas of 1..3 on the two pixels the kernel | ||
| 26 | +difference reaches. | ||
| 27 | + | ||
| 28 | +Second half of the cause: the coarse `SUB`-grid `above_uv_mode`/`left_uv_mode` | ||
| 29 | +slots cannot name that neighbour. Adding the leaf's own write to them makes | ||
| 30 | +the top-left 8x8 leaf of a 16x16 clobber the row slot that the block to the | ||
| 31 | +LEFT owns, and the block at mi(10,8) then still read `false` (measured: the | ||
| 32 | +frame stayed 4 pixels off). So this round adds the `uv_mode` twin of the | ||
| 33 | +existing mi-granular `sub8_mode_col`/`sub8_mode_row` machinery. | ||
| 34 | + | ||
| 35 | +## What changed | ||
| 36 | +- `crates/ec-av1/src/decode.rs:1784` -- new `uv_mode_col`/`uv_mode_row` mi-granular | ||
| 37 | + maps on `Neighbours` (+ init). | ||
| 38 | +- `crates/ec-av1/src/decode.rs:2548` `record_uv_mode_mi`, `:2573` | ||
| 39 | + `smooth_uv_neighbour` (mi-exact above/left `uv_mode`, coarse `SUB` slot as | ||
| 40 | + fallback), written from `record_rect` (:2606), `record_split_luma` (:2718), | ||
| 41 | + `decode_leaf8` (:5362) and `decode_leaf_split4` (:5845). | ||
| 42 | +- `crates/ec-av1/src/decode.rs:5331,5758` -- `smooth_neighbor_uv` replaces the | ||
| 43 | + hardcoded `false` at all 10 chroma reconstruct/read_plane arguments in those | ||
| 44 | + two functions. | ||
| 45 | +- `crates/ec-av1/src/refusal_inventory.rs:31` -- deleted the stale capability | ||
| 46 | + claim `"a partition below 16x16 other than a clean split ..."`; r4's fixes | ||
| 47 | + removed that string from the decode path, which is exactly what made | ||
| 48 | + `the_decode_path_refuses_exactly_the_listed_cases` RED (charter step 2). | ||
| 49 | + It was the only entry the test named. | ||
| 50 | + | ||
| 51 | +## Gate | ||
| 52 | +`a_real_aomenc_stream_with_a_sub8_split_decodes_pixel_exact` -- **GREEN** | ||
| 53 | +(4 firing + pixel-exact runs; `sub8_split_hits` hard-asserted, no SKIP). | ||
| 54 | + | ||
| 55 | +``` | ||
| 56 | +EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib sub8 | ||
| 57 | + test stream::tests::a_real_aomenc_stream_with_a_sub8_split_decodes_pixel_exact ... ok | ||
| 58 | +``` | ||
| 59 | + | ||
| 60 | +EVIDENCE: <scratchpad>/sub8r5/{mine.yuv,ref.yuv} | seed=100 cq=6 gate recipe re-run standalone (sha256 64f6f74e... 3994 B), decoded by `examples/decode_probe` and by ffmpeg | 6144/6144 bytes equal (was 4 chroma bytes off, |delta| <= 3) | ||
| 61 | +EVIDENCE: <scratchpad>/sub8r5/prefilt+postdeblock dumps | EC_AV1_PREFILT_DUMP / EC_AV1_POSTDEBLOCK_DUMP on the same stream | both byte-identical to the final planes -> filters inert, residue is reconstruction | ||
| 62 | +EVIDENCE: <scratchpad>/sub8r5/hg.obu | `ffmpeg -t 0.4 -c:v copy -f obu` from the ReelB film, `decode_probe` after the fix | REFUSED at "a HORZ/VERT partition below 8x8" (was: "a partition below 8x8") | ||
| 63 | + | ||
| 64 | +## Refusals | ||
| 65 | +Nothing lifted, nothing to lift: the PARTITION_SPLIT-to-4x4 shape the charter | ||
| 66 | +names has had **no refusal string** since `decode_leaf_split4` landed (r2) -- | ||
| 67 | +the gate is what was missing, and it is now green, so the capability is | ||
| 68 | +proven rather than assumed. The two below-8x8 strings that remain are both | ||
| 69 | +out of this lane by the standing constraint: | ||
| 70 | +- `"a HORZ/VERT partition below 8x8 (... 4x8/8x4 need a real rectangular | ||
| 71 | + transform)"` -- deferred(a real TX_4X8/TX_8X4 primitive). This is now the | ||
| 72 | + ReelB blocker. | ||
| 73 | +- `"an inter partition below 8x8 ..."` -- deferred(an inter lane; lane-sub8 is | ||
| 74 | + intra-scoped). | ||
| 75 | + | ||
| 76 | +## Suite | ||
| 77 | +`EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib`: **269 passed, 0 failed, 22 | ||
| 78 | +ignored**, 476 s (r4 was 267 passed, 2 failed -- both now green). | ||
| 79 | + | ||
| 80 | +## Open / disposition | ||
| 81 | +- deferred(an inter-frame gate whose chroma neighbour codes a smooth `uv_mode`) | ||
| 82 | + -- same-shape sweep: `decode.rs:12084,12096` (`decode_inter_block8`'s | ||
| 83 | + intra-in-inter chroma reconstruct) still pass a hardcoded `false` for the | ||
| 84 | + chroma edge-filter type. Every other chroma site now takes a `uv_mode`-derived | ||
| 85 | + flag; `decode_block`/`decode_inter_block` (:3251,:3765,:4893,:10929) take it | ||
| 86 | + from the coarse `SUB` slots, which is exact for >=16x16 neighbours and | ||
| 87 | + approximate when the neighbour is an 8x8 leaf -- upgrade path is to route | ||
| 88 | + those four through `smooth_uv_neighbour` too. | ||
| 89 | +- accepted: `smooth_uv_neighbour` falls back to the coarse slot when no block | ||
| 90 | + recorded the exact neighbouring mi (documented at the field). | ||
| 91 | +- Film: ReelB now stops at the HORZ/VERT-below-8x8 refusal above; the | ||
| 92 | + film is also yuv420p10le, so a 10-bit refusal waits behind it. | ||