Home | History | Annotate | Download | only in lodepng

Lines Matching refs:windowsize

1360 static unsigned hash_init(Hash* hash, unsigned windowsize)
1364 hash->val = (int*)lodepng_malloc(sizeof(int) * windowsize);
1365 hash->chain = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize);
1366 hash->zeros = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize);
1372 for(i = 0; i < windowsize; i++) hash->val[i] = -1;
1373 for(i = 0; i < windowsize; i++) hash->chain[i] = i; /*same value as index indicates uninitialized*/
1414 /*wpos = pos & (windowsize - 1)*/
1427 sliding window (of windowsize) is used, and all past bytes in that window can be used as
1432 windowsize,
1437 unsigned maxchainlength = windowsize >= 8192 ? windowsize : windowsize / 8;
1438 unsigned maxlazymatch = windowsize >= 8192 ? MAX_SUPPORTED_DEFLATE_LENGTH : 64;
1440 unsigned usezeros = 1; /*not sure if setting it to false for windowsize < 8192 is better or worse*/
1452 if(windowsize <= 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/
1453 if((windowsize & (windowsize - 1)) != 0) return 90; /*error: must be power of two*/
1459 size_t wpos = pos & (windowsize - 1); /*position for in 'circular' hash buffers*/
1493 current_offset = hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize;
1559 if(length >= 3 && offset > windowsize) ERROR_BREAK(86 /*too big (or overflown negative) offset*/);
1578 wpos = pos & (windowsize - 1);
1732 error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize,
1942 error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize,
1984 error = hash_init(&hash, settings->windowsize);
2224 settings->windowsize = DEFAULT_WINDOWSIZE;
6023 /*the windowsize in the LodePNGCompressSettings. Requiring POT(==> & instead of %) makes encoding 12% faster.*/
6024 case 90: return "windowsize must be a power of two";