WebPAnimEncoder: If 'minimize_size' and 'allow_mixed' on, try lossy + lossless.
This improves compression by ~5% at default quality. If only 'allow_mixed' is on (but 'minimize_size' isn't), we continue to use a heuristic to try one of the two or both. Change-Id: Ia573a73ea26ad25f9debff759eed69d2b0449e82
This commit is contained in:
parent
5e2eb89e1f
commit
3f4042b52a
@ -845,6 +845,9 @@ static WebPEncodingError GenerateCandidates(
|
||||
if (!enc->options_.allow_mixed) {
|
||||
candidate_ll->evaluate_ = is_lossless;
|
||||
candidate_lossy->evaluate_ = !is_lossless;
|
||||
} else if (enc->options_.minimize_size) {
|
||||
candidate_ll->evaluate_ = 1;
|
||||
candidate_lossy->evaluate_ = 1;
|
||||
} else { // Use a heuristic for trying lossless and/or lossy compression.
|
||||
const int num_colors = WebPGetColorPalette(¶ms->sub_frame_ll_, NULL);
|
||||
candidate_ll->evaluate_ = (num_colors < MAX_COLORS_LOSSLESS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user