Keyword - FFmpeg

Entries feed - Comments feed

3 May 2019

dav1d 0.3.0 release: even faster!

tl;dr: dav1d another fast release

If you want a quick summary of this post, about our AV1 decoder:

  • dav1d is still ready for production, and getting used more,
  • dav1d has a speed gain of 12% on ARM64 mobile CPUs,
  • a gain of 15%-25% on SSSE3 processors
  • and even a 5% gain on AVX-2 processors, which was already quite fast.

Read the following for more details...

A few reminders about dav1d

If you follow this blog, you should know everything about dav1d.

AV1 is a new video codec by the Alliance for Open Media, composed of most of the important Web companies (Google, Facebook, Netflix, Amazon, Microsoft, Mozilla...). AV1 has the potential to be up to 20% better than the HEVC codec, but the patents license is totally free, while HEVC patents licenses are insanely high and very confusing.

The VideoLAN, VLC and FFmpeg communities have started to work on a new decoder, sponsored by the Alliance for Open Media, in order to create the reference optimized decoder for AV1.

Third major Release

We just released the third version of dav1d, called 0.3.0 Sailfish.
The decoder is ready and being now largely used on all platforms, with excellent performance.

The focus for the first release was for AVX-2 processors, with up to 5x speedups compared to the reference decoder.

The second release was focusing on the other desktop CPU, SSSE3 and on mobile phones (2 to 4x faster) , and a lot more stability.

This third release continues to increase the ARM and SSSE3 speed, with more optimizations, as announced, and we get between 12 and 25% speed increases on those CPUs, depending on the samples.
However, more surprisingly, we got a speedup on AVX-2 CPU, by optimizing the MSAC (entropy decoding), while we did not find a good solution in the past. This brings 4-5% speed improvements, which is quite huge, knowing the maturity of the AVX-2 code.

Results

This are the gains we got for SSSE3 compared to the previous release:

And this is where we are, on desktop platforms, compared to aomdec:

As you can see, we're now getting consistently 2.5 to 4 times faster on SSSE3, 2 to 5 times faster on AVX-2 compared to aomdec.

On mobiles devices, we're now also getting 3 to 4 times faster with ARM64 CPU than aomdec. I don't have a fancy graph, but you can see results here.

What's next?

What's next is more complex to foretell: there are still some optimizations to do on SSSE3 and ARM64, but they are getting less important, so the speedups might not be as impressive as those shown today. We might improve AVX-2 still, but we're talking about a few percents, it's going to be hard to get more.

We're also going to toy with compute-shaders for decoding faster, but it's very hard to know if that's going to give a speed-up at all.

Keep in touch, and you'll see!

1 October 2018

Introducing dav1d: a new AV1 decoder

Introducing dav1d

AV1 is a new video codec by the Alliance for Open Media, composed of most of the important Web companies (Google, Facebook, Netflix, Amazon, Microsoft, Mozilla...).

AV1 has the potential to be up to 20% better than the HEVC codec, but the patents license is totally free, while HEVC patents licenses are insanely high and very confusing.

The reference decoder for AV1 is great, but it's a research codebase, so it has a lot to improve.

Therefore, the VideoLAN, VLC and FFmpeg communities have started to work on a new decoder, sponsored by the Alliance of Open Media.

The goal of this new decoder is:

  • be small,
  • be as fast as possible,
  • be very cross-platform,
  • correctly threaded,
  • libre and (actually) Open Source.

Without further ado, the code: https://code.videolan.org/videolan/dav1d

Name

dav1d is called dav1d, because Dav1d is an AV1 Decoder

(Yes, that is a recursive acronym, no need to tell us...)

Video

You can see a talk during VDD 2018 about dav1d:

VDD2018 dav1d presentation.

Technical details

Some technical details about dav1d:

  • written in C99 (without VLAs),
  • has asm in NASM/GAS syntax (no intrinsics),
  • uses meson/ninja as buildsystem,
  • currently works on x86, x64, ARMv7, ARMv8,
  • runs on Windows, Linux, macOS, Android, iOS,
  • licensed under BSD.

Performance

Currently the source code of dav1d is 1/10th of lines of code compared to libaom and its weight is 1/3rd of the binary size of libaom.

It currently uses 1/4th of the memory usage of libaom and uses a very limited amount of stack.

Depending on the threads conditions (see the video talk linked above), dav1d is more or less faster than libaom 1.0.0, but slower than libaom HEAD.
dav1d having almost no assembly code yet, this is not surprising, and is actually a good starting point for the future.

Of course, those metrics will evolve once we add more assembly code, and when the project evolves a bit more.

Questions

Is it production-ready?

Not yet, but you can start testing it and check how the API works for you.

Can I help?

Yes! We need C, ASM developers, but also app integrators and testers to give us feedback.

I need to ship an AV1 decoder with my OS, my hardware, my app. Can I do that?

Yes. dav1d is licensed under BSD for this very reason.

Please talk to us, if you need to get adaptations for your use-case (hybrid decoders, or specific platforms, for example).

BSD is not copyleft, why?

We want AV1 to be as popular as possible. This requires fast decoders, running everywhere. Therefore, we want to help everyone, even non-open-source software.

See RMS opinion on this subject.