Lines Matching refs:price
72 MEM_STATIC double ZSTD_fCost(int price) in ZSTD_fCost() argument
74 return (double)price / (BITCOST_MULTIPLIER*8); in ZSTD_fCost()
281 { U32 price = optPtr->litSumBasePrice * litLength; in ZSTD_rawLiteralsCost() local
288 price -= litPrice; in ZSTD_rawLiteralsCost()
290 return price; in ZSTD_rawLiteralsCost()
330 U32 price; in ZSTD_getMatchPrice() local
340 …price = (offCode * BITCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq… in ZSTD_getMatchPrice()
342 …price += (offCode-19)*2 * BITCOST_MULTIPLIER; /* handicap for long distance offsets, favor decompr… in ZSTD_getMatchPrice()
346 …price += (ML_bits[mlCode] * BITCOST_MULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr… in ZSTD_getMatchPrice()
349 …price += BITCOST_MULTIPLIER / 5; /* heuristic : make matches a bit more costly to favor less seq… in ZSTD_getMatchPrice()
351 DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); in ZSTD_getMatchPrice()
352 return price; in ZSTD_getMatchPrice()
1151 opt[0].price = LL_PRICE(litlen); in ZSTD_compressBlock_opt_generic()
1173 assert(opt[0].price >= 0); in ZSTD_compressBlock_opt_generic()
1177 opt[pos].price = ZSTD_MAX_PRICE; in ZSTD_compressBlock_opt_generic()
1186 int const sequencePrice = opt[0].price + matchPrice; in ZSTD_compressBlock_opt_generic()
1192 opt[pos].price = sequencePrice + LL_PRICE(0); in ZSTD_compressBlock_opt_generic()
1196 opt[pos].price = ZSTD_MAX_PRICE; in ZSTD_compressBlock_opt_generic()
1208 int const price = opt[cur-1].price in ZSTD_compressBlock_opt_generic() local
1211 assert(price < 1000000000); /* overflow check */ in ZSTD_compressBlock_opt_generic()
1212 if (price <= opt[cur].price) { in ZSTD_compressBlock_opt_generic()
1215 … (int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, in ZSTD_compressBlock_opt_generic()
1219 opt[cur].price = price; in ZSTD_compressBlock_opt_generic()
1226 int with1literal = prevMatch.price + LIT_PRICE(ip+cur) + LL_INCPRICE(1); in ZSTD_compressBlock_opt_generic()
1227 int withMoreLiterals = price + LIT_PRICE(ip+cur) + LL_INCPRICE(litlen+1); in ZSTD_compressBlock_opt_generic()
1231 && (with1literal < opt[cur+1].price) ) { in ZSTD_compressBlock_opt_generic()
1242 opt[cur+1].price = with1literal; in ZSTD_compressBlock_opt_generic()
1248 … (int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price)); in ZSTD_compressBlock_opt_generic()
1270 && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) { in ZSTD_compressBlock_opt_generic()
1275 assert(opt[cur].price >= 0); in ZSTD_compressBlock_opt_generic()
1277 int const previousPrice = opt[cur].price; in ZSTD_compressBlock_opt_generic()
1317 … int const price = basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic() local
1319 if ((pos > last_pos) || (price < opt[pos].price)) { in ZSTD_compressBlock_opt_generic()
1321 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()
1325 opt[last_pos].price = ZSTD_MAX_PRICE; in ZSTD_compressBlock_opt_generic()
1331 opt[pos].price = price; in ZSTD_compressBlock_opt_generic()
1334 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()
1338 opt[last_pos+1].price = ZSTD_MAX_PRICE; in ZSTD_compressBlock_opt_generic()