Live data from Hacker News

H.264 is Magic

sidbala.com

11–20 of 230 posts

Re: H.264 is Magic

#11
post #3

Earlier quoted context omitted.

Thank you! I hope you now share my feeling of awe over this technical wonder.

Excellent! :) It would be really cool to further extend it showing actually how the various tiles are encoded and between frames, something along the lines of: http://jvns.ca/blog/2013/10/24/day-16-gzip-plus-poetry-equal... H.265 can even do deltas between blocks in the same frame, IIRC, and is excellent for still image compression too.

H.265 is my next post :)

Re: H.264 is Magic

#12
A real fun read. Had an assignment a couple of weeks ago where we used the most k most significant singular values of matrices (from picture of Marilyn M.) to compress the image. H.264 is on a whole other level, though ;)

Re: H.264 is Magic

#13
I love how you can edit photos from people to correct some skin imperfections without loosing the touch that the image is real (and not that blurred, plastic look) when you decompose it in wavelets and just edit some frequencies.

Don't know in photoshop, but in Gimp there's a plugin called "wavelet decomposer" that does that.

Re: H.264 is Magic

#14
The part about entropy encoding only seems explain run-length encoding (RLE). Isn't the interesting aspect of making use of entropy in compression rather to represent rarer events with longer longer code strings?

The fair coin flip is also an example of a process that cannot be compressed well at all because (1) the probably of the same event happening in a row is not as high as for unfair coins (RLE is minimally effective) and (2) the uniform distribution has maximal entropy, so there is no advantage in using different code lengths to represent the events. (Since the process has a binary outcome, there is also nothing to gain in terms of code lengths for unfair coins.)

Re: H.264 is Magic

#16
I wonder if across a lot of videos, the frequency domain representations look similar and if instead of masking in a circle we could mask with other (pre-determined) shapes to keep more information (this would require decoders to know them, of course). Or maybe this article is too high-level and it's not possible to "shape" the frequencies.

Re: H.264 is Magic

#17

I wonder if across a lot of videos, the frequency domain representations look similar and if instead of masking in a circle we could mask with other (pre-determined) shapes to keep more information (this would require decoders to know them, of course). Or maybe this article is too high-level and it's not possible to "shape" the frequencies.

It's certainly possible to use any arbitrary shape. The way it really works is that there is a quantization matrix - which essentially is a configurable mask for your frequency domain signal.

Yes, I've dumbed it down in the article to a simple circle to illustrate the point.

Re: H.264 is Magic

#18
post #15

This was a good and interesting read. Is h.264 an open standard ?

Doesn't look like it; https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

> H.264 is protected by patents owned by various parties. A license covering most (but not all) patents essential to H.264 is administered by patent pool MPEG LA.[2] Commercial use of patented H.264 technologies requires the payment of royalties to MPEG LA and other patent owners. MPEG LA has allowed the free use of H.264 technologies for streaming internet video that is free to end users, and Cisco Systems pays royalties to MPEG LA on behalf of the users of binaries for its open source H.264 encoder.

Re: H.264 is Magic

#19
post #9

I thought I'll learn something special about H.264, but all information here is high level and generic. For example if you replace H.264 with a much older technology like mpeg-1 (from 1993) every sentence stays correct, except this: "It is the result of 30+ years of work" :)

Also the fleeting mention of b-frames, which mpeg-1 doesn't have. And I believe mpeg-1 doesn't use 16×16 macroblocks.

Still, it's a good overview of generic video compression.

Post reply on HN