shithub: aacdec

Download patch

ref: b2880393d0216a9d5c3ad876d5ca44d1aacd8f5e
parent: dea62248dc147184c47d922e9a449d5e6440eee0
author: menno <menno>
date: Fri Sep 13 09:08:45 EDT 2002

Final fixed point updates

--- a/libfaad/cfft.c
+++ b/libfaad/cfft.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: cfft.c,v 1.6 2002/08/27 10:24:54 menno Exp $
+** $Id: cfft.c,v 1.7 2002/09/13 13:08:45 menno Exp $
 **/
 
 /*
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 
 #include "cfft.h"
+#include "cfft_tab.h"
 
 
 /*----------------------------------------------------------------------
@@ -567,11 +568,15 @@
 static void cffti1(uint16_t n, real_t *wa, uint16_t *ifac)
 {
     static uint16_t ntryh[4] = {3, 4, 2, 5};
-    float32_t arg, argh, argld, fi;
-    uint16_t idot, ntry, i, j;
-    uint16_t i1, k1, l1, l2, ib;
-    uint16_t ld, ii, nf, ip, nl, nq, nr;
-    uint16_t ido, ipm;
+#ifndef FIXED_POINT
+    real_t arg, argh, argld, fi;
+    uint16_t idot, ido, ipm;
+    uint16_t i1, k1, l1, l2;
+    uint16_t ld, ii, ip;
+#endif
+    uint16_t ntry, i, j;
+    uint16_t ib;
+    uint16_t nf, nl, nq, nr;
 
     nl = n;
     nf = 0;
@@ -610,7 +615,9 @@
 
     ifac[0] = n;
     ifac[1] = nf;
-    argh = 2.0*M_PI / (float32_t)n; /* <-- TODO */
+
+#ifndef FIXED_POINT
+    argh = 2.0*M_PI / (real_t)n;
     i = 1;
     l1 = 1;
 
@@ -626,8 +633,8 @@
         for (j = 1; j <= ipm; j++)
         {
             i1 = i;
-            wa[i-1] = COEF_CONST(1.0);
-            wa[i] = COEF_CONST(0.0);
+            wa[i-1] = 1.0;
+            wa[i] = 0.0;
             ld += l1;
             fi = 0;
             argld = ld*argh;
@@ -637,8 +644,8 @@
                 i += 2;
                 fi += 1;
                 arg = fi * argld;
-                wa[i-1] = COEF_CONST(cos(arg));
-                wa[i] = COEF_CONST(sin(arg));
+                wa[i-1] = cos(arg);
+                wa[i] = sin(arg);
             }
 
             if (ip > 5)
@@ -649,6 +656,7 @@
         }
         l1 = l2;
     }
+#endif
 }
 
 cfft_info *cffti(uint16_t n)
@@ -657,10 +665,27 @@
 
     cfft->n = n;
     cfft->work = (real_t*)malloc(2*n*sizeof(real_t));
+
+#ifndef FIXED_POINT
     cfft->tab = (real_t*)malloc(2*n*sizeof(real_t));
 
     cffti1(n, cfft->tab, cfft->ifac);
+#else
+    cffti1(n, NULL, cfft->ifac);
 
+    switch (n)
+    {
+    case 60: cfft->tab = cfft_tab_60; break;
+    case 64: cfft->tab = cfft_tab_64; break;
+    case 480: cfft->tab = cfft_tab_480; break;
+    case 512: cfft->tab = cfft_tab_512; break;
+#ifdef LD_DEC
+    case 240: cfft->tab = cfft_tab_240; break;
+    case 256: cfft->tab = cfft_tab_256; break;
+#endif
+    }
+#endif
+
     return cfft;
 }
 
@@ -667,7 +692,9 @@
 void cfftu(cfft_info *cfft)
 {
     if (cfft->work) free(cfft->work);
+#ifndef FIXED_POINT
     if (cfft->tab) free(cfft->tab);
+#endif
 
     if (cfft) free(cfft);
 }
