Lane-intra16x4 r1 handoff -- measurement table, what the path implements, the surviving pixel mismatch, next step
Browse files at this commite5f8021b29114d2d1a5eaa4aa3b2b77b402408e4Parent: dfaeea5- docs
- lane-intra16x4 r1 handoff -- measurement table, what the path implements, the surviving pixel mismatch, next step
1 changed file +72 -0
lanes/intra16x4-r1.handoff.mdadded+72 -0
| @@ -0,0 +1,72 @@ | |||
| 1 | +# lane-intra16x4 r1 HANDOFF (tip 17462bc + this file) | ||
| 2 | + | ||
| 3 | +Env bypass name is **`EC_INTRA16X4_DECODE=1`** (decode path) and `EC_INTRA16X4=1` (traces | ||
| 4 | +only) — the coordinator's message says `EC_INTRA16X4`; the decode switch is the `_DECODE` | ||
| 5 | +one. Default behaviour without it: the original refusal, unchanged. | ||
| 6 | + | ||
| 7 | +## Step 1 measurement (env print at the refusal site, `EC_INTRA16X4=1`, `EC_RECT64_SPLIT=1`) | ||
| 8 | + | ||
| 9 | +| probe | shape | pair parity | has_chroma | prev strip single-ref inter | skip | tx_select | | ||
| 10 | +|---|---|---|---|---|---|---| | ||
| 11 | +| 10-bit 3840x1608 cut 0 | 16x4 | 0 (even) | false | – | 0 | 1 | | ||
| 12 | +| 10-bit 3840x1608 cut 300 | 4x16 | 0 | false | – | 0 | 1 | | ||
| 13 | +| 10-bit 1920x792 @900 | 4x16 | 0 | false | – | 0 | 1 | | ||
| 14 | +| 10-bit 1920x792 @5400 | 16x4 | 0 | false | – | 0 | 1 | | ||
| 15 | +| 10-bit 1920x792 @6300 | 16x4 | 0 | false | – | 0 | 1 | | ||
| 16 | +| 10-bit 1920x792 @8100 | 4x16 | 0 | false | – | 0 | 1 | | ||
| 17 | + | ||
| 18 | +6/6 fire first on an EVEN strip (`is_chroma_reference` false: no `uv_mode`, no chroma | ||
| 19 | +residual), non-skip, `--enable-tx-size-search` on, no screen-content tools. | ||
| 20 | + | ||
| 21 | +## What the path implements (all in crates/ec-av1/src/decode.rs) | ||
| 22 | + | ||
| 23 | +* `decode_rect4_16_strip` — the per-strip body of the key frame's `decode_rect4_16`, | ||
| 24 | + lifted verbatim (mode info, luma whole-TU or split walk, the pair's single 8x4/4x8 | ||
| 25 | + chroma on the ODD strip at the pair's origin, palette/skip/lf/partition bands). | ||
| 26 | + `decode_rect4_16` now calls it 4x — key-frame behaviour unchanged. | ||
| 27 | +* `decode_intra_rect_in_inter(.., strip16: Option<(horz, has_chroma)>, ..)` — new 16x4/ | ||
| 28 | + 4x16 arm running that body with `INTRA_IN_INTER_MODE = Some((0, skip))` | ||
| 29 | + (`size_group_lookup[BLOCK_16X4] == 0`, oracle `common_data.h:61`). Mixed intra/inter | ||
| 30 | + pairs need no new chroma code: the odd strip carries the pair's chroma predicted per | ||
| 31 | + its own type, and the inter side's `InterStripChroma::prev == None` arm already covers | ||
| 32 | + intra-then-inter. | ||
| 33 | +* The inter arm ALSO publishes `set_txfm_ctxs` (`above_txfm`/`left_txfm` = tx_w/tx_h) and | ||
| 34 | + `txfm_partition_update_rect`, and reads tx-depth from `tx_size_context_txfm_rect`. | ||
| 35 | + The key-frame body publishes none of that; without it the block AFTER the strip broke | ||
| 36 | + while the strip's own pixels were exact (128x128 8-bit: strips at mi(23,16)/(23,20) | ||
| 37 | + exact, damage from row 96, chroma exact). | ||
| 38 | +* Counter `intra16x4_in_inter_hits()` `[16x4, 4x16, chroma-reference]`, printed by | ||
| 39 | + `decode_probe`. | ||
| 40 | + | ||
| 41 | +## Pixel state under the bypass | ||
| 42 | + | ||
| 43 | +* 10-bit 3840x1608 cut 0: no longer stops here — 14 intra 16x4 strips decoded, then | ||
| 44 | + `an intra 8x4/4x8 block inside an inter frame's sub-8x8 HORZ/VERT partition` | ||
| 45 | + (another lane). Same new refusal on cuts 300 / @900 / @5400 / @6300; @8100 stops on | ||
| 46 | + `an intra-coded 16x4/4x16 strip on the inter block path` — that is the `_` arm of | ||
| 47 | + `decode_intra_rect_in_inter` reached by a CLIPPED (frame-edge) shape, not a 1:4 strip. | ||
| 48 | + No pixel comparison is possible on any cut: every firing frame also carries the | ||
| 49 | + sub-8x8 intra block, so no OBU prefix decodes clean (hg-0 prefixes 50 and 52 both | ||
| 50 | + refuse inside the same frame). | ||
| 51 | +* aomenc witness, 8-bit 192x128 cq60 "bar" recipe (`~/.cache/intra16x4-tmp/s5.obu`, | ||
| 52 | + ref `ref5.yuv`, ours `ours5.yuv`): 6 frames decoded, frame 0 exact, **frame 1 LUMA | ||
| 53 | + mismatches from (175, 0), 8400 px**; the two intra strips themselves (mi(1,40) and | ||
| 54 | + mi(3,40) = px x160..175, y4..15) are exact and all chroma is exact. The first bad | ||
| 55 | + pixel is in the EVEN (inter) strip ABOVE them. | ||
| 56 | +* The gate `a_real_aomenc_inter_sequence_with_intra_16x4_strips_in_1to4_partitions_ | ||
| 57 | + decodes_pixel_exact` (stream.rs) is written, red, and `#[ignore]`d with that | ||
| 58 | + measurement in its reason string. No refusal lifted; refusal_inventory/gate_coverage | ||
| 59 | + untouched. | ||
| 60 | + | ||
| 61 | +## Exact next step | ||
| 62 | + | ||
| 63 | +1. Reproduce with `~/.cache/intra16x4-tmp/s5.obu` (recipe in the report). Ladder the msac | ||
| 64 | + RANGE (ours `EC_TRACE_COEFF` vs instrumented aomdec) across frame 1's superblock at | ||
| 65 | + mi_col 40, mi_row 0..3 — decide first whether the (175,0) damage is entropy or | ||
| 66 | + reconstruction; chroma being exact while luma is wrong argues reconstruction/deblock. | ||
| 67 | +2. Prime suspects, in order: (a) the deblock grid the intra strip writes over the PAIR | ||
| 68 | + (its `fill_lf_grid_rect` runs at strip granularity while the caller's tail also | ||
| 69 | + records the block), (b) the mv/mi field the tail stamps (`is_inter: false, ref -1`) | ||
| 70 | + over rows the EVEN inter strip owns, (c) `above_side_mi`/`left_side_mi` partition | ||
| 71 | + context published twice (strip body + caller tail). | ||
| 72 | +3. Only then re-run the gate; the 4x16 arm stays blocked on the sub-8x8 intra lane. | ||