The article discusses lossy compression in broad terms, but have we reaped all the low hanging fruit? Can we expect some sort of saturation just like we have with Moore's law where it gets harder and harder to optimize videos?
H.264 is Magic
151–160 of 230 posts
Re: H.264 is Magic
#152The lossy transform is important, but I think what's actually most important in video compression is getting rid of redundancy --- H.264 actually has a lossless mode in which that transform is not used, and it still compresses rather well (especially for noiseless scenes like a screencast.) You can see the difference if you compare with something like MJPEG which is essentially every frame independently encoded as a…
"essentially" makes it sound like it isn't precisely true. MJPEG is literally just a stream of JPEG images. The framing of the stream varies a bit, but many implementations are just literal JPEG images bundled one after the other into a MIME "multipart/x-mixed-replace" message.
Re: H.264 is Magic
#153Earlier quoted context omitted.
RLE a given. It's true that the average person rarely understand that this is what computers call compression, but everything after that involves a bit of thinking. Optimal huffman.
The DEFLATE[1] algorithm is actually fairly accessible, and will give a good idea of how compression works. 1: https://en.wikipedia.org/wiki/DEFLATE
Re: H.264 is Magic
#154Earlier quoted context omitted.
But actually, no. Because you could set up HTTHTTTHHHHHHHHHH the format like this: 01001000 11001010 That's sixteen bits for 17 coinflips. With no continuous sequences longer than seven, this format takes up one extra bit every seven flips. How does it work? The first bit is a sign bit. If it's zero, the next seven bits are raw coinflips, 0 for tails, 1 for heads. If it's one, the second bit signifies whether the nex…
I know that, the point is that this kind of stuff needs some thought, it's not so simple as "HTHTHTHT" = "HT five times". The article kind of glosses over that.
Re: H.264 is Magic
#155Earlier quoted context omitted.
But actually, no. Because you could set up HTTHTTTHHHHHHHHHH the format like this: 01001000 11001010 That's sixteen bits for 17 coinflips. With no continuous sequences longer than seven, this format takes up one extra bit every seven flips. How does it work? The first bit is a sign bit. If it's zero, the next seven bits are raw coinflips, 0 for tails, 1 for heads. If it's one, the second bit signifies whether the nex…
I know that, the point is that this kind of stuff needs some thought, it's not so simple as "HTHTHTHT" = "HT five times". The article kind of glosses over that.
Re: H.264 is Magic
#156Re: H.264 is Magic
#157Earlier quoted context omitted.
IMO Huffman is conceptually more complicated (not the implementation, but the logic) than arithmetic coding. And Huffman isn't optimal unless you are lucky, unlike arithmetic coding.
Huffman seems simpler to me, but I've implemented both at various times so that might colour my perspective.
Re: H.264 is Magic
#158Absolutely love this: 'Suppose you have some strange coin - you've tossed it 10 times, and every time it lands on heads. How would you describe this information to someone? You wouldn't say HHHHHHHHH. You would just say "10 tosses, all heads" - bam! You've just compressed some data! Easy. I saved you hours of mindfuck lectures.' This is a really great, simple way to explain what is otherwise a fairly complex concept…
What's really cool is that the simple explanation can be extended to explain things like why ciphertext doesn't compress well: because ciphertext has no patterns
Re: H.264 is Magic
#159I 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
#160Earlier quoted context omitted.
I try to use VLC when I can because it offers intuitive playlist support, but for high-resolution H.264 and friends I usually have to switch to Media Player Classic. VLC is willing to let my entire screen look like a blob of grey alien shit for 10 seconds instead of just taking a moment to reconstruct frames. And its hardware acceleration for newer codecs is balls. Sucks because otherwise, it's right up there with f2…
I stopped using VLC when I found mpv [0]. I really like it because it exposes everything from the CLI, so once you're familiarized with the flags you're interested in using, it's easy to play anything. For everyday usage it "just works" too, as expected of any video player. [0] https://mpv.io/