Reducing emerging palette size from 11 to 9 bits.
This is required to reduce memory used to construct histo_image. Change-Id: I491a06e10a3e3f3d8a00ecec286394378283ffea
This commit is contained in:
parent
bfc73db4a8
commit
b39e7487a7
@ -751,7 +751,7 @@ int VP8LCalculateEstimateForCacheSize(
|
||||
stream, &stream_size)) {
|
||||
goto Error;
|
||||
}
|
||||
for (cache_bits = 0; cache_bits < 12; ++cache_bits) {
|
||||
for (cache_bits = 0; cache_bits <= kColorCacheBitsMax; ++cache_bits) {
|
||||
double cur_entropy;
|
||||
VP8LHistogram histo;
|
||||
VP8LHistogramInit(&histo, cache_bits);
|
||||
|
@ -27,8 +27,10 @@ extern "C" {
|
||||
// Compression constants
|
||||
#define CODE_LENGTH_CODES 19
|
||||
static const int kLengthCodes = 24;
|
||||
static const int kColorCacheBitsMax = 11;
|
||||
#define PIX_OR_COPY_CODES_MAX (256 + 24 + (1 << 11))
|
||||
// The spec allows 11, we use 9 bits to reduce memory consumption in encoding.
|
||||
// Having 9 instead of 11 removes about 0.25 % of compression density.
|
||||
static const int kColorCacheBitsMax = 9;
|
||||
#define PIX_OR_COPY_CODES_MAX (256 + 24 + (1 << 9))
|
||||
static const int kMaxLength = 4096;
|
||||
|
||||
// use GNU builtins where available.
|
||||
|
Loading…
Reference in New Issue
Block a user