Lines Matching defs:maxSymbolValue

67                       const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog,
85 tableU16[-1] = (U16) maxSymbolValue;
98 for (u=1; u <= maxSymbolValue+1; u++) {
105 cumul[maxSymbolValue+1] = tableSize+1;
111 for (symbol=0; symbol<=maxSymbolValue; symbol++) {
133 for (s=0; s<=maxSymbolValue; s++) {
159 for (symbol=0; symbol<=maxSymbolValue; symbol++) {
172 size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
175 return FSE_buildCTable_wksp(ct, normalizedCounter, maxSymbolValue, tableLog, tableSymbol, sizeof(tableSymbol));
186 size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog)
188 size_t const maxHeaderSize = (((maxSymbolValue+1) * tableLog) >> 3) + 3;
189 return maxSymbolValue ? maxHeaderSize : FSE_NCOUNTBOUND; /* maxSymbolValue==0 ? use default */
194 const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog,
207 unsigned const alphabetSize = maxSymbolValue + 1;
289 const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
294 if (bufferSize < FSE_NCountWriteBound(maxSymbolValue, tableLog))
295 return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 0);
297 return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 1 /* write in buffer is safe */);
305 FSE_CTable* FSE_createCTable (unsigned maxSymbolValue, unsigned tableLog)
309 size = FSE_CTABLE_SIZE_U32 (tableLog, maxSymbolValue) * sizeof(U32);
316 static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue)
319 U32 minBitsSymbols = BIT_highbit32(maxSymbolValue) + 2;
325 unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, unsigned minus)
329 U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue);
339 unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue)
341 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 2);
348 static size_t FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue)
359 for (s=0; s<=maxSymbolValue; s++) {
387 for (s=0; s<=maxSymbolValue; s++) {
397 if (distributed == maxSymbolValue+1) {
402 for (s=0; s<=maxSymbolValue; s++)
410 for (s=0; ToDistribute > 0; s = (s+1)%(maxSymbolValue+1))
419 for (s=0; s<=maxSymbolValue; s++) {
437 unsigned maxSymbolValue)
443 if (tableLog < FSE_minTableLog(total, maxSymbolValue)) return ERROR(GENERIC); /* Too small tableLog, compression potentially impossible */
455 for (s=0; s<=maxSymbolValue; s++) {
473 size_t const errorCode = FSE_normalizeM2(normalizedCounter, tableLog, count, total, maxSymbolValue);
483 for (s=0; s<=maxSymbolValue; s++)
485 for (s=0; s<=maxSymbolValue; s++)
502 const unsigned maxSymbolValue = tableMask;
514 tableU16[-1] = (U16) maxSymbolValue;
522 for (s=0; s<=maxSymbolValue; s++) {
632 size_t FSE_compress_wksp (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize)
641 size_t const CTableSize = FSE_CTABLE_SIZE_U32(tableLog, maxSymbolValue);
646 if (wkspSize < FSE_WKSP_SIZE_U32(tableLog, maxSymbolValue)) return ERROR(tableLog_tooLarge);
648 if (!maxSymbolValue) maxSymbolValue = FSE_MAX_SYMBOL_VALUE;
652 { CHECK_V_F(maxCount, HIST_count_wksp(count, &maxSymbolValue, src, srcSize, scratchBuffer, scratchBufferSize) );
658 tableLog = FSE_optimalTableLog(tableLog, srcSize, maxSymbolValue);
659 CHECK_F( FSE_normalizeCount(norm, tableLog, count, srcSize, maxSymbolValue) );
662 { CHECK_V_F(nc_err, FSE_writeNCount(op, oend-op, norm, maxSymbolValue, tableLog) );
667 CHECK_F( FSE_buildCTable_wksp(CTable, norm, maxSymbolValue, tableLog, scratchBuffer, scratchBufferSize) );
684 size_t FSE_compress2 (void* dst, size_t dstCapacity, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog)
689 return FSE_compress_wksp(dst, dstCapacity, src, srcSize, maxSymbolValue, tableLog, &scratchBuffer, sizeof(scratchBuffer));