You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered:
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:
Compile scalar version from https://github.com/dropbox/lepton - it is
lepton-scalar
Encode overflowing file from fix bug where decoding was failing due to 16 bit math in C++ version #38 by
lepton-scalar mathoverflow.jpg mathoverflow_scalar.lep
, get mathoverflow_scalar.lepTry to decode it by current version of
lepton_jpeg_rust
$ ./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 bylepton_jpeg_rust
cannot be decoded neither bylepton-scalar
, nor bylepton-avx
The text was updated successfully, but these errors were encountered: