forge
Explore
Log in

Don't you dare go Hollow

edith

Clone
★ 0

0 watching0 forksRust18.3 MiB978e685Tahinli3 months ago627 commits

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