235 points · by dbcooper · 11y ago · 38 comments
My first instinct was to wonder how it compared to Bellard's recently featured BPG image format [1], which achieves impressive quality at low sizes. Turns out you can check this by selecting "HEVC" in Xiph's image comparison, since that's the core method employed by BPG.
Video codecs have to encode keyframes, which is roughly the same problem as still images. Many still image codecs are modified intraprediction modes from video codecs. So it's really a subset[0] of the constraints and optimizations, not a totally different set.
It's also the case we've recently spent a lot of time working on intraprediction issues (and related topics). One reason for that is that the lapping filters make intraprediction very difficult compared to traditional codec designs.
Demo2[1] explains much of this difficulty in the context of a solution that we tried and had to abandon. The paint demo[2] explains another solution we tried, which also failed, but which is now the basis of a post-filtering technique.
[0] Modulo things like color format support, metadata, etc.
So, it should be possible to emscripten (that's basically how BPG works - it's an H.265 still-frame codec compiled to Javascript) with Daala, and distribute Daala still-images even though it's work-in-progress. The best bit is when Daala improves, you just re-generate your images and distribute a new Javascript decoder.
Anyone up for this? Even if it's not as good as BPG (it's very slightly worse it seems), at least it's royalty-free.
It might be a good way to get traction, even if it's not the end product.
Edit: I'm also wondering, just in case any experts are around... with Daala's design seeming at first glance inherently more suitable for that kind of thing, lifting filters, wavelets and all, does that mean that we're more likely to see some hierarchical modulation/scalable video coding/bitrate peeling sooner rather than later?
However, if you have some interesting application of it, feel free to let us know!
Video streaming suffers from unstable connections, and varied throughputs. Some home connections can support high fidelity 1080p and others can just manage visibly degraded 480p.
Right now, either you have to store each resolution separately (which can be costly, esp. at 3x redundancy and esp. if your average video is only going to be watched a few hundred times e.g. YouTube), or you have to transcode on-the-fly, which is expensive for any sort of good compression rate.
As we move forward, p2p streaming is likely to be a lot more dominant. There are a few services already out there and a few more in development that have a lot of promise. P2p settings are even more sensitive to transcoding costs, as you'd rather have peers uploading in high parallelism, meaning each one would need to be transcoding.
I do believe that scalable bitstreams will be important, as they solve a lot of the problems.
So that's the thing. I'm all for royalty-free encoders, but the only way to know if an algorithm is really royalty-free is for it to be older than the current maximum patent age. I believe that Daala is being designed to be royalty-free, but that's not measurable in advance.
There are other good reasons to support Daala, and explicitly building something to avoid royalty issues is certainly laudable (esp. compared to explicitly doing the opposite), but you can't just go and guarantee that something new is royalty-free, and it's frustrating to see the community make exactly those sorts of statements.
P.S., in case it's not clear, I've volunteered for the Xiph.Org Foundation for over a decade.
[0] https://en.wikipedia.org/wiki/Vorbis#Support
[1] https://en.wikipedia.org/wiki/List_of_hardware_and_software_...
[2] https://en.wikipedia.org/wiki/Speex#Applications
[3] https://en.wikipedia.org/wiki/Theora#Playback
[4] https://en.wikipedia.org/wiki/Opus_%28audio_codec%29#Support
http://cbloomrants.blogspot.com/2014/12/12-16-14-daala-pvq-e... http://cbloomrants.blogspot.com/2014_12_01_archive.html
For low-to-medium bitrate video that might be the correct tradeoff though.
[edit] H264 and H265 look like successive incremental improvements over JPEG in the direction I personally prefer; they reduce artifacts without losing detail.
All of the non-JPEG codecs seem to have greatly reduce artifacts in the low-frequency areas, but for some of them (VP8 in particular) it was at a significant loss of detail.
Also note that there is more detail in the h.265 than the JPEG where the trees meet the sky.
12:38:11 <+xiphmont> it seems wrong... but exact tracking felt worse.
For example smooth images tend to be judged as "nice", but if the original had noise then smoothness is a distortion caused by lack of detail and deblocking blur covering it up. JPEG 2000 fell into the smoothness trap: it gave it better PSNR and nice low-bitrate examples, but ultimately failed, because you don't always want everything looking like plastic.
Audio codecs, however, have been using psychoacoustic models for decades. Frequencies outside the human hearing range are clipped, masked noises are discarded, voice codecs emphasize the range of human speech, etc.