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

Bug in decoding of "scalar" Lepton files #53

Closed
Melirius opened this issue Dec 15, 2023 · 4 comments
Closed

Bug in decoding of "scalar" Lepton files #53

Melirius opened this issue Dec 15, 2023 · 4 comments

Comments

@Melirius
Copy link
Collaborator

Melirius commented Dec 15, 2023

Analyzing merged PR #38 I found out that while current version of library can decode Lepton files, prepared in SIMD version of DropBox Lepton, it cannot decode Lepton files, prepared by its scalar version.

Steps to reproduce:

$ ./lepton_jpeg_util mathoverflow_scalar.lep m.jpg
2023-12-15T12:51:24.441Z INFO  [lepton_jpeg_util::structs::lepton_format] decoding 8 multipexed streams with 8 threads
error code: StreamInconsistent 7 numNonzeros7x7 > 49

It appears that lepton_jpeg_rust uses 16 bit SIMD arithmetics in DC estimates prediction (1, 2), while "scalar" DropBox Lepton uses 32 bit (1, 2). BTW, as a result mathoverflow_32.lep file encoded by lepton_jpeg_rust cannot be decoded neither by lepton-scalar, nor by lepton-avx

@m6w6
Copy link
Contributor

m6w6 commented Jan 8, 2024

Does #54 resp. 413877b fix this issue?

@Melirius
Copy link
Collaborator Author

Does #54 resp. 413877b fix this issue?

No, it is just a library interface change.

@mcroomp
Copy link
Collaborator

mcroomp commented Feb 18, 2024

I added #57 to fix this

@mcroomp
Copy link
Collaborator

mcroomp commented Mar 15, 2024

fixed with #57

@mcroomp mcroomp closed this as completed Mar 15, 2024
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

No branches or pull requests

3 participants