forge
Explore
Log in

Don't you dare go Hollow

Suite finished 368/3 -- per-failure triage, film_grain is a fixtures-symlink flake, 8-bit no-CFL counter still 0

Browse files at this commit

17dd9ade68f8fcecd7cf3b7edab12fdc0a2e74f8Ahmet Kaan GümüşParent: b94f6a09ae16b3
  • docs
    • suite finished 368/3 -- per-failure triage, film_grain is a fixtures-symlink flake, 8-bit no-CFL counter still 0
Show full message
docs(sbrect10): suite finished 368/3 -- per-failure triage, film_grain is a fixtures-symlink flake, 8-bit no-CFL counter still 0
crates/ec-av1/src/mvstack.rsmodified+194 -29
@@ -92,6 +92,36 @@ pub(crate) fn tmv_hits() -> usize {
9292 TMV_HITS.load(std::sync::atomic::Ordering::Relaxed)
9393 }
9494
95+/// lane-mvtwin r1 firing counters, one per divergence this round closed.
96+/// `COMP_GM_FILL_HITS`: compound extension candidates whose `comp_list` slot
97+/// came from `gm_mv_candidates[side]` rather than a scanned neighbour, and
98+/// where that global mv was NOT `(0, 0)` (the only case the old zero fill
99+/// could not fake). `STACK_FULL_DROPS`: distinct candidates libaom drops at
100+/// `MAX_REF_MV_STACK_SIZE` on insertion. `TILE_REACH_CLIPS`: row/col reaches
101+/// shortened by a tile origin past mi 0, which the old frame-edge clamp
102+/// missed entirely.
103+static COMP_GM_FILL_HITS: std::sync::atomic::AtomicUsize =
104+ std::sync::atomic::AtomicUsize::new(0);
105+static STACK_FULL_DROPS: std::sync::atomic::AtomicUsize =
106+ std::sync::atomic::AtomicUsize::new(0);
107+static TILE_REACH_CLIPS: std::sync::atomic::AtomicUsize =
108+ std::sync::atomic::AtomicUsize::new(0);
109+
110+/// [`COMP_GM_FILL_HITS`].
111+pub(crate) fn comp_gm_fill_hits() -> usize {
112+ COMP_GM_FILL_HITS.load(std::sync::atomic::Ordering::Relaxed)
113+}
114+
115+/// [`STACK_FULL_DROPS`].
116+pub(crate) fn stack_full_drops() -> usize {
117+ STACK_FULL_DROPS.load(std::sync::atomic::Ordering::Relaxed)
118+}
119+
120+/// [`TILE_REACH_CLIPS`].
121+pub(crate) fn tile_reach_clips() -> usize {
122+ TILE_REACH_CLIPS.load(std::sync::atomic::Ordering::Relaxed)
123+}
124+
95125 /// Everything [`find_mv_stack_with_sign_bias`] needs to fold temporal MV
96126 /// candidates into a block's stack (spec 7.10.2.8, only reached when the
97127 /// frame header's own `use_ref_frame_mvs` is set): the current frame's own
@@ -213,6 +243,14 @@ impl MiGrid {
213243 self.tile_col1 = col1;
214244 }
215245
246+ /// The current tile's top-left mi-unit origin ([`Self::set_tile_bounds`]).
247+ /// libaom's `tile->mi_row_start`/`mi_col_start`, which every availability
248+ /// and reach clamp in `setup_ref_mv_list` is written against
249+ /// (`xd->up_available`, `find_valid_row_offset`, mvref_common.c:512-528).
250+ pub fn tile_origin(&self) -> (usize, usize) {
251+ (self.tile_row0, self.tile_col0)
252+ }
253+
216254 /// Records the unit at `(row, col)`. Out-of-range coordinates are a
217255 /// no-op — the caller only ever addresses units inside the grid it built.
218256 pub fn set(&mut self, row: usize, col: usize, info: MiInfo) {
@@ -313,7 +351,15 @@ const MVREF_ROW_COLS: usize = 3;
313351 fn add_candidate(candidates: &mut Vec<StackEntry>, mv: (i32, i32), weight: u32) {
314352 if let Some(entry) = candidates.iter_mut().find(|e| e.mv == mv) {
315353 entry.weight += weight;
354+ } else if candidates.len() >= MAX_STACK_SIZE {
355+ STACK_FULL_DROPS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
316356 } else {
357+ // libaom `add_ref_mv_candidate` (mvref_common.c:100) and
358+ // `add_tpl_ref_mv` (:388) only push when
359+ // `*refmv_count < MAX_REF_MV_STACK_SIZE` -- the 9th distinct MV is
360+ // DROPPED AT INSERTION, never "kept if it outweighs an earlier one".
361+ // Sorting first and truncating afterwards (what this did) keeps a
362+ // different set whenever more than 8 distinct candidates are seen.
317363 candidates.push(StackEntry { mv, weight });
318364 }
319365 }
@@ -773,22 +819,35 @@ pub fn find_mv_stack_with_sign_bias(
773819 // nothing here relies on that.
774820 let row_adj = bh4 < 2 && mi_row % 2 == 1;
775821 let col_adj = bw4 < 2 && mi_col % 2 == 1;
776- let max_row_offset: isize = if mi_row > 0 {
822+ // r1 (lane-mvtwin): availability and reach are TILE-relative, never
823+ // frame-relative -- libaom's `xd->up_available`/`left_available` are
824+ // `mi_row > tile->mi_row_start` / `mi_col > tile->mi_col_start`, and
825+ // `find_valid_row_offset`/`find_valid_col_offset` (mvref_common.c:512-528)
826+ // clamp the reach to `tile->mi_row_start - mi_row`. Clamping to the FRAME
827+ // edge left `max_row_offset`/`max_col_offset` too long inside every tile
828+ // that does not start at 0, which changes the row/col scan's `inc` weight
829+ // (and so the stack ORDER) even though `MiGrid::get` already returns
830+ // `None` for the cells outside the tile.
831+ let (tile_row0, tile_col0) = grid.tile_origin();
832+ if tile_row0 > 0 || tile_col0 > 0 {
833+ TILE_REACH_CLIPS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
834+ }
835+ let max_row_offset: isize = if mi_row > tile_row0 {
777836 let reach = if bh4 < 2 { -4 } else { -6 } + isize::from(row_adj);
778- reach.max(-(mi_row as isize))
837+ reach.max(tile_row0 as isize - mi_row as isize)
779838 } else {
780839 0
781840 };
782- let max_col_offset: isize = if mi_col > 0 {
841+ let max_col_offset: isize = if mi_col > tile_col0 {
783842 let reach = if bw4 < 2 { -4 } else { -6 } + isize::from(col_adj);
784- reach.max(-(mi_col as isize))
843+ reach.max(tile_col0 as isize - mi_col as isize)
785844 } else {
786845 0
787846 };
788847
789848 let mut processed_rows = 0usize;
790849 let mut processed_cols = 0usize;
791- let found_above = mi_row > 0
850+ let found_above = max_row_offset.unsigned_abs() >= 1
792851 && scan_row(
793852 grid,
794853 mi_row,
@@ -802,7 +861,7 @@ pub fn find_mv_stack_with_sign_bias(
802861 &mut newmv_count,
803862 &mut processed_rows,
804863 );
805- let found_left = mi_col > 0
864+ let found_left = max_col_offset.unsigned_abs() >= 1
806865 && scan_col(
807866 grid,
808867 mi_row,
@@ -1227,7 +1286,12 @@ fn add_compound_candidate(
12271286 ) {
12281287 if let Some(entry) = candidates.iter_mut().find(|e| e.mv0 == mv0 && e.mv1 == mv1) {
12291288 entry.weight += weight;
1289+ } else if candidates.len() >= MAX_STACK_SIZE {
1290+ STACK_FULL_DROPS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
12301291 } else {
1292+ // Same insertion cap as [`add_candidate`]: libaom's compound branch
1293+ // of `add_ref_mv_candidate` (mvref_common.c:128) and `add_tpl_ref_mv`
1294+ // (:425) both gate the push on `*refmv_count < MAX_REF_MV_STACK_SIZE`.
12311295 candidates.push(CompoundStackEntry { mv0, mv1, weight });
12321296 }
12331297 }
@@ -1477,22 +1541,18 @@ fn process_compound_ref_mv_candidate(
14771541 /// libaom's combine step (`setup_ref_mv_list`, `mvref_common.c` ~696-720):
14781542 /// zips each side's `ref_id` (exact matches) then `ref_diff` (borrowed,
14791543 /// sign-flipped) entries, position-wise and independently per side, into up
1480-/// to two full `(mv0, mv1)` pair candidates — missing slots default to
1481-/// `(0, 0)`, matching libaom's zero-initialized `combined_mvs`.
1544+/// to two full `(mv0, mv1)` pair candidates. r1 (lane-mvtwin): slots past
1545+/// both lists are filled with THAT SIDE's own global motion vector
1546+/// (`gm_mv_candidates[idx]`, mvref_common.c:718-719), never `(0, 0)` — the
1547+/// exact gap the single-reference twin closed in r6 for its own
1548+/// `mv_ref_list` tail, still open on this side. Invisible while every live
1549+/// reference's global motion is IDENTITY (an unclamped gm mv of exactly
1550+/// `(0,0)`), wrong the moment a compound pair names a ROTZOOM/AFFINE
1551+/// reference and the scans leave the stack short.
14821552 fn combine_compound_candidates(
14831553 lists: &CompoundRefLists,
14841554 gm_mv_candidates: [(i32, i32); 2],
14851555 ) -> [((i32, i32), (i32, i32)); 2] {
1486- // lane-sbrect10 r2: the tail slots libaom leaves after `ref_id` and
1487- // `ref_diff` are filled with that side's GLOBAL MOTION vector, never with
1488- // zero (`setup_ref_mv_list`, mvref_common.c:723-729:
1489- // `for (; comp_idx < MAX_MV_REF_CANDIDATES; ++comp_idx)
1490- // comp_list[comp_idx][idx] = gm_mv_candidates[idx];`).
1491- // Zero-filling was right only under IDENTITY global motion, which the
1492- // module doc's original reduction assumed; aomenc turns global motion on
1493- // by default, so a compound block with no usable neighbour pair took a
1494- // (0, 0) predictor where libaom took the frame's translation -- silently
1495- // wrong pixels with the entropy stream still in sync.
14961556 let side_slots = |side: usize| -> [(i32, i32); 2] {
14971557 let merged: Vec<(i32, i32)> = lists.ref_id[side]
14981558 .iter()
@@ -1500,7 +1560,14 @@ fn combine_compound_candidates(
15001560 .take(2)
15011561 .copied()
15021562 .collect();
1503- std::array::from_fn(|i| merged.get(i).copied().unwrap_or(gm_mv_candidates[side]))
1563+ std::array::from_fn(|i| {
1564+ merged.get(i).copied().unwrap_or_else(|| {
1565+ if gm_mv_candidates[side] != (0, 0) {
1566+ COMP_GM_FILL_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
1567+ }
1568+ gm_mv_candidates[side]
1569+ })
1570+ })
15041571 };
15051572 let side0 = side_slots(0);
15061573 let side1 = side_slots(1);
@@ -1545,22 +1612,35 @@ pub fn find_mv_stack_compound(
15451612
15461613 let row_adj = bh4 < 2 && mi_row % 2 == 1;
15471614 let col_adj = bw4 < 2 && mi_col % 2 == 1;
1548- let max_row_offset: isize = if mi_row > 0 {
1615+ // r1 (lane-mvtwin): availability and reach are TILE-relative, never
1616+ // frame-relative -- libaom's `xd->up_available`/`left_available` are
1617+ // `mi_row > tile->mi_row_start` / `mi_col > tile->mi_col_start`, and
1618+ // `find_valid_row_offset`/`find_valid_col_offset` (mvref_common.c:512-528)
1619+ // clamp the reach to `tile->mi_row_start - mi_row`. Clamping to the FRAME
1620+ // edge left `max_row_offset`/`max_col_offset` too long inside every tile
1621+ // that does not start at 0, which changes the row/col scan's `inc` weight
1622+ // (and so the stack ORDER) even though `MiGrid::get` already returns
1623+ // `None` for the cells outside the tile.
1624+ let (tile_row0, tile_col0) = grid.tile_origin();
1625+ if tile_row0 > 0 || tile_col0 > 0 {
1626+ TILE_REACH_CLIPS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
1627+ }
1628+ let max_row_offset: isize = if mi_row > tile_row0 {
15491629 let reach = if bh4 < 2 { -4 } else { -6 } + isize::from(row_adj);
1550- reach.max(-(mi_row as isize))
1630+ reach.max(tile_row0 as isize - mi_row as isize)
15511631 } else {
15521632 0
15531633 };
1554- let max_col_offset: isize = if mi_col > 0 {
1634+ let max_col_offset: isize = if mi_col > tile_col0 {
15551635 let reach = if bw4 < 2 { -4 } else { -6 } + isize::from(col_adj);
1556- reach.max(-(mi_col as isize))
1636+ reach.max(tile_col0 as isize - mi_col as isize)
15571637 } else {
15581638 0
15591639 };
15601640
15611641 let mut processed_rows = 0usize;
15621642 let mut processed_cols = 0usize;
1563- let found_above = mi_row > 0
1643+ let found_above = max_row_offset.unsigned_abs() >= 1
15641644 && scan_row_compound(
15651645 grid,
15661646 mi_row,
@@ -1574,7 +1654,7 @@ pub fn find_mv_stack_compound(
15741654 &mut newmv_count,
15751655 &mut processed_rows,
15761656 );
1577- let found_left = mi_col > 0
1657+ let found_left = max_col_offset.unsigned_abs() >= 1
15781658 && scan_col_compound(
15791659 grid,
15801660 mi_row,
@@ -1815,10 +1895,8 @@ pub fn find_mv_stack_compound(
18151895 // bump) — otherwise append `comp_list[0]` as a brand-new entry. When
18161896 // the stack is empty, both `comp_list[0]` and `comp_list[1]` are
18171897 // appended unconditionally, with no dedup check at all.
1818- let comp_list = combine_compound_candidates(
1819- &lists,
1820- [gm_mv(gm, ref_frame.0), gm_mv(gm, ref_frame.1)],
1821- );
1898+ let comp_list =
1899+ combine_compound_candidates(&lists, [gm_mv(gm, ref_frame.0), gm_mv(gm, ref_frame.1)]);
18221900 if candidates.len() == 1 {
18231901 let (mv0, mv1) = if comp_list[0] == (candidates[0].mv0, candidates[0].mv1) {
18241902 comp_list[1]
@@ -2927,4 +3005,91 @@ mod tests {
29273005 assert_eq!(stack.entries[1].mv0, (-3, -3));
29283006 assert_eq!(stack.entries[1].mv1, (7, 7));
29293007 }
3008+
3009+ /// lane-mvtwin r1, defect 1 (twin drift, compound only): libaom fills a
3010+ /// `comp_list` slot past both `ref_id`/`ref_diff` lists with THAT SIDE's
3011+ /// own `gm_mv_candidates[idx]` (mvref_common.c:718-719). This module
3012+ /// filled it with `(0, 0)`, which is only accidentally right while every
3013+ /// live reference's global motion is IDENTITY -- the single-ref twin had
3014+ /// already closed the same gap on its own `mv_ref_list` tail in r6.
3015+ #[test]
3016+ fn a_missing_compound_combine_slot_takes_that_sides_global_mv_not_zero() {
3017+ let lists = CompoundRefLists::default();
3018+ let combined = combine_compound_candidates(&lists, [(9, -5), (-11, 3)]);
3019+ assert_eq!(combined[0], ((9, -5), (-11, 3)));
3020+ assert_eq!(combined[1], ((9, -5), (-11, 3)));
3021+ // One side supplied, the other short: only the short side falls back.
3022+ let mut half = CompoundRefLists::default();
3023+ half.ref_id[0].push((1, 2));
3024+ let combined = combine_compound_candidates(&half, [(9, -5), (-11, 3)]);
3025+ assert_eq!(combined[0], ((1, 2), (-11, 3)));
3026+ assert_eq!(combined[1], ((9, -5), (-11, 3)));
3027+ }
3028+
3029+ /// lane-mvtwin r1, defect 2 (both twins): libaom drops the 9th distinct
3030+ /// candidate AT INSERTION (`*refmv_count < MAX_REF_MV_STACK_SIZE`,
3031+ /// mvref_common.c:100/128/388/425). Pushing everything and truncating
3032+ /// after the weight sort keeps a different set: here the heavy 9th
3033+ /// candidate would survive and evict a scanned one.
3034+ #[test]
3035+ fn the_ninth_distinct_candidate_is_dropped_at_insertion_not_after_sorting() {
3036+ let mut candidates = Vec::new();
3037+ for i in 0..MAX_STACK_SIZE as i32 {
3038+ add_candidate(&mut candidates, (i, i), 2);
3039+ }
3040+ let before = stack_full_drops();
3041+ add_candidate(&mut candidates, (99, 99), 10_000);
3042+ assert_eq!(candidates.len(), MAX_STACK_SIZE);
3043+ assert!(!candidates.iter().any(|e| e.mv == (99, 99)));
3044+ assert_eq!(stack_full_drops(), before + 1);
3045+ // A full stack still takes the dedup weight bump libaom applies
3046+ // before the cap check.
3047+ add_candidate(&mut candidates, (0, 0), 6);
3048+ assert_eq!(candidates[0].weight, 8);
3049+
3050+ let mut comp = Vec::new();
3051+ for i in 0..MAX_STACK_SIZE as i32 {
3052+ add_compound_candidate(&mut comp, (i, i), (i, -i), 2);
3053+ }
3054+ add_compound_candidate(&mut comp, (99, 99), (99, 99), 10_000);
3055+ assert_eq!(comp.len(), MAX_STACK_SIZE);
3056+ }
3057+
3058+ /// lane-mvtwin r1, defect 3 (both twins): the row/col reach is clamped to
3059+ /// the TILE origin (`find_valid_row_offset`, mvref_common.c:512-528), not
3060+ /// the frame edge. `MiGrid::get` already hides the out-of-tile cells, so
3061+ /// the only visible symptom is the scan WEIGHT (`inc`) -- and through it
3062+ /// the stack order. Query at mi_row 9 with the tile starting at row 8:
3063+ /// the real reach is -1, so `inc = 1` and the weight stays at the floor
3064+ /// 2; the frame-edge clamp gave -6, `inc = min(6, size_h) = 4`, doubling
3065+ /// the vote.
3066+ #[test]
3067+ fn the_row_reach_is_clamped_to_the_tile_origin_not_the_frame_edge() {
3068+ let weight_with_tile_origin = |row0: usize| {
3069+ // A neighbour at least as wide as the query block (`bw4 <= n4`)
3070+ // is what makes libaom compute `inc` at all.
3071+ let wide = MiInfo {
3072+ size: 4,
3073+ size_h: 4,
3074+ ..inter((5, 5))
3075+ };
3076+ let mut grid = MiGrid::new(16, 16);
3077+ grid.set(8, 4, wide);
3078+ grid.set(8, 6, wide);
3079+ grid.set_tile_bounds(row0, 0, 16, 16);
3080+ let stack = find_mv_stack(&grid, 9, 4, 2, 2, LAST_FRAME, 16, 16);
3081+ assert_eq!(stack.entries.len(), 1);
3082+ stack.entries[0].weight
3083+ };
3084+ let tiled = weight_with_tile_origin(8);
3085+ let whole_frame = weight_with_tile_origin(0);
3086+ // One scanned row cell (`end_mi == bw4 == 2`, `len == 2`) plus the
3087+ // top-right probe's own flat `CORNER_WEIGHT`, which the reach never
3088+ // touches -- so the whole delta below is the row scan's `inc`.
3089+ // reach -1 -> inc 1 -> weight stays at the floor 2.
3090+ assert_eq!(tiled, REF_CAT_LEVEL + 2 * 2 + CORNER_WEIGHT);
3091+ // frame-edge clamp: reach -6 -> inc min(6, size_h) = 4.
3092+ assert_eq!(whole_frame, REF_CAT_LEVEL + 2 * 4 + CORNER_WEIGHT);
3093+ assert_ne!(tiled, whole_frame);
3094+ }
29303095 }
crates/ec-av1/src/stream.rsmodified+293 -0
@@ -14569,6 +14569,299 @@ mod tests {
1456914569 a_real_aomenc_temporal_mv_gate(42, 40);
1457014570 }
1457114571
14572+ /// lane-mvtwin r1: the COMPOUND MV-stack gate. Every other compound gate
14573+ /// here pins `--enable-ref-frame-mvs=0`, so `find_mv_stack_compound`'s
14574+ /// temporal half (the three `tpl_sample_pos` extension samples lane-sb128
14575+ /// r3 found missing) and its extension pass have never been exercised by
14576+ /// a real encoder. This arm turns ref-frame-mvs ON, gives the encoder a
14577+ /// 25-frame lookahead plus alt-refs so `reference_select` really drives
14578+ /// blocks to COMPOUND_REFERENCE, and sweeps global motion off/on so the
14579+ /// combine step's `gm_mv_candidates` fill (r1 defect 1) is reachable.
14580+ ///
14581+ /// Firing proof, hard-asserted: `decode::comp_mode_hits` (a real
14582+ /// compound block) AND `mvstack::tmv_hits` (a temporal candidate landed
14583+ /// in some stack) must BOTH have advanced on an attempt that also
14584+ /// decoded pixel-exact -- class [[gate-skips-on-its-own-failure]]: a
14585+ /// decode that succeeds is ALWAYS compared, on every decode-order frame,
14586+ /// and only the counters decide whether the attempt counts.
14587+ fn a_real_aomenc_compound_mv_stack_gate(
14588+ gate_name: &str,
14589+ seed_base: u32,
14590+ attempts: u32,
14591+ bit_depth: u32,
14592+ sb_size: u32,
14593+ global_motion: u32,
14594+ width: usize,
14595+ tile_columns: u32,
14596+ ) {
14597+ let _gate_lock = lock_gate_counters();
14598+ if !have_ffmpeg() {
14599+ eprintln!("SKIP {gate_name}: no ffmpeg");
14600+ return;
14601+ }
14602+ if !have_aomenc() {
14603+ eprintln!("SKIP {gate_name}: no aomenc at {}", aomenc_path().display());
14604+ return;
14605+ }
14606+ let (height, frame_count) = (64usize, 16usize);
14607+ let mut never_fired = 0u32;
14608+ let mut refusals = Vec::new();
14609+ for attempt in 0..attempts {
14610+ let seed = seed_base + attempt;
14611+ let duration = frame_count as f64 / 25.0;
14612+ let source =
14613+ gradients_source(seed, width, height, &format!("duration={duration}:rate=25"));
14614+ let y4m = Command::new("ffmpeg")
14615+ .args([
14616+ "-v",
14617+ "error",
14618+ "-f",
14619+ "lavfi",
14620+ "-i",
14621+ &source,
14622+ "-pix_fmt",
14623+ if bit_depth == 10 { "yuv420p10le" } else { "yuv420p" },
14624+ "-strict",
14625+ "-1",
14626+ "-t",
14627+ "0.64",
14628+ "-f",
14629+ "yuv4mpegpipe",
14630+ "-strict",
14631+ "-1",
14632+ "-",
14633+ ])
14634+ .stdin(Stdio::null())
14635+ .stdout(Stdio::piped())
14636+ .stderr(Stdio::piped())
14637+ .output()
14638+ .expect("ffmpeg failed to run");
14639+ assert!(
14640+ y4m.status.success(),
14641+ "ffmpeg fixture: {}",
14642+ String::from_utf8_lossy(&y4m.stderr)
14643+ );
14644+ let depth_args: &[&str] = if bit_depth == 10 {
14645+ &["-b", "10", "--input-bit-depth=10"]
14646+ } else {
14647+ &[]
14648+ };
14649+ // The cq sweep: how finely RD partitions decides how often a
14650+ // block's stack comes up short enough to reach the extension
14651+ // pass at all.
14652+ let cq = format!("--cq-level={}", [45u32, 55, 35][(attempt % 3) as usize]);
14653+ let sb = format!("--sb-size={sb_size}");
14654+ let gm = format!("--enable-global-motion={global_motion}");
14655+ // `--tile-columns` is log2: 1 means two tile columns, which is
14656+ // what makes every block in the right-hand tile carry a nonzero
14657+ // `tile_col0` and so exercise r1 defect 3's reach clamp.
14658+ let tiles = format!("--tile-columns={tile_columns}");
14659+ // class [[aomenc-last-flag-wins]]: every flag appears exactly
14660+ // once below, so there is no override to order.
14661+ let out = {
14662+ let mut child = Command::new(aomenc_path())
14663+ .args(depth_args)
14664+ .arg(&cq)
14665+ .arg(&sb)
14666+ .arg(&gm)
14667+ .arg(&tiles)
14668+ .args([
14669+ "--codec=av1",
14670+ "--passes=1",
14671+ "--end-usage=q",
14672+ "--cpu-used=0",
14673+ "--kf-max-dist=1000",
14674+ "--threads=1",
14675+ "--row-mt=0",
14676+ // What this gate is about: real compound references
14677+ // with a real temporal MV field behind them.
14678+ "--enable-ref-frame-mvs=1",
14679+ "--enable-order-hint=1",
14680+ "--auto-alt-ref=1",
14681+ "--lag-in-frames=25",
14682+ "--enable-fwd-kf=0",
14683+ "--enable-warped-motion=0",
14684+ "--enable-obmc=0",
14685+ "--enable-masked-comp=0",
14686+ "--enable-interintra-comp=0",
14687+ "--enable-dist-wtd-comp=0",
14688+ "--enable-diff-wtd-comp=0",
14689+ "--enable-onesided-comp=0",
14690+ "--enable-interintra-wedge=0",
14691+ "--enable-smooth-interintra=0",
14692+ "--enable-rect-partitions=0",
14693+ "--enable-ab-partitions=0",
14694+ "--enable-1to4-partitions=0",
14695+ "--enable-filter-intra=0",
14696+ "--enable-smooth-intra=0",
14697+ "--enable-paeth-intra=0",
14698+ "--enable-directional-intra=0",
14699+ "--enable-angle-delta=0",
14700+ "--enable-tx-size-search=0",
14701+ "--enable-cdef=0",
14702+ "--enable-restoration=0",
14703+ "--max-partition-size=32",
14704+ "--min-partition-size=32",
14705+ "--enable-palette=0",
14706+ "--enable-intrabc=0",
14707+ "--enable-cfl-intra=0",
14708+ "--obu",
14709+ "-o",
14710+ "-",
14711+ "-",
14712+ ])
14713+ .stdin(Stdio::piped())
14714+ .stdout(Stdio::piped())
14715+ .stderr(Stdio::piped())
14716+ .spawn()
14717+ .expect("aomenc failed to start");
14718+ child
14719+ .stdin
14720+ .take()
14721+ .expect("aomenc stdin")
14722+ .write_all(&y4m.stdout)
14723+ .expect("writing y4m to aomenc");
14724+ child.wait_with_output().expect("aomenc failed to run")
14725+ };
14726+ assert!(
14727+ out.status.success(),
14728+ "aomenc refused the fixture: {}",
14729+ String::from_utf8_lossy(&out.stderr)
14730+ );
14731+ let stream = out.stdout;
14732+ let (before_comp, before_tmv) = (decode::comp_mode_hits(), decode::tmv_hits());
14733+ let frames = match decode_stream(&stream) {
14734+ Err(e) => {
14735+ let msg = e.to_string();
14736+ assert!(
14737+ msg.contains("unsupported"),
14738+ "{gate_name} failed outright (seed {seed}): {msg}"
14739+ );
14740+ refusals.push(format!("seed {seed}: {msg}"));
14741+ continue;
14742+ }
14743+ Ok(frames) => frames,
14744+ };
14745+ let counted =
14746+ decode::comp_mode_hits() != before_comp && decode::tmv_hits() != before_tmv;
14747+ if !counted {
14748+ never_fired += 1;
14749+ }
14750+ let ffmpeg_frames = if bit_depth == 10 {
14751+ ffmpeg_decode_sequence_10bit(&stream, width, height, frame_count)
14752+ } else {
14753+ ffmpeg_decode_sequence(&stream, width, height, frame_count)
14754+ };
14755+ assert_eq!(frames.len(), frame_count);
14756+ // EVERY decode-order frame compared, never just the shown ones
14757+ // (class [[gate-blind-to-hidden-frames]]).
14758+ for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() {
14759+ assert_eq!(
14760+ got.y, want.y,
14761+ "{gate_name} frame {i} luma vs ffmpeg (seed {seed})"
14762+ );
14763+ assert_eq!(
14764+ got.u, want.u,
14765+ "{gate_name} frame {i} U vs ffmpeg (seed {seed})"
14766+ );
14767+ assert_eq!(
14768+ got.v, want.v,
14769+ "{gate_name} frame {i} V vs ffmpeg (seed {seed})"
14770+ );
14771+ }
14772+ if counted {
14773+ eprintln!(
14774+ "{gate_name} FIRING seed {seed}: comp_mode_hits +{}, tmv_hits +{}, \
14775+ comp_gm_fill_hits={}, stack_full_drops={}, tile_reach_clips={}",
14776+ decode::comp_mode_hits() - before_comp,
14777+ decode::tmv_hits() - before_tmv,
14778+ crate::mvstack::comp_gm_fill_hits(),
14779+ crate::mvstack::stack_full_drops(),
14780+ crate::mvstack::tile_reach_clips(),
14781+ );
14782+ gate_buckets(gate_name, 1, never_fired, refusals.len());
14783+ return;
14784+ }
14785+ }
14786+ gate_buckets(gate_name, 0, never_fired, refusals.len());
14787+ eprintln!(
14788+ "SKIP {gate_name}: {never_fired} attempts decoded but never drove a compound block \
14789+ with a temporal MV candidate, and every other attempt hit a named refusal:\n{}",
14790+ refusals.join("\n")
14791+ );
14792+ }
14793+
14794+ #[test]
14795+ fn a_real_aomenc_compound_mv_stack_with_temporal_mvs_decodes_pixel_exact() {
14796+ a_real_aomenc_compound_mv_stack_gate(
14797+ "a_real_aomenc_compound_mv_stack_with_temporal_mvs_decodes_pixel_exact",
14798+ 42,
14799+ 30,
14800+ 8,
14801+ 64,
14802+ 0,
14803+ 64,
14804+ 0,
14805+ );
14806+ }
14807+
14808+ #[test]
14809+ fn a_real_aomenc_compound_mv_stack_with_global_motion_decodes_pixel_exact() {
14810+ a_real_aomenc_compound_mv_stack_gate(
14811+ "a_real_aomenc_compound_mv_stack_with_global_motion_decodes_pixel_exact",
14812+ 80,
14813+ 30,
14814+ 8,
14815+ 64,
14816+ 1,
14817+ 64,
14818+ 0,
14819+ );
14820+ }
14821+
14822+ #[test]
14823+ fn a_real_aomenc_10bit_compound_mv_stack_at_128_superblocks_decodes_pixel_exact() {
14824+ a_real_aomenc_compound_mv_stack_gate(
14825+ "a_real_aomenc_10bit_compound_mv_stack_at_128_superblocks_decodes_pixel_exact",
14826+ 120,
14827+ 30,
14828+ 10,
14829+ 128,
14830+ 1,
14831+ 64,
14832+ 0,
14833+ );
14834+ }
14835+
14836+ /// KNOWN OPEN DEFECT, found by lane-mvtwin r1 and NOT caused by it: a
14837+ /// real aomenc stream 128 px wide with `--tile-columns=1` (two 64-px tile
14838+ /// columns) mis-decodes frame 1's luma against ffmpeg, at seed 200 with
14839+ /// this exact recipe. ABLATION-PROVEN pre-existing: the same arm fails
14840+ /// identically with r1's tile-origin reach clamp
14841+ /// (`MiGrid::tile_origin`) forced back to `(0, 0)`, so the cause is
14842+ /// somewhere else in the multi-tile path, not in `mvstack`. Kept as the
14843+ /// exact reproducer for the lane that owns tiles -- it is `#[ignore]`d
14844+ /// rather than deleted so the repro command survives:
14845+ /// `cargo test -p ec-av1 --lib across_two_tile_columns -- --ignored --nocapture`.
14846+ ///
14847+ /// It is also the ONLY arm that reaches r1 defect 3 (the col reach is
14848+ /// clamped to `tile_col0`, not the frame edge): the counter
14849+ /// `mvstack::tile_reach_clips` advanced to 60 on this stream. Defect 3
14850+ /// itself is proven deterministically by
14851+ /// `mvstack::tests::the_row_reach_is_clamped_to_the_tile_origin_not_the_frame_edge`.
14852+ #[test]
14853+ #[ignore = "known pre-existing multi-tile-column decode defect, see doc comment"]
14854+ fn a_real_aomenc_compound_mv_stack_across_two_tile_columns_decodes_pixel_exact() {
14855+ let name = "a_real_aomenc_compound_mv_stack_across_two_tile_columns_decodes_pixel_exact";
14856+ let before = crate::mvstack::tile_reach_clips();
14857+ a_real_aomenc_compound_mv_stack_gate(name, 200, 30, 8, 64, 0, 128, 1);
14858+ assert!(
14859+ crate::mvstack::tile_reach_clips() > before,
14860+ "{name}: no block was ever built inside a tile past mi 0 -- \
14861+ --tile-columns=1 did not produce a second tile column"
14862+ );
14863+ }
14864+
1457214865 /// bisect scratch: decode a pinned stream exactly once -- generic
1457314866 /// pin-repro tool, kept for manual use.
1457414867 #[test]
lanes/mvtwin-r1.report.mdadded+91 -0
@@ -0,0 +1,91 @@
1+# lane-mvtwin r1 — phase-by-phase diff of the two MV-stack twins vs libaom
2+
3+Base: lane-sb128 5ea5ec8, merged main 7a47fc1 (clean; the 128x128-superblock
4+refusal main re-added at b51719f stayed deleted — grep confirms).
5+Oracle: `~/.cache/aom-oracle/src/av1/common/mvref_common.c` (`setup_ref_mv_list`,
6+`av1_find_mv_refs`). Ours: `crates/ec-av1/src/mvstack.rs`
7+(`find_mv_stack_with_sign_bias` = single-ref twin, `find_mv_stack_compound` = compound twin).
8+
9+## The table (libaom line = mvref_common.c)
10+
11+| # | phase (libaom) | single-ref ours | compound ours | defect? |
12+|---|---|---|---|---|
13+| 1 | `row_adj`/`col_adj`, `find_valid_row/col_offset` reach (:502-533) | mvstack.rs:809 | mvstack.rs:1610 | **DEFECT 3** — both clamped the reach to the FRAME edge, libaom clamps to `tile->mi_row_start`/`mi_col_start` |
14+| 2 | `scan_row_mbmi` immediate, `len`/`weight`/`inc`/`processed_rows` (:141-190, :534-538) | `scan_row` :471 | `scan_row_compound` :1290 | exact (availability gate was `mi_row > 0`, folded into defect 3) |
15+| 3 | `scan_col_mbmi` (:192-236, :540-543) | `scan_col` :553 | `scan_col_compound` :1347 | exact |
16+| 4 | `has_top_right` + top-right `scan_blk_mbmi` (:264-312, :496, :544-548) | `scan_top_right` :645 | `scan_top_right_compound` :1403 | no change — see "has_tr" below |
17+| 5 | `nearest_match`, `REF_CAT_LEVEL` boost over `nearest_refmv_count` (:550-555) | :836 | :1600 | exact |
18+| 6 | `add_tpl_ref_mv` main loop, `step_h`/`step_w`/`blk_*_end` (:557-589) | :868 | :1625 | exact (compound reads the field once per side; `motion_field.rs:500` makes the lookup offset-independent, so both sides are Some/None together — libaom's single lookup) |
19+| 7 | `tpl_sample_pos` 3 extension samples + `check_sb_border` (:591-600, :316) | :898 | :1670 (added lane-sb128 r3) | exact — the twin drift r3 found, now symmetric |
20+| 8 | `GLOBALMV_OFFSET` / `zero_mv_ctx` far-or-missing test (:375-380, :406-412, :592) | :955 | :1750 | exact |
21+| 9 | corner `scan_blk_mbmi(-1,-1)` with `dummy_newmv_count`, weight `2*len`=4 (:604-607) | :967 | :1758 | exact |
22+| 10 | extended row/col scan `idx = 2..=MVREF_ROW_COLS` (:609-622) | :990 | :1770 | exact |
23+| 11 | `ref_match_count` + `mode_context` switch / `REFMV_OFFSET` (:624-651) | :1140 | :1858 | exact |
24+| 12 | the TWO bubble passes (nearest region, then the rest) (:653-682) | single stable `sort_by_key` :1050 | same :1802 | not a defect — every nearest entry carries `+REF_CAT_LEVEL` (640) and no post-boost entry can reach it (max post-boost weight seen is `len*weight` <= 80), so the two-phase ranking and one stable global sort agree |
25+| 13 | insertion cap `*refmv_count < MAX_REF_MV_STACK_SIZE` (:100, :128, :388, :425) | `add_candidate` :341 | `add_compound_candidate` :1268 | **DEFECT 2** — both pushed unbounded then sorted+truncated, keeping a different set than libaom's drop-at-insertion |
26+| 14 | `mi_size` = min(64x64 span, block span, frame edge) (:684-689) | :1060 | :1815 | exact |
27+| 15 | `process_compound_ref_mv_candidate`, sign-bias inversion, `can_rf > INTRA_FRAME` (:434-470, :693-706) | n/a | :1478 | exact |
28+| 16 | `comp_list` combine, slots past both lists = `gm_mv_candidates[idx]` (:708-720) | n/a | `combine_compound_candidates` :1520 | **DEFECT 1 (twin drift)** — filled `(0, 0)`; the single-ref twin closed the same gm-fallback gap in r6 |
29+| 17 | compound stack merge, `refmv_count==1` dedupe vs empty (:722-742) | n/a | :1845 | exact |
30+| 18 | `clamp_mv_ref` + `MV_BORDER`, every entry (:745-751, :768-772) | :1105 | :1878 | exact |
31+| 19 | single-ref extension gated per step on `MAX_MV_REF_CANDIDATES` (:754-766) | :1065 | n/a | exact |
32+| 20 | `mv_ref_list` tail filled with `gm_mv_candidates[0]`, unclamped (:775-782) | :1128 | n/a (libaom has no compound `mv_ref_list`) | exact |
33+
34+### has_tr (phase 4), why no change
35+Ours probes "is the grid cell at `(mi_row-1, mi_col+bw4)` populated", which for a
36+decoder is exactly "was it decoded". Walking libaom's mask logic: for SQUARE blocks
37+the mask result and "already decoded" coincide at both sb64 and sb128; for the
38+rect case that differs (`bs > 16` at a 64x128 block) libaom's own
39+`is_last_vertical_rect` refinement forces `has_tr = 1` again, agreeing with our
40+probe. Porting the mask WITHOUT the three shape refinements (which need the
41+partition type, not passed to this module) would REGRESS the VERT-rect case.
42+Recorded as the same corner-cut already documented at `mvstack.rs:588`;
43+upgrade path = thread the partition type in with the rect inter leaf.
44+
45+## Fixes (all in crates/ec-av1/src/mvstack.rs)
46+- D1 `combine_compound_candidates` (:1520 + call site :1859): unfilled slots take
47+ `gm_mv(gm, ref_frame.side)`, not `(0, 0)` (mvref_common.c:718-719).
48+- D2 `add_candidate` (:341) / `add_compound_candidate` (:1268): drop the 9th
49+ distinct candidate AT INSERTION (mvref_common.c:100/128/388/425); the dedup
50+ weight bump still applies on a full stack.
51+- D3 both twins (:809, :1610) + new `MiGrid::tile_origin` (:216): reach and
52+ availability are tile-relative (mvref_common.c:512-533).
53+
54+## Checks
55+`cargo test -p ec-av1 --lib mvstack::` -> 32 passed, 0 failed. Three new
56+deterministic tests, one per defect:
57+- `a_missing_compound_combine_slot_takes_that_sides_global_mv_not_zero`
58+- `the_ninth_distinct_candidate_is_dropped_at_insertion_not_after_sorting`
59+- `the_row_reach_is_clamped_to_the_tile_origin_not_the_frame_edge` (644 -> 648 vs 652)
60+
61+New real-aomenc gate `a_real_aomenc_compound_mv_stack_gate` (stream.rs), the first
62+compound gate here that does NOT pin `--enable-ref-frame-mvs=0`:
63+`--enable-ref-frame-mvs=1 --enable-order-hint=1 --auto-alt-ref=1 --lag-in-frames=25`,
64+cq sweep 45/55/35, 30 seeds/arm, hard-asserting BOTH `comp_mode_hits` and
65+`tmv_hits` advanced, every decode-order frame compared (Y/U/V) against ffmpeg,
66+decode errors only tolerated when the message contains "unsupported".
67+Arms: 8-bit sb64 gm=0 · 8-bit sb64 gm=1 · 10-bit sb128 gm=1.
68+
69+EVIDENCE: $HOME/.cache/mvtwin-suite-r1.log | cargo test -p ec-av1 --lib compound_mv_stack -- --test-threads=1 --nocapture | 3 arms FIRING pixel-exact: seed 44 comp_mode_hits +7 tmv_hits +56; seed 80 comp_mode_hits +1 tmv_hits +56; seed 122 (10-bit, sb128) comp_mode_hits +8 tmv_hits +55
70+EVIDENCE: crates/ec-av1/src/mvstack.rs tests | cargo test -p ec-av1 --lib mvstack:: | 32 passed 0 failed, each of the 3 defects asserted on its own values
71+
72+Full suite (systemd unit, MemoryMax=10G): `cargo test -p ec-av1 --lib -j3` ->
73+**375 passed, 0 failed, 33 ignored**, 692 s. Log `$HOME/.cache/mvtwin-suite-r1.log`.
74+
75+EVIDENCE: $HOME/.cache/mvtwin-suite-r1.log | systemd-run --user --unit=mvtwin-suite-... cargo test -p ec-av1 --lib -j3 | test result: ok. 375 passed; 0 failed; 33 ignored
76+
77+## Open residue
78+- fix-now-elsewhere (NOT this lane's surface): a real aomenc stream 128 px wide
79+ with `--tile-columns=1` MIS-DECODES frame 1 luma vs ffmpeg (seed 200, recipe in
80+ `a_real_aomenc_compound_mv_stack_across_two_tile_columns_decodes_pixel_exact`,
81+ `#[ignore]`d with the repro command in its doc). ABLATION-PROVEN pre-existing:
82+ identical failure with r1's tile-origin clamp forced back to `(0, 0)`. That arm
83+ is also the only one that reaches defect 3 on a real stream —
84+ `mvstack::tile_reach_clips` advanced to 60 there.
85+- deferred(a stream whose compound pair names a non-IDENTITY ROTZOOM/AFFINE
86+ reference) — `comp_gm_fill_hits` reads 0 on all three green arms, so D1 is
87+ proven by its unit test, not yet by a real stream. aomenc at gradients content
88+ keeps global motion IDENTITY even with `--enable-global-motion=1`.
89+- deferred(same) — `stack_full_drops` reads 0 on all three arms: no real block
90+ here produced 9 distinct candidates. D2 is unit-test-proven only.
91+- accepted — `has_tr` corner-cut (phase 4 above), ceiling and upgrade path named.
lanes/sbrect10-r2.handoff.mdmodified+49 -0
@@ -124,3 +124,52 @@ Triage order for the next round:
124124 3. The other two are this lane's own gates; the rect-partition sibling gate shares the compound
125125 stack path, so it is the expected place for a gm-fill regression to show.
126126 4. Only after the three are green: fill the N/0 totals into `lanes/sbrect10-r2.report.md`.
127+
128+## 5c. SUITE FINISHED -- final result and per-failure triage (supersedes 5b)
129+`test result: FAILED. 368 passed; 3 failed; 32 ignored; finished in 1049.95s`
130+(`$HOME/.cache/sbrect10-suite-r2.log`).
131+
132+### (a) `a_real_aomenc_stream_with_film_grain_decodes_pixel_exact` -- FLAKE, not a defect. CLOSED.
133+Panic was `Result::unwrap()` on `Err(Os { code: 2, NotFound })` at stream.rs:15680, i.e. the
134+`concat!(CARGO_MANIFEST_DIR, "/../../fixtures/golden6-mismatch.obu")` READ failed -- the shared
135+`fixtures` symlink (`-> /home/user/Documents/Code/Rust/edith_codecs/fixtures`) was transiently
136+gone mid-run, the known concurrent-lane merge hazard. The file is present now and the gate passes
137+on its own:
138+`cargo test -p ec-av1 --lib a_real_aomenc_stream_with_film_grain_decodes_pixel_exact`
139+-> `test result: ok. 1 passed; 0 failed`. Nothing to fix here; it is NOT a gm-fill regression.
140+
141+### (b) `a_real_aomenc_inter_frame_with_a_64x64_intra_block_reads_the_no_cfl_uv_alphabet` -- REAL, MINE, OPEN.
142+ 8-bit: 2 named refusals, 0 pixel-exact attempts carrying a >32 intra block
143+ (0 no-CFL uv_mode reads), 14 attempts carried none
144+ (the two refusals are "an inter SB-level AB partition" and "a split intra strip whose
145+ transform unit is 32x64" -- both other lanes' gaps, correctly named, not mismatches)
146+10-bit arm passes. **My step-2 claim that the half-random fixture makes the 8-bit arm carry the
147+shape is DISPROVEN by the gate itself.** The probe (`probe.sh`) counted a DIFFERENT quantity than
148+the gate: it greps `EC_AV1_TELL` for `post_is_inter is_inter=false` with `side>32`, whereas the
149+gate asserts `crate::decode::nocfl_uv_mode_hits()` moved. On the very same stream (8-bit cq58,
150+horizontal, sp=12 == gate attempt 8) the probe reports 2 and the counter reports 0, so those
151+8-bit >32 intra-in-inter blocks reach a decode path that never touches the counter.
152+NEXT: the three `NOCFL_UV_MODE_HITS` increment sites are `decode.rs:5499`, `decode.rs:8442`,
153+`decode.rs:18544`; instrument which intra-in-inter path an 8-bit 64x64 block actually takes
154+(the 10-bit ones clearly hit one of the three), then either fix the missing counter site or, if
155+the 8-bit path genuinely never offers CFL, narrow the gate's 8-bit assertion and say so.
156+No pixel mismatch is involved -- every decoded attempt compared exact.
157+
158+### (c) `a_real_aomenc_inter_sequence_with_a_superblock_level_rect_partition_decodes_pixel_exact` -- REAL, OPEN, UNATTRIBUTED.
159+ 8-bit: 4 named refusals, 3 carrying, 64x32=8, 32x64=2, 64-axis residual TUs=1, 9 none (0 mismatched)
160+ 10-bit: 0 named refusals, 1 carrying, 64x32=2, 32x64=0, 64-axis residual TUs=0, 15 none (0 mismatched)
161+ panic at stream.rs:6725: "(10-bit): no superblock-level rect strip carried a coded 64-axis
162+ residual transform unit inside a pixel-exact attempt (horz=2, vert=0)"
163+This is a VACUOUS-ARM assert, NOT a pixel mismatch (`0 of them mismatched` on both depths). r1
164+recorded this same gate GREEN with 10-bit `64-axis TUs=2` and `2 carrying`; it is now `0` and `1`.
165+Two candidate causes, NOT separated this round: (i) the `main` 18bf7dc merge (sb128 + r14 changed
166+partition/var-tx handling and neither r1 nor this lane ever suite-tested the merge), or (ii) this
167+round's gm-fill changing which attempts come out pixel-exact (only pixel-exact attempts count
168+toward the arm). Separate them by running this gate alone at `3a9e83e` (merge, pre-fix) in a
169+DETACHED worktree with its own CARGO_TARGET_DIR, then at `2b9709c`.
170+
171+### Corrected disposition
172+- fix-now next round: (b) the 8-bit no-CFL counter, (c) the 10-bit 64-axis vacuous arm.
173+- accepted/closed: (a) film_grain fixture flake.
174+- The gm-fill fix itself is NOT contradicted by anything in this suite: no gate reported a pixel
175+ mismatch, and the pinned stream `b58.obu` plus all 6 probe arms are byte-exact vs ffmpeg.
lanes/sbrect10-r2.report.mdmodified+7 -0
@@ -110,6 +110,13 @@ under the existing `EC_TRACE_TPL` rung (this is what proved frame 2's empty temp
110110 None lifted this round (r1 lifted none either; this lane's work is two silent-miscode fixes).
111111 `refusal_inventory.rs` is byte-identical to main.
112112
113+## Suite (step 4) -- RED
114+`test result: FAILED. 368 passed; 3 failed; 32 ignored; finished in 1049.95s`
115+(`$HOME/.cache/sbrect10-suite-r2.log`). film_grain is a shared-`fixtures`-symlink flake and
116+passes alone; the other two are open and triaged in `lanes/sbrect10-r2.handoff.md` section 5c.
117+Section 2's probe table proves only the 6 probed points -- it does NOT prove the gate's own
118+counter, which still reads 0 on the 8-bit arm.
119+
113120 ## EVIDENCE
114121 EVIDENCE: $HOME/.cache/sbrect10/b58.obu (sha256 00b9253b...dcd2, hashed twice) | probe.sh half-random geq, 6 arms (8/10-bit x cq 52/58/61), decode + compare vs ffmpeg | pixel diffs 0/0/0/0/0/0 (was 0/32890/39907 on the 10-bit arms), >32 intra-in-inter hits 5/2/3 (8-bit) and 6/7/7 (10-bit)
115122 EVIDENCE: $HOME/.cache/sbrect10/{a.az,o.az} | EC_TRACE_COEFF all_zero ladder, instrumented aomdec vs ours, whole stream | 180 TUs, `diff` empty -> entropy in sync, defect is reconstruction-side