4 ms·
Decoding JPEG images is not very CPU-intensive at all. Back in 1995, an ARM chip was fast enough to render JPEGs on the fly - i.e. apps didn't need to buffer th
by joosters 5y ago
Decoding JPEG images is not very CPU-intensive at all. Back in 1995, an ARM chip was fast enough to render JPEGs on the fly - i.e. apps didn't need to buffer the decoded versions, it was fast enough to draw them straight from the decoder when redrawing windows. (This was on RISC OS 3.6, IIRC)
- p0nce 5y agoIt is more CPU intensive than a baseline JPEG.
- sk65535 5y agorule of the thumb: progressive JPEG costs ~3x more resources (CPU, memory) than baseline JPEG. With baseline jpeg, you can blit the decoded blocks to screen directly and forget about it. For progressive, you have to buffer the whole image (in DCT format!) and do the idct / color-space conversion on all passes.
- londons_explore 5y agoBut, provided you don't need the intermediate results, you can rearrange the data back to progressive and then render it the simple way, for those times when CPU power is constrained more than the network. Total CPU use ends up being pretty much the same (the data rearrange step is rather cheap compared to the idct's)
- sk65535 5y agoif you re-arrange you have to wait for the bitstream to finish downloading, and thus lose the 'display something early on' feature.
- londons_explore 5y agoNo... After all but the final pass of the image has been delivered you have enough data to start doing progressive rendering. The final pass contains most of the bytes, so you still get a pretty decent progressive render too.
- JyrkiAlakuijala 5y agoTo minimize additional computation JPEGs often use a limited number of scans, for example 5. By default JPEG XL's progressive uses only two scans, 8x8 DC, and the transforms in the second pass using a 256x256 tiles in encode-time chosen priority order. This choise allows JPEG XL to do only one round of DCTs even in the progressive case. The 8x8 DC is interpolated using cheaper methods. Because of the design choices, every JPEG XL image is guaranteed to be at least minimally progressive in the same manner, i.e., 8x8 DC first. Having a guarantee will make it more rewarding for system designers to focus on extracting some user-experience benefit from that feature.
- JyrkiAlakuijala 5y agoFor the last 10 years progressive JPEG has been the fastest growing image format in the internet. Today, about 20-25 % of JPEGs in the internet are progressive. Mozjpeg outputs progressive JPEGs by default. JPEG decoding times are usually in the ballpark of 10 milliseconds, often considered an insignificant performance factor in the system analysis.
- teraflop 5y agoWith battery-powered devices being so common, "fast enough" is no longer the only criterion for performance. Every cycle that the CPU doesn't spend idle subtracts from battery life.
- thrwyoilarticle 5y ago>Every cycle that the CPU doesn't spend idle Such as time spent networking?
- gilrain 5y agoNetwork latency will dwarf CPU time in that case; the CPU can idle while waiting for responses.
- ben_w 5y agoAnything you could do live 26 years ago can be done today with an infinitesimal fraction of a modern mobile chip.