Lines Matching refs:optLevel
83 static void ZSTD_setBasePrices(optState_t* optPtr, int optLevel) in ZSTD_setBasePrices() argument
86 optPtr->litSumBasePrice = WEIGHT(optPtr->litSum, optLevel); in ZSTD_setBasePrices()
87 optPtr->litLengthSumBasePrice = WEIGHT(optPtr->litLengthSum, optLevel); in ZSTD_setBasePrices()
88 optPtr->matchLengthSumBasePrice = WEIGHT(optPtr->matchLengthSum, optLevel); in ZSTD_setBasePrices()
89 optPtr->offCodeSumBasePrice = WEIGHT(optPtr->offCodeSum, optLevel); in ZSTD_setBasePrices()
144 int const optLevel) in ZSTD_rescaleFreqs() argument
261 ZSTD_setBasePrices(optPtr, optLevel); in ZSTD_rescaleFreqs()
269 int optLevel) in ZSTD_rawLiteralsCost() argument
286 U32 litPrice = WEIGHT(optPtr->litFreq[literals[u]], optLevel); in ZSTD_rawLiteralsCost()
296 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) in ZSTD_litLengthPrice() argument
300 return WEIGHT(litLength, optLevel); in ZSTD_litLengthPrice()
308 return BITCOST_MULTIPLIER + ZSTD_litLengthPrice(ZSTD_BLOCKSIZE_MAX - 1, optPtr, optLevel); in ZSTD_litLengthPrice()
314 - WEIGHT(optPtr->litLengthFreq[llCode], optLevel); in ZSTD_litLengthPrice()
328 int const optLevel) in ZSTD_getMatchPrice() argument
336 return WEIGHT(mlBase, optLevel) in ZSTD_getMatchPrice()
340 …TCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq[offCode], optLevel)); in ZSTD_getMatchPrice()
341 if ((optLevel<2) /*static*/ && offCode >= 20) in ZSTD_getMatchPrice()
346 …ULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr->matchLengthFreq[mlCode], optLevel)); in ZSTD_getMatchPrice()
1071 #define LIT_PRICE(_p) (int)ZSTD_rawLiteralsCost(_p, 1, optStatePtr, optLevel)
1072 #define LL_PRICE(_l) (int)ZSTD_litLengthPrice(_l, optStatePtr, optLevel)
1082 const int optLevel, in ZSTD_compressBlock_opt_generic() argument
1115 assert(optLevel <= 2); in ZSTD_compressBlock_opt_generic()
1116 ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); in ZSTD_compressBlock_opt_generic()
1185 … int const matchPrice = (int)ZSTD_getMatchPrice(offBase, pos, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1220 if ( (optLevel >= 1) /* additional check only for higher modes */ in ZSTD_compressBlock_opt_generic()
1269 if ( (optLevel==0) /*static_test*/ in ZSTD_compressBlock_opt_generic()
1317 … int const price = basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1335 … if (optLevel==0) break; /* early update abort; gets ~+10% speed for about -0.01 ratio loss */ in ZSTD_compressBlock_opt_generic()
1437 ZSTD_setBasePrices(optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()