ec-av1: the four-unit 4:4:4 quadrant witness is the SINGLE-REFERENCE arm's, and no gate said so
Browse files at this commit18d91c0408dada0ccc580a13fe5ad6bddd5c174bParent: 44a0cfb3 changed files +386 -0
- crates/ec-av1/src/decode.rs +49 -0
- crates/ec-av1/src/stream.rs +100 -0
- lanes/av1f9singleland.report.md +237 -0
crates/ec-av1/src/decode.rsmodified+49 -0
| @@ -38814,6 +38814,49 @@ thread_local! { | ||
| 38814 | 38814 | /// the number that says the route changed an answer. |
| 38815 | 38815 | pub(crate) static CHROMA_QUAD_LEAF_TX_DIFF_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) }; |
| 38816 | 38816 | } |
| 38817 | +thread_local! { | |
| 38818 | + /// lane-av1f9singleland: the SINGLE-REFERENCE copy of | |
| 38819 | + /// [`CHROMA_QUAD_LEAF_TX_HITS`], and the half of its | |
| 38820 | + /// [`CHROMA_QUAD_LEAF_TX_DIFF_HITS`] that belongs to that arm. | |
| 38821 | + /// | |
| 38822 | + /// Why a separate pair rather than trusting the shared counters: the | |
| 38823 | + /// shared ones are bumped from BOTH arms of the four-unit 4:4:4 chroma | |
| 38824 | + /// arm, so a green witness on them says nothing about which arm produced | |
| 38825 | + /// the hits. `decode_inter_block` has two textually parallel copies of | |
| 38826 | + /// that arm -- the compound prediction arm (the `build` closure) and the | |
| 38827 | + /// single-reference arm -- and a refactor can delete or revert either one | |
| 38828 | + /// while the other keeps the shared total non-zero. Measured on the pinned | |
| 38829 | + /// witness `fixtures/444_quad_leaf_tx_type.obu`: 96 units resolve through | |
| 38830 | + /// the covering leaf, and 88 of them are the single-reference arm's, so | |
| 38831 | + /// the shared counter is 92% single-reference and the compound arm alone | |
| 38832 | + /// would be a 4-unit sample of the route it appears to witness. | |
| 38833 | + pub(crate) static CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) }; | |
| 38834 | +} | |
| 38835 | + | |
| 38836 | +thread_local! { | |
| 38837 | + /// Of [`CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS`], how many resolved a type | |
| 38838 | + /// that DIFFERS from the block-level one. This is the arm's own non-vacuity | |
| 38839 | + /// bar: a route count alone stays green through a no-op resolve, because | |
| 38840 | + /// on a block whose four luma leaves all agree the per-quadrant value and | |
| 38841 | + /// the block-level one are the same answer. Mutating only the | |
| 38842 | + /// single-reference arm's `Some(cu_tx_type)` back to `Some(luma_tx_type)` | |
| 38843 | + /// turns the witness red with 777 bytes differing in decode-order frame 1. | |
| 38844 | + pub(crate) static CHROMA_QUAD_LEAF_TX_SINGLEREF_DIFF_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) }; | |
| 38845 | +} | |
| 38846 | + | |
| 38847 | +/// [`CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS`]: single-reference-arm chroma units | |
| 38848 | +/// that took their type from the covering luma leaf. | |
| 38849 | +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates | |
| 38850 | +pub(crate) fn chroma_quad_leaf_tx_singleref_hits() -> usize { | |
| 38851 | + CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS.with(std::cell::Cell::get) | |
| 38852 | +} | |
| 38853 | + | |
| 38854 | +/// [`CHROMA_QUAD_LEAF_TX_SINGLEREF_DIFF_HITS`]: of those, the units whose | |
| 38855 | +/// covering leaf's type differs from the block-level one. | |
| 38856 | +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates | |
| 38857 | +pub(crate) fn chroma_quad_leaf_tx_singleref_diff_hits() -> usize { | |
| 38858 | + CHROMA_QUAD_LEAF_TX_SINGLEREF_DIFF_HITS.with(std::cell::Cell::get) | |
| 38859 | +} | |
| 38817 | 38860 | |
| 38818 | 38861 | /// [`CHROMA_QUAD_LEAF_TX_HITS`]: chroma units that took their type from the |
| 38819 | 38862 | /// covering luma leaf. |
| @@ -42637,8 +42680,14 @@ fn decode_inter_block( | ||
| 42637 | 42680 | .unwrap_or(luma_tx_type); |
| 42638 | 42681 | if covering_leaf_tx_type(&leaf_tx_types, cu_rel_mi).is_some() { |
| 42639 | 42682 | hit!(CHROMA_QUAD_LEAF_TX_HITS); |
| 42683 | + hit!(CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS); | |
| 42684 | + // lane-av1f9singleland: this arm's own | |
| 42685 | + // non-vacuity number -- the shared | |
| 42686 | + // DIFFERS counter below cannot say which | |
| 42687 | + // arm changed an answer. | |
| 42640 | 42688 | if cu_tx_type != luma_tx_type { |
| 42641 | 42689 | hit!(CHROMA_QUAD_LEAF_TX_DIFF_HITS); |
| 42690 | + hit!(CHROMA_QUAD_LEAF_TX_SINGLEREF_DIFF_HITS); | |
| 42642 | 42691 | } |
| 42643 | 42692 | } |
| 42644 | 42693 | let cu_grid = read_inter_plane( |
crates/ec-av1/src/stream.rsmodified+100 -0
| @@ -21110,6 +21110,106 @@ pub(crate) mod tests { | ||
| 21110 | 21110 | ); |
| 21111 | 21111 | } |
| 21112 | 21112 | |
| 21113 | + /// lane-av1f9singleland: `decode_inter_block` has TWO textually parallel | |
| 21114 | + /// copies of the 4:4:4 four-unit chroma arm -- the compound prediction | |
| 21115 | + /// arm (the `build` closure) and the single-reference arm. Both resolve | |
| 21116 | + /// each unit's `tx_type` through `covering_leaf_tx_type` over a | |
| 21117 | + /// `leaf_tx_types` list collected at EVERY size, both bumped the same | |
| 21118 | + /// `CHROMA_QUAD_LEAF_TX_HITS` / `..._DIFF_HITS` pair, and the gate above | |
| 21119 | + /// asserts only that pair. So that gate cannot say which arm its witness | |
| 21120 | + /// came from, and the two arms can be reverted independently. | |
| 21121 | + /// | |
| 21122 | + /// Measured on the gate's own witness `fixtures/444_quad_leaf_tx_type.obu` | |
| 21123 | + /// (the census is the point of this test, so it is quoted rather than | |
| 21124 | + /// assumed): 96 chroma units resolve through their covering luma leaf, of | |
| 21125 | + /// which 88 are the single-reference arm's and 8 the compound arm's; of | |
| 21126 | + /// the 8 units whose resolved type DIFFERS from the block-level one -- | |
| 21127 | + /// the non-vacuity bar, since a block whose four leaves agree makes the | |
| 21128 | + /// per-quadrant resolve a no-op -- ALL 8 are the single-reference arm's. | |
| 21129 | + /// The shared counters' non-vacuity number is therefore 100% | |
| 21130 | + /// single-reference, and the compound arm contributes 8 of 96 route hits | |
| 21131 | + /// and none of the 8 that change an answer. | |
| 21132 | + /// | |
| 21133 | + /// The other 26 pinned 4:4:4 fixtures in this tree reach the arm zero | |
| 21134 | + /// times (`444_intrabc_rect4_witness`, `444_leaf8_oob`, | |
| 21135 | + /// `444_lossy_rect4_*`, `444_lossy_superres_*`, `444_sb128rect_lr_witness`, | |
| 21136 | + /// and every `ll444_*`), so this one witness is the only thing pinning | |
| 21137 | + /// the single-reference copy of the arm at all. | |
| 21138 | + /// | |
| 21139 | + /// Non-vacuity, per the mutation recorded in | |
| 21140 | + /// `lanes/av1f9singleland.report.md`: reverting ONLY this arm's | |
| 21141 | + /// `Some(cu_tx_type)` to `Some(luma_tx_type)` turns this gate red on | |
| 21142 | + /// decode-order frame 1 with 777 bytes differing; gating ONLY this arm's | |
| 21143 | + /// leaf push back behind `if side > 64` (the pre-`6c33f204` state) turns | |
| 21144 | + /// it red with the same 777 bytes. | |
| 21145 | + #[test] | |
| 21146 | + fn the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms() { | |
| 21147 | + const NAME: &str = | |
| 21148 | + "the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms"; | |
| 21149 | + const FIXTURE_LEN: usize = 27933; | |
| 21150 | + const FIXTURE_FNV: u64 = 0x85fa_830b_8800_90df; | |
| 21151 | + let _gate_lock = lock_gate_counters(); | |
| 21152 | + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) | |
| 21153 | + .join("fixtures/444_quad_leaf_tx_type.obu"); | |
| 21154 | + let stream = std::fs::read(&path) | |
| 21155 | + .unwrap_or_else(|e| panic!("{NAME}: reading {}: {e}", path.display())); | |
| 21156 | + assert_eq!(stream.len(), FIXTURE_LEN, "{NAME}: fixture length moved"); | |
| 21157 | + assert_eq!(fnv1a64(&stream), FIXTURE_FNV, "{NAME}: fixture bytes moved"); | |
| 21158 | + | |
| 21159 | + let q0 = crate::decode::chroma_quad_leaf_tx_hits(); | |
| 21160 | + let s0 = crate::decode::chroma_quad_leaf_tx_singleref_hits(); | |
| 21161 | + let sd0 = crate::decode::chroma_quad_leaf_tx_singleref_diff_hits(); | |
| 21162 | + let frames = decode_stream(&stream) | |
| 21163 | + .unwrap_or_else(|e| panic!("{NAME}: the witness no longer decodes: {e}")) | |
| 21164 | + .len(); | |
| 21165 | + assert_eq!(frames, 4, "{NAME}: expected 4 shown frames"); | |
| 21166 | + let quad = crate::decode::chroma_quad_leaf_tx_hits() - q0; | |
| 21167 | + let singleref = crate::decode::chroma_quad_leaf_tx_singleref_hits() - s0; | |
| 21168 | + let sr_diff = crate::decode::chroma_quad_leaf_tx_singleref_diff_hits() - sd0; | |
| 21169 | + | |
| 21170 | + assert!( | |
| 21171 | + singleref > quad / 2, | |
| 21172 | + "{NAME}: the single-reference arm resolved {singleref} of {quad} covering-leaf chroma \ | |
| 21173 | + units -- the shared counter is no longer dominated by the arm this gate witnesses, so \ | |
| 21174 | + a revert of the single-reference copy would leave the shared total comfortably non-zero" | |
| 21175 | + ); | |
| 21176 | + assert!( | |
| 21177 | + sr_diff >= 2, | |
| 21178 | + "{NAME}: the single-reference arm's per-quadrant resolve never CHANGED an answer \ | |
| 21179 | + (differing {sr_diff}). A route count alone is not a witness: it fires on every \ | |
| 21180 | + four-unit chroma read, including the blocks whose four luma leaves all agree -- the \ | |
| 21181 | + exact shape a no-op resolve looks green on." | |
| 21182 | + ); | |
| 21183 | + eprintln!( | |
| 21184 | + "{NAME}: {singleref} of {quad} covering-leaf units are the single-reference arm's, \ | |
| 21185 | + {sr_diff} of which changed an answer" | |
| 21186 | + ); | |
| 21187 | + | |
| 21188 | + // 4:2:0 control, as in the gate above: the four-unit arm is the 4:4:4 | |
| 21189 | + // (`ss 0/0`) route only, so the single-reference arm's own counters | |
| 21190 | + // must stay at exactly 0 there too. | |
| 21191 | + let control = std::fs::read( | |
| 21192 | + std::path::Path::new(env!("CARGO_MANIFEST_DIR")) | |
| 21193 | + .join("fixtures/av1_192x128_8bit_intra64_in_inter.obu"), | |
| 21194 | + ) | |
| 21195 | + .unwrap_or_else(|e| panic!("{NAME}: reading the 4:2:0 control: {e}")); | |
| 21196 | + let c_s0 = crate::decode::chroma_quad_leaf_tx_singleref_hits(); | |
| 21197 | + let c_sd0 = crate::decode::chroma_quad_leaf_tx_singleref_diff_hits(); | |
| 21198 | + let c_frames = decode_stream(&control) | |
| 21199 | + .unwrap_or_else(|e| panic!("{NAME}: the 4:2:0 control no longer decodes: {e}")) | |
| 21200 | + .len(); | |
| 21201 | + assert!(c_frames > 0, "{NAME}: the 4:2:0 control decoded no frames"); | |
| 21202 | + assert_eq!( | |
| 21203 | + ( | |
| 21204 | + crate::decode::chroma_quad_leaf_tx_singleref_hits() - c_s0, | |
| 21205 | + crate::decode::chroma_quad_leaf_tx_singleref_diff_hits() - c_sd0, | |
| 21206 | + ), | |
| 21207 | + (0, 0), | |
| 21208 | + "{NAME}: the 4:2:0 control fired the single-reference arm's four-unit route -- the \ | |
| 21209 | + counter is not specific to the route it claims to witness" | |
| 21210 | + ); | |
| 21211 | + } | |
| 21212 | + | |
| 21113 | 21213 | /// lane-av1chrtx: the SIBLING of lane-av1444chr's four-unit arm -- a RECT |
| 21114 | 21214 | /// inter block's chroma plane, read by `read_inter_rect_chroma`. That |
| 21115 | 21215 | /// helper was left handing every unit the block-level `luma_tx_type` |
lanes/av1f9singleland.report.mdadded+237 -0
| @@ -0,0 +1,237 @@ | ||
| 1 | +# lane-av1f9singleland — the "unlanded" fix was ALREADY ON MAIN (census false positive); landed instead the arm-attribution gap: the four-unit 4:4:4 witness is 88/96 single-reference and 8/8 of the non-vacuity bar, and no gate said so | |
| 2 | + | |
| 3 | +## 1. The premise is false: `c7fd5afa` is a duplicate, not an unlanded fix | |
| 4 | + | |
| 5 | +The ticket said the fix on `lane-av1-f9single` tip `c7fd5afa` "never reached | |
| 6 | +main" and that "main still reads `if side > 64` around `decode.rs:42271`". | |
| 7 | +Both statements are wrong. The cherry-pick and the blame: | |
| 8 | + | |
| 9 | +``` | |
| 10 | +$ git -C ~/.cache/wt/av1f9singleland cherry-pick --no-commit c7fd5afa | |
| 11 | +Auto-merging crates/ec-av1/src/decode.rs | |
| 12 | +CONFLICT (content): Merge conflict in crates/ec-av1/src/decode.rs | |
| 13 | +error: could not apply c7fd5afa... | |
| 14 | +``` | |
| 15 | + | |
| 16 | +``` | |
| 17 | +$ git merge-base --is-ancestor 6c33f204 HEAD && echo YES # the "compound twin" | |
| 18 | +YES | |
| 19 | +$ git merge-base --is-ancestor c7fd5afa HEAD && echo YES # the "unlanded" fix | |
| 20 | +NO | |
| 21 | +``` | |
| 22 | + | |
| 23 | +`git blame` on the single-reference arm's two sites attributes BOTH to | |
| 24 | +`6c33f204` — the commit the ticket describes as the *already-landed compound | |
| 25 | +twin*: | |
| 26 | + | |
| 27 | +``` | |
| 28 | +$ git blame -L 42250,42262 -s crates/ec-av1/src/decode.rs | |
| 29 | +6c33f2047 42261) leaf_tx_types.push((row, col, tw, th, tu_tx_type)); | |
| 30 | +$ git blame -L 42636,42644 -s crates/ec-av1/src/decode.rs | |
| 31 | +6c33f2047 42636) let cu_rel_mi = (cr * (cu_tx / MI), cc * (cu_tx / MI)); | |
| 32 | +6c33f2047 42637) let cu_tx_type = covering_leaf_tx_type(&leaf_tx_types, cu_rel_mi) | |
| 33 | +6c33f2047 42639) if covering_leaf_tx_type(&leaf_tx_types, cu_rel_mi).is_some() { | |
| 34 | +6c33f2047 42640) hit!(CHROMA_QUAD_LEAF_TX_HITS); | |
| 35 | +6c33f2047 42641) if cu_tx_type != luma_tx_type { | |
| 36 | +6c33f2047 42642) hit!(CHROMA_QUAD_LEAF_TX_DIFF_HITS); | |
| 37 | +``` | |
| 38 | + | |
| 39 | +`6c33f204` ("4:4:4 inter chroma units inherit their own quadrant's luma | |
| 40 | +tx_type") collected `leaf_tx_types` at EVERY size and pointed BOTH copies of | |
| 41 | +the four-unit arm at the covering lookup. Its own message calls the | |
| 42 | +single-reference side "the single-reference twin" — the commit was a | |
| 43 | +twin-flow sweep, not a compound-only change, and the branch census read the | |
| 44 | +*commit subject* rather than the diff. | |
| 45 | + | |
| 46 | +**Main's form is also the better one.** The branch's version inlines a | |
| 47 | +four-clause `.iter().copied().find(...)` closure; main extracts the shared | |
| 48 | +`covering_leaf_tx_type` (decode.rs:38785) that the intra 128 path, the rect | |
| 49 | +sibling and both four-unit arms all call. Cherry-picking the branch would have | |
| 50 | +reintroduced a fourth inline copy of a convention main had already | |
| 51 | +deduplicated. So the conflict is a genuine "do not take this" signal, not | |
| 52 | +something to resolve by hand. | |
| 53 | + | |
| 54 | +The `if side > 64` the ticket pointed at (decode.rs:42304 on this tree) is a | |
| 55 | +DIFFERENT guard — the 128x128 mu-chunk walk from lane-sb128c r1, which is | |
| 56 | +correctly `side > 64`. The leaf-push guard the fix was about no longer exists; | |
| 57 | +the push is unconditional. | |
| 58 | + | |
| 59 | +## 2. What was actually missing: the witness cannot say which arm it witnessed | |
| 60 | + | |
| 61 | +`CHROMA_QUAD_LEAF_TX_HITS` and `..._DIFF_HITS` are bumped from **both** arms | |
| 62 | +of the four-unit 4:4:4 chroma arm, and | |
| 63 | +`a_pinned_444_inter_stream_chroma_units_inherit_their_own_quadrants_tx_type` | |
| 64 | +asserts only that pair. `decode_inter_block` carries two textually parallel | |
| 65 | +copies of that arm — the compound prediction arm (the `build` closure at | |
| 66 | +decode.rs:39879) and the single-reference arm — so either can be reverted | |
| 67 | +while the other keeps the shared total comfortably non-zero. | |
| 68 | + | |
| 69 | +Measured by arm, on the existing witness `fixtures/444_quad_leaf_tx_type.obu` | |
| 70 | +(27933 B, sha256 `a06c9f7a0862252f6ab7ebdcec340d0602e730e38089365f14747db37f8e78d5`), | |
| 71 | +with a temporary arm-separating counter: | |
| 72 | + | |
| 73 | +``` | |
| 74 | +TEMP-PROBE 444_quad_leaf_tx_type.obu: frames 4, quad 96 (diff 8), of which SINGLE-REF 88 (sr diff 8) | |
| 75 | +TEMP-PROBE 444_rect_strip_leaf_tx_type.obu: frames 3, quad 8 (diff 2), of which SINGLE-REF 8 (sr diff 2) | |
| 76 | +``` | |
| 77 | + | |
| 78 | +**88 of 96** covering-leaf units are the single-reference arm's, and **all 8** | |
| 79 | +of the DIFFERS units — the number the existing gate uses as its non-vacuity | |
| 80 | +bar — are the single-reference arm's. The compound arm contributes 8 of 96 | |
| 81 | +route hits and none of the 8 that change an answer. The gate's non-vacuity | |
| 82 | +number is 100% single-reference, and nothing in the tree said so. | |
| 83 | + | |
| 84 | +The other 26 pinned 4:4:4 fixtures reach the arm **zero** times | |
| 85 | +(`444_intrabc_rect4_witness`, `444_leaf8_oob`, `444_lossy_rect4_*`, | |
| 86 | +`444_lossy_superres_*`, `444_sb128rect_lr_witness`, and every `ll444_*`), so | |
| 87 | +that one witness is the only thing pinning the single-reference copy at all. | |
| 88 | + | |
| 89 | +## 3. Change (additive: +149/-0, no decode-semantics edit) | |
| 90 | + | |
| 91 | +- `decode.rs`: `CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS` + | |
| 92 | + `CHROMA_QUAD_LEAF_TX_SINGLEREF_DIFF_HITS` and their accessors, bumped only | |
| 93 | + in the single-reference arm. | |
| 94 | +- `stream.rs`: `the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms` | |
| 95 | + — asserts the single-ref arm holds the majority of the shared total, that | |
| 96 | + its own DIFFERS count clears the non-vacuity bar, and that the 4:2:0 control | |
| 97 | + fires neither new counter. | |
| 98 | + | |
| 99 | +The compound arm is untouched; the two arms stay textually comparable, which is | |
| 100 | +the point of a twin: | |
| 101 | + | |
| 102 | +```rust | |
| 103 | +// COMPOUND arm, decode.rs:40876-40885 // SINGLE-REF arm, decode.rs:42679-42693 | |
| 104 | +let cu_rel_mi = (cr * (cu_tx / MI), cc * (cu_tx / MI)); let cu_rel_mi = (cr * (cu_tx / MI), cc * (cu_tx / MI)); | |
| 105 | +let cu_tx_type = covering_leaf_tx_type(&leaf_tx_types, let cu_tx_type = covering_leaf_tx_type(&leaf_tx_types, | |
| 106 | + cu_rel_mi) cu_rel_mi) | |
| 107 | + .unwrap_or(luma_tx_type); .unwrap_or(luma_tx_type); | |
| 108 | +if covering_leaf_tx_type(&leaf_tx_types, cu_rel_mi) if covering_leaf_tx_type(&leaf_tx_types, cu_rel_mi) | |
| 109 | + .is_some() { .is_some() { | |
| 110 | + hit!(CHROMA_QUAD_LEAF_TX_HITS); hit!(CHROMA_QUAD_LEAF_TX_HITS); | |
| 111 | + if cu_tx_type != luma_tx_type { hit!(CHROMA_QUAD_LEAF_TX_SINGLEREF_HITS); | |
| 112 | + hit!(CHROMA_QUAD_LEAF_TX_DIFF_HITS); if cu_tx_type != luma_tx_type { | |
| 113 | + } hit!(CHROMA_QUAD_LEAF_TX_DIFF_HITS); | |
| 114 | +} hit!(CHROMA_QUAD_LEAF_TX_SINGLEREF_DIFF_HITS); | |
| 115 | + } | |
| 116 | + } | |
| 117 | +``` | |
| 118 | + | |
| 119 | +## 4. Mutation / red-before: three independent reds, all on the single-ref arm | |
| 120 | + | |
| 121 | +The two hunks `c7fd5afa` proposed were each re-applied as a mutation to prove | |
| 122 | +the single-reference arm is load-bearing on its own, and the new gate was | |
| 123 | +proven non-vacuous a third way. | |
| 124 | + | |
| 125 | +**Red 1 — covering lookup reverted to the block-level type** (hunk 2 of the | |
| 126 | +proposed fix, `Some(cu_tx_type)` -> `Some(luma_tx_type)`, single-ref arm only): | |
| 127 | + | |
| 128 | +``` | |
| 129 | +a_pinned_444_inter_stream_chroma_units_inherit_their_own_quadrants_tx_type: | |
| 130 | + decode-order frame 1 of 4 (4 shown, 0 hidden) differs from the oracle at byte | |
| 131 | + 36635 (ours 127 vs 126), 777 bytes differ | |
| 132 | +test result: FAILED. 0 passed; 1 failed | |
| 133 | +``` | |
| 134 | + | |
| 135 | +**Red 2 — leaf push gated back behind `if side > 64`** (hunk 1, the pre-`6c33f204` | |
| 136 | +state, single-ref arm only): | |
| 137 | + | |
| 138 | +``` | |
| 139 | +a_pinned_444_inter_stream_chroma_units_inherit_their_own_quadrants_tx_type: | |
| 140 | + decode-order frame 1 of 4 (4 shown, 0 hidden) differs from the oracle at byte | |
| 141 | + 36635 (ours 127 vs 126), 777 bytes differ | |
| 142 | +test result: FAILED. 0 passed; 1 failed | |
| 143 | +``` | |
| 144 | + | |
| 145 | +777 bytes, the same number `6c33f204` reports for its own pre-fix state — | |
| 146 | +confirming the single-reference arm was the arm that needed the fix all along, | |
| 147 | +and that the pre-`6c33f204` defect really was 777/640/554 wrong V samples. | |
| 148 | + | |
| 149 | +**Red 3 — the new gate's own non-vacuity.** The single-reference arm's covering | |
| 150 | +route disabled, leaving the compound arm intact: | |
| 151 | + | |
| 152 | +``` | |
| 153 | +the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms: | |
| 154 | + the single-reference arm resolved 0 of 8 covering-leaf chroma units -- the shared | |
| 155 | + counter is no longer dominated by the arm this gate witnesses, so a revert of the | |
| 156 | + single-reference copy would leave the shared total comfortably non-zero | |
| 157 | +test result: FAILED. 0 passed; 1 failed | |
| 158 | +``` | |
| 159 | + | |
| 160 | +Note the shape of Red 3: the shared total is still **8** (all compound). A | |
| 161 | +gate reading only the shared counters sees a healthy non-zero number while the | |
| 162 | +arm it exists to witness is dead. That is the gap, demonstrated. | |
| 163 | + | |
| 164 | +**Green after restore** (both mutations reverted): | |
| 165 | + | |
| 166 | +``` | |
| 167 | +a_pinned_444_inter_stream_chroma_units_inherit_their_own_quadrants_tx_type: | |
| 168 | + quad-resolved chroma units 96, of which 8 differed ... ok | |
| 169 | +the_pinned_444_quadrant_witness_is_the_single_reference_arms_and_not_only_the_compound_arms: | |
| 170 | + 88 of 96 covering-leaf units are the single-reference arm's, 8 of which changed an answer ... ok | |
| 171 | +``` | |
| 172 | + | |
| 173 | +## 5. Neighbouring gates re-run (all green, all with the oracle required) | |
| 174 | + | |
| 175 | +`EC_AV1_REQUIRE_AOMENC=1` against the instrumented | |
| 176 | +`~/.cache/aom-oracle/build/{aomenc,aomdec}`, so no arm silently skipped: | |
| 177 | + | |
| 178 | +| Set | Filter | Result | | |
| 179 | +| --- | --- | --- | | |
| 180 | +| 444 four-unit arm (existing) | `quadrants_tx_type` | 1 passed, 0 failed — 96 units, 8 differed | | |
| 181 | +| 444 four-unit arm (NEW) | `single_reference_arms` | 1 passed, 0 failed — 88 of 96, 8 changed an answer | | |
| 182 | +| 4:4:4 family | `444` | **39 passed**, 0 failed (18.66s) | | |
| 183 | +| intrabc_rect family | `intrabc_rect` | **7 passed**, 0 failed | | |
| 184 | +| rect-strip sibling | `rect_strip` | **10 passed**, 0 failed (15.94s) | | |
| 185 | +| `covering_leaf_tx_type` unit test | `leaf_tx_type` | 1 passed, 0 failed | | |
| 186 | +| 4:2:0 control | `inter_block` | 3 passed, 0 failed | | |
| 187 | +| 4:2:0 chroma tx | `chroma_tx` | 2 passed, 0 failed | | |
| 188 | +| 4:2:0 streams | `420` | 2 passed, 0 failed | | |
| 189 | + | |
| 190 | +`cargo check -p ec-av1 --all-targets`: clean, **0 warnings** (private | |
| 191 | +`CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1f9singleland`). | |
| 192 | + | |
| 193 | +The 4:2:0 sets are unchanged because the covering consumer is gated on | |
| 194 | +`ss_x == 0 && ss_y == 0`; at 4:2:0 the arm is unreachable and the new | |
| 195 | +counters are asserted at exactly `(0, 0)` there by the new gate's own control. | |
| 196 | + | |
| 197 | +## 6. Merge verification onto the advanced main tip | |
| 198 | + | |
| 199 | +Main advanced 35 commits past this lane's base (`3aa16dd1` -> `57834ee2`) | |
| 200 | +while the lane ran, so the merge was proved rather than assumed: | |
| 201 | + | |
| 202 | +``` | |
| 203 | +$ git merge-tree --write-tree main 0b5b46d8 | |
| 204 | +45857ebeda17d40d140238accb80344f40331ade # exit 0, no conflict | |
| 205 | +``` | |
| 206 | + | |
| 207 | +Built as a real two-parent commit and re-ran against it: | |
| 208 | + | |
| 209 | +``` | |
| 210 | +cargo check -p ec-av1 --all-targets -> Finished, 0 warnings | |
| 211 | +single_reference_arms -> 88 of 96 covering-leaf units, 8 changed an answer ok | |
| 212 | +quadrants_tx_type -> quad-resolved chroma units 96, of which 8 differed ok | |
| 213 | +``` | |
| 214 | + | |
| 215 | +Same numbers as on the lane base, so nothing in those 35 commits moved the | |
| 216 | +witness. | |
| 217 | + | |
| 218 | +## 7. Not done / out of scope | |
| 219 | + | |
| 220 | +- The compound arm is still only 8-of-96 witnessed. A witness that exercises | |
| 221 | + the compound four-unit arm's DIFFERS condition would need a stream whose | |
| 222 | + *compound* blocks carry skipped luma leaves; the one pinned 444 witness does | |
| 223 | + not. Not attempted — out of this lane's scope (it is a compound-arm coverage | |
| 224 | + question, not a single-reference one), and flagged here rather than left | |
| 225 | + implied. | |
| 226 | +- No new fixture was encoded. The census named `a6tools444_26frame_444_inter.obu`; | |
| 227 | + no such fixture exists in this tree and no `aomenc` is on PATH, so its | |
| 228 | + 26-frame claim could not be re-measured. It is not needed: the census's own | |
| 229 | + measurement, and this lane's, agree the fix is already in. | |
| 230 | +- The full `--lib` suite was not run: the box is under three concurrent sibling | |
| 231 | + suites (`av1pinspec`, an `a_444_intrabc_owned_rect` lane, and a | |
| 232 | + `--test-threads=4` run). Per-lane scoping only; project-wide validation is | |
| 233 | + the integrator's call. | |
| 234 | +- `lanes/av1f9single.report.md` from the branch was NOT brought over. It | |
| 235 | + documents measurements of an arm state that never existed on main, and its | |
| 236 | + "counter left compound-only" claim is false against main (the counters are in | |
| 237 | + both arms). Keeping it would re-seed the same false-positive census entry. |