New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIMD Encoder : an AVX2 implementation #143
Conversation
…t pixels are part of the same run
My PHP library use a C library defining a chunk based encoder to lower the memory footprint : https://github.com/MKCG/php-qoi/blob/main/src/FFI/lib/qoi.c#L112 I will probably open a pull request here to implement a streaming encoder. |
This is very cool, but I'm sorry to say that I will not merge it. I want this "reference" encoder here to stay as simple as possible. Also, I neither have the expertise nor the desire to maintain this SIMD implementation. If you publish your encoder under a different name (fastqoi? rapidqoi? simdqoi?) I will happily mention it in the readme here! |
Actually I add little hope that it would be accepted since I already knew you weren't very familiar with AVX2 instructions from a previous comment on the final specification thread. "simdqoi" would work for me, that would be a nice tribute to the amazing work of Daniel Lemire, Geoff Langdale and so many others. I guess that now I also have to make an AVX2 based decoder before publishing it. Thanks for your time. |
Hello,
this pull request implements an AVX2 based encoder.
It also introduces a new structure named
qoi_encoder_t
that could be use to implement a streaming encoder.When encoding the images provided on the official website, I get those results :
Note: 2672a47 avoids performing cpu intensive operations when the next 8 pixels belong to the same run. Only images with flat surfaces like screenshots will benefit from it.
Note: RGB images are a bit tricky to encode using AVX2 instructions, and this implementation can still be improved.