Skip to content

Comment on Dav1d: performance and completion of the first release

Comments

I'm the author, so if you need anything, just ask.

Thank you for putting a "what the heck is this" bit near the top! So many announcements like this assume you know exactly what is being talked about.

Does dav1d support scalability, such as spatial scalability? Is is possible to decode only 1920x1080 frames from a 3840x2160 video (if the video has been encoded with spatial scalability)?

It would be nice to be able to decode smaller frame dimensions with faster decoding time. That would be useful for viewing 4K material on computers which can't decode the full resolution.

The same for 10- and 12-bit videos - it would be nice to be able to decode a 8-bit version for 8-bit displays with faster decoding time.

Hi! This is really cool. I've been browsing the code and I wanted to ask, how difficult do you think it would be to port this to a system without pthreads? Can it be used on one thread?

Update: a more thorough look at the code quickly disillusioned me to this idea. Same as libaom...

Hi! You have 2 options: 1) write pthread emulation for your target system. We wrote one for windows native threads, but others should be straightforward. 2) if you want thread-less, that's possible (single-threaded performance shows 1080p is easy, and on high-end systems even 4K single-threaded might be doable), which basically just involves putting the two functions in thread_task.c under #if HAVE_THREADS, along with any coded calling pthread_() functions or using pthread_ types from <pthreads.h>, and then enforcing that Dav1dSettings.n_{tile,frame}_threads is always 1 (that means it won't ever enter these codepaths). Then, you always get single-threaded and (p)thread-less decoding.

Feel free to come on IRC, happy to help you dive into this, it's not very difficult.

Oh, great! I will hop onto IRC. Thanks!

How much difference in performance is there between decoding 8-bit video versus 10-bit video?

Right now, 10-bit decoding is horribly slow because the assembly optimizations only cover 8-bit, so it's probably 10-20x slower. We'll work on 10-bit next, and in the end, I'd expect it to be 30-50% slower than 8-bit.

Are 10 & 12 bit decoding in the same optimization bucket or do they need to be treated separately?

10/12-bit can usually be done together, but are completely different from 8-bit. However, it's possible we'll do 10-bit first and then later on make the tiny adjustments that allow us to use them for both 10-bit as well as 12-bit.

Realistically speaking comparing a hevc (x265) run and a dav1d run producing a video of similar quality but ~20% smaller, what is the difference in encoding time?

You'll want to check out rav1e ( https://github.com/xiph/rav1e)

Here's a comment that gives a clue - https://news.ycombinator.com/item?id=17539791

dav1d is a decoder, not an encoder.

Numbers for Ryzen 2400G would be nice. That's my main computer and they make a great HTPC.

Great news though!

Numbers for Ryzen 2400G would be nice. That's my main computer and they make a great HTPC.

No access to those machines, so I cannot guess...

Can you build it on Windows?

Yes, it supports Windows natively. The tests were run on Windows.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.