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

added scalar overflow handling #57

Merged
merged 2 commits into from
Mar 15, 2024
Merged

added scalar overflow handling #57

merged 2 commits into from
Mar 15, 2024

Conversation

mcroomp
Copy link
Collaborator

@mcroomp mcroomp commented Feb 18, 2024

One other place where there was a difference between the 32 bit scalar and 16 bit SIMD code. Unfortunately this is the opposite behavior of what was there before, so for backward compat I had to add another feature setting for that.

src/lib.rs Show resolved Hide resolved
Copy link
Contributor

@gbrovman gbrovman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that use_16bit_dc_estimate param to the DecompressWrapper function should become use_scalar_lepton and to control both flags - use_16bit_dc_estimate and use_16bit_adv_predict. Also, is there are a reason to keep these flags separated in EnabledFeatures?

src/lib.rs Show resolved Hide resolved
Copy link
Contributor

@gbrovman gbrovman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I missed that this change is not needed for back-compat, but it improves the compression for future compressed files and contains a small format change to support it. I have added a new comment, I think there is a small bug here.

Copy link
Contributor

@m6w6 m6w6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except for the non-existing documentation in the README.

Edit: and sorry for the delay! :/

@Melirius
Copy link
Collaborator

Melirius commented Mar 4, 2024

Thanks for fixing!

@@ -159,14 +159,19 @@ pub unsafe extern "C" fn WrapperDecompressImageEx(
) -> i32 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the comment above please update the description to "that were compressed by C++ SIMD version of Lepton"

@mcroomp mcroomp merged commit 2e9bf26 into main Mar 15, 2024
3 checks passed
@mcroomp mcroomp deleted the leptonscalar branch March 15, 2024 16:59
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.

4 participants