]> git.sesse.net Git - fjl/commitdiff
Replace a magic constant by a less magic constant.
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 11 Jan 2009 23:48:54 +0000 (00:48 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 11 Jan 2009 23:48:54 +0000 (00:48 +0100)
idct.c

diff --git a/idct.c b/idct.c
index ad1cc364642582b1711fb57122a7df186214f72c..c71d599833affb62944c4f915f89c9009aed034b 100644 (file)
--- a/idct.c
+++ b/idct.c
@@ -82,7 +82,7 @@ void* idct_float_alloc(const uint32_t* quant_table)
 
        for (unsigned y = 0; y < DCTSIZE; ++y) {
                for (unsigned x = 0; x < DCTSIZE; ++x) {
-                       qt_copy[y * DCTSIZE + x] = 0.125 * quant_table[y * DCTSIZE + x] *
+                       qt_copy[y * DCTSIZE + x] = (1.0/DCTSIZE) * quant_table[y * DCTSIZE + x] *
                                scalefac[x] * scalefac[y];
                }
        }