Comments (8)
It is quite possible to parallelise the most CPU consuming parts of encoding without changing the format. Unfortunately, same trick would not work for decoder (because of long calculation dependency chains).
We have experimental "groups" encoding that splits image into 256x256 px pieces and processes them in parallel. This allows 3x speedup. Hopefully, we will publish it soon.
Could you please elaborate how much is "much slow than lepton"?
from brunsli.
Thanks for reply. In my tests, Brunsli is faster than lepton within single-thread, about 2x, but Brunsli's decompression is slower than lepton with multithread, about 3x~4.7x, so if brunsli could support multithread, it's support to be faster than lepton.
It's pleasure to see Brunsli support multithread compress/decompress soon.
Lepton' code is in https://github.com/dropbox/lepton.
from brunsli.
BTW, What does the follow sentence means?
We have experimental "groups" encoding that splits image into 256x256 px pieces and processes them in parallel. This allows 3x speedup. Hopefully, we will publish it soon.
It's encoded within multithread or SIMD? If it's multithread, it should be faster in proportion to the number of threads, such as 4 threads, it will allows 4x speedup.
from brunsli.
PR #48 contains experimental / POC mode that allows parallel encoding / decoding.
This does not include parallel JPEG serialization / deserialization, so that could be a bottleneck.
Give it a try, to see if it improves the situation.
Warning: "groups" file format is not compatible with vanilla Brunsli.
from brunsli.
Thanks for reply.
I have tested the "groups" encode/decode, default version allows 2x speedup. After changing the threadpool from 4 to 8 threads, it allows 3x speedup. Within 8 threads, "groups" encode/decode is faster than lepton in encode, about 1.4x, but decode is slower than lepton, about 10%.
Looking forward to seeing further optimization.
It's pleasure to see the "groups" encode/decode so soon. Thank you!
from brunsli.
As I've mentioned before - serialisation of JPEG is single threaded. This could be parallelised, if "reset interval" has proper value.
Unfortunately, out of 100k random internet JPEGs only 30k has it set...
from brunsli.
(PS: if byte-wise JPEG reconstruction is a non-goal, "reset interval" could be set during encoding).
from brunsli.
ahaha, "groups" encode/decode's speed is acceptable.
from brunsli.
Related Issues (20)
- which type of ANS does brunsli use? HOT 3
- Is brunsli's ANS using static probability distributions? HOT 2
- Idea: https://brunsli.dev/split.html?progressive image resolution
- Add ratio to brunsli.dev
- brunsli.dev cannot decode JPEG compressed by recent cbrunsli.exe builds (CMake build 78 and newer) HOT 3
- [openSUSE] W: shared-lib-calls-exit from RPMLINT HOT 7
- core dumped when turn on Multithreading switch HOT 2
- File signature HOT 6
- CI: Add tests HOT 2
- HDR JPEG support? HOT 1
- Latest build? HOT 3
- Unable to finish the compress/decompress task when enables multithread mode on Android HOT 1
- Compiler is not EMSCRIPTEN HOT 1
- Add link to brunsli.dev in repository description and README HOT 2
- Mode without preserving structure of the original JPEG file HOT 3
- Arithmetic coded JPEG support HOT 2
- Brunsli cannot decode JPEG that was compressed in JPEG XL's reference software's unofficial build HOT 3
- Build with dyanmically loaded libraries
- What is the public API that should be exported? HOT 1
- Encoding is 10x slower with Safari HOT 2
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 brunsli.