News for hackers. Stuff that matters.
Re:Using Saliency in progressive JPEG XL images by joosters on Friday September 10, 2021 @05:46AM (#28479445)
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)
Re:Using Saliency in progressive JPEG XL images by teraflop on Friday September 10, 2021 @06:07AM (#28479570)
With 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.
Re:Using Saliency in progressive JPEG XL images by ben_w on Friday September 10, 2021 @07:28AM (#28480032)
Anything you could do live 26 years ago can be done today with an infinitesimal fraction of a modern mobile chip.
Re:Using Saliency in progressive JPEG XL images by thrwyoilarticle on Friday September 10, 2021 @09:04AM (#28480934)
>Every cycle that the CPU doesn't spend idle

Such as time spent networking?

Re:Using Saliency in progressive JPEG XL images by gilrain on Friday September 10, 2021 @09:20AM (#28481129)
Network latency will dwarf CPU time in that case; the CPU can idle while waiting for responses.
Re:Using Saliency in progressive JPEG XL images by p0nce on Friday September 10, 2021 @05:48AM (#28479459)
It is more CPU intensive than a baseline JPEG.
Re:Using Saliency in progressive JPEG XL images by JyrkiAlakuijala on Friday September 10, 2021 @10:58AM (#28482492)
For 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.
Re:Using Saliency in progressive JPEG XL images by sk65535 on Friday September 10, 2021 @06:06AM (#28479563)
rule 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.

Re:Using Saliency in progressive JPEG XL images by JyrkiAlakuijala on Friday September 10, 2021 @11:02AM (#28482555)
To 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.

Re:Using Saliency in progressive JPEG XL images by londons_explore on Friday September 10, 2021 @07:37AM (#28480103)
But, 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)
Re:Using Saliency in progressive JPEG XL images by sk65535 on Friday September 10, 2021 @09:20AM (#28481120)
if you re-arrange you have to wait for the bitstream to finish downloading, and thus lose the 'display something early on' feature.
Re:Using Saliency in progressive JPEG XL images by londons_explore on Friday September 10, 2021 @11:02AM (#28482547)
No... 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.