Log in

View Full Version : HEVC vs. H.264/AVC


legenden
24th August 2013, 16:19
Hello,

I'm about to test HEVC against it's predecessor AVC standard. What I did till now is: downloaded raw YUV video sample from:
ftp://ftp.tnt.uni-hannover.de/pub/svc/testsequences/
Encoded it with HM11 (Tappencoder) to .hevc file. It is compressed from raw 178 MB to 480 KB .hevc file. After that, I muxed it to mp4 container to be able preview it with Osmo4 player.

I didn't make so many changes in cfg file (except FrameRate, SourceWidth, SourceHeight and FramesToBeEncoded according to source file). Bitrate is left default as TargetBitrate : 1000000 bps.

So, how can I encode same source raw file to h.264 with bitrate 2x larger, in order to compare frame quality?

Also, I would to compare PSNR, but I don't know how to do it.
Is there another method to compare these two standards?
In summary, I want to see goodness of HEVC against AVC.
So, can anyone help me?

Atak_Snajpera
24th August 2013, 22:17
psnr does not measure quality only human eyes do. hevc encoder is still not very well optimized so x264 with psy optimalizations and with 2x higher bitrate will beat it easly.

legenden
25th August 2013, 02:38
psnr does not measure quality only human eyes do. hevc encoder is still not very well optimized so x264 with psy optimalizations and with 2x higher bitrate will beat it easly.


Thank you for reply, but I need explanation how to do that what I mentioned in thread. Main goal of HEVC is same quality at 2x lower bitrate (theoretically). So I don't have to achieve exactly that, my goal is to achieve some results that will show goodness of HEVC against H264.

fumoffu
25th August 2013, 11:11
psnr does not measure quality only human eyes do. hevc encoder is still not very well optimized so x264 with psy optimalizations and with 2x higher bitrate will beat it easly.

I don't know if this is the time and place to mention this but I recently discovered that I prefer x264 with --psy-rd 0:0 (and --trellis 0 ) so mostly with disabled psy optimizations...
(Sry I know this is against official party line :devil:)


with the rest of the setting being something like this:

--preset slow --crf 20 --keyint 350 --ref 8 --rc-lookahead 60 --bframes 5 --deblock -1:-1 --subme 9 --trellis 0 --psy-rd 0:0 --aq-strength 1.2


I set aq-strength a bit higher then 1 to prevent blocks showing on softer gradients, which is somewhat prevented by --psy-rd 1:0 but now I have nicer not fuzzy edges / less ringing artifacts.
Which is more how it looks in HEVC so that might be something worth considering while doing comparisons...

p.s. Can someone tell me if --subme 9 does anything better then 6 when psy is set to 0?

Dark Shikari
25th August 2013, 16:10
You've only disabled psy-RD, which is just one part of psy optimizations; if you want all the other psy optimizations off (including AQ, MB-tree, etc), you need to use --no-psy. Trellis is very much not a psy optimization.

--subme 9's usefulness is orthogonal to whether or not you're using psy optimizations.

legenden
25th August 2013, 16:24
I don't know if this is the time and place to mention this but I recently discovered that I prefer x264 with --psy-rd 0:0 (and --trellis 0 ) so mostly with disabled psy optimizations...
(Sry I know this is against official party line :devil:)


with the rest of the setting being something like this:

--preset slow --crf 20 --keyint 350 --ref 8 --rc-lookahead 60 --bframes 5 --deblock -1:-1 --subme 9 --trellis 0 --psy-rd 0:0 --aq-strength 1.2


I set aq-strength a bit higher then 1 to prevent blocks showing on softer gradients, which is somewhat prevented by --psy-rd 1:0 but now I have nicer not fuzzy edges / less ringing artifacts.
Which is more how it looks in HEVC so that might be something worth considering while doing comparisons...

p.s. Can someone tell me if --subme 9 does anything better then 6 when psy is set to 0?


Ok, can you send me link to x264 encoder? And can you write me command for encoding input file to x264 file? Also, how can I set target bitrate? (for HM encoder, there's cfg file where I can set all parameters)

Blue_MiSfit
25th August 2013, 18:59
google x264 windows binary

run x264.exe --fullhelp to learn how to write x264 commands. It's not too hard.

fumoffu
25th August 2013, 18:59
You've only disabled psy-RD, which is just one part of psy optimizations; if you want all the other psy optimizations off (including AQ, MB-tree, etc), you need to use --no-psy. Trellis is very much not a psy optimization.

--subme 9's usefulness is orthogonal to whether or not you're using psy optimizations.

Yes I know it doesn't disable all psy optimizations because I found your post somewhere saying to NEVER use --no-psy because scary things will happen ;)

Blue_MiSfit
25th August 2013, 20:31
Never use --no-psy for real encoding.

If you're comparing encoders and you want to take psy out of the equation, then you can use --no-psy.

It's best to leave psy on for real encoding, since it increases subjective quality at the cost of objective quality.

legenden
25th August 2013, 21:10
Thank you guys for replies, but this thread transformed into "psy conversation". You don't help me with these discussions, I need explanation how to convert raw video sample to hevc and h264, with hevc's bitrate 2x lower.

fumoffu
26th August 2013, 00:27
Thank you guys for replies, but this thread transformed into "psy conversation". You don't help me with these discussions, I need explanation how to convert raw video sample to hevc and h264, with hevc's bitrate 2x lower.

And you want to transform it into "x264 - how to encode a video - beginners tutorial"
Don't take it the wrong way but maybe leave testing to more experienced users...

legenden
26th August 2013, 08:28
Don't take it the wrong way but maybe leave testing to more experienced users...

Every experienced user once was a beginner ;)


Ok, what I did till now is:
1) Encoded raw YUV sample into hevc using HM11 (compression from 178MB to ~500KB). Target bitrate was 1000 kbps.

2) Same source (raw) sample put into AVI container to be able open it with Avidemux, then encoded it to MPEG4 AVC (x264) with same bitrate (compression from 178MB to ~1MB).

At same bitrate, HM produced about 50% smaller file.

nevcairiel
26th August 2013, 08:32
At same bitrate, HM produced about 50% smaller file.

Which is just an indication that the ratecontrol probably just doesn't work yet.

Same bitrate should mean same filesize, by definition. :)

fumoffu
26th August 2013, 11:17
Which is just an indication that the ratecontrol probably just doesn't work yet.

Same bitrate should mean same filesize, by definition. :)

Yea...
At bitrate 1000 you should get 1MB file if the video length is 8seconds and 500KB if the video length is 4 seconds.
No matter what encoder...

legenden
26th August 2013, 14:28
Yea...
At bitrate 1000 you should get 1MB file if the video length is 8seconds and 500KB if the video length is 4 seconds.
No matter what encoder...


With HEVC, at bitrate 1000kbps, I got file of 500KB.
With Avidemux (MPEG 4 AVC - x264) at bitrate 1000kbps, I got file about 1MB. Length of video sample is 10sec.