\ No newline at end of file
--- /dev/null
+++ b/libfaad/cfft_tab.h
@@ -1,0 +1,3288 @@
+/*
+** FAAD - Freeware Advanced Audio Decoder
+** Copyright (C) 2002 M. Bakker
+**  
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+** 
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+** 
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software 
+** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+**
+** $Id: cfft_tab.h,v 1.1 2002/09/13 13:08:45 menno Exp $
+**/
+
+#ifndef __CFFT_TAB_H__
+#define __CFFT_TAB_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef FIXED_POINT
+
+real_t cfft_tab_512[] =
+{
+    0x10000000,
+    0x0,
+    0xFFFB10B,
+    0x3243A4,
+    0xFFEC430,
+    0x648558,
+    0xFFD3977,
+    0x96C32B,
+    0xFFB10F1,
+    0xC8FB2F,
+    0xFF84AB2,
+    0xFB2B74,
+    0xFF4E6D6,
+    0x12D5209,
+    0xFF0E57E,
+    0x15F6D01,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFE70AFE,
+    0x1C3785D,
+    0xFE13238,
+    0x1F564E6,
+    0xFDABCB8,
+    0x2273E1A,
+    0xFD3AABF,
+    0x259020E,
+    0xFCBFC92,
+    0x28AAED7,
+    0xFC3B27D,
+    0x2BC4289,
+    0xFBACCD1,
+    0x2EDBB3D,
+    0xFB14BE7,
+    0x31F1708,
+    0xFA7301D,
+    0x3505406,
+    0xF9C79D5,
+    0x381704E,
+    0xF91297B,
+    0x3B269FE,
+    0xF853F7D,
+    0x3E33F31,
+    0xF78BC51,
+    0x413EE05,
+    0xF6BA073,
+    0x444749A,
+    0xF5DEC63,
+    0x474D111,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xF40BDD4,
+    0x4D50432,
+    0xF314475,
+    0x504D727,
+    0xF213524,
+    0x5347892,
+    0xF109081,
+    0x563E69F,
+    0xEFF5730,
+    0x5931F79,
+    0xEED89DA,
+    0x5C2214E,
+    0xEDB2930,
+    0x5F0EA4E,
+    0xEC835E6,
+    0x61F78AC,
+    0xEB4B0B8,
+    0x64DCA9B,
+    0xEA09A67,
+    0x67BDE53,
+    0xE8BF3B8,
+    0x6A9B20D,
+    0xE76BD78,
+    0x6D74405,
+    0xE60F878,
+    0x7049279,
+    0xE4AA58F,
+    0x7319BA9,
+    0xE33C598,
+    0x75E5DDA,
+    0xE1C5977,
+    0x78AD751,
+    0xE046211,
+    0x7B70658,
+    0xDEBE054,
+    0x7E2E93A,
+    0xDD2D531,
+    0x80E7E47,
+    0xDB941A0,
+    0x839C3D0,
+    0xD9F269D,
+    0x864B82A,
+    0xD848529,
+    0x88F59AD,
+    0xD695E4C,
+    0x8B9A6B5,
+    0xD4DB312,
+    0x8E39DA0,
+    0xD31848A,
+    0x90D3CD0,
+    0xD14D3CD,
+    0x93682AA,
+    0xCF7A1F4,
+    0x95F6D96,
+    0xCD9F021,
+    0x987FC02,
+    0xCBBBF77,
+    0x9B02C5C,
+    0xC9D1121,
+    0x9D7FD18,
+    0xC7DE64E,
+    0x9FF6CAD,
+    0xC5E4032,
+    0xA267996,
+    0xC3E2004,
+    0xA4D2251,
+    0xC1D8702,
+    0xA736561,
+    0xBFC766E,
+    0xA99414D,
+    0xBDAEF8D,
+    0xABEB49E,
+    0xBB8F3AB,
+    0xAE3BDE3,
+    0xB968418,
+    0xB085BAE,
+    0xB73A226,
+    0xB2C8C97,
+    0xB504F2F,
+    0xB504F37,
+    0xB2C8C8E,
+    0xB73A22E,
+    0xB085BA6,
+    0xB968420,
+    0xAE3BDDA,
+    0xBB8F3B3,
+    0xABEB495,
+    0xBDAEF95,
+    0xA994144,
+    0xBFC7675,
+    0xA736559,
+    0xC1D870A,
+    0xA4D2248,
+    0xC3E200C,
+    0xA26798D,
+    0xC5E4039,
+    0x9FF6CA4,
+    0xC7DE656,
+    0x9D7FD0F,
+    0xC9D1128,
+    0x9B02C53,
+    0xCBBBF7E,
+    0x987FBF8,
+    0xCD9F028,
+    0x95F6D8D,
+    0xCF7A1FB,
+    0x93682A0,
+    0xD14D3D4,
+    0x90D3CC6,
+    0xD318491,
+    0x8E39D96,
+    0xD4DB318,
+    0x8B9A6AB,
+    0xD695E53,
+    0x88F59A3,
+    0xD848530,
+    0x864B820,
+    0xD9F26A3,
+    0x839C3C5,
+    0xDB941A6,
+    0x80E7E3C,
+    0xDD2D537,
+    0x7E2E930,
+    0xDEBE05A,
+    0x7B7064D,
+    0xE046217,
+    0x78AD746,
+    0xE1C597C,
+    0x75E5DCF,
+    0xE33C59E,
+    0x7319B9E,
+    0xE4AA594,
+    0x704926E,
+    0xE60F87D,
+    0x6D743FA,
+    0xE76BD7D,
+    0x6A9B203,
+    0xE8BF3BD,
+    0x67BDE49,
+    0xEA09A6C,
+    0x64DCA90,
+    0xEB4B0BD,
+    0x61F78A1,
+    0xEC835EA,
+    0x5F0EA44,
+    0xEDB2934,
+    0x5C22143,
+    0xEED89DE,
+    0x5931F6E,
+    0xEFF5734,
+    0x563E694,
+    0xF109085,
+    0x5347887,
+    0xF213528,
+    0x504D71C,
+    0xF314479,
+    0x4D50427,
+    0xF40BDD8,
+    0x4A50182,
+    0xF4FA0AE,
+    0x474D106,
+    0xF5DEC67,
+    0x444748F,
+    0xF6BA076,
+    0x413EDFA,
+    0xF78BC54,
+    0x3E33F25,
+    0xF853F80,
+    0x3B269F2,
+    0xF91297E,
+    0x3817043,
+    0xF9C79D8,
+    0x35053FA,
+    0xFA7301F,
+    0x31F16FD,
+    0xFB14BE9,
+    0x2EDBB31,
+    0xFBACCD3,
+    0x2BC427E,
+    0xFC3B27F,
+    0x28AAECB,
+    0xFCBFC94,
+    0x2590203,
+    0xFD3AAC1,
+    0x2273E0F,
+    0xFDABCBA,
+    0x1F564DA,
+    0xFE13239,
+    0x1C37851,
+    0xFE70AFF,
+    0x1917A60,
+    0xFEC46D2,
+    0x15F6CF5,
+    0xFF0E57F,
+    0x12D51FE,
+    0xFF4E6D7,
+    0xFB2B68,
+    0xFF84AB3,
+    0xC8FB24,
+    0xFFB10F2,
+    0x96C320,
+    0xFFD3978,
+    0x64854C,
+    0xFFEC430,
+    0x324398,
+    0xFFFB10B,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFFCDBC51,
+    0xFFFB10B,
+    0xFF9B7A9D,
+    0xFFEC42F,
+    0xFF693CC9,
+    0xFFD3977,
+    0xFF3704C5,
+    0xFFB10F1,
+    0xFF04D481,
+    0xFF84AB2,
+    0xFED2ADEB,
+    0xFF4E6D5,
+    0xFEA092F4,
+    0xFF0E57D,
+    0xFE6E8588,
+    0xFEC46D0,
+    0xFE3C8798,
+    0xFE70AFD,
+    0xFE0A9B0F,
+    0xFE13236,
+    0xFDD8C1DA,
+    0xFDABCB7,
+    0xFDA6FDE6,
+    0xFD3AABD,
+    0xFD75511E,
+    0xFCBFC90,
+    0xFD43BD6B,
+    0xFC3B27A,
+    0xFD1244B8,
+    0xFBACCCF,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xFCAFABEF,
+    0xFA7301A,
+    0xFC7E8FA6,
+    0xF9C79D3,
+    0xFC4D95F7,
+    0xF912978,
+    0xFC1CC0C4,
+    0xF853F7A,
+    0xFBEC11F0,
+    0xF78BC4E,
+    0xFBBB8B5B,
+    0xF6BA070,
+    0xFB8B2EE3,
+    0xF5DEC60,
+    0xFB5AFE67,
+    0xF4FA0A7,
+    0xFB2AFBC2,
+    0xF40BDD1,
+    0xFAFB28CE,
+    0xF314471,
+    0xFACB8762,
+    0xF213520,
+    0xFA9C1956,
+    0xF10907D,
+    0xFA6CE07C,
+    0xEFF572C,
+    0xFA3DDEA7,
+    0xEED89D6,
+    0xFA0F15A7,
+    0xEDB292B,
+    0xF9E08749,
+    0xEC835E1,
+    0xF9B2355A,
+    0xEB4B0B4,
+    0xF98421A2,
+    0xEA09A62,
+    0xF9564DE8,
+    0xE8BF3B3,
+    0xF928BBF0,
+    0xE76BD73,
+    0xF8FB6D7D,
+    0xE60F873,
+    0xF8CE644D,
+    0xE4AA589,
+    0xF8A1A21C,
+    0xE33C593,
+    0xF87528A5,
+    0xE1C5971,
+    0xF848F99E,
+    0xE04620B,
+    0xF81D16BC,
+    0xDEBE04E,
+    0xF7F181AF,
+    0xDD2D52B,
+    0xF7C63C26,
+    0xDB9419A,
+    0xF79B47CC,
+    0xD9F2697,
+    0xF770A649,
+    0xD848523,
+    0xF7465941,
+    0xD695E46,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF6F2C327,
+    0xD318484,
+    0xF6C97D4D,
+    0xD14D3C6,
+    0xF6A09260,
+    0xCF7A1ED,
+    0xF67803F5,
+    0xCD9F01A,
+    0xF64FD39B,
+    0xCBBBF70,
+    0xF62802DF,
+    0xC9D111A,
+    0xF600934A,
+    0xC7DE647,
+    0xF5D98661,
+    0xC5E402A,
+    0xF5B2DDA6,
+    0xC3E1FFC,
+    0xF58C9A96,
+    0xC1D86FA,
+    0xF566BEAA,
+    0xBFC7666,
+    0xF5414B59,
+    0xBDAEF85,
+    0xF51C4215,
+    0xBB8F3A3,
+    0xF4F7A449,
+    0xB96840F,
+    0xF4D37361,
+    0xB73A21E,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF48C5DCA,
+    0xB2C8C86,
+    0xF4697BD8,
+    0xB085B9D,
+    0xF4470C45,
+    0xAE3BDD2,
+    0xF4251063,
+    0xABEB48C,
+    0xF4038983,
+    0xA99413B,
+    0xF3E278EF,
+    0xA736550,
+    0xF3C1DFED,
+    0xA4D223F,
+    0xF3A1BFBF,
+    0xA267984,
+    0xF38219A3,
+    0x9FF6C9B,
+    0xF362EED0,
+    0x9D7FD05,
+    0xF344407B,
+    0x9B02C49,
+    0xF3260FD1,
+    0x987FBEF,
+    0xF3085DFE,
+    0x95F6D83,
+    0xF2EB2C25,
+    0x9368296,
+    0xF2CE7B68,
+    0x90D3CBC,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF296A1A7,
+    0x8B9A6A1,
+    0xF27B7ACA,
+    0x88F5999,
+    0xF260D957,
+    0x864B816,
+    0xF246BE54,
+    0x839C3BB,
+    0xF22D2AC3,
+    0x80E7E32,
+    0xF2141FA1,
+    0x7E2E925,
+    0xF1FB9DE4,
+    0x7B70643,
+    0xF1E3A67E,
+    0x78AD73C,
+    0xF1CC3A5D,
+    0x75E5DC5,
+    0xF1B55A67,
+    0x7319B94,
+    0xF19F077E,
+    0x7049263,
+    0xF189427E,
+    0x6D743F0,
+    0xF1740C3E,
+    0x6A9B1F8,
+    0xF15F6590,
+    0x67BDE3E,
+    0xF14B4F3F,
+    0x64DCA86,
+    0xF137CA11,
+    0x61F7896,
+    0xF124D6C8,
+    0x5F0EA39,
+    0xF112761E,
+    0x5C22138,
+    0xF100A8C8,
+    0x5931F63,
+    0xF0EF6F77,
+    0x563E689,
+    0xF0DECAD4,
+    0x534787C,
+    0xF0CEBB84,
+    0x504D711,
+    0xF0BF4224,
+    0x4D5041C,
+    0xF0B05F4F,
+    0x4A50177,
+    0xF0A21396,
+    0x474D0FB,
+    0xF0945F87,
+    0x4447484,
+    0xF08743A9,
+    0x413EDEE,
+    0xF07AC07D,
+    0x3E33F1A,
+    0xF06ED680,
+    0x3B269E7,
+    0xF0638626,
+    0x3817038,
+    0xF058CFDE,
+    0x35053EF,
+    0xF04EB414,
+    0x31F16F1,
+    0xF045332B,
+    0x2EDBB26,
+    0xF03C4D7F,
+    0x2BC4272,
+    0xF034036B,
+    0x28AAEC0,
+    0xF02C553E,
+    0x25901F7,
+    0xF0254345,
+    0x2273E03,
+    0xF01ECDC5,
+    0x1F564CF,
+    0xF018F4FF,
+    0x1C37845,
+    0xF013B92C,
+    0x1917A55,
+    0xF00F1A80,
+    0x15F6CE9,
+    0xF00B1928,
+    0x12D51F2,
+    0xF007B54C,
+    0xFB2B5C,
+    0xF004EF0E,
+    0xC8FB18,
+    0xF002C688,
+    0x96C314,
+    0xF0013BD0,
+    0x648540,
+    0xF0004EF5,
+    0x32438C,
+    0x10000000,
+    0x0,
+    0xFFEC430,
+    0x648558,
+    0xFFB10F1,
+    0xC8FB2F,
+    0xFF4E6D6,
+    0x12D5209,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFE13238,
+    0x1F564E6,
+    0xFD3AABF,
+    0x259020E,
+    0xFC3B27D,
+    0x2BC4289,
+    0xFB14BE7,
+    0x31F1708,
+    0xF9C79D5,
+    0x381704E,
+    0xF853F7D,
+    0x3E33F31,
+    0xF6BA073,
+    0x444749A,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xF314475,
+    0x504D727,
+    0xF109081,
+    0x563E69F,
+    0xEED89DA,
+    0x5C2214E,
+    0xEC835E6,
+    0x61F78AC,
+    0xEA09A67,
+    0x67BDE53,
+    0xE76BD78,
+    0x6D74405,
+    0xE4AA58F,
+    0x7319BA9,
+    0xE1C5977,
+    0x78AD751,
+    0xDEBE054,
+    0x7E2E93A,
+    0xDB941A0,
+    0x839C3D0,
+    0xD848529,
+    0x88F59AD,
+    0xD4DB312,
+    0x8E39DA0,
+    0xD14D3CD,
+    0x93682AA,
+    0xCD9F021,
+    0x987FC02,
+    0xC9D1121,
+    0x9D7FD18,
+    0xC5E4032,
+    0xA267996,
+    0xC1D8702,
+    0xA736561,
+    0xBDAEF8D,
+    0xABEB49E,
+    0xB968418,
+    0xB085BAE,
+    0xB504F2F,
+    0xB504F37,
+    0xB085BA6,
+    0xB968420,
+    0xABEB495,
+    0xBDAEF95,
+    0xA736559,
+    0xC1D870A,
+    0xA26798D,
+    0xC5E4039,
+    0x9D7FD0F,
+    0xC9D1128,
+    0x987FBF8,
+    0xCD9F028,
+    0x93682A0,
+    0xD14D3D4,
+    0x8E39D96,
+    0xD4DB318,
+    0x88F59A3,
+    0xD848530,
+    0x839C3C5,
+    0xDB941A6,
+    0x7E2E930,
+    0xDEBE05A,
+    0x78AD746,
+    0xE1C597C,
+    0x7319B9E,
+    0xE4AA594,
+    0x6D743FA,
+    0xE76BD7D,
+    0x67BDE49,
+    0xEA09A6C,
+    0x61F78A1,
+    0xEC835EA,
+    0x5C22143,
+    0xEED89DE,
+    0x563E694,
+    0xF109085,
+    0x504D71C,
+    0xF314479,
+    0x4A50182,
+    0xF4FA0AE,
+    0x444748F,
+    0xF6BA076,
+    0x3E33F25,
+    0xF853F80,
+    0x3817043,
+    0xF9C79D8,
+    0x31F16FD,
+    0xFB14BE9,
+    0x2BC427E,
+    0xFC3B27F,
+    0x2590203,
+    0xFD3AAC1,
+    0x1F564DA,
+    0xFE13239,
+    0x1917A60,
+    0xFEC46D2,
+    0x12D51FE,
+    0xFF4E6D7,
+    0xC8FB24,
+    0xFFB10F2,
+    0x64854C,
+    0xFFEC430,
+    0x10000000,
+    0x0,
+    0xFFB10F1,
+    0xC8FB2F,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFD3AABF,
+    0x259020E,
+    0xFB14BE7,
+    0x31F1708,
+    0xF853F7D,
+    0x3E33F31,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xF109081,
+    0x563E69F,
+    0xEC835E6,
+    0x61F78AC,
+    0xE76BD78,
+    0x6D74405,
+    0xE1C5977,
+    0x78AD751,
+    0xDB941A0,
+    0x839C3D0,
+    0xD4DB312,
+    0x8E39DA0,
+    0xCD9F021,
+    0x987FC02,
+    0xC5E4032,
+    0xA267996,
+    0xBDAEF8D,
+    0xABEB49E,
+    0xB504F2F,
+    0xB504F37,
+    0xABEB495,
+    0xBDAEF95,
+    0xA26798D,
+    0xC5E4039,
+    0x987FBF8,
+    0xCD9F028,
+    0x8E39D96,
+    0xD4DB318,
+    0x839C3C5,
+    0xDB941A6,
+    0x78AD746,
+    0xE1C597C,
+    0x6D743FA,
+    0xE76BD7D,
+    0x61F78A1,
+    0xEC835EA,
+    0x563E694,
+    0xF109085,
+    0x4A50182,
+    0xF4FA0AE,
+    0x3E33F25,
+    0xF853F80,
+    0x31F16FD,
+    0xFB14BE9,
+    0x2590203,
+    0xFD3AAC1,
+    0x1917A60,
+    0xFEC46D2,
+    0xC8FB24,
+    0xFFB10F2,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFF3704C5,
+    0xFFB10F1,
+    0xFE6E8588,
+    0xFEC46D0,
+    0xFDA6FDE6,
+    0xFD3AABD,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xFC1CC0C4,
+    0xF853F7A,
+    0xFB5AFE67,
+    0xF4FA0A7,
+    0xFA9C1956,
+    0xF10907D,
+    0xF9E08749,
+    0xEC835E1,
+    0xF928BBF0,
+    0xE76BD73,
+    0xF87528A5,
+    0xE1C5971,
+    0xF7C63C26,
+    0xDB9419A,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF67803F5,
+    0xCD9F01A,
+    0xF5D98661,
+    0xC5E402A,
+    0xF5414B59,
+    0xBDAEF85,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF4251063,
+    0xABEB48C,
+    0xF3A1BFBF,
+    0xA267984,
+    0xF3260FD1,
+    0x987FBEF,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF246BE54,
+    0x839C3BB,
+    0xF1E3A67E,
+    0x78AD73C,
+    0xF189427E,
+    0x6D743F0,
+    0xF137CA11,
+    0x61F7896,
+    0xF0EF6F77,
+    0x563E689,
+    0xF0B05F4F,
+    0x4A50177,
+    0xF07AC07D,
+    0x3E33F1A,
+    0xF04EB414,
+    0x31F16F1,
+    0xF02C553E,
+    0x25901F7,
+    0xF013B92C,
+    0x1917A55,
+    0xF004EF0E,
+    0xC8FB18,
+    0x10000000,
+    0x0,
+    0xFF4E6D6,
+    0x12D5209,
+    0xFD3AABF,
+    0x259020D,
+    0xF9C79D6,
+    0x381704D,
+    0xF4FA0AB,
+    0x4A5018B,
+    0xEED89DB,
+    0x5C2214C,
+    0xE76BD79,
+    0x6D74402,
+    0xDEBE056,
+    0x7E2E937,
+    0xD4DB314,
+    0x8E39D9D,
+    0xC9D1124,
+    0x9D7FD14,
+    0xBDAEF90,
+    0xABEB49A,
+    0xB085BAA,
+    0xB96841C,
+    0xA267992,
+    0xC5E4035,
+    0x93682A5,
+    0xD14D3D0,
+    0x839C3CB,
+    0xDB941A2,
+    0x7319BA5,
+    0xE4AA590,
+    0x61F78A8,
+    0xEC835E7,
+    0x504D724,
+    0xF314476,
+    0x3E33F2E,
+    0xF853F7E,
+    0x2BC4287,
+    0xFC3B27D,
+    0x1917A6A,
+    0xFEC46D2,
+    0x648556,
+    0xFFEC430,
+    0xFF3704D0,
+    0xFFB10F1,
+    0xFE0A9B1A,
+    0xFE13238,
+    0xFCE0E8F8,
+    0xFB14BE7,
+    0xFBBB8B67,
+    0xF6BA073,
+    0xFA9C1962,
+    0xF109082,
+    0xF98421AE,
+    0xEA09A68,
+    0xF87528B1,
+    0xE1C5978,
+    0xF770A655,
+    0xD84852B,
+    0xF6780401,
+    0xCD9F023,
+    0xF58C9AA1,
+    0xC1D8704,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF3E278F9,
+    0xA73655C,
+    0xF3260FDC,
+    0x987FBFD,
+    0xF27B7AD4,
+    0x88F59A8,
+    0xF1E3A687,
+    0x78AD74C,
+    0xF15F6597,
+    0x67BDE4F,
+    0xF0EF6F7D,
+    0x563E69B,
+    0xF0945F8C,
+    0x4447496,
+    0xF04EB418,
+    0x31F1705,
+    0xF01ECDC8,
+    0x1F564E3,
+    0xF004EF0F,
+    0xC8FB2D,
+    0xF0013BD0,
+    0xFF9B7AA6,
+    0xF013B92F,
+    0xFE6E8593,
+    0xF03C4D84,
+    0xFD43BD76,
+    0xF07AC083,
+    0xFC1CC0CF,
+    0xF0CEBB8B,
+    0xFAFB28D9,
+    0xF137CA1A,
+    0xF9E08755,
+    0xF1B55A71,
+    0xF8CE6458,
+    0xF246BE5F,
+    0xF7C63C32,
+    0xF2EB2C32,
+    0xF6C97D58,
+    0xF3A1BFCD,
+    0xF5D9866C,
+    0xF4697BE6,
+    0xF4F7A454,
+    0xF5414B68,
+    0xF425106D,
+    0xF62802EE,
+    0xF362EEDA,
+    0xF71C6266,
+    0xF2B24CEA,
+    0xF81D16CC,
+    0xF2141FA9,
+    0xF928BC01,
+    0xF1894285,
+    0xFA3DDEB7,
+    0xF1127624,
+    0xFB5AFE78,
+    0xF0B05F54,
+    0xFC7E8FB6,
+    0xF063862A,
+    0xFDA6FDF6,
+    0xF02C5541,
+    0xFED2ADFA,
+    0xF00B192A,
+    0x10000000,
+    0x0,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFB14BE7,
+    0x31F1708,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xEC835E6,
+    0x61F78AC,
+    0xE1C5977,
+    0x78AD751,
+    0xD4DB312,
+    0x8E39DA0,
+    0xC5E4032,
+    0xA267996,
+    0xB504F2F,
+    0xB504F37,
+    0xA26798D,
+    0xC5E4039,
+    0x8E39D96,
+    0xD4DB318,
+    0x78AD746,
+    0xE1C597C,
+    0x61F78A1,
+    0xEC835EA,
+    0x4A50182,
+    0xF4FA0AE,
+    0x31F16FD,
+    0xFB14BE9,
+    0x1917A60,
+    0xFEC46D2,
+    0x10000000,
+    0x0,
+    0xFB14BE7,
+    0x31F1708,
+    0xEC835E6,
+    0x61F78AC,
+    0xD4DB312,
+    0x8E39DA0,
+    0xB504F2F,
+    0xB504F37,
+    0x8E39D96,
+    0xD4DB318,
+    0x61F78A1,
+    0xEC835EA,
+    0x31F16FD,
+    0xFB14BE9,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xF9E08749,
+    0xEC835E1,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF137CA11,
+    0x61F7896,
+    0xF04EB414,
+    0x31F16F1,
+    0x10000000,
+    0x0,
+    0xF4FA0AB,
+    0x4A5018B,
+    0xD4DB314,
+    0x8E39D9D,
+    0xA267992,
+    0xC5E4035,
+    0x61F78A8,
+    0xEC835E7,
+    0x1917A6A,
+    0xFEC46D2,
+    0xFCE0E8F8,
+    0xFB14BE7,
+    0xF87528B1,
+    0xE1C5978,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF1E3A687,
+    0x78AD74C,
+    0xF04EB418,
+    0x31F1705,
+    0xF013B92F,
+    0xFE6E8593,
+    0xF137CA1A,
+    0xF9E08755,
+    0xF3A1BFCD,
+    0xF5D9866C,
+    0xF71C6266,
+    0xF2B24CEA,
+    0xFB5AFE78,
+    0xF0B05F54,
+    0x10000000,
+    0x0,
+    0xEC835E6,
+    0x61F78AC,
+    0xB504F2F,
+    0xB504F37,
+    0x61F78A1,
+    0xEC835EA,
+    0x10000000,
+    0x0,
+    0xB504F2F,
+    0xB504F37,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xF4AFB0C1,
+    0xB504F26,
+    0x10000000,
+    0x0,
+    0x61F78A8,
+    0xEC835E7,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF137CA1A,
+    0xF9E08755,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x3,
+    0xF0000001,
+};
+
+real_t cfft_tab_480[] =
+{
+    0x10000000,
+    0x0,
+    0xFFFA62A,
+    0x359D6F,
+    0xFFE98AD,
+    0x6B3885,
+    0xFFCD795,
+    0xA0CEE6,
+    0xFFA62F6,
+    0xD65E3A,
+    0xFF73AEB,
+    0x10BE427,
+    0xFF35F97,
+    0x1415E53,
+    0xFEED125,
+    0x176CA67,
+    0xFE98FCA,
+    0x1AC260A,
+    0xFE39BBF,
+    0x1E16EE5,
+    0xFDCF549,
+    0x216A2A2,
+    0xFD59CB1,
+    0x24BBEEC,
+    0xFCD9249,
+    0x280C16E,
+    0xFC4D66D,
+    0x2B5A7D4,
+    0xFBB697F,
+    0x2EA6FCD,
+    0xFB14BE7,
+    0x31F1708,
+    0xFA67E18,
+    0x3539B37,
+    0xF9B008C,
+    0x387FA0A,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xF81F844,
+    0x3F03E71,
+    0xF746EA3,
+    0x4241F72,
+    0xF663775,
+    0x457D1F2,
+    0xF57535C,
+    0x48B53AE,
+    0xF47C2FD,
+    0x4BEA263,
+    0xF378708,
+    0x4F1BBD0,
+    0xF26A034,
+    0x5249DB7,
+    0xF150F3D,
+    0x55745DE,
+    0xF02D4EA,
+    0x589B20C,
+    0xEEFF206,
+    0x5BBE00A,
+    0xEDC6766,
+    0x5EDCDA5,
+    0xEC835E6,
+    0x61F78AC,
+    0xEB35E68,
+    0x650DEF1,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xE87C121,
+    0x6B2D490,
+    0xE70FD42,
+    0x6E35F9D,
+    0xE599739,
+    0x7139D51,
+    0xE41900D,
+    0x7438B8D,
+    0xE28E8CA,
+    0x7732839,
+    0xE0FA286,
+    0x7A2713C,
+    0xDF5BE5D,
+    0x7D16485,
+    0xDDB3D72,
+    0x8000003,
+    0xDC020ED,
+    0x82E41AC,
+    0xDA46A01,
+    0x85C2777,
+    0xD8819E3,
+    0x889AF63,
+    0xD6B31D1,
+    0x8B6D76F,
+    0xD4DB312,
+    0x8E39DA0,
+    0xD2F9EEE,
+    0x9100000,
+    0xD10F6B9,
+    0x93BFC9C,
+    0xCF1BBCB,
+    0x9679186,
+    0xCD1EF81,
+    0x992BCD4,
+    0xCB19342,
+    0x9BD7CA3,
+    0xC90A879,
+    0x9E7CF12,
+    0xC6F3097,
+    0xA11B246,
+    0xC4D2D14,
+    0xA3B2468,
+    0xC2A9F6E,
+    0xA6423A7,
+    0xC07892A,
+    0xA8CAE36,
+    0xBE3EBD0,
+    0xAB4C24F,
+    0xBBFC8F1,
+    0xADC5E2F,
+    0xB9B2224,
+    0xB03801A,
+    0xB75F902,
+    0xB2A2658,
+    0xB504F2F,
+    0xB504F37,
+    0xB2A2650,
+    0xB75F90A,
+    0xB038012,
+    0xB9B222C,
+    0xADC5E27,
+    0xBBFC8F9,
+    0xAB4C246,
+    0xBE3EBD8,
+    0xA8CAE2D,
+    0xC078931,
+    0xA64239E,
+    0xC2A9F76,
+    0xA3B245F,
+    0xC4D2D1B,
+    0xA11B23C,
+    0xC6F309E,
+    0x9E7CF09,
+    0xC90A880,
+    0x9BD7C9A,
+    0xCB19349,
+    0x992BCCB,
+    0xCD1EF88,
+    0x967917C,
+    0xCF1BBD1,
+    0x93BFC92,
+    0xD10F6C0,
+    0x90FFFF6,
+    0xD2F9EF5,
+    0x8E39D96,
+    0xD4DB318,
+    0x8B6D765,
+    0xD6B31D8,
+    0x889AF59,
+    0xD8819E9,
+    0x85C276D,
+    0xDA46A07,
+    0x82E41A2,
+    0xDC020F3,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x7D1647A,
+    0xDF5BE63,
+    0x7A27132,
+    0xE0FA28C,
+    0x773282E,
+    0xE28E8CF,
+    0x7438B83,
+    0xE419012,
+    0x7139D46,
+    0xE59973F,
+    0x6E35F92,
+    0xE70FD48,
+    0x6B2D485,
+    0xE87C126,
+    0x681FE40,
+    0xE9DE1DA,
+    0x650DEE7,
+    0xEB35E6C,
+    0x61F78A1,
+    0xEC835EA,
+    0x5EDCD9A,
+    0xEDC676B,
+    0x5BBDFFF,
+    0xEEFF20A,
+    0x589B201,
+    0xF02D4EE,
+    0x55745D3,
+    0xF150F41,
+    0x5249DAC,
+    0xF26A038,
+    0x4F1BBC4,
+    0xF37870C,
+    0x4BEA257,
+    0xF47C301,
+    0x48B53A3,
+    0xF57535F,
+    0x457D1E7,
+    0xF663778,
+    0x4241F66,
+    0xF746EA6,
+    0x3F03E65,
+    0xF81F847,
+    0x3BC312A,
+    0xF8ED3C5,
+    0x387F9FE,
+    0xF9B008E,
+    0x3539B2B,
+    0xFA67E1B,
+    0x31F16FD,
+    0xFB14BE9,
+    0x2EA6FC2,
+    0xFBB6981,
+    0x2B5A7C8,
+    0xFC4D66F,
+    0x280C162,
+    0xFCD924B,
+    0x24BBEE0,
+    0xFD59CB2,
+    0x216A297,
+    0xFDCF54A,
+    0x1E16EDA,
+    0xFE39BC1,
+    0x1AC25FE,
+    0xFE98FCB,
+    0x176CA5B,
+    0xFEED126,
+    0x1415E48,
+    0xFF35F97,
+    0x10BE41B,
+    0xFF73AEB,
+    0xD65E2E,
+    0xFFA62F7,
+    0xA0CEDB,
+    0xFFCD796,
+    0x6B3879,
+    0xFFE98AE,
+    0x359D63,
+    0xFFFA62A,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFFCA6285,
+    0xFFFA62A,
+    0xFF94C770,
+    0xFFE98AD,
+    0xFF5F310E,
+    0xFFCD795,
+    0xFF29A1BA,
+    0xFFA62F5,
+    0xFEF41BCD,
+    0xFF73AEA,
+    0xFEBEA1A1,
+    0xFF35F96,
+    0xFE89358D,
+    0xFEED124,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFE1E910F,
+    0xFE39BBE,
+    0xFDE95D52,
+    0xFDCF547,
+    0xFDB44108,
+    0xFD59CAF,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFD4A5820,
+    0xFC4D66B,
+    0xFD159027,
+    0xFBB697D,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xFCAC64BE,
+    0xFA67E16,
+    0xFC7805EB,
+    0xF9B0089,
+    0xFC43CEBF,
+    0xF8ED3BF,
+    0xFC0FC184,
+    0xF81F841,
+    0xFBDBE083,
+    0xF746EA0,
+    0xFBA82E02,
+    0xF663772,
+    0xFB74AC47,
+    0xF575358,
+    0xFB415D92,
+    0xF47C2FA,
+    0xFB0E4425,
+    0xF378705,
+    0xFADB623E,
+    0xF26A030,
+    0xFAA8BA17,
+    0xF150F39,
+    0xFA764DE9,
+    0xF02D4E6,
+    0xFA441FEB,
+    0xEEFF202,
+    0xFA123250,
+    0xEDC6762,
+    0xF9E08749,
+    0xEC835E1,
+    0xF9AF2104,
+    0xEB35E63,
+    0xF97E01AB,
+    0xE9DE1D1,
+    0xF94D2B65,
+    0xE87C11C,
+    0xF91CA058,
+    0xE70FD3D,
+    0xF8EC62A5,
+    0xE599734,
+    0xF8BC7468,
+    0xE419007,
+    0xF88CD7BD,
+    0xE28E8C4,
+    0xF85D8EBA,
+    0xE0FA281,
+    0xF82E9B71,
+    0xDF5BE57,
+    0xF7FFFFF3,
+    0xDDB3D6C,
+    0xF7D1BE4A,
+    0xDC020E7,
+    0xF7A3D87F,
+    0xDA469FB,
+    0xF7765093,
+    0xD8819DC,
+    0xF7492887,
+    0xD6B31CB,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF6EFFFF7,
+    0xD2F9EE8,
+    0xF6C4035B,
+    0xD10F6B2,
+    0xF6986E71,
+    0xCF1BBC4,
+    0xF66D4322,
+    0xCD1EF7A,
+    0xF6428354,
+    0xCB1933B,
+    0xF61830E5,
+    0xC90A872,
+    0xF5EE4DB1,
+    0xC6F308F,
+    0xF5C4DB8F,
+    0xC4D2D0C,
+    0xF59BDC51,
+    0xC2A9F67,
+    0xF57351C1,
+    0xC078922,
+    0xF54B3DA8,
+    0xBE3EBC8,
+    0xF523A1C8,
+    0xBBFC8E9,
+    0xF4FC7FDD,
+    0xB9B221C,
+    0xF4D5D9A0,
+    0xB75F8FA,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF48A06ED,
+    0xB2A2647,
+    0xF464DDCC,
+    0xB038009,
+    0xF44036FF,
+    0xADC5E1E,
+    0xF41C1420,
+    0xAB4C23E,
+    0xF3F876C7,
+    0xA8CAE24,
+    0xF3D56083,
+    0xA642395,
+    0xF3B2D2DD,
+    0xA3B2456,
+    0xF390CF5A,
+    0xA11B233,
+    0xF36F5779,
+    0x9E7CF00,
+    0xF34E6CB0,
+    0x9BD7C91,
+    0xF32E1071,
+    0x992BCC2,
+    0xF30E4428,
+    0x9679173,
+    0xF2EF0939,
+    0x93BFC88,
+    0xF2D06105,
+    0x90FFFEC,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF294CE22,
+    0x8B6D75B,
+    0xF277E611,
+    0x889AF4F,
+    0xF25B95F3,
+    0x85C2763,
+    0xF23FDF07,
+    0x82E4197,
+    0xF224C283,
+    0x7FFFFEF,
+    0xF20A4197,
+    0x7D16470,
+    0xF1F05D6F,
+    0x7A27128,
+    0xF1D7172B,
+    0x7732824,
+    0xF1BE6FE9,
+    0x7438B79,
+    0xF1A668BC,
+    0x7139D3C,
+    0xF18F02B3,
+    0x6E35F88,
+    0xF1783ED5,
+    0x6B2D47B,
+    0xF1621E21,
+    0x681FE35,
+    0xF14CA18F,
+    0x650DEDC,
+    0xF137CA11,
+    0x61F7896,
+    0xF1239891,
+    0x5EDCD8F,
+    0xF1100DF2,
+    0x5BBDFF4,
+    0xF0FD2B0E,
+    0x589B1F6,
+    0xF0EAF0BB,
+    0x55745C8,
+    0xF0D95FC5,
+    0x5249DA1,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF0B83CFC,
+    0x4BEA24C,
+    0xF0A8AC9E,
+    0x48B5398,
+    0xF099C884,
+    0x457D1DC,
+    0xF08B9157,
+    0x4241F5B,
+    0xF07E07B6,
+    0x3F03E5A,
+    0xF0712C38,
+    0x3BC311F,
+    0xF064FF6F,
+    0x387F9F3,
+    0xF05981E3,
+    0x3539B20,
+    0xF04EB414,
+    0x31F16F1,
+    0xF044967D,
+    0x2EA6FB6,
+    0xF03B298F,
+    0x2B5A7BD,
+    0xF0326DB3,
+    0x280C156,
+    0xF02A634C,
+    0x24BBED5,
+    0xF0230AB4,
+    0x216A28B,
+    0xF01C643E,
+    0x1E16ECE,
+    0xF0167034,
+    0x1AC25F3,
+    0xF0112ED9,
+    0x176CA50,
+    0xF00CA068,
+    0x1415E3C,
+    0xF008C514,
+    0x10BE40F,
+    0xF0059D09,
+    0xD65E23,
+    0xF003286A,
+    0xA0CECF,
+    0xF0016752,
+    0x6B386D,
+    0xF00059D6,
+    0x359D58,
+    0x10000000,
+    0x0,
+    0xFFE98AD,
+    0x6B3885,
+    0xFFA62F6,
+    0xD65E3A,
+    0xFF35F97,
+    0x1415E53,
+    0xFE98FCA,
+    0x1AC260A,
+    0xFDCF549,
+    0x216A2A2,
+    0xFCD9249,
+    0x280C16E,
+    0xFBB697F,
+    0x2EA6FCD,
+    0xFA67E18,
+    0x3539B37,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xF746EA3,
+    0x4241F72,
+    0xF57535C,
+    0x48B53AE,
+    0xF378708,
+    0x4F1BBD0,
+    0xF150F3D,
+    0x55745DE,
+    0xEEFF206,
+    0x5BBE00A,
+    0xEC835E6,
+    0x61F78AC,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xE70FD42,
+    0x6E35F9D,
+    0xE41900D,
+    0x7438B8D,
+    0xE0FA286,
+    0x7A2713C,
+    0xDDB3D72,
+    0x8000003,
+    0xDA46A01,
+    0x85C2777,
+    0xD6B31D1,
+    0x8B6D76F,
+    0xD2F9EEE,
+    0x9100000,
+    0xCF1BBCB,
+    0x9679186,
+    0xCB19342,
+    0x9BD7CA3,
+    0xC6F3097,
+    0xA11B246,
+    0xC2A9F6E,
+    0xA6423A7,
+    0xBE3EBD0,
+    0xAB4C24F,
+    0xB9B2224,
+    0xB03801A,
+    0xB504F2F,
+    0xB504F37,
+    0xB038012,
+    0xB9B222C,
+    0xAB4C246,
+    0xBE3EBD8,
+    0xA64239E,
+    0xC2A9F76,
+    0xA11B23C,
+    0xC6F309E,
+    0x9BD7C9A,
+    0xCB19349,
+    0x967917C,
+    0xCF1BBD1,
+    0x90FFFF6,
+    0xD2F9EF5,
+    0x8B6D765,
+    0xD6B31D8,
+    0x85C276D,
+    0xDA46A07,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x7A27132,
+    0xE0FA28C,
+    0x7438B83,
+    0xE419012,
+    0x6E35F92,
+    0xE70FD48,
+    0x681FE40,
+    0xE9DE1DA,
+    0x61F78A1,
+    0xEC835EA,
+    0x5BBDFFF,
+    0xEEFF20A,
+    0x55745D3,
+    0xF150F41,
+    0x4F1BBC4,
+    0xF37870C,
+    0x48B53A3,
+    0xF57535F,
+    0x4241F66,
+    0xF746EA6,
+    0x3BC312A,
+    0xF8ED3C5,
+    0x3539B2B,
+    0xFA67E1B,
+    0x2EA6FC2,
+    0xFBB6981,
+    0x280C162,
+    0xFCD924B,
+    0x216A297,
+    0xFDCF54A,
+    0x1AC25FE,
+    0xFE98FCB,
+    0x1415E48,
+    0xFF35F97,
+    0xD65E2E,
+    0xFFA62F7,
+    0x6B3879,
+    0xFFE98AE,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFF94C770,
+    0xFFE98AD,
+    0xFF29A1BA,
+    0xFFA62F5,
+    0xFEBEA1A1,
+    0xFF35F96,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFDE95D52,
+    0xFDCF547,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFD159027,
+    0xFBB697D,
+    0xFCAC64BE,
+    0xFA67E16,
+    0xFC43CEBF,
+    0xF8ED3BF,
+    0xFBDBE083,
+    0xF746EA0,
+    0xFB74AC47,
+    0xF575358,
+    0xFB0E4425,
+    0xF378705,
+    0xFAA8BA17,
+    0xF150F39,
+    0xFA441FEB,
+    0xEEFF202,
+    0xF9E08749,
+    0xEC835E1,
+    0xF97E01AB,
+    0xE9DE1D1,
+    0xF91CA058,
+    0xE70FD3D,
+    0xF8BC7468,
+    0xE419007,
+    0xF85D8EBA,
+    0xE0FA281,
+    0x10000000,
+    0x0,
+    0xFFA62F6,
+    0xD65E3A,
+    0xFE98FCA,
+    0x1AC260A,
+    0xFCD9249,
+    0x280C16E,
+    0xFA67E18,
+    0x3539B37,
+    0xF746EA3,
+    0x4241F72,
+    0xF378708,
+    0x4F1BBD0,
+    0xEEFF206,
+    0x5BBE00A,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xE41900D,
+    0x7438B8D,
+    0xDDB3D72,
+    0x8000003,
+    0xD6B31D1,
+    0x8B6D76F,
+    0xCF1BBCB,
+    0x9679186,
+    0xC6F3097,
+    0xA11B246,
+    0xBE3EBD0,
+    0xAB4C24F,
+    0xB504F2F,
+    0xB504F37,
+    0xAB4C246,
+    0xBE3EBD8,
+    0xA11B23C,
+    0xC6F309E,
+    0x967917C,
+    0xCF1BBD1,
+    0x8B6D765,
+    0xD6B31D8,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x7438B83,
+    0xE419012,
+    0x681FE40,
+    0xE9DE1DA,
+    0x5BBDFFF,
+    0xEEFF20A,
+    0x4F1BBC4,
+    0xF37870C,
+    0x4241F66,
+    0xF746EA6,
+    0x3539B2B,
+    0xFA67E1B,
+    0x280C162,
+    0xFCD924B,
+    0x1AC25FE,
+    0xFE98FCB,
+    0xD65E2E,
+    0xFFA62F7,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFF29A1BA,
+    0xFFA62F5,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFCAC64BE,
+    0xFA67E16,
+    0xFBDBE083,
+    0xF746EA0,
+    0xFB0E4425,
+    0xF378705,
+    0xFA441FEB,
+    0xEEFF202,
+    0xF97E01AB,
+    0xE9DE1D1,
+    0xF8BC7468,
+    0xE419007,
+    0xF7FFFFF3,
+    0xDDB3D6C,
+    0xF7492887,
+    0xD6B31CB,
+    0xF6986E71,
+    0xCF1BBC4,
+    0xF5EE4DB1,
+    0xC6F308F,
+    0xF54B3DA8,
+    0xBE3EBC8,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF41C1420,
+    0xAB4C23E,
+    0xF390CF5A,
+    0xA11B233,
+    0xF30E4428,
+    0x9679173,
+    0xF294CE22,
+    0x8B6D75B,
+    0xF224C283,
+    0x7FFFFEF,
+    0xF1BE6FE9,
+    0x7438B79,
+    0xF1621E21,
+    0x681FE35,
+    0xF1100DF2,
+    0x5BBDFF4,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF08B9157,
+    0x4241F5B,
+    0xF05981E3,
+    0x3539B20,
+    0xF0326DB3,
+    0x280C156,
+    0xF0167034,
+    0x1AC25F3,
+    0xF0059D09,
+    0xD65E23,
+    0xF0000001,
+    0xFFFFFFE9,
+    0xF0059D0B,
+    0xFF29A1AE,
+    0xF0167039,
+    0xFE53D9DF,
+    0xF0326DBA,
+    0xFD7F3E7B,
+    0xF05981EC,
+    0xFCAC64B2,
+    0xF08B9163,
+    0xFBDBE078,
+    0xF0C878FF,
+    0xFB0E441A,
+    0xF1100E02,
+    0xFA441FE0,
+    0xF1621E34,
+    0xF97E01A0,
+    0xF1BE6FFE,
+    0xF8BC745E,
+    0xF224C29A,
+    0xF7FFFFE9,
+    0xF294CE3B,
+    0xF749287D,
+    0xF30E4443,
+    0xF6986E67,
+    0xF390CF78,
+    0xF5EE4DA8,
+    0xF41C1440,
+    0xF54B3DA0,
+    0xF4AFB0E2,
+    0xF4AFB0B9,
+    0xF54B3DCB,
+    0xF41C1419,
+    0xF5EE4DD6,
+    0xF390CF53,
+    0xF6986E97,
+    0xF30E4421,
+    0xF74928AF,
+    0xF294CE1B,
+    0x10000000,
+    0x0,
+    0xFF35F97,
+    0x1415E53,
+    0xFCD9249,
+    0x280C16E,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xF378708,
+    0x4F1BBD0,
+    0xEC835E6,
+    0x61F78AC,
+    0xE41900D,
+    0x7438B8D,
+    0xDA46A01,
+    0x85C2777,
+    0xCF1BBCB,
+    0x9679186,
+    0xC2A9F6E,
+    0xA6423A7,
+    0xB504F2F,
+    0xB504F37,
+    0xA64239E,
+    0xC2A9F76,
+    0x967917C,
+    0xCF1BBD1,
+    0x85C276D,
+    0xDA46A07,
+    0x7438B83,
+    0xE419012,
+    0x61F78A1,
+    0xEC835EA,
+    0x4F1BBC4,
+    0xF37870C,
+    0x3BC312A,
+    0xF8ED3C5,
+    0x280C162,
+    0xFCD924B,
+    0x1415E48,
+    0xFF35F97,
+    0x10000000,
+    0x0,
+    0xFCD9249,
+    0x280C16E,
+    0xF378708,
+    0x4F1BBD0,
+    0xE41900D,
+    0x7438B8D,
+    0xCF1BBCB,
+    0x9679186,
+    0xB504F2F,
+    0xB504F37,
+    0x967917C,
+    0xCF1BBD1,
+    0x7438B83,
+    0xE419012,
+    0x4F1BBC4,
+    0xF37870C,
+    0x280C162,
+    0xFCD924B,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFB0E4425,
+    0xF378705,
+    0xF8BC7468,
+    0xE419007,
+    0xF6986E71,
+    0xCF1BBC4,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF30E4428,
+    0x9679173,
+    0xF1BE6FE9,
+    0x7438B79,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF0326DB3,
+    0x280C156,
+    0x10000000,
+    0x0,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xE41900D,
+    0x7438B8D,
+    0xC2A9F6E,
+    0xA6423A7,
+    0x967917C,
+    0xCF1BBD1,
+    0x61F78A1,
+    0xEC835EA,
+    0x280C162,
+    0xFCD924B,
+    0xFEBEA1A1,
+    0xFF35F96,
+    0xFB0E4425,
+    0xF378705,
+    0xF7A3D87F,
+    0xDA469FB,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF25B95F3,
+    0x85C2763,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF00CA068,
+    0x1415E3C,
+    0xF0326DBA,
+    0xFD7F3E7B,
+    0xF137CA23,
+    0xF9E0873E,
+    0xF30E4443,
+    0xF6986E67,
+    0xF59BDC74,
+    0xF3D5607B,
+    0xF8BC7492,
+    0xF1BE6FE3,
+    0xFC43CEEC,
+    0xF0712C36,
+    0x10000000,
+    0x0,
+    0xF378708,
+    0x4F1BBD0,
+    0xCF1BBCB,
+    0x9679186,
+    0x967917C,
+    0xCF1BBD1,
+    0x4F1BBC4,
+    0xF37870C,
+    0x10000000,
+    0x0,
+    0xCF1BBCB,
+    0x9679186,
+    0x4F1BBC4,
+    0xF37870C,
+    0xFB0E4425,
+    0xF378705,
+    0xF30E4428,
+    0x9679173,
+    0x10000000,
+    0x0,
+    0x967917C,
+    0xCF1BBD1,
+    0xFB0E4425,
+    0xF378705,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF30E4443,
+    0xF6986E67,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x4F1BBF1,
+    0xF0C87902,
+};
+
+real_t cfft_tab_64[] =
+{
+    0x10000000,
+    0x0,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFB14BE7,
+    0x31F1708,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xEC835E6,
+    0x61F78AC,
+    0xE1C5977,
+    0x78AD751,
+    0xD4DB312,
+    0x8E39DA0,
+    0xC5E4032,
+    0xA267996,
+    0xB504F2F,
+    0xB504F37,
+    0xA26798D,
+    0xC5E4039,
+    0x8E39D96,
+    0xD4DB318,
+    0x78AD746,
+    0xE1C597C,
+    0x61F78A1,
+    0xEC835EA,
+    0x4A50182,
+    0xF4FA0AE,
+    0x31F16FD,
+    0xFB14BE9,
+    0x1917A60,
+    0xFEC46D2,
+    0x10000000,
+    0x0,
+    0xFB14BE7,
+    0x31F1708,
+    0xEC835E6,
+    0x61F78AC,
+    0xD4DB312,
+    0x8E39DA0,
+    0xB504F2F,
+    0xB504F37,
+    0x8E39D96,
+    0xD4DB318,
+    0x61F78A1,
+    0xEC835EA,
+    0x31F16FD,
+    0xFB14BE9,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xF9E08749,
+    0xEC835E1,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF137CA11,
+    0x61F7896,
+    0xF04EB414,
+    0x31F16F1,
+    0x10000000,
+    0x0,
+    0xF4FA0AB,
+    0x4A5018B,
+    0xD4DB314,
+    0x8E39D9D,
+    0xA267992,
+    0xC5E4035,
+    0x61F78A8,
+    0xEC835E7,
+    0x1917A6A,
+    0xFEC46D2,
+    0xFCE0E8F8,
+    0xFB14BE7,
+    0xF87528B1,
+    0xE1C5978,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF1E3A687,
+    0x78AD74C,
+    0xF04EB418,
+    0x31F1705,
+    0xF013B92F,
+    0xFE6E8593,
+    0xF137CA1A,
+    0xF9E08755,
+    0xF3A1BFCD,
+    0xF5D9866C,
+    0xF71C6266,
+    0xF2B24CEA,
+    0xFB5AFE78,
+    0xF0B05F54,
+    0x10000000,
+    0x0,
+    0xEC835E6,
+    0x61F78AC,
+    0xB504F2F,
+    0xB504F37,
+    0x61F78A1,
+    0xEC835EA,
+    0x10000000,
+    0x0,
+    0xB504F2F,
+    0xB504F37,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xF4AFB0C1,
+    0xB504F26,
+    0x10000000,
+    0x0,
+    0x61F78A8,
+    0xEC835E7,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF137CA1A,
+    0xF9E08755,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x3,
+    0xF0000001,
+};
+
+real_t cfft_tab_60[] =
+{
+    0x10000000,
+    0x0,
+    0xFE98FCA,
+    0x1AC260A,
+    0xFA67E18,
+    0x3539B37,
+    0xF378708,
+    0x4F1BBD0,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xDDB3D72,
+    0x8000003,
+    0xCF1BBCB,
+    0x9679186,
+    0xBE3EBD0,
+    0xAB4C24F,
+    0xAB4C246,
+    0xBE3EBD8,
+    0x967917C,
+    0xCF1BBD1,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x681FE40,
+    0xE9DE1DA,
+    0x4F1BBC4,
+    0xF37870C,
+    0x3539B2B,
+    0xFA67E1B,
+    0x1AC25FE,
+    0xFE98FCB,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFCAC64BE,
+    0xFA67E16,
+    0xFB0E4425,
+    0xF378705,
+    0xF97E01AB,
+    0xE9DE1D1,
+    0x10000000,
+    0x0,
+    0xFA67E18,
+    0x3539B37,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xCF1BBCB,
+    0x9679186,
+    0xAB4C246,
+    0xBE3EBD8,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x4F1BBC4,
+    0xF37870C,
+    0x1AC25FE,
+    0xFE98FCB,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFB0E4425,
+    0xF378705,
+    0xF7FFFFF3,
+    0xDDB3D6C,
+    0xF54B3DA8,
+    0xBE3EBC8,
+    0xF30E4428,
+    0x9679173,
+    0xF1621E21,
+    0x681FE35,
+    0xF05981E3,
+    0x3539B20,
+    0xF0000001,
+    0xFFFFFFE9,
+    0xF05981EC,
+    0xFCAC64B2,
+    0xF1621E34,
+    0xF97E01A0,
+    0xF30E4443,
+    0xF6986E67,
+    0xF54B3DCB,
+    0xF41C1419,
+    0x10000000,
+    0x0,
+    0xF378708,
+    0x4F1BBD0,
+    0xCF1BBCB,
+    0x9679186,
+    0x967917C,
+    0xCF1BBD1,
+    0x4F1BBC4,
+    0xF37870C,
+    0x10000000,
+    0x0,
+    0xCF1BBCB,
+    0x9679186,
+    0x4F1BBC4,
+    0xF37870C,
+    0xFB0E4425,
+    0xF378705,
+    0xF30E4428,
+    0x9679173,
+    0x10000000,
+    0x0,
+    0x967917C,
+    0xCF1BBD1,
+    0xFB0E4425,
+    0xF378705,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF30E4443,
+    0xF6986E67,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x4F1BBF1,
+    0xF0C87902,
+};
+
+#ifdef LD_DEC
+
+real_t cfft_tab_256[] =
+{
+    0x10000000,
+    0x0,
+    0xFFEC430,
+    0x648558,
+    0xFFB10F1,
+    0xC8FB2F,
+    0xFF4E6D6,
+    0x12D5209,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFE13238,
+    0x1F564E6,
+    0xFD3AABF,
+    0x259020E,
+    0xFC3B27D,
+    0x2BC4289,
+    0xFB14BE7,
+    0x31F1708,
+    0xF9C79D5,
+    0x381704E,
+    0xF853F7D,
+    0x3E33F31,
+    0xF6BA073,
+    0x444749A,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xF314475,
+    0x504D727,
+    0xF109081,
+    0x563E69F,
+    0xEED89DA,
+    0x5C2214E,
+    0xEC835E6,
+    0x61F78AC,
+    0xEA09A67,
+    0x67BDE53,
+    0xE76BD78,
+    0x6D74405,
+    0xE4AA58F,
+    0x7319BA9,
+    0xE1C5977,
+    0x78AD751,
+    0xDEBE054,
+    0x7E2E93A,
+    0xDB941A0,
+    0x839C3D0,
+    0xD848529,
+    0x88F59AD,
+    0xD4DB312,
+    0x8E39DA0,
+    0xD14D3CD,
+    0x93682AA,
+    0xCD9F021,
+    0x987FC02,
+    0xC9D1121,
+    0x9D7FD18,
+    0xC5E4032,
+    0xA267996,
+    0xC1D8702,
+    0xA736561,
+    0xBDAEF8D,
+    0xABEB49E,
+    0xB968418,
+    0xB085BAE,
+    0xB504F2F,
+    0xB504F37,
+    0xB085BA6,
+    0xB968420,
+    0xABEB495,
+    0xBDAEF95,
+    0xA736559,
+    0xC1D870A,
+    0xA26798D,
+    0xC5E4039,
+    0x9D7FD0F,
+    0xC9D1128,
+    0x987FBF8,
+    0xCD9F028,
+    0x93682A0,
+    0xD14D3D4,
+    0x8E39D96,
+    0xD4DB318,
+    0x88F59A3,
+    0xD848530,
+    0x839C3C5,
+    0xDB941A6,
+    0x7E2E930,
+    0xDEBE05A,
+    0x78AD746,
+    0xE1C597C,
+    0x7319B9E,
+    0xE4AA594,
+    0x6D743FA,
+    0xE76BD7D,
+    0x67BDE49,
+    0xEA09A6C,
+    0x61F78A1,
+    0xEC835EA,
+    0x5C22143,
+    0xEED89DE,
+    0x563E694,
+    0xF109085,
+    0x504D71C,
+    0xF314479,
+    0x4A50182,
+    0xF4FA0AE,
+    0x444748F,
+    0xF6BA076,
+    0x3E33F25,
+    0xF853F80,
+    0x3817043,
+    0xF9C79D8,
+    0x31F16FD,
+    0xFB14BE9,
+    0x2BC427E,
+    0xFC3B27F,
+    0x2590203,
+    0xFD3AAC1,
+    0x1F564DA,
+    0xFE13239,
+    0x1917A60,
+    0xFEC46D2,
+    0x12D51FE,
+    0xFF4E6D7,
+    0xC8FB24,
+    0xFFB10F2,
+    0x64854C,
+    0xFFEC430,
+    0x10000000,
+    0x0,
+    0xFFB10F1,
+    0xC8FB2F,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFD3AABF,
+    0x259020E,
+    0xFB14BE7,
+    0x31F1708,
+    0xF853F7D,
+    0x3E33F31,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xF109081,
+    0x563E69F,
+    0xEC835E6,
+    0x61F78AC,
+    0xE76BD78,
+    0x6D74405,
+    0xE1C5977,
+    0x78AD751,
+    0xDB941A0,
+    0x839C3D0,
+    0xD4DB312,
+    0x8E39DA0,
+    0xCD9F021,
+    0x987FC02,
+    0xC5E4032,
+    0xA267996,
+    0xBDAEF8D,
+    0xABEB49E,
+    0xB504F2F,
+    0xB504F37,
+    0xABEB495,
+    0xBDAEF95,
+    0xA26798D,
+    0xC5E4039,
+    0x987FBF8,
+    0xCD9F028,
+    0x8E39D96,
+    0xD4DB318,
+    0x839C3C5,
+    0xDB941A6,
+    0x78AD746,
+    0xE1C597C,
+    0x6D743FA,
+    0xE76BD7D,
+    0x61F78A1,
+    0xEC835EA,
+    0x563E694,
+    0xF109085,
+    0x4A50182,
+    0xF4FA0AE,
+    0x3E33F25,
+    0xF853F80,
+    0x31F16FD,
+    0xFB14BE9,
+    0x2590203,
+    0xFD3AAC1,
+    0x1917A60,
+    0xFEC46D2,
+    0xC8FB24,
+    0xFFB10F2,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFF3704C5,
+    0xFFB10F1,
+    0xFE6E8588,
+    0xFEC46D0,
+    0xFDA6FDE6,
+    0xFD3AABD,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xFC1CC0C4,
+    0xF853F7A,
+    0xFB5AFE67,
+    0xF4FA0A7,
+    0xFA9C1956,
+    0xF10907D,
+    0xF9E08749,
+    0xEC835E1,
+    0xF928BBF0,
+    0xE76BD73,
+    0xF87528A5,
+    0xE1C5971,
+    0xF7C63C26,
+    0xDB9419A,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF67803F5,
+    0xCD9F01A,
+    0xF5D98661,
+    0xC5E402A,
+    0xF5414B59,
+    0xBDAEF85,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF4251063,
+    0xABEB48C,
+    0xF3A1BFBF,
+    0xA267984,
+    0xF3260FD1,
+    0x987FBEF,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF246BE54,
+    0x839C3BB,
+    0xF1E3A67E,
+    0x78AD73C,
+    0xF189427E,
+    0x6D743F0,
+    0xF137CA11,
+    0x61F7896,
+    0xF0EF6F77,
+    0x563E689,
+    0xF0B05F4F,
+    0x4A50177,
+    0xF07AC07D,
+    0x3E33F1A,
+    0xF04EB414,
+    0x31F16F1,
+    0xF02C553E,
+    0x25901F7,
+    0xF013B92C,
+    0x1917A55,
+    0xF004EF0E,
+    0xC8FB18,
+    0x10000000,
+    0x0,
+    0xFF4E6D6,
+    0x12D5209,
+    0xFD3AABF,
+    0x259020D,
+    0xF9C79D6,
+    0x381704D,
+    0xF4FA0AB,
+    0x4A5018B,
+    0xEED89DB,
+    0x5C2214C,
+    0xE76BD79,
+    0x6D74402,
+    0xDEBE056,
+    0x7E2E937,
+    0xD4DB314,
+    0x8E39D9D,
+    0xC9D1124,
+    0x9D7FD14,
+    0xBDAEF90,
+    0xABEB49A,
+    0xB085BAA,
+    0xB96841C,
+    0xA267992,
+    0xC5E4035,
+    0x93682A5,
+    0xD14D3D0,
+    0x839C3CB,
+    0xDB941A2,
+    0x7319BA5,
+    0xE4AA590,
+    0x61F78A8,
+    0xEC835E7,
+    0x504D724,
+    0xF314476,
+    0x3E33F2E,
+    0xF853F7E,
+    0x2BC4287,
+    0xFC3B27D,
+    0x1917A6A,
+    0xFEC46D2,
+    0x648556,
+    0xFFEC430,
+    0xFF3704D0,
+    0xFFB10F1,
+    0xFE0A9B1A,
+    0xFE13238,
+    0xFCE0E8F8,
+    0xFB14BE7,
+    0xFBBB8B67,
+    0xF6BA073,
+    0xFA9C1962,
+    0xF109082,
+    0xF98421AE,
+    0xEA09A68,
+    0xF87528B1,
+    0xE1C5978,
+    0xF770A655,
+    0xD84852B,
+    0xF6780401,
+    0xCD9F023,
+    0xF58C9AA1,
+    0xC1D8704,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF3E278F9,
+    0xA73655C,
+    0xF3260FDC,
+    0x987FBFD,
+    0xF27B7AD4,
+    0x88F59A8,
+    0xF1E3A687,
+    0x78AD74C,
+    0xF15F6597,
+    0x67BDE4F,
+    0xF0EF6F7D,
+    0x563E69B,
+    0xF0945F8C,
+    0x4447496,
+    0xF04EB418,
+    0x31F1705,
+    0xF01ECDC8,
+    0x1F564E3,
+    0xF004EF0F,
+    0xC8FB2D,
+    0xF0013BD0,
+    0xFF9B7AA6,
+    0xF013B92F,
+    0xFE6E8593,
+    0xF03C4D84,
+    0xFD43BD76,
+    0xF07AC083,
+    0xFC1CC0CF,
+    0xF0CEBB8B,
+    0xFAFB28D9,
+    0xF137CA1A,
+    0xF9E08755,
+    0xF1B55A71,
+    0xF8CE6458,
+    0xF246BE5F,
+    0xF7C63C32,
+    0xF2EB2C32,
+    0xF6C97D58,
+    0xF3A1BFCD,
+    0xF5D9866C,
+    0xF4697BE6,
+    0xF4F7A454,
+    0xF5414B68,
+    0xF425106D,
+    0xF62802EE,
+    0xF362EEDA,
+    0xF71C6266,
+    0xF2B24CEA,
+    0xF81D16CC,
+    0xF2141FA9,
+    0xF928BC01,
+    0xF1894285,
+    0xFA3DDEB7,
+    0xF1127624,
+    0xFB5AFE78,
+    0xF0B05F54,
+    0xFC7E8FB6,
+    0xF063862A,
+    0xFDA6FDF6,
+    0xF02C5541,
+    0xFED2ADFA,
+    0xF00B192A,
+    0x10000000,
+    0x0,
+    0xFEC46D1,
+    0x1917A6C,
+    0xFB14BE7,
+    0x31F1708,
+    0xF4FA0AA,
+    0x4A5018D,
+    0xEC835E6,
+    0x61F78AC,
+    0xE1C5977,
+    0x78AD751,
+    0xD4DB312,
+    0x8E39DA0,
+    0xC5E4032,
+    0xA267996,
+    0xB504F2F,
+    0xB504F37,
+    0xA26798D,
+    0xC5E4039,
+    0x8E39D96,
+    0xD4DB318,
+    0x78AD746,
+    0xE1C597C,
+    0x61F78A1,
+    0xEC835EA,
+    0x4A50182,
+    0xF4FA0AE,
+    0x31F16FD,
+    0xFB14BE9,
+    0x1917A60,
+    0xFEC46D2,
+    0x10000000,
+    0x0,
+    0xFB14BE7,
+    0x31F1708,
+    0xEC835E6,
+    0x61F78AC,
+    0xD4DB312,
+    0x8E39DA0,
+    0xB504F2F,
+    0xB504F37,
+    0x8E39D96,
+    0xD4DB318,
+    0x61F78A1,
+    0xEC835EA,
+    0x31F16FD,
+    0xFB14BE9,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFCE0E8EC,
+    0xFB14BE5,
+    0xF9E08749,
+    0xEC835E1,
+    0xF71C6256,
+    0xD4DB30B,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF2B24CE1,
+    0x8E39D8C,
+    0xF137CA11,
+    0x61F7896,
+    0xF04EB414,
+    0x31F16F1,
+    0x10000000,
+    0x0,
+    0xF4FA0AB,
+    0x4A5018B,
+    0xD4DB314,
+    0x8E39D9D,
+    0xA267992,
+    0xC5E4035,
+    0x61F78A8,
+    0xEC835E7,
+    0x1917A6A,
+    0xFEC46D2,
+    0xFCE0E8F8,
+    0xFB14BE7,
+    0xF87528B1,
+    0xE1C5978,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF1E3A687,
+    0x78AD74C,
+    0xF04EB418,
+    0x31F1705,
+    0xF013B92F,
+    0xFE6E8593,
+    0xF137CA1A,
+    0xF9E08755,
+    0xF3A1BFCD,
+    0xF5D9866C,
+    0xF71C6266,
+    0xF2B24CEA,
+    0xFB5AFE78,
+    0xF0B05F54,
+    0x10000000,
+    0x0,
+    0xEC835E6,
+    0x61F78AC,
+    0xB504F2F,
+    0xB504F37,
+    0x61F78A1,
+    0xEC835EA,
+    0x10000000,
+    0x0,
+    0xB504F2F,
+    0xB504F37,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xF4AFB0C1,
+    0xB504F26,
+    0x10000000,
+    0x0,
+    0x61F78A8,
+    0xEC835E7,
+    0xF4AFB0CC,
+    0xB504F32,
+    0xF137CA1A,
+    0xF9E08755,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x3,
+    0xF0000001,
+};
+
+real_t cfft_tab_240[] =
+{
+    0x10000000,
+    0x0,
+    0xFFE98AD,
+    0x6B3885,
+    0xFFA62F6,
+    0xD65E3A,
+    0xFF35F97,
+    0x1415E53,
+    0xFE98FCA,
+    0x1AC260A,
+    0xFDCF549,
+    0x216A2A2,
+    0xFCD9249,
+    0x280C16E,
+    0xFBB697F,
+    0x2EA6FCD,
+    0xFA67E18,
+    0x3539B37,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xF746EA3,
+    0x4241F72,
+    0xF57535C,
+    0x48B53AE,
+    0xF378708,
+    0x4F1BBD0,
+    0xF150F3D,
+    0x55745DE,
+    0xEEFF206,
+    0x5BBE00A,
+    0xEC835E6,
+    0x61F78AC,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xE70FD42,
+    0x6E35F9D,
+    0xE41900D,
+    0x7438B8D,
+    0xE0FA286,
+    0x7A2713C,
+    0xDDB3D72,
+    0x8000003,
+    0xDA46A01,
+    0x85C2777,
+    0xD6B31D1,
+    0x8B6D76F,
+    0xD2F9EEE,
+    0x9100000,
+    0xCF1BBCB,
+    0x9679186,
+    0xCB19342,
+    0x9BD7CA3,
+    0xC6F3097,
+    0xA11B246,
+    0xC2A9F6E,
+    0xA6423A7,
+    0xBE3EBD0,
+    0xAB4C24F,
+    0xB9B2224,
+    0xB03801A,
+    0xB504F2F,
+    0xB504F37,
+    0xB038012,
+    0xB9B222C,
+    0xAB4C246,
+    0xBE3EBD8,
+    0xA64239E,
+    0xC2A9F76,
+    0xA11B23C,
+    0xC6F309E,
+    0x9BD7C9A,
+    0xCB19349,
+    0x967917C,
+    0xCF1BBD1,
+    0x90FFFF6,
+    0xD2F9EF5,
+    0x8B6D765,
+    0xD6B31D8,
+    0x85C276D,
+    0xDA46A07,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x7A27132,
+    0xE0FA28C,
+    0x7438B83,
+    0xE419012,
+    0x6E35F92,
+    0xE70FD48,
+    0x681FE40,
+    0xE9DE1DA,
+    0x61F78A1,
+    0xEC835EA,
+    0x5BBDFFF,
+    0xEEFF20A,
+    0x55745D3,
+    0xF150F41,
+    0x4F1BBC4,
+    0xF37870C,
+    0x48B53A3,
+    0xF57535F,
+    0x4241F66,
+    0xF746EA6,
+    0x3BC312A,
+    0xF8ED3C5,
+    0x3539B2B,
+    0xFA67E1B,
+    0x2EA6FC2,
+    0xFBB6981,
+    0x280C162,
+    0xFCD924B,
+    0x216A297,
+    0xFDCF54A,
+    0x1AC25FE,
+    0xFE98FCB,
+    0x1415E48,
+    0xFF35F97,
+    0xD65E2E,
+    0xFFA62F7,
+    0x6B3879,
+    0xFFE98AE,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFF94C770,
+    0xFFE98AD,
+    0xFF29A1BA,
+    0xFFA62F5,
+    0xFEBEA1A1,
+    0xFF35F96,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFDE95D52,
+    0xFDCF547,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFD159027,
+    0xFBB697D,
+    0xFCAC64BE,
+    0xFA67E16,
+    0xFC43CEBF,
+    0xF8ED3BF,
+    0xFBDBE083,
+    0xF746EA0,
+    0xFB74AC47,
+    0xF575358,
+    0xFB0E4425,
+    0xF378705,
+    0xFAA8BA17,
+    0xF150F39,
+    0xFA441FEB,
+    0xEEFF202,
+    0xF9E08749,
+    0xEC835E1,
+    0xF97E01AB,
+    0xE9DE1D1,
+    0xF91CA058,
+    0xE70FD3D,
+    0xF8BC7468,
+    0xE419007,
+    0xF85D8EBA,
+    0xE0FA281,
+    0x10000000,
+    0x0,
+    0xFFA62F6,
+    0xD65E3A,
+    0xFE98FCA,
+    0x1AC260A,
+    0xFCD9249,
+    0x280C16E,
+    0xFA67E18,
+    0x3539B37,
+    0xF746EA3,
+    0x4241F72,
+    0xF378708,
+    0x4F1BBD0,
+    0xEEFF206,
+    0x5BBE00A,
+    0xE9DE1D6,
+    0x681FE4B,
+    0xE41900D,
+    0x7438B8D,
+    0xDDB3D72,
+    0x8000003,
+    0xD6B31D1,
+    0x8B6D76F,
+    0xCF1BBCB,
+    0x9679186,
+    0xC6F3097,
+    0xA11B246,
+    0xBE3EBD0,
+    0xAB4C24F,
+    0xB504F2F,
+    0xB504F37,
+    0xAB4C246,
+    0xBE3EBD8,
+    0xA11B23C,
+    0xC6F309E,
+    0x967917C,
+    0xCF1BBD1,
+    0x8B6D765,
+    0xD6B31D8,
+    0x7FFFFF9,
+    0xDDB3D78,
+    0x7438B83,
+    0xE419012,
+    0x681FE40,
+    0xE9DE1DA,
+    0x5BBDFFF,
+    0xEEFF20A,
+    0x4F1BBC4,
+    0xF37870C,
+    0x4241F66,
+    0xF746EA6,
+    0x3539B2B,
+    0xFA67E1B,
+    0x280C162,
+    0xFCD924B,
+    0x1AC25FE,
+    0xFE98FCB,
+    0xD65E2E,
+    0xFFA62F7,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFF29A1BA,
+    0xFFA62F5,
+    0xFE53D9EA,
+    0xFE98FC9,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFCAC64BE,
+    0xFA67E16,
+    0xFBDBE083,
+    0xF746EA0,
+    0xFB0E4425,
+    0xF378705,
+    0xFA441FEB,
+    0xEEFF202,
+    0xF97E01AB,
+    0xE9DE1D1,
+    0xF8BC7468,
+    0xE419007,
+    0xF7FFFFF3,
+    0xDDB3D6C,
+    0xF7492887,
+    0xD6B31CB,
+    0xF6986E71,
+    0xCF1BBC4,
+    0xF5EE4DB1,
+    0xC6F308F,
+    0xF54B3DA8,
+    0xBE3EBC8,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF41C1420,
+    0xAB4C23E,
+    0xF390CF5A,
+    0xA11B233,
+    0xF30E4428,
+    0x9679173,
+    0xF294CE22,
+    0x8B6D75B,
+    0xF224C283,
+    0x7FFFFEF,
+    0xF1BE6FE9,
+    0x7438B79,
+    0xF1621E21,
+    0x681FE35,
+    0xF1100DF2,
+    0x5BBDFF4,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF08B9157,
+    0x4241F5B,
+    0xF05981E3,
+    0x3539B20,
+    0xF0326DB3,
+    0x280C156,
+    0xF0167034,
+    0x1AC25F3,
+    0xF0059D09,
+    0xD65E23,
+    0xF0000001,
+    0xFFFFFFE9,
+    0xF0059D0B,
+    0xFF29A1AE,
+    0xF0167039,
+    0xFE53D9DF,
+    0xF0326DBA,
+    0xFD7F3E7B,
+    0xF05981EC,
+    0xFCAC64B2,
+    0xF08B9163,
+    0xFBDBE078,
+    0xF0C878FF,
+    0xFB0E441A,
+    0xF1100E02,
+    0xFA441FE0,
+    0xF1621E34,
+    0xF97E01A0,
+    0xF1BE6FFE,
+    0xF8BC745E,
+    0xF224C29A,
+    0xF7FFFFE9,
+    0xF294CE3B,
+    0xF749287D,
+    0xF30E4443,
+    0xF6986E67,
+    0xF390CF78,
+    0xF5EE4DA8,
+    0xF41C1440,
+    0xF54B3DA0,
+    0xF4AFB0E2,
+    0xF4AFB0B9,
+    0xF54B3DCB,
+    0xF41C1419,
+    0xF5EE4DD6,
+    0xF390CF53,
+    0xF6986E97,
+    0xF30E4421,
+    0xF74928AF,
+    0xF294CE1B,
+    0x10000000,
+    0x0,
+    0xFF35F97,
+    0x1415E53,
+    0xFCD9249,
+    0x280C16E,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xF378708,
+    0x4F1BBD0,
+    0xEC835E6,
+    0x61F78AC,
+    0xE41900D,
+    0x7438B8D,
+    0xDA46A01,
+    0x85C2777,
+    0xCF1BBCB,
+    0x9679186,
+    0xC2A9F6E,
+    0xA6423A7,
+    0xB504F2F,
+    0xB504F37,
+    0xA64239E,
+    0xC2A9F76,
+    0x967917C,
+    0xCF1BBD1,
+    0x85C276D,
+    0xDA46A07,
+    0x7438B83,
+    0xE419012,
+    0x61F78A1,
+    0xEC835EA,
+    0x4F1BBC4,
+    0xF37870C,
+    0x3BC312A,
+    0xF8ED3C5,
+    0x280C162,
+    0xFCD924B,
+    0x1415E48,
+    0xFF35F97,
+    0x10000000,
+    0x0,
+    0xFCD9249,
+    0x280C16E,
+    0xF378708,
+    0x4F1BBD0,
+    0xE41900D,
+    0x7438B8D,
+    0xCF1BBCB,
+    0x9679186,
+    0xB504F2F,
+    0xB504F37,
+    0x967917C,
+    0xCF1BBD1,
+    0x7438B83,
+    0xE419012,
+    0x4F1BBC4,
+    0xF37870C,
+    0x280C162,
+    0xFCD924B,
+    0xFFFFFFF5,
+    0xFFFFFFF,
+    0xFD7F3E87,
+    0xFCD9248,
+    0xFB0E4425,
+    0xF378705,
+    0xF8BC7468,
+    0xE419007,
+    0xF6986E71,
+    0xCF1BBC4,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF30E4428,
+    0x9679173,
+    0xF1BE6FE9,
+    0x7438B79,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF0326DB3,
+    0x280C156,
+    0x10000000,
+    0x0,
+    0xF8ED3C2,
+    0x3BC3136,
+    0xE41900D,
+    0x7438B8D,
+    0xC2A9F6E,
+    0xA6423A7,
+    0x967917C,
+    0xCF1BBD1,
+    0x61F78A1,
+    0xEC835EA,
+    0x280C162,
+    0xFCD924B,
+    0xFEBEA1A1,
+    0xFF35F96,
+    0xFB0E4425,
+    0xF378705,
+    0xF7A3D87F,
+    0xDA469FB,
+    0xF4AFB0C1,
+    0xB504F26,
+    0xF25B95F3,
+    0x85C2763,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF00CA068,
+    0x1415E3C,
+    0xF0326DBA,
+    0xFD7F3E7B,
+    0xF137CA23,
+    0xF9E0873E,
+    0xF30E4443,
+    0xF6986E67,
+    0xF59BDC74,
+    0xF3D5607B,
+    0xF8BC7492,
+    0xF1BE6FE3,
+    0xFC43CEEC,
+    0xF0712C36,
+    0x10000000,
+    0x0,
+    0xF378708,
+    0x4F1BBD0,
+    0xCF1BBCB,
+    0x9679186,
+    0x967917C,
+    0xCF1BBD1,
+    0x4F1BBC4,
+    0xF37870C,
+    0x10000000,
+    0x0,
+    0xCF1BBCB,
+    0x9679186,
+    0x4F1BBC4,
+    0xF37870C,
+    0xFB0E4425,
+    0xF378705,
+    0xF30E4428,
+    0x9679173,
+    0x10000000,
+    0x0,
+    0x967917C,
+    0xCF1BBD1,
+    0xFB0E4425,
+    0xF378705,
+    0xF0C878F0,
+    0x4F1BBB9,
+    0xF30E4443,
+    0xF6986E67,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x10000000,
+    0x0,
+    0x4F1BBF1,
+    0xF0C87902,
+};
+
+#endif
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- a/libfaad/common.h
+++ b/libfaad/common.h
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: common.h,v 1.20 2002/09/08 18:14:37 menno Exp $
+** $Id: common.h,v 1.21 2002/09/13 13:08:45 menno Exp $
 **/
 
 #ifndef __COMMON_H__
