Open Rodhos opened 1 year ago
Any idea, how much extra code would it take to actually implement this (how much / which parts of code can be reused)?
Any idea, how much extra code would it take to actually implement this (how much / which parts of code can be reused)?
The only thing I know is what Jon Sneyers said. https://github.com/mozilla/standards-positions/issues/522#issuecomment-856035731
"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."
Also, if you compare flowchats in slide 20 and 21 it kinda tells you which parts of the code can be reused.
JPEG provides subset of JPEG XL features (basically it's VarDCT image with only DCT8 varblocks and without fancy image features), so if jxl-oxide could read JPEG bitstream it would be able to reuse most of the rendering code.
I'm going to focus on properly implementing JPEG XL features, so rendering JPEG images is in somewhat low priority. It would be very nice to support JPEG decoding though!
Support JPEG decoding to easily replace libjpeg-turbo and MozJPEG on browsers.