forge
Explore
Log in

Don't you dare go Hollow

ec-av1: close the last block-level chroma tx_type site in decode_inter_block

Browse files at this commit

4ebd2183d1672ef177c8b2df156712bf41534bc3Ahmet Kaan GümüşParent: 06be466
The recorded 4:4:4 lossy divergence (777/640/554 wrong V samples on frames
1/2/3 of fixtures/444_quad_leaf_tx_type.obu, sha256 a06c9f7a...) does NOT
reproduce on main: that stream is byte-identical to instrumented aomdec on
all four frames, before and after this change. Those numbers are the PRE-fix
figure from lanes/av1444chr.report.md; the fixes 6c33f204 (both four-unit
4:4:4 arms) and 2142d2cf (the read_inter_rect_chroma sibling) are already
ancestors of main.

Re-located by grep, the three block-level handoff shapes are: the four-unit
arm (per-unit since 6c33f204), the rect sibling's per-unit resolve (since
2142d2cf), and the whole-plane square arm, which is an IDENTITY -- its one
chroma unit reads the block's own MI (0,0) cell, and luma_tx_type is
leaves[0]'s coded type, measured at MI (0,0) in 15/15 vartx blocks.

What remained is the rect sibling's FALLBACK: the branch taken when no luma
leaf covers a unit's own cell. It fires 4x on the pinned rect witness, all on
a multi-unit chroma plane -- the shape where a block-level value could
mistype a unit. Every observed firing has an empty leaf list, i.e. a block
that coded a SINGLE luma transform whose stamp covers the whole plane, so the
fallback is correct there; the wrong shape is a fallback while leaves is
NON-empty. Measured over the 87 committed fixtures plus 3 fresh 4:4:4 lossy
streams: 0 occurrences. Closed with an assertion rather than a comment, plus
CHROMA_RECT_BLOCK_TX_FALLBACK{,_MULTI} and a gate that asserts the guarded
shape is reached (measured 4/4) so the assertion cannot go vacuous.

Red-before by mutation: forcing the covering-leaf resolve to miss on a
multi-unit plane turns the assertion red on the same witness --
"a multi-unit rect chroma plane fell back to the block-level tx_type while 5
luma leaves were coded". Reverted; green.

