Lines Matching refs:maxSymbolValue
44 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) in HUF_optimalTableLog() argument
46 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1); in HUF_optimalTableLog()
95 unsigned maxSymbolValue = HUF_TABLELOG_MAX; in HUF_compressWeights() local
105 …{ unsigned const maxCount = HIST_count_simple(wksp->count, &maxSymbolValue, weightTable, wtSize)… in HUF_compressWeights()
110 tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue); in HUF_compressWeights()
111 …CHECK_F( FSE_normalizeCount(wksp->norm, tableLog, wksp->count, wtSize, maxSymbolValue, /* useLowPr… in HUF_compressWeights()
114 …{ CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), wksp->norm, maxSymbolValue, tableLog) … in HUF_compressWeights()
119 …CHECK_F( FSE_buildCTable_wksp(wksp->CTable, wksp->norm, maxSymbolValue, tableLog, wksp->scratchBuf… in HUF_compressWeights()
170 const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog, in HUF_writeCTable_wksp() argument
180 if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); in HUF_writeCTable_wksp()
186 for (n=0; n<maxSymbolValue; n++) in HUF_writeCTable_wksp()
191 …{ CHECK_V_F(hSize, HUF_compressWeights(op+1, maxDstSize-1, wksp->huffWeight, maxSymbolValue, &wk… in HUF_writeCTable_wksp()
192 if ((hSize>1) & (hSize < maxSymbolValue/2)) { /* FSE compressed */ in HUF_writeCTable_wksp()
198 …if (maxSymbolValue > (256-128)) return ERROR(GENERIC); /* should not happen : likely means sourc… in HUF_writeCTable_wksp()
199 …if (((maxSymbolValue+1)/2) + 1 > maxDstSize) return ERROR(dstSize_tooSmall); /* not enough space… in HUF_writeCTable_wksp()
200 op[0] = (BYTE)(128 /*special case*/ + (maxSymbolValue-1)); in HUF_writeCTable_wksp()
201 …wksp->huffWeight[maxSymbolValue] = 0; /* to be sure it doesn't cause msan issue in final combina… in HUF_writeCTable_wksp()
202 for (n=0; n<maxSymbolValue; n+=2) in HUF_writeCTable_wksp()
204 return ((maxSymbolValue+1)/2) + 1; in HUF_writeCTable_wksp()
211 const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog) in HUF_writeCTable() argument
214 …return HUF_writeCTable_wksp(dst, maxDstSize, CTable, maxSymbolValue, huffLog, &wksp, sizeof(wksp)); in HUF_writeCTable()
547 static void HUF_sort(nodeElt huffNode[], const unsigned count[], U32 const maxSymbolValue, rankPos … in HUF_sort() argument
549 U32 const maxSymbolValue1 = maxSymbolValue+1; in HUF_sort()
607 static int HUF_buildTree(nodeElt* huffNode, U32 maxSymbolValue) in HUF_buildTree() argument
615 nonNullRank = (int)maxSymbolValue; in HUF_buildTree()
653 …Tree(HUF_CElt* CTable, nodeElt const* huffNode, int nonNullRank, U32 maxSymbolValue, U32 maxNbBits) in HUF_buildCTableFromTree() argument
660 int const alphabetSize = (int)(maxSymbolValue + 1); in HUF_buildCTableFromTree()
677 size_t HUF_buildCTable_wksp (HUF_CElt* CTable, const unsigned* count, U32 maxSymbolValue, U32 maxNb… in HUF_buildCTable_wksp() argument
688 if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) in HUF_buildCTable_wksp()
693 HUF_sort(huffNode, count, maxSymbolValue, wksp_tables->rankPosition); in HUF_buildCTable_wksp()
696 nonNullRank = HUF_buildTree(huffNode, maxSymbolValue); in HUF_buildCTable_wksp()
702 HUF_buildCTableFromTree(CTable, huffNode, nonNullRank, maxSymbolValue, maxNbBits); in HUF_buildCTable_wksp()
707 … HUF_estimateCompressedSize(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) in HUF_estimateCompressedSize() argument
712 for (s = 0; s <= (int)maxSymbolValue; ++s) { in HUF_estimateCompressedSize()
718 int HUF_validateCTable(const HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue) { in HUF_validateCTable() argument
722 for (s = 0; s <= (int)maxSymbolValue; ++s) { in HUF_validateCTable()
1177 unsigned maxSymbolValue, unsigned huffLog, in HUF_compress_internal() argument
1196 if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); in HUF_compress_internal()
1197 if (!maxSymbolValue) maxSymbolValue = HUF_SYMBOLVALUE_MAX; in HUF_compress_internal()
1211 { unsigned maxSymbolValueBegin = maxSymbolValue; in HUF_compress_internal()
1215 { unsigned maxSymbolValueEnd = maxSymbolValue; in HUF_compress_internal()
1223 …{ CHECK_V_F(largest, HIST_count_wksp (table->count, &maxSymbolValue, (const BYTE*)src, srcSize, … in HUF_compress_internal()
1231 && !HUF_validateCTable(oldHufTable, table->count, maxSymbolValue)) { in HUF_compress_internal()
1242 huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue); in HUF_compress_internal()
1244 maxSymbolValue, huffLog, in HUF_compress_internal()
1251 size_t const ctableSize = HUF_CTABLE_SIZE_ST(maxSymbolValue); in HUF_compress_internal()
1257 { CHECK_V_F(hSize, HUF_writeCTable_wksp(op, dstSize, table->CTable, maxSymbolValue, huffLog, in HUF_compress_internal()
1261 … size_t const oldSize = HUF_estimateCompressedSize(oldHufTable, table->count, maxSymbolValue); in HUF_compress_internal()
1262 … size_t const newSize = HUF_estimateCompressedSize(table->CTable, table->count, maxSymbolValue); in HUF_compress_internal()
1284 unsigned maxSymbolValue, unsigned huffLog, in HUF_compress1X_wksp() argument
1288 maxSymbolValue, huffLog, HUF_singleStream, in HUF_compress1X_wksp()
1295 unsigned maxSymbolValue, unsigned huffLog, in HUF_compress1X_repeat() argument
1301 maxSymbolValue, huffLog, HUF_singleStream, in HUF_compress1X_repeat()
1311 unsigned maxSymbolValue, unsigned huffLog, in HUF_compress4X_wksp() argument
1315 maxSymbolValue, huffLog, HUF_fourStreams, in HUF_compress4X_wksp()
1326 unsigned maxSymbolValue, unsigned huffLog, in HUF_compress4X_repeat() argument
1331 maxSymbolValue, huffLog, HUF_fourStreams, in HUF_compress4X_repeat()