Lines Matching defs:tableLog
72 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
90 dynamically downsize 'tableLog' when conditions are met.
92 @return : recommended tableLog (necessarily <= 'maxTableLog') */
96 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
104 @return : tableLog,
106 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
110 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
112 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
120 unsigned maxSymbolValue, unsigned tableLog);
123 Note that FSE_CTable size depends on 'tableLog' and 'maxSymbolValue' */
129 FSE_PUBLIC_API size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
150 FSE_normalizeCount() will ensure that sum of frequencies is == 2 ^'tableLog'.
152 You can use 'tableLog'==0 to mean "use default tableLog value".
153 If you are unsure of which tableLog value to use, you can ask FSE_optimalTableLog(),
154 which will provide the optimal valid tableLog given sourceSize, maxSymbolValue, and a user-defined maximum (0 means "default").
159 The return value is tableLog if everything proceeded as expected.
161 If there is an error (ex: invalid tableLog value), the function will return an ErrorCode (which can be tested using FSE_isError()).
214 FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
269 * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`.
272 #define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (((maxSymbolValue + 2) + (1ull << (tableLog)))/2 + sizeof(U64)/sizeof(U32) /* additional 8 bytes for potential table overwrite */)
273 #define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog))
274 size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize);
278 FSE_PUBLIC_API size_t FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize);
333 FSE_encodeSymbol() outputs a maximum of 'tableLog' bits at a time.
391 For information the maximum number of bits read by FSE_decodeSymbol() is 'tableLog'.
441 const U32 tableLog = MEM_read16(ptr);
442 statePtr->value = (ptrdiff_t)1<<tableLog;
444 statePtr->symbolTT = ct + 1 + (tableLog ? (1<<(tableLog-1)) : 1);
445 statePtr->stateLog = tableLog;
483 * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */
493 * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */
494 MEM_STATIC U32 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog)
499 assert(tableLog < 16);
500 assert(accuracyLog < 31-tableLog); /* ensure enough room for renormalization double shift */
501 { U32 const tableSize = 1 << tableLog;
503 U32 const normalizedDeltaFromThreshold = (deltaFromThreshold << accuracyLog) >> tableLog; /* linear interpolation (very approximate) */
515 U16 tableLog;
530 DStatePtr->state = BIT_readBits(bitD, DTableH->tableLog);