forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

edith-edithgaps1.report.md7.0 KiBHistoryRawDownload

edith lane edithgaps1: report

Branch lane-edithgaps1 (worktree ~/.cache/wt/edith-edithgaps1), base codecs-integration at 466b849. Commit 025ed7b ("✅ test(engine): ..."). Nothing pushed. The main edith checkout was not touched.

Status

Tasks 1 to 3 are done in code. Task 4 (Vorbis routing) was tried and backed out. The verify requirement (cargo test -p engine green, clippy) is not met: the suite was run, but some tests failed under heavy load, and I did not finish the run or get a clean baseline.

Changes (commit 025ed7b)

  1. Dead refusals (task 1). engine/src/demux.rs Codec::needs_plugin now returns Option<String> and is Some only for AV1, the one codec export still refuses (its decoder is chunked, so Pulled has no seat). The HEVC, VP8, VP9 arms and the generic "there is no software {name} decoder" text are removed.
    • export.rs AV1 None arm: uses the AV1 text, else "{name} has no export seat" (unreachable in practice).
    • decode.rs hw_decodes: the plugin-missing branch now says "the VA-API plugin did not open this {name} stream" (its Err is discarded by probe, so no user sees it).
    • tests/playback.rs import_refuses_what_does_not_match: the VP9 Err arm used Codec::Vp9.needs_plugin(); it is now a panic! (VP9 must join through its software seat). Comment updated.
  2. Gate 5 for ec-ass (task 2). New crates/engine/tests/ass_subtitles.rs. It writes an .ass with two styles (Default, Sign) and override tags (\i, \b, \an8, \c, \pos, \N) in the test and drives it through subtitle::open(path, None) (the standalone-file call site, subtitle.rs:556/:608). It asserts the exact cue list (start/end us and resolved text) and that no style name or tag leaks into text. Both tests pass.
  3. PGS strictness (task 3). tests/pgs_bitmaps.rs: when real_library::film("hevc_4k_pgs") is None it prints SKIP pgs_bitmaps: ... and returns; with EC_REQUIRE_FIXTURES=1 it panics instead. Note: cargo captures stderr of passing tests, so the SKIP line shows only under --nocapture. No ffmpeg PGS sample: ffmpeg -encoders has no PGS encoder (pgssub is decode-only, ffmpeg 8.1.3), so no generated PGS test was added. A .sup/PGS Matroska sample would need a hand-written encoder, and subtitle::open does not read .sup at all.
  4. Vorbis decode (task 4). Edith decodes Vorbis with symphonia (audio.rs Track::decoder, the generic SymDecoder::Sym). I routed it to ec-vorbis (a SymDecoder::Vorbis arm, with the extra_data split into ident (30 bytes) + setup and an empty comment header). Result:
    • Full decode of Ogg and Matroska Vorbis matched ffmpeg with correlation 1.000000 per channel, aligned at the start.
    • But ec-vorbis does not trim the final granule: the decoded Ogg ran 440 frames (2 s stereo file) and about 1640 frames (the audio_export fixture) longer than ffmpeg/symphonia. Two existing tests audio_export::exports_the_timeline_as_an_ogg_vorbis and ::a_mono_timeline_exports_as_dual_mono_ogg failed on length (266240 vs 264600; 45056 vs 44100). Symphonia matches exactly.
    • Decision: backed out (audio.rs, caps.rs reverted). After the revert, audio_export is 15/15.
    • Kept: tests/audio_vorbis.rs, 3 tests (stereo Ogg, stereo Matroska, mono Ogg) comparing edith's decode to ffmpeg. They pass on symphonia, which matched ffmpeg's length exactly (gap 0 in the earlier experiment). The file header documents the backout.
    • Pre-existing seek fault, found while testing: a seek into an Ogg Vorbis file (open_at(1.0)) yields samples 1025 frames off the full run's timeline (constant across seek targets 0.5 s and 1.0 s, correlation 1.000000 at shift -1025). It happens with symphonia as well as with ec-vorbis, so it is in the shared seek/window path, not the decoder. Not fixed here; a follow-up for the audio owner.
    • ec-vorbis side (edith_codecs, not this lane): trim the final granule so the decode length matches the container, then route Vorbis.

Verify commands and results

Run through scripts/remote-run.sh edithgaps1 --with-edith from the edith_codecs checkout, with EDITH_TREE=~/.cache/wt/edith-edithgaps1. Hosts were heavily loaded by other users (load average 15 to 60 on c, up to 31 on a), which made the export-heavy tests time out.

  • cargo test -p engine --test ass_subtitles: 2 passed, 0 failed.
  • cargo test -p engine --test audio_vorbis (ec-vorbis routed): 3 passed; after backout (symphonia): 3 passed.
  • cargo test -p engine --test audio_export after backout: 15 passed.
  • cargo test -p engine --test anamorphic (alone): 5 passed.
  • cargo test -p engine --lib playback::tests::a_rate_undo (alone): 1 passed.
  • cargo test -p engine --no-fail-fast, first run on host c (routing still in, before backout): failed audio_export Vorbis x2 (the length regression above), anamorphic (120 s export limit under load), and playback::tests::a_rate_undo_reseeks... and a_single_paused_tick_inside... ("no frame within 20s").
  • Second full run on host c (after backout), partial, killed at load 60: failures recorded:
    • playback::tests::a_single_paused_tick_inside_the_dissolve_window_is_already_blended: "no frame within 20s of the seek". Not re-run alone at the time of writing.
    • an_av1_export_reopens_through_our_own_demuxer (av1.rs:589): "export did not finish in limit" (900 s total).
    • export_subs.rs tests a_cut_moves_the_cues_with_the_pictures, a_caption_past_the_last_picture_is_cut_off_with_the_file, a_lane_is_a_track_and_the_lanes_order_the_file, a_lane_of_pictures_is_refused_in_words_and_written_nowhere reported FAILED. Their panic messages were not read (the run was killed before the failures section printed).
  • Third full run on host a (detached, log ~/tmp/edithgaps1/fulla.log on a): still inside export_subs after about 60 minutes at load 20 to 31. Not finished; no final count.

Not verified:

  • Whether the export_subs and playback/av1 failures are caused by this change or by load. The changed code paths (AV1-only needs_plugin, the AV1 None arm in export) are not exercised by H.264/HEVC exports, so I believe they are load timeouts, but I did not prove it. A baseline run on codecs-integration is needed.
  • cargo clippy -p engine -- -D warnings: not run. Baseline cleanliness unknown.
  • rustfmt --check on the edited pre-existing files reports drift that predates this lane; I formatted only the new files.

Not done / left

  • Vorbis routing to ec-vorbis (needs the ec-vorbis final-granule trim first, and the seek fault above).
  • Seek fault in open_at for Vorbis (1025 frames), shared by symphonia and ec-vorbis.
  • PGS end-to-end test without real_library (no ffmpeg PGS encoder).
  • Stale comments that still say "no software decoder": tests/hevc_export.rs:173 and tests/export_color.rs:482. Left as-is (comments only).
  • Full suite to green on a quiet host, and clippy baseline.