Home
last modified time | relevance | path

Searched refs:tableLog (Results 1 – 11 of 11) sorted by relevance

/linux/lib/zstd/compress/
H A Dfse_compress.c70 const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, in FSE_buildCTable_wksp() argument
73 U32 const tableSize = 1 << tableLog; in FSE_buildCTable_wksp()
77 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableLog ? tableSize>>1 : 1) ; in FSE_buildCTable_wksp()
88 …if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_to… in FSE_buildCTable_wksp()
90 tableU16[-2] = (U16) tableLog; in FSE_buildCTable_wksp()
92 assert(tableLog < 16); /* required for threshold strategy to work */ in FSE_buildCTable_wksp()
184 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
189 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
196 { U32 const maxBitsOut = tableLog - ZSTD_highbit32 ((U32)normalizedCounter[s]-1); in FSE_buildCTable_wksp()
210 (double)FSE_bitCost(symbolTT, tableLog, symbol, 8) / 256); in FSE_buildCTable_wksp()
[all …]
H A Dhuf_compress.c154 U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; in HUF_compressWeights() local
168 tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue); in HUF_compressWeights()
169 …CHECK_F( FSE_normalizeCount(wksp->norm, tableLog, wksp->count, wtSize, maxSymbolValue, /* useLowPr… in HUF_compressWeights()
172 … CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), wksp->norm, maxSymbolValue, tableLog) ); in HUF_compressWeights()
177 …CHECK_F( FSE_buildCTable_wksp(wksp->CTable, wksp->norm, maxSymbolValue, tableLog, wksp->scratchBuf… in HUF_compressWeights()
228 static void HUF_writeCTableHeader(HUF_CElt* ctable, U32 tableLog, U32 maxSymbolValue) in HUF_writeCTableHeader() argument
233 assert(tableLog < 256); in HUF_writeCTableHeader()
234 header.tableLog = (BYTE)tableLog; in HUF_writeCTableHeader()
258 assert(HUF_readCTableHeader(CTable).tableLog == huffLog); in HUF_writeCTable_wksp()
294 U32 tableLog = 0; in HUF_readCTable() local
[all …]
H A Dzstd_compress_sequences.c76 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_NCountCost() local
77 …FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)… in ZSTD_NCountCost()
78 return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog); in ZSTD_NCountCost()
121 unsigned const tableLog = cstate.stateLog; in ZSTD_fseBitCost() local
122 unsigned const badCost = (tableLog + 1) << kAccuracyLog; in ZSTD_fseBitCost()
123 unsigned const bitCost = FSE_bitCost(cstate.symbolTT, tableLog, s, kAccuracyLog); in ZSTD_fseBitCost()
271 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_buildCTable() local
279 …FORWARD_IF_ERROR(FSE_normalizeCount(wksp->norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCoun… in ZSTD_buildCTable()
281 … NCountSize = FSE_writeNCount(op, (size_t)(oend - op), wksp->norm, max, tableLog); /* overflow p… in ZSTD_buildCTable()
283 …FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, wksp->norm, max, tableLog, wksp->wksp, sizeof(wk… in ZSTD_buildCTable()
/linux/lib/zstd/common/
H A Dfse.h101 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
107 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
115 unsigned maxSymbolValue, unsigned tableLog);
124 …CTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
264 …E_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (((maxSymbolValue + 2) + (1ull << (tab… argument
265 …WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(m… argument
266 …* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace,…
270 …* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace,…
433 const U32 tableLog = MEM_read16(ptr); in FSE_initCState() local
434 statePtr->value = (ptrdiff_t)1<<tableLog; in FSE_initCState()
[all …]
H A Dfse_decompress.c59 …* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace,… in FSE_buildDTable_internal() argument
67 U32 const tableSize = 1 << tableLog; in FSE_buildDTable_internal()
71 …if (FSE_BUILD_DTABLE_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(maxSymbolValue_t… in FSE_buildDTable_internal()
73 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge); in FSE_buildDTable_internal()
77 DTableH.tableLog = (U16)tableLog; in FSE_buildDTable_internal()
79 { S16 const largeLimit= (S16)(1 << (tableLog-1)); in FSE_buildDTable_internal()
155 tableDecode[u].nbBits = (BYTE) (tableLog - ZSTD_highbit32(nextState) ); in FSE_buildDTable_internal()
162 …* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace,… in FSE_buildDTable_wksp() argument
164 …return FSE_buildDTable_internal(dt, normalizedCounter, maxSymbolValue, tableLog, workSpace, wkspSi… in FSE_buildDTable_wksp()
252 unsigned tableLog; in FSE_decompress_wksp_body() local
[all …]
H A Dentropy_common.c288 { U32 const tableLog = ZSTD_highbit32(weightTotal) + 1; in HUF_readStats_body() local
289 if (tableLog > HUF_TABLELOG_MAX) return ERROR(corruption_detected); in HUF_readStats_body()
290 *tableLogPtr = tableLog; in HUF_readStats_body()
292 { U32 const total = 1 << tableLog; in HUF_readStats_body()
H A Dhuf.h154 unsigned maxSymbolValue, unsigned tableLog,
202 BYTE tableLog; member
253 unsigned maxSymbolValue, unsigned tableLog,
/linux/lib/zstd/decompress/
H A Dhuf_decompress.c138 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; member
191 U32 const dtLog = HUF_getDTableDesc(DTable).tableLog; in HUF_DecompressFastArgs_init()
349 static U32 HUF_rescaleStats(BYTE* huffWeight, U32* rankVal, U32 nbSymbols, U32 tableLog, U32 target… in HUF_rescaleStats() argument
351 if (tableLog > targetTableLog) in HUF_rescaleStats()
352 return tableLog; in HUF_rescaleStats()
353 if (tableLog < targetTableLog) { in HUF_rescaleStats()
354 U32 const scale = targetTableLog - tableLog; in HUF_rescaleStats()
384 U32 tableLog = 0; in HUF_readDTableX1_wksp() local
397 …(wksp->huffWeight, HUF_SYMBOLVALUE_MAX + 1, wksp->rankVal, &nbSymbols, &tableLog, src, srcSize, wk… in HUF_readDTableX1_wksp()
405tableLog = HUF_rescaleStats(wksp->huffWeight, wksp->rankVal, nbSymbols, tableLog, targetTableLog); in HUF_readDTableX1_wksp()
[all …]
H A Dzstd_decompress_block.c470 DTableH->tableLog = 0; in ZSTD_buildSeqTable_rle()
489 unsigned tableLog, void* wksp, size_t wkspSize) in ZSTD_buildFSETable_body() argument
493 U32 const tableSize = 1 << tableLog; in ZSTD_buildFSETable_body()
502 assert(tableLog <= MaxFSELog); in ZSTD_buildFSETable_body()
507 DTableH.tableLog = tableLog; in ZSTD_buildFSETable_body()
509 { S16 const largeLimit= (S16)(1 << (tableLog-1)); in ZSTD_buildFSETable_body()
597 tableDecode[u].nbBits = (BYTE) (tableLog - ZSTD_highbit32(nextState) ); in ZSTD_buildFSETable_body()
610 unsigned tableLog, void* wksp, size_t wkspSize) in ZSTD_buildFSETable_body_default() argument
613 baseValue, nbAdditionalBits, tableLog, wksp, wkspSize); in ZSTD_buildFSETable_body_default()
620 unsigned tableLog, void* wksp, size_t wkspSize) in ZSTD_buildFSETable_body_bmi2() argument
[all …]
H A Dzstd_decompress_block.h65 unsigned tableLog, void* wksp, size_t wkspSize,
H A Dzstd_decompress_internal.h65 U32 tableLog; member