]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed paramgrill
authorinikep <inikep@gmail.com>
Thu, 25 Feb 2016 18:15:08 +0000 (19:15 +0100)
committerinikep <inikep@gmail.com>
Thu, 25 Feb 2016 18:15:08 +0000 (19:15 +0100)
lib/zstd_opt_internal.h
programs/paramgrill.c

index a40cad068cc823281cca5d4de9cb409efb210619..0186ebc2bb73f3b2a6aca70ef160120b9b65140c 100644 (file)
@@ -81,7 +81,7 @@ MEM_STATIC void ZSTD_rescaleFreqs(seqStore_t* ssPtr)
         ssPtr->litLengthSum = ZSTD_FREQ_START*(1<<LLbits);
         ssPtr->litSum = ZSTD_FREQ_START*(1<<Litbits);
         ssPtr->offCodeSum = ZSTD_FREQ_START*(1<<Offbits);
-        ssPtr->matchSum = ZSTD_FREQ_START*ssPtr->litSum;
+        ssPtr->matchSum = ssPtr->litSum;
         
         for (u=0; u<=MaxLit; u++)
             ssPtr->litFreq[u] = ZSTD_FREQ_START;
index 23a54d466b682bc9fa4058143e1b1111cc2641d0..db8ff0e728639c7279fe627f36f3c6ef3753d71e 100644 (file)
@@ -127,7 +127,7 @@ static U32 g_rand = 1;
 static U32 g_singleRun = 0;
 static U32 g_target = 0;
 static U32 g_noSeed = 0;
-static ZSTD_parameters g_params = { 0, 0, 0, 0, 0, 0, 0, ZSTD_greedy };
+static ZSTD_parameters g_params = { 0, 0, 0, 0, 0, 0, 0, 0, ZSTD_greedy };
 
 void BMK_SetNbIterations(int nbLoops)
 {
@@ -406,7 +406,6 @@ const char* g_stratName[] = { "ZSTD_fast   ",
                               "ZSTD_lazy   ",
                               "ZSTD_lazy2  ",
                               "ZSTD_btlazy2",
-                              "ZSTD_opt    ",
                               "ZSTD_btopt  " };
 
 static void BMK_printWinner(FILE* f, U32 cLevel, BMK_result_t result, ZSTD_parameters params, size_t srcSize)
@@ -549,7 +548,7 @@ static ZSTD_parameters* sanitizeParams(ZSTD_parameters params)
     g_params = params;
     if (params.strategy == ZSTD_fast)
         g_params.contentLog = 0, g_params.searchLog = 0;
-    if ((params.strategy != ZSTD_opt) && (params.strategy != ZSTD_btopt ))
+    if (params.strategy != ZSTD_btopt )
         g_params.targetLength = 0;
     return &g_params;
 }