Lines Matching refs:price
73 MEM_STATIC double ZSTD_fCost(U32 price) in ZSTD_fCost() argument
75 return (double)price / (BITCOST_MULTIPLIER*8); in ZSTD_fCost()
240 { U32 price = litLength * optPtr->litSumBasePrice; in ZSTD_rawLiteralsCost() local
244 price -= WEIGHT(optPtr->litFreq[literals[u]], optLevel); in ZSTD_rawLiteralsCost()
246 return price; in ZSTD_rawLiteralsCost()
274 U32 price; in ZSTD_getMatchPrice() local
283 …price = (offCode * BITCOST_MULTIPLIER) + (optPtr->offCodeSumBasePrice - WEIGHT(optPtr->offCodeFreq… in ZSTD_getMatchPrice()
285 …price += (offCode-19)*2 * BITCOST_MULTIPLIER; /* handicap for long distance offsets, favor decompr… in ZSTD_getMatchPrice()
289 …price += (ML_bits[mlCode] * BITCOST_MULTIPLIER) + (optPtr->matchLengthSumBasePrice - WEIGHT(optPtr… in ZSTD_getMatchPrice()
292 …price += BITCOST_MULTIPLIER / 5; /* heuristic : make matches a bit more costly to favor less seq… in ZSTD_getMatchPrice()
294 DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); in ZSTD_getMatchPrice()
295 return price; in ZSTD_getMatchPrice()
1001 opt[0].price = ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1021 … { U32 const literalsPrice = opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1025 …opt[pos].price = ZSTD_MAX_PRICE; /* mlen, litlen and price will be fixed during forward scanning… in ZSTD_compressBlock_opt_generic()
1038 opt[pos].price = sequencePrice; in ZSTD_compressBlock_opt_generic()
1052 int const price = opt[cur-1].price in ZSTD_compressBlock_opt_generic() local
1056 assert(price < 1000000000); /* overflow check */ in ZSTD_compressBlock_opt_generic()
1057 if (price <= opt[cur].price) { in ZSTD_compressBlock_opt_generic()
1059 … inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, in ZSTD_compressBlock_opt_generic()
1064 opt[cur].price = price; in ZSTD_compressBlock_opt_generic()
1067 inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), in ZSTD_compressBlock_opt_generic()
1093 && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) { in ZSTD_compressBlock_opt_generic()
1100 U32 const previousPrice = opt[cur].price; in ZSTD_compressBlock_opt_generic()
1140 … int const price = basePrice + ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic() local
1142 if ((pos > last_pos) || (price < opt[pos].price)) { in ZSTD_compressBlock_opt_generic()
1144 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()
1145 …while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty pos… in ZSTD_compressBlock_opt_generic()
1149 opt[pos].price = price; in ZSTD_compressBlock_opt_generic()
1152 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()