diff --git a/crates/ec-ass/fuzz/seed.sh b/crates/ec-ass/fuzz/seed.sh index 8c5d2ec5..c4665787 100755 --- a/crates/ec-ass/fuzz/seed.sh +++ b/crates/ec-ass/fuzz/seed.sh @@ -1,9 +1,4 @@ #!/usr/bin/env bash -# seed.sh: fill fuzz/corpus// from the repo's ASS fixture. -# -# subs/tos-en.ass seeds script whole. events and overrides get its Dialogue rows (the lines -# after the first Dialogue: prefix, which is what each of those targets takes as input). styles gets -# the Style rows. Corpus lives under fuzz/corpus, git-ignored. set -euo pipefail FUZZ_DIR=$(cd -- "$(dirname -- "$0")" && pwd) diff --git a/crates/ec-cc/tests/streams.rs b/crates/ec-cc/tests/streams.rs index 651ec0d9..5ec02000 100644 --- a/crates/ec-cc/tests/streams.rs +++ b/crates/ec-cc/tests/streams.rs @@ -1,7 +1,3 @@ -//! End-to-end: synthetic captions spliced into ffmpeg-encoded H.264 / HEVC / MPEG-2 streams -//! (with B-frames), extracted in presentation order, decoded, and compared with ffmpeg's own -//! caption decoder. - use ec_cc::extract::{H264Extractor, HevcExtractor, Mpeg2Extractor, NalFormat}; use ec_cc::synth::*; use ec_cc::{CcTriplet, decode_all}; diff --git a/crates/ec-dvbsub/tests/ffmpeg_parity.rs b/crates/ec-dvbsub/tests/ffmpeg_parity.rs index 3466d475..46cc9528 100644 --- a/crates/ec-dvbsub/tests/ffmpeg_parity.rs +++ b/crates/ec-dvbsub/tests/ffmpeg_parity.rs @@ -1,8 +1,3 @@ -//! Our DVB subtitle decode against ffmpeg's (sub2video frames: `[0:s:0]` out as raw RGBA). -//! -//! Fixtures are tiny files made by `scripts/gen-bitmap-sub-fixtures.sh` from a synthetic -//! 720x576 PGS source (four cues). ffmpeg is the oracle. - use std::fs::File; use std::io::BufReader; use std::path::PathBuf; diff --git a/crates/ec-dvdsub/tests/ffmpeg_parity.rs b/crates/ec-dvdsub/tests/ffmpeg_parity.rs index 5ddeb7b7..d619cd2c 100644 --- a/crates/ec-dvdsub/tests/ffmpeg_parity.rs +++ b/crates/ec-dvdsub/tests/ffmpeg_parity.rs @@ -1,8 +1,3 @@ -//! Our subpicture decode against ffmpeg's (sub2video frames: `[0:s:0]` out as raw RGBA). -//! -//! Fixtures are tiny files made by `scripts/gen-bitmap-sub-fixtures.sh` from a synthetic -//! 720x576 PGS source (four cues). ffmpeg is the oracle. - use std::fs::File; use std::io::BufReader; use std::path::PathBuf; diff --git a/crates/ec-pgs/fuzz/seed.sh b/crates/ec-pgs/fuzz/seed.sh index 6eaae01e..772d553a 100755 --- a/crates/ec-pgs/fuzz/seed.sh +++ b/crates/ec-pgs/fuzz/seed.sh @@ -1,9 +1,4 @@ #!/usr/bin/env bash -# seed.sh: fill fuzz/corpus// from the repo's PGS fixture. -# -# open/fate/sub/pgs_sub.sup is a PGS stream of display sets. segments gets the file's first 64 KiB -# as is. compose and rle get the same bytes too; those two read their own input layouts, so the -# seeds are mostly rejects, which still steer the mutator. Corpus lives under fuzz/corpus. set -euo pipefail FUZZ_DIR=$(cd -- "$(dirname -- "$0")" && pwd) diff --git a/crates/ec-subs/fuzz/seed.sh b/crates/ec-subs/fuzz/seed.sh index 8c014165..a5191b7f 100755 --- a/crates/ec-subs/fuzz/seed.sh +++ b/crates/ec-subs/fuzz/seed.sh @@ -1,8 +1,4 @@ #!/usr/bin/env bash -# seed.sh: fill fuzz/corpus// from the repo's subtitle fixtures. -# -# subs/TOS-en.srt seeds srt, markup and ir. A WebVTT twin of it (commas become dots, a -# WEBVTT header goes on) seeds webvtt, markup and ir. Corpus lives under fuzz/corpus, git-ignored. set -euo pipefail FUZZ_DIR=$(cd -- "$(dirname -- "$0")" && pwd) diff --git a/crates/ec-subs/tests/open_media.rs b/crates/ec-subs/tests/open_media.rs index e78eaff3..85148006 100644 --- a/crates/ec-subs/tests/open_media.rs +++ b/crates/ec-subs/tests/open_media.rs @@ -1,6 +1,3 @@ -//! The three parsers against open subtitle media: the Tears of Steel SubRip file, an ASS script -//! generated from it, and a FATE PGS display set. - use ec_subs::{SourceFormat, plain_text}; fn fixture(rel: &str) -> Vec { @@ -14,7 +11,6 @@ fn a_real_subrip_track_parses_whole() { assert_eq!(track.source, Some(SourceFormat::Srt)); assert!(track.cues.len() > 100, "{} cues", track.cues.len()); assert_eq!(track.skipped, 0, "a whole file should have no torn blocks"); - // Every cue is up for a positive time and says something. for cue in &track.cues { assert!(cue.end_us >= cue.start_us); assert!( @@ -23,7 +19,6 @@ fn a_real_subrip_track_parses_whole() { cue.start_us ); } - // A subtitle track runs forwards. assert!( track .cues @@ -40,8 +35,6 @@ fn a_real_ass_script_parses_whole() { assert!(!track.styles.is_empty(), "a script declares styles"); assert!(track.cues.len() > 100, "{} cues", track.cues.len()); assert_eq!(track.skipped, 0, "a whole script should have no torn rows"); - // Every cue names a style the script declared, and most say words: a - // signs-and-songs script has drawing-only lines, which are not words. let with_text = track .cues .iter() @@ -60,11 +53,9 @@ fn a_real_ass_script_parses_whole() { "cue names undeclared style {style:?}" ); } - // Override tags never leak into the words. let text = plain_text(&cue.segments); assert!(!text.contains("{\\"), "override tag in text: {text:?}"); } - // The header is replayable as a Matroska `CodecPrivate`. assert!(track.extradata.windows(8).any(|w| w == b"[Events]")); } @@ -89,19 +80,16 @@ fn a_real_pgs_stream_decodes_to_plausible_bitmaps() { .filter(|p| p[3] > 0) .count(); if opaque == 0 { - // An erase display set: a set that composes nothing at all. continue; } painted += 1; let coverage = opaque as f64 / (w * h) as f64; coverage_max = coverage_max.max(coverage); - // Subtitles are lines of text over a film: ink, not a filled canvas. assert!( coverage > 0.000_1 && coverage < 0.25, "display set {frames} covers {:.3}% of the canvas", coverage * 100.0 ); - // The ink sits in the lower or upper band, never as a single stray row. let rows = (0..h) .filter(|y| { frame.planes[0].data[y * stride..(y + 1) * stride]