@@ -88,7 +88,9 @@
 typedef __int32 int32_t;
 typedef __int16 int16_t;
 typedef __int8  int8_t;
+#ifndef FIXED_POINT
 typedef float float32_t;
+#endif
 
 
 #elif defined(LINUX) || defined(DJGPP)
@@ -105,8 +107,10 @@
 typedef long int32_t;
 typedef short int16_t;
 typedef char int8_t;
+#ifndef FIXED_POINT
 typedef float float32_t;
 #endif
+#endif
 
 
 #else /* Some other OS */
@@ -175,8 +179,8 @@
 #ifdef HAVE_LOGF
 #  define log logf
 #endif
-#ifdef HAVE_EXPF
-#  define exp expf
+#ifdef HAVE_POWF
+#  define pow powf
 #endif
 #ifdef HAVE_FLOORF
 #  define floor floorf
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: decoder.c,v 1.32 2002/09/08 18:14:37 menno Exp $
+** $Id: decoder.c,v 1.33 2002/09/13 13:08:45 menno Exp $
 **/
 
 #include <stdlib.h>
@@ -248,8 +248,10 @@
     if (can_decode_ot(hDecoder->object_type) < 0)
         return -1;
 
+#ifndef FIXED_POINT
     if (hDecoder->config.outputFormat > 5)
         Init_Dither(16, hDecoder->config.outputFormat - 5);
