forge
Explore
Log in

Don't you dare go Hollow

Rusty_h264 leaves the tree

Browse files at this commit

17b5566636ccd20568ba403efa87ad1f812570e1Ahmet Kaan GümüşParent: 0bc3a6b
  • chore
    • rusty_h264 leaves the tree
Show full message
🔥 chore(engine): rusty_h264 leaves the tree

The encode seat was the last linker; the facade, its -common subcrate and
the vendored patch that declawed rusty_alloc all go with it. The SEGFAULT
history (rusty_alloc installing itself as the process global allocator and
dying on a decode worker's first allocation, 2026-08-13) stays written
down, past tense, in both manifests. Cargo.lock carries no rusty_h264,
rusty_h264-common or rusty_alloc entry.
Cargo.lockmodified+4 -61
@@ -1597,7 +1597,7 @@ name = "ec-dsp"
1597 version = "0.1.0"1597 version = "0.1.0"
1598 dependencies = [1598 dependencies = [
1599 "ec-core",1599 "ec-core",
1600- "wide 1.7.0",1600+ "wide",
1601 ]1601 ]
1602 1602
1603 [[package]]1603 [[package]]
@@ -1606,7 +1606,7 @@ version = "0.1.0"
1606 dependencies = [1606 dependencies = [
1607 "ec-core",1607 "ec-core",
1608 "ec-h264-syntax",1608 "ec-h264-syntax",
1609- "wide 1.7.0",1609+ "wide",
1610 ]1610 ]
1611 1611
1612 [[package]]1612 [[package]]
@@ -1622,7 +1622,7 @@ version = "0.1.0"
1622 dependencies = [1622 dependencies = [
1623 "ec-core",1623 "ec-core",
1624 "ec-dsp",1624 "ec-dsp",
1625- "wide 1.7.0",1625+ "wide",
1626 ]1626 ]
1627 1627
1628 [[package]]1628 [[package]]
@@ -1692,7 +1692,6 @@ dependencies = [
1692 "oxideav-subtitle",1692 "oxideav-subtitle",
1693 "rav1e",1693 "rav1e",
1694 "rusty_aac",1694 "rusty_aac",
1695- "rusty_h264",
1696 "rusty_mp3",1695 "rusty_mp3",
1697 "rusty_vorbis",1696 "rusty_vorbis",
1698 "symphonia",1697 "symphonia",
@@ -5043,43 +5042,6 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
5043 name = "rusty_aac"5042 name = "rusty_aac"
5044 version = "0.5.0"5043 version = "0.5.0"
5045 5044
5046-[[package]]
5047-name = "rusty_h264"
5048-version = "0.9.1"
5049-source = "registry+https://github.com/rust-lang/crates.io-index"
5050-checksum = "690044fc22dedcc09367177bd50cc7f6b46b72f3227d35a9311e69c64c2a73d4"
5051-dependencies = [
5052- "rusty_h264-common",
5053- "rusty_h264-decoder",
5054- "rusty_h264-encoder",
5055-]
5056-
5057-[[package]]
5058-name = "rusty_h264-common"
5059-version = "0.9.1"
5060-dependencies = [
5061- "bytemuck",
5062- "wide 0.7.33",
5063-]
5064-
5065-[[package]]
5066-name = "rusty_h264-decoder"
5067-version = "0.9.1"
5068-source = "registry+https://github.com/rust-lang/crates.io-index"
5069-checksum = "1cd475fe0f7480930bf735275111922733a323cb9ef7d83d825a0222ccde9fb4"
5070-dependencies = [
5071- "rusty_h264-common",
5072-]
5073-
5074-[[package]]
5075-name = "rusty_h264-encoder"
5076-version = "0.9.1"
5077-source = "registry+https://github.com/rust-lang/crates.io-index"
5078-checksum = "8100c6b118fa62ff4f021b47cf2d6feb423dad78e3dec5d8dfc2d0ff3a6729bb"
5079-dependencies = [
5080- "rusty_h264-common",
5081-]
5082-
5083 [[package]]5045 [[package]]
5084 name = "rusty_mp3"5046 name = "rusty_mp3"
5085 version = "0.6.1"5047 version = "0.6.1"
@@ -5133,15 +5095,6 @@ version = "1.0.23"
5133 source = "registry+https://github.com/rust-lang/crates.io-index"5095 source = "registry+https://github.com/rust-lang/crates.io-index"
5134 checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"5096 checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
5135 5097
5136-[[package]]
5137-name = "safe_arch"
5138-version = "0.7.4"
5139-source = "registry+https://github.com/rust-lang/crates.io-index"
5140-checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323"
5141-dependencies = [
5142- "bytemuck",
5143-]
5144-
5145 [[package]]5098 [[package]]
5146 name = "safe_arch"5099 name = "safe_arch"
5147 version = "1.2.0"5100 version = "1.2.0"
@@ -6955,16 +6908,6 @@ dependencies = [
6955 "winsafe",6908 "winsafe",
6956 ]6909 ]
6957 6910
6958-[[package]]
6959-name = "wide"
6960-version = "0.7.33"
6961-source = "registry+https://github.com/rust-lang/crates.io-index"
6962-checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03"
6963-dependencies = [
6964- "bytemuck",
6965- "safe_arch 0.7.4",
6966-]
6967-
6968 [[package]]6911 [[package]]
6969 name = "wide"6912 name = "wide"
6970 version = "1.7.0"6913 version = "1.7.0"
@@ -6972,7 +6915,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
6972 checksum = "8cf05ca94c9fba0c51316899caa1d1e74a064fc310a5efa7375e614343d415be"6915 checksum = "8cf05ca94c9fba0c51316899caa1d1e74a064fc310a5efa7375e614343d415be"
6973 dependencies = [6916 dependencies = [
6974 "bytemuck",6917 "bytemuck",
6975- "safe_arch 1.2.0",6918+ "safe_arch",
6976 ]6919 ]
6977 6920
6978 [[package]]6921 [[package]]
Cargo.tomlmodified+7 -19
@@ -7,7 +7,6 @@ exclude = [
7 "vendor/cros-codecs",7 "vendor/cros-codecs",
8 "vendor/rusty_aac",8 "vendor/rusty_aac",
9 "vendor/oxideav-h265",9 "vendor/oxideav-h265",
10- "vendor/rusty_h264-common",
11 "vendor/mp4",10 "vendor/mp4",
12 ]11 ]
13 12
@@ -17,7 +16,7 @@ edition = "2024"
17 16
18 # Five upstream crates vendored verbatim except for one clearly marked fix each,17 # Five upstream crates vendored verbatim except for one clearly marked fix each,
19 # all blockers on this machine and all still unfixed upstream as of18 # 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:19+# 0.0.6/0.0.13/0.5.0/0.0.9/0.14:
21 # cros-libva - fails to build against libva >= 1.23 headers20 # cros-libva - fails to build against libva >= 1.23 headers
22 # cros-codecs - probes VA-API with a 16x16 context that Mesa radeonsi refuses;21 # 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 HEVC22 # and creates every decode context as 8-bit 4:2:0, which no HEVC
@@ -66,21 +65,6 @@ edition = "2024"
66 # 69bde5a6e, and it is a plain path dependency (no65 # 69bde5a6e, and it is a plain path dependency (no
67 # `[patch.crates-io]` line) because nothing else in the tree66 # `[patch.crates-io]` line) because nothing else in the tree
68 # asks for it.67 # 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-# (Since 2026-09-12 only the software H.264 *encode* seat
81-# still links this crate -- decode is `ec-h264`, which carries
82-# no allocator of its own; the patch stays until the encode
83-# seat moves too.)
84 # mp4 - reads the `mp4a` sample entry as ISO only: the 8 bytes68 # mp4 - reads the `mp4a` sample entry as ISO only: the 8 bytes
85 # QuickTime uses for version/revision/vendor are skipped as69 # QuickTime uses for version/revision/vendor are skipped as
86 # reserved, so a version-1 SoundDescription's 16-byte tail70 # reserved, so a version-1 SoundDescription's 16-byte tail
@@ -89,12 +73,16 @@ edition = "2024"
89 # AAC track "with no esds", every Resolve / Final Cut / `ffmpeg73 # AAC track "with no esds", every Resolve / Final Cut / `ffmpeg
90 # -f mov` file silent. The patch is `Mp4aBox::read_box` and a74 # -f mov` file silent. The patch is `Mp4aBox::read_box` and a
91 # `WaveBox` fourcc; writing is untouched.75 # `WaveBox` fourcc; writing is untouched.
92-# Drop `vendor/` entirely once released versions handle all six.76+# A sixth, `rusty_h264-common`, left the tree on 2026-09-12 with the last
77+# `rusty_h264` seat: it was vendored only to declaw `rusty_alloc` -- its
78+# authors' allocator installed itself as the process `#[global_allocator]` and
79+# segfaulted the editor on a new thread's first allocation -- and once
80+# `ec-h264` carried both H.264 seats there was nothing left to patch.
81+# Drop `vendor/` entirely once released versions handle all five.
93 [patch.crates-io]82 [patch.crates-io]
94 cros-libva = { path = "vendor/cros-libva" }83 cros-libva = { path = "vendor/cros-libva" }
95 cros-codecs = { path = "vendor/cros-codecs" }84 cros-codecs = { path = "vendor/cros-codecs" }
96 rusty_aac = { path = "vendor/rusty_aac" }85 rusty_aac = { path = "vendor/rusty_aac" }
97-rusty_h264-common = { path = "vendor/rusty_h264-common" }
98 # Drops the `pub use proc_macro;` re-export (E0365 future-incompat, rustc86 # Drops the `pub use proc_macro;` re-export (E0365 future-incompat, rustc
99 # warns on every workspace build); nothing in the crate or its users names it.87 # warns on every workspace build); nothing in the crate or its users names it.
100 proc-macro-error2 = { path = "vendor/proc-macro-error2" }88 proc-macro-error2 = { path = "vendor/proc-macro-error2" }
crates/engine/Cargo.tomlmodified+22 -37
@@ -34,46 +34,30 @@ mp4 = "0.14"
34 # pulls this exact version in through `png`, and it is the pure-Rust inflate the34 # pulls this exact version in through `png`, and it is the pure-Rust inflate the
35 # rest of the ecosystem is built on.35 # rest of the ecosystem is built on.
36 miniz_oxide = "0.8"36 miniz_oxide = "0.8"
37-# The software H.264 *encoder* -- since the decode seat moved to `ec-h264`37+# The software H.264 seats, both of them the project's own: `ec-h264` (I/P/B
38-# above, the only seat still on this crate. Pinned exactly, like38+# encode, CAVLC and CABAC, full DPB decode, weighted prediction, in-loop
39-# `oxideav-ac3` below, because a codec is a reproducibility dependency; the39+# deblocking), bit-exact against the JVT conformance suite. The decode seat
40-# 0.9.1 pin is the one the decode half set on 2026-08-12, when 750 pictures of40+# moved on 2026-09-12; the encode seat followed the same day, which retired the
41-# a 1080p High and a 720p Main clip decoded byte-for-byte against ffmpeg where41+# last of `rusty_h264` -- whose `rusty_h264-common` installed its authors'
42-# 0.8 had drifted (software *encode* was unchanged within noise across that42+# `rusty_alloc`, a pure-Rust mimalloc remake, as the process-wide
43-# bump, so the pin costs the encoder nothing). `default-features = false` is43+# `#[global_allocator]` of whatever application linked it, no downstream
44-# what keeps `asm` off: those are vendored openh264 SIMD kernels that want44+# feature choice being able to decline it, and that allocator segfaulted the
45-# `nasm` at build time, which this project's no-install rule forbids, and the45+# editor on a new decode-worker thread's first allocation (2026-08-13). It had
46-# crate enables them by default.46+# been survivable only through a vendored patch, which is gone with the crate.
47 #47 #
48-# What that line does not turn off, and cannot: the facade asks for its three48+# Decode throughput, measured at the decode swap (demux+decode, no render, best
49-# sub-crates with *their* defaults, and `rusty_h264-common`'s default installs49+# of three warm passes, otherwise idle machine): 1.5x `rusty_h264` on a 1080p
50-# `rusty_alloc` -- a pure-Rust mimalloc remake, MIT -- as the process-wide50+# Main export and a 4K Main render, 1.0x on a 1440p High screen recording,
51-# `#[global_allocator]`, for the whole application rather than the codec. It was51+# 1.17x on a CAVLC Baseline fixture; 0.80x on the two B-picture CABAC streams
52-# faster on a synthetic 2M-allocation churn (0.104 s against glibc's 0.142 s)52+# measured (a 720p High fixture and a 720p Blu-ray episode) -- the price of the
53-# and it crashed the editor: sustained scrubbing churns decode-worker threads,53+# full DPB the old seat skipped with its decode-order corner-cut, which
54-# and it segfaulted on a new thread's *first* allocation. `common` is therefore54+# scrambled exactly those streams. It hands pictures back in display order,
55-# vendored with that declaration removed (workspace root `[patch.crates-io]`),55+# which is what every reader of `frame.index` already assumed (the hardware
56-# which is the only way to decline it -- the codec itself is untouched. When56+# backend always did).
57-# the export encode seat moves to `ec_h264::Encoder`, this line, the patch and
58-# the vendored crate go with it.
59-# The software H.264 *decoder*, which is the project's own: `ec-h264`
60-# (I/P/B, CAVLC and CABAC, full DPB, weighted prediction, in-loop deblocking),
61-# bit-exact against the JVT conformance suite. It took this seat from
62-# `rusty_h264` on 2026-09-12. Raw decode throughput (demux+decode, no render,
63-# best of three warm passes, otherwise idle machine): 1.5x `rusty_h264` on a
64-# 1080p Main export and a 4K Main render, 1.0x on a 1440p High screen
65-# recording, 1.17x on a CAVLC Baseline fixture; 0.80x on the two B-picture
66-# CABAC streams measured (a 720p High fixture and a 720p Blu-ray episode) --
67-# the price of the full DPB the old seat skipped with its decode-order
68-# corner-cut, which scrambled exactly those streams. It hands pictures back in
69-# display order, which is what every reader of `frame.index` already assumed
70-# (the hardware backend always did; see `tests/sw_backends.rs` for the
71-# byte-exactness witness against `rusty_h264`, kept as the independent oracle).
72 ec-h264 = { path = "../../../edith_codecs/crates/ec-h264" }57 ec-h264 = { path = "../../../edith_codecs/crates/ec-h264" }
73 # Its shared IR (packets, frames, the registry decoder contract the seat is58 # Its shared IR (packets, frames, the registry decoder contract the seat is
74 # written against), direct because decode.rs names those types itself.59 # written against), direct because decode.rs names those types itself.
75 ec-core = { path = "../../../edith_codecs/crates/ec-core" }60 ec-core = { path = "../../../edith_codecs/crates/ec-core" }
76-rusty_h264 = { version = "=0.9.1", default-features = false }
77 # Both halves of AAC, and the only crate here that is asked for both. The61 # Both halves of AAC, and the only crate here that is asked for both. The
78 # *encoder*, so an mp4's sound can be a mix rather than a copy: an equalized (or62 # *encoder*, so an mp4's sound can be a mix rather than a copy: an equalized (or
79 # otherwise processed) lane has to be decoded, and what is decoded has to be63 # otherwise processed) lane has to be decoded, and what is decoded has to be
@@ -81,8 +65,9 @@ rusty_h264 = { version = "=0.9.1", default-features = false }
81 # than stereo outright (`aac/mod.rs:93`, "aac: aac too complex") and a 5.1 film65 # than stereo outright (`aac/mod.rs:93`, "aac: aac too complex") and a 5.1 film
82 # soundtrack in an mkv is exactly that -- this one hands 5.1 back already66 # soundtrack in an mkv is exactly that -- this one hands 5.1 back already
83 # reordered into FL, FR, FC, LFE, BL, BR, which is the order the downmix in67 # reordered into FL, FR, FC, LFE, BL, BR, which is the order the downmix in
84-# `audio` folds. Pure Rust with no C or FFI, Apache-2.0, same family as68+# `audio` folds. Pure Rust with no C or FFI, Apache-2.0, the same Mata Network
85-# `rusty_h264` above. Nothing else in the ecosystem encodes AAC without linking69+# family the retired `rusty_h264` came from. Nothing else in the ecosystem
70+# encodes AAC without linking
86 # Fraunhofer's C library, which this project's no-install rule forbids. Built71 # Fraunhofer's C library, which this project's no-install rule forbids. Built
87 # from `vendor/rusty_aac` -- see the patch table in the workspace manifest.72 # from `vendor/rusty_aac` -- see the patch table in the workspace manifest.
88 rusty_aac = "0.5"73 rusty_aac = "0.5"