Neighbours re-quoted unchanged, all compared against instrumented aomdec:
the two four-unit gates (96 quad-resolved units, 8 differing; 88/96
single-reference), the rect-sibling gate (4 resolved, 2 differing), both
4:4:4-lossless gates, and per-frame byte comparison on 8 streams (4:4:4
quadrant, rect strip, two lossless 4:4:4, a 4:2:0 control, three fresh server
encodes) -- all EXACT, 0 wrong samples per frame. cargo check --all-targets
clean.
crates/ec-av1/src/decode.rsmodified+66 -0
@@ -29480,6 +29480,37 @@ fn read_inter_rect_chroma(
2948029480 }
2948129481 Some(t)
2948229482 } else {
29483+ // lane-av1ichromatx: the ONE remaining site in
29484+ // `decode_inter_block` that can hand a chroma unit a
29485+ // BLOCK-level type on a split plane. `covering_leaf_tx_
29486+ // type` found nothing, i.e. no luma leaf covers this
29487+ // unit's own MI cell -- which is exactly the shape a
29488+ // block that coded a SINGLE luma transform has (its
29489+ // leaf list is empty, so every lookup misses). For
29490+ // that block `luma_tx_type` IS the type of the one
29491+ // luma unit whose stamp covers the whole plane, so the
29492+ // fallback is correct there.
29493+ //
29494+ // What is NOT correct is a fallback on a plane with
29495+ // `leaves` NON-empty: then some luma leaf does exist,
29496+ // it simply does not cover this unit's cell, and the
29497+ // block-level value is a DIFFERENT leaf's type. The
29498+ // assertion below is what closes that shape, so the
29499+ // fallback can never again be a silent mistype: the
29500+ // class is "block-level where the unit's own cell
29501+ // says otherwise", and this is its last site.
29502+ hit!(CHROMA_RECT_BLOCK_TX_FALLBACK);
29503+ if multi {
29504+ hit!(CHROMA_RECT_BLOCK_TX_FALLBACK_MULTI);
29505+ }
29506+ debug_assert!(
29507+ leaf_tx_types.is_empty(),
29508+ "lane-av1ichromatx: a multi-unit rect chroma plane fell back to the \
29509+ block-level tx_type while {} luma leaves were coded -- the unit's own \
29510+ av1_get_tx_type cell is then some other leaf's stamp, not \
29511+ luma_tx_type",
29512+ leaf_tx_types.len()
29513+ );
2948329514 Some(luma_tx_type)
2948429515 };
2948529516 let cu_grid = read_inter_plane_rect(
@@ -39231,6 +39262,41 @@ pub(crate) fn chroma_rect_leaf_tx_diff_hits() -> usize {
3923139262 CHROMA_RECT_LEAF_TX_DIFF_HITS.with(std::cell::Cell::get)
3923239263 }
3923339264
39265+thread_local! {
39266+ /// lane-av1ichromatx: [`read_inter_rect_chroma`] units that fell through
39267+ /// `covering_leaf_tx_type` to the BLOCK-level `luma_tx_type`, and of those
39268+ /// the ones whose chroma plane is MULTI-unit (`nx*ny > 1`) -- the only
39269+ /// shape where two units of one plane can disagree, i.e. where a
39270+ /// block-level value could actually mistype a unit.
39271+ ///
39272+ /// Why this needs its own number: `CHROMA_RECT_LEAF_TX_HITS` counts the
39273+ /// units that took the covering leaf, so it says nothing about the units
39274+ /// that did NOT -- and the fallback is the only remaining place in
39275+ /// `decode_inter_block` where a chroma unit is handed a block-level type
39276+ /// on a split plane.
39277+ pub(crate) static CHROMA_RECT_BLOCK_TX_FALLBACK: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
39278+}
39279+
39280+thread_local! {
39281+ /// Of [`CHROMA_RECT_BLOCK_TX_FALLBACK`], how many were on a multi-unit
39282+ /// chroma plane -- the non-vacuity bar for the assertion at that site.
39283+ pub(crate) static CHROMA_RECT_BLOCK_TX_FALLBACK_MULTI: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
39284+}
39285+
39286+/// [`CHROMA_RECT_BLOCK_TX_FALLBACK`]: rect chroma units handed the block-level
39287+/// type because no luma leaf covered their own MI cell.
39288+#[allow(dead_code)] // read only from the `#[cfg(test)]` gates
39289+pub(crate) fn chroma_rect_block_tx_fallback() -> usize {
39290+ CHROMA_RECT_BLOCK_TX_FALLBACK.with(std::cell::Cell::get)
39291+}
39292+
39293+/// [`CHROMA_RECT_BLOCK_TX_FALLBACK_MULTI`]: of those, the ones whose chroma
39294+/// plane had more than one unit.
39295+#[allow(dead_code)] // read only from the `#[cfg(test)]` gates
39296+pub(crate) fn chroma_rect_block_tx_fallback_multi() -> usize {
39297+ CHROMA_RECT_BLOCK_TX_FALLBACK_MULTI.with(std::cell::Cell::get)
39298+}
39299+
3923439300 fn decode_inter_block(
3923539301 dec: &mut SymbolDecoder,
3923639302 cdfs: &mut Cdfs,
crates/ec-av1/src/stream.rsmodified+59 -3
@@ -21359,9 +21359,9 @@ pub(crate) mod tests {
2135921359 /// leaf push back behind `if side > 64` (the pre-`6c33f204` state) turns
2136021360 /// it red with the same 777 bytes.
2136121361 #[test]
21362- fn the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms() {
21363- const NAME: &str =
21364- "the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms";
21362+ fn the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms()
21363+ {
21364+ const NAME: &str = "the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms";
2136521365 const FIXTURE_LEN: usize = 27933;
2136621366 const FIXTURE_FNV: u64 = 0x85fa_830b_8800_90df;
2136721367 let _gate_lock = lock_gate_counters();
@@ -21525,6 +21525,62 @@ pub(crate) mod tests {
2152521525 );
2152621526 }
2152721527
21528+ /// lane-av1ichromatx: the LAST site in `decode_inter_block` that can hand a
21529+ /// chroma unit the BLOCK-level `luma_tx_type` instead of the unit's own
21530+ /// `tx_type_map` cell is [`read_inter_rect_chroma`]'s fallback: the branch
21531+ /// taken when `covering_leaf_tx_type` finds no luma leaf covering the
21532+ /// unit's own MI cell. The decode closes it with an assertion (a
21533+ /// multi-unit chroma plane may only reach the fallback when the block
21534+ /// coded a SINGLE luma transform, whose stamp covers the whole plane and
21535+ /// makes `luma_tx_type` that unit's own cell).
21536+ ///
21537+ /// This gate is the measurement behind that assertion, on the witness that
21538+ /// reaches it: `fixtures/444_rect_strip_leaf_tx_type.obu` (26839 bytes,
21539+ /// sha256 `06174a66e92aaeb751a8e86db59711fcb1f18d74bde2d77e1ef1be7983eb7c80`).
21540+ /// Measured there: the rect arm is called twice, BOTH on a multi-unit
21541+ /// chroma plane (`nx*ny > 1`), and 4 of its 8 units take the block-level
21542+ /// fallback -- every one of them with an EMPTY leaf list, i.e. the
21543+ /// single-luma-unit shape the assertion allows. So `multi_fallback >= 2`
21544+ /// here is the number that says the guarded shape is REACHED (a fallback
21545+ /// count of 0 would leave the assertion vacuous), and the decoded frames
21546+ /// stay byte-exact against instrumented aomdec, which is what says the
21547+ /// fallback still hands the right value on that shape.
21548+ ///
21549+ /// Non-vacuity, by mutation: forcing the covering-leaf resolve to miss on a
21550+ /// multi-unit plane (`…unit_rel_mi).filter(|_| !multi)`) turns the
21551+ /// assertion RED on this same witness --
21552+ /// `a multi-unit rect chroma plane fell back to the block-level tx_type
21553+ /// while 5 luma leaves were coded` -- so the closure is not a comment.
21554+ #[test]
21555+ fn a_multi_unit_rect_chroma_plane_only_falls_back_to_the_block_type_on_a_single_luma_unit() {
21556+ const NAME: &str = "a_multi_unit_rect_chroma_plane_only_falls_back_to_the_block_type_on_a_single_luma_unit";
21557+ const FIXTURE_LEN: usize = 26839;
21558+ const FIXTURE_FNV: u64 = 0xc77f_310c_036d_ff73;
21559+ let _gate_lock = lock_gate_counters();
21560+ let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
21561+ .join("fixtures/444_rect_strip_leaf_tx_type.obu");
21562+ let stream = std::fs::read(&path)
21563+ .unwrap_or_else(|e| panic!("{NAME}: reading {}: {e}", path.display()));
21564+ assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved");
21565+ assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved");
21566+
21567+ let fb0 = crate::decode::chroma_rect_block_tx_fallback();
21568+ let fbm0 = crate::decode::chroma_rect_block_tx_fallback_multi();
21569+ let frames = decode_stream(&stream)
21570+ .unwrap_or_else(|e| panic!("{NAME}: the witness no longer decodes: {e}"))
21571+ .len();
21572+ let fb = crate::decode::chroma_rect_block_tx_fallback() - fb0;
21573+ let fbm = crate::decode::chroma_rect_block_tx_fallback_multi() - fbm0;
21574+ assert_eq!(frames, 3, "{NAME}: expected 3 shown frames");
21575+ assert!(
21576+ fbm >= 2,
21577+ "{NAME}: only {fbm} block-level fallbacks landed on a MULTI-unit chroma plane \
21578+ ({fb} in total) -- the shape the decode's assertion guards is no longer reached, so \
21579+ that assertion is vacuous on this witness"
21580+ );
21581+ eprintln!("{NAME}: {fb} block-level chroma fallbacks, {fbm} of them on a multi-unit plane");
21582+ }
21583+
2152821584 /// lane-av1readcensus: the 4:4:4 coefficient-UNIT census, pinned.
2152921585 ///
2153021586 /// The lane report `av1444rect` round 4 left an unexplained signal: 636
lanes/av1ichromatx.report.mdadded+209 -0
@@ -0,0 +1,209 @@
1+# lane-av1ichromatx — the recorded 4:4:4 lossy divergence is ALREADY FIXED on main; the last block-level `tx_type` site is now closed with an assertion
2+
3+Branch `lane-av1ichromatx` (worktree `~/.cache/wt/av1ichromatx`), base `8680e31d` (main).
4+Oracle `~/.cache/aom-oracle/build/{aomdec,aomenc}` (instrumented).
5+`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1ichromatx`.
6+
7+## 0. Headline: the ticket's premise does not reproduce
8+
9+The ticket's recorded divergence (**777 / 640 / 554 wrong V samples on decode-order
10+frames 1/2/3** of `444_quad_leaf_tx_type.obu`) is **not present on current main**.
11+Measured on the unpatched tree, every frame is byte-identical to instrumented
12+`aomdec`'s `EC_AV1_FINAL_DUMP`:
13+
14+```
15+$ EC_AV1_FINAL_DUMP=/tmp/cmpx/ours decode_probe crates/ec-av1/fixtures/444_quad_leaf_tx_type.obu
16+frame 0: len 49152 vs 49152 IDENTICAL
17+frame 1: len 49152 vs 49152 IDENTICAL
18+frame 2: len 49152 vs 49152 IDENTICAL
19+frame 3: len 49152 vs 49152 IDENTICAL
20+```
21+
22+Per-frame wrong-sample counts, decode order: **f0 0, f1 0, f2 0, f3 0** (before AND
23+after this lane's change). Fixture confirmed first:
24+
25+```
26+$ sha256sum crates/ec-av1/fixtures/444_quad_leaf_tx_type.obu
27+a06c9f7a0862252f6ab7ebdcec340d0602e730e38089365f14747db37f8e78d5 (27933 bytes)
28+```
29+
30+It is a committed pin (`crates/ec-av1/src/stream.rs:21241`, fnv `0x85fa830b880090df`,
31+also `scripts/fixture-library.tsv:53`), so the ticket's "may already be a committed
32+pin — reuse it" is the case.
33+
34+**Where 777/640/554 comes from:** it is the PRE-fix / mutation number recorded in
35+`lanes/av1444chr.report.md:77-80` ("reverting only the live arm's resolve … 777
36+bytes differ") and re-measured in `lanes/av1f9singleland.report.md`. The fix is
37+already an ancestor of main:
38+
39+```
40+$ git merge-base --is-ancestor 6c33f204 HEAD && echo ANCESTOR # four-unit arms, BOTH copies
41+ANCESTOR
42+$ git merge-base --is-ancestor 2142d2cf HEAD && echo ANCESTOR # read_inter_rect_chroma sibling
43+ANCESTOR
44+```
45+
46+## 1. Re-locating the three sites (by grep, not by line number)
47+
48+`decode_inter_block` is `decode.rs:39235-44746` and carries TWO textually parallel
49+copies of the chroma arm chain (compound `40673-41297`, single-ref `42442-43105`).
50+Grep for every place a chroma read is handed the BLOCK-level `luma_tx_type`:
51+
52+| # | site | line (single-ref / compound) | state on main |
53+|---|---|---|---|
54+| A | four-unit 4:4:4 arm, per-quadrant resolve | `41258` / `43006` | **already per-unit** (`covering_leaf_tx_type`, 6c33f204) |
55+| B | `read_inter_rect_chroma`, per-unit resolve | `29476` | **already per-unit** (2142d2cf) |
56+| B' | `read_inter_rect_chroma`, block-level FALLBACK | `29482` | **the one live block-level handoff** |
57+| C | whole-plane square chroma arm (`Some(luma_tx_type)`) | `41273`/`41292` / `43081`/`43100` | identity — see §3 |
58+
59+So the ticket's "three sites" are the three site-KINDS (A, B/B', C); A and B were
60+fixed before this lane, B' and C are what remained.
61+
62+## 2. Measuring each site against libaom's real cell
63+
64+`av1_get_tx_type` (`blockd.h:1291-1296`) reads `xd->tx_type_map[blk_row << ss_y][blk_col << ss_x]`,
65+i.e. the unit's OWN cell. A luma leaf stamps its own top-left cell with its coded
66+type; a 64-class leaf additionally stamps every 16-px sub-cell
67+(`decodetxb.c:504-507`); an `all_zero` leaf stamps `DCT_DCT` at its own cell
68+(`decodetxb.c:199-203`). I modelled those three stamp rules in a temporary probe
69+and compared, per site, the block-level value against the cell the unit's own
70+position reads.
71+
72+```
73+444_rect_strip_leaf_tx_type.obu site1=8/2 site2=13/0 site3=20/0 leaf0=13/13 agree=24/0
74+w_sb64_1to4_cq24.obu (new) site1=150/0 site2=1/0 site3=2/0 leaf0=1/1 agree=150/0
75+w_sb128_1to4_cq20.obu (new) site1=150/0 site2=1/0 site3=4/0 leaf0=1/1 agree=150/0
76+w_sb64_1to4_cq30.obu (new) site1=146/0 site2=1/0 site3=4/0 leaf0=1/1 agree=146/0
77+```
78+
79+(read as `reads/differs-from-own-cell`)
80+
81+* **A (four-unit arms)** — resolved per quadrant; `agree=0` disagreements between
82+ `covering_leaf_tx_type` and the true stamped cell across 470 resolves.
83+* **C (whole-plane square arm)** — 41 reads, **0 differ**. Its argument: that arm
84+ reads ONE chroma unit covering the whole plane, so its own cell is the block's
85+ MI (0,0), and `luma_tx_type` is `first_tx_type` = `leaves[0]`'s coded type.
86+ Measured `leaves[0]` at MI (0,0) in **15/15** vartx blocks, so C is an identity,
87+ not a defect. It is also vacuous to "fix": resolving `(0,0)` returns the same
88+ value.
89+* **B' (rect fallback)** — the only site that can still hand a block-level type to
90+ a chroma unit. It fires **4x** on the pinned rect witness, all on a MULTI-unit
91+ chroma plane. That is the shape where a block-level value could mistype a unit,
92+ so it needed closing rather than measuring.
93+
94+## 3. Why B' is safe, and what closes it
95+
96+Every observed B' firing has `leaves == 0`:
97+
98+```
99+$ EC_TEMP_SITES=1 decode_probe crates/ec-av1/fixtures/444_rect_strip_leaf_tx_type.obu
100+TEMPFB multi=true leaves=0 rel_mi=(0, 0) luma=DctDct first=None x2
101+TEMPFB multi=true leaves=0 rel_mi=(8, 0) luma=DctDct first=None x2
102+TEMPNZ nz=0 / nz=1 / nz=13 (units that took the fallback DO carry coefficients)
103+```
104+
105+`leaves == 0` means the block coded a SINGLE luma transform, whose own stamp
106+covers the whole plane, so `luma_tx_type` **is** that unit's cell — the fallback is
107+correct. The shape that would be wrong is a fallback on a plane while
108+`leaves` is NON-empty (some leaf exists, it just does not cover this unit's cell,
109+so the block-level value is a *different* leaf's type). Measured over the 87
110+committed fixtures plus 3 fresh streams (90 streams, decode_probe, debug build):
111+**0 occurrences**.
112+
113+Closed with an assertion, not a comment (`decode.rs:29482`):
114+
115+```rust
116+hit!(CHROMA_RECT_BLOCK_TX_FALLBACK);
117+if multi { hit!(CHROMA_RECT_BLOCK_TX_FALLBACK_MULTI); }
118+debug_assert!(
119+ leaf_tx_types.is_empty(),
120+ "lane-av1ichromatx: a multi-unit rect chroma plane fell back to the block-level \
121+ tx_type while {} luma leaves were coded -- the unit's own av1_get_tx_type cell \
122+ is then some other leaf's stamp, not luma_tx_type",
123+ leaf_tx_types.len()
124+);
125+```
126+
127+## 4. Red-before (mutation) — the closure bites
128+
129+Forcing the covering-leaf resolve to miss on a multi-unit plane
130+(`covering_leaf_tx_type(leaf_tx_types, unit_rel_mi).filter(|_| !multi)`):
131+
132+```
133+$ cargo test -p ec-av1 --lib -- --exact stream::tests::a_multi_unit_rect_chroma_plane_...
134+lane-av1ichromatx: a multi-unit rect chroma plane fell back to the block-level tx_type
135+while 5 luma leaves were coded -- the unit's own av1_get_tx_type cell is then some
136+other leaf's stamp, not luma_tx_type
137+test result: FAILED. 0 passed; 1 failed
138+```
139+
140+Reverted; green again: `4 block-level chroma fallbacks, 4 of them on a multi-unit plane`.
141+
142+## 5. New gate (non-vacuous)
143+
144+`stream::tests::a_multi_unit_rect_chroma_plane_only_falls_back_to_the_block_type_on_a_single_luma_unit`
145+
146+Pins `fixtures/444_rect_strip_leaf_tx_type.obu` (26839 B, fnv `0xc77f310c036dff73`),
147+asserts `multi_fallback >= 2` — the number that says the guarded shape is REACHED,
148+so the assertion cannot go vacuous — and the same mutation above turns it red.
149+Measured: 4 fallbacks, 4 of them multi-unit.
150+
151+## 6. Neighbours re-quoted (no SKIP, all compared against instrumented aomdec)
152+
153+```
154+a_pinned_444_inter_stream_chroma_units_inherit_their_own_quadrants_tx_type ok (96 quad-resolved units, 8 differed)
155+the_pinned_444_quadrant_witness_is_the_single_reference_arms_... ok (88/96 single-ref, 8 changed an answer)
156+a_pinned_444_rect_inter_stream_resolves_each_chroma_unit_from_its_own_luma_leaf ok (4 resolved, 2 differed)
157+a_lossless_444_min_partition64_inter_stream_decodes_pixel_exact ok
158+a_lossless_444_defaultp_inter_strip_stream_decodes_byte_exact ok
159+a_multi_unit_rect_chroma_plane_only_falls_back_... (new) ok (4/4)
160+test result: ok. 6 passed; 0 failed; 0 ignored
161+```
162+
163+Per-frame byte comparison against `EC_AV1_FINAL_DUMP`, before and after the change —
164+identical, all EXACT:
165+
166+| stream | frames | result |
167+|---|---|---|
168+| `444_quad_leaf_tx_type.obu` | 4 | f0-f3 EXACT |
169+| `444_rect_strip_leaf_tx_type.obu` | 3 | f0-f2 EXACT |
170+| `ll444_defaultp_inter_strip.obu` | 7 | f0-f6 EXACT |
171+| `ll444_minp64_inter.obu` | 6 | f0-f5 EXACT |
172+| `av1_192x128_8bit_intra64_in_inter.obu` (4:2:0 control) | 6 | f0-f5 EXACT |
173+| `w_sb64_1to4_cq24.obu` (new, server) | 6 | f0-f5 EXACT |
174+| `w_sb128_1to4_cq20.obu` (new, server) | 6 | f0-f5 EXACT |
175+| `w_sb64_1to4_cq30.obu` (new, server) | 6 | f0-f5 EXACT |
176+
177+## 7. tx_type evidence — the 2 `DCT_DCT` chroma units on V, frame 1
178+
179+`EC_TRACE_TXTYPE=1`, per decode-order frame, chroma units only:
180+
181+```
182+frame 1: 32 chroma units, tx_type=DctDct at U(0,32) V(0,32) U(64,96) V(64,96)
183+ inherited DctDct -> Some(DctDct) on all four
184+frame 2: 32 chroma units, tx_type=DctDct at U(64,96) V(64,96)
185+frame 3: 32 chroma units, tx_type=DctDct at U(64,96) V(64,96)
186+```
187+
188+So frame 1 has **exactly 2 `DCT_DCT` chroma units on V** — `V(0,32)` and `V(64,96)` —
189+and they are exactly the quadrants that sit over a luma leaf which coded NOTHING:
190+the value comes from `covering_leaf_tx_type`, i.e. from that leaf's `all_zero`
191+`DCT_DCT` stamp (`decodetxb.c:199-203`), while the block-level type on those blocks
192+is `Idtx`. That is the ticket's H2 mechanism, already landed; 4 + 2 + 2 = 8 units,
193+which is precisely the `diff = 8` the existing gate asserts.
194+
195+## 8. What remains
196+
197+* Nothing in this class is open in `decode_inter_block`: A and B resolve per unit,
198+ C is an identity by construction (measured 15/15), B' is closed by assertion.
199+* **4:2:2 is out of scope and provably so**: `stream.rs:1766` refuses
200+ `subsampling_x != subsampling_y` by name at the sequence header, so the
201+ `invalid_ss_plane` (8x32 luma → 4x8 chroma) path inside
202+ `read_inter_rect_chroma`, whose units sit at luma MI cells a single 8x32 leaf
203+ stamps only at (0,0), can never be reached.
204+* `covering_leaf_tx_type` models the leaf's own stamp, not libaom's
205+ never-cleared map. For every shape reachable today (leaf tops align with the
206+ chroma-unit grid, or a 64-class leaf stamps the whole area) the two coincide —
207+ measured 0 disagreements in 470 resolves. A stream where a chroma unit's cell
208+ lands strictly INSIDE a sub-64 luma leaf would expose the difference; no such
209+ shape is reachable with the current arm conditions.