mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 13:59:51 +02:00
Optimize cache estimate logic.
Optimize 'VP8LCalculateEstimateForCacheSize' for lower quality ranges (Q < 50). The entropy is generally lower for higher cache_bits, so start searching from higher cache_bits and settle for a local minima, instead of evaluating all values. This speeds up the lossless encoding at lower qualities by 10-15%. Change-Id: I33c1e958515a2549f2e6f64b1aab3f128660dcec
This commit is contained in:
@ -142,7 +142,7 @@ int VP8LGetBackwardReferences(int width, int height,
|
||||
|
||||
// Produce an estimate for a good color cache size for the image.
|
||||
int VP8LCalculateEstimateForCacheSize(const uint32_t* const argb,
|
||||
int xsize, int ysize,
|
||||
int xsize, int ysize, int quality,
|
||||
int* const best_cache_bits);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user