HomeSort by: relevance | last modified time | path
    Searched defs:tableLog (Results 1 - 21 of 21) sorted by relevancy

  /src/external/bsd/zstd/dist/tests/fuzz/
fse_read_ncount.c 32 /* Pick a random tableLog and maxSymbolValue */
33 unsigned const tableLog = FUZZ_dataProducer_uint32Range(producer, FSE_MIN_TABLELOG, FSE_MAX_TABLELOG);
36 unsigned remainingWeight = (1u << tableLog) - 1;
55 /* Ensure ncount[maxSymbolValue] != 0 and the sum is (1<<tableLog) */
63 FUZZ_ASSERT(sizeof(data) >= FSE_NCountWriteBound(maxSymbolValue, tableLog));
64 dataSize = FSE_writeNCount(data, sizeof(data), ncount, maxSymbolValue, tableLog);
88 FUZZ_ASSERT(rtTableLog == tableLog);
huf_round_trip.c 27 static size_t adjustTableLog(size_t tableLog, size_t maxSymbol)
35 if (tableLog < minTableLog)
38 return tableLog;
56 /* Select a random tableLog - we'll adjust it up later */
57 size_t tableLog = FUZZ_dataProducer_uint32Range(producer, 1, 12);
80 tableLog = adjustTableLog(tableLog, maxSymbol);
87 HUF_DTable* dt = (HUF_DTable*)FUZZ_malloc(HUF_DTABLE_SIZE(tableLog) * sizeof(HUF_DTable));
88 dt[0] = tableLog * 0x01000001;
90 tableLog = HUF_optimalTableLog(tableLog, size, maxSymbol, wksp, wkspSize, ct, count, flags)
    [all...]
  /src/external/bsd/zstd/dist/lib/common/
entropy_common.c 72 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */
287 { U32 const tableLog = ZSTD_highbit32(weightTotal) + 1;
288 if (tableLog > HUF_TABLELOG_MAX) return ERROR(corruption_detected);
289 *tableLogPtr = tableLog;
291 { U32 const total = 1 << tableLog;
fse_decompress.c 58 static size_t FSE_buildDTable_internal(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize)
66 U32 const tableSize = 1 << tableLog;
70 if (FSE_BUILD_DTABLE_WKSP_SIZE(tableLog, maxSymbolValue) > wkspSize) return ERROR(maxSymbolValue_tooLarge);
72 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
76 DTableH.tableLog = (U16)tableLog;
78 { S16 const largeLimit= (S16)(1 << (tableLog-1));
154 tableDecode[u].nbBits = (BYTE) (tableLog - ZSTD_highbit32(nextState) );
161 size_t FSE_buildDTable_wksp(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize)
163 return FSE_buildDTable_internal(dt, normalizedCounter, maxSymbolValue, tableLog, workSpace, wkspSize)
    [all...]
huf.h 42 #define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_TABLELOG_ABSOLUTEMAX */
43 #define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */
126 * 2. (optional) refine tableLog using HUF_optimalTableLog()
158 unsigned maxSymbolValue, unsigned tableLog,
206 BYTE tableLog;
212 * @returns The header from the CTable specifying the tableLog and the maxSymbolValue.
257 unsigned maxSymbolValue, unsigned tableLog,
fse.h 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' *
    [all...]
  /src/external/bsd/zstd/dist/lib/compress/
zstd_compress_sequences.c 75 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max);
76 FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)), "");
77 return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog);
120 unsigned const tableLog = cstate.stateLog;
121 unsigned const badCost = (tableLog + 1) << kAccuracyLog;
122 unsigned const bitCost = FSE_bitCost(cstate.symbolTT, tableLog, s, kAccuracyLog);
270 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max);
278 FORWARD_IF_ERROR(FSE_normalizeCount(wksp->norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCount(nbSeq_1)), "FSE_normalizeCount failed");
280 { size_t const NCountSize = FSE_writeNCount(op, (size_t)(oend - op), wksp->norm, max, tableLog); /* overflow protected */
282 FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, wksp->norm, max, tableLog, wksp->wksp, sizeof(wksp->wksp)), "FSE_buildCTable_wksp failed")
    [all...]
