lvandeve / lodepng

PNG encoder and decoder in C and C++.
zlib License
2.06k stars 421 forks source link

Multi-core acceleration #88

Open skn123 opened 5 years ago

skn123 commented 5 years ago

Can we use Multi-core / OpenCL to accelerate compression?

lvandeve commented 5 years ago

While there may be a few possibilities (more in the decoder), LZ77 encoding, the main bottleneck of the encoder, does not lend well to parallelization.

Due to the platform dependent nature of this (compared to ISO C90), if some parallelization is ever implemented it would be behind #ifdefs and only local things requiring only small amounts of code (like a local loop somwhere) to not change the entire nature of the project.

skn123 commented 4 years ago

I found this link. Maybe the useful points from this can be incorporated into your library? https://github.com/robeastham/png-parallel