edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBfbc29d1Tahinli2 months ago972 commits
| 1 | [workspace] |
| 2 | resolver = "3" |
| 3 | members = ["crates/engine", "crates/engine-hw", "crates/engine-audio", "crates/app"] |
| 4 | # Vendored third-party (see [patch.crates-io]); not ours to build or test. |
| 5 | exclude = [ |
| 6 | "vendor/cros-libva", |
| 7 | "vendor/cros-codecs", |
| 8 | |
| 9 | "vendor/mp4", |
| 10 | ] |
| 11 | |
| 12 | [workspace.package] |
| 13 | version = "0.1.0" |
| 14 | edition = "2024" |
| 15 | |
| 16 | # Three upstream crates vendored verbatim except for one clearly marked fix each, |
| 17 | # all blockers on this machine and all still unfixed upstream as of |
| 18 | # 0.0.6/0.0.13/0.14: |
| 19 | # cros-libva - fails to build against libva >= 1.23 headers |
| 20 | # cros-codecs - probes VA-API with a 16x16 context that Mesa radeonsi refuses; |
| 21 | # and creates every decode context as 8-bit 4:2:0, which no HEVC |
| 22 | # Main 10 stream can decode into (its own TODO, its own answer); |
| 23 | # and refuses an H.264 frame_num gap outright unless the stream |
| 24 | # declared one, which fails every seek into an open-GOP Blu-ray |
| 25 | # remux -- the gap is the *editor's*, made by restarting at a |
| 26 | # random access point, so the patch fills it with the §8.2.5.2 |
| 27 | # non-existing frames the loop right below it already builds. |
| 28 | # It also has no HEVC *encoder* at all in 0.0.6: the seven |
| 29 | # commits behind cros-codecs' own `hevc-vaapi-encoder` branch |
| 30 | # (`codec/h265/{nalu_writer,synthesizer}`, the VPS/SPS/PPS |
| 31 | # builders in `codec/h265/parser.rs`, `encoder/stateless/h265` |
| 32 | # with its predictor and VA-API backend, and the H.264 NALU |
| 33 | # writer's emulation-prevention fix that shares that code) are |
| 34 | # applied here verbatim -- upstream work carried early, not a |
| 35 | # local invention, and the H.265 half of what makes edith's |
| 36 | # HEVC export run on the GPU. |
| 37 | # And `video_frame/generic_dma_video_frame.rs` unmapped a DMA |
| 38 | # buffer by issuing one `CLFLUSH` per *byte* -- 64 per cache |
| 39 | # line, 3.1 million per 1080p picture, 6.2 ms of the 8.4 ms a |
| 40 | # hardware export spent per frame (measured on radeonsi |
| 41 | # 2026-08-13; upstream's own TODO asks for exactly this and |
| 42 | # reports a race that the mfence pair, not the redundancy, was |
| 43 | # always ordering). The same `drop` wrote its `munmap` as an |
| 44 | # unconsumed `.map()`, so no mapping was ever released and an |
| 45 | # encode session leaked 3 MB of address space per frame |
| 46 | # (2.2 GB over a 719-frame export). Both are fixed in place |
| 47 | # and marked LOCAL PATCH |
| 48 | |
| 49 | |
| 50 | # mp4 - reads the `mp4a` sample entry as ISO only: the 8 bytes |
| 51 | # QuickTime uses for version/revision/vendor are skipped as |
| 52 | # reserved, so a version-1 SoundDescription's 16-byte tail |
| 53 | # (version 2's 36-byte one) is taken for the first child box |
| 54 | # and the `wave`-wrapped `esds` behind it is never seen -- an |
| 55 | # AAC track "with no esds", every Resolve / Final Cut / `ffmpeg |
| 56 | # -f mov` file silent. The patch is `Mp4aBox::read_box` and a |
| 57 | # `WaveBox` fourcc; writing is untouched. |
| 58 | # A sixth, `rusty_h264-common`, left the tree on 2026-09-12 with the last |
| 59 | # `rusty_h264` seat: it was vendored only to declaw `rusty_alloc` -- its |
| 60 | # authors' allocator installed itself as the process `#[global_allocator]` and |
| 61 | # segfaulted the editor on a new thread's first allocation -- and once |
| 62 | # `ec-h264` carried both H.264 seats there was nothing left to patch. |
| 63 | # rusty_aac - a seventh vendor whose whole entry left with its last seat: |
| 64 | # `ec-aac`, the family's own, took the *encode* seat on |
| 65 | # 2026-09-13 after already carrying the decode one, and the |
| 66 | # vendored crate went with them. Its patch had routed the |
| 67 | # decoder's O(N^2) IMDCT through the encoder's N/4-point FFT |
| 68 | # (`dsp::dct4`, 40x the matrix version) so 5.1 was playable at |
| 69 | # all -- a fix for a crate the tree no longer carries. |
| 70 | # oxideav-h265 - an eighth: `ec-h265` took the HEVC encode seat on |
| 71 | # 2026-09-13, and the vendored tree (with its §7.4.3.2.1 |
| 72 | # conformance-window patch) went with it -- ec-h265 pads and |
| 73 | # writes the crop itself. |
| 74 | # Drop `vendor/` entirely once released versions handle all three. |
| 75 | [patch.crates-io] |
| 76 | cros-libva = { path = "vendor/cros-libva" } |
| 77 | cros-codecs = { path = "vendor/cros-codecs" } |
| 78 | # Drops the `pub use proc_macro;` re-export (E0365 future-incompat, rustc |
| 79 | # warns on every workspace build); nothing in the crate or its users names it. |
| 80 | proc-macro-error2 = { path = "vendor/proc-macro-error2" } |
| 81 | # Reads QuickTime version-1/2 sound sample descriptions (Resolve, Final Cut, |
| 82 | # `ffmpeg -f mov`): the 16/36-byte block after samplerate and the `esds` |
| 83 | # inside the `wave` wrapper. Stock 0.14 walks past both and calls the AAC |
| 84 | # track esds-less, so a `.mov` opens without sound. |
| 85 | mp4 = { path = "vendor/mp4" } |