From dcf114768dae66863cbf00ded222ea144e1c8afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 27 Aug 2026 18:03:59 +0300 Subject: [PATCH] wip(av1): finish the txb_skip 7-context rewire; find TX16 tx_type mismatch Adds the luma_skip_ctx debug trace and a partition_w16 trace print (both gated behind EC_AV1_TRACE) used to bisect the pinned mb.obu stream against a fprintf-instrumented aomdec build. The 7-context txb_skip rewire itself (cdf.rs/cdf_state.rs/decode.rs, prior round) compiles and the whole ec-av1 suite is green, but the pinned stream still desyncs: tracing symbol-by- symbol against real aomdec's EC_TXBCTX/EC_TXBSKIP/EC_TXTYPE_VAL output shows the two decoders already disagree on a NON-split 16x16 block's own tx_type (mi_row=4,mi_col=0 in the second superblock quadrant: real reads tx_type=3 off a reduced 5-symbol intra set, txs_ctx=2/tx_set_type=2/eset=2; ours reads tx_type=2) -- upstream of the txb_skip multi-TU logic this round targeted, and not fixed by it. tx_size_context/get_txb_ctx_general/ SKIP_CONTEXTS were all checked byte-for-byte against libaom's av1/common/txb_common.h and match. The gate (a_real_aomenc_intra_stream_with_tx_select_decodes_pixel_exact, stream.rs) is not wired to this recipe: it still passes today only via its own soft-skip path (every attempt either refuses or never resolves a split tx_depth), so wiring it now would just turn a silent skip into the same real failure traced above. Left unwired until the tx_type mismatch is fixed. --- crates/ec-av1/examples/probe_txsel.rs | 63 +++++++++++ crates/ec-av1/src/cdf.rs | 150 ++++++++++++++++++++++++++ crates/ec-av1/src/cdf_state.rs | 74 +++++++------ crates/ec-av1/src/decode.rs | 86 ++++++++++++++- 4 files changed, 333 insertions(+), 40 deletions(-) create mode 100644 crates/ec-av1/examples/probe_txsel.rs diff --git a/crates/ec-av1/examples/probe_txsel.rs b/crates/ec-av1/examples/probe_txsel.rs new file mode 100644 index 00000000..f0cfdb2e --- /dev/null +++ b/crates/ec-av1/examples/probe_txsel.rs @@ -0,0 +1,63 @@ +use std::io::Write; +use std::process::{Command, Stdio}; + +fn main() { + let path = std::env::args() + .nth(1) + .unwrap_or_else(|| "/tmp/mb.obu".into()); + let stream = std::fs::read(&path).expect("read stream"); + let frames = match ec_av1::stream::decode_stream(&stream) { + Ok(f) => f, + Err(e) => { + eprintln!("decode error: {e}"); + std::process::exit(1); + } + }; + let (width, height) = (64usize, 64usize); + let mut child = Command::new("ffmpeg") + .args([ + "-v", "error", "-f", "obu", "-i", "-", "-f", "rawvideo", "-pix_fmt", "yuv420p", "-", + ]) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .expect("ffmpeg spawn"); + child + .stdin + .take() + .unwrap() + .write_all(&stream) + .expect("write stream"); + let out = child.wait_with_output().expect("ffmpeg run"); + if !out.status.success() { + eprintln!("ffmpeg refused: {}", String::from_utf8_lossy(&out.stderr)); + std::process::exit(1); + } + let luma = width * height; + let chroma = luma / 4; + let y_ref = &out.stdout[..luma]; + let u_ref = &out.stdout[luma..luma + chroma]; + let v_ref = &out.stdout[luma + chroma..luma + 2 * chroma]; + + let pic = &frames[0]; + let y_match = pic.y == y_ref; + let u_match = pic.u == u_ref; + let v_match = pic.v == v_ref; + println!("decoded ok, y_match={y_match} u_match={u_match} v_match={v_match}"); + if !y_match { + for i in 0..luma { + if pic.y[i] != y_ref[i] { + println!( + "first luma mismatch at idx {i} (row {} col {}): ours={} ref={}", + i / width, + i % width, + pic.y[i], + y_ref[i] + ); + break; + } + } + } + std::process::exit(if y_match && u_match && v_match { 0 } else { 2 }); +} diff --git a/crates/ec-av1/src/cdf.rs b/crates/ec-av1/src/cdf.rs index 2aaf4793..a8d4d1f6 100644 --- a/crates/ec-av1/src/cdf.rs +++ b/crates/ec-av1/src/cdf.rs @@ -3758,3 +3758,153 @@ pub const INTRA_TX_TYPE_SET1_8: [[u16; 8]; 13] = [ /// at the flat 5-way default (unlike its trained `TX_16X16` neighbour, /// [`INTRA_TX_TYPE_SET2_16`]) -- every mode reads the same uniform CDF. pub const INTRA_TX_TYPE_SET2_8: [[u16; 6]; 13] = [[6554, 13107, 19661, 26214, 32768, 0]; 13]; +/// The full luma sub-range of spec `TXB_SKIP_CONTEXTS` (contexts 0..6, the +/// `plane_bsize != tx_size` `skip_contexts[top][left]` table plus its own +/// single `plane_bsize == tx_size` context 0), for a `TxMode::Select` block +/// whose luma transform is split into several transform units smaller than +/// the block itself -- the single-context `TXB_SKIP_LUMA_*` constants above +/// stay for every other caller, which only ever reads context 0. +pub const TXB_SKIP_LUMA_8_Q0_CTX: [[u16; 3]; 7] = [ + [31548, 32768, 0], + [1549, 32768, 0], + [10130, 32768, 0], + [16656, 32768, 0], + [18591, 32768, 0], + [26308, 32768, 0], + [32537, 32768, 0], +]; +pub const TXB_SKIP_LUMA_8_Q1_CTX: [[u16; 3]; 7] = [ + [31782, 32768, 0], + [1836, 32768, 0], + [10689, 32768, 0], + [17604, 32768, 0], + [21622, 32768, 0], + [27518, 32768, 0], + [32399, 32768, 0], +]; +pub const TXB_SKIP_LUMA_8_CTX: [[u16; 3]; 7] = [ + [31957, 32768, 0], + [3230, 32768, 0], + [11153, 32768, 0], + [18123, 32768, 0], + [20143, 32768, 0], + [26536, 32768, 0], + [31986, 32768, 0], +]; +pub const TXB_SKIP_LUMA_8_Q3_CTX: [[u16; 3]; 7] = [ + [31903, 32768, 0], + [2044, 32768, 0], + [7528, 32768, 0], + [14618, 32768, 0], + [16182, 32768, 0], + [24168, 32768, 0], + [31037, 32768, 0], +]; +pub const TXB_SKIP_LUMA_16_Q0_CTX: [[u16; 3]; 7] = [ + [29957, 32768, 0], + [5391, 32768, 0], + [18039, 32768, 0], + [23566, 32768, 0], + [22431, 32768, 0], + [25822, 32768, 0], + [32197, 32768, 0], +]; +pub const TXB_SKIP_LUMA_16_Q1_CTX: [[u16; 3]; 7] = [ + [31901, 32768, 0], + [10311, 32768, 0], + [18047, 32768, 0], + [24806, 32768, 0], + [23288, 32768, 0], + [27914, 32768, 0], + [32296, 32768, 0], +]; +pub const TXB_SKIP_LUMA_16_CTX: [[u16; 3]; 7] = [ + [32363, 32768, 0], + [10692, 32768, 0], + [19090, 32768, 0], + [24357, 32768, 0], + [24442, 32768, 0], + [28312, 32768, 0], + [32169, 32768, 0], +]; +pub const TXB_SKIP_LUMA_16_Q3_CTX: [[u16; 3]; 7] = [ + [32510, 32768, 0], + [8430, 32768, 0], + [17318, 32768, 0], + [24154, 32768, 0], + [23674, 32768, 0], + [28789, 32768, 0], + [32139, 32768, 0], +]; +pub const TXB_SKIP_LUMA_32_Q0_CTX: [[u16; 3]; 7] = [ + [17920, 32768, 0], + [1818, 32768, 0], + [7282, 32768, 0], + [25273, 32768, 0], + [10923, 32768, 0], + [31554, 32768, 0], + [32624, 32768, 0], +]; +pub const TXB_SKIP_LUMA_32_Q1_CTX: [[u16; 3]; 7] = [ + [26726, 32768, 0], + [1045, 32768, 0], + [11703, 32768, 0], + [20590, 32768, 0], + [18554, 32768, 0], + [25970, 32768, 0], + [31938, 32768, 0], +]; +pub const TXB_SKIP_LUMA_32_CTX: [[u16; 3]; 7] = [ + [30669, 32768, 0], + [3832, 32768, 0], + [11663, 32768, 0], + [18889, 32768, 0], + [19782, 32768, 0], + [23313, 32768, 0], + [31330, 32768, 0], +]; +pub const TXB_SKIP_LUMA_32_Q3_CTX: [[u16; 3]; 7] = [ + [31671, 32768, 0], + [2056, 32768, 0], + [11746, 32768, 0], + [16852, 32768, 0], + [18635, 32768, 0], + [24715, 32768, 0], + [31484, 32768, 0], +]; +pub const TXB_SKIP_LUMA_64_Q0_CTX: [[u16; 3]; 7] = [ + [6308, 32768, 0], + [117, 32768, 0], + [1638, 32768, 0], + [2161, 32768, 0], + [16384, 32768, 0], + [10923, 32768, 0], + [30247, 32768, 0], +]; +pub const TXB_SKIP_LUMA_64_Q1_CTX: [[u16; 3]; 7] = [ + [26584, 32768, 0], + [188, 32768, 0], + [8847, 32768, 0], + [24519, 32768, 0], + [22938, 32768, 0], + [30583, 32768, 0], + [32608, 32768, 0], +]; +pub const TXB_SKIP_LUMA_64_CTX: [[u16; 3]; 7] = [ + [28573, 32768, 0], + [3183, 32768, 0], + [17802, 32768, 0], + [25977, 32768, 0], + [26677, 32768, 0], + [27832, 32768, 0], + [32387, 32768, 0], +]; +pub const TXB_SKIP_LUMA_64_Q3_CTX: [[u16; 3]; 7] = [ + [31539, 32768, 0], + [8433, 32768, 0], + [20576, 32768, 0], + [27904, 32768, 0], + [27852, 32768, 0], + [30026, 32768, 0], + [32441, 32768, 0], +]; diff --git a/crates/ec-av1/src/cdf_state.rs b/crates/ec-av1/src/cdf_state.rs index 60d201e7..87184f0f 100644 --- a/crates/ec-av1/src/cdf_state.rs +++ b/crates/ec-av1/src/cdf_state.rs @@ -116,10 +116,14 @@ pub(crate) struct Cdfs { pub cfl_alpha: [[u16; 17]; 6], /// The angle a directional mode is nudged by. pub angle_delta: [[u16; 8]; 8], - /// The one-context all-zero flag of a 16x16 luma transform. - pub txb_skip_luma_16: [[u16; 3]; 1], - /// The one-context all-zero flag of an 8x8 luma transform. - pub txb_skip_luma_8: [[u16; 3]; 1], + /// The all-zero flag of a 16x16 luma transform, 7 contexts (index 0 for + /// a lone TU whose own bsize equals the block's; 1..6 the + /// `skip_contexts[top][left]` table when `TxMode::Select` splits the + /// block's luma into several smaller transform units, spec + /// `get_txb_ctx_general`). + pub txb_skip_luma_16: [[u16; 3]; 7], + /// The same, for an 8x8 luma transform. + pub txb_skip_luma_8: [[u16; 3]; 7], /// The all-zero flag of an 8x8 chroma transform. pub txb_skip_chroma_8: [[u16; 3]; 3], /// The all-zero flag of a 4x4 chroma transform. @@ -170,10 +174,10 @@ pub(crate) struct Cdfs { /// `PARTITION_NONE` is ever coded against it, but the alphabet still /// adapts on every read, same as every other partition table. pub partition_w8: [[u16; 5]; 4], - /// The one-context all-zero flag of a 32x32 luma transform. - pub txb_skip_luma_32: [[u16; 3]; 1], + /// The same as `txb_skip_luma_16`'s 7 contexts, for a 32x32 luma transform. + pub txb_skip_luma_32: [[u16; 3]; 7], /// The same, for a 64x64 luma transform. - pub txb_skip_luma_64: [[u16; 3]; 1], + pub txb_skip_luma_64: [[u16; 3]; 7], /// The all-zero flag of a 16x16 chroma transform. pub txb_skip_chroma_16: [[u16; 3]; 3], /// The all-zero flag of a 32x32 chroma transform. @@ -464,20 +468,20 @@ impl Cdfs { cfl_sign: cdf::CFL_SIGN, cfl_alpha: cdf::CFL_ALPHA, angle_delta: cdf::ANGLE_DELTA, - txb_skip_luma_16: [pick( - q_ctx, - cdf::TXB_SKIP_LUMA_16_Q0, - cdf::TXB_SKIP_LUMA_16_Q1, - cdf::TXB_SKIP_LUMA_16, - cdf::TXB_SKIP_LUMA_16_Q3, - )], - txb_skip_luma_8: [pick( - q_ctx, - cdf::TXB_SKIP_LUMA_8_Q0, - cdf::TXB_SKIP_LUMA_8_Q1, - cdf::TXB_SKIP_LUMA_8, - cdf::TXB_SKIP_LUMA_8_Q3, - )], + txb_skip_luma_16: pick( + q_ctx, + cdf::TXB_SKIP_LUMA_16_Q0_CTX, + cdf::TXB_SKIP_LUMA_16_Q1_CTX, + cdf::TXB_SKIP_LUMA_16_CTX, + cdf::TXB_SKIP_LUMA_16_Q3_CTX, + ), + txb_skip_luma_8: pick( + q_ctx, + cdf::TXB_SKIP_LUMA_8_Q0_CTX, + cdf::TXB_SKIP_LUMA_8_Q1_CTX, + cdf::TXB_SKIP_LUMA_8_CTX, + cdf::TXB_SKIP_LUMA_8_Q3_CTX, + ), txb_skip_chroma_8: pick( q_ctx, cdf::TXB_SKIP_CHROMA_8_Q0, @@ -634,20 +638,20 @@ impl Cdfs { ), partition_w16: cdf::PARTITION_W16, partition_w8: cdf::PARTITION_W8, - txb_skip_luma_32: [pick( - q_ctx, - cdf::TXB_SKIP_LUMA_32_Q0, - cdf::TXB_SKIP_LUMA_32_Q1, - cdf::TXB_SKIP_LUMA_32, - cdf::TXB_SKIP_LUMA_32_Q3, - )], - txb_skip_luma_64: [pick( - q_ctx, - cdf::TXB_SKIP_LUMA_64_Q0, - cdf::TXB_SKIP_LUMA_64_Q1, - cdf::TXB_SKIP_LUMA_64, - cdf::TXB_SKIP_LUMA_64_Q3, - )], + txb_skip_luma_32: pick( + q_ctx, + cdf::TXB_SKIP_LUMA_32_Q0_CTX, + cdf::TXB_SKIP_LUMA_32_Q1_CTX, + cdf::TXB_SKIP_LUMA_32_CTX, + cdf::TXB_SKIP_LUMA_32_Q3_CTX, + ), + txb_skip_luma_64: pick( + q_ctx, + cdf::TXB_SKIP_LUMA_64_Q0_CTX, + cdf::TXB_SKIP_LUMA_64_Q1_CTX, + cdf::TXB_SKIP_LUMA_64_CTX, + cdf::TXB_SKIP_LUMA_64_Q3_CTX, + ), txb_skip_chroma_16: pick( q_ctx, cdf::TXB_SKIP_CHROMA_16_Q0, diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 6c94b1ad..d813310e 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -381,17 +381,37 @@ fn read_coeffs( /// [`crate::tile`]'s own private `Neighbour`. #[derive(Clone, Copy, Default)] struct Neighbour { - coded: bool, + /// The transform unit's cumulative coefficient level (spec `cul_level`, + /// `decodetxb.c`'s `read_coeffs_txb`): the sum of every coded level's + /// magnitude, clamped to `COEFF_CONTEXT_MASK` (7). A plain "coded or not" + /// boolean (`level != 0`) is enough for every context this decoder read + /// until now, but the *luma* `txb_skip_ctx` of a transform unit smaller + /// than its own block (`TxMode::Select`, spec `get_txb_ctx_general`) + /// needs the actual magnitude tier of its above/left neighbours, not + /// just whether they coded anything. + level: u8, dc: Option, } fn neighbour_state(grid: &[i32]) -> Neighbour { + let cul: u32 = grid.iter().map(|&l| l.unsigned_abs()).sum(); Neighbour { - coded: grid.iter().any(|&l| l != 0), + level: cul.min(7) as u8, dc: (grid[0] != 0).then_some(grid[0] < 0), } } +/// spec `get_txb_ctx_general`'s `skip_contexts[top][left]` table (plane 0, +/// transform unit smaller than the block it sits in): `top`/`left` are the +/// above/left neighbours' magnitude tiers, each already clamped to 4. +const SKIP_CONTEXTS: [[usize; 5]; 5] = [ + [1, 2, 2, 2, 3], + [2, 4, 4, 4, 5], + [2, 4, 4, 4, 5], + [2, 4, 4, 4, 5], + [3, 5, 5, 5, 6], +]; + /// The neighbour state a block's contexts are read from — a duplicate of /// [`crate::tile`]'s own private `Neighbours` (that module is another lane's /// territory this round), kept at the same two granularities the real writer @@ -601,14 +621,37 @@ impl Neighbours { for cell in 0..side_mi { let above = &self.above[mi_c + cell][plane]; let left = &self.left[mi_r + cell][plane]; - above_coded |= above.coded; - left_coded |= left.coded; + above_coded |= above.level != 0; + left_coded |= left.level != 0; vote += dc_vote(above.dc) + dc_vote(left.dc); } (above_coded, left_coded, vote) }) } + /// The luma `txb_skip_ctx` of a transform unit smaller than its own block + /// (spec `get_txb_ctx_general`, plane 0, `plane_bsize != tx_size`): the + /// above/left neighbours' magnitude tiers, OR-reduced over the unit's own + /// span and each clamped to 4, indexed into [`SKIP_CONTEXTS`]. Unlike + /// [`Self::around_mi`]'s plain coded/uncoded bit, this needs the real + /// cumulative level -- a lone-TU block never calls this (its `txb_skip_ctx` + /// is always 0, spec's `plane_bsize == tx_size` branch). + fn luma_skip_ctx(&self, (mi_r, mi_c): (usize, usize), side_mi: usize) -> usize { + let mut top = 0u8; + let mut left = 0u8; + for cell in 0..side_mi { + top |= self.above[mi_c + cell][0].level; + left |= self.left[mi_r + cell][0].level; + } + let ctx = SKIP_CONTEXTS[(top as usize).min(4)][(left as usize).min(4)]; + if std::env::var_os("EC_AV1_TRACE").is_some() { + eprintln!( + "TRACE luma_skip_ctx mi=({mi_r},{mi_c}) side_mi={side_mi} top={top} left={left} ctx={ctx}" + ); + } + ctx + } + /// Writes one coded block into every cell it covers, on both grids: the /// mode/side arrays up to `side`'s own width, and the coefficient-context /// arrays up to the true frame edge — the units past it are left at their @@ -1032,9 +1075,16 @@ fn read_plane( base_q_idx: u8, cfl: Option<(i32, &[i32])>, filter_intra: Option, + // Only meaningful for `plane_idx == 0`: `Some` when this transform unit is + // smaller than its own block (spec `get_txb_ctx_general`'s + // `plane_bsize != tx_size` branch), carrying the already-looked-up + // `SKIP_CONTEXTS` value; `None` everywhere else (a lone luma TU, or any + // chroma plane), where `txb_skip_ctx` is 0 or the usual OR-of-neighbours + // formula below. + luma_skip_ctx: Option, ) -> Result> { let skip_ctx = if plane_idx == 0 { - 0 + luma_skip_ctx.unwrap_or(0) } else { usize::from(around.0) + usize::from(around.1) }; @@ -1215,6 +1265,7 @@ fn decode_block( base_q_idx, None, filter_intra, + None, )?; let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side)); let u_grid = read_plane( @@ -1235,6 +1286,7 @@ fn decode_block( base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), None, + None, )?; let v_grid = read_plane( dec, @@ -1254,6 +1306,7 @@ fn decode_block( base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), None, + None, )?; neighbours.record(at, side, mode, &[luma_grid, u_grid, v_grid]); } else { @@ -1274,6 +1327,11 @@ fn decode_block( let tu_py = py + tu_row * logical_tx; let tu_around = neighbours.around_mi(tu_mi, logical_tx)[0]; let tu_reach = Reach::of(logical_tx, tu_px, tu_py, y.width, y.height); + // This transform unit's own bsize (`logical_tx`) is smaller + // than the block it sits in (`side`), so `txb_skip_ctx` is + // the neighbour-magnitude table, not the lone-TU 0 (spec + // `get_txb_ctx_general`'s `plane_bsize != tx_size` branch). + let tu_skip_ctx = neighbours.luma_skip_ctx(tu_mi, logical_tx / MI); let tu_grid = read_plane( dec, cdfs, @@ -1292,6 +1350,7 @@ fn decode_block( base_q_idx, None, filter_intra, + Some(tu_skip_ctx), )?; neighbours.record_mi_luma(tu_mi, logical_tx, &tu_grid); } @@ -1316,6 +1375,7 @@ fn decode_block( base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), None, + None, )?; let v_grid = read_plane( dec, @@ -1335,6 +1395,7 @@ fn decode_block( base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), None, + None, )?; neighbours.record_split_luma(at, side, mode, [&u_grid, &v_grid]); } @@ -1458,6 +1519,7 @@ fn decode_leaf8( base_q_idx, None, filter_intra, + None, )?; let ac = alpha.map(|_| cfl_ac_q3(y, px, py, 8)); u_grid = read_plane( @@ -1478,6 +1540,7 @@ fn decode_leaf8( base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), None, + None, )?; v_grid = read_plane( dec, @@ -1497,6 +1560,7 @@ fn decode_leaf8( base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), None, + None, )?; } neighbours.record_mi(leaf_mi, 8, &[luma_grid, u_grid, v_grid]); @@ -2570,6 +2634,12 @@ pub(crate) fn decode_key_frame_tile_with_cdfs( let ctx16 = neighbours.partition_ctx(at16, SUB); if has_cols16 && has_rows16 { let part16 = dec.symbol(&mut cdfs.partition_w16[ctx16]); + if std::env::var_os("EC_AV1_TRACE").is_some() { + eprintln!( + "TRACE partition_w16 mi=({},{}) ctx={ctx16} value={part16}", + at16.0, at16.1 + ); + } if part16 == PARTITION_NONE { decode_block( &mut dec, @@ -3265,6 +3335,7 @@ fn decode_inter_block( base_q_idx, None, None, + None, )?; let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side)); u_grid = read_plane( @@ -3285,6 +3356,7 @@ fn decode_inter_block( base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), None, + None, )?; v_grid = read_plane( dec, @@ -3304,6 +3376,7 @@ fn decode_inter_block( base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), None, + None, )?; } } @@ -3660,6 +3733,7 @@ fn decode_inter_block8( base_q_idx, None, None, + None, )?; u_grid = read_plane( dec, @@ -3679,6 +3753,7 @@ fn decode_inter_block8( base_q_idx, None, None, + None, )?; v_grid = read_plane( dec, @@ -3698,6 +3773,7 @@ fn decode_inter_block8( base_q_idx, None, None, + None, )?; } }