Searched refs:tableLog (Results 1 - 19 of 19) sorted by relevance

/freebsd-13-stable/sys/contrib/zstd/lib/compress/
H A Dfse_compress.c68 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) ;
85 if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_tooLarge);
87 tableU16[-2] = (U16) tableLog;
89 assert(tableLog < 16); /* required for threshold strategy to work */
141 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog);
146 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog);
67 FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
175 FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
190 FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) argument
197 FSE_writeNCount_generic(void* header, size_t headerBufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, unsigned writeIsSafe) argument
292 FSE_writeNCount(void* buffer, size_t bufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
309 FSE_createCTable(unsigned maxSymbolValue, unsigned tableLog) argument
332 U32 tableLog = maxTableLog; local
351 FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue, short lowProbCount) argument
437 FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, const unsigned* count, size_t total, unsigned maxSymbolValue, unsigned useLowProbCount) argument
636 FSE_compress_wksp(void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
691 FSE_compress2(void* dst, size_t dstCapacity, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog) argument
[all...]
H A Dzstd_compress_sequences.c75 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); local
76 FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)), "");
77 return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog);
118 unsigned const tableLog = cstate.stateLog; local
119 unsigned const badCost = (tableLog + 1) << kAccuracyLog;
120 unsigned const bitCost = FSE_bitCost(cstate.symbolTT, tableLog, s, kAccuracyLog);
263 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); local
270 FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCount(nbSeq_1)), "");
271 { size_t const NCountSize = FSE_writeNCount(op, oend - op, norm, max, tableLog); /* overflow protected */
273 FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, norm, max, tableLog, entropyWorkspac
[all...]
H A Dhuf_compress.c69 U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; local
86 tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue);
87 CHECK_F( FSE_normalizeCount(norm, tableLog, count, wtSize, maxSymbolValue, /* useLowProbCount */ 0) );
90 { CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), norm, maxSymbolValue, tableLog) );
95 CHECK_F( FSE_buildCTable_wksp(CTable, norm, maxSymbolValue, tableLog, scratchBuffer, sizeof(scratchBuffer)) );
148 U32 tableLog = 0; local
152 CHECK_V_F(readSize, HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX+1, rankVal, &nbSymbols, &tableLog, src, srcSize));
156 if (tableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge);
161 for (n=1; n<=tableLog;
[all...]
/freebsd-13-stable/sys/contrib/zstd/lib/decompress/
H A Dzstd_decompress_block.h58 unsigned tableLog, void* wksp, size_t wkspSize,
H A Dzstd_decompress_block.c248 { 1, 1, 1, LL_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
286 { 1, 1, 1, OF_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
309 { 1, 1, 1, ML_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
352 DTableH->tableLog = 0;
371 unsigned tableLog, void* wksp, size_t wkspSize)
375 U32 const tableSize = 1 << tableLog;
384 assert(tableLog <= MaxFSELog);
389 DTableH.tableLog = tableLog;
391 { S16 const largeLimit= (S16)(1 << (tableLog
368 ZSTD_buildFSETable_body(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog, void* wksp, size_t wkspSize) argument
488 ZSTD_buildFSETable_body_default(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog, void* wksp, size_t wkspSize) argument
498 ZSTD_buildFSETable_body_bmi2(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog, void* wksp, size_t wkspSize) argument
508 ZSTD_buildFSETable(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog, void* wksp, size_t wkspSize, int bmi2) argument
562 { unsigned tableLog; local
1430 U32 const tableLog = ((const ZSTD_seqSymbol_header*)ptr)[0].tableLog; local
[all...]
H A Dhuf_decompress.c101 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; member in struct:__anon10960
149 U32 tableLog = 0; local
162 iSize = HUF_readStats_wksp(wksp->huffWeight, HUF_SYMBOLVALUE_MAX + 1, wksp->rankVal, &nbSymbols, &tableLog, src, srcSize, wksp->statsWksp, sizeof(wksp->statsWksp), bmi2);
167 if (tableLog > (U32)(dtd.maxTableLog+1)) return ERROR(tableLog_tooLarge); /* DTable too small, Huffman tree cannot fit in */
169 dtd.tableLog = (BYTE)tableLog;
190 for (n=0; n<(int)tableLog+1; n++) {
218 for (w=1; w<tableLog+1; ++w) {
222 BYTE const nbBits = (BYTE)(tableLog + 1 - w);
338 U32 const dtLog = dtd.tableLog;
615 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_decompress_internal.h64 U32 tableLog; member in struct:__anon10971
/freebsd-13-stable/sys/contrib/zstd/lib/common/
H A Dfse.h98 Same as FSE_compress(), but allows the selection of 'maxSymbolValue' and 'tableLog'
105 FSE_PUBLIC_API size_t FSE_compress2 (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
114 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
132 dynamically downsize 'tableLog' when conditions are met.
134 @return : recommended tableLog (necessarily <= 'maxTableLog') */
138 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
146 @return : tableLog,
148 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
152 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
154 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
517 const U32 tableLog = MEM_read16(ptr); local
570 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog) argument
[all...]
H A Dfse_decompress.c60 FSE_DTable* FSE_createDTable (unsigned tableLog) argument
62 if (tableLog > FSE_TABLELOG_ABSOLUTE_MAX) tableLog = FSE_TABLELOG_ABSOLUTE_MAX;
63 return (FSE_DTable*)ZSTD_malloc( FSE_DTABLE_SIZE_U32(tableLog) * sizeof (U32) );
71 static size_t FSE_buildDTable_internal(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
79 U32 const tableSize = 1 << tableLog;
83 if (FSE_BUILD_DTABLE_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(maxSymbolValue_tooLarge);
85 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
89 DTableH.tableLog = (U16)tableLog;
176 FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
322 unsigned tableLog; local
379 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
[all...]
H A Dhuf.h83 * Same as HUF_compress(), but offers control over `maxSymbolValue` and `tableLog`.
85 * `tableLog` must be `<= HUF_TABLELOG_MAX` . */
88 unsigned maxSymbolValue, unsigned tableLog);
97 unsigned maxSymbolValue, unsigned tableLog,
119 #define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG */
120 #define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */
183 * 2. (optional) refine tableLog using HUF_optimalTableLog()
211 unsigned maxSymbolValue, unsigned tableLog,
306 size_t HUF_compress1X (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
307 size_t HUF_compress1X_wksp (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, voi
[all...]
H A Dentropy_common.c94 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */
309 { U32 const tableLog = BIT_highbit32(weightTotal) + 1; local
310 if (tableLog > HUF_TABLELOG_MAX) return ERROR(corruption_detected);
311 *tableLogPtr = tableLog;
313 { U32 const total = 1 << tableLog;
/freebsd-13-stable/sys/contrib/zstd/lib/legacy/
H A Dzstd_v03.c608 Note that its size depends on 'tableLog' and 'maxSymbolValue' */
706 U16 tableLog; member in struct:__anon11035
721 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1101 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1106 const U32 tableSize = 1 << tableLog;
1112 const S16 largeLimit= (S16)(1 << (tableLog-1));
1118 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
1121 DTableH.tableLog = (U16)tableLog;
1157 tableDecode[i].nbBits = (BYTE) (tableLog
1100 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1431 unsigned tableLog; local
1548 U32 tableLog; local
1630 U32 tableLog = 0; local
1936 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v07.c762 Note that its size depends on 'tableLog' */
764 FSEv07_DTable* FSEv07_createDTable(unsigned tableLog);
770 size_t FSEv07_buildDTable (FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
791 FSEv07_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
865 U16 tableLog; member in struct:__anon11112
880 DStatePtr->state = BITv07_readBits(bitD, DTableH->tableLog);
1056 #define HUFv07_TABLELOG_MAX 12 /* max configured tableLog (for static allocation); can be modified up to HUFv07_ABSOLUTEMAX_TABLELOG */
1057 #define HUFv07_TABLELOG_DEFAULT 11 /* tableLog by default, when not specified */
1227 nbBits = (bitStream & 0xF) + FSEv07_MIN_TABLELOG; /* extract tableLog */
1358 { U32 const tableLog local
1471 FSEv07_createDTable(unsigned tableLog) argument
1482 FSEv07_buildDTable(FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1679 unsigned tableLog; local
1764 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; member in struct:__anon11114
1784 U32 tableLog = 0; local
2146 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
3441 { U32 tableLog; local
[all...]
H A Dzstd_v06.c716 Note that its size depends on 'tableLog' */
718 FSEv06_DTable* FSEv06_createDTable(unsigned tableLog);
724 size_t FSEv06_buildDTable (FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
745 FSEv06_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
1101 U16 tableLog; member in struct:__anon11095
1116 DStatePtr->state = BITv06_readBits(bitD, DTableH->tableLog);
1283 nbBits = (bitStream & 0xF) + FSEv06_MIN_TABLELOG; /* extract tableLog */
1451 FSEv06_DTable* FSEv06_createDTable (unsigned tableLog) argument
1453 if (tableLog > FSEv06_TABLELOG_ABSOLUTE_MAX) tableLog
1462 FSEv06_buildDTable(FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1659 unsigned tableLog; local
1906 { U32 const tableLog = BITv06_highbit32(weightTotal) + 1; local
2012 U32 tableLog = 0; local
2339 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
3211 { U32 tableLog; local
[all...]
H A Dzstd_v02.c606 Note that its size depends on 'tableLog' and 'maxSymbolValue' */
704 U16 tableLog; member in struct:__anon11016
719 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1100 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1105 const U32 tableSize = 1 << tableLog;
1111 const S16 largeLimit= (S16)(1 << (tableLog-1));
1117 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
1120 DTableH.tableLog = (U16)tableLog;
1156 tableDecode[i].nbBits = (BYTE) (tableLog
1099 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1430 unsigned tableLog; local
1551 U32 tableLog; local
1633 U32 tableLog = 0; local
1939 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
2274 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v05.c645 Note that its size depends on 'tableLog' */
647 FSEv05_DTable* FSEv05_createDTable(unsigned tableLog);
655 size_t FSEv05_buildDTable (FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
995 U16 tableLog; member in struct:__anon11072
1010 DStatePtr->state = BITv05_readBits(bitD, DTableH->tableLog);
1202 FSEv05_DTable* FSEv05_createDTable (unsigned tableLog) argument
1204 if (tableLog > FSEv05_TABLELOG_ABSOLUTE_MAX) tableLog = FSEv05_TABLELOG_ABSOLUTE_MAX;
1205 return (FSEv05_DTable*)malloc( FSEv05_DTABLE_SIZE_U32(tableLog) * sizeof (U32) );
1213 size_t FSEv05_buildDTable(FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1516 unsigned tableLog; local
1803 U32 tableLog; local
1877 U32 tableLog = 0; local
2209 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v04.c460 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
488 Note that its size depends on 'tableLog' */
496 static size_t FSE_buildDTable ( FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
518 FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
879 U16 tableLog; member in struct:__anon11054
894 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1077 static size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1082 const U32 tableSize = 1 << tableLog;
1088 const S16 largeLimit= (S16)(1 << (tableLog-1));
1094 if (tableLog > FSE_MAX_TABLELO
1413 unsigned tableLog; local
1701 U32 tableLog; local
1783 U32 tableLog = 0; local
2087 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v01.c395 U16 tableLog; member in struct:__anon11002
400 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
405 const U32 tableSize = 1 << tableLog;
411 const S16 largeLimit= (S16)(1 << (tableLog-1));
417 if (tableLog > FSE_MAX_TABLELOG) return (size_t)-FSE_ERROR_tableLog_tooLarge;
420 DTableH[0].tableLog = (U16)tableLog;
456 tableDecode[i].nbBits = (BYTE) (tableLog - FSE_highbit32 ((U32)nextState) );
498 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */
604 DTableH->tableLog
399 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
907 unsigned tableLog; local
[all...]
/freebsd-13-stable/sys/contrib/openzfs/module/zstd/lib/
H A Dzstd.c935 Same as FSE_compress(), but allows the selection of 'maxSymbolValue' and 'tableLog'
942 FSE_PUBLIC_API size_t FSE_compress2 (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
951 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
969 dynamically downsize 'tableLog' when conditions are met.
971 @return : recommended tableLog (necessarily <= 'maxTableLog') */
975 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
977 @return : tableLog,
979 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
983 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
985 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
1960 const U32 tableLog = MEM_read16(ptr); local
2013 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog) argument
2034 U16 tableLog; member in struct:__anon10680
2674 { U32 const tableLog = BIT_highbit32(weightTotal) + 1; local
2811 FSE_createDTable(unsigned tableLog) argument
2822 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
3011 unsigned tableLog; local
7545 FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
7651 FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
7665 FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) argument
7672 FSE_writeNCount_generic(void* header, size_t headerBufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, unsigned writeIsSafe) argument
7767 FSE_writeNCount(void* buffer, size_t bufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
7784 FSE_createCTable(unsigned maxSymbolValue, unsigned tableLog) argument
7807 U32 tableLog = maxTableLog; local
7827 FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue) argument
7914 FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, const unsigned* count, size_t total, unsigned maxSymbolValue) argument
8111 FSE_compress_wksp(void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
8163 FSE_compress2(void* dst, size_t dstCapacity, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog) argument
8434 U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; local
8518 U32 tableLog = 0; local
11316 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); local
11359 unsigned const tableLog = cstate.stateLog; local
11504 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); local
21450 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; member in struct:__anon10758
21469 U32 tableLog = 0; local
21904 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
22687 U32 tableLog; member in struct:__anon10763
26761 ZSTD_buildFSETable(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog) argument
26858 { unsigned tableLog; local
27715 U32 const tableLog = ((const ZSTD_seqSymbol_header*)ptr)[0].tableLog; local
[all...]

Completed in 312 milliseconds