Drop remaining SKIP branches and stale opt-in docs in ec-h264/ec-h265 tests; missing fixture dirs panic instead of silently empty
Browse files at this commit1eb7f8c2f383d3386f78d76e9225cd932272a933Parent: b5a094211 changed files +7 -48
- crates/ec-h264/tests/conformance.rs +0 -3
- crates/ec-h264/tests/it/high422.rs +1 -7
- crates/ec-h264/tests/it/high422_jvt.rs +0 -6
- crates/ec-h264/tests/it/high444.rs +1 -7
- crates/ec-h264/tests/it/high444_jvt.rs +0 -5
- crates/ec-h264/tests/it/mbaff_x264.rs +1 -7
- crates/ec-h265/tests/it/conformance_intra.rs +1 -3
- crates/ec-h265/tests/it/conformance_rext.rs +1 -3
- crates/ec-h265/tests/it/cu_syntax.rs +1 -3
- crates/ec-h265/tests/it/dec_shell.rs +1 -3
- crates/ec-h265/tests/it/real_library.rs +0 -1
crates/ec-h264/tests/conformance.rsmodified+0 -3
| @@ -1401,9 +1401,6 @@ fn switching_slices_are_refused_by_name() { | ||
| 1401 | 1401 | } |
| 1402 | 1402 | } |
| 1403 | 1403 | |
| 1404 | -// --------------------------------------------------------------------------- | |
| 1405 | -// Real library: the files actually on this machine, not fixtures. | |
| 1406 | -// --------------------------------------------------------------------------- | |
| 1407 | 1404 | |
| 1408 | 1405 | /// Extract the video elementary stream of a real file as Annex B. |
| 1409 | 1406 | fn extract_annexb(src: &Path, dst: &Path, frames: usize) -> bool { |
crates/ec-h264/tests/it/high422.rsmodified+1 -7
| @@ -3,8 +3,6 @@ | ||
| 3 | 3 | //! with B-frames, CABAC and CAVLC, the 8x8 transform, weighted prediction, |
| 4 | 4 | //! scaling matrices, chroma QP offsets, several slices, progressive and |
| 5 | 5 | //! MBAFF, at 8 and 10 bits. |
| 6 | -//! | |
| 7 | -//! opt-in: set `EC_H264_HI422_HD=1` (the lane gate does). | |
| 8 | 6 | |
| 9 | 7 | use std::path::{Path, PathBuf}; |
| 10 | 8 | |
| @@ -365,13 +363,9 @@ fn x264_hi422_mbaff() { | ||
| 365 | 363 | sweep(&cases); |
| 366 | 364 | } |
| 367 | 365 | |
| 368 | -/// 1920x1080 intra and long-GOP, progressive and MBAFF (opt-in, slow). | |
| 366 | +/// 1920x1080 intra and long-GOP, progressive and MBAFF (slow). | |
| 369 | 367 | #[test] |
| 370 | 368 | fn x264_hi422_hd() { |
| 371 | - if std::env::var_os("EC_H264_HI422_HD").is_none() { | |
| 372 | - eprintln!("SKIP x264_hi422_hd: set EC_H264_HI422_HD=1"); | |
| 373 | - return; | |
| 374 | - } | |
| 375 | 369 | sweep(&[ |
| 376 | 370 | case("hd-i-cabac", "testsrc2", "1920x1080", 2, "keyint=1"), |
| 377 | 371 | case( |
crates/ec-h264/tests/it/high422_jvt.rsmodified+0 -6
| @@ -99,12 +99,6 @@ fn jvt_hi422_vectors_bit_exact() { | ||
| 99 | 99 | let mut exact = Vec::new(); |
| 100 | 100 | for path in &list { |
| 101 | 101 | let name = path.file_stem().unwrap().to_string_lossy().to_string(); |
| 102 | - if cfg!(debug_assertions) | |
| 103 | - && matches!(name.as_str(), "Hi422FREXT16_SONY_A" | "Hi422FREXT17_SONY_A") | |
| 104 | - { | |
| 105 | - eprintln!("SKIP {name}: 1920x1088 field stream, release builds only"); | |
| 106 | - continue; | |
| 107 | - } | |
| 108 | 102 | let bytes = std::fs::read(path).unwrap(); |
| 109 | 103 | let (ours, format) = match decode_all(&bytes) { |
| 110 | 104 | Ok(v) => v, |
crates/ec-h264/tests/it/high444.rsmodified+1 -7
| @@ -9,8 +9,6 @@ | ||
| 9 | 9 | //! on the luma plane against ffmpeg's `gray` / `gray10le`; chroma must be 128, |
| 10 | 10 | //! or 512 at 10 bits). Separate colour planes cannot be written by x264; the |
| 11 | 11 | //! JVT vectors (`high444_jvt.rs`) cover them. |
| 12 | -//! | |
| 13 | -//! set `EC_H264_HI444_HD=1`. | |
| 14 | 12 | |
| 15 | 13 | use std::path::{Path, PathBuf}; |
| 16 | 14 | |
| @@ -604,13 +602,9 @@ fn x264_monochrome_mbaff_and_lossless() { | ||
| 604 | 602 | sweep("gray MBAFF / lossless", &cases); |
| 605 | 603 | } |
| 606 | 604 | |
| 607 | -/// 1280x720 (opt-in, slow). | |
| 605 | +/// 1280x720 (slow). | |
| 608 | 606 | #[test] |
| 609 | 607 | fn x264_hi444_hd() { |
| 610 | - if std::env::var_os("EC_H264_HI444_HD").is_none() { | |
| 611 | - eprintln!("SKIP x264_hi444_hd: set EC_H264_HI444_HD=1"); | |
| 612 | - return; | |
| 613 | - } | |
| 614 | 608 | let base = [ |
| 615 | 609 | case("hd-i-cabac", "testsrc2", "1280x720", 2, "keyint=1"), |
| 616 | 610 | case( |
crates/ec-h264/tests/it/high444_jvt.rsmodified+0 -5
| @@ -212,10 +212,6 @@ fn jvt_hi444_vectors_bit_exact() { | ||
| 212 | 212 | let mut summary = Vec::new(); |
| 213 | 213 | for path in &list { |
| 214 | 214 | let name = path.file_stem().unwrap().to_string_lossy().to_string(); |
| 215 | - if cfg!(debug_assertions) && std::fs::metadata(path).map_or(0, |m| m.len()) > 2_000_000 { | |
| 216 | - eprintln!("SKIP {name}: large stream, release builds only"); | |
| 217 | - continue; | |
| 218 | - } | |
| 219 | 215 | let bytes = std::fs::read(path).unwrap(); |
| 220 | 216 | let (ours, format) = match decode_all(&bytes) { |
| 221 | 217 | Ok((f, fmt)) if !f.is_empty() => (f, fmt), |
| @@ -227,7 +223,6 @@ fn jvt_hi444_vectors_bit_exact() { | ||
| 227 | 223 | Err(e) if e.to_string().contains("FMO") => { |
| 228 | 224 | // The Sejong Univ. streams use slice groups, which this |
| 229 | 225 | // decoder refuses by name (not part of this lane). |
| 230 | - eprintln!("SKIP {name}: {e}"); | |
| 231 | 226 | summary.push(format!("{name} fmo-refused")); |
| 232 | 227 | continue; |
| 233 | 228 | } |
crates/ec-h264/tests/it/mbaff_x264.rsmodified+1 -7
| @@ -3,8 +3,6 @@ | ||
| 3 | 3 | //! sources: CABAC and CAVLC, top and bottom field first, B-frames with |
| 4 | 4 | //! spatial and temporal direct, weighted prediction, the 8x8 transform, |
| 5 | 5 | //! several slices, and High 10. |
| 6 | -//! | |
| 7 | -//! opt-in: set `EC_H264_MBAFF_HD=1` (the lane gate does). | |
| 8 | 6 | |
| 9 | 7 | use std::path::{Path, PathBuf}; |
| 10 | 8 | |
| @@ -357,13 +355,9 @@ fn x264_mbaff_sd() { | ||
| 357 | 355 | ]); |
| 358 | 356 | } |
| 359 | 357 | |
| 360 | -/// 1920x1080: opt-in (`EC_H264_MBAFF_HD=1`). | |
| 358 | +/// 1920x1080. | |
| 361 | 359 | #[test] |
| 362 | 360 | fn x264_mbaff_hd() { |
| 363 | - if std::env::var_os("EC_H264_MBAFF_HD").is_none() { | |
| 364 | - eprintln!("SKIP 1080p MBAFF sweep: set EC_H264_MBAFF_HD=1"); | |
| 365 | - return; | |
| 366 | - } | |
| 367 | 361 | sweep(&[ |
| 368 | 362 | case( |
| 369 | 363 | "hd-cabac-tff", |
crates/ec-h265/tests/it/conformance_intra.rsmodified+1 -3
| @@ -47,9 +47,7 @@ fn streams() -> Vec<PathBuf> { | ||
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | - let Ok(dirs) = std::fs::read_dir(&root) else { | |
| 51 | - return Vec::new(); | |
| 52 | - }; | |
| 50 | + let dirs = std::fs::read_dir(&root).expect("fixture directory"); | |
| 53 | 51 | let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect(); |
| 54 | 52 | dirs.sort(); |
| 55 | 53 | dirs.into_iter() |
crates/ec-h265/tests/it/conformance_rext.rsmodified+1 -3
| @@ -46,9 +46,7 @@ fn streams() -> Vec<PathBuf> { | ||
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | - let Ok(dirs) = std::fs::read_dir(&root) else { | |
| 50 | - return Vec::new(); | |
| 51 | - }; | |
| 49 | + let dirs = std::fs::read_dir(&root).expect("fixture directory"); | |
| 52 | 50 | let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect(); |
| 53 | 51 | dirs.sort(); |
| 54 | 52 | dirs.into_iter() |
crates/ec-h265/tests/it/cu_syntax.rsmodified+1 -3
| @@ -23,9 +23,7 @@ fn streams() -> Vec<PathBuf> { | ||
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | - let Ok(dirs) = std::fs::read_dir(&root) else { | |
| 27 | - return Vec::new(); | |
| 28 | - }; | |
| 26 | + let dirs = std::fs::read_dir(&root).expect("fixture directory"); | |
| 29 | 27 | let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect(); |
| 30 | 28 | dirs.sort(); |
| 31 | 29 | dirs.into_iter() |
crates/ec-h265/tests/it/dec_shell.rsmodified+1 -3
| @@ -310,9 +310,7 @@ fn streams() -> Vec<PathBuf> { | ||
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | } |
| 313 | - let Ok(dirs) = std::fs::read_dir(&root) else { | |
| 314 | - return Vec::new(); | |
| 315 | - }; | |
| 313 | + let dirs = std::fs::read_dir(&root).expect("fixture directory"); | |
| 316 | 314 | let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect(); |
| 317 | 315 | dirs.sort(); |
| 318 | 316 | dirs.into_iter() |
crates/ec-h265/tests/it/real_library.rsmodified+0 -1
| @@ -1,4 +1,3 @@ | ||
| 1 | -//! | |
| 2 | 1 | //! Every file either decodes bit-exactly, is refused by name (a pixel format or |
| 3 | 2 | //! a bit depth outside 4:2:0 8/10-bit, or a decoder refusal that says |
| 4 | 3 | //! "unsupported"), or fails. A refusal is reported, not counted as a failure. |