Comments (4)
Hello, sorry for a late reply
Apparently Github doesn't send emails any more
Let me look into it
from zune-jpeg.
Initial findings
This is an interesting case.
Benchmarks on my machine
Amd Ryzen 4500U
lib | time |
---|---|
zune-jpeg | 0.595 ms |
libjpeg-turbo | 0.446 ms |
jpeg-decoder | 0.610 ms |
And the function i.e decode_mcu_block
is heavily optimized.
The issue I think is that
-
The image is quite detailed, it means we have to deal with a lot of data, so short paths the library tries to exploit do not work.
-
Because these short paths do not work, we end up doing more work than what libjpeg-turbo does, (e.g we do more work in
IDCT
in hopes that we can exploit that most blocks consist of a row of zeroes). -
We have some extra optimizations in
decode_mcu_block
that may be a pessimization for this type of image, i.e we have one extra branch per decoded value which may be a culprit of branch mispredictions
from zune-jpeg.
After checking on this, the issue is that optimizations that work in other images become pessimizations for this particular image.
Due to the nature of this image, it remains an edge case and I do not see any issue in giving it a high priority.
But I would still like to add it to the benchmark samples to see if maybe I might optimize the library to handle such cases.
Closing this due to the above reasons, Feel free to open it if any need arises
from zune-jpeg.
High memory usage is the culprit.
Re-opening this
from zune-jpeg.
Related Issues (18)
- Project status & collaboration with jpeg-decoder? HOT 2
- Heap buffer overflow on some images in v0.1.4 HOT 13
- Panic on some real-world images at mcu.rs:354:48 HOT 18
- Unprocessed last stripes in some images. HOT 2
- Panic while panicking after an out-of-bounds index on real-world images HOT 3
- Fails to decode photos taken by Google Pixel phones HOT 6
- The attached real-world image fails to decode HOT 7
- Out-of-bounds indexing panic in `color_convert::scalar::ycbcr_to_grayscale` on real-world images
- Panic with 'called `Option::unwrap()` on a `None` value' in worker.rs:227:64 on real-world images HOT 4
- Panic with 'called `Option::unwrap()` on a `None` value' in mcu.rs:383:48 on a real-world image HOT 1
- Parallelize Huffman decoding on files with restart markers HOT 2
- 4k JPEG fails to decode with "Bad Huffman Code" HOT 4
- How do I find the stride of an image? HOT 4
- Archive this repo HOT 1
- `align_alloc` is unsound HOT 6
- Panics discovered by fuzzer HOT 28
- Valid JPEG fails to decode ("Wrong QT bit set") HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zune-jpeg.