Quote · Lex Fridman Podcast
#496 – FFmpeg: The Incredible Technology Behind Video on the Internet
Where this was said
Assembly code (handwritten)
At 2:17:00 · chapter starts 2:06:21
Why SIMD assembly beats C by 62x; dav1d's 240,000 lines of handwritten assembly; Henrik Gramner and Martin Storsjö as assembly wizards; the Moore's Law plateau making optimization essential. [1] — Kieran Kunhya "Compilers cannot auto-vectorize anywhere close to what an expert human can do by hand. The dav1d AV1 decoder proves it: 80% assembly, 62x f…" 1:50:40 [2] — Jean-Baptiste Kempf "When the Alliance for Open Media said AV1 was too complex for software decoding, VideoLAN proved them wrong with dav1d: 240,000 lines of ha…" 2:08:50
When the Alliance for Open Media said AV1 was too complex for software decoding, VideoLAN proved them wrong with dav1d: 240,000 lines of handwritten assembly, every cycle optimized, running on 3 billion devices. It enables 720p AV1 decoding on just one or two CPU cores — on hardware that was never supposed to handle it.
The dav1d AV1 decoder, a VideoLAN project, contains approximately 240,000 lines of handwritten assembly — more than double FFmpeg's total assembly across all codecs.
Approximately 30% of Netflix's video is now delivered using the AV1 codec, with YouTube at about 50%.
WikiLeaks' Vault 7 revealed that the CIA distributed a custom VLC build with a hidden DLL that read your documents folder and encrypted and exfiltrated the data — while you watched a movie for two hours and blamed your fans on the CPU load. VideoLAN's only defense was telling people to only download from videolan.org.