Lines Matching refs:optLevel
71 static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) in ZSTD_setBasePrices() argument
74 optPtr->litSumBasePrice = WEIGHT(optPtr->litSum, optLevel); in ZSTD_setBasePrices()
75 optPtr->litLengthSumBasePrice = WEIGHT(optPtr->litLengthSum, optLevel); in ZSTD_setBasePrices()
76 optPtr->matchLengthSumBasePrice = WEIGHT(optPtr->matchLengthSum, optLevel); in ZSTD_setBasePrices()
77 optPtr->offCodeSumBasePrice = WEIGHT(optPtr->offCodeSum, optLevel); in ZSTD_setBasePrices()
126 int const optLevel) in ZSTD_rescaleFreqs() argument
239 ZSTD_setBasePrices(optPtr, optLevel); in ZSTD_rescaleFreqs()
247 int optLevel) in ZSTD_rawLiteralsCost() argument
261 …assert(WEIGHT(optPtr->litFreq[literals[u]], optLevel) <= optPtr->litSumBasePrice); /* literal co… in ZSTD_rawLiteralsCost()
262 price -= WEIGHT(optPtr->litFreq[literals[u]], optLevel); in ZSTD_rawLiteralsCost()
270 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) in ZSTD_litLengthPrice() argument
274 return WEIGHT(litLength, optLevel); in ZSTD_litLengthPrice()
281 return BITCOST_MULTIPLIER + ZSTD_litLengthPrice(ZSTD_BLOCKSIZE_MAX - 1, optPtr, optLevel); in ZSTD_litLengthPrice()
287 - WEIGHT(optPtr->litLengthFreq[llCode], optLevel); in ZSTD_litLengthPrice()
301 int const optLevel) in ZSTD_getMatchPrice() argument
309 return WEIGHT(mlBase, optLevel) + ((16 + offCode) * BITCOST_MULTIPLIER); in ZSTD_getMatchPrice()
312 …TCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq[offCode], optLevel)); in ZSTD_getMatchPrice()
313 if ((optLevel<2) /*static*/ && offCode >= 20) in ZSTD_getMatchPrice()
318 …ULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel)); in ZSTD_getMatchPrice()
1041 const int optLevel, in ZSTD_compressBlock_opt_generic() argument
1072 assert(optLevel <= 2); in ZSTD_compressBlock_opt_generic()
1073 ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); in ZSTD_compressBlock_opt_generic()
1097 opt[0].price = (int)ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1118 … { U32 const literalsPrice = (U32)opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1128 … U32 const matchPrice = ZSTD_getMatchPrice(offcode, pos, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1150 + (int)ZSTD_rawLiteralsCost(ip+cur-1, 1, optStatePtr, optLevel) in ZSTD_compressBlock_opt_generic()
1151 + (int)ZSTD_litLengthPrice(litlen, optStatePtr, optLevel) in ZSTD_compressBlock_opt_generic()
1152 - (int)ZSTD_litLengthPrice(litlen-1, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1189 if ( (optLevel==0) /*static_test*/ in ZSTD_compressBlock_opt_generic()
1199 U32 const basePrice = previousPrice + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1238 … int const price = (int)basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1251 … if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ in ZSTD_compressBlock_opt_generic()
1316 ZSTD_setBasePrices(optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()