lossless: encoding, don't compute unnecessary histo

share the computation between different modes

3-5 % speedup for lossless alpha
1 % for lossy alpha

no change in compression density

Change-Id: I5e31413b3efcd4319121587da8320ac4f14550b2
This commit is contained in:
Jyrki Alakuijala
2015-06-18 14:54:33 +00:00
committed by James Zern
parent d92453f381
commit 85b44d8a69
3 changed files with 106 additions and 39 deletions

View File

@ -221,6 +221,9 @@ double VP8LPopulationCost(const uint32_t* const population, int length,
double VP8LGetCombinedEntropy(const uint32_t* const X,
const uint32_t* const Y, int length);
double VP8LBitsEntropy(const uint32_t* const array, int n,
uint32_t* const trivial_symbol);
// Estimate how many bits the combined entropy of literals and distance
// approximately maps to.
double VP8LHistogramEstimateBits(const VP8LHistogram* const p);