From: senhuang42 Date: Mon, 12 Oct 2020 16:20:18 +0000 (-0400) Subject: Use cycleLog instead of chainLog to determine LDM jobLog X-Git-Tag: v1.4.7~51^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=354b5f1c0a78598ca760acfcb1cd3bb2c18fbae6;p=thirdparty%2Fzstd.git Use cycleLog instead of chainLog to determine LDM jobLog --- diff --git a/lib/compress/zstdmt_compress.c b/lib/compress/zstdmt_compress.c index baf6ef4ca..0c9ae69be 100644 --- a/lib/compress/zstdmt_compress.c +++ b/lib/compress/zstdmt_compress.c @@ -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); }