News for hackers. Stuff that matters.
Re:The Unreasonable Effectiveness of JPEG: A Signal Processi... by bob1029 on Monday May 09, 2022 @06:18AM (#31312416)
JPEG has been growing on me lately. In addition to all of the clever information theory magic, it is also practically the fastest way to compress an image by miles.

I've got implementations on top of libjpegturbo that can encode with latency low enough to support interactive frame rates at modern resolutions. We are talking 1920x1080@4:4:4 in under 10 milliseconds.

Re:The Unreasonable Effectiveness of JPEG: A Signal Processi... by Const-me on Monday May 09, 2022 @09:49AM (#31313949)
It’s pretty fast, but I’m not sure it’s the fastest.

If you want throughput, hardware-based h.264 gonna be faster than JPEG while delivering better quality. It’s possible to configure the encoder so it only emits keyframes (I-frames), which makes the video stream a sequence of independent compressed frames. However don’t forget about parameter sets, i.e. SPS/PPS blobs – the decoder gonna need them for each frame.

If you want latency, consider BC1 https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3... or BC7 https://docs.microsoft.com/en-us/windows/win32/direct3d11/bc... They are lossy codecs usually used for textures in 3D scenes, the decoders are implemented in hardware in all modern PC GPUs. The algorithms are way simpler than JPEG, also easily parallelizable. Compression ratio is much worse though, for RGB24 images it’s 33% for BC7 and 17% for BC1, JPEG compression is way more efficient.

Re:The Unreasonable Effectiveness of JPEG: A Signal Processi... by dubiousconst281 on Monday May 09, 2022 @06:40AM (#31312544)
You can get libx264 to encode 1080p in under 10ms if you spend enough time tuning it, altough I never compared the quality to JPEG.
Re:The Unreasonable Effectiveness of JPEG: A Signal Processi... by bick_nyers on Monday May 09, 2022 @11:28AM (#31315396)
The fact that it is multi-threaded (where .jpeg and .png are not) is also a huge deal.
Re:The Unreasonable Effectiveness of JPEG: A Signal Processi... by josefx on Monday May 09, 2022 @06:27AM (#31312476)
Motion JPEG is widely used as a simple video streaming format.
Re:The Unreasonable Effectiveness of JPEG: A Signal Processi... by dr_zoidberg on Monday May 09, 2022 @10:39AM (#31314584)
Yes, but it stems from the fact that some phone manufacturers decided to reuse the hardware IP they already had in place for JPEG compression instead of paying for another chip that could do MPEG. It works, but it's not compression.

Then for some weird reason it gained traction as a "good quality video codec" (probably because there's no motion vectors, hence the associated artifacts simply can't happen with it).