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:
Vincent Rabaud 2020-06-04 18:03:57 +02:00
parent 7658c68613
commit 4f9f00ccf4

View File

@ -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;
} }