]> git.sesse.net Git - fjl/commitdiff
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 7dfac43805a6eb79ba8c8e28493afb43e7cc4796..b4cec384353703be6fb547b4db84114a1bb11eeb 100644 (file)
@@ -93,6 +93,11 @@ void test_performance(idct_func_t* idct)
        uint8_t output[DCTSIZE2];
                
        gen_random_coeffs(coeff, DCTSIZE2);
        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);
 
        struct timeval start, now;
        gettimeofday(&start, NULL);