Lines Matching refs:maxNbBits

305 static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits)  in HUF_setMaxHeight()  argument
309 if (largestBits <= maxNbBits) return largestBits; in HUF_setMaxHeight()
313 const U32 baseCost = 1 << (largestBits - maxNbBits); in HUF_setMaxHeight()
320 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight()
322 huffNode[n].nbBits = (BYTE)maxNbBits; in HUF_setMaxHeight()
326 assert(huffNode[n].nbBits <= maxNbBits); in HUF_setMaxHeight()
328 while (huffNode[n].nbBits == maxNbBits) --n; in HUF_setMaxHeight()
333 totalCost >>= (largestBits - maxNbBits); in HUF_setMaxHeight()
342 { U32 currentNbBits = maxNbBits; in HUF_setMaxHeight()
347 rankLast[maxNbBits-currentNbBits] = (U32)pos; in HUF_setMaxHeight()
394 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
410 while (huffNode[n].nbBits == maxNbBits) n--; in HUF_setMaxHeight()
424 return maxNbBits; in HUF_setMaxHeight()
653 …Tree(HUF_CElt* CTable, nodeElt const* huffNode, int nonNullRank, U32 maxSymbolValue, U32 maxNbBits) in HUF_buildCTableFromTree() argument
665 for (n=(int)maxNbBits; n>0; n--) { in HUF_buildCTableFromTree()
674 CTable[0] = maxNbBits; in HUF_buildCTableFromTree()
677 …_wksp (HUF_CElt* CTable, const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, void* workSpace… in HUF_buildCTable_wksp() argument
687 if (maxNbBits == 0) maxNbBits = HUF_TABLELOG_DEFAULT; in HUF_buildCTable_wksp()
699 maxNbBits = HUF_setMaxHeight(huffNode, (U32)nonNullRank, maxNbBits); in HUF_buildCTable_wksp()
700 if (maxNbBits > HUF_TABLELOG_MAX) return ERROR(GENERIC); /* check fit into table */ in HUF_buildCTable_wksp()
702 HUF_buildCTableFromTree(CTable, huffNode, nonNullRank, maxSymbolValue, maxNbBits); in HUF_buildCTable_wksp()
704 return maxNbBits; in HUF_buildCTable_wksp()