Lines Matching refs:huffNode

8577 static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 maxNbBits)  in HUF_setMaxHeight()  argument
8579 const U32 largestBits = huffNode[lastNonNull].nbBits; in HUF_setMaxHeight()
8587 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight()
8588 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight()
8589 huffNode[n].nbBits = (BYTE)maxNbBits; in HUF_setMaxHeight()
8592 …while (huffNode[n].nbBits == maxNbBits) n--; /* n end at index of smallest symbol using < maxNbB… in HUF_setMaxHeight()
8606 if (huffNode[pos].nbBits >= currentNbBits) continue; in HUF_setMaxHeight()
8607 currentNbBits = huffNode[pos].nbBits; /* < maxNbBits */ in HUF_setMaxHeight()
8618 { U32 const highTotal = huffNode[highPos].count; in HUF_setMaxHeight()
8619 U32 const lowTotal = 2 * huffNode[lowPos].count; in HUF_setMaxHeight()
8629 huffNode[rankLast[nBitsToDecrease]].nbBits ++; in HUF_setMaxHeight()
8634 if (huffNode[rankLast[nBitsToDecrease]].nbBits != maxNbBits-nBitsToDecrease) in HUF_setMaxHeight()
8640 while (huffNode[n].nbBits == maxNbBits) n--; in HUF_setMaxHeight()
8641 huffNode[n+1].nbBits--; in HUF_setMaxHeight()
8647 huffNode[ rankLast[1] + 1 ].nbBits--; in HUF_setMaxHeight()
8669 static void HUF_sort(nodeElt* huffNode, const unsigned* count, U32 maxSymbolValue, rankPos* rankPos… in HUF_sort() argument
8684 while ((pos > rankPosition[r].base) && (c > huffNode[pos-1].count)) { in HUF_sort()
8685 huffNode[pos] = huffNode[pos-1]; in HUF_sort()
8688 huffNode[pos].count = c; in HUF_sort()
8689 huffNode[pos].byte = (BYTE)n; in HUF_sort()
8704 nodeElt* const huffNode = huffNode0+1; in HUF_buildCTable_wksp() local
8720 HUF_sort(huffNode, count, maxSymbolValue, wksp_tables->rankPosition); in HUF_buildCTable_wksp()
8724 while(huffNode[nonNullRank].count == 0) nonNullRank--; in HUF_buildCTable_wksp()
8726 huffNode[nodeNb].count = huffNode[lowS].count + huffNode[lowS-1].count; in HUF_buildCTable_wksp()
8727 huffNode[lowS].parent = huffNode[lowS-1].parent = (U16)nodeNb; in HUF_buildCTable_wksp()
8729 for (n=nodeNb; n<=nodeRoot; n++) huffNode[n].count = (U32)(1U<<30); in HUF_buildCTable_wksp()
8734 int const n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; in HUF_buildCTable_wksp()
8735 int const n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; in HUF_buildCTable_wksp()
8736 huffNode[nodeNb].count = huffNode[n1].count + huffNode[n2].count; in HUF_buildCTable_wksp()
8737 huffNode[n1].parent = huffNode[n2].parent = (U16)nodeNb; in HUF_buildCTable_wksp()
8742 huffNode[nodeRoot].nbBits = 0; in HUF_buildCTable_wksp()
8744 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildCTable_wksp()
8746 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildCTable_wksp()
8749 maxNbBits = HUF_setMaxHeight(huffNode, (U32)nonNullRank, maxNbBits); in HUF_buildCTable_wksp()
8757 nbPerRank[huffNode[n].nbBits]++; in HUF_buildCTable_wksp()
8766 … tree[huffNode[n].byte].nbBits = huffNode[n].nbBits; /* push nbBits per symbol, symbol order */ in HUF_buildCTable_wksp()