Log in

View Full Version : h264 LOSSLESS experiences


KornX
3rd June 2008, 00:28
if you do a 1080p24 encode with the lossless mode, what bitrates are we talking about (yeah i know, content...)
But what are your experiences?
And how many of you use it (at least sometimes)

KornX

bond
6th June 2008, 19:29
depends on what video you try to encode losslessly of course

so try it yourself on the for you relevant content

Dust Signs
6th June 2008, 22:16
Hi,

are you talking about perceptually lossless or really lossless (QP = 0)? In the latter case it's possible that you get data rates exceeding those of raw uncompressed YUV files, in the former case - of course depending on the content - you can expect some 20 to 50 MBits/s

Dust Signs

Dark Shikari
6th June 2008, 22:18
In the latter case it's possible that you get data rates exceeding those of raw uncompressed YUV filesThis is extremely doubtful. I've only ever seen a single macroblock ever exceed its uncompressed size with lossless x264 encoding, and technically the standard requires that any such block be coded as I_PCM anyways.

Dust Signs
6th June 2008, 22:27
I wrote that it is possible and I experienced one such case myself when IPCM mode was accidently disabled. But anyways, using lossless mode makes no real sense to me because the bit rate required is extremely high and the difference to a file encoded with p.e. CRF 16 is perceptually zero.

Dust Signs

Dark Shikari
6th June 2008, 22:30
I wrote that it is possible and I experienced one such case myself when IPCM mode was accidently disabled.x264 doesn't actually support I_PCM mode; its in the code right now but it isn't enabled.But anyways, using lossless mode makes no real sense to me because the bit rate required is extremely high and the difference to a file encoded with p.e. CRF 16 is perceptually zero.

Dust SignsIts far better than most other lossless options in the case that inter prediction is very useful, such as for CGI or animated sources which were originally lossless.

Dust Signs
6th June 2008, 22:33
x264 doesn't actually support I_PCM mode; its in the code right now but it isn't enabled.
I wasn't talking about x264 concerning that matter - this time I was using a different encoder. Concerning CGI I agree with you, but I think many people are using "normal" video material (movies etc.) much more often.

Dust Signs

elguaxo
11th June 2008, 23:32
I'm doing my first lossles try right now. The source is a 01:31:20 old anime movie on DVD. It needs a lot of denoising, which I'm not doing right now. The lossles pass is only for AnimeIVTC (http://forum.doom9.org/showthread.php?t=138305). After 75% the projected filesize is of 12.8GB.

I'm using MeGUI's CQ-Lossless profile:
--qp 0 --nf --subme 1 --partitions p8x8,b8x8,i4x4 --merange 12 --threads auto --thread-input --progress --no-psnr --no-ssim --output

Dark Shikari
11th June 2008, 23:45
I'm doing my first lossles try right now. The source is a 01:31:20 old anime movie on DVD. It needs a lot of denoising, which I'm not doing right now. The lossles pass is only for AnimeIVTC (http://forum.doom9.org/showthread.php?t=138305). After 75% the projected filesize is of 12.8GB.

I'm using MeGUI's CQ-Lossless profile:
--qp 0 --nf --subme 1 --partitions p8x8,b8x8,i4x4 --merange 12 --threads auto --thread-input --progress --no-psnr --no-ssim --outputSubme 1? That's a waste; most time is spent in bitstream encoding, so a higher subme hardly takes any more time (until you get to 6 or above, at least). --nf does nothing there, and --no-psnr and --no-ssim do nothing too. The partitions is what is used as default, and the --merange is silly with --me hex.

elguaxo
12th June 2008, 00:04
This encode is almost done, but I will use subme 5 or 6 next time. What would be a good merange value if I keep --me hex? Thanks :)

Dark Shikari
12th June 2008, 00:07
This encode is almost done, but I will use subme 5 or 6 next time. What would be a good merange value if I keep --me hex? Thanks :)For hex, there's no reason to change it to anything but the default (16).

LoRd_MuldeR
12th June 2008, 00:07
This encode is almost done, but I will use subme 5 or 6 next time. What would be a good merange value if I keep --me hex? Thanks :)

I think --merange does not apply to "hex" mode, only "umh" and higher...

Dark Shikari
12th June 2008, 00:13
I think --merange does not apply to "hex" mode, only "umh" and higher...It does, its just that its clipped to 4<=X<=16.

elguaxo
12th June 2008, 00:15
:thanks:

LoRd_MuldeR
12th June 2008, 00:21
It does, its just that its clipped to 4<=X<=16.

Sorry, I was mistaken :o

foxyshadis
12th June 2008, 23:12
If you want a lot more speed out of lossless, just turn cabac off. It'll be slightly larger but not as much as you'd expect. You lose a lot less efficiency than you do at low bitrates, since so many of the randomer high quantizers are present.

Dark Shikari
12th June 2008, 23:16
If you want a lot more speed out of lossless, just turn cabac off. It'll be slightly larger but not as much as you'd expect. You lose a lot less efficiency than you do at low bitrates, since so many of the randomer high quantizers are present.The benefit of CABAC in lossless is actually higher than at low quantizers:

http://i27.tinypic.com/1414908.jpg
(thanks to akupenguin for this chart)

But yes, overall, its definitely worth turning off given the very large speed boost one gets; (de|en)coding lossless is nearly pure entropy (de|en)coding.

foxyshadis
13th June 2008, 01:58
Oh wow, that's crazy, thanks for letting me know. I normally use might-as-well-be-lossless qp 1 or 2, so I assumed behavior would translate over, good to know the truth.