microsoft / microsoft/lepton_jpeg_rust
Use "division-by-multiplication" scheme to fasten division
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 182
- Forks
- 17
- Avg merge
- 19h 46m
- Merged PRs (30d)
- 1
Description
@mcroomp, unfortunately this is not working, not enough precision for all u16 range https://github.com/microsoft/lepton_jpeg_rust/blob/2f8c32420e3c67462afa459ece898b001794ce2e/src/structs/quantization_tables.rs#L88
Even 2^32 fails - first at 17215. A classical scheme from Warren should work, but it has variable shifts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/structs/quantization_tables.rs around line 88 and reproduce the precision failure, including the first reported failure at 17215 and the u16 range. Review the issue's reference to Warren's classical scheme and its variable shifts. Done means the division-by-multiplication approach is precise across the full u16 range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100