Reset ldmSeqStore after initStats_ultra() pass for btultra2
This commit is contained in:
@@ -578,7 +578,6 @@ size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
|
|||||||
if (cParams->strategy >= ZSTD_btopt) {
|
if (cParams->strategy >= ZSTD_btopt) {
|
||||||
size_t lastLLSize;
|
size_t lastLLSize;
|
||||||
ms->ldmSeqStore = *rawSeqStore;
|
ms->ldmSeqStore = *rawSeqStore;
|
||||||
ms->ldmSeqStore.base = ms->window.base;
|
|
||||||
lastLLSize = blockCompressor(ms, seqStore, rep, src, srcSize);
|
lastLLSize = blockCompressor(ms, seqStore, rep, src, srcSize);
|
||||||
/* ldm seqstore will have changed during blockCompressor() call, make sure we copy those changes */
|
/* ldm seqstore will have changed during blockCompressor() call, make sure we copy those changes */
|
||||||
*rawSeqStore = ms->ldmSeqStore;
|
*rawSeqStore = ms->ldmSeqStore;
|
||||||
|
|||||||
@@ -1364,6 +1364,7 @@ ZSTD_initStats_ultra(ZSTD_matchState_t* ms,
|
|||||||
const void* src, size_t srcSize)
|
const void* src, size_t srcSize)
|
||||||
{
|
{
|
||||||
U32 tmpRep[ZSTD_REP_NUM]; /* updated rep codes will sink here */
|
U32 tmpRep[ZSTD_REP_NUM]; /* updated rep codes will sink here */
|
||||||
|
rawSeqStore_t tmpSeqStore = ms->ldmSeqStore;
|
||||||
ZSTD_memcpy(tmpRep, rep, sizeof(tmpRep));
|
ZSTD_memcpy(tmpRep, rep, sizeof(tmpRep));
|
||||||
|
|
||||||
DEBUGLOG(4, "ZSTD_initStats_ultra (srcSize=%zu)", srcSize);
|
DEBUGLOG(4, "ZSTD_initStats_ultra (srcSize=%zu)", srcSize);
|
||||||
@@ -1380,6 +1381,7 @@ ZSTD_initStats_ultra(ZSTD_matchState_t* ms,
|
|||||||
ms->window.dictLimit += (U32)srcSize;
|
ms->window.dictLimit += (U32)srcSize;
|
||||||
ms->window.lowLimit = ms->window.dictLimit;
|
ms->window.lowLimit = ms->window.dictLimit;
|
||||||
ms->nextToUpdate = ms->window.dictLimit;
|
ms->nextToUpdate = ms->window.dictLimit;
|
||||||
|
ms->ldmSeqStore = tmpSeqStore;
|
||||||
|
|
||||||
/* re-inforce weight of collected statistics */
|
/* re-inforce weight of collected statistics */
|
||||||
ZSTD_upscaleStats(&ms->opt);
|
ZSTD_upscaleStats(&ms->opt);
|
||||||
|
|||||||
Reference in New Issue
Block a user