Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support JPEG decoding #4

Open
Rodhos opened this issue Apr 19, 2023 · 4 comments
Open

Feature request: support JPEG decoding #4

Rodhos opened this issue Apr 19, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Rodhos
Copy link

Rodhos commented Apr 19, 2023

Support JPEG decoding to easily replace libjpeg-turbo and MozJPEG on browsers.

@tirr-c tirr-c added the enhancement New feature or request label Apr 24, 2023
@pkese
Copy link

pkese commented Apr 26, 2023

Any idea, how much extra code would it take to actually implement this (how much / which parts of code can be reused)?

@Rodhos
Copy link
Author

Rodhos commented Apr 27, 2023

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.
mozilla/standards-positions#522 (comment)

"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."

@Rodhos
Copy link
Author

Rodhos commented Apr 27, 2023

Also, if you compare flowchats in slide 20 and 21 it kinda tells you which parts of the code can be reused.

https://docs.google.com/presentation/d/1LlmUR0Uoh4dgT3DjanLjhlXrk_5W2nJBDqDAMbhe8v8/edit#slide=id.g910bfb2ea8_45_0

@tirr-c
Copy link
Owner

tirr-c commented Apr 30, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants