Home
last modified time | relevance | path

Searched refs:totalCost (Results 1 – 2 of 2) sorted by relevance

/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/
H A Dhuf_compress.c221 { int totalCost = 0; in HUF_setMaxHeight() local
226 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
233totalCost >>= (largestBits - maxNbBits); /* note : totalCost is necessarily a multiple of baseCos… in HUF_setMaxHeight()
249 while (totalCost > 0) { in HUF_setMaxHeight()
250 U32 nBitsToDecrease = BIT_highbit32((U32)totalCost) + 1; in HUF_setMaxHeight()
264 totalCost -= 1 << (nBitsToDecrease-1); in HUF_setMaxHeight()
276 while (totalCost < 0) { /* Sometimes, cost correction overshoot */ in HUF_setMaxHeight()
282 totalCost++; in HUF_setMaxHeight()
287 totalCost ++; in HUF_setMaxHeight()
/freebsd/sys/contrib/zstd/lib/compress/
H A Dhuf_compress.c315 { int totalCost = 0; in HUF_setMaxHeight() local
324 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
335 assert((totalCost & (baseCost - 1)) == 0); in HUF_setMaxHeight()
336 totalCost >>= (largestBits - maxNbBits); in HUF_setMaxHeight()
337 assert(totalCost > 0); in HUF_setMaxHeight()
353 while (totalCost > 0) { in HUF_setMaxHeight()
357 U32 nBitsToDecrease = BIT_highbit32((U32)totalCost) + 1; in HUF_setMaxHeight()
377 totalCost -= 1 << (nBitsToDecrease-1); in HUF_setMaxHeight()
408 while (totalCost < 0) { /* Sometimes, cost correction overshoot */ in HUF_setMaxHeight()
417 totalCost++; in HUF_setMaxHeight()
[all …]