From: Steinar H. Gunderson Date: Sun, 11 Jan 2009 23:48:54 +0000 (+0100) Subject: Replace a magic constant by a less magic constant. X-Git-Url: https://git.sesse.net/?p=fjl;a=commitdiff_plain;h=def75cfab6ca4da59ddc2e924898f3a8ed11ec89;ds=sidebyside Replace a magic constant by a less magic constant. --- diff --git a/idct.c b/idct.c index ad1cc36..c71d599 100644 --- 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]; } }