Lines Matching defs:tableLog

68                       const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog,
71 U32 const tableSize = 1 << tableLog;
75 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableLog ? tableSize>>1 : 1) ;
86 if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_tooLarge);
88 tableU16[-2] = (U16) tableLog;
90 assert(tableLog < 16); /* required for threshold strategy to work */
182 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog);
187 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog);
194 { U32 const maxBitsOut = tableLog - BIT_highbit32 ((U32)normalizedCounter[s]-1);
208 (double)FSE_bitCost(symbolTT, tableLog, symbol, 8) / 256);
222 size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog)
224 size_t const maxHeaderSize = (((maxSymbolValue+1) * tableLog
234 const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog,
241 const int tableSize = 1 << tableLog;
251 bitStream += (tableLog-FSE_MIN_TABLELOG) << bitCount;
257 nbBits = tableLog+1;
329 const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
331 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported */
332 if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC); /* Unsupported */
334 if (bufferSize < FSE_NCountWriteBound(maxSymbolValue, tableLog))
335 return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 0);
337 return FSE_writeNCount_generic(buffer, bufferSize, normalizedCounter, maxSymbolValue, tableLog, 1 /* write in buffer is safe */);
345 FSE_CTable* FSE_createCTable (unsigned maxSymbolValue, unsigned tableLog)
348 if (tableLog > FSE_TABLELOG_ABSOLUTE_MAX) tableLog = FSE_TABLELOG_ABSOLUTE_MAX;
349 size = FSE_CTABLE_SIZE_U32 (tableLog, maxSymbolValue) * sizeof(U32);
368 U32 tableLog = maxTableLog;
371 if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG;
372 if (maxBitsSrc < tableLog) tableLog = maxBitsSrc; /* Accuracy can be reduced */
373 if (minBits > tableLog) tableLog = minBits; /* Need a minimum to safely represent all symbol values */
374 if (tableLog < FSE_MIN_TABLELOG) tableLog = FSE_MIN_TABLELOG;
375 if (tableLog > FSE_MAX_TABLELOG) tableLog = FSE_MAX_TABLELOG;
376 return tableLog;
387 static size_t FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue, short lowProbCount)
395 U32 const lowThreshold = (U32)(total >> tableLog);
396 U32 lowOne = (U32)((total * 3) >> (tableLog + 1));
418 ToDistribute = (1 << tableLog) - distributed;
433 ToDistribute = (1 << tableLog) - distributed;
454 { U64 const vStepLog = 62 - tableLog;
473 size_t FSE_normalizeCount (short* normalizedCounter, unsigned tableLog,
478 if (tableLog==0) tableLog = FSE_DEFAULT_TABLELOG;
479 if (tableLog < FSE_MIN_TABLELOG) return ERROR(GENERIC); /* Unsupported size */
480 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); /* Unsupported size */
481 if (tableLog < FSE_minTableLog(total, maxSymbolValue)) return ERROR(GENERIC); /* Too small tableLog, compression potentially impossible */
485 U64 const scale = 62 - tableLog;
488 int stillToDistribute = 1<<tableLog;
492 U32 lowThreshold = (U32)(total >> tableLog);
512 size_t const errorCode = FSE_normalizeM2(normalizedCounter, tableLog, count, total, maxSymbolValue, lowProbCount);
526 if (nTotal != (1U<<tableLog))
527 RAWLOG(2, "Warning !!! Total == %u != %u !!!", nTotal, 1U<<tableLog);
532 return tableLog;
544 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableSize>>1); /* assumption : tableLog >= 1 */