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

Use the 'Wrapping' integer type instead of wrapping methods in IDCT #144

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

lovasoa
Copy link
Contributor

@lovasoa lovasoa commented Apr 11, 2020

The IDCT code is full of wrapping integer arithmetic.
This commit changes the code to use std::num::Wrapping instead of i32::wrapping_* methods.

This is a big commit in term of number of lines changed, but this should have absolutely no impact on the generated machine code.

This just makes the IDCT code much easier to read, which should in turn make it easier to optimize.

The IDCT code is full of wrapping integer arithmetic.
This commit changes the code to use std::num::Wrapping instead of
i32::wrapping_* methods.

This is a big commit in term of number of lines changed,
but this should have absolutely no impact on the generated machine code.

This just makes the IDCT code much easier to read,
which should in turn make it easier to optimize.
@HeroicKatora HeroicKatora merged commit 0c6f5a2 into image-rs:master Apr 14, 2020
@lovasoa lovasoa deleted the idct_wrapping branch April 14, 2020 07:25
wartmanm pushed a commit to wartmanm/jpeg-decoder that referenced this pull request Oct 4, 2021
Use the 'Wrapping' integer type instead of wrapping methods in IDCT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants