
The first in-depth technical analysis of VP8 - DarkShikari
http://x264dev.multimedia.cx/?p=377
======
cscotta
In terms of both raw talent and writing ability, Jason's blog is one of my
favorites. You can depend on him for solid analysis, clear thinking, and good
writing. This article is worth reading.

While I only have a surface-level understanding of video encoding and
compression techniques, there are some very good criticisms here. That said,
I've been reading through the libvpx source for the past 20 minutes or so.
Jason repeatedly slams the quality of the source. The code is much cleaner
than he suggests and rather well-commented.

Better than H.264/main or not, I'm excited to see where VP8 goes. With
implementations in Chrome, Firefox, Opera, and Flash, it's off to a good start
from day one. We'll see where it heads from there.

~~~
naner
> That said, I've been reading through the libvpx source for the past 20
> minutes or so. Jason repeatedly slams the quality of the source. The code is
> much cleaner than he suggests and rather well-commented.

It is possible he had an older revision of their code. Since he didn't say how
he obtained it early, it may have not been through official channels.

~~~
mpk

        > It is possible he had an older revision of their code. 
    

Unless he had a very ancient version of this codebase it is unlikely that it
is different in structure from the current mainline.

Adding comments or sanitizing local variable names are only very superficial
changes.

~~~
rpdillon
Except that he goes out of his way to slam the comment quality. Besides, I
think the difference between well-commented code and code without comments can
be quite vast, especially when you're inlining assembly, as is the case here.

------
jwr
This blog is the best technical blog I've found, period. Ever. I've worked on
an implementation of H.264, so I enjoy the tech details, and I find his posts
informative, insightful and well written.

This has to be said — there is so much mediocrity around.

------
sketerpot
A fun thing about the VP8 patent situation: any company which attacks VP8 with
a patent lawsuit has their license to use VP8 automatically terminated. From
the license:

> If You or your agent or exclusive licensee institute or order or agree to
> the institution of patent litigation against any entity (including a cross-
> claim or counterclaim in a lawsuit) alleging that this implementation of VP8
> or any code incorporated within this implementation of VP8 constitutes
> direct or contributory patent infringement, or inducement of patent
> infringement, then any rights granted to You under this License for this
> implementation of VP8 shall terminate as of the date such litigation is
> filed.

~~~
astrange
A non-fun thing about that license: it seems to me that it's not compatible
with the GPLv2, which doesn't allow adding extra restrictions on the end user.
I can't remember if it's compatible with LGPL or not, though GPLv3 seems safe.

This has been raised on ffmpeg-devel, so hopefully Google has some opinion
about it.

~~~
jwr
Actually, this restriction is a subset of the one in GPLv2 and LGPL. And it is
very reasonable, as opposed to the GPL ones.

Take a close look at section 7 of the GPL:

7\. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or otherwise)
that contradict the conditions of this License, they do not excuse you from
the conditions of this License. If you cannot distribute so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution
of the Program by all those who receive copies directly or indirectly through
you, then the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

What this means is that if _anyone_ , _anywhere_ , imposes conditions on you
(e.g. by way of patent claims), then you cannot distribute the Program at all.

It's a sweeping provision and is the main reason why many companies shy away
from the GPL (including some I worked for). It's the reason why we never used
XviD, for example — someone, someday, could (and would) come up with patents
pertaining to XviD (MPEG-4 ASP) and we would have to stop distributing the
software. Meaning, recall the millions of set-top boxes sold.

The restriction in VP8 licensing is much more reasonable — it says that if
_you_ come up with patent claims, then _you_ lose the right to do anything
with the software.

------
mbrubeck
_"The quality generated by On2’s VP8 encoder will probably not improve
significantly without serious psy optimizations."_

Fortunately, there are open video developers with experience building
psychovisual optimizations for codecs like the VP3-derived Theora. This post
from yesterday details some of the psy improvements coming soon to Theora:
<http://people.xiph.org/~xiphmont/demo/theora/demo9.html>

So it might take a lot of work (it has for Theora), but I believe the
potential for improvement is there.

 _P.S. Hello from a fellow Mudder!_

~~~
DarkShikari
Of course; x264 isn't unique in its psy optimizations. x264 was not the first
encoder to have good adaptive quantization and Theora, while late to the
party, is moving that way too.

------
rufo
I thought this was particularly interesting:

 _With regard to patents, VP8 copies way too much from H.264 for anyone sane
to be comfortable with it, no matter whose word is behind the claim of being
patent-free._

Google isn't indemnifying those who might use VP8, right?

~~~
Locke1689
Right. As far as I understand, this is untenable legally anyway. The MPEG
group has the authority to sue anyone and everyone in violation (including the
end user). Google is obviously not offering to pay damages in all of those
suites.

~~~
DrSprout
Google may however sue MPEG / MPEG members in retaliation, and that could be
an effective deterrent.

------
MikeCapone
The VP8 hope bubble has been deflated for me (I was expected a free and
technically better alternative to h.264). I'm a bit bummed out about it, but
there was no better way to learn about it than from this blog. Great writing,
as always.

