forge
Explore
Log in

Don't you dare go Hollow

wip(av1): CfL CDFs, alpha reads, and prediction math — r2 checkpoint

Browse files at this commit

e37bffe7c0dfa13171c1568fb029c2cef210db87Ahmet Kaan GümüşParent: b5e06f8
CfL sign/alpha CDFs converted from AOM_ICDF storage, read_cfl_alphas
wired, cfl.c subsample/average/alpha math ported. The pinned CfL-stream
gate stays ignored: its LUMA decodes near-flat where ffmpeg shows a
gradient, so a bug upstream of the chroma math remains — r3 isolates.
crates/ec-av1/src/cdf.rsmodified+38 -0
@@ -305,6 +305,44 @@ pub const UV_MODE_CFL: [[u16; 15]; 13] = [
305305 ],
306306 ];
307307
308+/// `Default_Cfl_Sign_Cdf` (spec 9.4): the joint sign of a `UV_CFL_PRED`
309+/// block's U/V alpha (spec 5.11.45's `cfl_alpha_signs`) — libaom's
310+/// `default_cfl_sign_cdf` (entropymode.c), whose `AOM_CDF8(a0..a6)` arguments
311+/// are this convention's cumulative points verbatim (only the *storage*, not
312+/// the spec's own table, is `AOM_ICDF`-inverted).
313+pub const CFL_SIGN: [u16; 9] = [1418, 2123, 13340, 18405, 26972, 28343, 32294, 32768, 0];
314+
315+/// `Default_Cfl_Alpha_Cdf` (spec 9.4): a `UV_CFL_PRED` block's per-plane
316+/// alpha magnitude (spec 5.11.45's `cfl_alpha_u`/`cfl_alpha_v`), indexed by
317+/// the joint sign's context (`CFL_CONTEXT_U`/`CFL_CONTEXT_V`,
318+/// libaom's cfl.h) — libaom's `default_cfl_alpha_cdf`.
319+pub const CFL_ALPHA: [[u16; 17]; 6] = [
320+ [
321+ 7637, 20719, 31401, 32481, 32657, 32688, 32692, 32696, 32700, 32704, 32708, 32712, 32716,
322+ 32720, 32724, 32768, 0,
323+ ],
324+ [
325+ 14365, 23603, 28135, 31168, 32167, 32395, 32487, 32573, 32620, 32647, 32668, 32672, 32676,
326+ 32680, 32684, 32768, 0,
327+ ],
328+ [
329+ 11532, 22380, 28445, 31360, 32349, 32523, 32584, 32649, 32673, 32677, 32681, 32685, 32689,
330+ 32693, 32697, 32768, 0,
331+ ],
332+ [
333+ 26990, 31402, 32282, 32571, 32692, 32696, 32700, 32704, 32708, 32712, 32716, 32720, 32724,
334+ 32728, 32732, 32768, 0,
335+ ],
336+ [
337+ 17248, 26058, 28904, 30608, 31305, 31877, 32126, 32321, 32394, 32464, 32516, 32560, 32576,
338+ 32593, 32622, 32768, 0,
339+ ],
340+ [
341+ 14738, 21678, 25779, 27901, 29024, 30302, 30980, 31843, 32144, 32413, 32520, 32594, 32622,
342+ 32656, 32660, 32768, 0,
343+ ],
344+];
345+
308346 /// `Default_Txb_Skip_Cdf[2][3][0]` (spec 9.4): the all-zero flag of a 32x32
309347 /// luma transform block that covers its whole plane block, which is context 0.
310348 pub const TXB_SKIP_LUMA_32: [u16; 3] = [30669, 32768, 0];
crates/ec-av1/src/cdf_state.rsmodified+6 -0
@@ -98,6 +98,10 @@ pub(crate) struct Cdfs {
9898 pub uv_mode_no_cfl: [[u16; 14]; 13],
9999 /// The chroma mode of a block that is offered it.
100100 pub uv_mode_cfl: [[u16; 15]; 13],
101+ /// The joint sign of a `UV_CFL_PRED` block's U/V alpha.
102+ pub cfl_sign: [u16; 9],
103+ /// A `UV_CFL_PRED` block's per-plane alpha magnitude, by joint-sign context.
104+ pub cfl_alpha: [[u16; 17]; 6],
101105 /// The angle a directional mode is nudged by.
102106 pub angle_delta: [[u16; 8]; 8],
103107 /// The one-context all-zero flag of a 16x16 luma transform.
@@ -297,6 +301,8 @@ impl Cdfs {
297301 kf_y_mode: cdf::KF_Y_MODE,
298302 uv_mode_no_cfl: cdf::UV_MODE_NO_CFL,
299303 uv_mode_cfl: cdf::UV_MODE_CFL,
304+ cfl_sign: cdf::CFL_SIGN,
305+ cfl_alpha: cdf::CFL_ALPHA,
300306 angle_delta: cdf::ANGLE_DELTA,
301307 txb_skip_luma_16: [pick(
302308 q_ctx,
crates/ec-av1/src/decode.rsmodified+146 -20
@@ -510,15 +510,18 @@ impl Neighbours {
510510 /// exactly — including its skip context, which the real key-frame writer
511511 /// always writes at a fixed context of zero (it never tracks a neighbour-based
512512 /// one for intra blocks; that is the inter-frame writer's rule instead).
513-/// Refuses a nonzero angle delta or a chroma-from-luma mode: this decoder
514-/// reconstructs the thirteen luma modes at their base angle, DC-only chroma.
513+/// Refuses a nonzero angle delta: this decoder reconstructs the thirteen
514+/// luma modes at their base angle only. Chroma is DC-only or, where CFL is
515+/// offered (`cfl`, `is_cfl_allowed`, spec 5.11.5), chroma-from-luma -- the
516+/// third element carries that mode's `(alpha_q3_u, alpha_q3_v)`, `None` for
517+/// plain DC chroma.
515518 fn read_intra_mode(
516519 dec: &mut SymbolDecoder,
517520 cdfs: &mut Cdfs,
518521 above_mode: usize,
519522 left_mode: usize,
520523 cfl: bool,
521-) -> Result<(bool, usize)> {
524+) -> Result<(bool, usize, Option<(i32, i32)>)> {
522525 let skip = dec.symbol(&mut cdfs.skip[0]) != 0;
523526 let mode =
524527 dec.symbol(&mut cdfs.kf_y_mode[INTRA_MODE_CTX[above_mode]][INTRA_MODE_CTX[left_mode]]);
@@ -535,10 +538,85 @@ fn read_intra_mode(
535538 } else {
536539 dec.symbol(&mut cdfs.uv_mode_no_cfl[mode])
537540 };
538- if uv_mode != DC_PRED {
539- return Err(unsupported("a chroma-from-luma mode (round 2)"));
541+ let alpha = if uv_mode == DC_PRED {
542+ None
543+ } else if cfl && uv_mode == UV_CFL_PRED {
544+ Some(read_cfl_alphas(dec, cdfs))
545+ } else {
546+ return Err(unsupported("a directional chroma mode (round 2)"));
547+ };
548+ Ok((skip, mode, alpha))
549+}
550+
551+/// `UV_CFL_PRED` (spec 6.10.19's chroma intra mode enum): the fourteenth
552+/// entry of [`crate::cdf::UV_MODE_CFL`], one past the thirteen ordinary
553+/// intra modes.
554+const UV_CFL_PRED: usize = 13;
555+
556+/// `read_cfl_alphas` (libaom decodemv.c): the joint sign symbol (8-ary, spec
557+/// 5.11.45's `cfl_alpha_signs`), then each plane's alpha magnitude symbol
558+/// (16-ary, `cfl_alpha_u`/`cfl_alpha_v`) where its sign is nonzero -- context
559+/// indices `CFL_CONTEXT_U`/`CFL_CONTEXT_V` (libaom cfl.h) derived from the
560+/// joint sign the same way. Returns each plane's final signed `alpha_q3`
561+/// (`cfl_idx_to_alpha`, cfl.c): magnitude `idx + 1`, sign-zero collapsing to 0.
562+fn read_cfl_alphas(dec: &mut SymbolDecoder, cdfs: &mut Cdfs) -> (i32, i32) {
563+ let joint_sign = dec.symbol(&mut cdfs.cfl_sign) as i32;
564+ let sign_u = ((joint_sign + 1) * 11) >> 5;
565+ let sign_v = (joint_sign + 1) - 3 * sign_u;
566+ let alpha_u = if sign_u == 0 {
567+ 0
568+ } else {
569+ let ctx_u = (joint_sign + 1 - 3) as usize;
570+ let mag = dec.symbol(&mut cdfs.cfl_alpha[ctx_u]) as i32 + 1;
571+ if sign_u == 2 { mag } else { -mag }
572+ };
573+ let alpha_v = if sign_v == 0 {
574+ 0
575+ } else {
576+ let ctx_v = (sign_v * 3 + sign_u - 3) as usize;
577+ let mag = dec.symbol(&mut cdfs.cfl_alpha[ctx_v]) as i32 + 1;
578+ if sign_v == 2 { mag } else { -mag }
579+ };
580+ (alpha_u, alpha_v)
581+}
582+
583+/// `cfl_luma_subsampling_420_lbd_c` + `subtract_average_c` (libaom cfl.c):
584+/// the reconstructed luma samples under a `side`-square block, subsampled
585+/// 4:2:0 to Q3 (`(a+b+c+d) << 1`, each 2x2 group), then block-average
586+/// subtracted (`round_offset = num_pel/2`, right-shifted by `log2(num_pel)`)
587+/// to give the AC values [`cfl_scaled`] scales by alpha.
588+fn cfl_ac_q3(y: &PlaneBuf, px: usize, py: usize, side: usize) -> Vec<i32> {
589+ let cside = side / 2;
590+ let mut ac = vec![0i32; cside * cside];
591+ let mut sum = 0i32;
592+ for cy in 0..cside {
593+ for cx in 0..cside {
594+ let (lx, ly) = (px + cx * 2, py + cy * 2);
595+ let q3 = (i32::from(y.data[ly * y.width + lx])
596+ + i32::from(y.data[ly * y.width + lx + 1])
597+ + i32::from(y.data[(ly + 1) * y.width + lx])
598+ + i32::from(y.data[(ly + 1) * y.width + lx + 1]))
599+ << 1;
600+ ac[cy * cside + cx] = q3;
601+ sum += q3;
602+ }
603+ }
604+ let num_pel = (cside * cside) as i32;
605+ let avg = (sum + num_pel / 2) >> num_pel.trailing_zeros();
606+ ac.iter_mut().for_each(|v| *v -= avg);
607+ ac
608+}
609+
610+/// `get_scaled_luma_q0` (libaom cfl.h): `alpha_q3 * ac_q3`, rounded from Q6
611+/// back to whole samples with `ROUND_POWER_OF_TWO_SIGNED` (round-to-nearest,
612+/// ties away from zero on the shifted-out sign).
613+fn cfl_scaled(alpha_q3: i32, ac_q3: i32) -> i32 {
614+ let v = alpha_q3 * ac_q3;
615+ if v >= 0 {
616+ (v + 32) >> 6
617+ } else {
618+ -((-v + 32) >> 6)
540619 }
541- Ok((skip, mode))
542620 }
543621
544622 /// One plane's reconstruction buffer, `width * height` samples, and the
@@ -592,6 +670,10 @@ impl PlaneBuf {
592670
593671 /// Predicts under `mode` then adds `residual` (side*side, raster),
594672 /// writing the clamped reconstruction back into the plane at `(x, y)`.
673+ /// `cfl`, when `Some((alpha_q3, ac_q3))` (a `UV_CFL_PRED` chroma block),
674+ /// nudges the prediction by [`cfl_scaled`]'s per-sample amount before the
675+ /// residual is added — `av1_cfl_predict_block`'s own clip-then-add-residual
676+ /// order (cfl.c).
595677 fn reconstruct(
596678 &mut self,
597679 x: usize,
@@ -600,6 +682,7 @@ impl PlaneBuf {
600682 mode: usize,
601683 reach: Reach,
602684 residual: &[i32],
685+ cfl: Option<(i32, &[i32])>,
603686 ) {
604687 let (above, left, corner) = self.edges(x, y, side, reach);
605688 let mut prediction = vec![0u8; side * side];
@@ -613,8 +696,12 @@ impl PlaneBuf {
613696 );
614697 for row in 0..side {
615698 for col in 0..side {
616- let sample = (i32::from(prediction[row * side + col]) + residual[row * side + col])
617- .clamp(0, 255) as u8;
699+ let idx = row * side + col;
700+ let mut base = i32::from(prediction[idx]);
701+ if let Some((alpha_q3, ac_q3)) = cfl {
702+ base = (base + cfl_scaled(alpha_q3, ac_q3[idx])).clamp(0, 255);
703+ }
704+ let sample = (base + residual[idx]).clamp(0, 255) as u8;
618705 self.data[(y + row) * self.width + x + col] = sample;
619706 }
620707 }
@@ -643,6 +730,7 @@ fn read_plane(
643730 side: usize,
644731 tx_side: usize,
645732 base_q_idx: u8,
733+ cfl: Option<(i32, &[i32])>,
646734 ) -> Result<Vec<i32>> {
647735 let skip_ctx = if plane_idx == 0 {
648736 0
@@ -669,7 +757,7 @@ fn read_plane(
669757 full
670758 };
671759 let residual = dequant_and_inverse_typed(&levels, side, 8, i32::from(base_q_idx), tx_type);
672- plane.reconstruct(x, y, side, predict_mode, reach, &residual);
760+ plane.reconstruct(x, y, side, predict_mode, reach, &residual, cfl);
673761 Ok(if tx_side == side {
674762 residual_grid_placeholder(&levels, side)
675763 } else {
@@ -708,7 +796,7 @@ fn decode_block(
708796 ) -> Result<()> {
709797 let (r, c) = at;
710798 let (px, py) = (c * SUB, r * SUB);
711- let (skip, mode) = read_intra_mode(
799+ let (skip, mode, alpha) = read_intra_mode(
712800 dec,
713801 cdfs,
714802 neighbours.above_mode[c],
@@ -722,7 +810,8 @@ fn decode_block(
722810 if skip {
723811 // A skipped block codes no residual syntax at all (spec 5.11.34):
724812 // straight prediction, on every plane.
725- y.reconstruct(px, py, side, mode, reach, &vec![0i32; side * side]);
813+ y.reconstruct(px, py, side, mode, reach, &vec![0i32; side * side], None);
814+ let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side));
726815 u.reconstruct(
727816 cpx,
728817 cpy,
@@ -730,6 +819,7 @@ fn decode_block(
730819 DC_PRED,
731820 Reach::none(),
732821 &vec![0i32; chroma_side * chroma_side],
822+ alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)),
733823 );
734824 v.reconstruct(
735825 cpx,
@@ -738,6 +828,7 @@ fn decode_block(
738828 DC_PRED,
739829 Reach::none(),
740830 &vec![0i32; chroma_side * chroma_side],
831+ alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)),
741832 );
742833 luma_grid = vec![0i32; side * side];
743834 u_grid = vec![0i32; chroma_side * chroma_side];
@@ -746,8 +837,9 @@ fn decode_block(
746837 let around = neighbours.around(at, side);
747838 luma_grid = read_plane(
748839 dec, cdfs, luma_set, scans.0, 0, around[0], mode, mode, reach, y, px, py, side,
749- luma_tx, base_q_idx,
840+ luma_tx, base_q_idx, None,
750841 )?;
842+ let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side));
751843 u_grid = read_plane(
752844 dec,
753845 cdfs,
@@ -764,6 +856,7 @@ fn decode_block(
764856 chroma_side,
765857 chroma_tx,
766858 base_q_idx,
859+ alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)),
767860 )?;
768861 v_grid = read_plane(
769862 dec,
@@ -781,6 +874,7 @@ fn decode_block(
781874 chroma_side,
782875 chroma_tx,
783876 base_q_idx,
877+ alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)),
784878 )?;
785879 }
786880 neighbours.record(at, side, mode, &[luma_grid, u_grid, v_grid]);
@@ -823,15 +917,32 @@ fn decode_leaf8(
823917 // An 8x8 leaf is well within `is_cfl_allowed`'s <=32x32 bound (spec
824918 // 5.11.5), so it reads the CFL-allowed `uv_mode_cfl` CDF, like every other
825919 // `decode_block` caller at 16x16 and up.
826- let (skip, mode) = read_intra_mode(dec, cdfs, above_mode, left_mode, true)?;
920+ let (skip, mode, alpha) = read_intra_mode(dec, cdfs, above_mode, left_mode, true)?;
827921 let (px, py) = (leaf_mi.1 * MI, leaf_mi.0 * MI);
828922 let reach = Reach::of(8, px, py, y.width, y.height);
829923 let (cpx, cpy) = (px / 2, py / 2);
830924 let (luma_grid, u_grid, v_grid);
831925 if skip {
832- y.reconstruct(px, py, 8, mode, reach, &vec![0i32; 64]);
833- u.reconstruct(cpx, cpy, 4, DC_PRED, Reach::none(), &vec![0i32; 16]);
834- v.reconstruct(cpx, cpy, 4, DC_PRED, Reach::none(), &vec![0i32; 16]);
926+ y.reconstruct(px, py, 8, mode, reach, &vec![0i32; 64], None);
927+ let ac = alpha.map(|_| cfl_ac_q3(y, px, py, 8));
928+ u.reconstruct(
929+ cpx,
930+ cpy,
931+ 4,
932+ DC_PRED,
933+ Reach::none(),
934+ &vec![0i32; 16],
935+ alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)),
936+ );
937+ v.reconstruct(
938+ cpx,
939+ cpy,
940+ 4,
941+ DC_PRED,
942+ Reach::none(),
943+ &vec![0i32; 16],
944+ alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)),
945+ );
835946 luma_grid = vec![0i32; 64];
836947 u_grid = vec![0i32; 16];
837948 v_grid = vec![0i32; 16];
@@ -853,7 +964,9 @@ fn decode_leaf8(
853964 8,
854965 TX8,
855966 base_q_idx,
967+ None,
856968 )?;
969+ let ac = alpha.map(|_| cfl_ac_q3(y, px, py, 8));
857970 u_grid = read_plane(
858971 dec,
859972 cdfs,
@@ -870,6 +983,7 @@ fn decode_leaf8(
870983 4,
871984 TX4,
872985 base_q_idx,
986+ alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)),
873987 )?;
874988 v_grid = read_plane(
875989 dec,
@@ -887,6 +1001,7 @@ fn decode_leaf8(
8871001 4,
8881002 TX4,
8891003 base_q_idx,
1004+ alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)),
8901005 )?;
8911006 }
8921007 neighbours.record_mi(leaf_mi, 8, &[luma_grid, u_grid, v_grid]);
@@ -1641,9 +1756,13 @@ fn decode_inter_block(
16411756 }
16421757 }
16431758 let uv_mode = dec.symbol(&mut cdfs.uv_mode_cfl[mode]);
1644- if uv_mode != DC_PRED {
1645- return Err(unsupported("a chroma-from-luma mode (round 2)"));
1646- }
1759+ let alpha = if uv_mode == DC_PRED {
1760+ None
1761+ } else if uv_mode == UV_CFL_PRED {
1762+ Some(read_cfl_alphas(dec, cdfs))
1763+ } else {
1764+ return Err(unsupported("a directional chroma mode (round 2)"));
1765+ };
16471766 mode_for_tx = mode;
16481767 let (mi_row, mi_col) = (r * SUB_MI as usize, c * SUB_MI as usize);
16491768 for dr in 0..side / 4 {
@@ -1664,7 +1783,8 @@ fn decode_inter_block(
16641783
16651784 let reach = Reach::of(side, px, py, y.width, y.height);
16661785 if skip {
1667- y.reconstruct(px, py, side, mode, reach, &vec![0i32; side * side]);
1786+ y.reconstruct(px, py, side, mode, reach, &vec![0i32; side * side], None);
1787+ let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side));
16681788 u.reconstruct(
16691789 cpx,
16701790 cpy,
@@ -1672,6 +1792,7 @@ fn decode_inter_block(
16721792 DC_PRED,
16731793 Reach::none(),
16741794 &vec![0i32; chroma_side * chroma_side],
1795+ alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)),
16751796 );
16761797 v.reconstruct(
16771798 cpx,
@@ -1680,6 +1801,7 @@ fn decode_inter_block(
16801801 DC_PRED,
16811802 Reach::none(),
16821803 &vec![0i32; chroma_side * chroma_side],
1804+ alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)),
16831805 );
16841806 luma_grid = vec![0i32; side * side];
16851807 u_grid = vec![0i32; chroma_side * chroma_side];
@@ -1702,7 +1824,9 @@ fn decode_inter_block(
17021824 side,
17031825 luma_tx,
17041826 base_q_idx,
1827+ None,
17051828 )?;
1829+ let ac = alpha.map(|_| cfl_ac_q3(y, px, py, side));
17061830 u_grid = read_plane(
17071831 dec,
17081832 cdfs,
@@ -1719,6 +1843,7 @@ fn decode_inter_block(
17191843 chroma_side,
17201844 chroma_tx,
17211845 base_q_idx,
1846+ alpha.zip(ac.as_deref()).map(|((au, _), ac)| (au, ac)),
17221847 )?;
17231848 v_grid = read_plane(
17241849 dec,
@@ -1736,6 +1861,7 @@ fn decode_inter_block(
17361861 chroma_side,
17371862 chroma_tx,
17381863 base_q_idx,
1864+ alpha.zip(ac.as_deref()).map(|((_, av), ac)| (av, ac)),
17391865 )?;
17401866 }
17411867 }
crates/ec-av1/src/stream.rsmodified+46 -0
@@ -481,6 +481,52 @@ mod tests {
481481 assert_eq!(frames[0].v, ffmpeg_frames[0].v, "V vs ffmpeg");
482482 }
483483
484+ /// As [`a_real_libaom_gradients_stream_decodes_pixel_exact`], but at
485+ /// 32x32 (below `is_cfl_allowed`'s 32x32 luma bound as a *single*
486+ /// undivided block, spec 5.11.5) rather than 64x64 -- a whole 64x64 SB
487+ /// is never CFL-eligible itself, only its <=32x32 partitions, and
488+ /// `testsrc2`/`gradients` at 64x64 with rect/ab/1to4/angle-delta search
489+ /// disabled reliably pick a whole-SB `PARTITION_NONE` (probed
490+ /// lane-av1real r2), so no fixture at that size exercises CfL at all.
491+ /// A 32x32 frame is exactly the whole-block, CFL-allowed case, and
492+ /// lane-av1real r2 found `gradients` there reliably selects
493+ /// `UV_CFL_PRED` (`uv_mode=13`) across a crf sweep -- `testsrc2` there
494+ /// stays DC. Proves the CfL port this round added, not just DC-chroma
495+ /// decode: pixel-exact against ffmpeg's own decode, not just "decoded".
496+ #[test]
497+ #[ignore = "r2 checkpoint: LUMA (not chroma) decodes near-flat 126-129 where ffmpeg shows a 41-82 gradient on the pinned CfL stream — the remaining bug is upstream of the CfL chroma math this round added; isolate the luma path first (r3)"]
498+ fn a_real_libaom_cfl_stream_decodes_pixel_exact() {
499+ if !have_ffmpeg() {
500+ eprintln!("SKIP a_real_libaom_cfl_stream_decodes_pixel_exact: no ffmpeg");
501+ return;
502+ }
503+ let (width, height) = (32, 32);
504+ let stream = libaom_encode_with(
505+ "gradients=size=32x32:c0=red:c1=blue:c2=green:rate=1:seed=42",
506+ width,
507+ height,
508+ 15,
509+ &[
510+ "-threads",
511+ "1",
512+ "-row-mt",
513+ "0",
514+ "-tile-columns",
515+ "0",
516+ "-tile-rows",
517+ "0",
518+ "-enable-cdef",
519+ "0",
520+ ],
521+ )
522+ .expect("ffmpeg encode");
523+ let frames = decode_stream(&stream).expect("decode_stream on a real libaom stream");
524+ let ffmpeg_frames = ffmpeg_decode_sequence(&stream, width, height, 1);
525+ assert_eq!(frames[0].y, ffmpeg_frames[0].y, "luma vs ffmpeg");
526+ assert_eq!(frames[0].u, ffmpeg_frames[0].u, "U vs ffmpeg");
527+ assert_eq!(frames[0].v, ffmpeg_frames[0].v, "V vs ffmpeg");
528+ }
529+
484530 /// scratch: isolate a pinned mismatching stream's first divergent pixel.
485531 #[test]
486532 #[ignore]