Home
last modified time | relevance | path

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

/f-stack/freebsd/contrib/zstd/lib/compress/
H A Dhuf_compress.c235 { int totalCost = 0; in HUF_setMaxHeight() local
244 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
255 assert((totalCost & (baseCost - 1)) == 0); in HUF_setMaxHeight()
256 totalCost >>= (largestBits - maxNbBits); in HUF_setMaxHeight()
257 assert(totalCost > 0); in HUF_setMaxHeight()
273 while (totalCost > 0) { in HUF_setMaxHeight()
277 U32 nBitsToDecrease = BIT_highbit32((U32)totalCost) + 1; in HUF_setMaxHeight()
297 totalCost -= 1 << (nBitsToDecrease-1); in HUF_setMaxHeight()
328 while (totalCost < 0) { /* Sometimes, cost correction overshoot */ in HUF_setMaxHeight()
337 totalCost++; in HUF_setMaxHeight()
[all …]
/f-stack/freebsd/contrib/openzfs/module/zstd/lib/
H A Dzstd.c8585 { int totalCost = 0; in HUF_setMaxHeight() local
8590 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
8597totalCost >>= (largestBits - maxNbBits); /* note : totalCost is necessarily a multiple of baseCos… in HUF_setMaxHeight()
8613 while (totalCost > 0) { in HUF_setMaxHeight()
8614 U32 nBitsToDecrease = BIT_highbit32((U32)totalCost) + 1; in HUF_setMaxHeight()
8628 totalCost -= 1 << (nBitsToDecrease-1); in HUF_setMaxHeight()
8640 while (totalCost < 0) { /* Sometimes, cost correction overshoot */ in HUF_setMaxHeight()
8646 totalCost++; in HUF_setMaxHeight()
8651 totalCost ++; in HUF_setMaxHeight()