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

1 2

  /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);
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...]
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 37 #define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_TABLELOG_ABSOLUTEMAX */
38 #define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */
121 * 2. (optional) refine tableLog using HUF_optimalTableLog()
153 unsigned maxSymbolValue, unsigned tableLog,
201 BYTE tableLog;
207 * @returns The header from the CTable specifying the tableLog and the maxSymbolValue.
252 unsigned maxSymbolValue, unsigned tableLog,
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 37 #define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_TABLELOG_ABSOLUTEMAX */
38 #define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */
121 * 2. (optional) refine tableLog using HUF_optimalTableLog()
153 unsigned maxSymbolValue, unsigned tableLog,
201 BYTE tableLog;
207 * @returns The header from the CTable specifying the tableLog and the maxSymbolValue.
252 unsigned maxSymbolValue, unsigned tableLog,
fse.h 66 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
84 dynamically downsize 'tableLog' when conditions are met.
86 @return : recommended tableLog (necessarily <= 'maxTableLog') */
90 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
98 @return : tableLog,
100 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
104 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
106 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
114 unsigned maxSymbolValue, unsigned tableLog);
117 Note that FSE_CTable size depends on 'tableLog' and 'maxSymbolValue' *
    [all...]
fse.h 66 2. normalize counters so that sum(count[]) == Power_of_2 (2^tableLog)
84 dynamically downsize 'tableLog' when conditions are met.
86 @return : recommended tableLog (necessarily <= 'maxTableLog') */
90 normalize counts so that sum(count[]) == Power_of_2 (2^tableLog)
98 @return : tableLog,
100 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog,
104 Provides the maximum possible size of an FSE normalized table, given 'maxSymbolValue' and 'tableLog'.
106 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog);
114 unsigned maxSymbolValue, unsigned tableLog);
117 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...]
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...]
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...]
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;
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...]
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 894 const U32 tableLog = FSE_optimalTableLog(LLFSELog, nbSeq, max);
896 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, nbSeq >= 2048);
897 { size_t const NCountSize = FSE_writeNCount(op, oend-op, norm, max, tableLog); /* overflow protected */
900 CHECKERR(FSE_buildCTable_wksp(CTable_LitLength, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer)));
922 const U32 tableLog = FSE_optimalTableLog(OffFSELog, nbSeq, max);
924 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, nbSeq >= 2048);
925 { size_t const NCountSize = FSE_writeNCount(op, oend-op, norm, max, tableLog); /* overflow protected */
928 FSE_buildCTable_wksp(CTable_OffsetBits, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
952 const U32 tableLog = FSE_optimalTableLog(MLFSELog, nbSeq, max);
954 FSE_normalizeCount(norm, tableLog, count, nbSeq_1, max, nbSeq >= 2048)
    [all...]

Completed in 123 milliseconds

1 2