Lines Matching refs:optLevel

20218 static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel)  in ZSTD_setBasePrices()  argument
20221 optPtr->litSumBasePrice = WEIGHT(optPtr->litSum, optLevel); in ZSTD_setBasePrices()
20222 optPtr->litLengthSumBasePrice = WEIGHT(optPtr->litLengthSum, optLevel); in ZSTD_setBasePrices()
20223 optPtr->matchLengthSumBasePrice = WEIGHT(optPtr->matchLengthSum, optLevel); in ZSTD_setBasePrices()
20224 optPtr->offCodeSumBasePrice = WEIGHT(optPtr->offCodeSum, optLevel); in ZSTD_setBasePrices()
20252 int const optLevel) in ZSTD_rescaleFreqs() argument
20355 ZSTD_setBasePrices(optPtr, optLevel); in ZSTD_rescaleFreqs()
20363 int optLevel) in ZSTD_rawLiteralsCost() argument
20377 …assert(WEIGHT(optPtr->litFreq[literals[u]], optLevel) <= optPtr->litSumBasePrice); /* literal co… in ZSTD_rawLiteralsCost()
20378 price -= WEIGHT(optPtr->litFreq[literals[u]], optLevel); in ZSTD_rawLiteralsCost()
20386 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) in ZSTD_litLengthPrice() argument
20388 if (optPtr->priceType == zop_predef) return WEIGHT(litLength, optLevel); in ZSTD_litLengthPrice()
20394 - WEIGHT(optPtr->litLengthFreq[llCode], optLevel); in ZSTD_litLengthPrice()
20406 int const optLevel) in ZSTD_getMatchPrice() argument
20414 return WEIGHT(mlBase, optLevel) + ((16 + offCode) * BITCOST_MULTIPLIER); in ZSTD_getMatchPrice()
20417 …TCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq[offCode], optLevel)); in ZSTD_getMatchPrice()
20418 if ((optLevel<2) /*static*/ && offCode >= 20) in ZSTD_getMatchPrice()
20423 …ULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel)); in ZSTD_getMatchPrice()
20946 const int optLevel, in ZSTD_compressBlock_opt_generic() argument
20970 assert(optLevel <= 2); in ZSTD_compressBlock_opt_generic()
20971 ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); in ZSTD_compressBlock_opt_generic()
20993 opt[0].price = ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
21013 … { U32 const literalsPrice = opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
21023 … U32 const matchPrice = ZSTD_getMatchPrice(offset, pos, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
21045 + ZSTD_rawLiteralsCost(ip+cur-1, 1, optStatePtr, optLevel) in ZSTD_compressBlock_opt_generic()
21046 + ZSTD_litLengthPrice(litlen, optStatePtr, optLevel) in ZSTD_compressBlock_opt_generic()
21047 - ZSTD_litLengthPrice(litlen-1, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
21084 if ( (optLevel==0) /*static_test*/ in ZSTD_compressBlock_opt_generic()
21093 U32 const basePrice = previousPrice + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
21128 … int const price = basePrice + ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
21141 … if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ in ZSTD_compressBlock_opt_generic()
21206 ZSTD_setBasePrices(optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()