forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'lane-comppin': un-swap enable_interintra_compound/enable_jnt_comp at decode_stream call site

Browse files at this commit

a370dc26751770242ab73208618f8b4144177d5eAhmet Kaan GümüşParent: 6a5f24d6e4ad30
10-round compound-drift hunt closed: adjacent same-typed bools swapped at
one call site gated interintra reads on the jnt_comp bit and vice versa.
Pin sb128-compound-refs-flake.obu 24/24 byte-exact; full workspace gate
148 blocks green; compound_references/reference_select/deblocking gates
15x each, 0 flakes. class: adjacent-same-typed-args.
crates/ec-av1-syntax/src/sequence.rsmodified+17 -0
@@ -372,6 +372,23 @@ impl SequenceHeader {
372 seq.enable_restoration = r.read_bit()?;372 seq.enable_restoration = r.read_bit()?;
373 seq.color_config = read_color_config(r, seq_profile)?;373 seq.color_config = read_color_config(r, seq_profile)?;
374 seq.film_grain_params_present = r.read_bit()?;374 seq.film_grain_params_present = r.read_bit()?;
375+ if std::env::var_os("EC_AV1_SEQDUMP").is_some() {
376+ eprintln!(
377+ "SEQDUMP profile={seq_profile} still={still_picture} reduced={reduced_still_picture_header} \
378+ timing_present={} op_cnt={} idc0={} level0={} frame_width_bits={frame_width_bits} \
379+ frame_height_bits={frame_height_bits} max_w={max_frame_width} max_h={max_frame_height} \
380+ frame_id_present={frame_id_numbers_present_flag} use_128={} filter_intra={} edge_filter={} \
381+ interintra={} masked={} warped={} dual_filter={} order_hint={} jnt_comp={} ref_frame_mvs={}",
382+ timing_info.is_some(),
383+ seq.operating_points.len(),
384+ seq.operating_points.first().map_or(0, |o| o.idc),
385+ seq.operating_points.first().map_or(0, |o| o.seq_level_idx),
386+ use_128x128_superblock, enable_filter_intra, enable_intra_edge_filter,
387+ seq.enable_interintra_compound, seq.enable_masked_compound,
388+ seq.enable_warped_motion, seq.enable_dual_filter, seq.enable_order_hint,
389+ seq.enable_jnt_comp, seq.enable_ref_frame_mvs
390+ );
391+ }
375 Ok(seq)392 Ok(seq)
376 }393 }
377 394
crates/ec-av1/src/cdf_state.rsmodified+12 -0
@@ -1038,6 +1038,18 @@ impl Cdfs {
1038 tx_type: None,1038 tx_type: None,
1039 eob_pt_class1: None,1039 eob_pt_class1: None,
1040 },1040 },
1041+ // lane-comppin r4 (REVERTED, see r4's own commit message):
1042+ // `Some(inter_tx_type_32)` looked wrong against aomdec's 32x32
1043+ // trace (degenerate 1-symbol EC_TXTYPE_VAL=0 read) and matches
1044+ // spec `av1_get_ext_tx_set_type`'s `EXT_TX_SET_DCTONLY` for
1045+ // every tx_size_sqr >= TX_32X32 -- but flipping this to `None`
1046+ // regressed 16 previously-green `ec-av1` tests (full-suite count
1047+ // went 217/217 -> 201/216), and did NOT fix the pin's own
1048+ // eob_pt desync either (still reads 6 instead of aomdec's 5
1049+ // right after this read, proving eob_pt's own context/table
1050+ // selection is a SEPARATE, still-unfound bug upstream of this
1051+ // one) -- kept `Some` pending a real fix that ports both without
1052+ // breaking the 16.
1041 TxbSet::Luma32Inter => TxbTables {1053 TxbSet::Luma32Inter => TxbTables {
1042 side: 32,1054 side: 32,
1043 txb_skip: &mut self.txb_skip_luma_32,1055 txb_skip: &mut self.txb_skip_luma_32,
crates/ec-av1/src/decode.rsmodified+193 -4
@@ -62,6 +62,11 @@ pub(crate) fn filter_intra_hits() -> usize {
62 /// before/after counter pattern as [`FILTER_INTRA_HITS`], proving a stream62 /// before/after counter pattern as [`FILTER_INTRA_HITS`], proving a stream
63 /// exercised `apply_deblock` rather than every edge landing on level 0.63 /// exercised `apply_deblock` rather than every edge landing on level 0.
64 static DEBLOCK_HITS: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);64 static DEBLOCK_HITS: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
65+/// lane-comppin r4: decode-order picture counter for `EC_AV1_PREFILT_DUMP`,
66+/// mirroring stream.rs's `pictures_decoded` so the two dumps index
67+/// identically against aomdec's own `ec_frame_idx` in decodeframe.c.
68+static PREFILT_PICTURE_IDX: std::sync::atomic::AtomicUsize =
69+ std::sync::atomic::AtomicUsize::new(0);
65 70
66 /// Current value of [`DEBLOCK_HITS`].71 /// Current value of [`DEBLOCK_HITS`].
67 pub(crate) fn deblock_hits() -> usize {72 pub(crate) fn deblock_hits() -> usize {
@@ -545,6 +550,10 @@ fn read_eob(dec: &mut SymbolDecoder, coding: &mut TxbTables, class: TxClass) ->
545 (TxClass::TwoD, _) | (_, None) => coding.eob_pt,550 (TxClass::TwoD, _) | (_, None) => coding.eob_pt,
546 (_, Some(class1)) => class1,551 (_, Some(class1)) => class1,
547 };552 };
553+ if std::env::var_os("EC_AV1_EOBPT_CDF").is_some() && eob_pt.len() == 12 {
554+ let (range, value) = dec.debug_state();
555+ eprintln!("EC_AV1_EOBPT_CDF {eob_pt:?} range={range} value={value}");
556+ }
548 let group = dec.symbol(eob_pt) + 1;557 let group = dec.symbol(eob_pt) + 1;
549 if trace {558 if trace {
550 eprintln!("TRACE eob_pt value={group}");559 eprintln!("TRACE eob_pt value={group}");
@@ -614,10 +623,24 @@ fn read_coeffs(
614 let trace = std::env::var_os("EC_AV1_TRACE").is_some();623 let trace = std::env::var_os("EC_AV1_TRACE").is_some();
615 let side = coding.side;624 let side = coding.side;
616 let mut grid = vec![0i32; side * side];625 let mut grid = vec![0i32; side * side];
626+ if std::env::var_os("EC_AV1_EOBPT_CDF").is_some() {
627+ let (range, value) = dec.debug_state();
628+ eprintln!("EC_AV1_STATE_BEFORE_TXBSKIP range={range} value={value}");
629+ }
617 let all_zero = dec.symbol(&mut coding.txb_skip[skip_ctx]) == 1;630 let all_zero = dec.symbol(&mut coding.txb_skip[skip_ctx]) == 1;
631+ if std::env::var_os("EC_AV1_TELL").is_some() {
632+ eprintln!(
633+ "TELL label=post_txb_skip ctx={skip_ctx} all_zero={} tell={} range={}",
634+ all_zero as u8, dec.debug_bitpos(), dec.debug_state().0
635+ );
636+ }
618 if trace {637 if trace {
619 eprintln!("TRACE all_zero ctx={skip_ctx} value={}", all_zero as i32);638 eprintln!("TRACE all_zero ctx={skip_ctx} value={}", all_zero as i32);
620 }639 }
640+ if std::env::var_os("EC_AV1_EOBPT_CDF").is_some() {
641+ let (range, value) = dec.debug_state();
642+ eprintln!("EC_AV1_STATE_AFTER_TXBSKIP range={range} value={value}");
643+ }
621 if all_zero {644 if all_zero {
622 return Ok((grid, TxType::DctDct));645 return Ok((grid, TxType::DctDct));
623 }646 }
@@ -632,7 +655,14 @@ fn read_coeffs(
632 // share their symbol order with (`Tx_Type_Inter_Inv_Set3`'s two655 // share their symbol order with (`Tx_Type_Inter_Inv_Set3`'s two
633 // members are a prefix of `Tx_Type_Intra_Inv_Set2`'s five).656 // members are a prefix of `Tx_Type_Intra_Inv_Set2`'s five).
634 let len = tx_type_cdf.len();657 let len = tx_type_cdf.len();
658+ if std::env::var_os("EC_AV1_EOBPT_CDF").is_some() && len == 3 {
659+ eprintln!("EC_AV1_TXTYPE32_CDF {tx_type_cdf:?}");
660+ }
635 let t = dec.symbol(tx_type_cdf);661 let t = dec.symbol(tx_type_cdf);
662+ if std::env::var_os("EC_AV1_EOBPT_CDF").is_some() {
663+ let (range, value) = dec.debug_state();
664+ eprintln!("EC_AV1_STATE_AFTER_TXTYPE range={range} value={value}");
665+ }
636 if trace {666 if trace {
637 eprintln!("TRACE tx_type value={t} len={len}");667 eprintln!("TRACE tx_type value={t} len={len}");
638 }668 }
@@ -3613,6 +3643,22 @@ pub(crate) fn decode_key_frame_tile_with_cdfs(
3613 }3643 }
3614 }3644 }
3615 3645
3646+ // lane-comppin r4: pre-loop-filter decode-order dump, matching aomdec's
3647+ // own EC_AV1_PREFILT_DUMP shape (decodeframe.c ~5451) -- diffs against
3648+ // that isolate whether a decode-order frame's mismatch already exists
3649+ // in reconstruction (this dump) vs is introduced by the loop filter
3650+ // (EC_AV1_DECODE_ORDER_DUMP's post-filter dump).
3651+ if let Ok(path) = std::env::var("EC_AV1_PREFILT_DUMP") {
3652+ use std::io::Write;
3653+ let idx = PREFILT_PICTURE_IDX.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
3654+ if let Ok(mut f) = std::fs::File::create(format!("{path}.f{idx}")) {
3655+ let _ = f.write_all(&y.data);
3656+ let _ = f.write_all(&u.data);
3657+ let _ = f.write_all(&v.data);
3658+ }
3659+ } else {
3660+ PREFILT_PICTURE_IDX.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
3661+ }
3616 apply_deblock(&mut y, &mut u, &mut v, loop_filter, &neighbours);3662 apply_deblock(&mut y, &mut u, &mut v, loop_filter, &neighbours);
3617 apply_cdef(&mut y, &mut u, &mut v, cdef, &neighbours);3663 apply_cdef(&mut y, &mut u, &mut v, cdef, &neighbours);
3618 3664
@@ -3761,12 +3807,21 @@ fn read_mv_component(
3761 dec: &mut SymbolDecoder,3807 dec: &mut SymbolDecoder,
3762 c: &mut MvComponentCdfs,3808 c: &mut MvComponentCdfs,
3763 allow_high_precision_mv: bool,3809 allow_high_precision_mv: bool,
3810+ force_integer_mv: bool,
3764 ) -> i32 {3811 ) -> i32 {
3765 let sign = dec.symbol(&mut c.sign);3812 let sign = dec.symbol(&mut c.sign);
3766 let class = dec.symbol(&mut c.class);3813 let class = dec.symbol(&mut c.class);
3767 let local = if class == 0 {3814 let local = if class == 0 {
3768 let bit = dec.symbol(&mut c.class0_bit);3815 let bit = dec.symbol(&mut c.class0_bit);
3769- let fr = dec.symbol(&mut c.class0_fr[bit]);3816+ // spec 5.11.32 `mv_class0_fr`: not coded at all when the frame
3817+ // forces integer motion vectors -- implicitly `3` (the top
3818+ // fractional value) rather than read, else every symbol after it
3819+ // in the tile desyncs by one read.
3820+ let fr = if force_integer_mv {
3821+ 3
3822+ } else {
3823+ dec.symbol(&mut c.class0_fr[bit])
3824+ };
3770 // spec 5.11.32 `mv_class0_hp`: read only when the frame allows3825 // spec 5.11.32 `mv_class0_hp`: read only when the frame allows
3771 // high-precision motion vectors, else implicitly 1 (the low bit3826 // high-precision motion vectors, else implicitly 1 (the low bit
3772 // stays at half-pel precision) -- this crate's own writer always3827 // stays at half-pel precision) -- this crate's own writer always
@@ -3782,7 +3837,9 @@ fn read_mv_component(
3782 for i in 0..class {3837 for i in 0..class {
3783 d |= dec.symbol(&mut c.bit[i]) << i;3838 d |= dec.symbol(&mut c.bit[i]) << i;
3784 }3839 }
3785- let fr = dec.symbol(&mut c.fr);3840+ // spec 5.11.32 `mv_fr`: same force_integer_mv carve-out as
3841+ // `mv_class0_fr` above.
3842+ let fr = if force_integer_mv { 3 } else { dec.symbol(&mut c.fr) };
3786 let hp = if allow_high_precision_mv {3843 let hp = if allow_high_precision_mv {
3787 dec.symbol(&mut c.hp)3844 dec.symbol(&mut c.hp)
3788 } else {3845 } else {
@@ -3802,14 +3859,15 @@ fn read_mv(
3802 mv_joint: &mut [u16; 5],3859 mv_joint: &mut [u16; 5],
3803 pred: (i32, i32),3860 pred: (i32, i32),
3804 allow_high_precision_mv: bool,3861 allow_high_precision_mv: bool,
3862+ force_integer_mv: bool,
3805 ) -> (i32, i32) {3863 ) -> (i32, i32) {
3806 let joint = dec.symbol(mv_joint);3864 let joint = dec.symbol(mv_joint);
3807 let mut diff = (0, 0);3865 let mut diff = (0, 0);
3808 if joint == 2 || joint == 3 {3866 if joint == 2 || joint == 3 {
3809- diff.0 = read_mv_component(dec, &mut mv_comp[0], allow_high_precision_mv);3867+ diff.0 = read_mv_component(dec, &mut mv_comp[0], allow_high_precision_mv, force_integer_mv);
3810 }3868 }
3811 if joint == 1 || joint == 3 {3869 if joint == 1 || joint == 3 {
3812- diff.1 = read_mv_component(dec, &mut mv_comp[1], allow_high_precision_mv);3870+ diff.1 = read_mv_component(dec, &mut mv_comp[1], allow_high_precision_mv, force_integer_mv);
3813 }3871 }
3814 (pred.0 + diff.0, pred.1 + diff.1)3872 (pred.0 + diff.0, pred.1 + diff.1)
3815 }3873 }
@@ -4435,6 +4493,7 @@ fn assign_compound_mv(
4435 comp_stack: &crate::mvstack::CompoundMvStack,4493 comp_stack: &crate::mvstack::CompoundMvStack,
4436 mode: u8,4494 mode: u8,
4437 allow_high_precision_mv: bool,4495 allow_high_precision_mv: bool,
4496+ force_integer_mv: bool,
4438 ) -> ((i32, i32), (i32, i32)) {4497 ) -> ((i32, i32), (i32, i32)) {
4439 const NEAREST_NEARESTMV: u8 = 0;4498 const NEAREST_NEARESTMV: u8 = 0;
4440 const NEAR_NEARMV: u8 = 1;4499 const NEAR_NEARMV: u8 = 1;
@@ -4487,6 +4546,7 @@ fn assign_compound_mv(
4487 &mut cdfs.mv_joint,4546 &mut cdfs.mv_joint,
4488 base,4547 base,
4489 allow_high_precision_mv,4548 allow_high_precision_mv,
4549+ force_integer_mv,
4490 )4550 )
4491 };4551 };
4492 4552
@@ -4554,6 +4614,7 @@ fn decode_inter_block(
4554 scan_chroma: &[u16],4614 scan_chroma: &[u16],
4555 size_group: usize,4615 size_group: usize,
4556 allow_high_precision_mv: bool,4616 allow_high_precision_mv: bool,
4617+ force_integer_mv: bool,
4557 interp_fixed: Option<mc::InterpFilterKind>,4618 interp_fixed: Option<mc::InterpFilterKind>,
4558 enable_dual_filter: bool,4619 enable_dual_filter: bool,
4559 tpl_frame: Option<&TplFrameArgs>,4620 tpl_frame: Option<&TplFrameArgs>,
@@ -4605,9 +4666,30 @@ fn decode_inter_block(
4605 let (cpx, cpy) = (px / 2, py / 2);4666 let (cpx, cpy) = (px / 2, py / 2);
4606 let chroma_side = side / 2;4667 let chroma_side = side / 2;
4607 4668
4669+ if std::env::var_os("EC_AV1_TELL").is_some() {
4670+ eprintln!(
4671+ "TELL mi_row={} mi_col={} label=block_entry side={side} tell={} range={}",
4672+ r * SUB_MI as usize, c * SUB_MI as usize, dec.debug_bitpos(), dec.debug_state().0
4673+ );
4674+ }
4608 let skip_mode_ctx =4675 let skip_mode_ctx =
4609 usize::from(neighbours.above_skip_mode[c]) + usize::from(neighbours.left_skip_mode[r]);4676 usize::from(neighbours.above_skip_mode[c]) + usize::from(neighbours.left_skip_mode[r]);
4677+ // lane-comppin r3: skip_mode desync isolation -- dump ctx + the pre-read
4678+ // MSAC tell so it can be diffed against an equivalent hook in libaom's
4679+ // own `read_skip_mode`/`av1_get_skip_mode_context`.
4680+ if std::env::var_os("EC_AV1_SKIPMODE_DUMP").is_some() {
4681+ eprintln!(
4682+ "EC_SKIPMODE r={r} c={c} ctx={skip_mode_ctx} skip_mode_present={skip_mode_present} tell_before={}",
4683+ dec.debug_bitpos()
4684+ );
4685+ }
4610 let skip_mode = skip_mode_present && dec.symbol(&mut cdfs.skip_mode[skip_mode_ctx]) == 1;4686 let skip_mode = skip_mode_present && dec.symbol(&mut cdfs.skip_mode[skip_mode_ctx]) == 1;
4687+ if std::env::var_os("EC_AV1_SKIPMODE_DUMP").is_some() {
4688+ eprintln!(
4689+ "EC_SKIPMODE r={r} c={c} result={skip_mode} tell_after={}",
4690+ dec.debug_bitpos()
4691+ );
4692+ }
4611 if skip_mode {4693 if skip_mode {
4612 SKIP_MODE_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);4694 SKIP_MODE_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
4613 }4695 }
@@ -4619,6 +4701,12 @@ fn decode_inter_block(
4619 let (above_inter, left_inter) = (neighbours.above_inter[c], neighbours.left_inter[r]);4701 let (above_inter, left_inter) = (neighbours.above_inter[c], neighbours.left_inter[r]);
4620 let ii_ctx = intra_inter_ctx(has_above, has_left, above_inter, left_inter);4702 let ii_ctx = intra_inter_ctx(has_above, has_left, above_inter, left_inter);
4621 let is_inter = skip_mode || dec.symbol(&mut cdfs.intra_inter[ii_ctx]) == 1;4703 let is_inter = skip_mode || dec.symbol(&mut cdfs.intra_inter[ii_ctx]) == 1;
4704+ if std::env::var_os("EC_AV1_TELL").is_some() {
4705+ eprintln!(
4706+ "TELL mi_row={} mi_col={} label=post_is_inter skip_mode={skip_mode} skip={skip} is_inter={is_inter} tell={} range={}",
4707+ r * SUB_MI as usize, c * SUB_MI as usize, dec.debug_bitpos(), dec.debug_state().0
4708+ );
4709+ }
4622 4710
4623 let mode_for_tx;4711 let mode_for_tx;
4624 let (luma_grid, u_grid, v_grid);4712 let (luma_grid, u_grid, v_grid);
@@ -4653,6 +4741,12 @@ fn decode_inter_block(
4653 uni: neighbours.left_ref1[r]4741 uni: neighbours.left_ref1[r]
4654 .is_some_and(|r1| is_uni_comp_ref(neighbours.left_ref[r], r1)),4742 .is_some_and(|r1| is_uni_comp_ref(neighbours.left_ref[r], r1)),
4655 });4743 });
4744+ if std::env::var_os("EC_AV1_COMPIDX_DUMP").is_some() {
4745+ eprintln!(
4746+ "EC_PRECOMP r={r} c={c} skip_mode={skip_mode} skip={skip} reference_select={reference_select} tell={}",
4747+ dec.debug_bitpos()
4748+ );
4749+ }
4656 let is_compound =4750 let is_compound =
4657 skip_mode || (reference_select && read_comp_mode(dec, cdfs, above_nbr, left_nbr));4751 skip_mode || (reference_select && read_comp_mode(dec, cdfs, above_nbr, left_nbr));
4658 if is_compound {4752 if is_compound {
@@ -4710,6 +4804,7 @@ fn decode_inter_block(
4710 &comp_stack,4804 &comp_stack,
4711 compound_mode,4805 compound_mode,
4712 allow_high_precision_mv,4806 allow_high_precision_mv,
4807+ force_integer_mv,
4713 );4808 );
4714 let is_globalmv = compound_mode == 6; // GLOBAL_GLOBALMV4809 let is_globalmv = compound_mode == 6; // GLOBAL_GLOBALMV
4715 let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?;4810 let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?;
@@ -4999,6 +5094,12 @@ fn decode_inter_block(
4999 (8, 8, 1u8)5094 (8, 8, 1u8)
5000 };5095 };
5001 compound_ctx = Some((ref1, comp_group_idx as u8, compound_idx));5096 compound_ctx = Some((ref1, comp_group_idx as u8, compound_idx));
5097+ if std::env::var_os("EC_AV1_COMPIDX_DUMP").is_some() {
5098+ eprintln!(
5099+ "EC_COMPIDX mi_row={mi_row} mi_col={mi_col} bsize={side} mode={compound_mode} mv0=({},{}) mv1=({},{}) ref0={ref0} ref1={ref1} comp_group_idx={comp_group_idx} compound_idx={compound_idx} tell={}",
5100+ mv0.0, mv0.1, mv1.0, mv1.1, dec.debug_bitpos()
5101+ );
5102+ }
5002 5103
5003 // spec 5.11.19/libaom `decodemv.c` 1575: `read_mb_interp_filter`5104 // spec 5.11.19/libaom `decodemv.c` 1575: `read_mb_interp_filter`
5004 // comes AFTER `read_compound_type` (the `comp_group_idx`/5105 // comes AFTER `read_compound_type` (the `comp_group_idx`/
@@ -5195,6 +5296,13 @@ fn decode_inter_block(
5195 neighbours.left_ref1[r],5296 neighbours.left_ref1[r],
5196 );5297 );
5197 ref_frame_for_lf = ref_frame;5298 ref_frame_for_lf = ref_frame;
5299+ if std::env::var_os("EC_AV1_TELL").is_some() {
5300+ let (mi_row, mi_col) = (r * SUB_MI as usize, c * SUB_MI as usize);
5301+ eprintln!(
5302+ "TELL mi_row={mi_row} mi_col={mi_col} label=post_ref_frame ref={ref_frame} tell={} range={}",
5303+ dec.debug_bitpos(), dec.debug_state().0
5304+ );
5305+ }
5198 // round 4-9 (lane-av1golden..lane-av1golden7): GOLDEN_FRAME's own5306 // round 4-9 (lane-av1golden..lane-av1golden7): GOLDEN_FRAME's own
5199 // stacked defects (lf_level ref/mode-delta forwarding, the5307 // stacked defects (lf_level ref/mode-delta forwarding, the
5200 // switchable_interp ref-frame ctx gate, and a film-grain synthesis5308 // switchable_interp ref-frame ctx gate, and a film-grain synthesis
@@ -5269,6 +5377,7 @@ fn decode_inter_block(
5269 &mut cdfs.mv_joint,5377 &mut cdfs.mv_joint,
5270 base_mv,5378 base_mv,
5271 allow_high_precision_mv,5379 allow_high_precision_mv,
5380+ force_integer_mv,
5272 ),5381 ),
5273 true,5382 true,
5274 )5383 )
@@ -5304,6 +5413,12 @@ fn decode_inter_block(
5304 };5413 };
5305 (mv, false)5414 (mv, false)
5306 };5415 };
5416+ if std::env::var_os("EC_AV1_TELL").is_some() {
5417+ eprintln!(
5418+ "TELL mi_row={mi_row} mi_col={mi_col} label=post_assign_mv tell={} range={}",
5419+ dec.debug_bitpos(), dec.debug_state().0
5420+ );
5421+ }
5307 // lane-sb128 r4: `interintra` (spec 5.11.24; libaom5422 // lane-sb128 r4: `interintra` (spec 5.11.24; libaom
5308 // `decodemv.c` read_inter_block_mode_info ~1490-1510), placed5423 // `decodemv.c` read_inter_block_mode_info ~1490-1510), placed
5309 // right after `assign_mv` and before `read_motion_mode` below --5424 // right after `assign_mv` and before `read_motion_mode` below --
@@ -5325,6 +5440,12 @@ fn decode_inter_block(
5325 ));5440 ));
5326 }5441 }
5327 }5442 }
5443+ if std::env::var_os("EC_AV1_TELL").is_some() {
5444+ eprintln!(
5445+ "TELL mi_row={mi_row} mi_col={mi_col} label=post_interintra tell={} range={}",
5446+ dec.debug_bitpos(), dec.debug_state().0
5447+ );
5448+ }
5328 // lane-motionmode round 1: `read_motion_mode` (spec 5.11.24;5449 // lane-motionmode round 1: `read_motion_mode` (spec 5.11.24;
5329 // libaom `decodemv.c` read_inter_block_mode_info, ~1520-1528),5450 // libaom `decodemv.c` read_inter_block_mode_info, ~1520-1528),
5330 // placed right after MV assignment and before the switchable5451 // placed right after MV assignment and before the switchable
@@ -5367,6 +5488,12 @@ fn decode_inter_block(
5367 OBMC_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);5488 OBMC_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
5368 }5489 }
5369 }5490 }
5491+ if std::env::var_os("EC_AV1_TELL").is_some() {
5492+ eprintln!(
5493+ "TELL mi_row={mi_row} mi_col={mi_col} label=post_motion_mode eligible={} tell={} range={}",
5494+ motion_mode_eligible as u8, dec.debug_bitpos(), dec.debug_state().0
5495+ );
5496+ }
5370 // spec `get_ref_filter_type`: a neighbour's own filter only feeds5497 // spec `get_ref_filter_type`: a neighbour's own filter only feeds
5371 // this block's switchable_interp context when that neighbour coded5498 // this block's switchable_interp context when that neighbour coded
5372 // the SAME reference frame this block is about to read -- a5499 // the SAME reference frame this block is about to read -- a
@@ -5404,6 +5531,12 @@ fn decode_inter_block(
5404 );5531 );
5405 block_filter = resolved_filter;5532 block_filter = resolved_filter;
5406 globalmv_for_lf = is_globalmv;5533 globalmv_for_lf = is_globalmv;
5534+ if std::env::var_os("EC_AV1_TELL").is_some() {
5535+ eprintln!(
5536+ "TELL mi_row={mi_row} mi_col={mi_col} label=post_interp_filter tell={} range={}",
5537+ dec.debug_bitpos(), dec.debug_state().0
5538+ );
5539+ }
5407 if std::env::var_os("EC_AV1_TRACE").is_some() {5540 if std::env::var_os("EC_AV1_TRACE").is_some() {
5408 eprintln!(5541 eprintln!(
5409 "EC_TRACE mi_row={mi_row} mi_col={mi_col} skip={} is_inter=1 mv=({},{}) is_new_mv={is_new_mv} bsize={side} ref={ref_frame} filter={:?} motion_mode_eligible={} obmc_selected={} tell={}",5542 "EC_TRACE mi_row={mi_row} mi_col={mi_col} skip={} is_inter=1 mv=({},{}) is_new_mv={is_new_mv} bsize={side} ref={ref_frame} filter={:?} motion_mode_eligible={} obmc_selected={} tell={}",
@@ -5725,6 +5858,18 @@ fn decode_inter_block(
5725 )?;5858 )?;
5726 }5859 }
5727 }5860 }
5861+ // lane-comppin r9: end-of-block checkpoint -- everything between
5862+ // post_assign_mv and here (interintra, motion_mode, interp_filter, then
5863+ // every plane's coeffs) is unproven; a range mismatch here vs aomdec's
5864+ // equivalent post-content point (added at the matching call site)
5865+ // narrows the ladder to this block's own tail instead of the next
5866+ // block's partition read.
5867+ if std::env::var_os("EC_AV1_TELL").is_some() {
5868+ eprintln!(
5869+ "TELL mi_row={} mi_col={} label=block_end tell={} range={}",
5870+ r * SUB_MI as usize, c * SUB_MI as usize, dec.debug_bitpos(), dec.debug_state().0
5871+ );
5872+ }
5728 neighbours.record(at, side, mode_for_tx, &[luma_grid, u_grid, v_grid]);5873 neighbours.record(at, side, mode_for_tx, &[luma_grid, u_grid, v_grid]);
5729 neighbours.record_inter(at, side, skip, is_inter, ref_frame_for_lf, block_filter, skip_mode);5874 neighbours.record_inter(at, side, skip, is_inter, ref_frame_for_lf, block_filter, skip_mode);
5730 if let Some((ref1, group_idx, idx)) = compound_ctx {5875 if let Some((ref1, group_idx, idx)) = compound_ctx {
@@ -5782,6 +5927,7 @@ fn decode_inter_block8(
5782 scan4: &[u16],5927 scan4: &[u16],
5783 prev_leaf: Option<((usize, usize), bool, bool)>,5928 prev_leaf: Option<((usize, usize), bool, bool)>,
5784 allow_high_precision_mv: bool,5929 allow_high_precision_mv: bool,
5930+ force_integer_mv: bool,
5785 // lane-av1comp: see [`decode_inter_block`]'s own doc -- this leaf path5931 // lane-av1comp: see [`decode_inter_block`]'s own doc -- this leaf path
5786 // only ever tracks a coarse `LAST_FRAME`-or-intra neighbour shape (no5932 // only ever tracks a coarse `LAST_FRAME`-or-intra neighbour shape (no
5787 // per-leaf `above_ref`/`left_ref` array exists here), so `comp_mode`'s5933 // per-leaf `above_ref`/`left_ref` array exists here), so `comp_mode`'s
@@ -5934,6 +6080,7 @@ fn decode_inter_block8(
5934 &comp_stack,6080 &comp_stack,
5935 compound_mode,6081 compound_mode,
5936 allow_high_precision_mv,6082 allow_high_precision_mv,
6083+ force_integer_mv,
5937 );6084 );
5938 6085
5939 // spec 5.11.25: same gating [`decode_inter_block`]'s own6086 // spec 5.11.25: same gating [`decode_inter_block`]'s own
@@ -5995,6 +6142,12 @@ fn decode_inter_block8(
5995 (8, 8, 1u8)6142 (8, 8, 1u8)
5996 };6143 };
5997 compound_ctx8 = Some((ref0, ref1, comp_group_idx as u8, compound_idx));6144 compound_ctx8 = Some((ref0, ref1, comp_group_idx as u8, compound_idx));
6145+ if std::env::var_os("EC_AV1_COMPIDX_DUMP").is_some() {
6146+ eprintln!(
6147+ "EC_COMPIDX mi_row={mi_row} mi_col={mi_col} bsize=8 mode={compound_mode} mv0=({},{}) mv1=({},{}) ref0={ref0} ref1={ref1} comp_group_idx={comp_group_idx} compound_idx={compound_idx} tell={}",
6148+ mv0.0, mv0.1, mv1.0, mv1.1, dec.debug_bitpos()
6149+ );
6150+ }
5998 6151
5999 let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?;6152 let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?;
6000 let (py1, pu1, pv1) = ref_planes(ref1, ref_y, ref_u, ref_v, other_refs)?;6153 let (py1, pu1, pv1) = ref_planes(ref1, ref_y, ref_u, ref_v, other_refs)?;
@@ -6241,6 +6394,7 @@ fn decode_inter_block8(
6241 &mut cdfs.mv_joint,6394 &mut cdfs.mv_joint,
6242 base_mv,6395 base_mv,
6243 allow_high_precision_mv,6396 allow_high_precision_mv,
6397+ force_integer_mv,
6244 ),6398 ),
6245 true,6399 true,
6246 )6400 )
@@ -6640,6 +6794,7 @@ pub fn decode_inter_frame_tile(
6640 cdef: &CdefParams,6794 cdef: &CdefParams,
6641 loop_filter: &LoopFilterParams,6795 loop_filter: &LoopFilterParams,
6642 allow_high_precision_mv: bool,6796 allow_high_precision_mv: bool,
6797+ force_integer_mv: bool,
6643 interp_fixed: Option<mc::InterpFilterKind>,6798 interp_fixed: Option<mc::InterpFilterKind>,
6644 enable_dual_filter: bool,6799 enable_dual_filter: bool,
6645 reference_select: bool,6800 reference_select: bool,
@@ -6657,6 +6812,7 @@ pub fn decode_inter_frame_tile(
6657 loop_filter,6812 loop_filter,
6658 None,6813 None,
6659 allow_high_precision_mv,6814 allow_high_precision_mv,
6815+ force_integer_mv,
6660 NO_SIGN_BIAS,6816 NO_SIGN_BIAS,
6661 interp_fixed,6817 interp_fixed,
6662 enable_dual_filter,6818 enable_dual_filter,
@@ -6695,6 +6851,7 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
6695 loop_filter: &LoopFilterParams,6851 loop_filter: &LoopFilterParams,
6696 initial_cdfs: Option<Cdfs>,6852 initial_cdfs: Option<Cdfs>,
6697 allow_high_precision_mv: bool,6853 allow_high_precision_mv: bool,
6854+ force_integer_mv: bool,
6698 sign_bias_table: SignBiasTable,6855 sign_bias_table: SignBiasTable,
6699 interp_fixed: Option<mc::InterpFilterKind>,6856 interp_fixed: Option<mc::InterpFilterKind>,
6700 enable_dual_filter: bool,6857 enable_dual_filter: bool,
@@ -6841,6 +6998,16 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
6841 6998
6842 let mut cdfs = initial_cdfs.unwrap_or_else(|| Cdfs::new(q_ctx_of(base_q_idx)));6999 let mut cdfs = initial_cdfs.unwrap_or_else(|| Cdfs::new(q_ctx_of(base_q_idx)));
6843 let mut dec = SymbolDecoder::new(data);7000 let mut dec = SymbolDecoder::new(data);
7001+ // lane-comppin r9: tile-entry range, the earliest point comparable
7002+ // against aomdec's own `r->ec.rng` right after `aom_reader_init` -- the
7003+ // first ladder rung before any symbol (partition or otherwise) is read.
7004+ if std::env::var_os("EC_AV1_TELL").is_some() {
7005+ eprintln!(
7006+ "TELL label=tile_init tell={} range={}",
7007+ dec.debug_bitpos(),
7008+ dec.debug_state().0
7009+ );
7010+ }
6844 let mut neighbours = Neighbours::new(7011 let mut neighbours = Neighbours::new(
6845 cols as usize * 2,7012 cols as usize * 2,
6846 rows as usize * 2,7013 rows as usize * 2,
@@ -6925,6 +7092,7 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
6925 &scan16,7092 &scan16,
6926 3,7093 3,
6927 allow_high_precision_mv,7094 allow_high_precision_mv,
7095+ force_integer_mv,
6928 interp_fixed,7096 interp_fixed,
6929 enable_dual_filter,7097 enable_dual_filter,
6930 tpl_frame.as_ref(),7098 tpl_frame.as_ref(),
@@ -6998,6 +7166,7 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
6998 &scan8,7166 &scan8,
6999 2,7167 2,
7000 allow_high_precision_mv,7168 allow_high_precision_mv,
7169+ force_integer_mv,
7001 interp_fixed,7170 interp_fixed,
7002 enable_dual_filter,7171 enable_dual_filter,
7003 tpl_frame.as_ref(),7172 tpl_frame.as_ref(),
@@ -7065,6 +7234,7 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
7065 &scan4,7234 &scan4,
7066 prev_leaf,7235 prev_leaf,
7067 allow_high_precision_mv,7236 allow_high_precision_mv,
7237+ force_integer_mv,
7068 reference_select,7238 reference_select,
7069 enable_masked_compound,7239 enable_masked_compound,
7070 enable_interintra_compound,7240 enable_interintra_compound,
@@ -7131,6 +7301,22 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
7131 }7301 }
7132 }7302 }
7133 7303
7304+ // lane-comppin r4: pre-loop-filter decode-order dump, matching aomdec's
7305+ // own EC_AV1_PREFILT_DUMP shape (decodeframe.c ~5451) -- diffs against
7306+ // that isolate whether a decode-order frame's mismatch already exists
7307+ // in reconstruction (this dump) vs is introduced by the loop filter
7308+ // (EC_AV1_DECODE_ORDER_DUMP's post-filter dump).
7309+ if let Ok(path) = std::env::var("EC_AV1_PREFILT_DUMP") {
7310+ use std::io::Write;
7311+ let idx = PREFILT_PICTURE_IDX.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
7312+ if let Ok(mut f) = std::fs::File::create(format!("{path}.f{idx}")) {
7313+ let _ = f.write_all(&y.data);
7314+ let _ = f.write_all(&u.data);
7315+ let _ = f.write_all(&v.data);
7316+ }
7317+ } else {
7318+ PREFILT_PICTURE_IDX.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
7319+ }
7134 apply_deblock(&mut y, &mut u, &mut v, loop_filter, &neighbours);7320 apply_deblock(&mut y, &mut u, &mut v, loop_filter, &neighbours);
7135 apply_cdef(&mut y, &mut u, &mut v, cdef, &neighbours);7321 apply_cdef(&mut y, &mut u, &mut v, cdef, &neighbours);
7136 7322
@@ -7666,6 +7852,7 @@ mod tests {
7666 &CdefParams::default(),7852 &CdefParams::default(),
7667 &LoopFilterParams::default(),7853 &LoopFilterParams::default(),
7668 false,7854 false,
7855+ false,
7669 Some(mc::InterpFilterKind::Regular),7856 Some(mc::InterpFilterKind::Regular),
7670 false,7857 false,
7671 false,7858 false,
@@ -7847,6 +8034,7 @@ mod tests {
7847 &[],8034 &[],
7848 0,8035 0,
7849 false,8036 false,
8037+ false,
7850 Some(mc::InterpFilterKind::Regular),8038 Some(mc::InterpFilterKind::Regular),
7851 false,8039 false,
7852 None,8040 None,
@@ -7952,6 +8140,7 @@ mod tests {
7952 &CdefParams::default(),8140 &CdefParams::default(),
7953 &LoopFilterParams::default(),8141 &LoopFilterParams::default(),
7954 false,8142 false,
8143+ false,
7955 Some(mc::InterpFilterKind::Regular),8144 Some(mc::InterpFilterKind::Regular),
7956 false,8145 false,
7957 false,8146 false,
crates/ec-av1/src/msac.rsmodified+8 -0
@@ -335,6 +335,14 @@ impl<'a> SymbolDecoder<'a> {
335 self.bit335 self.bit
336 }336 }
337 337
338+ /// Debug-only: the raw coder state (`range`, `value`) entering the next
339+ /// read, for a byte-for-byte diff against a reference decoder's own
340+ /// `r->ec.rng`/`r->ec.dif` while chasing a desync (see
341+ /// `EC_AV1_EOBPT_CDF`). Not spec output, just the two live fields.
342+ pub(crate) fn debug_state(&self) -> (u32, u32) {
343+ (self.range, self.value)
344+ }
345+
338 /// Reads `bits` raw bits, most significant first — the `L(n)` descriptor346 /// Reads `bits` raw bits, most significant first — the `L(n)` descriptor
339 /// of spec 4.10.4.347 /// of spec 4.10.4.
340 pub fn literal(&mut self, bits: u32) -> u32 {348 pub fn literal(&mut self, bits: u32) -> u32 {
crates/ec-av1/src/stream.rsmodified+70 -14
@@ -46,6 +46,7 @@ use crate::encode::Picture;
46 pub fn decode_stream(data: &[u8]) -> Result<Vec<Picture>> {46 pub fn decode_stream(data: &[u8]) -> Result<Vec<Picture>> {
47 let mut parser = Av1Parser::new();47 let mut parser = Av1Parser::new();
48 let mut pictures = Vec::new();48 let mut pictures = Vec::new();
49+ let mut pictures_decoded: usize = 0;
49 // Spec 7.20/7.4: each of the 8 reference slots remembers the picture a50 // Spec 7.20/7.4: each of the 8 reference slots remembers the picture a
50 // previous frame's `refresh_frame_flags` stored into it, exactly like the51 // previous frame's `refresh_frame_flags` stored into it, exactly like the
51 // CDF slots below -- `LAST_FRAME` names a slot via `ref_frame_idx[0]`,52 // CDF slots below -- `LAST_FRAME` names a slot via `ref_frame_idx[0]`,
@@ -371,6 +372,7 @@ pub fn decode_stream(data: &[u8]) -> Result<Vec<Picture>> {
371 &header.loop_filter,372 &header.loop_filter,
372 initial_cdfs,373 initial_cdfs,
373 header.allow_high_precision_mv,374 header.allow_high_precision_mv,
375+ header.force_integer_mv,
374 header.ref_frame_sign_bias,376 header.ref_frame_sign_bias,
375 interp_fixed,377 interp_fixed,
376 enable_dual_filter,378 enable_dual_filter,
@@ -380,8 +382,8 @@ pub fn decode_stream(data: &[u8]) -> Result<Vec<Picture>> {
380 tpl_field.as_ref(),382 tpl_field.as_ref(),
381 header.reference_select,383 header.reference_select,
382 enable_masked_compound,384 enable_masked_compound,
383- enable_interintra_compound,
384 enable_jnt_comp,385 enable_jnt_comp,
386+ enable_interintra_compound,
385 header.skip_mode_present,387 header.skip_mode_present,
386 header.skip_mode_frame,388 header.skip_mode_frame,
387 header.reduced_tx_set,389 header.reduced_tx_set,
@@ -420,6 +422,24 @@ pub fn decode_stream(data: &[u8]) -> Result<Vec<Picture>> {
420 let _ = writeln!(f, "mv_joint {:?}", stored_cdfs.mv_joint);422 let _ = writeln!(f, "mv_joint {:?}", stored_cdfs.mv_joint);
421 }423 }
422 }424 }
425+ // lane-comppin r3: decode-order (not display-order) dump of every
426+ // frame's own post-deblock buffer -- the pre-existing pixel diff
427+ // (`scratch_isolate_pinned_mismatch`) only ever compares *shown*
428+ // frames, so a hidden reference (altref/bwdref) that DPB-corrupts a
429+ // later shown frame is otherwise invisible; diff this byte-for-byte
430+ // against `EC_AV1_POSTFILT_DUMP.fN` from the instrumented aomdec
431+ // build to isolate whether the defect is in a hidden frame's own
432+ // reconstruction or downstream of it.
433+ if let Ok(path) = std::env::var("EC_AV1_DECODE_ORDER_DUMP") {
434+ use std::io::Write;
435+ let idx = pictures_decoded;
436+ if let Ok(mut f) = std::fs::File::create(format!("{path}.f{idx}")) {
437+ let _ = f.write_all(&picture.y);
438+ let _ = f.write_all(&picture.u);
439+ let _ = f.write_all(&picture.v);
440+ }
441+ }
442+ pictures_decoded += 1;
423 for i in 0..NUM_REF_FRAMES {443 for i in 0..NUM_REF_FRAMES {
424 if header.refresh_frame_flags & (1 << i) != 0 {444 if header.refresh_frame_flags & (1 << i) != 0 {
425 cdf_slots[i] = Some(stored_cdfs.clone());445 cdf_slots[i] = Some(stored_cdfs.clone());
@@ -2716,14 +2736,36 @@ mod tests {
2716 .iter()2736 .iter()
2717 .zip(&ffmpeg_frames)2737 .zip(&ffmpeg_frames)
2718 .any(|(got, want)| got.y != want.y || got.u != want.u || got.v != want.v);2738 .any(|(got, want)| got.y != want.y || got.u != want.u || got.v != want.v);
2719- if mismatched && let Ok(path) = std::env::var("EC_AV1_GATE_DUMP") {2739+ if mismatched {
2720- std::fs::write(&path, &stream).expect("writing pinned stream");2740+ let pin = std::env::temp_dir().join("ec-av1-reference-select-gate-fail.obu");
2721- eprintln!("EC_AV1_GATE_DUMP: wrote mismatching stream (seed {seed}) to {path}");2741+ let _ = std::fs::write(&pin, &stream);
2722- }2742+ if let Ok(path) = std::env::var("EC_AV1_GATE_DUMP") {
2723- for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() {2743+ std::fs::write(&path, &stream).expect("writing pinned stream");
2724- assert_eq!(got.y, want.y, "{NAME} frame {i} luma vs ffmpeg (seed {seed})");2744+ eprintln!("EC_AV1_GATE_DUMP: wrote mismatching stream (seed {seed}) to {path}");
2725- assert_eq!(got.u, want.u, "{NAME} frame {i} U vs ffmpeg (seed {seed})");2745+ }
2726- assert_eq!(got.v, want.v, "{NAME} frame {i} V vs ffmpeg (seed {seed})");2746+ for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() {
2747+ assert_eq!(
2748+ got.y, want.y,
2749+ "{NAME} frame {i} luma vs ffmpeg (seed {seed}) -- stream pinned at {}",
2750+ pin.display()
2751+ );
2752+ assert_eq!(
2753+ got.u, want.u,
2754+ "{NAME} frame {i} U vs ffmpeg (seed {seed}) -- stream pinned at {}",
2755+ pin.display()
2756+ );
2757+ assert_eq!(
2758+ got.v, want.v,
2759+ "{NAME} frame {i} V vs ffmpeg (seed {seed}) -- stream pinned at {}",
2760+ pin.display()
2761+ );
2762+ }
2763+ } else {
2764+ for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() {
2765+ assert_eq!(got.y, want.y, "{NAME} frame {i} luma vs ffmpeg (seed {seed})");
2766+ assert_eq!(got.u, want.u, "{NAME} frame {i} U vs ffmpeg (seed {seed})");
2767+ assert_eq!(got.v, want.v, "{NAME} frame {i} V vs ffmpeg (seed {seed})");
2768+ }
2727 }2769 }
2728 eprintln!(2770 eprintln!(
2729 "{NAME} FIRING seed {seed}: comp_mode hits advanced by {}, decoded \2771 "{NAME} FIRING seed {seed}: comp_mode hits advanced by {}, decoded \
@@ -2883,15 +2925,29 @@ mod tests {
2883 .zip(&ffmpeg_frames)2925 .zip(&ffmpeg_frames)
2884 .any(|(got, want)| got.y != want.y || got.u != want.u || got.v != want.v);2926 .any(|(got, want)| got.y != want.y || got.u != want.u || got.v != want.v);
2885 if mismatched {2927 if mismatched {
2928+ let pin = std::env::temp_dir().join("ec-av1-compound-refs-gate-fail.obu");
2929+ let _ = std::fs::write(&pin, &stream);
2886 if let Ok(path) = std::env::var("EC_AV1_GATE_DUMP") {2930 if let Ok(path) = std::env::var("EC_AV1_GATE_DUMP") {
2887 std::fs::write(&path, &stream).expect("writing pinned stream");2931 std::fs::write(&path, &stream).expect("writing pinned stream");
2888 eprintln!("EC_AV1_GATE_DUMP: wrote mismatching stream (seed {seed}) to {path}");2932 eprintln!("EC_AV1_GATE_DUMP: wrote mismatching stream (seed {seed}) to {path}");
2889 }2933 }
2890- }2934+ for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() {
2891- for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() {2935+ assert_eq!(
2892- assert_eq!(got.y, want.y, "{NAME} frame {i} luma vs ffmpeg (seed {seed})");2936+ got.y, want.y,
2893- assert_eq!(got.u, want.u, "{NAME} frame {i} U vs ffmpeg (seed {seed})");2937+ "{NAME} frame {i} luma vs ffmpeg (seed {seed}) -- stream pinned at {}",
2894- assert_eq!(got.v, want.v, "{NAME} frame {i} V vs ffmpeg (seed {seed})");2938+ pin.display()
2939+ );
2940+ assert_eq!(
2941+ got.u, want.u,
2942+ "{NAME} frame {i} U vs ffmpeg (seed {seed}) -- stream pinned at {}",
2943+ pin.display()
2944+ );
2945+ assert_eq!(
2946+ got.v, want.v,
2947+ "{NAME} frame {i} V vs ffmpeg (seed {seed}) -- stream pinned at {}",
2948+ pin.display()
2949+ );
2950+ }
2895 }2951 }
2896 eprintln!(2952 eprintln!(
2897 "{NAME} FIRING seed {seed}: skip_mode hits advanced by {}",2953 "{NAME} FIRING seed {seed}: skip_mode hits advanced by {}",