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