Lines Matching refs:maxNbBits

244 static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits)  in HUF_setMaxHeight()  argument
248 if (largestBits <= maxNbBits) return largestBits; in HUF_setMaxHeight()
252 const U32 baseCost = 1 << (largestBits - maxNbBits); in HUF_setMaxHeight()
259 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight()
261 huffNode[n].nbBits = (BYTE)maxNbBits; in HUF_setMaxHeight()
265 assert(huffNode[n].nbBits <= maxNbBits); in HUF_setMaxHeight()
267 while (huffNode[n].nbBits == maxNbBits) --n; in HUF_setMaxHeight()
272 totalCost >>= (largestBits - maxNbBits); in HUF_setMaxHeight()
281 { U32 currentNbBits = maxNbBits; in HUF_setMaxHeight()
286 rankLast[maxNbBits-currentNbBits] = (U32)pos; in HUF_setMaxHeight()
333 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
349 while (huffNode[n].nbBits == maxNbBits) n--; in HUF_setMaxHeight()
363 return maxNbBits; in HUF_setMaxHeight()
488 …Tree(HUF_CElt* CTable, nodeElt const* huffNode, int nonNullRank, U32 maxSymbolValue, U32 maxNbBits) in HUF_buildCTableFromTree() argument
499 for (n=(int)maxNbBits; n>0; n--) { in HUF_buildCTableFromTree()
510 …le_wksp (HUF_CElt* tree, const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, void* workSpace… in HUF_buildCTable_wksp() argument
521 if (maxNbBits == 0) maxNbBits = HUF_TABLELOG_DEFAULT; in HUF_buildCTable_wksp()
533 maxNbBits = HUF_setMaxHeight(huffNode, (U32)nonNullRank, maxNbBits); in HUF_buildCTable_wksp()
534 if (maxNbBits > HUF_TABLELOG_MAX) return ERROR(GENERIC); /* check fit into table */ in HUF_buildCTable_wksp()
536 HUF_buildCTableFromTree(tree, huffNode, nonNullRank, maxSymbolValue, maxNbBits); in HUF_buildCTable_wksp()
538 return maxNbBits; in HUF_buildCTable_wksp()