Re:John Carmack on JPEG
by vlovich123 on Friday June 04, 2021 @05:57PM
(#27399541)
Yup. You typically first decode the JPEG into a raw image format in GPU memory & then that gets transferred to scanout HW that actually sends it to the display (e.g. via HDMI). The argument feels a bit weak though. At that point why not just use JPEG through your entire pipeline & save even more bandwidth. Of course you have to decompress if you’re modifying the image in any way so it doesn’t help there.
[ Parent
| on HN ]
Re:John Carmack on JPEG
by edflsafoiewq on Friday June 04, 2021 @06:06PM
(#27399611)
You can't texel-fetch directly from JPEG data, it has to be decompressed first.
Re:John Carmack on JPEG
by vlovich123 on Friday June 04, 2021 @06:10PM
(#27399650)
Yes of course. GPUs already support compressed textures though that get decompressed on the fly. Of course JPEG has a lot of baggage that actually makes it a poor format for this but perhaps newer ones might be useful. What you lose in “optimality” (compression schemes designed for GPUs are better for games), you win in “generality” (ability to use this outside games to, for example, improve web browsing battery life).
There's a very hard distinction between GPU texture compression formats and general image compression formats - the former need to support random access lookup in constant time. Anything meeting that criterion is not going to be generally competitive; it's like the difference between UTF-32 strings and UTF-8 strings.