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 ad1cc36..c71d599 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];
                }
        }