The software decoder now agrees with ffmpeg, picture for picture
Browse files at this commit1d9b2f4b6486bbb4b0ff4a635f74f31a162f2876Parent: 907dae0- deps
- the software decoder now agrees with ffmpeg, picture for picture
2 changed files +61 -9
- Cargo.lock +37 -8
- crates/engine/Cargo.toml +24 -1
Cargo.lockmodified+37 -8
| @@ -5012,11 +5012,30 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" | ||
| 5012 | 5012 | name = "rusty_aac" |
| 5013 | 5013 | version = "0.5.0" |
| 5014 | 5014 | |
| 5015 | +[[package]] | |
| 5016 | +name = "rusty_alloc" | |
| 5017 | +version = "0.3.2" | |
| 5018 | +source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5019 | +checksum = "b5f05c71564028538eeba6e2e08c6a512267e85e6a1584beca45c6f26af8651b" | |
| 5020 | +dependencies = [ | |
| 5021 | + "libc", | |
| 5022 | + "windows-sys 0.60.2", | |
| 5023 | +] | |
| 5024 | + | |
| 5025 | +[[package]] | |
| 5026 | +name = "rusty_alloc-api" | |
| 5027 | +version = "0.3.2" | |
| 5028 | +source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 5029 | +checksum = "65c8c3ecd14424ba980d005147945a745836dea7798d447c419e08be1f79e88f" | |
| 5030 | +dependencies = [ | |
| 5031 | + "rusty_alloc", | |
| 5032 | +] | |
| 5033 | + | |
| 5015 | 5034 | [[package]] |
| 5016 | 5035 | name = "rusty_h264" |
| 5017 | -version = "0.8.0" | |
| 5036 | +version = "0.9.1" | |
| 5018 | 5037 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 5019 | -checksum = "6fbafa4757ced9c5c1d1185aa936bb040b00c456098874f209e04ed1c1c2d73b" | |
| 5038 | +checksum = "690044fc22dedcc09367177bd50cc7f6b46b72f3227d35a9311e69c64c2a73d4" | |
| 5020 | 5039 | dependencies = [ |
| 5021 | 5040 | "rusty_h264-common", |
| 5022 | 5041 | "rusty_h264-decoder", |
| @@ -5025,28 +5044,29 @@ dependencies = [ | ||
| 5025 | 5044 | |
| 5026 | 5045 | [[package]] |
| 5027 | 5046 | name = "rusty_h264-common" |
| 5028 | -version = "0.8.0" | |
| 5047 | +version = "0.9.1" | |
| 5029 | 5048 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 5030 | -checksum = "421e458fcfcb2580232f212f99451f9075a03d00752a934ee27be6148a6765e3" | |
| 5049 | +checksum = "ed3c3c7ad3a43386460736b7552ab82239bdd703bedcf8c7f5d0032c50cfb8cb" | |
| 5031 | 5050 | dependencies = [ |
| 5032 | 5051 | "bytemuck", |
| 5052 | + "rusty_alloc-api", | |
| 5033 | 5053 | "wide", |
| 5034 | 5054 | ] |
| 5035 | 5055 | |
| 5036 | 5056 | [[package]] |
| 5037 | 5057 | name = "rusty_h264-decoder" |
| 5038 | -version = "0.8.0" | |
| 5058 | +version = "0.9.1" | |
| 5039 | 5059 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 5040 | -checksum = "6316ecba57a77d530fff4fab7be9cc3e0e107e381360ac9d2ffa0895b5b0947a" | |
| 5060 | +checksum = "1cd475fe0f7480930bf735275111922733a323cb9ef7d83d825a0222ccde9fb4" | |
| 5041 | 5061 | dependencies = [ |
| 5042 | 5062 | "rusty_h264-common", |
| 5043 | 5063 | ] |
| 5044 | 5064 | |
| 5045 | 5065 | [[package]] |
| 5046 | 5066 | name = "rusty_h264-encoder" |
| 5047 | -version = "0.8.0" | |
| 5067 | +version = "0.9.1" | |
| 5048 | 5068 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 5049 | -checksum = "f4fb69d8977d1d067d6d603df0614678c4a35ac1201fff38783c8847e429c879" | |
| 5069 | +checksum = "8100c6b118fa62ff4f021b47cf2d6feb423dad78e3dec5d8dfc2d0ff3a6729bb" | |
| 5050 | 5070 | dependencies = [ |
| 5051 | 5071 | "rusty_h264-common", |
| 5052 | 5072 | ] |
| @@ -7190,6 +7210,15 @@ dependencies = [ | ||
| 7190 | 7210 | "windows-targets 0.52.6", |
| 7191 | 7211 | ] |
| 7192 | 7212 | |
| 7213 | +[[package]] | |
| 7214 | +name = "windows-sys" | |
| 7215 | +version = "0.60.2" | |
| 7216 | +source = "registry+https://github.com/rust-lang/crates.io-index" | |
| 7217 | +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" | |
| 7218 | +dependencies = [ | |
| 7219 | + "windows-targets 0.53.5", | |
| 7220 | +] | |
| 7221 | + | |
| 7193 | 7222 | [[package]] |
| 7194 | 7223 | name = "windows-sys" |
| 7195 | 7224 | version = "0.61.2" |
crates/engine/Cargo.tomlmodified+24 -1
| @@ -28,7 +28,30 @@ mp4 = "0.14" | ||
| 28 | 28 | # pulls this exact version in through `png`, and it is the pure-Rust inflate the |
| 29 | 29 | # rest of the ecosystem is built on. |
| 30 | 30 | miniz_oxide = "0.8" |
| 31 | -rusty_h264 = { version = "0.8", default-features = false } | |
| 31 | +# The software H.264 pair, and the only software decoder this project has for | |
| 32 | +# any format. Pinned exactly, like `ruopus` and `oxideav-ac3` below, because a | |
| 33 | +# decoder is a bit-exactness dependency -- and 0.9.1 is where that stopped being | |
| 34 | +# a figure of speech. Measured 2026-08-12 against ffmpeg's own decode of a 1080p | |
| 35 | +# High and a 720p Main clip, 750 pictures between them: 0.8 matched it | |
| 36 | +# byte-for-byte on 26 of the 750 and drifted on the rest (worst 69.8 dB PSNR -- | |
| 37 | +# invisible, but wrong); 0.9.1 matches on all 750. It is also 1.44x faster at it | |
| 38 | +# (247 Mpx/s against 171 on the 1080p clip, single-threaded); software *encode* | |
| 39 | +# is unchanged within noise, so this is a decode bump that the encoder came | |
| 40 | +# along with. `default-features = false` is what keeps `asm` off: those are | |
| 41 | +# vendored openh264 SIMD kernels that want `nasm` at build time, which this | |
| 42 | +# project's no-install rule forbids, and the crate enables them by default. | |
| 43 | +# | |
| 44 | +# What that line does not turn off, and cannot: the facade asks for its three | |
| 45 | +# sub-crates with *their* defaults, and `rusty_h264-common`'s default installs | |
| 46 | +# `rusty_alloc` -- a pure-Rust mimalloc remake, MIT -- as the process-wide | |
| 47 | +# `#[global_allocator]`, for the whole application rather than the codec. No | |
| 48 | +# feature choice downstream switches it back off; only a vendored `common` | |
| 49 | +# would. It is not a regression to pay for: the same 2M-allocation churn runs in | |
| 50 | +# 0.104 s under it against 0.142 s under glibc's, so it stays, and this | |
| 51 | +# paragraph is the disclosure. Frame-threaded decode arrived in 0.9 as well and | |
| 52 | +# is opt-in through `RS_H264_FRAME_THREADS`, unset here -- the decode loop is | |
| 53 | +# serial exactly as it was. | |
| 54 | +rusty_h264 = { version = "=0.9.1", default-features = false } | |
| 32 | 55 | # Both halves of AAC, and the only crate here that is asked for both. The |
| 33 | 56 | # *encoder*, so an mp4's sound can be a mix rather than a copy: an equalized (or |
| 34 | 57 | # otherwise processed) lane has to be decoded, and what is decoded has to be |