
H.265/HEVC vs. H.264/AVC: 50% bit rate savings verified - kungfudoi
http://www.bbc.co.uk/rd/blog/2016/01/h-dot-265-slash-hevc-vs-h-dot-264-slash-avc-50-percent-bit-rate-savings-verified
======
ju-st
VP9 vs H264 vs H265:

\- Next-gen codecs provide 50% bitrate improvements over x264, but are 10-20x
as slow at the top settings required to accomplish such results.

\- Normalized for CPU usage, libvpx already has some selling points when
compared to x264; x265 is still too slow to be useful in most practical
scenarios except in very high-end scenarios.

\- ffvp9 is an incredibly awesome decoder that outperforms all other decoders.

[https://blogs.gnome.org/rbultje/2015/09/28/vp9-encodingdecod...](https://blogs.gnome.org/rbultje/2015/09/28/vp9-encodingdecoding-
performance-vs-hevch-264/)

~~~
keithwinstein
One downside of VP9: the VP9 spec is still under NDA from Google. There is no
publicly available spec. As far as I know, the only people that have written a
software VP9 decoder are either Google employees (libvpx) or ex-Google-
employees who worked on VP9 when they were there (rbultje, who wrote ffvp9
with Clément Bœsch).

~~~
DannyBee
Which "spec" are you referring to?

The bitstream spec is definitely public.

~~~
TD-Linux
I have never seen a spec, do you have a link?

