diff --git a/crates/ec-h264/tests/it/high422.rs b/crates/ec-h264/tests/it/high422.rs index 037b55ed..4ca3d43b 100644 --- a/crates/ec-h264/tests/it/high422.rs +++ b/crates/ec-h264/tests/it/high422.rs @@ -332,21 +332,17 @@ const SMALL: &[Case] = &[ ]; /// Every case at 8 bits, progressive. -#[test] -fn x264_hi422_progressive_8bit() { - sweep(SMALL); +fn progressive_8bit_cases() -> Vec { + SMALL.iter().map(|c| Case { ..*c }).collect() } /// The same at 10 bits. -#[test] -fn x264_hi422_progressive_10bit() { - let cases: Vec = SMALL.iter().map(|c| ten(Case { ..*c })).collect(); - sweep(&cases); +fn progressive_10bit_cases() -> Vec { + SMALL.iter().map(|c| ten(Case { ..*c })).collect() } /// MBAFF at 8 and 10 bits. -#[test] -fn x264_hi422_mbaff() { +fn mbaff_cases() -> Vec { let mut cases: Vec = Vec::new(); for (i, c) in SMALL.iter().enumerate() { // Every other case keeps the sweep quick; the rest run progressive. @@ -360,13 +356,12 @@ fn x264_hi422_mbaff() { format!("mbaff-{}{}", c.tag, if c.ten_bit { "-10" } else { "" }).into_boxed_str(), ); } - sweep(&cases); + cases } /// 1920x1080 intra and long-GOP, progressive and MBAFF (slow). -#[test] -fn x264_hi422_hd() { - sweep(&[ +fn hd_cases() -> Vec { + vec![ case("hd-i-cabac", "testsrc2", "1920x1080", 2, "keyint=1"), case( "hd-b-cabac", @@ -403,7 +398,7 @@ fn x264_hi422_hd() { 2, "keyint=1:cabac=0", ))), - ]); + ] } // ---- I_PCM in 4:2:2 (x264 never writes one) ---------------------------- @@ -530,3 +525,12 @@ fn hi422_pcm_macroblocks_round_trip() { assert_eq!(bytes, &expected, "{bd}-bit I_PCM 4:2:2"); } } + +#[test] +fn x264_hi422_family() { + let mut cases = progressive_8bit_cases(); + cases.extend(progressive_10bit_cases()); + cases.extend(mbaff_cases()); + cases.extend(hd_cases()); + sweep(&cases); +}