Lines Matching refs:maxSymbolValue
92 size_t FSE_buildCTable_wksp(FSE_CTable *ct, const short *normalizedCounter, unsigned maxSymbolValue… in FSE_buildCTable_wksp() argument
119 tableU16[-1] = (U16)maxSymbolValue; in FSE_buildCTable_wksp()
128 for (u = 1; u <= maxSymbolValue + 1; u++) { in FSE_buildCTable_wksp()
136 cumul[maxSymbolValue + 1] = tableSize + 1; in FSE_buildCTable_wksp()
143 for (symbol = 0; symbol <= maxSymbolValue; symbol++) { in FSE_buildCTable_wksp()
170 for (s = 0; s <= maxSymbolValue; s++) { in FSE_buildCTable_wksp()
197 size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) in FSE_NCountWriteBound() argument
199 size_t const maxHeaderSize = (((maxSymbolValue + 1) * tableLog) >> 3) + 3; in FSE_NCountWriteBound()
200 return maxSymbolValue ? maxHeaderSize : FSE_NCOUNTBOUND; /* maxSymbolValue==0 ? use default */ in FSE_NCountWriteBound()
203 …r, size_t headerBufferSize, const short *normalizedCounter, unsigned maxSymbolValue, unsigned tabl… in FSE_writeNCount_generic() argument
295 if (charnum > maxSymbolValue + 1) in FSE_writeNCount_generic()
301 …*buffer, size_t bufferSize, const short *normalizedCounter, unsigned maxSymbolValue, unsigned tabl… in FSE_writeNCount() argument
308 if (bufferSize < FSE_NCountWriteBound(maxSymbolValue, tableLog)) in FSE_writeNCount()
309 …return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 0); in FSE_writeNCount()
311 return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 1); in FSE_writeNCount()
328 unsigned maxSymbolValue = *maxSymbolValuePtr; in FSE_count_simple() local
331 memset(count, 0, (maxSymbolValue + 1) * sizeof(*count)); in FSE_count_simple()
340 while (!count[maxSymbolValue]) in FSE_count_simple()
341 maxSymbolValue--; in FSE_count_simple()
342 *maxSymbolValuePtr = maxSymbolValue; in FSE_count_simple()
346 for (s = 0; s <= maxSymbolValue; s++) in FSE_count_simple()
362 unsigned maxSymbolValue = *maxSymbolValuePtr; in FSE_count_parallel_wksp() local
373 memset(count, 0, maxSymbolValue + 1); in FSE_count_parallel_wksp()
377 if (!maxSymbolValue) in FSE_count_parallel_wksp()
378 maxSymbolValue = 255; /* 0 == default */ in FSE_count_parallel_wksp()
423 for (s = 255; s > maxSymbolValue; s--) { in FSE_count_parallel_wksp()
432 for (s = 0; s <= maxSymbolValue; s++) { in FSE_count_parallel_wksp()
439 while (!count[maxSymbolValue]) in FSE_count_parallel_wksp()
440 maxSymbolValue--; in FSE_count_parallel_wksp()
441 *maxSymbolValuePtr = maxSymbolValue; in FSE_count_parallel_wksp()
477 size_t FSE_sizeof_CTable(unsigned maxSymbolValue, unsigned tableLog) in FSE_sizeof_CTable() argument
481 return FSE_CTABLE_SIZE_U32(tableLog, maxSymbolValue) * sizeof(U32); in FSE_sizeof_CTable()
485 static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue) in FSE_minTableLog() argument
488 U32 minBitsSymbols = BIT_highbit32(maxSymbolValue) + 2; in FSE_minTableLog()
493 unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue… in FSE_optimalTableLog_internal() argument
497 U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue); in FSE_optimalTableLog_internal()
511 unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) in FSE_optimalTableLog() argument
513 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 2); in FSE_optimalTableLog()
519 …FSE_normalizeM2(short *norm, U32 tableLog, const unsigned *count, size_t total, U32 maxSymbolValue) in FSE_normalizeM2() argument
530 for (s = 0; s <= maxSymbolValue; s++) { in FSE_normalizeM2()
555 for (s = 0; s <= maxSymbolValue; s++) { in FSE_normalizeM2()
566 if (distributed == maxSymbolValue + 1) { in FSE_normalizeM2()
571 for (s = 0; s <= maxSymbolValue; s++) in FSE_normalizeM2()
580 for (s = 0; ToDistribute > 0; s = (s + 1) % (maxSymbolValue + 1)) in FSE_normalizeM2()
591 for (s = 0; s <= maxSymbolValue; s++) { in FSE_normalizeM2()
608 …normalizedCounter, unsigned tableLog, const unsigned *count, size_t total, unsigned maxSymbolValue) in FSE_normalizeCount() argument
617 if (tableLog < FSE_minTableLog(total, maxSymbolValue)) in FSE_normalizeCount()
631 for (s = 0; s <= maxSymbolValue; s++) { in FSE_normalizeCount()
655 …ize_t const errorCode = FSE_normalizeM2(normalizedCounter, tableLog, count, total, maxSymbolValue); in FSE_normalizeCount()
670 const unsigned maxSymbolValue = tableMask; in FSE_buildCTable_raw() local
683 tableU16[-1] = (U16)maxSymbolValue; in FSE_buildCTable_raw()
692 for (s = 0; s <= maxSymbolValue; s++) { in FSE_buildCTable_raw()