Lines Matching refs:price
60 MEM_STATIC double ZSTD_fCost(U32 price) in ZSTD_fCost() argument
62 return (double)price / (BITCOST_MULTIPLIER*8); in ZSTD_fCost()
258 { U32 price = litLength * optPtr->litSumBasePrice; in ZSTD_rawLiteralsCost() local
262 price -= WEIGHT(optPtr->litFreq[literals[u]], optLevel); in ZSTD_rawLiteralsCost()
264 return price; in ZSTD_rawLiteralsCost()
303 U32 price; in ZSTD_getMatchPrice() local
312 …price = (offCode * BITCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq… in ZSTD_getMatchPrice()
314 …price += (offCode-19)*2 * BITCOST_MULTIPLIER; /* handicap for long distance offsets, favor decompr… in ZSTD_getMatchPrice()
318 …price += (ML_bits[mlCode] * BITCOST_MULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr… in ZSTD_getMatchPrice()
321 …price += BITCOST_MULTIPLIER / 5; /* heuristic : make matches a bit more costly to favor less seq… in ZSTD_getMatchPrice()
323 DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); in ZSTD_getMatchPrice()
324 return price; in ZSTD_getMatchPrice()
1097 opt[0].price = (int)ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1117 assert(opt[0].price >= 0); in ZSTD_compressBlock_opt_generic()
1118 … { U32 const literalsPrice = (U32)opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1122 …opt[pos].price = ZSTD_MAX_PRICE; /* mlen, litlen and price will be fixed during forward scanning… in ZSTD_compressBlock_opt_generic()
1135 opt[pos].price = (int)sequencePrice; in ZSTD_compressBlock_opt_generic()
1149 int const price = opt[cur-1].price in ZSTD_compressBlock_opt_generic() local
1153 assert(price < 1000000000); /* overflow check */ in ZSTD_compressBlock_opt_generic()
1154 if (price <= opt[cur].price) { in ZSTD_compressBlock_opt_generic()
1156 … inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, in ZSTD_compressBlock_opt_generic()
1161 opt[cur].price = price; in ZSTD_compressBlock_opt_generic()
1164 inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), in ZSTD_compressBlock_opt_generic()
1190 && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) { in ZSTD_compressBlock_opt_generic()
1195 assert(opt[cur].price >= 0); in ZSTD_compressBlock_opt_generic()
1198 U32 const previousPrice = (U32)opt[cur].price; in ZSTD_compressBlock_opt_generic()
1238 … int const price = (int)basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic() local
1240 if ((pos > last_pos) || (price < opt[pos].price)) { in ZSTD_compressBlock_opt_generic()
1242 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()
1243 …while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty pos… in ZSTD_compressBlock_opt_generic()
1247 opt[pos].price = price; in ZSTD_compressBlock_opt_generic()
1250 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()