]> git.sesse.net Git - fjl/blobdiff - idct_test.c
Fix a read of uninitialized memory.
[fjl] / 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);
+       
+       // Unit quantization (ie., no scaling).
+       for (unsigned i = 0; i < DCTSIZE2; ++i) {
+               quant[i] = 1;
+       }
 
        struct timeval start, now;
        gettimeofday(&start, NULL);