Use cycleLog instead of chainLog to determine LDM jobLog

dev
senhuang42 2020-10-12 12:20:18 -04:00
parent f7d4943788
commit 354b5f1c0a
1 changed files with 2 additions and 2 deletions

View File

@ -1184,8 +1184,8 @@ static unsigned ZSTDMT_computeTargetJobLog(const ZSTD_CCtx_params* params)
if (params->ldmParams.enableLdm) {
/* In Long Range Mode, the windowLog is typically oversized.
* In which case, it's preferable to determine the jobSize
* based on chainLog instead. */
jobLog = MAX(21, params->cParams.chainLog + 4);
* based on cycleLog instead. */
jobLog = MAX(21, ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy) + 4);
} else {
jobLog = MAX(20, params->cParams.windowLog + 2);
}