Lines Matching refs:params

15 #include "./params.h"
47 static BROTLI_INLINE size_t MaxZopfliLen(const BrotliEncoderParams* params) {
48 return params->quality <= 10 ?
55 const BrotliEncoderParams* params) {
56 return params->quality <= 10 ? 1 : 5;
59 static BROTLI_INLINE void SanitizeParams(BrotliEncoderParams* params) {
60 params->quality = BROTLI_MIN(int, BROTLI_MAX_QUALITY,
61 BROTLI_MAX(int, BROTLI_MIN_QUALITY, params->quality));
62 if (params->quality <= MAX_QUALITY_FOR_STATIC_ENTROPY_CODES) {
63 params->large_window = BROTLI_FALSE;
65 if (params->lgwin < BROTLI_MIN_WINDOW_BITS) {
66 params->lgwin = BROTLI_MIN_WINDOW_BITS;
68 int max_lgwin = params->large_window ? BROTLI_LARGE_MAX_WINDOW_BITS :
70 if (params->lgwin > max_lgwin) params->lgwin = max_lgwin;
75 static BROTLI_INLINE int ComputeLgBlock(const BrotliEncoderParams* params) {
76 int lgblock = params->lgblock;
77 if (params->quality == FAST_ONE_PASS_COMPRESSION_QUALITY ||
78 params->quality == FAST_TWO_PASS_COMPRESSION_QUALITY) {
79 lgblock = params->lgwin;
80 } else if (params->quality < MIN_QUALITY_FOR_BLOCK_SPLIT) {
84 if (params->quality >= 9 && params->lgwin > lgblock) {
85 lgblock = BROTLI_MIN(int, 18, params->lgwin);
99 static BROTLI_INLINE int ComputeRbBits(const BrotliEncoderParams* params) {
100 return 1 + BROTLI_MAX(int, params->lgwin, params->lgblock);
104 const BrotliEncoderParams* params) {
106 BROTLI_MIN(int, ComputeRbBits(params), BROTLI_MAX_INPUT_BLOCK_BITS);
117 const BrotliEncoderParams* params) {
118 return params->quality < 9 ? 64 : 512;
121 static BROTLI_INLINE void ChooseHasher(const BrotliEncoderParams* params,
123 if (params->quality > 9) {
125 } else if (params->quality == 4 && params->size_hint >= (1 << 20)) {
127 } else if (params->quality < 5) {
128 hparams->type = params->quality;
129 } else if (params->lgwin <= 16) {
130 hparams->type = params->quality < 7 ? 40 : params->quality < 9 ? 41 : 42;
131 } else if (params->size_hint >= (1 << 20) && params->lgwin >= 19) {
133 hparams->block_bits = params->quality - 1;
137 params->quality < 7 ? 4 : params->quality < 9 ? 10 : 16;
140 hparams->block_bits = params->quality - 1;
141 hparams->bucket_bits = params->quality < 7 ? 14 : 15;
143 params->quality < 7 ? 4 : params->quality < 9 ? 10 : 16;
146 if (params->lgwin > 24) {