forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

edith-gap-audit.md19.8 KiBHistoryRawDownload

edith gap audit: DONE.md edith-side criteria vs codecs-integration

Read-only audit, 2026-10-17. Sources: ~/.cache/wt/edith-integ (branch codecs-integration, HEAD 466b849), lanes/edith-*.report.md (22 files), DONE.md. No edith tree was checked out, built or modified. Line numbers are in crates/engine/src/... of the integration worktree unless noted.

Git state

  • git -C ~/.cache/wt/edith-integ log --oneline -15:
    466b849 Merge lane-hwplugfails: VP8 plugin seek past hidden alt-ref, seat guards serialise VE_SW, anamorphic test reads outcome once
    90e7ce5 fix(tests): pin the decode seat per test, not per process
    6843aff fix(engine-hw): VP8 seek counts hidden frames as container slots
    9f13f8e Merge lane-hevcrefuse: HEVC open refuses streams whose parameter sets don't parse
    a4bc0f4 fix(decode): refuse an HEVC stream whose VPS/SPS/PPS do not parse
    fbf0f85 Merge lane-hwcleanup: frame_num repair and slice_fix.rs removed (ec-hw restarts at IDR)
    8f234db refactor(engine-hw): drop the H.264 slice_fix repair; ec-hw writes frame_num and POC at IDR
    706ec4c Merge lane-enginehw: engine-hw on ec-hw/ec-va; cros-codecs, cros-libva, gbm and their vendor copies removed
    ac1a451 style(engine-hw): clippy fixes in the ec-hw encode seat and its slice-header reference
    d404a6b refactor(engine-hw): H.264 encode onto ec-hw; cros-codecs and gbm removed
    bcf0063 Merge codecs-integration into lane-enginehw
    c1e33db Merge lane-depguard: oxideav-core removed; dependency guard test (PENDING_WAVE2: cros-codecs, cros-libva, gbm)
    758ddb1 test(deps): guard engine, engine-hw and engine-audio against removed media crates
    89fe665 chore(deps): drop the unused oxideav-core dependency
    134ac93 refactor(engine-hw): HEVC and AV1 encode seats onto ec-hw::Encoder
    
  • Commits on codecs-integration not in edith main: 49 (git log --oneline main..codecs-integration | wc -l). main is at ac0f5ca in /home/user/Documents/Code/Rust/edith.

Banned-dependency check (Cargo.lock and Cargo.toml)

Crate In Cargo.lock Who pulls it
symphonia-codec-aac no gone
hound no gone
flacenc no gone
mp4, mp4parse, ogg, oxideav-*, cros-codecs, cros-libva, gbm no gone
miniz_oxide, flate2 yes png/tiff/exr/usvg, all behind image in the app crate (crates/app/Cargo.toml:14). ec-inflate's flate2 is a dev-dependency only.
image yes crates/app/Cargo.toml:14 (direct, 7 use sites in crates/app/src) and gpui. Engine has no image dependency. ec-image's image is a dev-dependency only.
ravif yes pulled by image (app only)
rav1e, symphonia, symphonia-core yes allowed by DONE.md
vendor/ only proc-macro-error2 matches DONE.md

engine/Cargo.toml normal dependencies contain no banned crate. DONE.md's global goal ("Cargo.lock contains no third-party media crate except rav1e and symphonia") is not met literally, because of image/ravif/png/miniz_oxide/flate2 in the app's tree. This is the orchestrator's documented exception (DONE.md Milestones, 2026-10-16).

Per-crate table

Gate-5 column = whether an edith integration test exists that drives the crate through edith's call site. "Ignored" means #[ignore] (VA-API plugin or other hardware). "Media" notes what the test needs on disk.