fse_compress.c 69 const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog,
72 U32 const tableSize = 1 << tableLog;
76 void* const FSCT = ((U32*)ptr) + 1 /* header */ + (tableLog ? tableSize>>1 : 1) ;
87 if (FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) > wkspSize) return ERROR(tableLog_tooLarge);
89 tableU16[-2] = (U16) tableLog;
91 assert(tableLog < 16); /* required for threshold strategy to work */
183 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog);
188 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog);
    [all...]
huf_compress.c 156 U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER;
170 tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue);
171 CHECK_F( FSE_normalizeCount(wksp->norm, tableLog, wksp->count, wtSize, maxSymbolValue, /* useLowProbCount */ 0) );
174 { CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), wksp->norm, maxSymbolValue, tableLog) );
179 CHECK_F( FSE_buildCTable_wksp(wksp->CTable, wksp->norm, maxSymbolValue, tableLog, wksp->scratchBuffer, sizeof(wksp->scratchBuffer)) );
230 static void HUF_writeCTableHeader(HUF_CElt* ctable, U32 tableLog, U32 maxSymbolValue)
235 assert(tableLog < 256);
236 header.tableLog = (BYTE)tableLog;
    [all...]
  /src/external/bsd/zstd/dist/lib/decompress/
zstd_decompress_internal.h 64 U32 tableLog;
huf_decompress.c 141 typedef struct { BYTE maxTableLog; BYTE tableType; BYTE tableLog; BYTE reserved; } DTableDesc;
194 U32 const dtLog = HUF_getDTableDesc(DTable).tableLog;
348 * Increase the tableLog to targetTableLog and rescales the stats.
349 * If tableLog > targetTableLog this is a no-op.
350 * @returns New tableLog
352 static U32 HUF_rescaleStats(BYTE* huffWeight, U32* rankVal, U32 nbSymbols, U32 tableLog, U32 targetTableLog)
354 if (tableLog > targetTableLog)
355 return tableLog;
356 if (tableLog < targetTableLog) {
357 U32 const scale = targetTableLog - tableLog;
    [all...]
zstd_decompress_block.c 365 { 1, 1, 1, LL_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
403 { 1, 1, 1, OF_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
426 { 1, 1, 1, ML_DEFAULTNORMLOG}, /* header : fastMode, tableLog */
469 DTableH->tableLog = 0;
488 unsigned tableLog, void* wksp, size_t wkspSize)
492 U32 const tableSize = 1 << tableLog;
501 assert(tableLog <= MaxFSELog);
506 DTableH.tableLog = tableLog;
508 { S16 const largeLimit= (S16)(1 << (tableLog-1))
    [all...]
  /src/external/bsd/zstd/dist/tests/
decodecorpus.c 864 const U32 tableLog = FSE_optimalTableLog(LLFSELog, nbSeq, max);
866 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, nbSeq >= 2048);
867 { size_t const NCountSize = FSE_writeNCount(op, oend-op, norm, max, tableLog); /* overflow protected */
870 CHECKERR(FSE_buildCTable_wksp(CTable_LitLength, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer)));
892 const U32 tableLog = FSE_optimalTableLog(OffFSELog, nbSeq, max);
894 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, nbSeq >= 2048);
895 { size_t const NCountSize = FSE_writeNCount(op, oend-op, norm, max, tableLog); /* overflow protected */
898 FSE_buildCTable_wksp(CTable_OffsetBits, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
922 const U32 tableLog = FSE_optimalTableLog(MLFSELog, nbSeq, max);
924 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, nbSeq >= 2048)
    [all...]
fuzzer.c 3962 unsigned const tableLog = 5;
3972 FSE_normalizeCount(norm, tableLog, count, nbSeq, maxSymbolValue, /* useLowProbCount */ 1);
3980 unsigned const tableLog = 5;
3987 FSE_writeNCount(outBuf, outBufSize, count, maxSymbolValue, tableLog);
  /src/external/bsd/zstd/dist/lib/legacy/
zstd_v01.c 353 U16 tableLog;
358 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
363 const U32 tableSize = 1 << tableLog;
369 const S16 largeLimit= (S16)(1 << (tableLog-1));
375 if (tableLog > FSE_MAX_TABLELOG) return (size_t)-FSE_ERROR_tableLog_tooLarge;
378 DTableH[0].tableLog = (U16)tableLog;
414 tableDecode[i].nbBits = (BYTE) (tableLog - FSE_highbit32 ((U32)nextState) );
456 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */
562 DTableH->tableLog = 0
    [all...]
zstd_v03.c 542 Note that its size depends on 'tableLog' and 'maxSymbolValue' */
640 U16 tableLog;
655 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1035 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1040 const U32 tableSize = 1 << tableLog;
1046 const S16 largeLimit= (S16)(1 << (tableLog-1));
1052 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
1055 DTableH.tableLog = (U16)tableLog;
1091 tableDecode[i].nbBits = (BYTE) (tableLog - BIT_highbit32 ((U32)nextState) )
    [all...]
zstd_v02.c 541 Note that its size depends on 'tableLog' and 'maxSymbolValue' */
639 U16 tableLog;
654 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1035 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1040 const U32 tableSize = 1 << tableLog;
1046 const S16 largeLimit= (S16)(1 << (tableLog-1));
1052 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge);
1055 DTableH.tableLog = (U16)tableLog;
1091 tableDecode[i].nbBits = (BYTE) (tableLog - BIT_highbit32 ((U32)nextState) )
    [all...]
zstd_v04.c 401 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
429 Note that its size depends on 'tableLog' */
437 static size_t FSE_buildDTable ( FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
459 FSE_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
819 U16 tableLog;
834 DStatePtr->state = BIT_readBits(bitD, DTableH.tableLog);
1017 static size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
1022 const U32 tableSize = 1 << tableLog;
1028 const S16 largeLimit= (S16)(1 << (tableLog-1));
1034 if (tableLog > FSE_MAX_TABLELOG) return ERROR(tableLog_tooLarge)
    [all...]
zstd_v05.c 590 Note that its size depends on 'tableLog' */
592 FSEv05_DTable* FSEv05_createDTable(unsigned tableLog);
600 size_t FSEv05_buildDTable (FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
939 U16 tableLog;
954 DStatePtr->state = BITv05_readBits(bitD, DTableH->tableLog);
1146 FSEv05_DTable* FSEv05_createDTable (unsigned tableLog)
1148 if (tableLog > FSEv05_TABLELOG_ABSOLUTE_MAX) tableLog = FSEv05_TABLELOG_ABSOLUTE_MAX;
1149 return (FSEv05_DTable*)malloc( FSEv05_DTABLE_SIZE_U32(tableLog) * sizeof (U32) );
1157 size_t FSEv05_buildDTable(FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
    [all...]
zstd_v06.c 657 Note that its size depends on 'tableLog' */
659 FSEv06_DTable* FSEv06_createDTable(unsigned tableLog);
665 size_t FSEv06_buildDTable (FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
686 FSEv06_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
1041 U16 tableLog;
1056 DStatePtr->state = BITv06_readBits(bitD, DTableH->tableLog);
1223 nbBits = (bitStream & 0xF) + FSEv06_MIN_TABLELOG; /* extract tableLog */
1391 FSEv06_DTable* FSEv06_createDTable (unsigned tableLog)
1393 if (tableLog > FSEv06_TABLELOG_ABSOLUTE_MAX) tableLog = FSEv06_TABLELOG_ABSOLUTE_MAX
    [all...]
zstd_v07.c 703 Note that its size depends on 'tableLog' */
705 FSEv07_DTable* FSEv07_createDTable(unsigned tableLog);
711 size_t FSEv07_buildDTable (FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog);
732 FSEv07_readNCount() will provide 'tableLog' and 'maxSymbolValue'.
806 U16 tableLog;
821 DStatePtr->state = BITv07_readBits(bitD, DTableH->tableLog);
997 #define HUFv07_TABLELOG_MAX 12 /* max configured tableLog (for static allocation); can be modified up to HUFv07_ABSOLUTEMAX_TABLELOG */
998 #define HUFv07_TABLELOG_DEFAULT 11 /* tableLog by default, when not specified */
1168 nbBits = (bitStream & 0xF) + FSEv07_MIN_TABLELOG; /* extract tableLog */
1299 { U32 const tableLog = BITv07_highbit32(weightTotal) + 1
    [all...]

Completed in 73 milliseconds