Fix a read of uninitialized memory.
authorSteinar H. Gunderson <sesse@debian.org>
Fri, 9 Jan 2009 20:00:53 +0000 (21:00 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Fri, 9 Jan 2009 20:00:53 +0000 (21:00 +0100)
idct_test.c

index 7dfac43..b4cec38 100644 (file)
@@ -93,6 +93,11 @@ void test_performance(idct_func_t* idct)
        uint8_t output[DCTSIZE2];
                
        gen_random_coeffs(coeff, DCTSIZE2);
+       
+       // Unit quantization (ie., no scaling).
+       for (unsigned i = 0; i < DCTSIZE2; ++i) {
+               quant[i] = 1;
+       }
 
        struct timeval start, now;
        gettimeofday(&start, NULL);