Lines Matching defs:tableLog
95 Same as FSE_compress(), but allows the selection of 'maxSymbolValue' and 'tableLog'
102 FSE_PUBLIC_API size_t FSE_compress2 (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
111 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
129 dynamically downsize 'tableLog' when conditions are met.
131 @return : recommended tableLog (necessarily <= 'maxTableLog') */
135 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
143 @return : tableLog,
145 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
149 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
151 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
159 unsigned maxSymbolValue, unsigned tableLog);
162 Note that FSE_CTable size depends on 'tableLog' and 'maxSymbolValue' */
164 FSE_PUBLIC_API FSE_CTable* FSE_createCTable (unsigned maxSymbolValue, unsigned tableLog);
170 FSE_PUBLIC_API size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
191 FSE_normalizeCount() will ensure that sum of frequencies is == 2 ^'tableLog'.
193 You can use 'tableLog'==0 to mean "use default tableLog value".
194 If you are unsure of which tableLog value to use, you can ask FSE_optimalTableLog(),
195 which will provide the optimal valid tableLog given sourceSize, maxSymbolValue, and a user-defined maximum (0 means "default").
200 The return value is tableLog if everything proceeded as expected.
202 If there is an error (ex: invalid tableLog value), the function will return an ErrorCode (which can be tested using FSE_isError()).
242 Note that its size depends on 'tableLog' */
244 FSE_PUBLIC_API FSE_DTable* FSE_createDTable(unsigned tableLog);
250 FSE_PUBLIC_API size_t FSE_buildDTable (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
271 FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
325 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);
335 * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`.
338 #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 */)
339 #define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog))
340 size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize);
344 FSE_PUBLIC_API size_t FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize);
407 FSE_encodeSymbol() outputs a maximum of 'tableLog' bits at a time.
465 For information the maximum number of bits read by FSE_decodeSymbol() is 'tableLog'.
515 const U32 tableLog = MEM_read16(ptr);
516 statePtr->value = (ptrdiff_t)1<<tableLog;
518 statePtr->symbolTT = ct + 1 + (tableLog ? (1<<(tableLog-1)) : 1);
519 statePtr->stateLog = tableLog;
557 * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */
567 * note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits */
568 MEM_STATIC U32 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog)
573 assert(tableLog < 16);
574 assert(accuracyLog < 31-tableLog); /* ensure enough room for renormalization double shift */
575 { U32 const tableSize = 1 << tableLog;
577 U32 const normalizedDeltaFromThreshold = (deltaFromThreshold << accuracyLog) >> tableLog; /* linear interpolation (very approximate) */
589 U16 tableLog;
604 DStatePtr->state = BIT_readBits(bitD, DTableH->tableLog);