diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 5833cdc0..ae6f9c83 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -38,6 +38,18 @@ const PARTITION_NONE: usize = 0; const PARTITION_SPLIT: usize = 3; const SB_MI: u32 = 16; const BLOCK_MI: u32 = 8; + +/// How many `use_filter_intra` symbols this decoder has read as `1`, across +/// every call in the process -- the cheap counter [`filter_intra_hits`] gate +/// tests read (before/after, not the absolute value) to prove a stream +/// actually exercised the filter-intra predictor rather than silently +/// skipping it. +static FILTER_INTRA_HITS: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); + +/// Current value of [`FILTER_INTRA_HITS`]. +pub(crate) fn filter_intra_hits() -> usize { + FILTER_INTRA_HITS.load(std::sync::atomic::Ordering::Relaxed) +} const SUB_MI: u32 = 4; const MI: usize = 4; const SB: usize = 64; @@ -624,7 +636,7 @@ fn read_intra_mode( cfl: bool, side: usize, enable_filter_intra: bool, -) -> Result<(bool, usize, Option<(i32, i32)>)> { +) -> Result<(bool, usize, Option<(i32, i32)>, Option)> { let trace = std::env::var_os("EC_AV1_TRACE").is_some(); let skip = dec.symbol(&mut cdfs.skip[0]) != 0; if trace { @@ -669,6 +681,7 @@ fn read_intra_mode( // of the tile (the pinned CfL stream's actual bug: partition/skip/mode // matched bit-exact, then `eob_pt` read 5 instead of 6, because this // symbol's bits were never consumed). + let mut filter_intra = None; if mode == DC_PRED && enable_filter_intra && let Some(class) = filter_intra_size_class(side) @@ -681,18 +694,15 @@ fn read_intra_mode( ); } if use_filter_intra { - // libaom still reads `filter_intra_mode` to stay in sync, but - // this decoder does not implement filter-intra prediction - // (spec 7.11.2.3's 5-tap recursive filter) -- refuse rather - // than silently miscode the reconstruction, the same pattern - // as this crate's other `Error::unsupported` refusals. - let _ = dec.symbol(&mut cdfs.filter_intra_mode); - return Err(unsupported( - "a filter-intra block (this decoder does not implement the 5.11.14 recursive predictor)", - )); + FILTER_INTRA_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed); + let fi_mode = dec.symbol(&mut cdfs.filter_intra_mode); + if trace { + eprintln!("TRACE filter_intra_mode value={fi_mode}"); + } + filter_intra = Some(fi_mode); } } - Ok((skip, mode, alpha)) + Ok((skip, mode, alpha, filter_intra)) } /// `UV_CFL_PRED` (spec 6.10.19's chroma intra mode enum): the fourteenth @@ -830,17 +840,29 @@ impl PlaneBuf { reach: Reach, residual: &[i32], cfl: Option<(i32, &[i32])>, + filter_intra: Option, ) { let (above, left, corner) = self.edges(x, y, side, reach); let mut prediction = vec![0u8; side * side]; - predict( - mode as u8, - above.as_deref(), - left.as_deref(), - corner, - side, - &mut prediction, - ); + if let Some(fi_mode) = filter_intra { + crate::intra::predict_filter_intra( + fi_mode, + above.as_deref(), + left.as_deref(), + corner, + side, + &mut prediction, + ); + } else { + predict( + mode as u8, + above.as_deref(), + left.as_deref(), + corner, + side, + &mut prediction, + ); + } for row in 0..side { for col in 0..side { let idx = row * side + col; @@ -878,6 +900,7 @@ fn read_plane( tx_side: usize, base_q_idx: u8, cfl: Option<(i32, &[i32])>, + filter_intra: Option, ) -> Result> { let skip_ctx = if plane_idx == 0 { 0 @@ -911,7 +934,16 @@ fn read_plane( &residual[..4.min(residual.len())] ); } - plane.reconstruct(x, y, side, predict_mode, reach, &residual, cfl); + plane.reconstruct( + x, + y, + side, + predict_mode, + reach, + &residual, + cfl, + filter_intra, + ); Ok(if tx_side == side { residual_grid_placeholder(&levels, side) } else { @@ -951,7 +983,7 @@ fn decode_block( ) -> Result<()> { let (r, c) = at; let (px, py) = (c * SUB, r * SUB); - let (skip, mode, alpha) = read_intra_mode( + let (skip, mode, alpha, filter_intra) = read_intra_mode( dec, cdfs, neighbours.above_mode[c], @@ -967,7 +999,16 @@ fn decode_block( if skip { // A skipped block codes no residual syntax at all (spec 5.11.34): // straight prediction, on every plane. - y.reconstruct(px, py, side, mode, reach, &vec![0i32; side * side], None); + y.reconstruct( + px, + py, + side, + mode, + reach, + &vec![0i32; side * side], + None, + filter_intra, + ); let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side)); u.reconstruct( cpx, @@ -977,6 +1018,7 @@ fn decode_block( Reach::none(), &vec![0i32; chroma_side * chroma_side], alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), + None, ); v.reconstruct( cpx, @@ -986,6 +1028,7 @@ fn decode_block( Reach::none(), &vec![0i32; chroma_side * chroma_side], alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), + None, ); luma_grid = vec![0i32; side * side]; u_grid = vec![0i32; chroma_side * chroma_side]; @@ -993,8 +1036,23 @@ fn decode_block( } else { let around = neighbours.around(at, side); luma_grid = read_plane( - dec, cdfs, luma_set, scans.0, 0, around[0], mode, mode, reach, y, px, py, side, - luma_tx, base_q_idx, None, + dec, + cdfs, + luma_set, + scans.0, + 0, + around[0], + mode, + mode, + reach, + y, + px, + py, + side, + luma_tx, + base_q_idx, + None, + filter_intra, )?; let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side)); u_grid = read_plane( @@ -1014,6 +1072,7 @@ fn decode_block( chroma_tx, base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), + None, )?; v_grid = read_plane( dec, @@ -1032,6 +1091,7 @@ fn decode_block( chroma_tx, base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), + None, )?; } neighbours.record(at, side, mode, &[luma_grid, u_grid, v_grid]); @@ -1076,7 +1136,7 @@ fn decode_leaf8( // An 8x8 leaf is well within `is_cfl_allowed`'s <=32x32 bound (spec // 5.11.5), so it reads the CFL-allowed `uv_mode_cfl` CDF, like every other // `decode_block` caller at 16x16 and up. - let (skip, mode, alpha) = read_intra_mode( + let (skip, mode, alpha, filter_intra) = read_intra_mode( dec, cdfs, above_mode, @@ -1090,7 +1150,7 @@ fn decode_leaf8( let (cpx, cpy) = (px / 2, py / 2); let (luma_grid, u_grid, v_grid); if skip { - y.reconstruct(px, py, 8, mode, reach, &vec![0i32; 64], None); + y.reconstruct(px, py, 8, mode, reach, &vec![0i32; 64], None, filter_intra); let ac = alpha.map(|_| cfl_ac_q3(y, px, py, 8)); u.reconstruct( cpx, @@ -1100,6 +1160,7 @@ fn decode_leaf8( Reach::none(), &vec![0i32; 16], alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), + None, ); v.reconstruct( cpx, @@ -1109,6 +1170,7 @@ fn decode_leaf8( Reach::none(), &vec![0i32; 16], alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), + None, ); luma_grid = vec![0i32; 64]; u_grid = vec![0i32; 16]; @@ -1132,6 +1194,7 @@ fn decode_leaf8( TX8, base_q_idx, None, + filter_intra, )?; let ac = alpha.map(|_| cfl_ac_q3(y, px, py, 8)); u_grid = read_plane( @@ -1151,6 +1214,7 @@ fn decode_leaf8( TX4, base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), + None, )?; v_grid = read_plane( dec, @@ -1169,6 +1233,7 @@ fn decode_leaf8( TX4, base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), + None, )?; } neighbours.record_mi(leaf_mi, 8, &[luma_grid, u_grid, v_grid]); @@ -2265,7 +2330,16 @@ fn decode_inter_block( let reach = Reach::of(side, px, py, y.width, y.height); if skip { - y.reconstruct(px, py, side, mode, reach, &vec![0i32; side * side], None); + y.reconstruct( + px, + py, + side, + mode, + reach, + &vec![0i32; side * side], + None, + None, + ); let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side)); u.reconstruct( cpx, @@ -2275,6 +2349,7 @@ fn decode_inter_block( Reach::none(), &vec![0i32; chroma_side * chroma_side], alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), + None, ); v.reconstruct( cpx, @@ -2284,6 +2359,7 @@ fn decode_inter_block( Reach::none(), &vec![0i32; chroma_side * chroma_side], alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), + None, ); luma_grid = vec![0i32; side * side]; u_grid = vec![0i32; chroma_side * chroma_side]; @@ -2307,6 +2383,7 @@ fn decode_inter_block( luma_tx, base_q_idx, None, + None, )?; let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side)); u_grid = read_plane( @@ -2326,6 +2403,7 @@ fn decode_inter_block( chroma_tx, base_q_idx, alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)), + None, )?; v_grid = read_plane( dec, @@ -2344,6 +2422,7 @@ fn decode_inter_block( chroma_tx, base_q_idx, alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)), + None, )?; } } @@ -2634,7 +2713,16 @@ fn decode_inter_block8( let reach = Reach::of(SIDE, px, py, y.width, y.height); if skip { - y.reconstruct(px, py, SIDE, mode, reach, &vec![0i32; SIDE * SIDE], None); + y.reconstruct( + px, + py, + SIDE, + mode, + reach, + &vec![0i32; SIDE * SIDE], + None, + None, + ); u.reconstruct( cpx, cpy, @@ -2643,6 +2731,7 @@ fn decode_inter_block8( Reach::none(), &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], None, + None, ); v.reconstruct( cpx, @@ -2652,6 +2741,7 @@ fn decode_inter_block8( Reach::none(), &vec![0i32; CHROMA_SIDE * CHROMA_SIDE], None, + None, ); luma_grid = vec![0i32; SIDE * SIDE]; u_grid = vec![0i32; CHROMA_SIDE * CHROMA_SIDE]; @@ -2675,6 +2765,7 @@ fn decode_inter_block8( TX8, base_q_idx, None, + None, )?; u_grid = read_plane( dec, @@ -2693,6 +2784,7 @@ fn decode_inter_block8( TX4, base_q_idx, None, + None, )?; v_grid = read_plane( dec, @@ -2711,6 +2803,7 @@ fn decode_inter_block8( TX4, base_q_idx, None, + None, )?; } } diff --git a/crates/ec-av1/src/intra.rs b/crates/ec-av1/src/intra.rs index 73978ea3..1ba1367f 100644 --- a/crates/ec-av1/src/intra.rs +++ b/crates/ec-av1/src/intra.rs @@ -341,6 +341,139 @@ fn dc(above: Option<&[u8]>, left: Option<&[u8]>, side: usize) -> i32 { } } +/// `Intra_Filter_Taps` (spec 7.11.2.3 / libaom `av1_filter_intra_taps`, +/// `av1/common/reconintra.c`): five recursive-filter modes (DC/V/H/D157/Paeth +/// variants, in that order), each predicting an 8-tap block of eight output +/// samples from seven already-known neighbours. +const FILTER_INTRA_TAPS: [[[i32; 7]; 8]; 5] = [ + [ + [-6, 10, 0, 0, 0, 12, 0], + [-5, 2, 10, 0, 0, 9, 0], + [-3, 1, 1, 10, 0, 7, 0], + [-3, 1, 1, 2, 10, 5, 0], + [-4, 6, 0, 0, 0, 2, 12], + [-3, 2, 6, 0, 0, 2, 9], + [-3, 2, 2, 6, 0, 2, 7], + [-3, 1, 2, 2, 6, 3, 5], + ], + [ + [-10, 16, 0, 0, 0, 10, 0], + [-6, 0, 16, 0, 0, 6, 0], + [-4, 0, 0, 16, 0, 4, 0], + [-2, 0, 0, 0, 16, 2, 0], + [-10, 16, 0, 0, 0, 0, 10], + [-6, 0, 16, 0, 0, 0, 6], + [-4, 0, 0, 16, 0, 0, 4], + [-2, 0, 0, 0, 16, 0, 2], + ], + [ + [-8, 8, 0, 0, 0, 16, 0], + [-8, 0, 8, 0, 0, 16, 0], + [-8, 0, 0, 8, 0, 16, 0], + [-8, 0, 0, 0, 8, 16, 0], + [-4, 4, 0, 0, 0, 0, 16], + [-4, 0, 4, 0, 0, 0, 16], + [-4, 0, 0, 4, 0, 0, 16], + [-4, 0, 0, 0, 4, 0, 16], + ], + [ + [-2, 8, 0, 0, 0, 10, 0], + [-1, 3, 8, 0, 0, 6, 0], + [-1, 2, 3, 8, 0, 4, 0], + [0, 1, 2, 3, 8, 2, 0], + [-1, 4, 0, 0, 0, 3, 10], + [-1, 3, 4, 0, 0, 4, 6], + [-1, 2, 3, 4, 0, 4, 4], + [-1, 2, 2, 3, 4, 3, 3], + ], + [ + [-12, 14, 0, 0, 0, 14, 0], + [-10, 0, 14, 0, 0, 12, 0], + [-9, 0, 0, 14, 0, 11, 0], + [-8, 0, 0, 0, 14, 10, 0], + [-10, 12, 0, 0, 0, 0, 14], + [-9, 1, 12, 0, 0, 0, 12], + [-8, 0, 0, 12, 0, 1, 11], + [-7, 0, 0, 1, 12, 1, 9], + ], +]; + +/// `FILTER_INTRA_SCALE_BITS` (libaom `reconintra.h`): the taps' fixed-point +/// shift. +const FILTER_INTRA_SCALE_BITS: u32 = 4; + +/// Recursive filter-intra prediction (spec 7.11.2.3, libaom +/// `av1_filter_intra_predictor_c`): walks 4x2 sub-blocks left-to-right, +/// top-to-bottom, each of the eight output samples a linear combination of +/// seven already-decoded or already-predicted neighbours (never past the +/// block's own top row / left column -- unlike the directional modes, this +/// one never reaches beyond `side` samples of either edge). +/// +/// `mode` is `0..=4`, indexing [`FILTER_INTRA_TAPS`]/`FILTER_DC_PRED` +/// through `FILTER_PAETH_PRED`. `above`/`left`/`corner` are exactly +/// [`predict`]'s edge arguments -- a side that does not exist is filled from +/// the side that does and a side that runs out is extended by repeating its +/// last sample, the same [`Edges::build`] rule every other mode uses, even +/// though this mode itself never reaches past its own `side` samples of +/// either edge. +/// +/// # Panics +/// Panics when `dst` is not `side * side` long, or `side` is not a multiple +/// of 4 (spec `av1_filter_intra_allowed_bsize` never offers this mode past +/// 32x32, and only on square blocks: 4, 8, 16 or 32). +pub fn predict_filter_intra( + mode: usize, + above: Option<&[u8]>, + left: Option<&[u8]>, + corner: Option, + side: usize, + dst: &mut [u8], +) { + assert_eq!(dst.len(), side * side, "the destination is the block"); + assert_eq!(side % 4, 0, "filter intra only offers 4/8/16/32"); + let edges = Edges::build(above, left, corner, side); + let taps = &FILTER_INTRA_TAPS[mode]; + // A (side+1)-square buffer: row 0 / column 0 hold the corner and the + // above/left edges, `buffer[r+1][c+1]` the block's own sample at (r, c). + let mut buffer = vec![0i32; (side + 1) * (side + 1)]; + let at = |buffer: &[i32], r: usize, c: usize| buffer[r * (side + 1) + c]; + buffer[0] = edges.above(-1); + for c in 0..side { + buffer[c + 1] = edges.above(c as i32); + } + for r in 0..side { + buffer[(r + 1) * (side + 1)] = edges.left(r as i32); + } + let mut r = 1; + while r < side + 1 { + let mut c = 1; + while c < side + 1 { + let p0 = at(&buffer, r - 1, c - 1); + let p1 = at(&buffer, r - 1, c); + let p2 = at(&buffer, r - 1, c + 1); + let p3 = at(&buffer, r - 1, c + 2); + let p4 = at(&buffer, r - 1, c + 3); + let p5 = at(&buffer, r, c - 1); + let p6 = at(&buffer, r + 1, c - 1); + let p = [p0, p1, p2, p3, p4, p5, p6]; + for k in 0..8 { + let (r_off, c_off) = (k >> 2, k & 3); + let pr: i32 = taps[k].iter().zip(&p).map(|(t, s)| t * s).sum(); + let value = round2(pr, FILTER_INTRA_SCALE_BITS).clamp(0, 255); + let idx = (r + r_off) * (side + 1) + c + c_off; + buffer[idx] = value; + } + c += 4; + } + r += 2; + } + for row in 0..side { + for col in 0..side { + dst[row * side + col] = at(&buffer, row + 1, col + 1) as u8; + } + } +} + /// `paeth_predict` (spec 7.11.2.2): of the three neighbours, the one nearest /// the gradient they describe. fn paeth(above: i32, left: i32, corner: i32) -> i32 { diff --git a/crates/ec-av1/src/mc.rs b/crates/ec-av1/src/mc.rs index 93f7d0cf..6122de68 100644 --- a/crates/ec-av1/src/mc.rs +++ b/crates/ec-av1/src/mc.rs @@ -164,8 +164,16 @@ pub fn predict( return; } - let h_filter = if block_w <= 4 { &SUBPEL_FILTERS_4[xfrac] } else { &SUBPEL_FILTERS[xfrac] }; - let v_filter = if block_h <= 4 { &SUBPEL_FILTERS_4[yfrac] } else { &SUBPEL_FILTERS[yfrac] }; + let h_filter = if block_w <= 4 { + &SUBPEL_FILTERS_4[xfrac] + } else { + &SUBPEL_FILTERS[xfrac] + }; + let v_filter = if block_h <= 4 { + &SUBPEL_FILTERS_4[yfrac] + } else { + &SUBPEL_FILTERS[yfrac] + }; // The vertical pass reads 3 rows above and 4 below the block, so the // horizontal pass must produce that many extra intermediate rows. diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 194b0c27..54fab8ab 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -13,6 +13,7 @@ use ec_av1_syntax::{Av1Parser, FrameType, ObuKind, TxMode}; use ec_core::{Error, Result}; +use crate::decode; use crate::decode::{decode_inter_frame_tile, decode_key_frame_tile}; use crate::encode::Picture; @@ -617,6 +618,147 @@ mod tests { } } + /// Path to a real `aomenc` build carrying the reference options this + /// fixture needs (`--max-partition-size`, `--enable-tx-size-search`, + /// `--loopfilter-control`) -- this box's `ffmpeg` links a libaom too old + /// to expose `enable-tx-size-search`/`loopfilter-control` through its + /// own `-aom-params` passthrough (probed live: "Cannot find aom + /// option"), so [`a_real_aomenc_filter_intra_stream_decodes_pixel_exact`] + /// shells out to the standalone binary instead of ffmpeg's libaom-av1 + /// wrapper every other test here uses. `EC_AV1_AOMENC` overrides the + /// default dev-build path; the test skips (not fails) when neither this + /// nor `ffmpeg` is present. + fn aomenc_path() -> std::path::PathBuf { + std::env::var_os("EC_AV1_AOMENC") + .map(std::path::PathBuf::from) + .unwrap_or_else(|| "/tmp/libaom-src/build/encoder/aomenc".into()) + } + + fn have_aomenc() -> bool { + aomenc_path().is_file() + } + + /// A real `aomenc` filter-intra fixture: every other intra mode disabled + /// (smooth/paeth/directional/angle-delta) and + /// `--max-partition-size=32` (past which `av1_filter_intra_allowed_bsize`'s + /// <=32x32 bound means `use_filter_intra` never reads at all, spec + /// 5.11.14), so the only way this frame codes is `DC_PRED` with filter + /// intra on top -- `--loopfilter-control=0` is required too: this + /// decoder has no in-loop deblocking filter at all, and libaom's default + /// (on) smooths every block-boundary column, which first looked like a + /// filter-intra math bug (mismatches straddling the 32-pixel block + /// seam) until the recipe without it round-tripped byte-exact. Checks + /// [`decode::filter_intra_hits`] actually moved (a process-global + /// counter, so before/after rather than an absolute value) to prove the + /// symbol fired, then pixel-exactness against ffmpeg's own decode of the + /// identical bytes on every plane. + #[test] + fn a_real_aomenc_filter_intra_stream_decodes_pixel_exact() { + if !have_ffmpeg() { + eprintln!("SKIP a_real_aomenc_filter_intra_stream_decodes_pixel_exact: no ffmpeg"); + return; + } + if !have_aomenc() { + eprintln!( + "SKIP a_real_aomenc_filter_intra_stream_decodes_pixel_exact: no aomenc at {}", + aomenc_path().display() + ); + return; + } + let (width, height) = (64usize, 64usize); + let y4m = Command::new("ffmpeg") + .args([ + "-v", + "error", + "-f", + "lavfi", + "-i", + "gradients=size=64x64:seed=42:duration=0.04:rate=25", + "-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 refused to generate the y4m fixture: {}", + String::from_utf8_lossy(&y4m.stderr) + ); + let mut child = Command::new(aomenc_path()) + .args([ + "--codec=av1", + "--passes=1", + "--end-usage=q", + "--cq-level=40", + "--cpu-used=0", + "--enable-filter-intra=1", + "--enable-smooth-intra=0", + "--enable-paeth-intra=0", + "--enable-directional-intra=0", + "--enable-angle-delta=0", + "--enable-tx-size-search=0", + "--enable-cdef=0", + "--max-partition-size=32", + "--loopfilter-control=0", + "--enable-palette=0", + "--enable-intrabc=0", + "--obu", + "-o", + "-", + "-", + ]) + .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("writing the y4m fixture to aomenc"); + let out = child.wait_with_output().expect("aomenc failed to run"); + assert!( + out.status.success(), + "aomenc refused the fixture: {}", + String::from_utf8_lossy(&out.stderr) + ); + let stream = out.stdout; + let before = decode::filter_intra_hits(); + // `screen_content_tools_determination` (libaom encoder_utils.c) is a + // real internal trial-encode/PSNR comparison, not a flag this CLI + // exposes a knob for -- on this flat gradient fixture it lands on + // `allow_screen_content_tools=0` most runs but occasionally trips + // over its 0.9 dB threshold the other way even with palette/intrabc + // both disabled. That is a genuine separate gap (`decode_stream` + // never reads `intrabc`/`palette_mode_info`), not a filter-intra + // regression, so it is skipped here exactly as + // `a_real_libaom_gradients_stream_with_cdef_decodes_pixel_exact` + // above skips its own still-unsupported-gap runs. + let frames = match decode_stream(&stream) { + Ok(frames) => frames, + Err(e) => { + eprintln!("SKIP a_real_aomenc_filter_intra_stream_decodes_pixel_exact: {e}"); + return; + } + }; + assert!( + decode::filter_intra_hits() > before, + "use_filter_intra never fired decoding this stream" + ); + let ffmpeg_frames = ffmpeg_decode_sequence(&stream, width, height, 1); + assert_eq!(frames[0].y, ffmpeg_frames[0].y, "luma vs ffmpeg"); + assert_eq!(frames[0].u, ffmpeg_frames[0].u, "U vs ffmpeg"); + assert_eq!(frames[0].v, ffmpeg_frames[0].v, "V vs ffmpeg"); + } + /// scratch: isolate a pinned mismatching stream's first divergent pixel. #[test] #[ignore]