M9: drop comments added in ec-hw examples/tests and ec-bench (no comments in code)
Browse files at this commit0da4989a6e95887306c1f37f31f2eba624534f9aParent: 07ab7006 changed files +0 -13
- crates/ec-hw/examples/hw_decode.rs +0 -1
- crates/ec-hw/examples/hw_decode_rgb.rs +0 -1
- crates/ec-hw/examples/hw_parity.rs +0 -1
- crates/ec-hw/tests/gpu.rs +0 -8
- crates/ec-hw/tests/intra_rate.rs +0 -1
- tools/ec-bench/src/main.rs +0 -1
crates/ec-hw/examples/hw_decode.rsmodified+0 -1
| @@ -2,7 +2,6 @@ | |||
| 2 | //! The 10-bit H.265 and AV1 streams run on Vulkan and are compared with the VA-API decode of the same stream. | 2 | //! The 10-bit H.265 and AV1 streams run on Vulkan and are compared with the VA-API decode of the same stream. |
| 3 | //! | 3 | //! |
| 4 | //! ```text | 4 | //! ```text |
| 5 | -//! cargo run -p ec-hw --example hw_decode | ||
| 6 | //! ``` | 5 | //! ``` |
| 7 | 6 | ||
| 8 | use std::collections::HashSet; | 7 | use std::collections::HashSet; |
crates/ec-hw/examples/hw_decode_rgb.rsmodified+0 -1
| @@ -3,7 +3,6 @@ | |||
| 3 | //! Streams are assumed untagged, so the matrix is BT.709 from 720 lines up and BT.601 below. | 3 | //! Streams are assumed untagged, so the matrix is BT.709 from 720 lines up and BT.601 below. |
| 4 | //! | 4 | //! |
| 5 | //! ```text | 5 | //! ```text |
| 6 | -//! cargo run --release -p ec-hw --example hw_decode_rgb | ||
| 7 | //! ``` | 6 | //! ``` |
| 8 | 7 | ||
| 9 | use std::fs; | 8 | use std::fs; |
crates/ec-hw/examples/hw_parity.rsmodified+0 -1
| @@ -3,7 +3,6 @@ | |||
| 3 | //! Every encode and decode runs in a child process of this binary, because the driver's state outlives a display: within one process the same encode lands at different sizes depending on what ran before it. | 3 | //! Every encode and decode runs in a child process of this binary, because the driver's state outlives a display: within one process the same encode lands at different sizes depending on what ran before it. |
| 4 | //! | 4 | //! |
| 5 | //! ```text | 5 | //! ```text |
| 6 | -//! cargo run --release -p ec-hw --example hw_parity | ||
| 7 | //! ``` | 6 | //! ``` |
| 8 | 7 | ||
| 9 | use std::fmt::Display; | 8 | use std::fmt::Display; |
crates/ec-hw/tests/gpu.rsmodified+0 -8
| @@ -2,7 +2,6 @@ | |||
| 2 | //! | 2 | //! |
| 3 | //! They are not `#[ignore]`d — a hardware crate whose tests do not touch the | 3 | //! They are not `#[ignore]`d — a hardware crate whose tests do not touch the |
| 4 | //! hardware tests nothing — but they *skip* (print and return) when there is no | 4 | //! hardware tests nothing — but they *skip* (print and return) when there is no |
| 5 | -//! VA display. Missing fixtures and ffmpeg fail. | ||
| 6 | //! | 5 | //! |
| 7 | //! The oracle is ffmpeg's software decoder: every fixture is decoded here and | 6 | //! The oracle is ffmpeg's software decoder: every fixture is decoded here and |
| 8 | //! by `ffmpeg -f rawvideo`, and the two are compared frame by frame. | 7 | //! by `ffmpeg -f rawvideo`, and the two are compared frame by frame. |
| @@ -1007,7 +1006,6 @@ fn av1_encode_agrees_between_two_decoders() { | |||
| 1007 | // encoder does not serve his files. | 1006 | // encoder does not serve his files. |
| 1008 | // --------------------------------------------------------------------------- | 1007 | // --------------------------------------------------------------------------- |
| 1009 | 1008 | ||
| 1010 | -/// A 10-bit gradient with real dynamic range: 64..940 across the frame with a moving highlight, so the | ||
| 1011 | /// stream is neither flat nor 8-bit content dressed up as 10. | 1009 | /// stream is neither flat nor 8-bit content dressed up as 10. |
| 1012 | fn source_frame_16(width: u32, height: u32, t: u32) -> I420_16 { | 1010 | fn source_frame_16(width: u32, height: u32, t: u32) -> I420_16 { |
| 1013 | let (w, h) = (width as usize, height as usize); | 1011 | let (w, h) = (width as usize, height as usize); |
| @@ -1040,8 +1038,6 @@ fn source_frame_16(width: u32, height: u32, t: u32) -> I420_16 { | |||
| 1040 | f | 1038 | f |
| 1041 | } | 1039 | } |
| 1042 | 1040 | ||
| 1043 | -/// The 10-bit source the 10-bit gates encode, and the y4m every reference | ||
| 1044 | -/// encoder and every PSNR reads. | ||
| 1045 | fn ten_bit_source(dir: &Path, frames: u32) -> (String, PathBuf, Vec<I420_16>) { | 1041 | fn ten_bit_source(dir: &Path, frames: u32) -> (String, PathBuf, Vec<I420_16>) { |
| 1046 | let y4m = dir.join("source-10bit.y4m"); | 1042 | let y4m = dir.join("source-10bit.y4m"); |
| 1047 | let (w, h) = (1920u32, 1024u32); | 1043 | let (w, h) = (1920u32, 1024u32); |
| @@ -1654,7 +1650,6 @@ fn raw_frames(y4m: &Path, width: u32, height: u32, frames: u32) -> Option<Vec<I4 | |||
| 1654 | (!pictures.is_empty()).then_some(pictures) | 1650 | (!pictures.is_empty()).then_some(pictures) |
| 1655 | } | 1651 | } |
| 1656 | 1652 | ||
| 1657 | -/// The open trailers the rate and BD gates encode, 1080p first. | ||
| 1658 | fn real_clips() -> Vec<(&'static str, PathBuf)> { | 1653 | fn real_clips() -> Vec<(&'static str, PathBuf)> { |
| 1659 | vec![ | 1654 | vec![ |
| 1660 | ("sintel 1080p", ec_testkit::fixture("open/sintel_trailer-1080p.mp4")), | 1655 | ("sintel 1080p", ec_testkit::fixture("open/sintel_trailer-1080p.mp4")), |
| @@ -1958,8 +1953,6 @@ fn elementary(path: &Path, codec: Codec, frames: usize) -> Option<Vec<u8>> { | |||
| 1958 | (!out.stdout.is_empty()).then_some(out.stdout) | 1953 | (!out.stdout.is_empty()).then_some(out.stdout) |
| 1959 | } | 1954 | } |
| 1960 | 1955 | ||
| 1961 | -/// Decode the open trailers and the 10-bit HEVC clip and compare with ffmpeg, | ||
| 1962 | -/// per file. | ||
| 1963 | #[test] | 1956 | #[test] |
| 1964 | fn real_library_spot_check() { | 1957 | fn real_library_spot_check() { |
| 1965 | let Some(display) = display() else { return }; | 1958 | let Some(display) = display() else { return }; |
| @@ -2062,7 +2055,6 @@ fn plane_psnr(a: &[u16], b: &[u16], peak: f64) -> f64 { | |||
| 2062 | } | 2055 | } |
| 2063 | } | 2056 | } |
| 2064 | 2057 | ||
| 2065 | -/// P010 correctness on the 10-bit HEVC clip, plane by plane. | ||
| 2066 | /// | 2058 | /// |
| 2067 | /// `real_library_spot_check` already pins the whole-frame PSNR at >= 40 dB | 2059 | /// `real_library_spot_check` already pins the whole-frame PSNR at >= 40 dB |
| 2068 | /// for a mix of files; this isolates Y from U/V on this specific 10-bit film, | 2060 | /// for a mix of files; this isolates Y from U/V on this specific 10-bit film, |
crates/ec-hw/tests/intra_rate.rsmodified+0 -1
| @@ -69,7 +69,6 @@ fn scratch() -> PathBuf { | |||
| 69 | dir | 69 | dir |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | -/// The testsrc2 clip as raw 4:2:0, generated by ffmpeg. | ||
| 73 | fn testsrc2_raw(dir: &Path) -> PathBuf { | 72 | fn testsrc2_raw(dir: &Path) -> PathBuf { |
| 74 | let path = dir.join("testsrc2-720p.yuv"); | 73 | let path = dir.join("testsrc2-720p.yuv"); |
| 75 | let status = ec_testkit::ffmpeg() | 74 | let status = ec_testkit::ffmpeg() |
tools/ec-bench/src/main.rsmodified+0 -1
| @@ -80,7 +80,6 @@ fn fixtures() -> PathBuf { | |||
| 80 | Path::new(env!("CARGO_MANIFEST_DIR")).join("../../fixtures") | 80 | Path::new(env!("CARGO_MANIFEST_DIR")).join("../../fixtures") |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | -/// The open clip the bench uses as the source for a codec. | ||
| 84 | fn real_video(codec: &str) -> Option<PathBuf> { | 83 | fn real_video(codec: &str) -> Option<PathBuf> { |
| 85 | let name = match codec { | 84 | let name = match codec { |
| 86 | "h264" => "open/sintel_trailer-1080p.mp4", | 85 | "h264" => "open/sintel_trailer-1080p.mp4", |