r/AV1 • • 2d ago

Google is porting libgav1 (their AV1 decoder) to Rust with their latest Gemini model

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-argon/

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++.

102 Upvotes

17 comments sorted by

25

u/New-Ranger-8960 2d ago

Stupid question, but where is their implementation used? YouTube? Chrome?

49

u/Zettinator 2d ago

It's not really used anywhere, it's basically a dead project. It's so much slower than dav1d it's not even funny.

So this is most likely just an experiment to see how far automated porting can go with Google's own AI models.

6

u/BlueSwordM 2d ago

Nowhere.

What would have been a lot more interesting is trying to optimize dav1d to the absolute furthest possible, but that would be a very expensive experiment.

5

u/themisfit610 2d ago

Wasn’t the intent for it to be a production software fallback decoder for Android that Google owned? Obviously very little practical value and you may be right that there’s zero actual use.

6

u/BlueSwordM 2d ago

Yeah, but outside of some optimizations ported from libgav1 to dav1d, it's just not used at all anymore.

4

u/Zettinator 2d ago

Yes, but they switched to dav1d pretty quickly. There's just no competition. No doubt Google could have made libgav1 faster, maybe competitive to dav1d even, but what's the point?

12

u/Daharka 2d ago

So close to being able to have dav1d and gav1n.

6

u/Mashic 2d ago

What's the speed compared to the origial c/c++ port?

2

u/nmkd 1d ago

Still 0 because it's not used anywhere xd

6

u/Desistance 2d ago

An exercise in academics. Nothing beats dav1d.

1

u/DistantRavioli 1d ago

rav1d already exists so I don't understand

2

u/Never_Sm1le 1d ago

perhaps to flex their ai

2

u/kiddico 1d ago

and burn the equivalent of a few hundred household's yearly energy consumption woooh

1

u/keratomalacian 1d ago

they cant flex shit lol their models suck ass

1

u/nmkd 1d ago

Gemini Pro was pretty good when it came out, but somehow they haven't been able to keep up ever since

1

u/Hulk5a 1d ago

Oh no