mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +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:
@ -80,7 +80,7 @@ static int EncodeLossless(const uint8_t* const data, int width, int height,
|
||||
config.lossless = 1;
|
||||
config.method = effort_level; // impact is very small
|
||||
// Set a moderate default quality setting for alpha.
|
||||
config.quality = 6.f * effort_level;
|
||||
config.quality = 5.f * effort_level;
|
||||
assert(config.quality >= 0 && config.quality <= 100.f);
|
||||
|
||||
ok = VP8LBitWriterInit(&tmp_bw, (width * height) >> 3);
|
||||
|
Reference in New Issue
Block a user