+#endif
 
     return bits;
 }
@@ -298,8 +300,10 @@
         hDecoder->frameLength >>= 1;
 #endif
 
+#ifndef FIXED_POINT
     if (hDecoder->config.outputFormat > 5)
         Init_Dither(16, hDecoder->config.outputFormat - 5);
+#endif
 
     return 0;
 }
@@ -624,7 +628,7 @@
     hInfo->channels = channels;
 
     if (hDecoder->sample_buffer == NULL)
-        hDecoder->sample_buffer = malloc(frame_len*channels*sizeof(float32_t));
+        hDecoder->sample_buffer = malloc(frame_len*channels*sizeof(real_t));
 
     sample_buffer = hDecoder->sample_buffer;
 
--- a/libfaad/dither.c
+++ b/libfaad/dither.c
@@ -5,9 +5,13 @@
  * mostly lifted from work by Frank Klemm
  * random functions for dithering.
  *
- * last modified: $ID:$
+ * last modified:
+ * $Id: dither.c,v 1.4 2002/09/13 13:08:45 menno Exp $
  */
 #include "common.h"
+
+#ifndef FIXED_POINT
+
 #include <memory.h>
 #include "dither.h"
 
@@ -181,5 +185,4 @@
 	Dither.Dither = 0.01*default_dither[index] / (((int64_t)1) << bits);
 }
 
