-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Got the idea from:
- 2023-04-19 jxl-oxide feature request: Feature request: support JPEG decoding tirr-c/jxl-oxide#4
For more context: mozilla/standards-positions#522 (comment)
Regarding maintenance / code size / attack surface / binary size, I want to point out that potentially a JPEG XL decoder could also be used as a JPEG decoder (libjxl currently doesn't do that yet, but it does contain all the code needed to do that), which means the dependency that browsers have on libjpeg-turbo could potentially be dropped.
If the numbers from android chrome are an indication (see https://chromium-review.googlesource.com/c/chromium/src/+/2932498): libjpeg_turbo weighs in at 151 KiB, libjxl currently weighs in at 191 KiB, but plausibly libjpeg-turbo could be dropped and the jxl decoder could be used instead also for jpeg decoding, which brings the net binary size overhead down to ~40 KiB. So it does come at a cost in maintenance / code size / attack surface / binary size, but arguably the net cost is not huge, e.g. compared to libwebp (165 KiB), and probably quite comparable to the net cost of AVIF (i.e. implementing the HEIF functionality on top of an AV1 decoder that is and presumably will remain 'free' in the sense of 'available anyway').