| ▲ | Memory-Safe WebP Decoding(halide.cx) | |||||||||||||||||||||||||||||||
| 38 points by computerbuster 20 hours ago | 11 comments | ||||||||||||||||||||||||||||||||
| ▲ | ZeroGravitas 6 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
As part of Google's PR for their upcoming Gemini 4 Argon LLM release they said they'd rewritten a few things in rust replacing hand written simd. But I don't think webp was mentioned. They said: > Large Scale Codebase Migrations and Optimizations: Argon agents are working on migrating C/C++ codebases to Rust across Google — scaling from tens of thousands of lines in core libraries like re2, libgav1 up to 800K+ lines for the Fuchsia Zircon kernel. Given the criticality of many of these systems, such large-scale rewrites are undergoing rigorous automated and manual auditing, emulation testing, and review before rolling out to production. > For libgav1, Google's open source software for decoding video, Argon agents took an existing Rust port and replaced 32K lines of SIMD code by running many rounds of profile-guided experiments, studying the compiler's output, producing safe Rust so the compiler would vectorize it automatically. The end result is a memory-safe video decoder that runs 2.7x faster than the Rust port, with identical video output, bringing it closer to the optimized C++. | ||||||||||||||||||||||||||||||||
| ▲ | omoikane 9 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
I am not sure what's the current status of Wuffs-based WebP decoder, but that would be another implementation worth comparing since it shares the same goals of safety and speed. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | pyrolistical an hour ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
Why not just just have most of it in wasm? There are wasm runtimes that don’t require js, and I’m sure Google can adapt their engine. Then they could integrate the other side with rust | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | jessa0 9 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
Related is Signal Messenger's webpsan crate, which validates webp container syntax before it is passed to libwebp. It stops just short of decoding actual pixel data, however, as the way webp works requires the entire canvas to be allocated in order to fully decode pixel data, which would have just made webpsan a full-on decoder anyway.. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||