Crate (tier) 1. edith calls it? 2. DONE.md edith-side criterion 3. edith test (file, ignored, media) 4. Banned dep 5. Missing work
ec-h264 dec (P0) Yes. decode.rs:16 use ec_h264::H264Decoder; decode.rs:3849 software seat. "edith: software decoder whenever VA-API is missing or fails (decode.rs:1297, :3766)". Met: software seat wired. sw_backends.rs::sw_decode_matches_ffmpeg_byte_for_byte (not ignored; ../../assets fixtures, ffmpeg oracle). h264_mkv.rs::opening_an_h264_matroska_file_shows_frames (not ignored). none Gate work only (D1 interlaced/High10 deferred; 1080p realtime; real_library 15/15 is the crate's).
ec-h264 enc (P0) Yes. export.rs:68 import; export.rs:4395 cfg.preset = Preset::Fast; export.rs:4404 Encoder::new(cfg). "edith: software H.264 export (export.rs:4407), Preset::Fast, no B-frames". Met as a call. Encoder-side bars (BD-rate ≤ +20%, currently +20 to +42%) are not edith's. export.rs::exports_an_edited_timeline_in_software, export.rs::a_higher_bitrate_writes_a_bigger_file (not ignored; assets/). none BD-rate gap vs x264 veryfast (+20 to +42%).
ec-h265 dec (P0) Yes. decode/hevc.rs:27-29 ec_h265::Decoder; decode.rs:60 Codec::Hevc => hevc::Stream::open; decode.rs:190 probe falls back to Backend::Software. "edith: ec-h265 is the software HEVC backend for playback, proxies and export input. The needs_plugin refusal for HEVC is removed." Partly met. Software seat covers playback (decode.rs:190) and export (Pulled::open, decode.rs:60). Not removed: the Codec::Hevc arm of needs_plugin still exists at demux.rs:144-161. Trace shows no reachable path to it. Proxy path not checked. hevc_sw.rs::the_software_seat_takes_hevc_with_the_plugin_off, ::the_software_seat_decodes_and_seeks_hevc, ::a_4_2_2_hevc_file_is_refused_by_name_at_open, ::the_software_seat_times_1080p_hevc (not ignored; needs generated assets/test_hevcsw_*.mp4/.mkv from scripts/gen_fixtures.sh, ffmpeg libx265). hevc.rs::the_software_path_opens_hevc (not ignored). Plugin-only twins ignored (hevc.rs:148,181,238). none Remove the Hevc arm/text from needs_plugin. Real-library HEVC bit-exact (phone clips); 2x realtime; WPP/threads. D1/D8 (RExt) deferred.
ec-h265 enc (P0) Yes. export.rs:69 import; export.rs:4539-4549 HevcEncoder::new(cfg), RateControl. "edith: software HEVC export (export.rs:69), intra-only today". Call met. Inter-frame status in edith not verified in this audit. hevc_export.rs::an_hevc_export_reopens_through_our_own_demuxer_in_either_container, ::a_1080p_export_states_1920x1080_through_the_conformance_window, ::an_audio_only_timeline_is_refused_an_hevc_export_by_name, ::a_cancelled_hevc_export_leaves_no_file_behind (not ignored). Ignored, need VA-API: hevc_export.rs:179 (an_hevc_export_decodes_back_into_pictures_through_edith), :218 (a_1080p_hardware_export_leaves_a_decoder_with_nothing_to_say). none Inter-frame encode verified in edith export; Main 10 only if 10-bit export starts (open).
ec-av1 dec (P0) Yes. decode.rs:10-11 ec_av1::encode::Picture, ec_av1::stream::decode_stream_with; software seat decode.rs:4002. Export refusal export.rs:5236 needs_plugin for AV1 (no pulled seat). "non-4:2:0 AV1 is refused at demux with a named reason." Met: av1.rs::a_non_420_av1_file_is_refused_at_open_by_name (not ignored). av1.rs::the_software_seat_decodes_every_frame, ::the_software_seat_decodes_ten_bit_av1, ::a_monochrome_av1_file_opens_and_decodes, ::a_420_av1_file_in_either_container_opens_and_decodes, ::a_timeline_takes_av1_on_a_machine_with_no_plugin (not ignored; assets/). 7 hardware twins ignored. none (rav1e allowed) 1080p8 threaded realtime (EC_AV1_THREADS); split of decode.rs/stream.rs (61k/57k lines); clippy items; AOM conformance. Export of AV1 through software still refused.
ec-vp9 (P1) Yes. decode/vp9.rs:14 ec_vp9::decode::{Decoder, Picture}; decode.rs:61 Codec::Vp9 => Pulled; export uses the same seat (hevcexport lane). "edith uses ec-vp9 as its software VP9 backend (playback, proxy, export input), and the needs_plugin refusal is removed for VP9." Partly met. Playback and export use it. Not removed: the Vp9 arm/text of needs_plugin (demux.rs:144-161), unreachable by trace. vp9sw report's "export stays refused" is superseded by hevcexport. Proxy not checked. vp9.rs::ec_vp9_matches_libvpx_sample_for_sample, ::the_software_seat_decodes_and_seeks_vp9, ::the_software_path_opens_vp9, ::a_profile_1_vp9_file_is_refused_by_name (not ignored; assets/). Plugin twins ignored (vp9.rs:152,183). none Remove Vp9 arm/text from needs_plugin. 1080p30 realtime (no threading yet). Dead-code removal and stale reports (vp9inter, vp9hbd).
ec-vp8 (P0) Yes, from engine directly. decode/vp8.rs:21 ec_vp8::decode::{Decoder, Picture}; decode.rs:62 Codec::Vp8 => Pulled. Also engine-hw/src/vpx.rs:25. "edith calls it from engine directly, not only through engine-hw." Met. Engine call exists. vp8engine report's "export keeps VP8 refusal" is stale; Pulled::open covers VP8. vp8.rs::ec_vp8_matches_libvpx_picture_for_picture, ::the_software_seat_decodes_and_seeks_vp8, ::the_software_path_opens_vp8, ::the_demuxer_reports_a_vp8_track (not ignored; assets/). Plugin twins ignored (vp8.rs:77,119). none Ec-side panic/debug_assert items (not checked here). No threading. Hidden-frame playback hole (product decision).
ec-aac (P0) Yes. audio.rs:1889 ec_aac::is_adts; audio.rs:1968-2018 AacDecoder; adts.rs:111 parse_adts; encode export.rs:2324 AacEncoder. "All AAC in edith routes through ec-aac, mono and stereo included." Met: symphonia-codec-aac absent from lock. audio_aac.rs::stereo_he_aac_opens_at_its_sbr_rate_and_decodes, ::stereo_he_aac_in_matroska_decodes_at_the_same_rate, ::stereo_aac_lc_matches_ffmpeg_per_channel, ::symphonia_codec_aac_is_not_an_engine_dependency, ::bare_adts_he_aac_matches_ffmpeg_per_channel, ::mp4_he_aac_with_an_implicit_config_opens_at_its_sbr_rate (not ignored; generated media, ffmpeg). none (symphonia-codec-aac absent) D4 HE-AAC v2 (PS) decode (decision yes; status in edith not checked). Encode objective score and ±5% rate are ec-side gates.
ec-opus (P0) Yes. Decode audio.rs:1780, :1922 ec_opus::MultistreamDecoder; encode export.rs:2432 ec_opus::Encoder. "the only Opus decoder ... and the Opus encoder for MKV export (export.rs:2438)." Met. opus_export.rs::an_edited_opus_source_leaves_a_matroska_export_as_opus (not ignored; opus_export.rs 5 tests per swapogg report). export.rs unit tests at :5463, :5477. none Ec-side: RFC 6716/8251 vectors run and recorded; SILK budget; dropout gate.
ec-vorbis (P0) Encode only. export.rs:3935 ec_vorbis::VorbisEncoder. No ec_vorbis decode call found in engine or app. "edith: decode and .ogg export." Export met; decode not met (no edith call to ec-vorbis decode). Decode path for Vorbis not traced further. audio_export.rs::exports_the_timeline_as_an_ogg_vorbis, ::a_mono_timeline_exports_as_dual_mono_ogg (not ignored; ffmpeg). none Wire Vorbis decode through ec-vorbis, or record that decode stays on symphonia.
ec-mp3 (P0, encode) Yes, encode. export.rs:3835 ec_mp3::encode::Mp3Encoder. Decode stays on symphonia (per DONE.md). "edith: MP3 export (export.rs:3832)." Met. audio_export.rs::exports_the_timeline_as_an_mp3 (not ignored; ffmpeg). none Gate work only (criteria are "nearly done").
ec-ac3 (P0) Yes. audio.rs:2308-2427 ec_ac3::syncinfo/bsi/eac3::parse; audio.rs:2485-2490 Ac3Decoder::with_options. "AC-3 and E-AC-3 independent substreams match ffmpeg on real_library.toml, through 5.1." Met on the ec side (truehdexact report, DONE log 2026-10-17, correlation >= 0.999). Edith-side evidence is correlation-based through the stereo fold. audio_decode.rs::an_ac3_track_decodes_and_51_comes_down_to_stereo, ::matroska_ac3_and_eac3_decode_out_of_the_blocks (not ignored; some gated on real_library.toml). audio_ac3_film.rs::a_seek_into_his_ac3_film_lands_on_the_second_it_asked_for, ::a_seek_into_his_eac3_film_... (need the real film; skip with let-else when absent). none E-AC-3 7.1 dependent substreams (D5) on the edith side not verified. Downmix is edith's stereo fold.
ec-truehd (P1) Yes. audio.rs:3642, :3713 ec_truehd::TrueHdDecoder::new(). "edith decodes TrueHD through it from MKV." Met. audio_truehd.rs::stereo_truehd_in_matroska_opens_at_its_rate_and_channels, ::surround_truehd_in_matroska_reaches_the_timeline_as_a_pair, ::stereo_truehd_matches_ffmpeg_sample_for_sample, ::surround_truehd_folds_to_ffmpegs_stereo_by_correlation (not ignored; fixtures made by ffmpeg at test time; skipped loudly if ffmpeg is absent). none Atmos substream 4 skip in ec-truehd (edith report "Left"). mp4 TrueHD not demuxed. 5.1 fold verified by correlation only.
ec-flac (swap wave 1, no DONE section) Yes, encode. flac_write.rs:10,25 ec_flac::EncoderConfig, ec_flac::encode. Swap criterion "flacenc → ec-flac encode, match flacenc's compression level and bit depths edith exports." Met for the swap (flacenc absent). Export still 16-bit only (swapflacenc report). flac_export.rs::flac_16_bit_stereo_decodes_to_the_same_samples, ::flac_24_bit_stereo_..., ::flac_24_bit_51_... (not ignored; needs ffmpeg, ffprobe, md5sum on PATH). audio_export.rs::exports_the_timeline_as_a_flac. none (flacenc absent) 24-bit export is a separate decision. Export holds all samples in memory.
ec-riff (swap wave 1, no DONE section) Yes. export.rs:3798-3808 ec_riff::WavOptions, WavWriter::create_with_options. Swap criterion "hound → ec-riff WavWriter; RF64 for > 4 GB." Met for the swap (hound absent). RF64 proven in ec-riff (swaphound: writes_past_four_gib_as_rf64 passed, 146 s). audio_export.rs::exports_the_timeline_as_a_wav, ::the_wav_export_is_ffprobe_clean_and_decodes_to_the_same_pcm (not ignored). none (hound absent) No edith test reaches 4 GB, so RF64 is covered only in ec-riff (which is #[ignore]d, 146 s).
ec-inflate (swap wave 1, no DONE section) Yes. demux.rs:2405 ec_inflate::inflate_zlib(buf, LIMIT). Swap criterion "swap demux.rs:2363 to inflate_zlib(input, LIMIT)." Met (line moved to 2405). mkv_encodings.rs::a_zlib_subtitle_track_inflates_into_cues (not ignored; fixture built byte by byte, no ffmpeg). Unit: engine/src/demux/zlib_tests.rs. miniz_oxide and flate2 still in Cargo.lock via app image→png (not via engine or ec-inflate normal deps) Lock-level removal depends on the app image exception.
ec-mp4 (swap wave 2, no DONE section) Yes. demux.rs:1107, :4747 ec_mp4::Mp4Demuxer; mux.rs:316 ec_mp4::Mp4Muxer; proxy.rs:914; mp4track.rs:14. Swap criterion (wave 2 mp4 row): sample entries, esds quirk, rotation/edit-list/stss-ctts parity. Mostly met: swapmp4 report, 877 passed, 1 known failure (playback::import_refuses_what_does_not_match) on server. export.rs::mp4_interleaves_a_mix_that_lands_early_under_the_rest_of_the_picture, ::mp4_audio_interleaves_with_the_picture (not ignored). decode_baseline.rs::decodes_baseline_mp4. import_mp4_subs.rs::an_mp4_export_comes_back_with_the_subtitles_it_left_with. audio_decode.rs::decodes_av_mp4_audio. (Some need assets/.) none (mp4 absent) Symphonia isomp4 still reads ALAC/MP3/FLAC in mp4 (fallback in audio.rs). tkhd_matrix hand-written (ec-mp4 gap). TX3G_STYLE constant. Parity harness only in history (4120e51).
ec-matroska (listed; no DONE section) No. No ec_matroska reference in edith. DONE.md says this is optional consolidation, not required. N/A. none none Optional: move edith's own Matroska reader/writer (demux.rs, mux.rs) onto ec-matroska. Gaps: projection roll, Cues tolerance, V_AV1/HEVC CodecPrivate parity.
ec-ogg (swap wave 3, no DONE section) Yes. export.rs:3962 ec_ogg::xiph_lace; :3976 ec_ogg::OggMuxer::new; :3993 granule_side_data. Wave-3 row: Vorbis header lacing parity (export.rs:3957). Met per swapogg (audio_export 15/15; mono output differs and is recorded as intentional). Opus pre-skip gap is N/A for Ogg (orchestrator correction, DONE.md 2026-10-16). audio_export.rs::exports_the_timeline_as_an_ogg_vorbis, ::a_mono_timeline_exports_as_dual_mono_ogg (not ignored; ffmpeg). none (oxideav-ogg, oxideav-core absent) DONE.md wording still points the Opus pre-skip gap at Ogg (mux.rs:1715-1731 is the Matroska writer). Fix or close as N/A.
ec-image (swap wave 3, no DONE section) Yes. decode.rs:1780-1782 ec_image::probe_reader; :1827 ec_image::open; :1884 ec_image::transform. App: ui/preview.rs:637 encode_rgba8. Wave-3 row: pixel-format mapping in engine and app; EXIF orientation by edith. Met for engine (engine/Cargo.toml:23: "The image crate is no longer a dependency"). App keeps image (crates/app/Cargo.toml:14), allowed by the gpui exception. images.rs::a_placed_still_shows_its_own_pixels_on_the_canvas, ::a_still_trims_out_to_its_cap_and_no_further, ::a_still_at_saved_source_zero_keeps_the_rate_and_the_sound (not ignored; assets/ stills). exif_orientation.rs (not ignored). image, ravif, png, miniz_oxide, flate2 in Cargo.lock via app (exception) App image removal needs gpui off image::Frame. App still has 7 image:: uses (player/transport.rs:236, player/export.rs:157, ui/preview.rs:457, tests/media.rs:1662). TIFF orientation not read (not admitted).
ec-subs (swap wave 3, no DONE section) Yes. subtitle.rs:33 ec_subs::plain_text; :519 ec_subs::srt::parse; :606-607 srt/webvtt::parse. Wave-3 row: map cue IR to edith Segment (subtitle.rs:522, :609). Met (swapsubs, commit 8bd572a). export_subs.rs::an_mkv_export_carries_the_picked_subtitle_track, ::an_mp4_export_carries_the_picked_tracks_as_timed_text, ::a_cut_moves_the_mp4_cues_with_the_pictures (not ignored; assets/). saveload.rs (long SRT). none (oxideav-subtitle absent) None found beyond gates.
ec-ass (swap wave 3, no DONE section) Yes. subtitle.rs:556 ec_ass::parse; :608 "ass" | "ssa" => ec_ass::parse. Wave-3 row: plus Segment::Raw override-tag handling (subtitle.rs:559, :611). Call met. Override-tag parity covered by unit tests in src/subtitle/parity.rs (not integration). No ASS-named integration test found. Unit: src/subtitle/parity.rs. none (oxideav-ass absent) Add an integration test that drives an .ass file through subtitle.rs (gate 5).
ec-pgs (swap wave 3, no DONE section) Yes. subtitle.rs:108-118 ec_pgs::SEG_PCS, SEG_END, PgsDecoder::new(). Wave-3 row: epoch/display-set handling (subtitle.rs:90-114). Call met. pgs_bitmaps.rs::the_session_maps_a_pgs_track_onto_the_timeline_and_draws_it (not ignored, but returns early with a silent pass when real_library.toml hevc_4k_pgs is absent, pgs_bitmaps.rs:20-21). none (oxideav-sub-image absent) Run the PGS test on real media (swapsubs says skipped on server and not run locally). Without that, gate 5 is not verified.

Notes and conflicts with stale reports

  • needs_plugin text is still in code. demux.rs:144-161 has arms for HEVC, VP8, VP9 and AV1. The Pulled::open seats (decode.rs:55-65) return Some for HEVC, VP9 and VP8, so the HEVC/VP8/VP9 arms are unreachable. The AV1 arm is still reached from export (export.rs:5236). DONE.md's "the needs_plugin refusal is removed" is met in behaviour but not in the code.
  • vp9sw report says VP9 export stays refused. That is superseded by hevcexport, which routes export through the software seats.
  • vp8engine report says VP8 export keeps its refusal. Superseded for the same reason.
  • swapinflate report says miniz_oxide is in the engine's transitive tree via image. The lock check here shows it is via the app's image, not the engine's normal tree.
  • Edith tests need local fixtures. Most edith integration tests read crates/engine/../../assets/ (gitignored, generated by scripts/gen_fixtures.sh with ffmpeg). Real-library tests use real_library.toml and return early when it is absent.
  • Silent passes. pgs_bitmaps.rs (no real_library), audio_truehd.rs (skips without ffmpeg), and the let-else real-film tests all pass without running their assertions when media is missing. Counts in the lane reports should be read with that in mind.