-
-
+#endif
--- a/libfaad/dither.h
+++ b/libfaad/dither.h
@@ -17,6 +17,8 @@
 extern "C" {
 #endif 
 
+#ifndef FIXED_POINT
+
 typedef struct {
     const float32_t*  FilterCoeff;
     uint64_t          Mask;
@@ -35,6 +37,8 @@
 extern double              Random_Equi ( double mult );
 extern double              Random_Triangular ( double mult );
 void                       Init_Dither ( unsigned char bits, unsigned char shapingtype );
+
+#endif
 
 #ifdef __cplusplus
 }
--- a/libfaad/mdct.c
+++ b/libfaad/mdct.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: mdct.c,v 1.19 2002/09/08 18:14:37 menno Exp $
+** $Id: mdct.c,v 1.20 2002/09/13 13:08:45 menno Exp $
 **/
 
 /*
@@ -43,12 +43,58 @@
 #include "cfft.h"
 #include "mdct.h"
 
+/* const_tab[]:
+    0: sqrt(2 / N)
+    1: cos(2 * PI / N)
+    2: sin(2 * PI / N)
+    3: cos(2 * PI * (1/8) / N)
+    4: sin(2 * PI * (1/8) / N)
+ */
+#ifdef FIXED_POINT
+real_t const_tab[][5] =
+{
+    { 0x800000, 0xFFFFB10, 0xC90FC, 0xFFFFFF0, 0x1921F }, /* 2048 */
+    { 0x8432A5, 0xFFFFA60, 0xD6773, 0xFFFFFF0, 0x1ACEE }, /* 1920 */
+    { 0xB504F3, 0xFFFEC40, 0x1921F1, 0xFFFFFB0, 0x3243F }, /* 1024 */
+    { 0xBAF4BA, 0xFFFE990, 0x1ACEDD, 0xFFFFFA0, 0x359DD }, /* 960 */
+    { 0x16A09E6, 0xFFEC430, 0x648558, 0xFFFFB10, 0xC90FC }, /* 256 */
+    { 0x175E974, 0xFFE98B0, 0x6B3885, 0xFFFFA60, 0xD6773 }  /* 240 */
+};
+#else
+#ifdef _MSC_VER
+#pragma warning(disable:4305)
+#pragma warning(disable:4244)
+#endif
+real_t const_tab[][5] =
+{
+    { 0.0312500000, 0.9999952938, 0.0030679568, 0.9999999265, 0.0003834952 }, /* 2048 */
+    { 0.0322748612, 0.9999946356, 0.0032724866, 0.9999999404, 0.0004090615 }, /* 1920 */
+    { 0.0441941738, 0.9999811649, 0.0061358847, 0.9999997020, 0.0007669903 }, /* 1024 */
+    { 0.0456435465, 0.9999786019, 0.0065449383, 0.9999996424, 0.0008181230 }, /* 960 */
+    { 0.0883883476, 0.9996988177, 0.0245412290, 0.9999952912, 0.0030679568 }, /* 256 */
+    { 0.0912870929, 0.9996573329, 0.0261769500, 0.9999946356, 0.0032724866 }  /* 240 */
+};
+#endif
 
+uint8_t map_N_to_idx(uint16_t N)
+{
+    switch(N)
+    {
+    case 2048: return 0;
+    case 1920: return 1;
+    case 1024: return 2;
+    case 960:  return 3;
+    case 256:  return 4;
+    case 240:  return 5;
+    }
+    return 0;
+}
+
 mdct_info *faad_mdct_init(uint16_t N)
 {
-    uint16_t k;
+    uint16_t k, N_idx;
     real_t cangle, sangle, c, s, cold;
-	real_t scale = COEF_CONST(sqrt(2.0/(float32_t)N));
+	real_t scale;
 
     mdct_info *mdct = (mdct_info*)malloc(sizeof(mdct_info));
 
@@ -59,10 +105,13 @@
     mdct->Z1 = (real_t*)malloc(N/2*sizeof(real_t));
     mdct->Z2 = (complex_t*)malloc(N/4*sizeof(complex_t));
 
-    cangle = COEF_CONST(cos(2.0 * M_PI / (float32_t)N));
-    sangle = COEF_CONST(sin(2.0 * M_PI / (float32_t)N));
-    c = COEF_CONST(cos(2.0 * M_PI * 0.125 / (float32_t)N));
-    s = COEF_CONST(sin(2.0 * M_PI * 0.125 / (float32_t)N));
+    N_idx = map_N_to_idx(N);
+
+    scale = const_tab[N_idx][0];
+    cangle = const_tab[N_idx][1];
+    sangle = const_tab[N_idx][2];
+    c = const_tab[N_idx][3];
+    s = const_tab[N_idx][4];
 
     for (k = 0; k < N/4; k++)
     {
--- a/libfaad/output.c
+++ b/libfaad/output.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: output.c,v 1.12 2002/08/26 19:08:39 menno Exp $
+** $Id: output.c,v 1.13 2002/09/13 13:08:45 menno Exp $
 **/
 
 #include "common.h"
@@ -23,6 +23,9 @@
 
 #include "output.h"
 #include "decoder.h"
+
+#ifndef FIXED_POINT
+
 #include "dither.h"
 
 
@@ -40,8 +43,6 @@
 dither_t Dither;
 double doubletmp;
 
-
-#ifndef FIXED_POINT
 void* output_to_PCM(real_t **input, void *sample_buffer, uint8_t channels,
                     uint16_t frame_len, uint8_t format)
 {
@@ -149,32 +150,8 @@
 
     return sample_buffer;
 }
-#else
-void* output_to_PCM(real_t **input, void *sample_buffer, uint8_t channels,
-                    uint16_t frame_len, uint8_t format)
-{
-    uint8_t ch;
-    uint16_t i;
-    int16_t *short_sample_buffer = (int16_t*)sample_buffer;
 
-    /* Copy output to a standard PCM buffer */
-    for (ch = 0; ch < channels; ch++)
-    {
-        for(i = 0; i < frame_len; i++)
-        {
-            int32_t tmp = input[ch][i];
-            tmp += (1 << (REAL_BITS-1));
-            tmp >>= REAL_BITS;
-            if (tmp > 0x7fff)       tmp = 0x7fff;
-            else if (tmp <= -32768) tmp = -32768;
-            short_sample_buffer[(i*channels)+ch] = (int16_t)tmp;
-        }
-    }
 
-    return sample_buffer;
-}
-#endif
-
 /* Dither output */
 static int64_t dither_output(uint8_t dithering, uint8_t shapingtype, uint16_t i, double Sum, uint8_t k)
 {
@@ -201,3 +178,31 @@
     else
         return ROUND64 (Sum);
 }
+
+#else
+
+void* output_to_PCM(real_t **input, void *sample_buffer, uint8_t channels,
+                    uint16_t frame_len, uint8_t format)
+{
+    uint8_t ch;
+    uint16_t i;
+    int16_t *short_sample_buffer = (int16_t*)sample_buffer;
+
+    /* Copy output to a standard PCM buffer */
+    for (ch = 0; ch < channels; ch++)
+    {
+        for(i = 0; i < frame_len; i++)
+        {
+            int32_t tmp = input[ch][i];
+            tmp += (1 << (REAL_BITS-1));
+            tmp >>= REAL_BITS;
+            if (tmp > 0x7fff)       tmp = 0x7fff;
+            else if (tmp <= -32768) tmp = -32768;
+            short_sample_buffer[(i*channels)+ch] = (int16_t)tmp;
+        }
+    }
+
+    return sample_buffer;
+}
+
+#endif
--- a/libfaad/pns.c
+++ b/libfaad/pns.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: pns.c,v 1.16 2002/09/08 18:14:37 menno Exp $
+** $Id: pns.c,v 1.17 2002/09/13 13:08:45 menno Exp $
 **/
 
 #include "common.h"
@@ -63,6 +63,7 @@
         root = root >> 1;                             \
     }
 
+/* fixed point square root approximation */
 real_t fp_sqrt(real_t value)
 {
     real_t root = 0;
@@ -102,9 +103,8 @@
 #ifndef FIXED_POINT
     uint16_t i;
     real_t energy = 0.0;
-    int32_t exp, frac;
 
-    real_t scale = 1.0/(float32_t)size * ISQRT_MEAN_NRG;
+    real_t scale = 1.0/(real_t)size * ISQRT_MEAN_NRG;
 
     for (i = 0; i < size; i++)
     {
@@ -127,7 +127,7 @@
     for (i = 0; i < size; i++)
     {
         real_t tmp = ISQRT_MEAN_NRG * random2();
-        tmp = MUL_C_C(COEF_CONST(1.0)/size, tmp);
+        tmp = MUL_C_C(COEF_CONST(1)/size, tmp);
 
         energy += MUL_C_C(tmp,tmp);
 
--- a/libfaad/tns.c
+++ b/libfaad/tns.c
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software 
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: tns.c,v 1.15 2002/08/27 10:24:57 menno Exp $
+** $Id: tns.c,v 1.16 2002/09/13 13:08:45 menno Exp $
 **/
 
 #include "common.h"
@@ -24,7 +24,71 @@
 #include "syntax.h"
 #include "tns.h"
 
+#ifdef FIXED_POINT
+static real_t tns_coef_0_3[] =
+{
+    0x0, 0x6F13013, 0xC8261BA, 0xF994E02,
+    0xF03E3A3A, 0xF224C28C, 0xF5B72457, 0xFA8715E3,
+    0xF90ECFED, 0xF37D9E46, 0xF066B1FE, 0xF066B1FE,
+    0xF03E3A3A, 0xF224C28C, 0xF5B72457, 0xFA8715E3
+};
+static real_t tns_coef_0_4[] =
+{
+    0x0, 0x3539B35, 0x681FE48, 0x9679182,
+    0xBE3EBD4, 0xDDB3D74, 0xF378709, 0xFE98FCA,
+    0xF011790B, 0xF09C5CB7, 0xF1AD6942, 0xF33B524A,
+    0xF5388AEB, 0xF793BBDF, 0xFA385AA9, 0xFD0F5CAB
+};
+static real_t tns_coef_1_3[] =
+{
+    0x0, 0x6F13013, 0xF5B72457, 0xFA8715E3,
+    0xF994E02, 0xC8261BA, 0xF5B72457, 0xFA8715E3,
+    0xF90ECFED, 0xF37D9E46, 0xF5B72457, 0xFA8715E3,
+    0xF37D9E46, 0xF90ECFED, 0xF5B72457, 0xFA8715E3
+};
+static real_t tns_coef_1_4[] =
+{
+    0x0, 0x3539B35, 0x681FE48, 0x9679182,
+    0xF5388AEB, 0xF793BBDF, 0xFA385AA9, 0xFD0F5CAB,
+    0xFE98FCA, 0xF378709, 0xDDB3D74, 0xBE3EBD4,
+    0xF5388AEB, 0xF793BBDF, 0xFA385AA9, 0xFD0F5CAB
+};
+#else
+#ifdef _MSC_VER
+#pragma warning(disable:4305)
+#pragma warning(disable:4244)
+#endif
+static real_t tns_coef_0_3[] =
+{
+    0.0, 0.4338837391, 0.7818314825, 0.9749279122,
+    -0.9848077530, -0.8660254038, -0.6427876097, -0.3420201433,
+    -0.4338837391, -0.7818314825, -0.9749279122, -0.9749279122,
+    -0.9848077530, -0.8660254038, -0.6427876097, -0.3420201433
+};
+static real_t tns_coef_0_4[] =
+{
+    0.0, 0.2079116908, 0.4067366431, 0.5877852523,
+    0.7431448255, 0.8660254038, 0.9510565163, 0.9945218954,
+    -0.9957341763, -0.9618256432, -0.8951632914, -0.7980172273,
+    -0.6736956436, -0.5264321629, -0.3612416662, -0.1837495178
+};
+static real_t tns_coef_1_3[] =
+{
+    0.0, 0.4338837391, -0.6427876097, -0.3420201433,
+    0.9749279122, 0.7818314825, -0.6427876097, -0.3420201433,
+    -0.4338837391, -0.7818314825, -0.6427876097, -0.3420201433,
+    -0.7818314825, -0.4338837391, -0.6427876097, -0.3420201433
+};
+static real_t tns_coef_1_4[] =
+{
+    0.0, 0.2079116908, 0.4067366431, 0.5877852523,
+    -0.6736956436, -0.5264321629, -0.3612416662, -0.1837495178,
+    0.9945218954, 0.9510565163, 0.8660254038, 0.7431448255,
+    -0.6736956436, -0.5264321629, -0.3612416662, -0.1837495178
+};
+#endif
 
+
 /* TNS decoding for one channel and frame */
 void tns_decode_frame(ic_stream *ics, tns_info *tns, uint8_t sr_index,
                       uint8_t object_type, real_t *spec, uint16_t frame_len)
@@ -130,33 +194,27 @@
                             uint8_t *coef, real_t *a)
 {
     uint8_t i, m;
-    uint8_t coef_res2, s_mask, n_mask;
     real_t tmp2[TNS_MAX_ORDER+1], b[TNS_MAX_ORDER+1];
-    float32_t iqfac;
 
-    /* Some internal tables */
-    static uint8_t sgn_mask[] = { 0x2, 0x4, 0x8 };
-    static uint8_t neg_mask[] = { ~0x3, ~0x7, ~0xf };
-
-    /* size used for transmission */
-    coef_res2 = coef_res_bits - coef_compress;
-    s_mask = sgn_mask[coef_res2 - 2]; /* mask for sign bit */
-    n_mask = neg_mask[coef_res2 - 2]; /* mask for padding neg. values */
-
     /* Conversion to signed integer */
     for (i = 0; i < order; i++)
     {
-        int8_t tmp = (coef[i] & s_mask) ? (coef[i] | n_mask) : coef[i];
-
-        /* Inverse quantization */
-        if (tmp >= 0)
+        if (coef_compress == 0)
         {
-            iqfac = ((1 << (coef_res_bits-1)) - 0.5) / M_PI_2;
+            if (coef_res_bits == 3)
+            {
+                tmp2[i] = tns_coef_0_3[coef[i]];
+            } else {
+                tmp2[i] = tns_coef_0_4[coef[i]];
+            }
         } else {
-            iqfac = ((1 << (coef_res_bits-1)) + 0.5) / M_PI_2;
+            if (coef_res_bits == 3)
+            {
+                tmp2[i] = tns_coef_1_3[coef[i]];
+            } else {
+                tmp2[i] = tns_coef_1_4[coef[i]];
+            }
         }
-
-        tmp2[i] = COEF_CONST(sin(tmp / iqfac));
     }
 
     /* Conversion to LPC coefficients */