Lines Matching refs:params
65 static BROTLI_INLINE size_t MaxZopfliLen(const BrotliEncoderParams* params) { in MaxZopfliLen() argument
66 return params->quality <= 10 ? in MaxZopfliLen()
73 const BrotliEncoderParams* params) { in MaxZopfliCandidates() argument
74 return params->quality <= 10 ? 1 : 5; in MaxZopfliCandidates()
77 static BROTLI_INLINE void SanitizeParams(BrotliEncoderParams* params) { in SanitizeParams() argument
78 params->quality = BROTLI_MIN(int, BROTLI_MAX_QUALITY, in SanitizeParams()
79 BROTLI_MAX(int, BROTLI_MIN_QUALITY, params->quality)); in SanitizeParams()
80 if (params->lgwin < BROTLI_MIN_WINDOW_BITS) { in SanitizeParams()
81 params->lgwin = BROTLI_MIN_WINDOW_BITS; in SanitizeParams()
82 } else if (params->lgwin > BROTLI_MAX_WINDOW_BITS) { in SanitizeParams()
83 params->lgwin = BROTLI_MAX_WINDOW_BITS; in SanitizeParams()
88 static BROTLI_INLINE int ComputeLgBlock(const BrotliEncoderParams* params) { in ComputeLgBlock() argument
89 int lgblock = params->lgblock; in ComputeLgBlock()
90 if (params->quality == FAST_ONE_PASS_COMPRESSION_QUALITY || in ComputeLgBlock()
91 params->quality == FAST_TWO_PASS_COMPRESSION_QUALITY) { in ComputeLgBlock()
92 lgblock = params->lgwin; in ComputeLgBlock()
93 } else if (params->quality < MIN_QUALITY_FOR_BLOCK_SPLIT) { in ComputeLgBlock()
97 if (params->quality >= 9 && params->lgwin > lgblock) { in ComputeLgBlock()
98 lgblock = BROTLI_MIN(int, 18, params->lgwin); in ComputeLgBlock()
112 static BROTLI_INLINE int ComputeRbBits(const BrotliEncoderParams* params) { in ComputeRbBits() argument
113 return 1 + BROTLI_MAX(int, params->lgwin, params->lgblock); in ComputeRbBits()
117 const BrotliEncoderParams* params) { in MaxMetablockSize() argument
119 BROTLI_MIN(int, ComputeRbBits(params), BROTLI_MAX_INPUT_BLOCK_BITS); in MaxMetablockSize()
130 const BrotliEncoderParams* params) { in LiteralSpreeLengthForSparseSearch() argument
131 return params->quality < 9 ? 64 : 512; in LiteralSpreeLengthForSparseSearch()
134 static BROTLI_INLINE void ChooseHasher(const BrotliEncoderParams* params, in ChooseHasher() argument
136 if (params->quality > 9) { in ChooseHasher()
138 } else if (params->quality == 4 && params->size_hint >= (1 << 20)) { in ChooseHasher()
140 } else if (params->quality < 5) { in ChooseHasher()
141 hparams->type = params->quality; in ChooseHasher()
142 } else if (params->lgwin <= 16) { in ChooseHasher()
143 hparams->type = params->quality < 7 ? 40 : params->quality < 9 ? 41 : 42; in ChooseHasher()
144 } else if (params->size_hint >= (1 << 20) && params->lgwin >= 19) { in ChooseHasher()
146 hparams->block_bits = params->quality - 1; in ChooseHasher()
150 params->quality < 7 ? 4 : params->quality < 9 ? 10 : 16; in ChooseHasher()
153 hparams->block_bits = params->quality - 1; in ChooseHasher()
154 hparams->bucket_bits = params->quality < 7 ? 14 : 15; in ChooseHasher()
156 params->quality < 7 ? 4 : params->quality < 9 ? 10 : 16; in ChooseHasher()