~~~
nickodell
This, perhaps? [https://tools.ietf.org/html/draft-grange-
vp9-bitstream-00](https://tools.ietf.org/html/draft-grange-vp9-bitstream-00)

It's only a draft, and two years out of date, but it is public.

~~~
TD-Linux
It's a good overview of VP9, but it's certainly not enough to implement a
decoder, or call it a "spec".

------
envy2
Interestingly, the place I've seen the most widespread adoption of HEVC is
China: Android-based set-top boxes with hardware H.265 decoding are widely[1]
available[2], and a number of the major IPTV services (both authorised and
unauthorised) are using it, including for live content.

I was quite surprised to find I was able to stream a very high quality 1080p
movie on a random unbranded Chinese IPTV box at ~2mbps that looked every bit
as good as what Netflix streams at 5mbps.

~~~
joelthelion
Could be because they don't care too much about patents and licensing issues?

~~~
envy2
They don't, but they've been getting hit hard from both domestic and
international rightsholders. There's also been a push against IPTV services
offering foreign content/live channels on 'national security' grounds in
recent months, and quite a few companies have disappeared or gone deep
underground.

The big players—LeTv, Tencent—have been fairly diligent about getting proper
licenses for content over the last year or so. LeTv just scored rights to the
Premier League, for example.

------
zokier
I wonder if the choice of encoder has an impact to the results; on a quick
glance they appear to use Fraunhofer reference encoder for H.264 whereas afaik
x264 is the state of art wrt subjective quality.

In my unprofessional opinion 8 Mbps sounds quite low for 4k h264 encoding, I
would expect that sort of rate for good quality 1080p encoding (Blu-Rays being
in the 20 Mbps range afaik)

~~~
izacus
The choice of the encoder has huge impact on the results - e.g. hardware H.264
encoders in phones will hardly produce anything watcheable at 5Mbit@720p while
x264 produces watchable output at 2Mbit at same resolution.

Same goes for those other encoders - they vary hugely in quality and used CPU
at same bitrate and resolution.

------
asb
It's a shame the royalty-free VP9 wasn't also included in this comparison.

~~~
Someone1234
You might find this an interesting read (PDF):
[http://infoscience.epfl.ch/record/200925/files/article-
vp9-s...](http://infoscience.epfl.ch/record/200925/files/article-
vp9-submited-v2.pdf)

~~~
agrover
tl;dr vp9 is competitive with h.264 but not h.265

~~~
ultramancool
It seems a lot closer to h.265 than h.264, but still worse than it in all
trials here. Give them another revision or two, they can probably beat it.

~~~
sp332
How do the complexity requirements compare? H.265 decoders have memory for
lots of previous frames, but VP9 could be at a handicap if the format limits
backward references to just a few frames.

------
blinkingled
Related : OpenCL based encoder for VP9.
[http://www.businesswire.com/news/home/20160112005093/en/Itti...](http://www.businesswire.com/news/home/20160112005093/en/Ittiam-
enables-OpenCL-based-VP9-Encode-Mobile)

------
leeoniya
wonder how Daala is coming along. no news in a while but there is code
happening:

[https://github.com/xiph/daala](https://github.com/xiph/daala)

~~~
derf_
This is the progress for the past year:

[https://arewecompressedyet.com/?r[]=master-2016-01-01-082473...](https://arewecompressedyet.com/?r\[\]=master-2016-01-01-0824738&r\[\]=master-2014-12-10T16-13-14.342Z&s=ntt-
short-1)

Select "Entire curve (old method)" to see BD-rate numbers (the new method
requires data overlap in all three bitrate ranges in order to work, which the
old curve does not have).

~~~
IshKebab
TL;DR: It is now slightly better than x264, but quite far from x265, as
measured by SSIM.

------
imaginenore
If you look at the latest movie/TV torrents, HEVC is gaining popularity, and
the files are indeed half as big.

~~~
petra
But they usually skimp on quality , it's rare/complex to find videos without
artifacts.

~~~
rpgmaker
I think this is the fault of the users who encode them. They don't do the
bitrate calculus right. That's why I mostly avoid HEVC releases.

~~~
voltagex_
I don't think there's a Scene Standard [1] for HEVC yet. Even the one for x264
is a few years old and might not represent state-of-the-art.

If you're talking about P2P groups - all bets are off. There's even major
groups of regional cappers who still use XVid... as a hobbyist archivist this
makes me very sad.

1:
[https://en.wikipedia.org/wiki/Standard_(warez)](https://en.wikipedia.org/wiki/Standard_\(warez\))

OT: personally, TV shows ripped off Blu Rays being 2GB / episode seems
ridiculous

------
voltagex_
This is completely offtopic, but I'd love to do some encoding tests, except
that the canonical test clips seem to be from Big Buck Bunny - animation
encodes differently than live-action video.

Does anyone know of some Free-as-in-speech clips from a wider range of
sources/cameras that I can use without being sued into oblivion? Australia
doesn't really have Fair Use provisions.

~~~
__P
Australia doesn't have Fair Use provision because it doesn't need it.

Australia allows use of copyrighted material for research/teaching purposes
(up to a % limit). As in it isn't against the law at all. Where as Fair Use
Provision is a defence, when you are charged with breach of copyright (much
like "self defence" in an assault charge).

(This is how even in Australia, Teachers are allowed to photocopy material for
classes, and Journalists can report on other materials without being sued).
The Copyright Agency tries to police and charge royalties if applicable.

~~~
voltagex_
Right. Looks like the first item in [1] under the 1968 Act protects me, but If
I'm wrong, [2] will see my computer destroyed.

I'm not able to find anything regarding DRM, but I think that's what they mean
by decoder.

IANAL.

1:
[http://www.austlii.edu.au/au/legis/cth/consol_act/ca1968133/...](http://www.austlii.edu.au/au/legis/cth/consol_act/ca1968133/s40.html)

2:
[https://www.comlaw.gov.au/Details/C2006A00158/Html/Text#para...](https://www.comlaw.gov.au/Details/C2006A00158/Html/Text#param128)

------
chocolatebunny
Wasn't it supposed to be 75% savings. When HEVC first came out the claim was
that 4K HEVC encoded video would have the same bitrate as 1080p AVC encoded
video.

~~~
nchrys
In fact quadrupling the number of pixels does not result necessarily in a 4x
multiplication in bitrate, much less in general. That is because a movie
recorded for example at 4K resolution is not at all the same as 4
different/independent 1080p movies that you would stick together in the same
4K frame. There are correlations/statistical properties that are exploited in
the first case by the encoder and that does not exist in the second case. I
have seen somewhere (though I can't find the reference) a back of the
enveloppe calculation using Fourier analysis that showed that to multiply by 4
the number of pixel you only needed to multiply by 2 the bitrate. So, if HEVC
has 50% bitrate savings that would explain the claim that 4K HEVC could have
the same bitrate as 1080p AVC. Of course there is much more happening in HEVC
than just a Discrete Cosine Transform (motion compensation etc.) so I don't
know how this really applies in practice, and I haven't done the tests
myself...

~~~
devonkim
The 2x factor reason is pretty intuitive if you understand that video
compression is still fundamentally representing superpositioned signals from
2D Fourier Analysis and that multiplying by 2x the number of pixels in each
direction is no different for perception than if we doubled the DPI. Double
the DPI yields up to 2x the possible frequencies needing to be represented up
to the Nyquist frequency that would cover each possible interpolated pixel.
This is part of why noise in film or audio makes representation much tougher -
noise is typically higher frequency and rather random (although distribution
depends upon brown, white, pink, etc. noise).

~~~
leni536
4x number of points in real space -> 4x points in Fourier space, the Fourier
space is still 2D. I don't get your reasoning.

OTH if you increase the DPI you bring in higher frequency components that are
not that important for perception, so you can compress them more heavily.

~~~
devonkim
I was confused with a different concept, disregard that part. FFT is by
definition reversible for a discrete signal like a quantized image so each
pixel must be reversible, so it has to be 4x total space used with no further
operation, correct.

Quantization and filtering are the more important parts of the encoder than
the FFT / DCTs since the transform is 1:1 reversible. Compression isn't just
the mathematical accuracy of a signal when it comes to lossy algorithms as you
know. A 720p video upscaled to 1440p should theoretically be exactly the same
size for the sake of effective quality but encoders don't care about just the
math and apply perceptual filters because simply doubling pixels looks really
bad perceptually it turns out.

------
nightcracker
I think that the encoding time needs more attention too, as it's crucial for
livestreaming.

~~~
Veratyr
For livestreaming, NVIDIA (I believe AMD as well actually) graphics cards
offer NVENC, which is a hardware HEVC encoder that can easily meet most
people's needs.

~~~
kevingadd
The problem with livestreaming using hardware encoders is that the quality is
_utter garbage_ compared to software encoders, which means that given the
bitrate available to you it may in fact be so ugly to be unwatchable.

A typical home DSL connection does not have enough bitrate to produce a
quality mid-to-high resolution stream using NVENC, and even if you have a good
connection, Twitch caps out at 3500kbps. The gap between something like
NVENC/QuickSync and x264 is _enormous_.

At the very least, HEVC's huge bitrate/quality advantage over H264 will help
it here, but when it comes to GPU encoders they will just be attempting to
catch up with what you can get _right now_ using x264.

Live streaming _quality_ aside, though, you are right that the hardware will
make it possible for people to do live streaming in scenarios where they
previously would've been unable to, because you can combine a hardware HEVC
encoder with a low bitrate connection and at least get something watchable.

~~~
Veratyr
Do you have data to back that up? I've found that when comparing SSIM and
PSNR, NVENC's H.264 encoder is able to quite handily beat x264 for quality
while targeting the same bitrate and encode speed. This was using a Gen 2
Maxwell GPU and comparing to a mid range Xeon.

~~~
kevingadd
It's possible software is the problem here. I have certainly never seen a way
to get acceptable quality out of NVENC in common consumer game streaming
software like OBS, and I've tried at length including adjusting profiles and
tuning settings. It doesn't help that NVENC's documentation is atrocious.

NVENC also mishandles color spaces considerably (full vs limited range), which
is a big handicap to begin with.

SSIM and PSNR aren't really the question here either, the issue is totally
perceptual. I do not doubt that on a speed basis NVENC is competitive or
outperforms, the question is simply whether you can deliver something
watchable that hits under the user's upstream cap. If you look at average
twitch streams of even mundane video games, many of them are borderline
unwatchable - this is a pervasive problem :-) Kicking butt on image-wide SSIM
and PSNR won't be much use if all the text in a story-driven game is
unreadable due to artifacts.

~~~
Veratyr
Ah, that might indeed be it. I was working with ffmpeg so the configuration
was rather easy and transparent.

------
Thaxll
Hopefully ffmpeg will get speed improvements for H.265/HEVC, last time I
checked it was way to slow to be used.

~~~
tracker1
It's usually the case with new generations of software encoders.. I remember
how long DVD rips would take in 2000... And remember how slow h.264 was when
it became more common.

------
shmerl
How soon will Daala + Thor (with some new name) shape up into something ready
for production?

Also, does anyone know what is the situation with DASH? It seems that MPEG-LA
cartel tried to create some FUD about it being patent encumbered.

------
cm2187
Can H265 benefit from Quick Sync hardware acceleration or is it just for H264?

~~~
wmf
Skylake has H.265 Quick Sync but previous generations don't.

~~~
snuxoll
Quick Sync also isn't exactly what I'd call a high-quality encoder, it is
useful for things like realtime streaming or screencast recording, but if you
are encoding movies or TV shows you will want a "real" HEVC encoder.

------
ilurkedhere
Does one need to pay to use this new codec?

~~~
wmf
Yes, you have to pay these people:
[http://www.mpegla.com/main/programs/HEVC/Pages/Intro.aspx](http://www.mpegla.com/main/programs/HEVC/Pages/Intro.aspx)
and maybe also these people:
[http://www.hevcadvance.com/#licence](http://www.hevcadvance.com/#licence)

------
ksec
No one discuss the patents and licensing problem of HEVC?

Would you have to pay for those patents if you 1\. Use Software Encoder /
Decoder? 2\. User FPGA / OpenCL accelerated encoder / decoder?

