From cf2f88b38f0131644bb02df6a75ca36a342b4f7d Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Wed, 17 Jun 2020 12:49:25 +0200 Subject: [PATCH] Add palette and spatial for q >= 75 and -m 5 Change-Id: I12198b7eb82a4247e606bc60342595abf4d6eee0 --- src/enc/vp8l_enc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/enc/vp8l_enc.c b/src/enc/vp8l_enc.c index c04d3927..0b44ebe4 100644 --- a/src/enc/vp8l_enc.c +++ b/src/enc/vp8l_enc.c @@ -425,6 +425,15 @@ static int EncoderAnalyze(VP8LEncoder* const enc, // Only choose the guessed best transform. *crunch_configs_size = 1; crunch_configs[0].entropy_idx_ = min_entropy_ix; + if (config->quality >= 75 && method == 5) { + // Test with and without color cache. + do_no_cache = 1; + // If we have a palette, also check in combination with spatial. + if (min_entropy_ix == kPalette) { + *crunch_configs_size = 2; + crunch_configs[1].entropy_idx_ = kPaletteAndSpatial; + } + } } } // Fill in the different LZ77s.