Thank you for bursting my bubble in style!

------
seiji
Summary: It has a crappy spec. Not better visual quality (yet? ever?):

<http://mirror05.x264.nl/Dark/website/compare/vp8.png>
<http://mirror05.x264.nl/Dark/website/compare/x264.png>

~~~
ZeroGravitas
Is there some way to express my displeasure at the recent trend of people
offering summaries of the linked content rather than their own opinions?

This is one of the better examples of the species, which is partly why I'm
responding to it, but often I find the summaries actively misleading, and
almost invariably adding snarky content-free remarks.

~~~
seiji
My motivation was thus: I'm not a video transcoding guy. I just wanted to know
a 10,000 ft overview. My summary is what I got out of a very detailed
technical article (and it took me a minute to find the comparison pictures in
the article, so hopefully re-posting the highlights saved others time).

Another way of looking at it: People hyper-summarizing articles are like HFT
for news aggregators. It makes the aggregator more efficient by cutting to
what many people only want to know thereby increasing their capacity to
consume even more knowledge irrelevant to their lives.

~~~
bruceboughton
How is the comparison to HFT valid?

------
mbrubeck
This comment makes an interesting point:
[http://blog.gingertech.net/2010/05/20/vp8-adobe-is-the-
key-t...](http://blog.gingertech.net/2010/05/20/vp8-adobe-is-the-key-to-open-
video/#comment-5882)

 _"Patents are about _details_ so the mere fact that something does something
like something else, isn’t necessarily something at all._

 _As we’ve pointed out before, many codec patents are exceptionally easy to
work around: They specify every little detail because it makes it _much_
easier to get through the examination but doesn’t harm the patent’s ability to
read on the final standard because the standard specifics exactly the patented
behaviour._

 _D_S, for all his undeniable H.264 experience isn’t an expert on patents or
even the H.264 patents. We can assume that in cases where VP8 looks similar to
H.264 those would have been exactly the cases where care was taken to differ
in the right places. I’d expect the primary risks for VP8 to be anywhere _but_
there."_

------
blehn
Not very promising. I'd think that VP8 would need to be decidedly superior to
H.264 in order to become a universal standard. Maybe Google should have
acquired Red?

[http://www.engadget.com/2009/04/25/red-blows-away-small-
room...](http://www.engadget.com/2009/04/25/red-blows-away-small-room-of-
videophiles-with-4k-red-ray-footage/)

~~~
robin_reala
It _is_ decidedly superior: it has a free licence. If that’s not important to
you then you won’t be fussed by this announcement, but for the rest of us this
is a big deal.

~~~
ptomato
Free license is irrelevant if you're going to get your ass handed to you by
MPEG LA in a patent lawsuit.

~~~
robin_reala
When the MPEG-LA actually start suing people instead of just blustering about
it then get back to me.

~~~
ptomato
Well looky here: [http://digitaldaily.allthingsd.com/20100520/googles-
royalty-...](http://digitaldaily.allthingsd.com/20100520/googles-royalty-free-
webm-video-may-not-be-royalty-free-for-long/)

~~~
robin_reala
As I said, when they file a suit then get back to me. This is more of what
they’ve been doing for the past few years: vague threats of patent pools and
litigation without anything to back it up.

------
physcab
Quoted from "Summary for the lazy" aka tl;dr

"VP8, as a spec, should be a bit better than H.264 Baseline Profile and VC-1.
It’s not even close to competitive with H.264 Main or High Profile. If Google
is willing to revise the spec, this can probably be improved.

VP8, as an encoder, is somewhere between Xvid and Microsoft’s VC-1 in terms of
visual quality. This can definitely be improved a lot, but not via
conventional means.

VP8, as a decoder, decodes even slower than ffmpeg’s H.264. This probably
can’t be improved that much.

With regard to patents, VP8 copies way too much from H.264 for anyone sane to
be comfortable with it, no matter whose word is behind the claim of being
patent-free.

VP8 is definitely better compression-wise than Theora and Dirac, so if its
claim to being patent-free does stand up, it’s an upgrade with regard to
patent-free video formats.

VP8 is not ready for prime-time; the spec is a pile of copy-pasted C code and
the encoder’s interface is lacking in features and buggy. They aren’t even
ready to finalize the bitstream format, let alone switch the world over to
VP8."

~~~
weixiyen
> With regard to patents, VP8 copies way too much from H.264 for anyone sane
> to be comfortable with it, no matter whose word is behind the claim of being
> patent-free.

This is the scary one. The other points are simply a matter of improving the
spec / technology.

edit: read comment #16

"Actually ripping of H.264 may be a way to avoid submarine patents.

By having design so similar, Google only has to worry about MPEG-LA patents.

So there is a known, finite list of patents to review.

Given bizarre tweaks and omissions in VP8, I suspect that’s exactly what they
did – looked at claims on H.264 and tweaked VP8 just a little to avoid crucial
points (remember in patents you have to infringe all points in a claim, if you
infringe 2 out of 3, then you’re safe)."

~~~
kenjackson
But remember, all it takes is you infringing on one claim in a single patent.

------
zokier
I'm actually surprised how well xvid does in those comparison shots. Based on
those, xvid would seem to be the closest competitor for VP8 alongside with
VC1. x264 is in a class of its own. There seems to be some kind of trade off
between blurriness and artifacts, imho x264 shots coulda been bit softer, and
VP8 seems to lean heavily on the blur side.

------
oomkiller
Betamax offered some technical advantages to VHS, but look who won that war.
The main reason they won is because JVC allowed other people to use their
designs for a reasonable scale. Keep in mind in this debate that H.264 isn't
free to use, and VP8 is. Are the technical merits of H.264 enough to outweigh
the cost? In my opinion, no.

~~~
yardie
While the licensing costs did play a part in the win of VHS I think the bigger
problem was the price of the decks (1.5-2x price of a VHS VCR) and beta
camcorders were incompatible. To watch a home video you had to play it back
through the camera onto another beta deck.

The only technical advantage it had was color reproduction and clarity. Every
other metric (cost and convenience) it did poorly. It did go on to live a
second life, as Betacam, in professional studios, where reproduction and
clarity are important. And their ENG cameras are some of the sturdiest I have
ever encountered.

------
mononcqc
This part was interesting to me:

 _VP8 is simply way too similar to H.264: a pithy, if slightly inaccurate,
description of VP8 would be “H.264 Baseline Profile with a better entropy
coder._

Then later, about the encoder:

 _there were comments describing bugfixes dating as far back as early 2004.
That’s right: this software is even older than x264!_

Wouldn't that mean that VP8 didn't copy if the software is older? Prior art? I
mean, you can't write an encoder for a spec that doesn't exist. IANAL, so I'd
like some info here.

~~~
DarkShikari
The H.264 spec dates back to ~2000-2001.

x264 is an open source software program that implements H.264, and was written
starting in 2004.

Furthermore, we don't know when they added intra prediction to VP8; it could
have been many years after the original program was written.

~~~
mononcqc
Thanks. Makes sense.

------
Locke1689
Thanks for the great write-up Jason. I had no idea you were a junior at Harvey
Mudd. I remember when you helped me on an IRC channel when I was writing a
patch for FFmpeg. I thought you had many years more experience than me when
you were only a year older the whole time. Very impressive!

------
subbu
The contrast of the site is so bad that I had to hit browser back button after
a couple of minutes.

~~~
DarkShikari
I think it's much more readable with white on black than black on white. But
of course if you disagree, which is fine -- some people do -- you can use
readability, as in mbrubeck's post.

I'm not quite sure why some people really like black/white while others like
white/black. Maybe it's something psychological, or maybe it's just room
lighting.

~~~
Legion
I find that, while I like white-on-dark, I tend to require a larger font to
comfortably read it than I do dark-on-white.

On the article's page, when I knock the browser "zoom" feature up one notch
from default, it's like the entire page magically becomes this wonderful,
easy-to-read document.

It may be because I'm on a 1920x1200 display on a 17" laptop screen, but at
any rate, I would consider a small upward bump in font size. I wouldn't have
brought it up myself, since as I noted above, I can do it myself in my browser
with a quick hold of Ctrl and a flick of the mouse wheel. But since the topic
came up, I thought I'd throw that in.

------
papachito
Don't forget that this is written by a x264 dev, so not very surprising that
he concludes that his codec is way better. Is there an analysis from a less
biased source?

~~~
crystalis
Don't forget that this is written by a liberal, so not very surprising that he
concludes that his liberal view is way better. Is there an analysis from a
less biased source, possibly with fewer well detailed explanations of the
basis and reasoning of all of the sub-arguments that lead up to the obviously
not surprising conclusion? The fewer credentials they have, the easier it will
be for me to follow along.

~~~
papachito
How could anyone write an analysis only a few hours after such a complicated
technology is released? It's also full of IANAL and yet still FUDing about how
it's probably full of patents (as if google was dumb enough not to check
patents). It looks to me like he had his opinion already formed on his
previous use of VP8 and just published it today on time to make a big splash.

Edit: it looks like this article was released a few minutes after Google
announcement...

Edit2: it looks like he had access to the spec a few days ago. I still think
that Google is not putting their money blindly into VP8 though, they have the
money to pay hundreds of analysis like this one and they sure did a lot of
them, so it's either good enough or they have plans to make it good soon
enough. Still better than x264 for people involved in free/open source like
me.

~~~
crystalis
In the second sentence, before he even addresses the attention deficient,
"Fortunately, it seems I was able to acquire access to the VP8 spec, software,
and source a good few days before the official release and so was able to
perform a detailed technical analysis in time for the official release."

In the comments here, where you might find people discussing e.g., validity,
you can find the author commenting on this "issue" further:
<http://news.ycombinator.com/item?id=1361739>

Not to mention an x264 developer is a lot more interested in VP8 succeeding
than H264...

If you have any actual concerns, rather than the cargo cult concerns that seem
similar to those more intelligent people may voice in situations when they're
actually informed on a topic, please mention them.

