mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 05:49:51 +02:00
Tune Lossless compression for lower qualities.
This is required for WebP lossy+Alpha images, where Alpha channel is taking 60-70% of the compression (CPU) cycles. Also evaluated on 1000 PNG corpus and overall compression speed is 15-40% better for lossy (PNG+Alpha) compression. The pure lossless compression numbers are almost same (or little better) with this change. Change-Id: I9e5ae7372ed6227a9a5b64cd9cff84c747195a57
This commit is contained in:
@ -555,10 +555,10 @@ static int BackwardReferencesHashChainDistanceOnly(
|
||||
}
|
||||
// 2) Add to the hash_chain (but cannot add the last pixel)
|
||||
{
|
||||
const int last = (len < pix_count - 1 - i) ? len
|
||||
: pix_count - 1 - i;
|
||||
for (k = 0; k < last; ++k) {
|
||||
HashChainInsert(hash_chain, &argb[i + k], i + k);
|
||||
const int last = (len + i < pix_count - 1) ? len + i
|
||||
: pix_count - 1;
|
||||
for (k = i; k < last; ++k) {
|
||||
HashChainInsert(hash_chain, &argb[k], k);
|
||||
}
|
||||
}
|
||||
// 3) jump.
|
||||
|
Reference in New Issue
Block a user