-
Notifications
You must be signed in to change notification settings - Fork 9
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
47% of the time is spent in BoolReader::read_bool
when decoding lossy images
#71
Comments
Equivalent function in libwebp Unfortunately, unlike with Huffman compression I don't think it is possible to avoid the bit-by-bit decoding for arithmetic coding. |
Unfortunately #72 didn't seem to make a difference on benchmarks on my machine. Decoding the linked image is still 1.8x slower than I've grepped libwebp source code for There is also a |
This might be useful as reference for optimizing this: https://fgiesen.wordpress.com/2018/02/20/reading-bits-in-far-too-many-ways-part-2/ |
That whole series of articles is phenomenal and I've referred to it many times. Unfortunately it isn't directly applicable to this function. The problem is that while |
Decoding this file with
image-webp
is 1.8x slower thandwebp -noasm -nofancy
:Puente_de_Don_Luis_I,_Oporto,_Portugal,_2019-06-02,_DD_29-31_HDR.webp.gz
(source: wikipedia, converted to lossy WebP using
imagemagick
)Profiling with
samply
showsimage_webp::vp8::BoolReader::read_bool
being responsible for 47% of the total runtime when decoding this image: https://share.firefox.dev/49ZwlOoThis seems to be a similar issue to #55
The text was updated successfully, but these errors were encountered: