Repository navigation
3.8.1
·
24 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
A performance release: decoding JPEG, PNG, GIF and lossy WebP and encoding JPEG are faster, and the results are identical to 3.8.0 (the same pixels and the same files). There are no API changes.
Performance
- JPEG decoding is about 14% faster (a 1920x1080 photo: 47 ms instead of 55 ms). YCbCr to RGB conversion runs in its own loop, clamps through a lookup table and stores whole pixels
- JPEG encoding is about 10% faster. Coefficients are stored in zigzag order along with each block's last nonzero position, so writing a block stops there instead of scanning all 64 coefficients twice
- PNG decoding is about 14% faster (a 1920x1080 photo: 36 ms instead of 41 ms). The Paeth filter keeps the neighbours of 3- and 4-byte pixels in variables, and RGB rows are stored as RGBA one whole pixel at a time
- GIF decoding is about 14% faster (101 frames of 300x300: 40 ms instead of 46 ms). LZW strings are copied from where they were decoded earlier instead of following the code chain back one byte at a time
- Lossy WebP decoding is about 8% faster. Upsampled pixels are stored one whole pixel at a time