mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
Merge "Tune alpha quality mapping to more reasonable values."
This commit is contained in:
commit
1f803f645d
@ -79,10 +79,9 @@ static int EncodeLossless(const uint8_t* const data, int width, int height,
|
|||||||
WebPConfigInit(&config);
|
WebPConfigInit(&config);
|
||||||
config.lossless = 1;
|
config.lossless = 1;
|
||||||
config.method = effort_level; // impact is very small
|
config.method = effort_level; // impact is very small
|
||||||
// Set moderate default quality setting for alpha. Higher qualities (80 and
|
// Set a moderate default quality setting for alpha.
|
||||||
// above) could be very slow.
|
config.quality = 6.f * effort_level;
|
||||||
config.quality = 10.f + 15.f * effort_level;
|
assert(config.quality >= 0 && config.quality <= 100.f);
|
||||||
if (config.quality > 100.f) config.quality = 100.f;
|
|
||||||
|
|
||||||
ok = VP8LBitWriterInit(&tmp_bw, (width * height) >> 3);
|
ok = VP8LBitWriterInit(&tmp_bw, (width * height) >> 3);
|
||||||
ok = ok && (VP8LEncodeStream(&config, &picture, &tmp_bw) == VP8_ENC_OK);
|
ok = ok && (VP8LEncodeStream(&config, &picture, &tmp_bw) == VP8_ENC_OK);
|
||||||
|
Loading…
Reference in New Issue
Block a user