Lines Matching refs:optLevel
72 static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) in ZSTD_setBasePrices() argument
75 optPtr->litSumBasePrice = WEIGHT(optPtr->litSum, optLevel); in ZSTD_setBasePrices()
76 optPtr->litLengthSumBasePrice = WEIGHT(optPtr->litLengthSum, optLevel); in ZSTD_setBasePrices()
77 optPtr->matchLengthSumBasePrice = WEIGHT(optPtr->matchLengthSum, optLevel); in ZSTD_setBasePrices()
78 optPtr->offCodeSumBasePrice = WEIGHT(optPtr->offCodeSum, optLevel); in ZSTD_setBasePrices()
106 int const optLevel) in ZSTD_rescaleFreqs() argument
209 ZSTD_setBasePrices(optPtr, optLevel); in ZSTD_rescaleFreqs()
217 int optLevel) in ZSTD_rawLiteralsCost() argument
231 …assert(WEIGHT(optPtr->litFreq[literals[u]], optLevel) <= optPtr->litSumBasePrice); /* literal co… in ZSTD_rawLiteralsCost()
232 price -= WEIGHT(optPtr->litFreq[literals[u]], optLevel); in ZSTD_rawLiteralsCost()
240 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) in ZSTD_litLengthPrice() argument
242 if (optPtr->priceType == zop_predef) return WEIGHT(litLength, optLevel); in ZSTD_litLengthPrice()
248 - WEIGHT(optPtr->litLengthFreq[llCode], optLevel); in ZSTD_litLengthPrice()
260 int const optLevel) in ZSTD_getMatchPrice() argument
268 return WEIGHT(mlBase, optLevel) + ((16 + offCode) * BITCOST_MULTIPLIER); in ZSTD_getMatchPrice()
271 …TCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq[offCode], optLevel)); in ZSTD_getMatchPrice()
272 if ((optLevel<2) /*static*/ && offCode >= 20) in ZSTD_getMatchPrice()
277 …ULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel)); in ZSTD_getMatchPrice()
934 const int optLevel, in ZSTD_compressBlock_opt_generic() argument
963 assert(optLevel <= 2); in ZSTD_compressBlock_opt_generic()
964 ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); in ZSTD_compressBlock_opt_generic()
988 opt[0].price = ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1008 … { U32 const literalsPrice = opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1018 … U32 const matchPrice = ZSTD_getMatchPrice(offset, pos, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1040 + ZSTD_rawLiteralsCost(ip+cur-1, 1, optStatePtr, optLevel) in ZSTD_compressBlock_opt_generic()
1041 + ZSTD_litLengthPrice(litlen, optStatePtr, optLevel) in ZSTD_compressBlock_opt_generic()
1042 - ZSTD_litLengthPrice(litlen-1, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1079 if ( (optLevel==0) /*static_test*/ in ZSTD_compressBlock_opt_generic()
1088 U32 const basePrice = previousPrice + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1127 … int const price = basePrice + ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1140 … if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ in ZSTD_compressBlock_opt_generic()
1205 ZSTD_setBasePrices(optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()