forge
Explore
Log in

Don't you dare go Hollow

edith

Clone
★ 0

0 watching0 forksRust18.3 MiB0563cbfTahinli2 months ago824 commits

Cargo.toml101 lines, 6.2 KiBHistoryRawDownload
1[workspace]
2resolver = "3"
3members = ["crates/engine", "crates/engine-hw", "crates/engine-audio", "crates/app"]
4# Vendored third-party (see [patch.crates-io]); not ours to build or test.
5exclude = [
6 "vendor/cros-libva",
7 "vendor/cros-codecs",
8 "vendor/rusty_aac",
9 "vendor/oxideav-h265",
10 "vendor/rusty_h264-common",
11 "vendor/mp4",
12]
13
14[workspace.package]
15version = "0.1.0"
16edition = "2024"
17
18# Five upstream crates vendored verbatim except for one clearly marked fix each,
19# all blockers on this machine and all still unfixed upstream as of
20# 0.0.6/0.0.13/0.5.0/0.0.9/0.9.1:
21# cros-libva - fails to build against libva >= 1.23 headers
22# cros-codecs - probes VA-API with a 16x16 context that Mesa radeonsi refuses;
23# and creates every decode context as 8-bit 4:2:0, which no HEVC
24# Main 10 stream can decode into (its own TODO, its own answer);
25# and refuses an H.264 frame_num gap outright unless the stream
26# declared one, which fails every seek into an open-GOP Blu-ray
27# remux -- the gap is the *editor's*, made by restarting at a
28# random access point, so the patch fills it with the §8.2.5.2
29# non-existing frames the loop right below it already builds.
30# It also has no HEVC *encoder* at all in 0.0.6: the seven
31# commits behind cros-codecs' own `hevc-vaapi-encoder` branch
32# (`codec/h265/{nalu_writer,synthesizer}`, the VPS/SPS/PPS
33# builders in `codec/h265/parser.rs`, `encoder/stateless/h265`
34# with its predictor and VA-API backend, and the H.264 NALU
35# writer's emulation-prevention fix that shares that code) are
36# applied here verbatim -- upstream work carried early, not a
37# local invention, and the H.265 half of what makes edith's
38# HEVC export run on the GPU.
39# And `video_frame/generic_dma_video_frame.rs` unmapped a DMA
40# buffer by issuing one `CLFLUSH` per *byte* -- 64 per cache
41# line, 3.1 million per 1080p picture, 6.2 ms of the 8.4 ms a
42# hardware export spent per frame (measured on radeonsi
43# 2026-08-13; upstream's own TODO asks for exactly this and
44# reports a race that the mfence pair, not the redundancy, was
45# always ordering). The same `drop` wrote its `munmap` as an
46# unconsumed `.map()`, so no mapping was ever released and an
47# encode session leaked 3 MB of address space per frame
48# (2.2 GB over a 719-frame export). Both are fixed in place
49# and marked LOCAL PATCH
50
51# rusty_aac - its *decoder* runs the direct O(N²) IMDCT with a `cos` call per
52# term (the fast path in the same file serves the encoder only),
53# which is 4x slower than real time for 5.1 and therefore not
54# playable at all; the patch routes the IMDCT through the same
55# N/4-point FFT the encoder's MDCT already uses (`dsp::dct4`),
56# 40x the matrix version it started as -- 2 hours of 5.1 for a
57# waveform in 2.4 minutes rather than an hour
58# oxideav-h265 - its intra encoder writes `conformance_window_flag = 0` and
59# refuses any dimension that is not a multiple of the 16-sample
60# CTB, so 1920x1080 could not be written at all; the patch adds
61# the §7.4.3.2.1 conformance window (`SpsCfg::conf_win`, one
62# marked block in `encoder/intra.rs`) so the picture is coded
63# padded to 1920x1088 and *displayed* at 1920x1080. Taken from
64# git master rather than the registry -- crates.io 0.0.9 is the
65# pre-encoder release -- at rev d35963a02c872d12e6878b4ed3cf17a
66# 69bde5a6e, and it is a plain path dependency (no
67# `[patch.crates-io]` line) because nothing else in the tree
68# asks for it.
69# rusty_h264-common - declares `rusty_alloc` (its authors' own mimalloc
70# remake) as the `#[global_allocator]` of whatever application
71# links it, under a feature that `rusty_h264-{decoder,encoder}`
72# turn on from *their* defaults, so no downstream feature choice
73# can decline it. It crashed us: under sustained ruler scrubbing
74# edith churns decode-worker threads, and that allocator
75# segfaulted inside `span_from_segments` on a new thread's first
76# allocation (two cores, 2026-08-13). The patch is the feature
77# default and the six-line declaration in `src/lib.rs`; every
78# line of codec code is byte-identical to 0.9.1, so decode stays
79# bit-exact and the process gets glibc's malloc back.
80# mp4 - reads the `mp4a` sample entry as ISO only: the 8 bytes
81# QuickTime uses for version/revision/vendor are skipped as
82# reserved, so a version-1 SoundDescription's 16-byte tail
83# (version 2's 36-byte one) is taken for the first child box
84# and the `wave`-wrapped `esds` behind it is never seen -- an
85# AAC track "with no esds", every Resolve / Final Cut / `ffmpeg
86# -f mov` file silent. The patch is `Mp4aBox::read_box` and a
87# `WaveBox` fourcc; writing is untouched.
88# Drop `vendor/` entirely once released versions handle all six.
89[patch.crates-io]
90cros-libva = { path = "vendor/cros-libva" }
91cros-codecs = { path = "vendor/cros-codecs" }
92rusty_aac = { path = "vendor/rusty_aac" }
93rusty_h264-common = { path = "vendor/rusty_h264-common" }
94# Drops the `pub use proc_macro;` re-export (E0365 future-incompat, rustc
95# warns on every workspace build); nothing in the crate or its users names it.
96proc-macro-error2 = { path = "vendor/proc-macro-error2" }
97# Reads QuickTime version-1/2 sound sample descriptions (Resolve, Final Cut,
98# `ffmpeg -f mov`): the 16/36-byte block after samplerate and the `esds`
99# inside the `wave` wrapper. Stock 0.14 walks past both and calls the AAC
100# track esds-less, so a `.mov` opens without sound.
101mp4 = { path = "vendor/mp4" }