From 48c5ff67bf42ce58bf2f6cd9436bb02050b5f8b7 Mon Sep 17 00:00:00 2001 From: SusieeTheFemboy <96988330+SusieeTheLinuxUser@users.noreply.github.com> Date: Sat, 24 Oct 2026 00:40:21 +0200 Subject: [PATCH] H.264: the temporal-direct test runs the dsf 512 case The dsf 512 / mvCol [32767, 0] check sat inside loops that never produce that pair, so it never ran. It is now a direct assertion after the sweep. Co-Authored-By: Claude Opus 5.5 --- crates/h264/src/slicedec.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/h264/src/slicedec.rs b/crates/h264/src/slicedec.rs index fee675a2..2ada5159 100644 --- a/crates/h264/src/slicedec.rs +++ b/crates/h264/src/slicedec.rs @@ -1496,12 +1496,11 @@ mod tests { if dsf == 256 { assert_eq!((mv0, mv1), (col, [0, 0]), "dsf 256 is the identity scale"); } - // soundcraft#994: mvL1 is scaled from the unclamped mvL0 with only the results - // clipped — deriving it from the clipped mvL0 gave [0, 0] here. - if dsf == 512 && col == [i16::MAX, 0] { - assert_eq!((mv0, mv1), ([i16::MAX, 0], [i16::MAX, 0]), "mvL1 keeps mvL0's off-range part"); - } } } + // soundcraft#994: mvL1 is scaled from the unclamped mvL0 with only the results clipped; + // deriving it from the clipped mvL0 gave [0, 0] here. + let (mv0, mv1) = SliceDecoder::temporal_direct_mvs(512, [i16::MAX, 0]); + assert_eq!((mv0, mv1), ([i16::MAX, 0], [i16::MAX, 0]), "mvL1 keeps mvL0's off-range part"); } }