| Index: third_party/libwebp/enc/backward_references.h
|
| diff --git a/third_party/libwebp/enc/backward_references.h b/third_party/libwebp/enc/backward_references.h
|
| index c2c81c56e897a218496ba4a6af074cab1a9e7cbc..daa084d84681b54d022ae0d0dd59176683178a8a 100644
|
| --- a/third_party/libwebp/enc/backward_references.h
|
| +++ b/third_party/libwebp/enc/backward_references.h
|
| @@ -22,13 +22,8 @@
|
| extern "C" {
|
| #endif
|
|
|
| -// The spec allows 11, we use 9 bits to reduce memory consumption in encoding.
|
| -// Having 9 instead of 11 only removes about 0.25 % of compression density.
|
| -#define MAX_COLOR_CACHE_BITS 9
|
| -
|
| -// Max ever number of codes we'll use:
|
| -#define PIX_OR_COPY_CODES_MAX \
|
| - (NUM_LITERAL_CODES + NUM_LENGTH_CODES + (1 << MAX_COLOR_CACHE_BITS))
|
| +// The maximum allowed limit is 11.
|
| +#define MAX_COLOR_CACHE_BITS 10
|
|
|
| // -----------------------------------------------------------------------------
|
| // PixOrCopy
|
| @@ -190,21 +185,16 @@ static WEBP_INLINE void VP8LRefsCursorNext(VP8LRefsCursor* const c) {
|
| // Main entry points
|
|
|
| // Evaluates best possible backward references for specified quality.
|
| -// Further optimize for 2D locality if use_2d_locality flag is set.
|
| +// The input cache_bits to 'VP8LGetBackwardReferences' sets the maximum cache
|
| +// bits to use (passing 0 implies disabling the local color cache).
|
| +// The optimal cache bits is evaluated and set for the *cache_bits parameter.
|
| // The return value is the pointer to the best of the two backward refs viz,
|
| // refs[0] or refs[1].
|
| VP8LBackwardRefs* VP8LGetBackwardReferences(
|
| int width, int height, const uint32_t* const argb, int quality,
|
| - int cache_bits, int use_2d_locality, VP8LHashChain* const hash_chain,
|
| + int low_effort, int* const cache_bits, VP8LHashChain* const hash_chain,
|
| VP8LBackwardRefs refs[2]);
|
|
|
| -// Produce an estimate for a good color cache size for the image.
|
| -int VP8LCalculateEstimateForCacheSize(const uint32_t* const argb,
|
| - int xsize, int ysize, int quality,
|
| - VP8LHashChain* const hash_chain,
|
| - VP8LBackwardRefs* const ref,
|
| - int* const best_cache_bits);
|
| -
|
| #ifdef __cplusplus
|
| }
|
| #endif
|
|
|