-
Notifications
You must be signed in to change notification settings - Fork 627
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
Faster BMP and JPEG decoding with any backend #1878
Conversation
Curiously this does not change the peak memory usage reported by |
This comment was marked as outdated.
This comment was marked as outdated.
This exposed a latent bug in TGA decoder - streaming decoding never worked correctly, but now it's causing a panic on the tests. I don't know enough about TGA to debug this. |
Thanks for making this PR! The performance observations are super valuable for optimizing. I'm a bit torn about whether to merge this as is. Special casing A skim of the BMP decoder suggests that it might not be too much work to avoid the |
That's fair, it did strike me as a bit of an abuse of the API. How about instead of having a single |
Closing this in favor of #1879 |
Avoid a
memset()
+memcpy()
of the entire decompressed image, saving 10%-15% of the time in decoding JPEGs and 25%-30% in decoding BMP, measured onI license past and future contributions under the dual MIT/Apache-2.0 license,
allowing licensees to choose either at their option.