forge
Explore
Log in

Don't you dare go Hollow

The compound 8x8 leaf never read its switchable interp_filter -- lost a symbol per leaf and stamped the [3,3] sentinel that made a neighbouring OBMC block PANIC

Browse files at this commit

c6220cd1fabf5da494522f4ec11142b1a501cdabAhmet Kaan GümüşParent: 9864603
  • fix
    • the compound 8x8 leaf never read its switchable interp_filter -- lost a symbol per leaf and stamped the [3,3] sentinel that made a neighbouring OBMC block PANIC
Show full message
fix(av1): the compound 8x8 leaf never read its switchable interp_filter -- lost a symbol per leaf and stamped the [3,3] sentinel that made a neighbouring OBMC block PANIC

libaom decodemv.c:1575 runs read_mb_interp_filter for every inter block,
compound included, right after read_compound_type. decode_leaf8's compound
arm skipped it entirely: it predicted both taps with a hard-coded Regular and
recorded the [3, 3] "no filter" sentinel, so a SWITCHABLE-filter stream lost
one symbol (two under dual filter) per compound 8x8 leaf, and a neighbouring
OBMC block's neighbour_filter fed the sentinel to from_switchable_symbol,
whose panic! aborted the process on a real aomenc dual-filter + OBMC stream
(flagged by lane-r14 r3). Same shape lane-gmaffine r3 fixed for the
single-ref leaf; this was the surviving sibling.

