diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index a0f7c60f..be8f124f 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -934,6 +934,10 @@ const DC_PRED: usize = 0; /// carries an angle delta — [`crate::tile`]'s own private copy of the same /// constant. const V_PRED: usize = 1; +const H_PRED: usize = 2; +/// `D157_PRED`: `fimode_to_intradir`'s target for `FILTER_D157_PRED` (spec +/// `Fimode_To_Intradir`, libaom `blockd.h`). +const D157_PRED: usize = 6; /// The last directional mode, `D67_PRED`. const D67_PRED: usize = 8; /// The symbol an angle delta of zero codes as (spec 9.3): the alphabet runs @@ -1426,6 +1430,13 @@ fn read_coeffs( eprintln!("EC_AV1_STATE_BEFORE_TXBSKIP range={range} value={value}"); } let all_zero = dec.symbol(&mut coding.txb_skip[skip_ctx]) == 1; + if std::env::var_os("EC_TRACE_COEFF").is_some() { + let (rng, _) = dec.debug_state(); + eprintln!( + "EC_COEFF_STEP tag=all_zero ctx={skip_ctx} all_zero={} rng={rng}", + all_zero as i32 + ); + } if std::env::var_os("EC_AV1_TELL").is_some() { eprintln!( "TELL label=post_txb_skip ctx={skip_ctx} all_zero={} tell={} range={}", @@ -1457,6 +1468,10 @@ fn read_coeffs( eprintln!("EC_AV1_TXTYPE32_CDF {tx_type_cdf:?}"); } let t = dec.symbol(tx_type_cdf); + if std::env::var_os("EC_TRACE_COEFF").is_some() { + let (rng, _) = dec.debug_state(); + eprintln!("EC_COEFF_STEP tag=tx_type rng={rng}"); + } if std::env::var_os("EC_AV1_EOBPT_CDF").is_some() { let (range, value) = dec.debug_state(); eprintln!("EC_AV1_STATE_AFTER_TXTYPE range={range} value={value}"); @@ -1481,6 +1496,11 @@ fn read_coeffs( if trace { eprintln!("TRACE eob value={eob}"); } + let ec_trace_coeff = std::env::var_os("EC_TRACE_COEFF").is_some(); + if ec_trace_coeff { + let (rng, _) = dec.debug_state(); + eprintln!("EC_COEFF_STEP tag=eob eob={eob} rng={rng}"); + } let class_scan; let scan: &[u16] = if class == TxClass::TwoD { scan @@ -1532,10 +1552,18 @@ fn read_coeffs( } else { level }; + if ec_trace_coeff && scan_idx == eob - 1 { + let (rng, _) = dec.debug_state(); + eprintln!("EC_COEFF_STEP tag=base_eob level={level} rng={rng}"); + } levels[pos] = level; } + if ec_trace_coeff { + let (rng, _) = dec.debug_state(); + eprintln!("EC_COEFF_STEP tag=after_bases rng={rng}"); + } - for &pos in &scan[..eob] { + for (c, &pos) in scan[..eob].iter().enumerate() { let level = levels[pos as usize]; if level == 0 { continue; @@ -1549,6 +1577,10 @@ fn read_coeffs( } else { dec.literal(1) == 1 }; + if ec_trace_coeff { + let (rng, _) = dec.debug_state(); + eprintln!("EC_COEFF_STEP tag=sign c={c} sign={} rng={rng}", negative as i32); + } let level = if level.abs_diff(0) as i32 > MAX_BR_LEVEL { let g = read_golomb(dec)?; if trace { @@ -1558,6 +1590,10 @@ fn read_coeffs( } else { level }; + if ec_trace_coeff { + let (rng, _) = dec.debug_state(); + eprintln!("EC_COEFF_STEP tag=post_golomb c={c} level={level} rng={rng}"); + } grid[pos as usize] = if negative { -level } else { level }; } Ok((grid, tx_type)) @@ -3970,15 +4006,34 @@ fn read_intra_mode( Option, )> { let trace = std::env::var_os("EC_AV1_TRACE").is_some(); + // lane-tiny r2: EC_ISTEP-format trace (same "name=... val=... rng=..." + // shape the oracle's own `ec_read_intra_frame_mode_info_impl` prints + // under `EC_TRACE_MODE_STEP`) so a range ladder can be diffed line for + // line against the instrumented aomdec, not just `tell()`. + let ec_istep = std::env::var_os("EC_TRACE_MODE_STEP").is_some(); + macro_rules! istep { + ($name:literal, $val:expr) => { + if ec_istep { + let (rng, _) = dec.debug_state(); + eprintln!( + "EC_ISTEP mi_row={mi_r} mi_col={mi_c} name={} val={} rng={rng}", + $name, $val + ); + } + }; + } let skip = dec.symbol(&mut cdfs.skip[skip_ctx]) != 0; if trace { eprintln!("TRACE skip value={}", skip as i32); } + istep!("skip", skip as i32); // spec order (see the comment below on `read_intrabc_info`): `skip`, // `segment_id`, `cdef`, `delta_q` -- `cdef` lands right here. maybe_read_cdef_idx(dec, mi_r, mi_c, skip); + istep!("cdef", 0); maybe_read_delta_q(dec, cdfs, mi_r, mi_c, side == 64, skip); maybe_read_delta_lf(dec, cdfs, mi_r, mi_c, side == 64, skip); + istep!("dq", 0); // `read_intrabc_info` (spec 5.11.13, libaom decodemv.c:693, called at // :811 right after `skip_txfm`/`segment_id`/`cdef`/`delta_q` and before // `mbmi->mode` is ever read): a `use_intrabc` symbol only present on an @@ -4005,6 +4060,7 @@ fn read_intra_mode( if trace { eprintln!("TRACE y_mode ctx=({above_ctx},{left_ctx}) value={mode}"); } + istep!("mode", mode as i32); let angle_delta_y = if (V_PRED..=D67_PRED).contains(&mode) { let delta = read_angle_delta(dec, &mut cdfs.angle_delta[mode - V_PRED]); if trace { @@ -4017,6 +4073,7 @@ fn read_intra_mode( } else { 0 }; + istep!("angle_y", angle_delta_y); let uv_mode = if cfl { dec.symbol(&mut cdfs.uv_mode_cfl[mode]) } else { @@ -4025,6 +4082,7 @@ fn read_intra_mode( if trace { eprintln!("TRACE uv_mode cfl={cfl} y_mode={mode} value={uv_mode}"); } + istep!("uv_mode", uv_mode as i32); let alpha = if cfl && uv_mode == UV_CFL_PRED { Some(read_cfl_alphas(dec, cdfs)) } else { @@ -4051,6 +4109,7 @@ fn read_intra_mode( } else { 0 }; + istep!("angle_uv", angle_delta_uv); // `read_palette_mode_info` (spec 5.11.13, libaom decodemv.c:567, called // at :840 right after `xd->cfl.store_y` and before `read_filter_intra_mode_info`): // gated by `av1_allow_palette` (blockd.h -- size bound only, @@ -4144,12 +4203,14 @@ fn read_intra_mode( use_filter_intra as i32 ); } + istep!("use_filter_intra", use_filter_intra as i32); if use_filter_intra { FILTER_INTRA_HITS.with(|c| c.set(c.get() + 1)); let fi_mode = dec.symbol(&mut cdfs.filter_intra_mode); if trace { eprintln!("TRACE filter_intra_mode value={fi_mode}"); } + istep!("filter_intra_mode", fi_mode as i32); filter_intra = Some(fi_mode); } } @@ -4566,6 +4627,18 @@ fn read_plane( } else { usize::from(around.0) + usize::from(around.1) }; + // spec 5.11.47/libaom `av1_read_tx_type`: a filter-intra luma block's + // `intra_ext_tx_cdf` row is indexed by `fimode_to_intradir[filter_intra_mode]`, + // not by the block's ordinary `mode` (which is always DC_PRED whenever + // filter-intra is on) -- caller passes the raw filter-intra mode 0..4 in + // `filter_intra`, only meaningful for `plane_idx == 0` (chroma has no + // filter-intra in AV1). + const FIMODE_TO_INTRADIR: [usize; 5] = [DC_PRED, V_PRED, H_PRED, D157_PRED, DC_PRED]; + let tx_mode = if plane_idx == 0 { + filter_intra.map_or(tx_mode, |fi| FIMODE_TO_INTRADIR[fi]) + } else { + tx_mode + }; let mut coding = cdfs.txb(set, tx_mode); // Luma's `default_tx_type` is only a fallback for the sizes whose // `TxbSet` carries no symbol at all (32-point and up), which the spec @@ -5661,6 +5734,13 @@ fn read_tx_size( } _ => unreachable!("decode_block/decode_leaf8 only call this at 8/16/32/64"), }; + if std::env::var_os("EC_TRACE_MODE_STEP").is_some() { + let (rng, _) = dec.debug_state(); + let (mi_r, mi_c) = at_mi; + eprintln!( + "EC_ISTEP mi_row={mi_r} mi_col={mi_c} name=tx_depth val={depth} ctx={ctx} rng={rng}" + ); + } if depth != 0 { TX_DEPTH_HITS.with(|c| c.set(c.get() + 1)); } diff --git a/crates/ec-av1/src/intra.rs b/crates/ec-av1/src/intra.rs index af810071..818779d2 100644 --- a/crates/ec-av1/src/intra.rs +++ b/crates/ec-av1/src/intra.rs @@ -159,7 +159,13 @@ impl Edges { row }; // Spec 7.11.2.2's no-neighbour fallback is `base = 1 << (BitDepth - 1)` - // (128 at 8-bit): `base - 1` above, `base + 1` left, `base` corner. + // (128 at 8-bit): `base - 1` above, `base + 1` left, `base` corner + // (libaom `reconintra.c`'s own diagram: the shared top-left corner + // cell is literally `base`, distinct from either row's own + // replicated value -- confirmed against `av1_highbd_build_intra_predictors`'s + // comment block, lane-tiny r1; an earlier attempt at this fix used + // 127/129 for the corner instead and made a passing 16x16 fixture + // regress, which is what caught the misreading). let base = 1i32 << (crate::decode::bit_depth() - 1); let above_row = match (above, left) { (Some(a), _) => extend(a), diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 2e100638..8a2b0df0 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -6361,6 +6361,186 @@ mod tests { crate::decode::cdef_idx_hits() ); } + /// lane-tiny r1 diagnostic (not a gate): sweeps tiny key-frame sizes + /// against real aomenc + ffmpeg to find the exact size boundary of the + /// silent-wrong-pixels defect the sub8 lane's r2 dead-end flagged (a + /// plain 16x16 stream, no exotic tools). `#[ignore]`d -- prints a + /// pass/fail table, asserts nothing; run manually with `--nocapture`. + #[test] + #[ignore = "diagnostic sweep, run manually with --nocapture"] + fn probe_tiny_frame_size_boundary() { + if !have_ffmpeg() || !have_aomenc() { + eprintln!("SKIP: no ffmpeg/aomenc"); + return; + } + let sizes: &[(usize, usize)] = + &[(8, 8), (16, 16), (32, 32), (16, 32), (32, 16), (64, 64), (48, 48), (24, 24)]; + for &(width, height) in sizes { + let mut ok = 0u32; + let mut bad = 0u32; + let mut refused = 0u32; + let n = 10u32; + for attempt in 0..n { + let seed = 42 + attempt; + let source = format!( + "mandelbrot=size={width}x{height}:rate=25:start_x={sx}:start_y={sy}", + sx = -0.6 + 0.005 * (attempt as f64), + sy = -0.4 + 0.005 * (attempt as f64) + ); + let y4m = Command::new("ffmpeg") + .args([ + "-v", "error", "-f", "lavfi", "-i", &source, "-t", "0.04", "-pix_fmt", + "yuv420p", "-f", "yuv4mpegpipe", "-", + ]) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("ffmpeg failed to run"); + assert!(y4m.status.success(), "ffmpeg fixture: {}", String::from_utf8_lossy(&y4m.stderr)); + let max_part = width.max(height).min(64).next_power_of_two(); + let min_part = width.min(height).next_power_of_two().max(8).min(max_part); + let max_part_arg = format!("--max-partition-size={max_part}"); + let min_part_arg = format!("--min-partition-size={min_part}"); + let args: Vec<&str> = vec![ + "--codec=av1", "--passes=1", "--end-usage=q", "--cq-level=32", + "--cpu-used=4", "--kf-max-dist=0", "--limit=1", "--threads=1", + "--row-mt=0", "--enable-rect-partitions=0", "--enable-ab-partitions=0", + "--enable-1to4-partitions=0", + &max_part_arg, &min_part_arg, + "--obu", "-o", "-", "-", + ]; + let mut child = Command::new(aomenc_path()) + .args(&args) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .expect("aomenc failed to start"); + child.stdin.take().expect("aomenc stdin").write_all(&y4m.stdout).expect("write y4m"); + let out = child.wait_with_output().expect("aomenc failed to run"); + assert!(out.status.success(), "aomenc refused: {}", String::from_utf8_lossy(&out.stderr)); + let stream = out.stdout; + let frames = match decode_stream(&stream) { + Err(e) => { + eprintln!(" {width}x{height} seed {seed}: REFUSED {e}"); + refused += 1; + continue; + } + Ok(f) => f, + }; + let ffmpeg_frames = ffmpeg_decode_sequence(&stream, width, height, 1); + if frames.len() == 1 + && frames[0].y == ffmpeg_frames[0].y + && frames[0].u == ffmpeg_frames[0].u + && frames[0].v == ffmpeg_frames[0].v + { + ok += 1; + } else { + bad += 1; + let mut first = None; + for row in 0..height { + for col in 0..width { + let i = row * width + col; + if frames[0].y[i] != ffmpeg_frames[0].y[i] { + first = Some((row, col, frames[0].y[i], ffmpeg_frames[0].y[i])); + break; + } + } + if first.is_some() { + break; + } + } + let ndiff = frames[0] + .y + .iter() + .zip(&ffmpeg_frames[0].y) + .filter(|(a, b)| a != b) + .count(); + eprintln!( + " {width}x{height} seed {seed}: MISMATCH luma first_diff={first:?} ndiff_luma={ndiff}/{}", + width * height + ); + } + } + eprintln!("{width}x{height}: {ok} ok / {bad} mismatch / {refused} refused (of {n})"); + } + } + + /// lane-tiny r1: re-decodes the known-failing 32x32 seed 45 fixture with + /// `EC_AV1_TRACE` on to inspect what mode/tx this single-block frame + /// picked. Diagnostic only, `#[ignore]`d, run manually with --nocapture. + #[test] + #[ignore = "diagnostic, run manually with --nocapture"] + fn probe_tiny_32x32_trace() { + if !have_ffmpeg() || !have_aomenc() { + eprintln!("SKIP: no ffmpeg/aomenc"); + return; + } + let (width, height) = (32usize, 32usize); + let attempt = 3u32; // seed 45 + let source = format!( + "mandelbrot=size={width}x{height}:rate=25:start_x={sx}:start_y={sy}", + sx = -0.6 + 0.005 * (attempt as f64), + sy = -0.4 + 0.005 * (attempt as f64) + ); + let y4m = Command::new("ffmpeg") + .args([ + "-v", "error", "-f", "lavfi", "-i", &source, "-t", "0.04", "-pix_fmt", "yuv420p", + "-f", "yuv4mpegpipe", "-", + ]) + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("ffmpeg failed to run"); + assert!(y4m.status.success()); + let args: Vec<&str> = vec![ + "--codec=av1", "--passes=1", "--end-usage=q", "--cq-level=32", "--cpu-used=4", + "--kf-max-dist=0", "--limit=1", "--threads=1", "--row-mt=0", + "--enable-rect-partitions=0", "--enable-ab-partitions=0", + "--enable-1to4-partitions=0", "--max-partition-size=32", "--min-partition-size=32", + "--enable-filter-intra=0", + "--obu", "-o", "-", "-", + ]; + let mut child = Command::new(aomenc_path()) + .args(&args) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .expect("aomenc failed to start"); + child.stdin.take().unwrap().write_all(&y4m.stdout).unwrap(); + let out = child.wait_with_output().unwrap(); + assert!(out.status.success()); + let stream = out.stdout; + let frames = decode_stream(&stream).expect("decode"); + let ffmpeg_frames = ffmpeg_decode_sequence(&stream, width, height, 1); + let mismatched = frames[0].y != ffmpeg_frames[0].y; + eprintln!("mismatched={mismatched}"); + } + + /// lane-tiny r2: decodes a raw OBU stream at `EC_TINY_FIXTURE_PATH` -- + /// no ffmpeg/aomenc invocation -- so a range ladder can be run + /// (`EC_TRACE_MODE_STEP=1`) against the exact same bytes fed to the + /// oracle aomdec, byte for byte. `#[ignore]`d diagnostic, no assertion. + #[test] + #[ignore = "diagnostic, run manually with --nocapture and EC_TINY_FIXTURE_PATH set"] + fn probe_tiny_fixture_trace() { + let path = std::env::var("EC_TINY_FIXTURE_PATH") + .expect("set EC_TINY_FIXTURE_PATH to an .obu file"); + let stream = std::fs::read(&path).expect("reading fixture"); + match decode_stream(&stream) { + Ok(frames) => { + eprintln!("decoded {} frame(s)", frames.len()); + if let Ok(dump) = std::env::var("EC_TINY_FIXTURE_Y_DUMP") { + let bytes: Vec = frames[0].y.iter().map(|&v| v as u8).collect(); + std::fs::write(&dump, &bytes).expect("dump y plane"); + } + } + Err(e) => eprintln!("REFUSED: {e}"), + } + } /// Pinned streams captured by `EC_AV1_GATE_DUMP` off /// `a_real_aomenc_stream_with_warped_motion_refuses_or_matches` -- each /// one is a former mismatch, kept as a regression pin (warp-mismatch: diff --git a/lanes/tiny-r3.report.md b/lanes/tiny-r3.report.md new file mode 100644 index 00000000..939893a4 --- /dev/null +++ b/lanes/tiny-r3.report.md @@ -0,0 +1,130 @@ +# lane-tiny r3 report + +## Coefficient range ladder result + +Added `EC_TRACE_COEFF` per-symbol range tracing to `read_coeffs` (decode.rs, +tags `all_zero`, `tx_type`, `eob`, `base_eob`, `after_bases`, `sign`, +`post_golomb`) matching the oracle's existing `decodetxb.c` instrumentation +(same var name, same tags -- oracle needed two more trace points added, +`all_zero`/`tx_type` entry ranges, rebuilt via `ninja aomdec` in +`~/.cache/aom-oracle/build`). + +Ran both against the pinned seed-45 32x32 fixture +(`$SCRATCHPAD/seed45.obu`, CFL + filter_intra DC_PRED block, +`filter_intra_mode=3`). + +**`all_zero` matched exactly** (ctx=1, all_zero=0, rng=52448 both sides) -- +the very first symbol of the coefficient layer was clean. + +**Divergence: the very next symbol, `tx_type`.** Ours exited at rng=37340, +oracle at rng=42464. Direction: both consumed a symbol (range narrowed from +the same 52448 entry state) but landed on different final ranges -> a wrong +CDF *row* was read, not a missing/extra read (both sides read exactly one +tx_type symbol here). + +## Root cause + +`av1_read_tx_type` (libaom `decodemv.c:646`): for an **intra** block whose +`filter_intra_mode_info.use_filter_intra` is set, the `intra_ext_tx_cdf` row +index is + +```c +const PREDICTION_MODE intra_mode = + mbmi->filter_intra_mode_info.use_filter_intra + ? fimode_to_intradir[mbmi->filter_intra_mode_info.filter_intra_mode] + : mbmi->mode; +``` + +`fimode_to_intradir = { DC_PRED, V_PRED, H_PRED, D157_PRED, DC_PRED }` +(`blockd.h:180`) -- **not** the block's ordinary `mode`, which is always +`DC_PRED` whenever filter-intra is active (spec: filter-intra blocks always +carry `mode == DC_PRED`, the interesting information is in +`filter_intra_mode`). Every `read_plane` call site in `decode.rs` passed the +block's plain `mode` (here `DC_PRED == 0`) as `tx_mode` regardless of +filter_intra, so the CDF lookup always used the DC_PRED row instead of +`D157_PRED` (index 6) for `filter_intra_mode=3`. Wrong row -> wrong symbol -> +correctly-consumed bits but wrong resulting range and wrong `tx_type`, and +everything downstream (scan order, base/br contexts) reads off the wrong +axis from the very first coefficient TU on. + +## What shipped + +**Fix**, `crates/ec-av1/src/decode.rs`, `read_plane` (the single shared +chroma/luma coefficient entry point every multi-TU and single-TU luma call +routes through): when `plane_idx == 0` and `filter_intra` is `Some(mode)`, +remap `tx_mode` through `FIMODE_TO_INTRADIR = [DC_PRED, V_PRED, H_PRED, +D157_PRED, DC_PRED]` before the `cdfs.txb(set, tx_mode)` lookup. Added +`H_PRED`/`D157_PRED` consts (matched libaom's numbering: DC=0, V=1, H=2, +D157=6, verified against `crates/ec-av1/src/intra.rs`'s existing constants). + +One fix point covers every caller (chroma is unaffected by construction -- +`plane_idx != 0` never touches the new branch, and chroma has no +filter-intra in AV1 to begin with). + +**Gate**: the existing `probe_tiny_frame_size_boundary` diagnostic sweep +(size x seed matrix, real aomenc + ffmpeg oracle) now shows: + +| size | before | after | +|-------|--------|-------| +| 32x32 | 3/10 | **10/10** | +| 24x24 | 3/10 | **10/10** | +| 16x32 | 2/10 | **10/10** | +| 32x16 | 2/10 | 8/10 (residual, see Open) | +| 16x16, 48x48, 64x64 | 10/10 | 10/10 (unaffected, already clean) | + +This is a `#[ignore]`d diagnostic, not a hard-asserting gate (matches its +pre-existing shape from r1/r2; converting it into a hard-asserting +`stream.rs` gate in the `a_real_aomenc_*` style is the natural next step but +did not fit this round's budget -- flagged in Open below). + +## Investigated and REJECTED as a fix + +Chased a second lead from the same trace session: the chroma `txb_skip_ctx` +computation (`usize::from(around.0) + usize::from(around.1)`, range 0..2) +looked wrong against libaom's `get_txb_ctx`'s chroma branch, which is +`get_entropy_context(...) + ctx_offset` where `ctx_offset` is 7 (chroma +plane_bsize == tx size, i.e. always true here since chroma is never split +into multiple TUs in this decoder). Oracle traced `ctx=7` where ours prints +`ctx=0` for the identical read -- **but this is not a bug**: our +`txb_skip_chroma_8`/`_16`/`_32`/`_4` CDF tables (`cdf_state.rs`) are already +pre-sliced 3-row extracts of the full 13-row spec table taken at the correct +7/10 offset (`TXB_SKIP_CHROMA_8` etc., confirmed by grep at their +initializer). Index 0 in our local table *is* spec index 7 -- the two +printed "ctx" numbers are in different local bases for the same CDF row, +which is exactly why the traced range matched exactly in that instance. +Applying a `+ 7` there panicked immediately (`index out of bounds: len 3, +index 7`) on the very first refused-8x8-then-16x16 case, confirmed the +tables are chroma-relative already, and was reverted in full before commit +(`git diff` verified clean, no residue in the shipped commit). + +## Open (not shipped this round) + +- **32x16 residual, 2/10 seeds**: `first_diff=None, ndiff_luma=0/512` -- + luma is bit-exact, only chroma differs, for exactly 2 of 10 seeds at one + specific rectangular aspect (32x16, not its transpose 16x32 which is now + 10/10). Not characterized further this round (budget). Not gated or + refused -- this is a real "wrong pixels returned as success" gap per the + charter's own standard, scoped narrower than what shipped fixed. Next + round: re-run the same `EC_TRACE_COEFF`/`EC_TRACE_MODE_STEP` ladder on one + of the two failing 32x16 seed-47/42 fixtures (pin them first, aomenc + output is seeded but re-verify determinism per + `seeded-fixture-not-reproducible.md`) to find the actual desync point -- + it is chroma-only, so start with the chroma predict path / CFL / + uv_predict_mode rather than the luma tx_type fix's territory. +- `probe_tiny_frame_size_boundary` is still `#[ignore]`d and non-asserting. + Promoting it to a hard-asserting gate under `stream.rs` (model: + `a_real_aomenc_*_decodes_pixel_exact`, `EC_AV1_REQUIRE_AOMENC=1`, + hard-assert a hit counter, no printed SKIP on decode error) is the + natural follow-up once the 32x16 residual is closed too -- gating it now + would either need to accept 32x16 as a known-flaky size (against the + charter's own "never mismatch" rule) or hard-code a size exclusion, both + of which are worse than finishing the fix. + +## Verification + +- `cargo test -p ec-av1 --lib`: **266 passed, 0 failed, 22 ignored** (221s). +- `cargo check --workspace --all-targets`: clean, 0 errors. +- HEAD: `1a89ed9` (branch `lane-tiny`). + +EVIDENCE: `cargo test -p ec-av1 --lib -- --ignored --nocapture probe_tiny_frame_size_boundary` | 32x32/24x24/16x32 3-or-2-of-10 -> 10/10, 32x16 2/10 -> 8/10, all other sizes unchanged at 10/10 | before/after table above +EVIDENCE: EC_TRACE_COEFF range ladder, seed45.obu, oracle vs ours | all_zero ctx=1 all_zero=0 rng=52448 matches both sides; tx_type exit rng 37340 (ours) vs 42464 (oracle) is the first divergent element | fixed by filter-intra tx_type CDF row remap, commit 1a89ed9