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

/freebsd-12-stable/sys/contrib/zstd/lib/compress/
H A Dfse_compress.c85 size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
87 U32 const tableSize = 1 << tableLog;
91 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableLog ? tableSize>>1 : 1) ;
100 if (((size_t)1 << tableLog) * sizeof(FSE_FUNCTION_TYPE) > wkspSize) return ERROR(tableLog_tooLarge);
101 tableU16[-2] = (U16) tableLog;
150 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog);
156 U32 const maxBitsOut = tableLog - BIT_highbit32 (normalizedCounter[s]-1);
167 size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
170 return FSE_buildCTable_wksp(ct, normalizedCounter, maxSymbolValue, tableLog, tableSymbo
180 FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) argument
186 FSE_writeNCount_generic(void* header, size_t headerBufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, unsigned writeIsSafe) argument
274 FSE_writeNCount(void* buffer, size_t bufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
450 FSE_sizeof_CTable(unsigned maxSymbolValue, unsigned tableLog) argument
456 FSE_createCTable(unsigned maxSymbolValue, unsigned tableLog) argument
479 U32 tableLog = maxTableLog; local
499 FSE_normalizeM2(short* norm, U32 tableLog, const unsigned* count, size_t total, U32 maxSymbolValue) argument
583 FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, const unsigned* count, size_t total, unsigned maxSymbolValue) argument
783 FSE_compress_wksp(void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument
835 FSE_compress2(void* dst, size_t dstCapacity, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog) argument
[all...]
H A Dhuf_compress.c91 U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; local
108 tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue);
109 CHECK_F( FSE_normalizeCount(norm, tableLog, count, wtSize, maxSymbolValue) );
112 { CHECK_V_F(hSize, FSE_writeNCount(op, oend-op, norm, maxSymbolValue, tableLog) );
117 CHECK_F( FSE_buildCTable_wksp(CTable, norm, maxSymbolValue, tableLog, scratchBuffer, sizeof(scratchBuffer)) );
175 U32 tableLog = 0; local
179 CHECK_V_F(readSize, HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX+1, rankVal, &nbSymbols, &tableLog, src, srcSize));
182 if (tableLog > HUF_TABLELOG_MAX) return ERROR(tableLog_tooLarge);
187 for (n=1; n<=tableLog;
[all...]
H A Dzstd_compress.c1537 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); local
1543 CHECK_F(FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max));
1544 { size_t const NCountSize = FSE_writeNCount(op, oend - op, norm, max, tableLog); /* overflow protected */
1546 CHECK_F(FSE_buildCTable_wksp(nextCTable, norm, max, tableLog, workspace, workspaceSize));
/freebsd-12-stable/sys/contrib/zstd/lib/common/
H A Dfse_decompress.c82 FSE_DTable* FSE_createDTable (unsigned tableLog) argument
84 if (tableLog > FSE_TABLELOG_ABSOLUTE_MAX) tableLog = FSE_TABLELOG_ABSOLUTE_MAX;
85 return (FSE_DTable*)malloc( FSE_DTABLE_SIZE_U32(tableLog) * sizeof (U32) );
93 size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
100 U32 const tableSize = 1 << tableLog;
105 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
109 DTableH.tableLog = (U16)tableLog;
111 { S16 const largeLimit= (S16)(1 << (tableLog
282 unsigned tableLog; local
[all...]
H A Dfse.h117 Same as FSE_compress(), but allows the selection of 'maxSymbolValue' and 'tableLog'
124 FSE_PUBLIC_API size_t FSE_compress2 (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
133 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
160 dynamically downsize 'tableLog' when conditions are met.
162 @return : recommended tableLog (necessarily <= 'maxTableLog') */
166 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
168 @return : tableLog,
170 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, const unsigned* count, size_t srcSize, unsigned maxSymbolValue);
173 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
175 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
541 const U32 tableLog = MEM_read16(ptr); local
582 U16 tableLog; member in struct:__anon11600
[all...]
H A Dhuf.h103 * Same as HUF_compress(), but offers control over `maxSymbolValue` and `tableLog`.
105 * `tableLog` must be `<= HUF_TABLELOG_MAX` . */
108 unsigned maxSymbolValue, unsigned tableLog);
117 unsigned maxSymbolValue, unsigned tableLog,
137 #define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG */
138 #define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */
193 * 2. (optional) refine tableLog using HUF_optimalTableLog()
220 unsigned maxSymbolValue, unsigned tableLog,
287 size_t HUF_compress1X (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
288 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.c77 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */
185 FSE_DTable fseWorkspace[FSE_DTABLE_SIZE_U32(6)]; /* 6 is max possible tableLog for HUF header (maybe even 5, to be tested) */
202 { U32 const tableLog = BIT_highbit32(weightTotal) + 1; local
203 if (tableLog > HUF_TABLELOG_MAX) return ERROR(corruption_detected);
204 *tableLogPtr = tableLog;
206 { U32 const total = 1 << tableLog;
/freebsd-12-stable/sys/contrib/zstd/lib/decompress/
H A Dhuf_decompress.c65 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; member in struct:__anon11649
82 U32 tableLog = 0; local
102 iSize = HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX + 1, rankVal, &nbSymbols, &tableLog, src, srcSize);
107 if (tableLog > (U32)(dtd.maxTableLog+1)) return ERROR(tableLog_tooLarge); /* DTable too small, Huffman tree cannot fit in */
109 dtd.tableLog = (BYTE)tableLog;
115 for (n=1; n<tableLog+1; n++) {
128 D.byte = (BYTE)n; D.nbBits = (BYTE)(tableLog + 1 - w);
203 U32 const dtLog = dtd.tableLog;
252 U32 const dtLog = dtd.tableLog;
724 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_decompress.c89 U32 tableLog; member in struct:__anon11656
686 { 1, 1, 1, LL_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
724 { 1, 1, 1, OF_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
747 { 1, 1, 1, ML_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
790 DTableH->tableLog = 0;
807 unsigned tableLog)
813 U32 const tableSize = 1 << tableLog;
818 assert(tableLog <= MaxFSELog);
822 DTableH.tableLog = tableLog;
804 ZSTD_buildFSETable(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog) argument
893 { U32 tableLog; local
1639 U32 const tableLog = ((const ZSTD_seqSymbol_header*)ptr)[0].tableLog; local
[all...]
/freebsd-12-stable/sys/contrib/zstd/lib/legacy/
H A Dzstd_v03.c593 Note that its size depends on 'tableLog' and 'maxSymbolValue' */
691 U16 tableLog; member in struct:__anon11717
706 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1086 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1091 const U32 tableSize = 1 << tableLog;
1097 const S16 largeLimit= (S16)(1 << (tableLog-1));
1103 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
1106 DTableH.tableLog = (U16)tableLog;
1142 tableDecode[i].nbBits = (BYTE) (tableLog
1085 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1416 unsigned tableLog; local
1533 U32 tableLog; local
1615 U32 tableLog = 0; local
1921 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v07.c758 Note that its size depends on 'tableLog' */
760 FSEv07_DTable* FSEv07_createDTable(unsigned tableLog);
766 size_t FSEv07_buildDTable (FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
787 FSEv07_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
861 U16 tableLog; member in struct:__anon11794
876 DStatePtr->state = BITv07_readBits(bitD, DTableH->tableLog);
1052 #define HUFv07_TABLELOG_MAX 12 /* max configured tableLog (for static allocation); can be modified up to HUFv07_ABSOLUTEMAX_TABLELOG */
1053 #define HUFv07_TABLELOG_DEFAULT 11 /* tableLog by default, when not specified */
1223 nbBits = (bitStream & 0xF) + FSEv07_MIN_TABLELOG; /* extract tableLog */
1354 { U32 const tableLog local
1467 FSEv07_createDTable(unsigned tableLog) argument
1478 FSEv07_buildDTable(FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1675 unsigned tableLog; local
1760 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc; member in struct:__anon11796
1780 U32 tableLog = 0; local
2142 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
3431 { U32 tableLog; local
[all...]
H A Dzstd_v06.c710 Note that its size depends on 'tableLog' */
712 FSEv06_DTable* FSEv06_createDTable(unsigned tableLog);
718 size_t FSEv06_buildDTable (FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
739 FSEv06_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
1095 U16 tableLog; member in struct:__anon11777
1110 DStatePtr->state = BITv06_readBits(bitD, DTableH->tableLog);
1279 nbBits = (bitStream & 0xF) + FSEv06_MIN_TABLELOG; /* extract tableLog */
1447 FSEv06_DTable* FSEv06_createDTable (unsigned tableLog) argument
1449 if (tableLog > FSEv06_TABLELOG_ABSOLUTE_MAX) tableLog
1458 FSEv06_buildDTable(FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1655 unsigned tableLog; local
1902 { U32 const tableLog = BITv06_highbit32(weightTotal) + 1; local
2008 U32 tableLog = 0; local
2335 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
3205 { U32 tableLog; local
[all...]
H A Dzstd_v02.c591 Note that its size depends on 'tableLog' and 'maxSymbolValue' */
689 U16 tableLog; member in struct:__anon11698
704 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1085 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1090 const U32 tableSize = 1 << tableLog;
1096 const S16 largeLimit= (S16)(1 << (tableLog-1));
1102 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
1105 DTableH.tableLog = (U16)tableLog;
1141 tableDecode[i].nbBits = (BYTE) (tableLog
1084 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1415 unsigned tableLog; local
1536 U32 tableLog; local
1618 U32 tableLog = 0; local
1924 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
2259 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v05.c639 Note that its size depends on 'tableLog' */
641 FSEv05_DTable* FSEv05_createDTable(unsigned tableLog);
649 size_t FSEv05_buildDTable (FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
989 U16 tableLog; member in struct:__anon11754
1004 DStatePtr->state = BITv05_readBits(bitD, DTableH->tableLog);
1196 FSEv05_DTable* FSEv05_createDTable (unsigned tableLog) argument
1198 if (tableLog > FSEv05_TABLELOG_ABSOLUTE_MAX) tableLog = FSEv05_TABLELOG_ABSOLUTE_MAX;
1199 return (FSEv05_DTable*)malloc( FSEv05_DTABLE_SIZE_U32(tableLog) * sizeof (U32) );
1207 size_t FSEv05_buildDTable(FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1509 unsigned tableLog; local
1796 U32 tableLog; local
1870 U32 tableLog = 0; local
2201 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v04.c508 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
536 Note that its size depends on 'tableLog' */
544 static size_t FSE_buildDTable ( FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
566 FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
927 U16 tableLog; member in struct:__anon11736
942 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1125 static size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
1130 const U32 tableSize = 1 << tableLog;
1136 const S16 largeLimit= (S16)(1 << (tableLog-1));
1142 if (tableLog > FSE_MAX_TABLELO
1460 unsigned tableLog; local
1748 U32 tableLog; local
1830 U32 tableLog = 0; local
2134 U32 tableLog, maxW, sizeOfSort, nbSymbols; local
[all...]
H A Dzstd_v01.c395 U16 tableLog; member in struct:__anon11684
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
901 unsigned tableLog; local
[all...]
/freebsd-12-stable/sys/contrib/zstd/tests/
H A Ddecodecorpus.c855 const U32 tableLog = FSE_optimalTableLog(LLFSELog, nbSeq, max); local
857 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max);
858 { size_t const NCountSize = FSE_writeNCount(op, oend-op, norm, max, tableLog); /* overflow protected */
861 FSE_buildCTable_wksp(CTable_LitLength, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
882 const U32 tableLog = FSE_optimalTableLog(OffFSELog, nbSeq, max); local
884 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max);
885 { size_t const NCountSize = FSE_writeNCount(op, oend-op, norm, max, tableLog); /* overflow protected */
888 FSE_buildCTable_wksp(CTable_OffsetBits, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
911 const U32 tableLog = FSE_optimalTableLog(MLFSELog, nbSeq, max); local
913 FSE_normalizeCount(norm, tableLog, coun
[all...]

Completed in 305 milliseconds