neighbour_filter now returns Result and refuses by name instead of panicking
(new refusal listed in refusal_inventory.rs) -- a decoder must never abort on
stream-derived state. New gate is RED and #[ignore]d with its measurement:
the compound leaf still desyncs past this read (bogus AB/1:4 refusal with the
read, bogus below-8x8 without it), so the fix is necessary, not sufficient.
crates/ec-av1/src/decode.rsmodified+134 -23
@@ -1726,6 +1726,32 @@ thread_local! {
17261726 static OBMC_HITS_8: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
17271727 }
17281728
1729+// lane-interp3 r1: how many inter blocks read a SWITCHABLE `interp_filter`
1730+// pair whose two directions differ (`enable_dual_filter` only -- with dual
1731+// filter off both directions take the single symbol, so this can never fire).
1732+// A gate asserting it proves the stream really carries dual-filter blocks.
1733+thread_local! {
1734+ static DUAL_FILTER_DIFF_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
1735+}
1736+
1737+// lane-interp3 r1: how many COMPOUND 8x8 leaves read their own
1738+// `read_mb_interp_filter` symbol(s) -- the read this round added (the leaf
1739+// used to skip it entirely, losing a symbol and stamping the `[3, 3]`
1740+// no-filter sentinel that made a neighbouring OBMC block panic).
1741+thread_local! {
1742+ static COMPOUND8_FILTER_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
1743+}
1744+
1745+/// Current value of [`DUAL_FILTER_DIFF_HITS`].
1746+pub(crate) fn dual_filter_diff_hits() -> usize {
1747+ DUAL_FILTER_DIFF_HITS.with(|c| c.get())
1748+}
1749+
1750+/// Current value of [`COMPOUND8_FILTER_HITS`].
1751+pub(crate) fn compound8_filter_hits() -> usize {
1752+ COMPOUND8_FILTER_HITS.with(|c| c.get())
1753+}
1754+
17291755 // lane-warp round 1: how many blocks resolved `motion_mode_allowed` to
17301756 // `WARPED_CAUSAL`-eligible (3-symbol read, `num_proj_ref >= 1` under
17311757 // `allow_warped_motion`) AND the symbol actually decoded to `WARPED_CAUSAL`
@@ -14856,6 +14882,9 @@ fn resolve_interp_filter(
1485614882 } else {
1485714883 sym0
1485814884 };
14885+ if enable_dual_filter && sym0 != sym1 {
14886+ DUAL_FILTER_DIFF_HITS.with(|c| c.set(c.get() + 1));
14887+ }
1485914888 (
1486014889 mc::InterpFilterKind::from_switchable_symbol(sym1 as usize),
1486114890 mc::InterpFilterKind::from_switchable_symbol(sym0 as usize),
@@ -15515,14 +15544,25 @@ fn obmc_mask(len: usize) -> &'static [u8] {
1551515544 fn neighbour_filter(
1551615545 interp_fixed: Option<mc::InterpFilterKind>,
1551715546 sym: [u8; 2],
15518-) -> (mc::InterpFilterKind, mc::InterpFilterKind) {
15547+) -> Result<(mc::InterpFilterKind, mc::InterpFilterKind)> {
1551915548 if let Some(kind) = interp_fixed {
15520- return (kind, kind);
15549+ return Ok((kind, kind));
15550+ }
15551+ // lane-interp3 r1: the `[3, 3]` sentinel reaching here is a DEFECT in
15552+ // whatever path recorded the neighbour (an inter block that never stored
15553+ // its own switchable symbols), and it used to abort the process through
15554+ // `from_switchable_symbol`'s panic. A decoder must never crash on a real
15555+ // stream: it stops by name instead, so the frame is refused and the
15556+ // stream is pinned like every other unsupported case.
15557+ if sym[0] > 2 || sym[1] > 2 {
15558+ return Err(unsupported(
15559+ "an OBMC neighbour whose interp filter was never recorded (no switchable symbol for that block)",
15560+ ));
1552115561 }
15522- (
15562+ Ok((
1552315563 mc::InterpFilterKind::from_switchable_symbol(sym[1] as usize),
1552415564 mc::InterpFilterKind::from_switchable_symbol(sym[0] as usize),
15525- )
15565+ ))
1552615566 }
1552715567
1552815568 /// One neighbour's own re-prediction over a `w`x`h` region, MC'd fresh
@@ -15800,7 +15840,7 @@ fn obmc_blend(
1580015840 let (h_kind, v_kind) = neighbour_filter(
1580115841 interp_fixed,
1580215842 neighbours.above_filter[mi_col + off4],
15803- );
15843+ )?;
1580415844 let (ny, nu, nv) = ref_planes(nb.ref_frame, ref_y, ref_u, ref_v, other_refs)?;
1580515845 let nb_scale = mc::scale_factor(ny.width, frame_width);
1580615846 let (bw, bh, ox) = (span4 * 4, overlap_above, off4 * 4);
@@ -15819,7 +15859,7 @@ fn obmc_blend(
1581915859 let (h_kind, v_kind) = neighbour_filter(
1582015860 interp_fixed,
1582115861 neighbours.left_filter[mi_row + off4],
15822- );
15862+ )?;
1582315863 let (ny, nu, nv) = ref_planes(nb.ref_frame, ref_y, ref_u, ref_v, other_refs)?;
1582415864 let nb_scale = mc::scale_factor(ny.width, frame_width);
1582515865 let (bw, bh, oy) = (overlap_left, span4 * 4, off4 * 4);
@@ -19302,6 +19342,58 @@ fn decode_inter_block8(
1930219342 );
1930319343 }
1930419344
19345+ // lane-interp3 r1: `read_mb_interp_filter` (libaom
19346+ // `decodemv.c` 1575, the tail of
19347+ // `read_inter_block_mode_info`) runs for EVERY inter block,
19348+ // compound included, right AFTER `read_compound_type` -- this
19349+ // leaf read no filter symbol at all, so a SWITCHABLE-filter
19350+ // stream lost one symbol (two under `enable_dual_filter`) at
19351+ // every compound 8x8 leaf, and the leaf recorded the `[3, 3]`
19352+ // "no filter" sentinel, which made a neighbouring OBMC block's
19353+ // `neighbour_filter` PANIC instead of blending.
19354+ // `av1_is_interp_needed` suppression terms for this arm:
19355+ // `skip_mode`, and `is_nontrans_global_motion` (mode
19356+ // GLOBAL_GLOBALMV with BOTH refs' models non-TRANSLATION) --
19357+ // WARPED_CAUSAL cannot occur on a compound block.
19358+ let gm_nontrans_c = compound_mode == 6
19359+ && global_motion[(ref0 - LAST_FRAME) as usize].model
19360+ != ec_av1_syntax::WarpModel::Translation
19361+ && global_motion[(ref1 - LAST_FRAME) as usize].model
19362+ != ec_av1_syntax::WarpModel::Translation;
19363+ // spec `get_ref_filter_type`, keyed on this block's ref0 and
19364+ // matching EITHER of the neighbour's references -- same shape
19365+ // as [`decode_inter_block`]'s compound arm. Same corner-cut as
19366+ // this leaf's single-ref arm below: the context comes from the
19367+ // enclosing 16x16's coarse slot.
19368+ let above_filter_ctx = if neighbours.above_ref[cmi] == ref0
19369+ || neighbours.above_ref1[cmi] == Some(ref0)
19370+ {
19371+ neighbours.above_filter[cmi]
19372+ } else {
19373+ [3, 3]
19374+ };
19375+ let left_filter_ctx = if neighbours.left_ref[rmi] == ref0
19376+ || neighbours.left_ref1[rmi] == Some(ref0)
19377+ {
19378+ neighbours.left_filter[rmi]
19379+ } else {
19380+ [3, 3]
19381+ };
19382+ let (h_filter, v_filter, resolved_filter) = resolve_interp_filter(
19383+ dec,
19384+ cdfs,
19385+ interp_fixed,
19386+ enable_dual_filter,
19387+ gm_nontrans_c || skip_mode,
19388+ above_filter_ctx,
19389+ left_filter_ctx,
19390+ true,
19391+ );
19392+ leaf_filter_syms = resolved_filter;
19393+ if interp_fixed.is_none() && !(gm_nontrans_c || skip_mode) {
19394+ COMPOUND8_FILTER_HITS.with(|c| c.set(c.get() + 1));
19395+ }
19396+
1930519397 let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?;
1930619398 let (py1, pu1, pv1) = ref_planes(ref1, ref_y, ref_u, ref_v, other_refs)?;
1930719399 let scale0 = mc::scale_factor(py0.width, frame_width);
@@ -19333,11 +19425,6 @@ fn decode_inter_block8(
1933319425 }
1933419426 mode_for_tx = 0;
1933519427
19336- // lane-av1comp corner-cut, matching this leaf's single-ref
19337- // arm below (`mc::predict`'s own fixed-Regular default):
19338- // `decode_inter_block8` never resolves a switchable filter,
19339- // so both compound taps use `Regular` too.
19340- use mc::InterpFilterKind::Regular;
1934119428 let mut inter0_y = vec![0i32; SIDE * SIDE];
1934219429 mc::predict_compound_intermediate(
1934319430 &py0.data,
@@ -19349,8 +19436,8 @@ fn decode_inter_block8(
1934919436 scale0,
1935019437 SIDE,
1935119438 SIDE,
19352- Regular,
19353- Regular,
19439+ h_filter,
19440+ v_filter,
1935419441 &mut inter0_y,
1935519442 );
1935619443 let mut inter1_y = vec![0i32; SIDE * SIDE];
@@ -19364,8 +19451,8 @@ fn decode_inter_block8(
1936419451 scale1,
1936519452 SIDE,
1936619453 SIDE,
19367- Regular,
19368- Regular,
19454+ h_filter,
19455+ v_filter,
1936919456 &mut inter1_y,
1937019457 );
1937119458 let mut pred_y = vec![0u16; SIDE * SIDE];
@@ -19397,8 +19484,8 @@ fn decode_inter_block8(
1939719484 scale0,
1939819485 CHROMA_SIDE,
1939919486 CHROMA_SIDE,
19400- Regular,
19401- Regular,
19487+ h_filter,
19488+ v_filter,
1940219489 &mut inter0_u,
1940319490 );
1940419491 let mut inter1_u = vec![0i32; CHROMA_SIDE * CHROMA_SIDE];
@@ -19412,8 +19499,8 @@ fn decode_inter_block8(
1941219499 scale1,
1941319500 CHROMA_SIDE,
1941419501 CHROMA_SIDE,
19415- Regular,
19416- Regular,
19502+ h_filter,
19503+ v_filter,
1941719504 &mut inter1_u,
1941819505 );
1941919506 let mut pred_u = vec![0u16; CHROMA_SIDE * CHROMA_SIDE];
@@ -19443,8 +19530,8 @@ fn decode_inter_block8(
1944319530 scale0,
1944419531 CHROMA_SIDE,
1944519532 CHROMA_SIDE,
19446- Regular,
19447- Regular,
19533+ h_filter,
19534+ v_filter,
1944819535 &mut inter0_v,
1944919536 );
1945019537 let mut inter1_v = vec![0i32; CHROMA_SIDE * CHROMA_SIDE];
@@ -19458,8 +19545,8 @@ fn decode_inter_block8(
1945819545 scale1,
1945919546 CHROMA_SIDE,
1946019547 CHROMA_SIDE,
19461- Regular,
19462- Regular,
19548+ h_filter,
19549+ v_filter,
1946319550 &mut inter1_v,
1946419551 );
1946519552 let mut pred_v = vec![0u16; CHROMA_SIDE * CHROMA_SIDE];
@@ -22840,6 +22927,30 @@ mod tests {
2284022927 /// always cleared to `None` by `record_inter`, so the next block's own
2284122928 /// `NeighbourRef::uni` -- and `comp_reference_type_ctx` downstream of it
2284222929 /// -- could never see a real compound neighbour).
22930+ /// lane-interp3 r1: a decoder must never abort the process on
22931+ /// stream-derived state. `neighbour_filter` used to feed the `[3, 3]`
22932+ /// "no filter recorded" sentinel straight into
22933+ /// `InterpFilterKind::from_switchable_symbol`, whose `panic!` ("...alphabet
22934+ /// is exactly 3 symbols") crashed on a real aomenc dual-filter + OBMC
22935+ /// stream. It now refuses by name; the real symbols still decode.
22936+ #[test]
22937+ fn an_obmc_neighbour_with_no_recorded_filter_refuses_instead_of_panicking() {
22938+ assert!(
22939+ neighbour_filter(None, [3, 3])
22940+ .unwrap_err()
22941+ .to_string()
22942+ .contains("an OBMC neighbour whose interp filter was never recorded"),
22943+ "the [3, 3] sentinel must refuse by name, never panic"
22944+ );
22945+ assert!(neighbour_filter(None, [3, 0]).is_err());
22946+ let (h, v) = neighbour_filter(None, [0, 2]).expect("real symbols decode");
22947+ assert_eq!(h, mc::InterpFilterKind::Sharp, "sym[1] is the horizontal kernel");
22948+ assert_eq!(v, mc::InterpFilterKind::Regular, "sym[0] is the vertical kernel");
22949+ let (h, v) = neighbour_filter(Some(mc::InterpFilterKind::Smooth), [3, 3])
22950+ .expect("a fixed-filter frame never reads a symbol");
22951+ assert_eq!((h, v), (mc::InterpFilterKind::Smooth, mc::InterpFilterKind::Smooth));
22952+ }
22953+
2284322954 #[test]
2284422955 fn record_compound_ctx_stamps_ref1_for_the_next_block_to_read() {
2284522956 let mut n = Neighbours::new(4, 4, 16, 16);
crates/ec-av1/src/refusal_inventory.rsmodified+1 -0
@@ -34,6 +34,7 @@ const REFUSALS: &[&str] = &[
3434 "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here",
3535 "a split intra strip whose transform unit is {tx_w}x{tx_h} (no luma coefficient tables for that shape here)",
3636 "an inter partition below 8x8 (this decoder codes no inter leaf smaller than 8x8; lane-sub8 scoped to intra)",
37+ "an OBMC neighbour whose interp filter was never recorded (no switchable symbol for that block)",
3738 "a 1:4 rect strip that actually uses a palette (reconstruction is not ported at this shape)",
3839 "a 16x16 block whose true edge cuts through both axes needs a rectangular transform this decoder does not code yet",
3940 "a 16x16 inter block whose true edge cuts through both axes needs a rectangular transform this decoder does not code yet",
crates/ec-av1/src/stream.rsmodified+77 -2
@@ -6087,6 +6087,9 @@ mod tests {
60876087 // aomenc silently codes one tile column and the arm is vacuous.
60886088 extra: &[&str],
60896089 width: usize,
6090+ // lane-interp3 r1: sequence length -- a compound block needs several
6091+ // already-coded references, which a 4-frame sequence never has.
6092+ frame_count: usize,
60906093 ) {
60916094 if !have_ffmpeg() {
60926095 eprintln!("SKIP {name}: no ffmpeg");
@@ -6096,7 +6099,8 @@ mod tests {
60966099 eprintln!("SKIP {name}: no aomenc at {}", aomenc_path().display());
60976100 return;
60986101 }
6099- let (height, frame_count) = (64usize, 4usize);
6102+ let height = 64usize;
6103+ let duration = format!("{:.2}", frame_count as f64 / 25.0);
61006104 // A deterministic synthetic source with real motion (a static source
61016105 // codes every inter frame as skip and never exercises the residual
61026106 // path); bounded with `-t` (class gate-loader-slurps-whole-file).
@@ -6109,7 +6113,7 @@ mod tests {
61096113 "-i",
61106114 &format!("mandelbrot=size={width}x{height}:rate=25"),
61116115 "-t",
6112- "0.16",
6116+ &duration,
61136117 "-pix_fmt",
61146118 if ten_bit { "yuv420p10le" } else { "yuv420p" },
61156119 // y4m calls 10-bit unofficial (same as the 10-bit key-frame
@@ -6236,6 +6240,7 @@ mod tests {
62366240 "whole-superblock inter PARTITION_NONE",
62376241 &[],
62386242 64,
6243+ 4,
62396244 );
62406245 }
62416246
@@ -6250,6 +6255,7 @@ mod tests {
62506255 "whole-superblock inter PARTITION_NONE",
62516256 &[],
62526257 64,
6258+ 4,
62536259 );
62546260 }
62556261
@@ -6292,6 +6298,73 @@ mod tests {
62926298 "interior 16x16 inter PARTITION_SPLIT into 8x8 leaves",
62936299 &["--tile-columns=1"],
62946300 128,
6301+ 4,
6302+ );
6303+ }
6304+
6305+ /// lane-interp3 r1: the same 8x8-leaf recipe with DUAL FILTER, OBMC and
6306+ /// warped motion on. `read_mb_interp_filter` runs for every inter block
6307+ /// (libaom `decodemv.c` 1575), compound ones included; the compound 8x8
6308+ /// leaf skipped it entirely, so a SWITCHABLE-filter stream lost a symbol
6309+ /// per compound leaf and stamped the `[3, 3]` "no filter" sentinel, which
6310+ /// made a neighbouring OBMC block's `neighbour_filter` PANIC (a crash on
6311+ /// his data, not a named refusal). The three hard asserts prove the flags
6312+ /// arrived: a compound 8x8 leaf that really read the filter, a block whose
6313+ /// two dual-filter directions DIFFER (impossible with dual filter off),
6314+ /// and an 8x8 OBMC blend.
6315+ // lane-interp3 r1: RED, and ignored rather than deleted -- MEASURED, not
6316+ // assumed. At `EC_INTERP3_FRAMES=4` (the other arms' length) aomenc codes
6317+ // no compound block at all and the stream decodes; from 5 frames on it
6318+ // does, and the decode then stops at "an inter 16x16-level AB or 1:4
6319+ // partition" WITH this round's filter read and at "an inter partition
6320+ // below 8x8" WITHOUT it (measured by ablating the read) -- both are
6321+ // impossible on a `--enable-ab-partitions=0 --enable-1to4-partitions=0
6322+ // --min-partition-size=8` recipe, so BOTH are our own desync
6323+ // (class refusal-from-own-desync) and the compound 8x8 leaf carries at
6324+ // least one more missing/misplaced symbol beyond the interp filter this
6325+ // round added. Next round: EC_TRACE range ladder vs aomdec on the first
6326+ // compound leaf of frame 5.
6327+ #[ignore = "lane-interp3 r1: the compound 8x8 leaf still desyncs past the interp-filter read (surfaces as a bogus AB/1:4 refusal); the panic it used to end in is now a named refusal"]
6328+ #[test]
6329+ fn a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact() {
6330+ const NAME: &str =
6331+ "a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact";
6332+ if !have_ffmpeg() || !have_aomenc() {
6333+ eprintln!("SKIP {NAME}: no ffmpeg/aomenc");
6334+ return;
6335+ }
6336+ let before_dual = decode::dual_filter_diff_hits();
6337+ let before_obmc = decode::obmc_hits_8();
6338+ inter_sb_none_gate(
6339+ NAME,
6340+ false,
6341+ "8",
6342+ "16",
6343+ decode::compound8_filter_hits,
6344+ "a compound 8x8 leaf reading its own switchable interp_filter",
6345+ &[
6346+ "--enable-dual-filter=1",
6347+ "--enable-obmc=1",
6348+ "--enable-warped-motion=1",
6349+ "--enable-onesided-comp=1",
6350+ ],
6351+ 64,
6352+ // Recipe search hook (same shape as EC_OBMC8_ATTEMPTS): a compound
6353+ // block needs several coded references, so the sequence is longer
6354+ // than the other arms' 4 frames.
6355+ std::env::var("EC_INTERP3_FRAMES")
6356+ .ok()
6357+ .and_then(|v| v.parse().ok())
6358+ .unwrap_or(16),
6359+ );
6360+ assert!(
6361+ decode::dual_filter_diff_hits() > before_dual,
6362+ "{NAME}: no block read two DIFFERENT dual-filter directions -- \
6363+ --enable-dual-filter=1 did not arrive or aomenc declined it"
6364+ );
6365+ assert!(
6366+ decode::obmc_hits_8() > before_obmc,
6367+ "{NAME}: no 8x8 OBMC blend fired -- --enable-obmc=1 did not arrive"
62956368 );
62966369 }
62976370
@@ -6306,6 +6379,7 @@ mod tests {
63066379 "interior 16x16 inter PARTITION_SPLIT into 8x8 leaves",
63076380 &[],
63086381 64,
6382+ 4,
63096383 );
63106384 }
63116385
@@ -6329,6 +6403,7 @@ mod tests {
63296403 "interior 16x16 inter PARTITION_SPLIT into 8x8 leaves",
63306404 &[],
63316405 64,
6406+ 4,
63326407 );
63336408 }
63346409
lanes/interp3-r1.report.mdadded+83 -0
@@ -0,0 +1,83 @@
1+# lane-interp3 r1 -- the `switchable_interp` PANIC: the compound 8x8 leaf never read its filter
2+
3+## Root cause (cited)
4+
5+libaom `decodemv.c:1575` (`read_inter_block_mode_info`) calls `read_mb_interp_filter`
6+for **every** inter block, compound ones included, right after `read_compound_type`.
7+`decode_leaf8`'s COMPOUND arm (`crates/ec-av1/src/decode.rs`, the branch that returns at
8+the old line 19589) called `resolve_interp_filter` **not at all**: it predicted both taps
9+with a hard-coded `Regular` and returned the `[3, 3]` "no filter recorded" sentinel as the
10+leaf's `leaf_filter_syms`. Two consequences, both real on his data:
11+
12+1. **Entropy**: on a `SWITCHABLE`-filter frame one symbol (two under `enable_dual_filter`)
13+ is left unread at every compound 8x8 leaf -- silent desync.
14+2. **Crash**: the sentinel is stamped into `Neighbours::above_filter`/`left_filter`, and a
15+ neighbouring OBMC block's `neighbour_filter` fed it to
16+ `mc::InterpFilterKind::from_switchable_symbol`, whose `panic!("switchable_interp's
17+ alphabet is exactly 3 symbols")` aborted the process. That is the panic lane-r14 r3
18+ flagged (its `--enable-dual-filter=1 --enable-obmc=1` 192x128 cq30 stream). The same
19+ shape was already fixed once for the SINGLE-ref 8x8 leaf (lane-gmaffine r3, decode.rs
20+ ~21509 comment) -- the compound arm was the surviving sibling instance.
21+
22+## Changed
23+
24+- `crates/ec-av1/src/decode.rs` (compound 8x8 leaf, after the `comp_group_idx`/
25+ `compound_idx` reads): reads `interp_filter` in libaom's order, with `get_ref_filter_type`
26+ neighbour contexts keyed on `ref0` and `is_compound = true`; suppression term is
27+ `skip_mode || is_nontrans_global_motion` (GLOBAL_GLOBALMV + both refs' models non-
28+ TRANSLATION; WARPED_CAUSAL cannot occur on compound). The 12 `predict_compound_intermediate`
29+ taps now use the resolved `h_filter`/`v_filter` instead of `Regular`.
30+- `crates/ec-av1/src/decode.rs` `neighbour_filter`: returns `Result`; the `[3, 3]` sentinel
31+ is now the named refusal `an OBMC neighbour whose interp filter was never recorded (no
32+ switchable symbol for that block)` -- **never a panic**. Both OBMC call sites `?` it.
33+- `crates/ec-av1/src/decode.rs`: counters `DUAL_FILTER_DIFF_HITS` (a block whose two
34+ dual-filter directions differ -- impossible with dual filter off) and
35+ `COMPOUND8_FILTER_HITS`.
36+- `crates/ec-av1/src/refusal_inventory.rs`: the new refusal listed (inventory test green).
37+- `crates/ec-av1/src/stream.rs`: `inter_sb_none_gate` takes a `frame_count`
38+ (4 frames never code a compound block); new gate
39+ `a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact`
40+ (`--enable-dual-filter=1 --enable-obmc=1 --enable-warped-motion=1 --enable-onesided-comp=1`
41+ on the `--min-partition-size=8 --enable-ab-partitions=0 --enable-1to4-partitions=0`
42+ recipe, every frame compared Y/U/V vs ffmpeg, hard asserts on all three counters).
43+- `crates/ec-av1/src/decode.rs` test
44+ `an_obmc_neighbour_with_no_recorded_filter_refuses_instead_of_panicking`.
45+
46+## Gate: RED, `#[ignore]`d with the measurement, not deleted
47+
48+`EC_INTERP3_FRAMES=4` -> aomenc codes no compound block, stream decodes.
49+From 5 frames on it does, and the decode stops at a refusal that the recipe makes
50+impossible: `an inter 16x16-level AB or 1:4 partition` WITH this round's filter read, and
51+`an inter partition below 8x8` WITHOUT it (measured by ablating the read behind a temporary
52+env switch, since removed). `--enable-ab-partitions=0 --enable-1to4-partitions=0
53+--min-partition-size=8` cannot emit either -- so both are our own desync
54+(class `refusal-from-own-desync`): the compound 8x8 leaf carries at least one more
55+missing/misplaced symbol beyond the interp filter. The fix is therefore **necessary but not
56+sufficient** and is not claimed as pixel-proven.
57+
58+EVIDENCE: $HOME/.cache/interp3-suite-r1.log | `cargo test -p ec-av1 --lib -j3` under a
59+systemd user unit, MemoryMax=10G | totals below
60+EVIDENCE: gate run `EC_INTERP3_FRAMES=5..16 cargo test -p ec-av1 --lib a_real_aomenc_dual_filter_obmc_8x8` with and without the new read | 6 encodes x 2 arms | refusal string differs per arm (AB/1:4 vs below-8x8), 0 frames compared either way -- gate RED, ignored
61+EVIDENCE: `cargo test -p ec-av1 --lib an_obmc_neighbour_with_no_recorded` | direct call with the `[3, 3]` sentinel | 1 passed: refuses by name, no panic
62+
63+## Panic sweep of the decode path (charter clause)
64+
65+`neighbour_filter` was the only `panic!` reachable from a *stream-derived value* on the OBMC
66+path; converted. The rest of `decode.rs`'s 57 `panic!/unreachable!/unwrap/expect` sites,
67+inspected: `2733, 11268, 11617, 11636, 11683, 11996, 12015, 12052, 13820, 13998, 15225,
68+15533` are `unreachable!` on values a CDF alphabet or an earlier refusal already bounds
69+(cannot fire on any stream); `5238, 5282, 6043, 6110, 7310, 7311, 7777, 7778, 10479, 10535,
70+10679, 10888` are `unwrap/expect` on this decoder's own just-built state; everything above
71+line 22700 is inside `#[cfg(test)]`. Two remain flagged, not converted (they need a `Result`
72+in a counter/table helper and no stream is known to reach them):
73+`decode.rs:2486` `panic!("ref_hits: no per-reference counter for ref_frame {other}")` and
74+`decode.rs:3247` `panic!("intra mode {other} has no Intra_Mode_To_Tx_Type entry")`.
75+`mc.rs:203`/`:220` stay as documented invariants -- both callers now check first.
76+
77+## Residue
78+
79+- fix-now(next round): the remaining compound-8x8 desync. Method: `EC_TRACE=1` aomdec range
80+ ladder against ours on the FIRST compound leaf of frame 5 of the gate's stream, comparing
81+ msac RANGE element by element (never `tell()`).
82+- deferred(needs that fix): the 10-bit arm of the new gate, and the counter-proving
83+ pixel-exact claim.