• Home
  • Raw
  • Download

Lines Matching refs:params

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