ec-av1: drop stale references to removed skip env vars and library_fixture helpers in comments; no doc comments in real_library
Browse files at this commit82cde78566da21b7efae64bbd87076a4cf2012eaParent: 92bd1ce3 changed files +4 -42
- crates/ec-av1/src/encoder/tests.rs +0 -24
- crates/ec-av1/src/stream/mod.rs +4 -5
- crates/ec-av1/tests/real_library.rs +0 -13
crates/ec-av1/src/encoder/tests.rsmodified+0 -24
| @@ -668,16 +668,6 @@ | |||
| 668 | /// to this facade's own input size, and re-coded through the facade so the | 668 | /// to this facade's own input size, and re-coded through the facade so the |
| 669 | /// rate-target surface is exercised at the entry point a caller actually | 669 | /// rate-target surface is exercised at the entry point a caller actually |
| 670 | /// drives. | 670 | /// drives. |
| 671 | - /// | ||
| 672 | - /// lane-av1clipprobe: the ABSENCE of this clip used to be a bare | ||
| 673 | - /// `clip.exists()` -> `None`, and every caller turned that into a `SKIP` | ||
| 674 | - /// line and a return -- so a tree with no root `fixtures/` printed | ||
| 675 | - /// `SKIP the 1080p tile round trip: no fixture` and libtest reported `ok`: | ||
| 676 | - /// green with nothing asserted, and no env that made it RED. The presence | ||
| 677 | - /// check now lives in the crate's one library-fixture probe | ||
| 678 | - /// (`library_fixture::require_at`), which fails under `EC_REQUIRE_FIXTURES` / | ||
| 679 | - /// `EC_AV1_REQUIRE_FFMPEG` / `EC_AV1_REQUIRE_AOMENC` and otherwise prints | ||
| 680 | - /// that ONE line. | ||
| 681 | fn h264_clip_frames( | 671 | fn h264_clip_frames( |
| 682 | width: usize, | 672 | width: usize, |
| 683 | height: usize, | 673 | height: usize, |
| @@ -3636,20 +3626,6 @@ | |||
| 3636 | /// first-differing-luma-sample comparison, not a length or non-empty | 3626 | /// first-differing-luma-sample comparison, not a length or non-empty |
| 3637 | /// smoke. | 3627 | /// smoke. |
| 3638 | /// | 3628 | /// |
| 3639 | - /// The two skippable halves both route through the crate's EXISTING | ||
| 3640 | - /// presence probes, not a new shape: `h264_clip_frames` (which itself asks | ||
| 3641 | - /// `have_ffmpeg()` and `library_fixture::require_at`) and `have_ffmpeg()` | ||
| 3642 | - /// for the ffmpeg arm. No bare presence check was added. | ||
| 3643 | - /// | ||
| 3644 | - /// lane-av1clipprobe: with the root `fixtures/` absent this gate printed | ||
| 3645 | - /// `SKIP the 1080p tile round trip: no fixture` and libtest reported `ok` | ||
| 3646 | - /// — a 1080p gate that asserts nothing on every linked worktree, and no | ||
| 3647 | - /// env that made it RED. `library_fixture::require_at` now fails under | ||
| 3648 | - /// `EC_REQUIRE_FIXTURES` / `EC_AV1_REQUIRE_FFMPEG` / `EC_AV1_REQUIRE_AOMENC` | ||
| 3649 | - /// and otherwise prints exactly ONE line naming the resolved path, and the | ||
| 3650 | - /// path it resolves honours `EC_FIXTURES` — the root | ||
| 3651 | - /// `scripts/verify-fixture-library.sh` validates — so the preflight's | ||
| 3652 | - /// verdict and these bytes cannot be different trees again. | ||
| 3653 | #[test] | 3629 | #[test] |
| 3654 | fn a_1080p_multi_tile_stream_decodes_sample_exact_through_both_decoders() { | 3630 | fn a_1080p_multi_tile_stream_decodes_sample_exact_through_both_decoders() { |
| 3655 | let _knobs = crate::speed::knob_read(); | 3631 | let _knobs = crate::speed::knob_read(); |
crates/ec-av1/src/stream/mod.rsmodified+4 -5
| @@ -1997,11 +1997,10 @@ fn decode_frame( | |||
| 1997 | // lane-gm r2 STEP-8 ATTEMPT (reverted): removing this refusal | 1997 | // lane-gm r2 STEP-8 ATTEMPT (reverted): removing this refusal |
| 1998 | // exposed a real pixel mismatch -- | 1998 | // exposed a real pixel mismatch -- |
| 1999 | // a_real_aomenc_stream_with_interintra_wedge_decodes_pixel_exact | 1999 | // a_real_aomenc_stream_with_interintra_wedge_decodes_pixel_exact |
| 2000 | - // seed 43, frame 1 luma, with EC_WEDGE_GATE_ATTEMPTS=20 | 2000 | + // seed 43, frame 1 luma, with EC_WEDGE_GATE_ATTEMPTS=20 -- so the |
| 2001 | - // EC_AV1_REQUIRE_AOMENC=1 -- so the single-ref/compound MV wiring | 2001 | + // single-ref/compound MV wiring is not yet provably correct end to end; |
| 2002 | - // is not yet provably correct end to end; keeping the refusal | 2002 | + // keeping the refusal until that seed is root-caused rather than |
| 2003 | - // until that seed is captured (EC_AV1_GATE_DUMP), self-pinned, and | 2003 | + // shipping a wrong decode. |
| 2004 | - // root-caused rather than shipping a wrong decode. | ||
| 2005 | // | 2004 | // |
| 2006 | // lane-gm r3 ROOT CAUSE (pinned, range-ladder-confirmed, still not | 2005 | // lane-gm r3 ROOT CAUSE (pinned, range-ladder-confirmed, still not |
| 2007 | // fixed): the mismatch is NOT an mv/mvstack/entropy bug -- msac | 2006 | // fixed): the mismatch is NOT an mv/mvstack/entropy bug -- msac |
crates/ec-av1/tests/real_library.rsmodified+0 -13
| @@ -1,17 +1,11 @@ | |||
| 1 | -//! The open-media AV1 check: the first `FRAMES` shown pictures of the sintel | ||
| 2 | -//! trailer as an SVT-AV1 IVF stream are decoded and compared sample for sample with | ||
| 3 | -//! ffmpeg's `libdav1d` decoder. | ||
| 4 | - | ||
| 5 | use std::io::Read; | 1 | use std::io::Read; |
| 6 | use std::path::{Path, PathBuf}; | 2 | use std::path::{Path, PathBuf}; |
| 7 | use std::process::{Child, ChildStdout, Stdio}; | 3 | use std::process::{Child, ChildStdout, Stdio}; |
| 8 | 4 | ||
| 9 | use ec_av1::encode::Picture; | 5 | use ec_av1::encode::Picture; |
| 10 | 6 | ||
| 11 | -/// Shown pictures compared per file. | ||
| 12 | const FRAMES: usize = 300; | 7 | const FRAMES: usize = 300; |
| 13 | 8 | ||
| 14 | -/// Pixel formats inside the decoder's scope: 4:2:0 at 8 or 10 bits. | ||
| 15 | const IN_SCOPE_PIX_FMTS: [&str; 2] = ["yuv420p", "yuv420p10le"]; | 9 | const IN_SCOPE_PIX_FMTS: [&str; 2] = ["yuv420p", "yuv420p10le"]; |
| 16 | 10 | ||
| 17 | fn scratch(tag: &str) -> PathBuf { | 11 | fn scratch(tag: &str) -> PathBuf { |
| @@ -21,7 +15,6 @@ fn scratch(tag: &str) -> PathBuf { | |||
| 21 | dir | 15 | dir |
| 22 | } | 16 | } |
| 23 | 17 | ||
| 24 | -/// One input clip: the columns the sweep reads. | ||
| 25 | struct Entry { | 18 | struct Entry { |
| 26 | path: PathBuf, | 19 | path: PathBuf, |
| 27 | container: String, | 20 | container: String, |
| @@ -40,8 +33,6 @@ fn open_entries() -> Vec<Entry> { | |||
| 40 | }] | 33 | }] |
| 41 | } | 34 | } |
| 42 | 35 | ||
| 43 | -/// The planes of a picture as the bytes of a planar rawvideo frame: one byte per | ||
| 44 | -/// sample at 8 bits, little-endian u16 above. | ||
| 45 | fn frame_bytes(pic: &Picture, bps: usize) -> Vec<u8> { | 36 | fn frame_bytes(pic: &Picture, bps: usize) -> Vec<u8> { |
| 46 | let mut out = Vec::with_capacity((pic.y.len() + pic.u.len() + pic.v.len()) * bps); | 37 | let mut out = Vec::with_capacity((pic.y.len() + pic.u.len() + pic.v.len()) * bps); |
| 47 | for plane in [&pic.y, &pic.u, &pic.v] { | 38 | for plane in [&pic.y, &pic.u, &pic.v] { |
| @@ -56,7 +47,6 @@ fn frame_bytes(pic: &Picture, bps: usize) -> Vec<u8> { | |||
| 56 | out | 47 | out |
| 57 | } | 48 | } |
| 58 | 49 | ||
| 59 | -/// Where byte `offset` of a frame lies: plane name, x and y in that plane. | ||
| 60 | fn locate(offset: usize, bps: usize, pic: &Picture) -> (&'static str, usize, usize) { | 50 | fn locate(offset: usize, bps: usize, pic: &Picture) -> (&'static str, usize, usize) { |
| 61 | let s = offset / bps; | 51 | let s = offset / bps; |
| 62 | let (w, cw) = (pic.width, pic.u.len() / pic.height.div_ceil(2).max(1)); | 52 | let (w, cw) = (pic.width, pic.u.len() / pic.height.div_ceil(2).max(1)); |
| @@ -72,7 +62,6 @@ fn locate(offset: usize, bps: usize, pic: &Picture) -> (&'static str, usize, usi | |||
| 72 | } | 62 | } |
| 73 | } | 63 | } |
| 74 | 64 | ||
| 75 | -/// Running comparison of decoded frames against the oracle's rawvideo stream. | ||
| 76 | struct Sweep { | 65 | struct Sweep { |
| 77 | out: ChildStdout, | 66 | out: ChildStdout, |
| 78 | child: Child, | 67 | child: Child, |
| @@ -149,7 +138,6 @@ fn short_name(path: &Path) -> String { | |||
| 149 | .unwrap_or_default() | 138 | .unwrap_or_default() |
| 150 | } | 139 | } |
| 151 | 140 | ||
| 152 | -/// Extracts the first `FRAMES` pictures of the video as a low-overhead OBU stream. | ||
| 153 | fn extract(src: &Path, dst: &Path) -> bool { | 141 | fn extract(src: &Path, dst: &Path) -> bool { |
| 154 | ec_testkit::ffmpeg() | 142 | ec_testkit::ffmpeg() |
| 155 | .args(["-v", "error", "-y", "-i"]) | 143 | .args(["-v", "error", "-y", "-i"]) |
| @@ -169,7 +157,6 @@ fn extract(src: &Path, dst: &Path) -> bool { | |||
| 169 | .is_ok_and(|s| s.success()) | 157 | .is_ok_and(|s| s.success()) |
| 170 | } | 158 | } |
| 171 | 159 | ||
| 172 | -/// Decodes one OBU stream and compares it with ffmpeg's libdav1d output. | ||
| 173 | fn sweep_file(es: &Path, pix_fmt: &str, bit_depth: u32) -> Result<Sweep, String> { | 160 | fn sweep_file(es: &Path, pix_fmt: &str, bit_depth: u32) -> Result<Sweep, String> { |
| 174 | let bps = if bit_depth > 8 { 2 } else { 1 }; | 161 | let bps = if bit_depth > 8 { 2 } else { 1 }; |
| 175 | let mut child = ec_testkit::ffmpeg() | 162 | let mut child = ec_testkit::ffmpeg() |