mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
Use spatial predictors on top of palette no matter what.
This is fixing another inefficiency found by the pingo image optimizer. Change-Id: Icecb0d39fcbd17b403667e8e2095c7705b1dd493
This commit is contained in:
parent
7658c68613
commit
4f9f00ccf4
@ -406,10 +406,9 @@ static int EncoderAnalyze(VP8LEncoder* const enc,
|
|||||||
// Go brute force on all transforms.
|
// Go brute force on all transforms.
|
||||||
*crunch_configs_size = 0;
|
*crunch_configs_size = 0;
|
||||||
for (i = 0; i < kNumEntropyIx; ++i) {
|
for (i = 0; i < kNumEntropyIx; ++i) {
|
||||||
// We can only apply a spatial transform on top of palettization if the
|
// We can only apply kPalette or kPaletteAndSpatial if we can indeed use
|
||||||
// palette is full.
|
// a palette.
|
||||||
if ((i != kPalette && i != kPaletteAndSpatial) ||
|
if ((i != kPalette && i != kPaletteAndSpatial) || use_palette) {
|
||||||
(use_palette && (i == kPalette || enc->palette_size_ == 256))) {
|
|
||||||
assert(*crunch_configs_size < CRUNCH_CONFIGS_MAX);
|
assert(*crunch_configs_size < CRUNCH_CONFIGS_MAX);
|
||||||
crunch_configs[(*crunch_configs_size)++].entropy_idx_ = i;
|
crunch_configs[(*crunch_configs_size)++].entropy_idx_ = i;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user