Log in

View Full Version : H.264 Quality Limit, how close is x264


cogman
7th August 2009, 14:05
Just wondering, I know that there has to be some theoretical quality limit that the H.264 standard can achieve. So I was wondering, how close is x264 to reaching that limit? Obviously there is always SOMETHING you can do to get a little better gains, however, are we to the point of diminishing returns yet?

Just Curious. Oh, and if there is some sort of maximum quality math formula at a given bitrate (I highly doubt there is) I would love to see it :)

Revgen
7th August 2009, 14:12
AVC is a complex codec designed to encode low-res internet videos and also encode hi-def blu-ray. So it's potential for improvement is very high due to it's versatility. Trying to make an encoder just as efficient encoding 200kbps internet video as it is encoding 1280x720 60fps video is going to take awhile to reach that potential.

There aren't even any encoders out there that support every feature that's in the specs. It'll be awhile before H.264's quality potential is met.

LoRd_MuldeR
7th August 2009, 14:49
Just wondering, I know that there has to be some theoretical quality limit that the H.264 standard can achieve.

H.264 can do lossless, so there is no inherent quality limit. You can't get "better" than lossless!

The question is more: How much quality can you squish out at a specified (average) bitrate for a particular source.

But then still the question is: How to define quality in an objective/measurable way?

Chengbin
7th August 2009, 15:17
I think the OP is asking of H.264's limit in compressibility (and therefore image quality)

LoRd_MuldeR
7th August 2009, 15:23
I think the OP is asking of H.264's limit in compressibility (and therefore image quality)

That's what I said. Compressibility here means nothing but: How much quality can we get at a specified limited (average) bitrate for a particular source.

Furthermore you cannot compare an encoder against a compression standard, like OP asked. The maximum "compressibility" of H.264 is always defined by the "best" H.264 encoder available ATM.

But how you want to decide which one the "best" encoder is? Or how much worse x264 is compared to that encoder? Even "quality" cannot be defined unambiguously.

The OP probably wants to know how close x264 is to the best H.264 encoder that will ever exist. But this cannot be answered, unless you have a crystal ball or a time machine ;)

wyti
7th August 2009, 15:39
I think he's much asking how close X264 is to be "perfected", is there much work to do, or after 3 revisions we won't see any impressive improvement cause we're approching the limit, and only improvements will be small tweaks

LoRd_MuldeR
7th August 2009, 15:52
I think he's much asking how close X264 is to be "perfected", is there much work to do, or after 3 revisions we won't see any impressive improvement cause we're approching the limit, and only improvements will be small tweaks

I think this is impossible to answer because compression standards, such as H.264, only define the bitstream format and how the decoder works.

They do not specify how the encoder converts the input video into a valid H.264 stream.

That's up to the encoder developers to figure out. Therefore the developers could always come up with new brilliant encoder-side algorithms to further improve the compressibility of H.264.

The recent commit of MB-Tree ratencontrol in x264 is only one example.

So the maximum compressibility of H.264 will only be limited by the efforts and the ingenuity of the Codec developers ;)

cogman
7th August 2009, 16:55
I think he's much asking how close X264 is to be "perfected", is there much work to do, or after 3 revisions we won't see any impressive improvement cause we're approching the limit, and only improvements will be small tweaks

Dang it, I knew I need to communicate clearer. Yes, this is what I was basically asking.

I know it is impossible to say what has better quality (at a given bitrate) as it really is totally subjective. However, I think we can safely say that the gains from something like 6 reference frames vs 16 reference frames are minimal at best at any bitrate and for most sources.

So, my question is that of whether x264 has some huge gains ahead of it, or are we starting to see the case where we are stepping from 6 to 8 reference frames?

BTW Maximum quality is achieved as a lossless compression, but maximum quality at a given bitrate will rarely be lossless. I know quality is a bad metric, but I think most here can see a video and tell what quality it (To them at least :)).

cogman
7th August 2009, 16:57
I think this is impossible to answer because compression standards, such as H.264, only define the bitstream format and how the decoder works.

They do not specify how the encoder converts the input video into a valid H.264 stream.

That's up to the encoder developers to figure out. Therefore the developers could always come up with new brilliant encoder-side algorithms to further improve the compressibility of H.264.

The recent commit of MB-Tree ratencontrol in x264 is only one example.

So the maximum compressibility of H.264 will only be limited by the efforts and the ingenuity of the Codec developers ;)

Im not so sure I see it like that. When looking at compression of any type, we often see an upper limit to how compressed a given file will get. For all intents and purposes, lzma is about as compressed as general data can get. Yeah, we can through PAQ at it and save a few more bits, but the gains are generally minimal.

akupenguin
7th August 2009, 17:41
For all intents and purposes, lzma is about as compressed as general data can get.
I wouldn't bet that lzma comes anywhere near the Kolmogorov limit even on normal files. And whenever there is extra structure, lzma definitely doesn't exploit it; that's why you need e.g. lossless video codecs rather than lzmaing the yuv data. And then there's encryption and other such things that make compressors choke without affecting the amount of information present... Compression is AI-complete, and lzma isn't an AI.

Back to video: the state of psy is sad. The best AQ in existence is a simple heuristic and I'm sure it misses lots; frequency masking is similar; sources are rarely so clean that denoising can't save a ton of bits, but removing all the noise without touching the content is Hard; nobody does content-dependent region of interest; aligning object motion to what the format can motion-compensate exactly; aligning fades/illumination changes to what weighted prediction can compensate exactly; ...