shithub: aacdec

Download patch

ref: 1083f9ce328c246d5c537507cd1227e89eae50fd
parent: d04e5193e35696ba1b3de26d4a3070c281c6cbea
author: menno <menno>
date: Thu May 15 16:58:47 EDT 2003

FIXED_POINT changes

--- 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.55 2003/04/27 18:53:22 menno Exp $
+** $Id: decoder.c,v 1.56 2003/05/15 20:58:46 menno Exp $
 **/
 
 #include "common.h"
@@ -511,7 +511,7 @@
 
         /* apply scalefactors */
 #ifdef FIXED_POINT
-        apply_scalefactors(ics, spec_coef[ch], frame_len);
+        apply_scalefactors(hDecoder, ics, spec_coef[ch], frame_len);
 #else
         apply_scalefactors(ics, spec_coef[ch], pow2_table, frame_len);
 #endif
@@ -519,6 +519,18 @@
         /* deinterleave short block grouping */
         if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
             quant_to_spec(ics, spec_coef[ch], frame_len);
+
+#if 0
+        {
+            int rr;
+
+            for (rr = 0; rr < frame_len; rr++)
+            {
+//                if ((spec_coef[ch][rr] >> REAL_BITS) > (1<<12))
+                    printf(">>> %d\n", (spec_coef[ch][rr] >> REAL_BITS));
+            }
+        }
+#endif
     }
 
     /* Because for ms, is and pns both channels spectral coefficients are needed
--- a/libfaad/fixed.h
+++ b/libfaad/fixed.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: fixed.h,v 1.5 2003/04/01 16:34:33 menno Exp $
+** $Id: fixed.h,v 1.6 2003/05/15 20:58:46 menno Exp $
 **/
 
 #ifndef __FIXED_H__
@@ -29,7 +29,7 @@
 
 #define COEF_BITS 28
 #define COEF_PRECISION (1 << COEF_BITS)
-#define REAL_BITS 7
+#define REAL_BITS 10 //7
 #define REAL_PRECISION (1 << REAL_BITS)
 
 
--- a/libfaad/iq_table.h
+++ b/libfaad/iq_table.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: iq_table.h,v 1.1 2002/09/08 18:14:37 menno Exp $
+** $Id: iq_table.h,v 1.2 2003/05/15 20:58:46 menno Exp $
 **/
 
 #ifndef IQ_TABLE_H__
@@ -1070,1032 +1070,1032 @@
 
 static real_t iq_table[] =
 {
-    0x0,
-    0x80,
-    0x142,
-    0x229,
-    0x32C,
-    0x446,
-    0x573,
-    0x6B1,
-    0x7FF,
-    0x95C,
-    0xAC5,
-    0xC3B,
-    0xDBC,
-    0xF48,
-    0x10DE,
-    0x127F,
-    0x1428,
-    0x15DB,
-    0x1796,
-    0x1959,
-    0x1B24,
-    0x1CF7,
-    0x1ED2,
-    0x20B4,
-    0x229D,
-    0x248C,
-    0x2683,
-    0x287F,
-    0x2A83,
-    0x2C8C,
-    0x2E9B,
-    0x30B0,
-    0x32CB,
-    0x34EC,
-    0x3712,
-    0x393E,
-    0x3B6F,
-    0x3DA5,
-    0x3FE0,
-    0x4220,
-    0x4466,
-    0x46B0,
-    0x48FF,
-    0x4B52,
-    0x4DAA,
-    0x5007,
-    0x5268,
-    0x54CE,
-    0x5738,
-    0x59A7,
-    0x5C19,
-    0x5E90,
-    0x610B,
-    0x638A,
-    0x660D,
-    0x6894,
-    0x6B1F,
-    0x6DAE,
-    0x7041,
-    0x72D7,
-    0x7572,
-    0x7810,
-    0x7AB1,
-    0x7D57,
-    0x7FFF,
-    0x82AC,
-    0x855C,
-    0x880F,
-    0x8AC6,
-    0x8D81,
-    0x903E,
-    0x92FF,
-    0x95C4,
-    0x988B,
-    0x9B56,
-    0x9E24,
-    0xA0F6,
-    0xA3CA,
-    0xA6A2,
-    0xA97C,
-    0xAC5A,
-    0xAF3B,
-    0xB21F,
-    0xB506,
-    0xB7F0,
-    0xBADD,
-    0xBDCD,
-    0xC0C0,
-    0xC3B5,
-    0xC6AE,
-    0xC9A9,
-    0xCCA8,
-    0xCFA9,
-    0xD2AC,
-    0xD5B3,
-    0xD8BC,
-    0xDBC8,
-    0xDED7,
-    0xE1E9,
-    0xE4FD,
-    0xE814,
-    0xEB2D,
-    0xEE49,
-    0xF168,
-    0xF489,
-    0xF7AD,
-    0xFAD4,
-    0xFDFD,
-    0x10128,
-    0x10456,
-    0x10787,
-    0x10ABA,
-    0x10DEF,
-    0x11127,
-    0x11461,
-    0x1179E,
-    0x11ADD,
-    0x11E1F,
-    0x12163,
-    0x124A9,
-    0x127F2,
-    0x12B3D,
-    0x12E8A,
-    0x131D9,
-    0x1352B,
-    0x1387F,
-    0x13BD6,
-    0x13F2F,
-    0x1428A,
-    0x145E7,
-    0x14946,
-    0x14CA8,
-    0x1500C,
-    0x15372,
-    0x156DA,
-    0x15A45,
-    0x15DB1,
-    0x16120,
-    0x16491,
-    0x16804,
-    0x16B79,
-    0x16EF0,
-    0x1726A,
-    0x175E5,
-    0x17963,
-    0x17CE2,
-    0x18064,
-    0x183E7,
-    0x1876D,
-    0x18AF5,
-    0x18E7F,
-    0x1920B,
-    0x19598,
-    0x19928,
-    0x19CBA,
-    0x1A04E,
-    0x1A3E3,
-    0x1A77B,
-    0x1AB15,
-    0x1AEB0,
-    0x1B24E,
-    0x1B5EE,
-    0x1B98F,
-    0x1BD32,
-    0x1C0D7,
-    0x1C47F,
-    0x1C828,
-    0x1CBD3,
-    0x1CF7F,
-    0x1D32E,
-    0x1D6DE,
-    0x1DA91,
-    0x1DE45,
-    0x1E1FB,
-    0x1E5B3,
-    0x1E96D,
-    0x1ED28,
-    0x1F0E6,
-    0x1F4A5,
-    0x1F866,
-    0x1FC28,
-    0x1FFED,
-    0x203B3,
-    0x2077B,
-    0x20B45,
-    0x20F11,
-    0x212DE,
-    0x216AD,
-    0x21A7E,
-    0x21E50,
-    0x22225,
-    0x225FB,
-    0x229D2,
-    0x22DAC,
-    0x23187,
-    0x23564,
-    0x23942,
-    0x23D23,
-    0x24104,
-    0x244E8,
-    0x248CD,
-    0x24CB4,
-    0x2509D,
-    0x25487,
-    0x25873,
-    0x25C60,
-    0x2604F,
-    0x26440,
-    0x26832,
-    0x26C26,
-    0x2701C,
-    0x27413,
-    0x2780C,
-    0x27C07,
-    0x28003,
-    0x28400,
-    0x287FF,
-    0x28C00,
-    0x29003,
-    0x29407,
-    0x2980C,
-    0x29C13,
-    0x2A01C,
-    0x2A426,
-    0x2A832,
-    0x2AC3F,
-    0x2B04E,
-    0x2B45E,
-    0x2B870,
-    0x2BC83,
-    0x2C098,
-    0x2C4AF,
-    0x2C8C7,
-    0x2CCE0,
-    0x2D0FB,
-    0x2D517,
-    0x2D935,
-    0x2DD55,
-    0x2E176,
-    0x2E598,
-    0x2E9BC,
-    0x2EDE1,
-    0x2F208,
-    0x2F630,
-    0x2FA5A,
-    0x2FE85,
-    0x302B2,
-    0x306E0,
-    0x30B0F,
-    0x30F40,
-    0x31373,
-    0x317A7,
-    0x31BDC,
-    0x32013,
-    0x3244B,
-    0x32884,
-    0x32CBF,
-    0x330FC,
-    0x33539,
-    0x33979,
-    0x33DB9,
-    0x341FB,
-    0x3463F,
-    0x34A83,
-    0x34ECA,
-    0x35311,
-    0x3575A,
-    0x35BA4,
-    0x35FF0,
-    0x3643D,
-    0x3688B,
-    0x36CDB,
-    0x3712C,
-    0x3757F,
-    0x379D2,
-    0x37E28,
-    0x3827E,
-    0x386D6,
-    0x38B2F,
-    0x38F8A,
-    0x393E6,
-    0x39843,
-    0x39CA1,
-    0x3A101,
-    0x3A562,
-    0x3A9C5,
-    0x3AE28,
-    0x3B28E,
-    0x3B6F4,
-    0x3BB5C,
-    0x3BFC5,
-    0x3C42F,
-    0x3C89B,
-    0x3CD08,
-    0x3D176,
-    0x3D5E5,
-    0x3DA56,
-    0x3DEC8,
-    0x3E33B,
-    0x3E7B0,
-    0x3EC26,
-    0x3F09D,
-    0x3F515,
-    0x3F98F,
-    0x3FE0A,
-    0x40286,
-    0x40703,
-    0x40B82,
-    0x41002,
-    0x41483,
-    0x41906,
-    0x41D89,
-    0x4220E,
-    0x42694,
-    0x42B1C,
-    0x42FA4,
-    0x4342E,
-    0x438B9,
-    0x43D46,
-    0x441D3,
-    0x44662,
-    0x44AF2,
-    0x44F83,
-    0x45415,
-    0x458A9,
-    0x45D3E,
-    0x461D4,
-    0x4666B,
-    0x46B03,
-    0x46F9D,
-    0x47438,
-    0x478D4,
-    0x47D71,
-    0x4820F,
-    0x486AF,
-    0x48B50,
-    0x48FF1,
-    0x49494,
-    0x49939,
-    0x49DDE,
-    0x4A285,
-    0x4A72C,
-    0x4ABD5,
-    0x4B07F,
-    0x4B52B,
-    0x4B9D7,
-    0x4BE85,
-    0x4C333,
-    0x4C7E3,
-    0x4CC94,
-    0x4D146,
-    0x4D5FA,
-    0x4DAAE,
-    0x4DF64,
-    0x4E41B,
-    0x4E8D2,
-    0x4ED8B,
-    0x4F246,
-    0x4F701,
-    0x4FBBD,
-    0x5007B,
-    0x50539,
-    0x509F9,
-    0x50EBA,
-    0x5137C,
-    0x5183F,
-    0x51D03,
-    0x521C9,
-    0x5268F,
-    0x52B57,
-    0x53020,
-    0x534E9,
-    0x539B4,
-    0x53E80,
-    0x5434D,
-    0x5481B,
-    0x54CEB,
-    0x551BB,
-    0x5568C,
-    0x55B5F,
-    0x56033,
-    0x56507,
-    0x569DD,
-    0x56EB4,
-    0x5738C,
-    0x57865,
-    0x57D3F,
-    0x5821A,
-    0x586F6,
-    0x58BD4,
-    0x590B2,
-    0x59592,
-    0x59A72,
-    0x59F54,
-    0x5A436,
-    0x5A91A,
-    0x5ADFF,
-    0x5B2E5,
-    0x5B7CB,
-    0x5BCB3,
-    0x5C19C,
-    0x5C686,
-    0x5CB71,
-    0x5D05D,
-    0x5D54B,
-    0x5DA39,
-    0x5DF28,
-    0x5E418,
-    0x5E90A,
-    0x5EDFC,
-    0x5F2EF,
-    0x5F7E4,
-    0x5FCD9,
-    0x601D0,
-    0x606C7,
-    0x60BBF,
-    0x610B9,
-    0x615B4,
-    0x61AAF,
-    0x61FAC,
-    0x624A9,
-    0x629A8,
-    0x62EA8,
-    0x633A8,
-    0x638AA,
-    0x63DAC,
-    0x642B0,
-    0x647B5,
-    0x64CBA,
-    0x651C1,
-    0x656C9,
-    0x65BD1,
-    0x660DB,
-    0x665E6,
-    0x66AF1,
-    0x66FFE,
-    0x6750C,
-    0x67A1A,
-    0x67F2A,
-    0x6843A,
-    0x6894C,
-    0x68E5F,
-    0x69372,
-    0x69887,
-    0x69D9C,
-    0x6A2B3,
-    0x6A7CA,
-    0x6ACE3,
-    0x6B1FC,
-    0x6B716,
-    0x6BC32,
-    0x6C14E,
-    0x6C66B,
-    0x6CB8A,
-    0x6D0A9,
-    0x6D5C9,
-    0x6DAEA,
-    0x6E00C,
-    0x6E52F,
-    0x6EA53,
-    0x6EF78,
-    0x6F49E,
-    0x6F9C5,
-    0x6FEED,
-    0x70416,
-    0x7093F,
-    0x70E6A,
-    0x71396,
-    0x718C2,
-    0x71DF0,
-    0x7231E,
-    0x7284E,
-    0x72D7E,
-    0x732AF,
-    0x737E2,
-    0x73D15,
-    0x74249,
-    0x7477E,
-    0x74CB4,
-    0x751EB,
-    0x75722,
-    0x75C5B,
-    0x76195,
-    0x766CF,
-    0x76C0B,
-    0x77147,
-    0x77685,
-    0x77BC3,
-    0x78102,
-    0x78642,
-    0x78B83,
-    0x790C5,
-    0x79608,
-    0x79B4C,
-    0x7A091,
-    0x7A5D6,
-    0x7AB1D,
-    0x7B064,
-    0x7B5AC,
-    0x7BAF6,
-    0x7C040,
-    0x7C58B,
-    0x7CAD7,
-    0x7D024,
-    0x7D571,
-    0x7DAC0,
-    0x7E010,
-    0x7E560,
-    0x7EAB1,
-    0x7F004,
-    0x7F557,
-    0x7FAAB,
-    0x7FFFF,
-    0x80555,
-    0x80AAC,
-    0x81003,
-    0x8155C,
-    0x81AB5,
-    0x8200F,
-    0x8256B,
-    0x82AC7,
-    0x83023,
-    0x83581,
-    0x83AE0,
-    0x8403F,
-    0x845A0,
-    0x84B01,
-    0x85063,
-    0x855C6,
-    0x85B2A,
-    0x8608E,
-    0x865F4,
-    0x86B5A,
-    0x870C2,
-    0x8762A,
-    0x87B93,
-    0x880FD,
-    0x88668,
-    0x88BD3,
-    0x89140,
-    0x896AD,
-    0x89C1B,
-    0x8A18A,
-    0x8A6FA,
-    0x8AC6B,
-    0x8B1DD,
-    0x8B74F,
-    0x8BCC3,
-    0x8C237,
-    0x8C7AC,
-    0x8CD22,
-    0x8D298,
-    0x8D810,
-    0x8DD88,
-    0x8E302,
-    0x8E87C,
-    0x8EDF7,
-    0x8F373,
-    0x8F8EF,
-    0x8FE6D,
-    0x903EB,
-    0x9096A,
-    0x90EEA,
-    0x9146B,
-    0x919ED,
-    0x91F6F,
-    0x924F2,
-    0x92A77,
-    0x92FFC,
-    0x93581,
-    0x93B08,
-    0x9408F,
-    0x94618,
-    0x94BA1,
-    0x9512B,
-    0x956B6,
-    0x95C41,
-    0x961CE,
-    0x9675B,
-    0x96CE9,
-    0x97278,
-    0x97807,
-    0x97D98,
-    0x98329,
-    0x988BB,
-    0x98E4E,
-    0x993E2,
-    0x99977,
-    0x99F0C,
-    0x9A4A2,
-    0x9AA39,
-    0x9AFD1,
-    0x9B56A,
-    0x9BB03,
-    0x9C09D,
-    0x9C639,
-    0x9CBD4,
-    0x9D171,
-    0x9D70E,
-    0x9DCAD,
-    0x9E24C,
-    0x9E7EC,
-    0x9ED8C,
-    0x9F32E,
-    0x9F8D0,
-    0x9FE73,
-    0xA0417,
-    0xA09BC,
-    0xA0F61,
-    0xA1507,
-    0xA1AAE,
-    0xA2056,
-    0xA25FF,
-    0xA2BA8,
-    0xA3152,
-    0xA36FD,
-    0xA3CA9,
-    0xA4255,
-    0xA4803,
-    0xA4DB1,
-    0xA5360,
-    0xA590F,
-    0xA5EC0,
-    0xA6471,
-    0xA6A23,
-    0xA6FD6,
-    0xA7589,
-    0xA7B3E,
-    0xA80F3,
-    0xA86A9,
-    0xA8C5F,
-    0xA9217,
-    0xA97CF,
-    0xA9D88,
-    0xAA342,
-    0xAA8FC,
-    0xAAEB8,
-    0xAB474,
-    0xABA31,
-    0xABFEE,
-    0xAC5AD,
-    0xACB6C,
-    0xAD12C,
-    0xAD6EC,
-    0xADCAE,
-    0xAE270,
-    0xAE833,
-    0xAEDF7,
-    0xAF3BB,
-    0xAF980,
-    0xAFF46,
-    0xB050D,
-    0xB0AD5,
-    0xB109D,
-    0xB1666,
-    0xB1C30,
-    0xB21FA,
-    0xB27C6,
-    0xB2D92,
-    0xB335E,
-    0xB392C,
-    0xB3EFA,
-    0xB44C9,
-    0xB4A99,
-    0xB506A,
-    0xB563B,
-    0xB5C0D,
-    0xB61E0,
-    0xB67B3,
-    0xB6D88,
-    0xB735D,
-    0xB7932,
-    0xB7F09,
-    0xB84E0,
-    0xB8AB8,
-    0xB9091,
-    0xB966A,
-    0xB9C45,
-    0xBA220,
-    0xBA7FB,
-    0xBADD8,
-    0xBB3B5,
-    0xBB993,
-    0xBBF71,
-    0xBC551,
-    0xBCB31,
-    0xBD112,
-    0xBD6F3,
-    0xBDCD5,
-    0xBE2B8,
-    0xBE89C,
-    0xBEE81,
-    0xBF466,
-    0xBFA4C,
-    0xC0032,
-    0xC061A,
-    0xC0C02,
-    0xC11EB,
-    0xC17D4,
-    0xC1DBE,
-    0xC23A9,
-    0xC2995,
-    0xC2F82,
-    0xC356F,
-    0xC3B5D,
-    0xC414B,
-    0xC473B,
-    0xC4D2B,
-    0xC531B,
-    0xC590D,
-    0xC5EFF,
-    0xC64F2,
-    0xC6AE6,
-    0xC70DA,
-    0xC76CF,
-    0xC7CC5,
-    0xC82BB,
-    0xC88B2,
-    0xC8EAA,
-    0xC94A3,
-    0xC9A9C,
-    0xCA096,
-    0xCA691,
-    0xCAC8C,
-    0xCB288,
-    0xCB885,
-    0xCBE83,
-    0xCC481,
-    0xCCA80,
-    0xCD07F,
-    0xCD680,
-    0xCDC81,
-    0xCE283,
-    0xCE885,
-    0xCEE88,
-    0xCF48C,
-    0xCFA91,
-    0xD0096,
-    0xD069C,
-    0xD0CA3,
-    0xD12AA,
-    0xD18B2,
-    0xD1EBB,
-    0xD24C4,
-    0xD2ACE,
-    0xD30D9,
-    0xD36E4,
-    0xD3CF1,
-    0xD42FE,
-    0xD490B,
-    0xD4F19,
-    0xD5528,
-    0xD5B38,
-    0xD6148,
-    0xD6759,
-    0xD6D6B,
-    0xD737D,
-    0xD7991,
-    0xD7FA4,
-    0xD85B9,
-    0xD8BCE,
-    0xD91E4,
-    0xD97FA,
-    0xD9E11,
-    0xDA429,
-    0xDAA42,
-    0xDB05B,
-    0xDB675,
-    0xDBC8F,
-    0xDC2AB,
-    0xDC8C7,
-    0xDCEE3,
-    0xDD500,
-    0xDDB1E,
-    0xDE13D,
-    0xDE75C,
-    0xDED7C,
-    0xDF39D,
-    0xDF9BE,
-    0xDFFE0,
-    0xE0603,
-    0xE0C26,
-    0xE124A,
-    0xE186F,
-    0xE1E95,
-    0xE24BB,
-    0xE2AE1,
-    0xE3109,
-    0xE3731,
-    0xE3D59,
-    0xE4383,
-    0xE49AD,
-    0xE4FD7,
-    0xE5603,
-    0xE5C2F,
-    0xE625C,
-    0xE6889,
-    0xE6EB7,
-    0xE74E6,
-    0xE7B15,
-    0xE8145,
-    0xE8776,
-    0xE8DA7,
-    0xE93D9,
-    0xE9A0B,
-    0xEA03F,
-    0xEA673,
-    0xEACA7,
-    0xEB2DD,
-    0xEB913,
-    0xEBF49,
-    0xEC580,
-    0xECBB8,
-    0xED1F1,
-    0xED82A,
-    0xEDE64,
-    0xEE49E,
-    0xEEAD9,
-    0xEF115,
-    0xEF752,
-    0xEFD8F,
-    0xF03CD,
-    0xF0A0B,
-    0xF104A,
-    0xF168A,
-    0xF1CCA,
-    0xF230B,
-    0xF294D,
-    0xF2F8F,
-    0xF35D2,
-    0xF3C15,
-    0xF425A,
-    0xF489E,
-    0xF4EE4,
-    0xF552A,
-    0xF5B71,
-    0xF61B8,
-    0xF6800,
-    0xF6E49,
-    0xF7492,
-    0xF7ADC,
-    0xF8127,
-    0xF8772,
-    0xF8DBE,
-    0xF940B,
-    0xF9A58,
-    0xFA0A6,
-    0xFA6F4,
-    0xFAD43,
-    0xFB393,
-    0xFB9E3,
-    0xFC034,
-    0xFC686,
-    0xFCCD8,
-    0xFD32B,
-    0xFD97F,
-    0xFDFD3,
-    0xFE628,
-    0xFEC7D,
-    0xFF2D3,
-    0xFF92A,
-    0xFFF81,
-    0x1005D9,
-    0x100C31,
-    0x10128B,
-    0x1018E4,
-    0x101F3F,
-    0x10259A,
-    0x102BF6,
-    0x103252,
-    0x1038AF,
-    0x103F0C,
-    0x10456B,
-    0x104BC9,
-    0x105229,
-    0x105889,
-    0x105EEA,
-    0x10654B,
-    0x106BAD,
-    0x10720F,
-    0x107873,
-    0x107ED6,
-    0x10853B,
-    0x108BA0,
-    0x109205,
-    0x10986C,
-    0x109ED3,
-    0x10A53A,
-    0x10ABA2,
-    0x10B20B,
-    0x10B874,
-    0x10BEDE,
-    0x10C549,
-    0x10CBB4,
-    0x10D220,
-    0x10D88C,
-    0x10DEF9,
-    0x10E567,
-    0x10EBD5,
-    0x10F244,
-    0x10F8B3,
-    0x10FF23,
-    0x110594,
-    0x110C05,
-    0x111277,
-    0x1118EA,
-    0x111F5D,
-    0x1125D1,
-    0x112C45,
-    0x1132BA,
-    0x11392F,
-    0x113FA6,
-    0x11461C,
-    0x114C94,
-    0x11530C,
-    0x115984,
-    0x115FFD,
-    0x116677,
-    0x116CF2,
-    0x11736D,
-    0x1179E8,
-    0x118064,
-    0x1186E1,
-    0x118D5E,
-    0x1193DC,
-    0x119A5B,
-    0x11A0DA,
-    0x11A75A,
-    0x11ADDA,
-    0x11B45B,
-    0x11BADD,
-    0x11C15F,
-    0x11C7E2,
-    0x11CE65,
-    0x11D4E9,
-    0x11DB6E,
-    0x11E1F3,
-    0x11E879,
-    0x11EEFF,
-    0x11F586,
-    0x11FC0E,
-    0x120296,
-    0x12091E,
-    0x120FA8,
-    0x121632,
-    0x121CBC,
-    0x122347,
-    0x1229D3,
-    0x12305F,
-    0x1236EC,
-    0x123D79,
-    0x124407,
-    0x124A96,
-    0x125125,
-    0x1257B5,
-    0x125E45,
-    0x1264D6,
-    0x126B68,
-    0x1271FA,
-    0x12788D,
-    0x127F20,
-    0x1285B4,
-    0x128C48,
-    0x1292DD,
-    0x129973,
-    0x12A009,
-    0x12A6A0,
-    0x12AD38,
-    0x12B3D0,
-    0x12BA68,
-    0x12C101,
-    0x12C79B,
-    0x12CE35,
-    0x12D4D0,
-    0x12DB6C,
-    0x12E208,
-    0x12E8A4,
-    0x12EF41,
-    0x12F5DF,
-    0x12FC7E,
-    0x13031C,
-    0x1309BC,
-    0x13105C,
-    0x1316FD,
-    0x131D9E,
-    0x132440,
-    0x132AE2,
-    0x133185,
-    0x133829,
-    0x133ECD,
-    0x134571,
-    0x134C17,
-    0x1352BC,
-    0x135963,
-    0x13600A,
-    0x1366B1,
-    0x136D59,
-    0x137402,
-    0x137AAB,
-    0x138155,
-    0x1387FF,
-    0x138EAA,
-    0x139556,
-    0x139C02,
-    0x13A2AF,
-    0x13A95C,
-    0x13B00A,
-    0x13B6B8,
-    0x13BD67,
-    0x13C416,
-    0x13CAC7,
-    0x13D177,
-    0x13D828,
-    0x13DEDA,
-    0x13E58C,
-    0x13EC3F,
-    0x13F2F3,
-    0x13F9A7,
-    0x14005B,
-    0x140710,
-    0x140DC6,
-    0x14147C,
-    0x141B33,
-    0x1421EB,
-    0x1428A2,
-    0x142F5B
+    REAL_CONST(0.0000000000),
+    REAL_CONST(1.0000000000),
+    REAL_CONST(2.5198421478),
+    REAL_CONST(4.3267488480),
+    REAL_CONST(6.3496041298),
+    REAL_CONST(8.5498800278),
+    REAL_CONST(10.9027233124),
+    REAL_CONST(13.3905181885),
+    REAL_CONST(16.0000000000),
+    REAL_CONST(18.7207546234),
+    REAL_CONST(21.5443477631),
+    REAL_CONST(24.4637813568),
+    REAL_CONST(27.4731426239),
+    REAL_CONST(30.5673503876),
+    REAL_CONST(33.7419929504),
+    REAL_CONST(36.9931793213),
+    REAL_CONST(40.3174743652),
+    REAL_CONST(43.7117881775),
+    REAL_CONST(47.1733436584),
+    REAL_CONST(50.6996307373),
+    REAL_CONST(54.2883529663),
+    REAL_CONST(57.9374084473),
+    REAL_CONST(61.6448669434),
+    REAL_CONST(65.4089431763),
+    REAL_CONST(69.2279815674),
+    REAL_CONST(73.1004409790),
+    REAL_CONST(77.0248947144),
+    REAL_CONST(81.0000000000),
+    REAL_CONST(85.0244903564),
+    REAL_CONST(89.0971908569),
+    REAL_CONST(93.2169723511),
+    REAL_CONST(97.3827972412),
+    REAL_CONST(101.5936660767),
+    REAL_CONST(105.8486328125),
+    REAL_CONST(110.1468048096),
+    REAL_CONST(114.4873199463),
+    REAL_CONST(118.8693847656),
+    REAL_CONST(123.2922058105),
+    REAL_CONST(127.7550659180),
+    REAL_CONST(132.2572479248),
+    REAL_CONST(136.7980804443),
+    REAL_CONST(141.3769073486),
+    REAL_CONST(145.9931182861),
+    REAL_CONST(150.6461181641),
+    REAL_CONST(155.3353271484),
+    REAL_CONST(160.0601959229),
+    REAL_CONST(164.8202056885),
+    REAL_CONST(169.6148223877),
+    REAL_CONST(174.4435729980),
+    REAL_CONST(179.3059844971),
+    REAL_CONST(184.2015686035),
+    REAL_CONST(189.1299133301),
+    REAL_CONST(194.0905761719),
+    REAL_CONST(199.0831451416),
+    REAL_CONST(204.1072082520),
+    REAL_CONST(209.1623840332),
+    REAL_CONST(214.2482910156),
+    REAL_CONST(219.3645629883),
+    REAL_CONST(224.5108489990),
+    REAL_CONST(229.6867828369),
+    REAL_CONST(234.8920593262),
+    REAL_CONST(240.1263275146),
+    REAL_CONST(245.3892822266),
+    REAL_CONST(250.6806030273),
+    REAL_CONST(256.0000000000),
+    REAL_CONST(261.3471679688),
+    REAL_CONST(266.7218322754),
+    REAL_CONST(272.1237182617),
+    REAL_CONST(277.5525512695),
+    REAL_CONST(283.0080566406),
+    REAL_CONST(288.4899597168),
+    REAL_CONST(293.9980468750),
+    REAL_CONST(299.5320739746),
+    REAL_CONST(305.0917663574),
+    REAL_CONST(310.6769104004),
+    REAL_CONST(316.2872619629),
+    REAL_CONST(321.9226074219),
+    REAL_CONST(327.5827026367),
+    REAL_CONST(333.2673645020),
+    REAL_CONST(338.9763793945),
+    REAL_CONST(344.7095642090),
+    REAL_CONST(350.4666442871),
+    REAL_CONST(356.2474670410),
+    REAL_CONST(362.0518798828),
+    REAL_CONST(367.8796081543),
+    REAL_CONST(373.7305297852),
+    REAL_CONST(379.6044311523),
+    REAL_CONST(385.5011291504),
+    REAL_CONST(391.4205017090),
+    REAL_CONST(397.3623046875),
+    REAL_CONST(403.3264160156),
+    REAL_CONST(409.3126831055),
+    REAL_CONST(415.3208923340),
+    REAL_CONST(421.3508911133),
+    REAL_CONST(427.4025878906),
+    REAL_CONST(433.4757385254),
+    REAL_CONST(439.5702819824),
+    REAL_CONST(445.6859741211),
+    REAL_CONST(451.8227539063),
+    REAL_CONST(457.9804382324),
+    REAL_CONST(464.1588745117),
+    REAL_CONST(470.3579711914),
+    REAL_CONST(476.5775451660),
+    REAL_CONST(482.8174743652),
+    REAL_CONST(489.0776062012),
+    REAL_CONST(495.3578796387),
+    REAL_CONST(501.6580810547),
+    REAL_CONST(507.9781494141),
+    REAL_CONST(514.3179321289),
+    REAL_CONST(520.6773071289),
+    REAL_CONST(527.0562133789),
+    REAL_CONST(533.4544067383),
+    REAL_CONST(539.8718872070),
+    REAL_CONST(546.3084716797),
+    REAL_CONST(552.7640380859),
+    REAL_CONST(559.2385864258),
+    REAL_CONST(565.7318725586),
+    REAL_CONST(572.2438964844),
+    REAL_CONST(578.7744140625),
+    REAL_CONST(585.3234863281),
+    REAL_CONST(591.8908691406),
+    REAL_CONST(598.4765625000),
+    REAL_CONST(605.0804443359),
+    REAL_CONST(611.7023315430),
+    REAL_CONST(618.3422241211),
+    REAL_CONST(625.0000000000),
+    REAL_CONST(631.6755371094),
+    REAL_CONST(638.3687744141),
+    REAL_CONST(645.0795898438),
+    REAL_CONST(651.8078613281),
+    REAL_CONST(658.5535888672),
+    REAL_CONST(665.3166503906),
+    REAL_CONST(672.0969238281),
+    REAL_CONST(678.8943481445),
+    REAL_CONST(685.7088012695),
+    REAL_CONST(692.5402832031),
+    REAL_CONST(699.3886108398),
+    REAL_CONST(706.2537231445),
+    REAL_CONST(713.1356201172),
+    REAL_CONST(720.0341186523),
+    REAL_CONST(726.9491577148),
+    REAL_CONST(733.8807373047),
+    REAL_CONST(740.8286743164),
+    REAL_CONST(747.7929687500),
+    REAL_CONST(754.7734985352),
+    REAL_CONST(761.7702636719),
+    REAL_CONST(768.7830810547),
+    REAL_CONST(775.8118896484),
+    REAL_CONST(782.8567504883),
+    REAL_CONST(789.9174194336),
+    REAL_CONST(796.9938964844),
+    REAL_CONST(804.0861816406),
+    REAL_CONST(811.1940917969),
+    REAL_CONST(818.3176269531),
+    REAL_CONST(825.4566650391),
+    REAL_CONST(832.6112060547),
+    REAL_CONST(839.7811889648),
+    REAL_CONST(846.9664306641),
+    REAL_CONST(854.1669921875),
+    REAL_CONST(861.3827514648),
+    REAL_CONST(868.6136474609),
+    REAL_CONST(875.8596191406),
+    REAL_CONST(883.1206054688),
+    REAL_CONST(890.3965454102),
+    REAL_CONST(897.6873779297),
+    REAL_CONST(904.9931030273),
+    REAL_CONST(912.3135375977),
+    REAL_CONST(919.6486816406),
+    REAL_CONST(926.9985351563),
+    REAL_CONST(934.3629150391),
+    REAL_CONST(941.7418823242),
+    REAL_CONST(949.1353759766),
+    REAL_CONST(956.5432128906),
+    REAL_CONST(963.9654541016),
+    REAL_CONST(971.4020385742),
+    REAL_CONST(978.8528442383),
+    REAL_CONST(986.3178710938),
+    REAL_CONST(993.7969970703),
+    REAL_CONST(1001.2902832031),
+    REAL_CONST(1008.7976074219),
+    REAL_CONST(1016.3189086914),
+    REAL_CONST(1023.8541870117),
+    REAL_CONST(1031.4033203125),
+    REAL_CONST(1038.9663085938),
+    REAL_CONST(1046.5430908203),
+    REAL_CONST(1054.1335449219),
+    REAL_CONST(1061.7377929688),
+    REAL_CONST(1069.3555908203),
+    REAL_CONST(1076.9870605469),
+    REAL_CONST(1084.6319580078),
+    REAL_CONST(1092.2904052734),
+    REAL_CONST(1099.9624023438),
+    REAL_CONST(1107.6477050781),
+    REAL_CONST(1115.3463134766),
+    REAL_CONST(1123.0583496094),
+    REAL_CONST(1130.7835693359),
+    REAL_CONST(1138.5219726563),
+    REAL_CONST(1146.2736816406),
+    REAL_CONST(1154.0383300781),
+    REAL_CONST(1161.8161621094),
+    REAL_CONST(1169.6070556641),
+    REAL_CONST(1177.4110107422),
+    REAL_CONST(1185.2277832031),
+    REAL_CONST(1193.0574951172),
+    REAL_CONST(1200.9001464844),
+    REAL_CONST(1208.7554931641),
+    REAL_CONST(1216.6237792969),
+    REAL_CONST(1224.5047607422),
+    REAL_CONST(1232.3983154297),
+    REAL_CONST(1240.3046875000),
+    REAL_CONST(1248.2236328125),
+    REAL_CONST(1256.1551513672),
+    REAL_CONST(1264.0991210938),
+    REAL_CONST(1272.0557861328),
+    REAL_CONST(1280.0247802734),
+    REAL_CONST(1288.0062255859),
+    REAL_CONST(1296.0000000000),
+    REAL_CONST(1304.0062255859),
+    REAL_CONST(1312.0246582031),
+    REAL_CONST(1320.0554199219),
+    REAL_CONST(1328.0983886719),
+    REAL_CONST(1336.1535644531),
+    REAL_CONST(1344.2208251953),
+    REAL_CONST(1352.3002929688),
+    REAL_CONST(1360.3918457031),
+    REAL_CONST(1368.4954833984),
+    REAL_CONST(1376.6110839844),
+    REAL_CONST(1384.7386474609),
+    REAL_CONST(1392.8781738281),
+    REAL_CONST(1401.0295410156),
+    REAL_CONST(1409.1928710938),
+    REAL_CONST(1417.3680419922),
+    REAL_CONST(1425.5550537109),
+    REAL_CONST(1433.7537841797),
+    REAL_CONST(1441.9642333984),
+    REAL_CONST(1450.1864013672),
+    REAL_CONST(1458.4201660156),
+    REAL_CONST(1466.6656494141),
+    REAL_CONST(1474.9227294922),
+    REAL_CONST(1483.1914062500),
+    REAL_CONST(1491.4715576172),
+    REAL_CONST(1499.7633056641),
+    REAL_CONST(1508.0665283203),
+    REAL_CONST(1516.3811035156),
+    REAL_CONST(1524.7071533203),
+    REAL_CONST(1533.0445556641),
+    REAL_CONST(1541.3933105469),
+    REAL_CONST(1549.7534179688),
+    REAL_CONST(1558.1247558594),
+    REAL_CONST(1566.5074462891),
+    REAL_CONST(1574.9013671875),
+    REAL_CONST(1583.3063964844),
+    REAL_CONST(1591.7226562500),
+    REAL_CONST(1600.1500244141),
+    REAL_CONST(1608.5885009766),
+    REAL_CONST(1617.0380859375),
+    REAL_CONST(1625.4986572266),
+    REAL_CONST(1633.9703369141),
+    REAL_CONST(1642.4530029297),
+    REAL_CONST(1650.9465332031),
+    REAL_CONST(1659.4511718750),
+    REAL_CONST(1667.9665527344),
+    REAL_CONST(1676.4929199219),
+    REAL_CONST(1685.0301513672),
+    REAL_CONST(1693.5781250000),
+    REAL_CONST(1702.1369628906),
+    REAL_CONST(1710.7065429688),
+    REAL_CONST(1719.2868652344),
+    REAL_CONST(1727.8779296875),
+    REAL_CONST(1736.4797363281),
+    REAL_CONST(1745.0920410156),
+    REAL_CONST(1753.7152099609),
+    REAL_CONST(1762.3488769531),
+    REAL_CONST(1770.9930419922),
+    REAL_CONST(1779.6479492188),
+    REAL_CONST(1788.3132324219),
+    REAL_CONST(1796.9891357422),
+    REAL_CONST(1805.6754150391),
+    REAL_CONST(1814.3721923828),
+    REAL_CONST(1823.0794677734),
+    REAL_CONST(1831.7971191406),
+    REAL_CONST(1840.5251464844),
+    REAL_CONST(1849.2635498047),
+    REAL_CONST(1858.0123291016),
+    REAL_CONST(1866.7713623047),
+    REAL_CONST(1875.5406494141),
+    REAL_CONST(1884.3201904297),
+    REAL_CONST(1893.1101074219),
+    REAL_CONST(1901.9101562500),
+    REAL_CONST(1910.7203369141),
+    REAL_CONST(1919.5407714844),
+    REAL_CONST(1928.3712158203),
+    REAL_CONST(1937.2119140625),
+    REAL_CONST(1946.0627441406),
+    REAL_CONST(1954.9235839844),
+    REAL_CONST(1963.7944335938),
+    REAL_CONST(1972.6752929688),
+    REAL_CONST(1981.5662841797),
+    REAL_CONST(1990.4671630859),
+    REAL_CONST(1999.3780517578),
+    REAL_CONST(2008.2988281250),
+    REAL_CONST(2017.2296142578),
+    REAL_CONST(2026.1701660156),
+    REAL_CONST(2035.1207275391),
+    REAL_CONST(2044.0810546875),
+    REAL_CONST(2053.0512695313),
+    REAL_CONST(2062.0312500000),
+    REAL_CONST(2071.0209960938),
+    REAL_CONST(2080.0205078125),
+    REAL_CONST(2089.0297851563),
+    REAL_CONST(2098.0488281250),
+    REAL_CONST(2107.0776367188),
+    REAL_CONST(2116.1159667969),
+    REAL_CONST(2125.1640625000),
+    REAL_CONST(2134.2216796875),
+    REAL_CONST(2143.2890625000),
+    REAL_CONST(2152.3659667969),
+    REAL_CONST(2161.4523925781),
+    REAL_CONST(2170.5485839844),
+    REAL_CONST(2179.6540527344),
+    REAL_CONST(2188.7692871094),
+    REAL_CONST(2197.8937988281),
+    REAL_CONST(2207.0278320313),
+    REAL_CONST(2216.1713867188),
+    REAL_CONST(2225.3244628906),
+    REAL_CONST(2234.4868164063),
+    REAL_CONST(2243.6586914063),
+    REAL_CONST(2252.8398437500),
+    REAL_CONST(2262.0305175781),
+    REAL_CONST(2271.2304687500),
+    REAL_CONST(2280.4396972656),
+    REAL_CONST(2289.6582031250),
+    REAL_CONST(2298.8859863281),
+    REAL_CONST(2308.1230468750),
+    REAL_CONST(2317.3696289063),
+    REAL_CONST(2326.6250000000),
+    REAL_CONST(2335.8898925781),
+    REAL_CONST(2345.1638183594),
+    REAL_CONST(2354.4470214844),
+    REAL_CONST(2363.7395019531),
+    REAL_CONST(2373.0410156250),
+    REAL_CONST(2382.3515625000),
+    REAL_CONST(2391.6711425781),
+    REAL_CONST(2401.0000000000),
+    REAL_CONST(2410.3378906250),
+    REAL_CONST(2419.6848144531),
+    REAL_CONST(2429.0407714844),
+    REAL_CONST(2438.4057617188),
+    REAL_CONST(2447.7797851563),
+    REAL_CONST(2457.1625976563),
+    REAL_CONST(2466.5544433594),
+    REAL_CONST(2475.9553222656),
+    REAL_CONST(2485.3652343750),
+    REAL_CONST(2494.7839355469),
+    REAL_CONST(2504.2116699219),
+    REAL_CONST(2513.6479492188),
+    REAL_CONST(2523.0935058594),
+    REAL_CONST(2532.5476074219),
+    REAL_CONST(2542.0107421875),
+    REAL_CONST(2551.4824218750),
+    REAL_CONST(2560.9631347656),
+    REAL_CONST(2570.4526367188),
+    REAL_CONST(2579.9509277344),
+    REAL_CONST(2589.4577636719),
+    REAL_CONST(2598.9733886719),
+    REAL_CONST(2608.4978027344),
+    REAL_CONST(2618.0310058594),
+    REAL_CONST(2627.5727539063),
+    REAL_CONST(2637.1232910156),
+    REAL_CONST(2646.6823730469),
+    REAL_CONST(2656.2500000000),
+    REAL_CONST(2665.8264160156),
+    REAL_CONST(2675.4113769531),
+    REAL_CONST(2685.0051269531),
+    REAL_CONST(2694.6071777344),
+    REAL_CONST(2704.2180175781),
+    REAL_CONST(2713.8371582031),
+    REAL_CONST(2723.4650878906),
+    REAL_CONST(2733.1013183594),
+    REAL_CONST(2742.7460937500),
+    REAL_CONST(2752.3994140625),
+    REAL_CONST(2762.0612792969),
+    REAL_CONST(2771.7314453125),
+    REAL_CONST(2781.4101562500),
+    REAL_CONST(2791.0971679688),
+    REAL_CONST(2800.7927246094),
+    REAL_CONST(2810.4965820313),
+    REAL_CONST(2820.2089843750),
+    REAL_CONST(2829.9296875000),
+    REAL_CONST(2839.6586914063),
+    REAL_CONST(2849.3959960938),
+    REAL_CONST(2859.1416015625),
+    REAL_CONST(2868.8957519531),
+    REAL_CONST(2878.6579589844),
+    REAL_CONST(2888.4284667969),
+    REAL_CONST(2898.2075195313),
+    REAL_CONST(2907.9943847656),
+    REAL_CONST(2917.7897949219),
+    REAL_CONST(2927.5935058594),
+    REAL_CONST(2937.4052734375),
+    REAL_CONST(2947.2250976563),
+    REAL_CONST(2957.0534667969),
+    REAL_CONST(2966.8896484375),
+    REAL_CONST(2976.7341308594),
+    REAL_CONST(2986.5869140625),
+    REAL_CONST(2996.4477539063),
+    REAL_CONST(3006.3166503906),
+    REAL_CONST(3016.1936035156),
+    REAL_CONST(3026.0786132813),
+    REAL_CONST(3035.9719238281),
+    REAL_CONST(3045.8730468750),
+    REAL_CONST(3055.7824707031),
+    REAL_CONST(3065.6997070313),
+    REAL_CONST(3075.6252441406),
+    REAL_CONST(3085.5585937500),
+    REAL_CONST(3095.5000000000),
+    REAL_CONST(3105.4492187500),
+    REAL_CONST(3115.4067382813),
+    REAL_CONST(3125.3718261719),
+    REAL_CONST(3135.3452148438),
+    REAL_CONST(3145.3264160156),
+    REAL_CONST(3155.3154296875),
+    REAL_CONST(3165.3125000000),
+    REAL_CONST(3175.3173828125),
+    REAL_CONST(3185.3303222656),
+    REAL_CONST(3195.3510742188),
+    REAL_CONST(3205.3796386719),
+    REAL_CONST(3215.4160156250),
+    REAL_CONST(3225.4602050781),
+    REAL_CONST(3235.5122070313),
+    REAL_CONST(3245.5722656250),
+    REAL_CONST(3255.6398925781),
+    REAL_CONST(3265.7153320313),
+    REAL_CONST(3275.7985839844),
+    REAL_CONST(3285.8896484375),
+    REAL_CONST(3295.9885253906),
+    REAL_CONST(3306.0949707031),
+    REAL_CONST(3316.2092285156),
+    REAL_CONST(3326.3310546875),
+    REAL_CONST(3336.4606933594),
+    REAL_CONST(3346.5981445313),
+    REAL_CONST(3356.7431640625),
+    REAL_CONST(3366.8959960938),
+    REAL_CONST(3377.0563964844),
+    REAL_CONST(3387.2243652344),
+    REAL_CONST(3397.3999023438),
+    REAL_CONST(3407.5832519531),
+    REAL_CONST(3417.7741699219),
+    REAL_CONST(3427.9726562500),
+    REAL_CONST(3438.1787109375),
+    REAL_CONST(3448.3923339844),
+    REAL_CONST(3458.6137695313),
+    REAL_CONST(3468.8425292969),
+    REAL_CONST(3479.0788574219),
+    REAL_CONST(3489.3227539063),
+    REAL_CONST(3499.5742187500),
+    REAL_CONST(3509.8330078125),
+    REAL_CONST(3520.0993652344),
+    REAL_CONST(3530.3732910156),
+    REAL_CONST(3540.6547851563),
+    REAL_CONST(3550.9436035156),
+    REAL_CONST(3561.2399902344),
+    REAL_CONST(3571.5437011719),
+    REAL_CONST(3581.8549804688),
+    REAL_CONST(3592.1735839844),
+    REAL_CONST(3602.4995117188),
+    REAL_CONST(3612.8330078125),
+    REAL_CONST(3623.1738281250),
+    REAL_CONST(3633.5219726563),
+    REAL_CONST(3643.8776855469),
+    REAL_CONST(3654.2407226563),
+    REAL_CONST(3664.6108398438),
+    REAL_CONST(3674.9885253906),
+    REAL_CONST(3685.3735351563),
+    REAL_CONST(3695.7658691406),
+    REAL_CONST(3706.1655273438),
+    REAL_CONST(3716.5725097656),
+    REAL_CONST(3726.9865722656),
+    REAL_CONST(3737.4082031250),
+    REAL_CONST(3747.8369140625),
+    REAL_CONST(3758.2729492188),
+    REAL_CONST(3768.7163085938),
+    REAL_CONST(3779.1667480469),
+    REAL_CONST(3789.6245117188),
+    REAL_CONST(3800.0893554688),
+    REAL_CONST(3810.5615234375),
+    REAL_CONST(3821.0410156250),
+    REAL_CONST(3831.5275878906),
+    REAL_CONST(3842.0212402344),
+    REAL_CONST(3852.5222167969),
+    REAL_CONST(3863.0302734375),
+    REAL_CONST(3873.5454101563),
+    REAL_CONST(3884.0678710938),
+    REAL_CONST(3894.5974121094),
+    REAL_CONST(3905.1340332031),
+    REAL_CONST(3915.6777343750),
+    REAL_CONST(3926.2285156250),
+    REAL_CONST(3936.7863769531),
+    REAL_CONST(3947.3513183594),
+    REAL_CONST(3957.9235839844),
+    REAL_CONST(3968.5026855469),
+    REAL_CONST(3979.0888671875),
+    REAL_CONST(3989.6821289063),
+    REAL_CONST(4000.2824707031),
+    REAL_CONST(4010.8896484375),
+    REAL_CONST(4021.5039062500),
+    REAL_CONST(4032.1252441406),
+    REAL_CONST(4042.7536621094),
+    REAL_CONST(4053.3889160156),
+    REAL_CONST(4064.0312500000),
+    REAL_CONST(4074.6806640625),
+    REAL_CONST(4085.3369140625),
+    REAL_CONST(4096.0000000000),
+    REAL_CONST(4106.6699218750),
+    REAL_CONST(4117.3471679688),
+    REAL_CONST(4128.0312500000),
+    REAL_CONST(4138.7221679688),
+    REAL_CONST(4149.4199218750),
+    REAL_CONST(4160.1245117188),
+    REAL_CONST(4170.8364257813),
+    REAL_CONST(4181.5546875000),
+    REAL_CONST(4192.2802734375),
+    REAL_CONST(4203.0122070313),
+    REAL_CONST(4213.7514648438),
+    REAL_CONST(4224.4975585938),
+    REAL_CONST(4235.2500000000),
+    REAL_CONST(4246.0097656250),
+    REAL_CONST(4256.7763671875),
+    REAL_CONST(4267.5493164063),
+    REAL_CONST(4278.3295898438),
+    REAL_CONST(4289.1162109375),
+    REAL_CONST(4299.9101562500),
+    REAL_CONST(4310.7104492188),
+    REAL_CONST(4321.5175781250),
+    REAL_CONST(4332.3315429688),
+    REAL_CONST(4343.1523437500),
+    REAL_CONST(4353.9794921875),
+    REAL_CONST(4364.8139648438),
+    REAL_CONST(4375.6547851563),
+    REAL_CONST(4386.5024414063),
+    REAL_CONST(4397.3564453125),
+    REAL_CONST(4408.2177734375),
+    REAL_CONST(4419.0854492188),
+    REAL_CONST(4429.9594726563),
+    REAL_CONST(4440.8408203125),
+    REAL_CONST(4451.7285156250),
+    REAL_CONST(4462.6230468750),
+    REAL_CONST(4473.5239257813),
+    REAL_CONST(4484.4316406250),
+    REAL_CONST(4495.3461914063),
+    REAL_CONST(4506.2670898438),
+    REAL_CONST(4517.1948242188),
+    REAL_CONST(4528.1289062500),
+    REAL_CONST(4539.0698242188),
+    REAL_CONST(4550.0170898438),
+    REAL_CONST(4560.9711914063),
+    REAL_CONST(4571.9316406250),
+    REAL_CONST(4582.8989257813),
+    REAL_CONST(4593.8725585938),
+    REAL_CONST(4604.8525390625),
+    REAL_CONST(4615.8393554688),
+    REAL_CONST(4626.8330078125),
+    REAL_CONST(4637.8330078125),
+    REAL_CONST(4648.8393554688),
+    REAL_CONST(4659.8520507813),
+    REAL_CONST(4670.8715820313),
+    REAL_CONST(4681.8974609375),
+    REAL_CONST(4692.9301757813),
+    REAL_CONST(4703.9687500000),
+    REAL_CONST(4715.0141601563),
+    REAL_CONST(4726.0664062500),
+    REAL_CONST(4737.1245117188),
+    REAL_CONST(4748.1894531250),
+    REAL_CONST(4759.2607421875),
+    REAL_CONST(4770.3383789063),
+    REAL_CONST(4781.4223632813),
+    REAL_CONST(4792.5131835938),
+    REAL_CONST(4803.6103515625),
+    REAL_CONST(4814.7133789063),
+    REAL_CONST(4825.8232421875),
+    REAL_CONST(4836.9394531250),
+    REAL_CONST(4848.0620117188),
+    REAL_CONST(4859.1909179688),
+    REAL_CONST(4870.3266601563),
+    REAL_CONST(4881.4682617188),
+    REAL_CONST(4892.6162109375),
+    REAL_CONST(4903.7705078125),
+    REAL_CONST(4914.9316406250),
+    REAL_CONST(4926.0986328125),
+    REAL_CONST(4937.2719726563),
+    REAL_CONST(4948.4516601563),
+    REAL_CONST(4959.6381835938),
+    REAL_CONST(4970.8305664063),
+    REAL_CONST(4982.0292968750),
+    REAL_CONST(4993.2338867188),
+    REAL_CONST(5004.4453125000),
+    REAL_CONST(5015.6630859375),
+    REAL_CONST(5026.8867187500),
+    REAL_CONST(5038.1171875000),
+    REAL_CONST(5049.3535156250),
+    REAL_CONST(5060.5961914063),
+    REAL_CONST(5071.8447265625),
+    REAL_CONST(5083.1000976563),
+    REAL_CONST(5094.3613281250),
+    REAL_CONST(5105.6289062500),
+    REAL_CONST(5116.9028320313),
+    REAL_CONST(5128.1826171875),
+    REAL_CONST(5139.4692382813),
+    REAL_CONST(5150.7617187500),
+    REAL_CONST(5162.0600585938),
+    REAL_CONST(5173.3647460938),
+    REAL_CONST(5184.6757812500),
+    REAL_CONST(5195.9931640625),
+    REAL_CONST(5207.3164062500),
+    REAL_CONST(5218.6459960938),
+    REAL_CONST(5229.9814453125),
+    REAL_CONST(5241.3232421875),
+    REAL_CONST(5252.6713867188),
+    REAL_CONST(5264.0253906250),
+    REAL_CONST(5275.3852539063),
+    REAL_CONST(5286.7519531250),
+    REAL_CONST(5298.1240234375),
+    REAL_CONST(5309.5029296875),
+    REAL_CONST(5320.8872070313),
+    REAL_CONST(5332.2778320313),
+    REAL_CONST(5343.6748046875),
+    REAL_CONST(5355.0776367188),
+    REAL_CONST(5366.4868164063),
+    REAL_CONST(5377.9018554688),
+    REAL_CONST(5389.3227539063),
+    REAL_CONST(5400.7500000000),
+    REAL_CONST(5412.1831054688),
+    REAL_CONST(5423.6220703125),
+    REAL_CONST(5435.0673828125),
+    REAL_CONST(5446.5190429688),
+    REAL_CONST(5457.9760742188),
+    REAL_CONST(5469.4394531250),
+    REAL_CONST(5480.9086914063),
+    REAL_CONST(5492.3842773438),
+    REAL_CONST(5503.8657226563),
+    REAL_CONST(5515.3530273438),
+    REAL_CONST(5526.8461914063),
+    REAL_CONST(5538.3452148438),
+    REAL_CONST(5549.8505859375),
+    REAL_CONST(5561.3618164063),
+    REAL_CONST(5572.8789062500),
+    REAL_CONST(5584.4023437500),
+    REAL_CONST(5595.9311523438),
+    REAL_CONST(5607.4663085938),
+    REAL_CONST(5619.0073242188),
+    REAL_CONST(5630.5541992188),
+    REAL_CONST(5642.1069335938),
+    REAL_CONST(5653.6655273438),
+    REAL_CONST(5665.2304687500),
+    REAL_CONST(5676.8007812500),
+    REAL_CONST(5688.3774414063),
+    REAL_CONST(5699.9594726563),
+    REAL_CONST(5711.5478515625),
+    REAL_CONST(5723.1420898438),
+    REAL_CONST(5734.7421875000),
+    REAL_CONST(5746.3476562500),
+    REAL_CONST(5757.9594726563),
+    REAL_CONST(5769.5771484375),
+    REAL_CONST(5781.2006835938),
+    REAL_CONST(5792.8300781250),
+    REAL_CONST(5804.4648437500),
+    REAL_CONST(5816.1059570313),
+    REAL_CONST(5827.7524414063),
+    REAL_CONST(5839.4052734375),
+    REAL_CONST(5851.0634765625),
+    REAL_CONST(5862.7280273438),
+    REAL_CONST(5874.3979492188),
+    REAL_CONST(5886.0737304688),
+    REAL_CONST(5897.7553710938),
+    REAL_CONST(5909.4428710938),
+    REAL_CONST(5921.1357421875),
+    REAL_CONST(5932.8349609375),
+    REAL_CONST(5944.5395507813),
+    REAL_CONST(5956.2500000000),
+    REAL_CONST(5967.9663085938),
+    REAL_CONST(5979.6884765625),
+    REAL_CONST(5991.4160156250),
+    REAL_CONST(6003.1494140625),
+    REAL_CONST(6014.8886718750),
+    REAL_CONST(6026.6337890625),
+    REAL_CONST(6038.3842773438),
+    REAL_CONST(6050.1411132813),
+    REAL_CONST(6061.9028320313),
+    REAL_CONST(6073.6708984375),
+    REAL_CONST(6085.4443359375),
+    REAL_CONST(6097.2236328125),
+    REAL_CONST(6109.0083007813),
+    REAL_CONST(6120.7993164063),
+    REAL_CONST(6132.5952148438),
+    REAL_CONST(6144.3974609375),
+    REAL_CONST(6156.2050781250),
+    REAL_CONST(6168.0180664063),
+    REAL_CONST(6179.8374023438),
+    REAL_CONST(6191.6616210938),
+    REAL_CONST(6203.4921875000),
+    REAL_CONST(6215.3281250000),
+    REAL_CONST(6227.1694335938),
+    REAL_CONST(6239.0166015625),
+    REAL_CONST(6250.8696289063),
+    REAL_CONST(6262.7280273438),
+    REAL_CONST(6274.5917968750),
+    REAL_CONST(6286.4614257813),
+    REAL_CONST(6298.3369140625),
+    REAL_CONST(6310.2177734375),
+    REAL_CONST(6322.1040039063),
+    REAL_CONST(6333.9960937500),
+    REAL_CONST(6345.8940429688),
+    REAL_CONST(6357.7968750000),
+    REAL_CONST(6369.7055664063),
+    REAL_CONST(6381.6201171875),
+    REAL_CONST(6393.5400390625),
+    REAL_CONST(6405.4653320313),
+    REAL_CONST(6417.3964843750),
+    REAL_CONST(6429.3330078125),
+    REAL_CONST(6441.2753906250),
+    REAL_CONST(6453.2226562500),
+    REAL_CONST(6465.1757812500),
+    REAL_CONST(6477.1347656250),
+    REAL_CONST(6489.0991210938),
+    REAL_CONST(6501.0688476563),
+    REAL_CONST(6513.0439453125),
+    REAL_CONST(6525.0249023438),
+    REAL_CONST(6537.0107421875),
+    REAL_CONST(6549.0029296875),
+    REAL_CONST(6561.0000000000),
+    REAL_CONST(6573.0029296875),
+    REAL_CONST(6585.0107421875),
+    REAL_CONST(6597.0249023438),
+    REAL_CONST(6609.0439453125),
+    REAL_CONST(6621.0683593750),
+    REAL_CONST(6633.0986328125),
+    REAL_CONST(6645.1342773438),
+    REAL_CONST(6657.1752929688),
+    REAL_CONST(6669.2216796875),
+    REAL_CONST(6681.2734375000),
+    REAL_CONST(6693.3310546875),
+    REAL_CONST(6705.3935546875),
+    REAL_CONST(6717.4619140625),
+    REAL_CONST(6729.5356445313),
+    REAL_CONST(6741.6142578125),
+    REAL_CONST(6753.6987304688),
+    REAL_CONST(6765.7885742188),
+    REAL_CONST(6777.8842773438),
+    REAL_CONST(6789.9848632813),
+    REAL_CONST(6802.0908203125),
+    REAL_CONST(6814.2021484375),
+    REAL_CONST(6826.3188476563),
+    REAL_CONST(6838.4414062500),
+    REAL_CONST(6850.5688476563),
+    REAL_CONST(6862.7016601563),
+    REAL_CONST(6874.8403320313),
+    REAL_CONST(6886.9838867188),
+    REAL_CONST(6899.1328125000),
+    REAL_CONST(6911.2871093750),
+    REAL_CONST(6923.4467773438),
+    REAL_CONST(6935.6118164063),
+    REAL_CONST(6947.7822265625),
+    REAL_CONST(6959.9580078125),
+    REAL_CONST(6972.1391601563),
+    REAL_CONST(6984.3256835938),
+    REAL_CONST(6996.5170898438),
+    REAL_CONST(7008.7143554688),
+    REAL_CONST(7020.9165039063),
+    REAL_CONST(7033.1245117188),
+    REAL_CONST(7045.3374023438),
+    REAL_CONST(7057.5556640625),
+    REAL_CONST(7069.7788085938),
+    REAL_CONST(7082.0078125000),
+    REAL_CONST(7094.2416992188),
+    REAL_CONST(7106.4814453125),
+    REAL_CONST(7118.7260742188),
+    REAL_CONST(7130.9755859375),
+    REAL_CONST(7143.2309570313),
+    REAL_CONST(7155.4912109375),
+    REAL_CONST(7167.7568359375),
+    REAL_CONST(7180.0278320313),
+    REAL_CONST(7192.3041992188),
+    REAL_CONST(7204.5854492188),
+    REAL_CONST(7216.8720703125),
+    REAL_CONST(7229.1640625000),
+    REAL_CONST(7241.4614257813),
+    REAL_CONST(7253.7636718750),
+    REAL_CONST(7266.0712890625),
+    REAL_CONST(7278.3837890625),
+    REAL_CONST(7290.7016601563),
+    REAL_CONST(7303.0249023438),
+    REAL_CONST(7315.3535156250),
+    REAL_CONST(7327.6870117188),
+    REAL_CONST(7340.0258789063),
+    REAL_CONST(7352.3696289063),
+    REAL_CONST(7364.7187500000),
+    REAL_CONST(7377.0732421875),
+    REAL_CONST(7389.4326171875),
+    REAL_CONST(7401.7973632813),
+    REAL_CONST(7414.1669921875),
+    REAL_CONST(7426.5419921875),
+    REAL_CONST(7438.9223632813),
+    REAL_CONST(7451.3076171875),
+    REAL_CONST(7463.6982421875),
+    REAL_CONST(7476.0937500000),
+    REAL_CONST(7488.4941406250),
+    REAL_CONST(7500.9003906250),
+    REAL_CONST(7513.3110351563),
+    REAL_CONST(7525.7275390625),
+    REAL_CONST(7538.1484375000),
+    REAL_CONST(7550.5751953125),
+    REAL_CONST(7563.0063476563),
+    REAL_CONST(7575.4428710938),
+    REAL_CONST(7587.8847656250),
+    REAL_CONST(7600.3315429688),
+    REAL_CONST(7612.7836914063),
+    REAL_CONST(7625.2407226563),
+    REAL_CONST(7637.7026367188),
+    REAL_CONST(7650.1699218750),
+    REAL_CONST(7662.6420898438),
+    REAL_CONST(7675.1191406250),
+    REAL_CONST(7687.6015625000),
+    REAL_CONST(7700.0893554688),
+    REAL_CONST(7712.5815429688),
+    REAL_CONST(7725.0795898438),
+    REAL_CONST(7737.5820312500),
+    REAL_CONST(7750.0898437500),
+    REAL_CONST(7762.6025390625),
+    REAL_CONST(7775.1201171875),
+    REAL_CONST(7787.6430664063),
+    REAL_CONST(7800.1708984375),
+    REAL_CONST(7812.7041015625),
+    REAL_CONST(7825.2416992188),
+    REAL_CONST(7837.7846679688),
+    REAL_CONST(7850.3330078125),
+    REAL_CONST(7862.8857421875),
+    REAL_CONST(7875.4438476563),
+    REAL_CONST(7888.0068359375),
+    REAL_CONST(7900.5747070313),
+    REAL_CONST(7913.1479492188),
+    REAL_CONST(7925.7260742188),
+    REAL_CONST(7938.3090820313),
+    REAL_CONST(7950.8969726563),
+    REAL_CONST(7963.4897460938),
+    REAL_CONST(7976.0878906250),
+    REAL_CONST(7988.6909179688),
+    REAL_CONST(8001.2988281250),
+    REAL_CONST(8013.9116210938),
+    REAL_CONST(8026.5292968750),
+    REAL_CONST(8039.1523437500),
+    REAL_CONST(8051.7797851563),
+    REAL_CONST(8064.4125976563),
+    REAL_CONST(8077.0502929688),
+    REAL_CONST(8089.6928710938),
+    REAL_CONST(8102.3403320313),
+    REAL_CONST(8114.9931640625),
+    REAL_CONST(8127.6503906250),
+    REAL_CONST(8140.3129882813),
+    REAL_CONST(8152.9799804688),
+    REAL_CONST(8165.6523437500),
+    REAL_CONST(8178.3295898438),
+    REAL_CONST(8191.0117187500),
+    REAL_CONST(8203.6982421875),
+    REAL_CONST(8216.3906250000),
+    REAL_CONST(8229.0869140625),
+    REAL_CONST(8241.7890625000),
+    REAL_CONST(8254.4951171875),
+    REAL_CONST(8267.2070312500),
+    REAL_CONST(8279.9228515625),
+    REAL_CONST(8292.6445312500),
+    REAL_CONST(8305.3701171875),
+    REAL_CONST(8318.1015625000),
+    REAL_CONST(8330.8369140625),
+    REAL_CONST(8343.5781250000),
+    REAL_CONST(8356.3232421875),
+    REAL_CONST(8369.0742187500),
+    REAL_CONST(8381.8291015625),
+    REAL_CONST(8394.5898437500),
+    REAL_CONST(8407.3544921875),
+    REAL_CONST(8420.1240234375),
+    REAL_CONST(8432.8994140625),
+    REAL_CONST(8445.6787109375),
+    REAL_CONST(8458.4628906250),
+    REAL_CONST(8471.2519531250),
+    REAL_CONST(8484.0458984375),
+    REAL_CONST(8496.8447265625),
+    REAL_CONST(8509.6484375000),
+    REAL_CONST(8522.4570312500),
+    REAL_CONST(8535.2705078125),
+    REAL_CONST(8548.0888671875),
+    REAL_CONST(8560.9111328125),
+    REAL_CONST(8573.7392578125),
+    REAL_CONST(8586.5722656250),
+    REAL_CONST(8599.4091796875),
+    REAL_CONST(8612.2509765625),
+    REAL_CONST(8625.0986328125),
+    REAL_CONST(8637.9501953125),
+    REAL_CONST(8650.8066406250),
+    REAL_CONST(8663.6679687500),
+    REAL_CONST(8676.5332031250),
+    REAL_CONST(8689.4042968750),
+    REAL_CONST(8702.2802734375),
+    REAL_CONST(8715.1601562500),
+    REAL_CONST(8728.0458984375),
+    REAL_CONST(8740.9355468750),
+    REAL_CONST(8753.8300781250),
+    REAL_CONST(8766.7294921875),
+    REAL_CONST(8779.6337890625),
+    REAL_CONST(8792.5419921875),
+    REAL_CONST(8805.4560546875),
+    REAL_CONST(8818.3740234375),
+    REAL_CONST(8831.2968750000),
+    REAL_CONST(8844.2246093750),
+    REAL_CONST(8857.1572265625),
+    REAL_CONST(8870.0947265625),
+    REAL_CONST(8883.0371093750),
+    REAL_CONST(8895.9833984375),
+    REAL_CONST(8908.9345703125),
+    REAL_CONST(8921.8906250000),
+    REAL_CONST(8934.8515625000),
+    REAL_CONST(8947.8173828125),
+    REAL_CONST(8960.7871093750),
+    REAL_CONST(8973.7626953125),
+    REAL_CONST(8986.7421875000),
+    REAL_CONST(8999.7265625000),
+    REAL_CONST(9012.7148437500),
+    REAL_CONST(9025.7089843750),
+    REAL_CONST(9038.7070312500),
+    REAL_CONST(9051.7099609375),
+    REAL_CONST(9064.7177734375),
+    REAL_CONST(9077.7304687500),
+    REAL_CONST(9090.7470703125),
+    REAL_CONST(9103.7685546875),
+    REAL_CONST(9116.7949218750),
+    REAL_CONST(9129.8261718750),
+    REAL_CONST(9142.8613281250),
+    REAL_CONST(9155.9023437500),
+    REAL_CONST(9168.9472656250),
+    REAL_CONST(9181.9960937500),
+    REAL_CONST(9195.0507812500),
+    REAL_CONST(9208.1093750000),
+    REAL_CONST(9221.1728515625),
+    REAL_CONST(9234.2412109375),
+    REAL_CONST(9247.3134765625),
+    REAL_CONST(9260.3906250000),
+    REAL_CONST(9273.4726562500),
+    REAL_CONST(9286.5595703125),
+    REAL_CONST(9299.6503906250),
+    REAL_CONST(9312.7460937500),
+    REAL_CONST(9325.8466796875),
+    REAL_CONST(9338.9521484375),
+    REAL_CONST(9352.0615234375),
+    REAL_CONST(9365.1757812500),
+    REAL_CONST(9378.2949218750),
+    REAL_CONST(9391.4179687500),
+    REAL_CONST(9404.5458984375),
+    REAL_CONST(9417.6787109375),
+    REAL_CONST(9430.8154296875),
+    REAL_CONST(9443.9570312500),
+    REAL_CONST(9457.1035156250),
+    REAL_CONST(9470.2539062500),
+    REAL_CONST(9483.4101562500),
+    REAL_CONST(9496.5693359375),
+    REAL_CONST(9509.7343750000),
+    REAL_CONST(9522.9033203125),
+    REAL_CONST(9536.0771484375),
+    REAL_CONST(9549.2548828125),
+    REAL_CONST(9562.4384765625),
+    REAL_CONST(9575.6250000000),
+    REAL_CONST(9588.8173828125),
+    REAL_CONST(9602.0136718750),
+    REAL_CONST(9615.2148437500),
+    REAL_CONST(9628.4199218750),
+    REAL_CONST(9641.6298828125),
+    REAL_CONST(9654.8447265625),
+    REAL_CONST(9668.0634765625),
+    REAL_CONST(9681.2871093750),
+    REAL_CONST(9694.5146484375),
+    REAL_CONST(9707.7470703125),
+    REAL_CONST(9720.9843750000),
+    REAL_CONST(9734.2265625000),
+    REAL_CONST(9747.4726562500),
+    REAL_CONST(9760.7226562500),
+    REAL_CONST(9773.9775390625),
+    REAL_CONST(9787.2373046875),
+    REAL_CONST(9800.5019531250),
+    REAL_CONST(9813.7705078125),
+    REAL_CONST(9827.0429687500),
+    REAL_CONST(9840.3212890625),
+    REAL_CONST(9853.6025390625),
+    REAL_CONST(9866.8896484375),
+    REAL_CONST(9880.1806640625),
+    REAL_CONST(9893.4755859375),
+    REAL_CONST(9906.7753906250),
+    REAL_CONST(9920.0800781250),
+    REAL_CONST(9933.3886718750),
+    REAL_CONST(9946.7021484375),
+    REAL_CONST(9960.0195312500),
+    REAL_CONST(9973.3417968750),
+    REAL_CONST(9986.6689453125),
+    REAL_CONST(10000.0000000000),
+    REAL_CONST(10013.3359375000),
+    REAL_CONST(10026.6757812500),
+    REAL_CONST(10040.0195312500),
+    REAL_CONST(10053.3691406250),
+    REAL_CONST(10066.7216796875),
+    REAL_CONST(10080.0800781250),
+    REAL_CONST(10093.4423828125),
+    REAL_CONST(10106.8085937500),
+    REAL_CONST(10120.1796875000),
+    REAL_CONST(10133.5546875000),
+    REAL_CONST(10146.9345703125),
+    REAL_CONST(10160.3193359375),
+    REAL_CONST(10173.7080078125),
+    REAL_CONST(10187.1005859375),
+    REAL_CONST(10200.4980468750),
+    REAL_CONST(10213.9003906250),
+    REAL_CONST(10227.3066406250),
+    REAL_CONST(10240.7167968750),
+    REAL_CONST(10254.1318359375),
+    REAL_CONST(10267.5517578125),
+    REAL_CONST(10280.9755859375),
+    REAL_CONST(10294.4033203125),
+    REAL_CONST(10307.8359375000),
+    REAL_CONST(10321.2734375000),
+    REAL_CONST(10334.7148437500)
 };
 
 #endif
--- a/libfaad/libfaad.dsp
+++ b/libfaad/libfaad.dsp
@@ -295,6 +295,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\fixed.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\codebook\hcb.h
 # End Source File
 # Begin Source File
--- 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.24 2003/02/04 16:49:37 menno Exp $
+** $Id: mdct.c,v 1.25 2003/05/15 20:58:46 menno Exp $
 **/
 
 /*
@@ -55,36 +55,52 @@
     3: cos(2 * PI * (1/8) / N)
     4: sin(2 * PI * (1/8) / N)
  */
-#ifdef FIXED_POINT
+#ifndef FIXED_POINT
+#ifdef _MSC_VER
+#pragma warning(disable:4305)
+#pragma warning(disable:4244)
+#endif
 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 */
+    { COEF_CONST(0.0312500000), COEF_CONST(0.9999952938), COEF_CONST(0.0030679568),
+        COEF_CONST(0.9999999265), COEF_CONST(0.0003834952) }, /* 2048 */
+    { COEF_CONST(0.0322748612), COEF_CONST(0.9999946356), COEF_CONST(0.0032724866),
+        COEF_CONST(0.9999999404), COEF_CONST(0.0004090615) }, /* 1920 */
+    { COEF_CONST(0.0441941738), COEF_CONST(0.9999811649), COEF_CONST(0.0061358847),
+        COEF_CONST(0.9999997020), COEF_CONST(0.0007669903) }, /* 1024 */
+    { COEF_CONST(0.0456435465), COEF_CONST(0.9999786019), COEF_CONST(0.0065449383),
+        COEF_CONST(0.9999996424), COEF_CONST(0.0008181230) }, /* 960 */
+    { COEF_CONST(0.0883883476), COEF_CONST(0.9996988177), COEF_CONST(0.0245412290),
+        COEF_CONST(0.9999952912), COEF_CONST(0.0030679568) }, /* 256 */
+    { COEF_CONST(0.0912870929), COEF_CONST(0.9996573329), COEF_CONST(0.0261769500),
+        COEF_CONST(0.9999946356), COEF_CONST(0.0032724866) }  /* 240 */
 #ifdef SSR_DEC
-   ,{ 0, 0, 0, 0, 0 }, /* 512 */
-    { 0, 0, 0, 0, 0 }  /* 64 */
+   ,{ COEF_CONST(0.062500000), COEF_CONST(0.999924702), COEF_CONST(0.012271538),
+        COEF_CONST(0.999998823), COEF_CONST(0.00153398) }, /* 512 */
+    { COEF_CONST(0.176776695), COEF_CONST(0.995184727), COEF_CONST(0.09801714),
+        COEF_CONST(0.999924702), COEF_CONST(0.012271538) }  /* 64 */
 #endif
 };
 #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 */
+    { COEF_CONST(1), COEF_CONST(0.9999952938), COEF_CONST(0.0030679568),
+        COEF_CONST(0.9999999265), COEF_CONST(0.0003834952) }, /* 2048 */
+    { COEF_CONST(/* sqrt(1024/960) */ 1.03279556), COEF_CONST(0.9999946356), COEF_CONST(0.0032724866),
+        COEF_CONST(0), COEF_CONST(0.0004090615) }, /* 1920 */
+    { COEF_CONST(1), COEF_CONST(0.9999811649), COEF_CONST(0.0061358847),
+        COEF_CONST(0.9999997020), COEF_CONST(0.0007669903) }, /* 1024 */
+    { COEF_CONST(/* sqrt(512/480) */ 1.03279556), COEF_CONST(0.9999786019), COEF_CONST(0.0065449383),
+        COEF_CONST(0.9999996424), COEF_CONST(0.0008181230) }, /* 960 */
+    { COEF_CONST(1), COEF_CONST(0.9996988177), COEF_CONST(0.0245412290),
+        COEF_CONST(0.9999952912), COEF_CONST(0.0030679568) }, /* 256 */
+    { COEF_CONST(/* sqrt(256/240) */ 1.03279556), COEF_CONST(0.9996573329), COEF_CONST(0.0261769500),
+        COEF_CONST(0.9999946356), COEF_CONST(0.0032724866) }  /* 240 */
 #ifdef SSR_DEC
-   ,{ 0.062500000, 0.999924702, 0.012271538, 0.999998823, 0.00153398 }, /* 512 */
-    { 0.176776695, 0.995184727, 0.09801714, 0.999924702, 0.012271538 }  /* 64 */
+   ,{ COEF_CONST(0), COEF_CONST(0.999924702), COEF_CONST(0.012271538),
+        COEF_CONST(0.999998823), COEF_CONST(0.00153398) }, /* 512 */
+    { COEF_CONST(0), COEF_CONST(0.995184727), COEF_CONST(0.09801714),
+        COEF_CONST(0.999924702), COEF_CONST(0.012271538) }  /* 64 */
 #endif
 };
 #endif
--- a/libfaad/specrec.c
+++ b/libfaad/specrec.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: specrec.c,v 1.19 2003/02/16 18:17:11 menno Exp $
+** $Id: specrec.c,v 1.20 2003/05/15 20:58:47 menno Exp $
 **/
 
 /*
@@ -254,7 +254,7 @@
 }
 #endif
 
-static INLINE real_t iquant(int16_t q)
+static INLINE real_t iquant(int16_t q, real_t *tab)
 {
     int16_t sgn = 1;
 
@@ -267,9 +267,9 @@
     }
 
     if (q >= IQ_TABLE_SIZE)
-        return sgn * iq_table[q>>3] * 16;
+        return sgn * tab[q>>3] * 16;
 
-    return sgn * iq_table[q];
+    return sgn * tab[q];
 }
 
 void inverse_quantization(real_t *x_invquant, int16_t *x_quant, uint16_t frame_len)
@@ -277,13 +277,14 @@
     int16_t i;
     int16_t *in_ptr = x_quant;
     real_t *out_ptr = x_invquant;
+    real_t *tab = iq_table;
 
     for(i = frame_len/4-1; i >= 0; --i)
     {
-        out_ptr[0] = iquant(in_ptr[0]);
-        out_ptr[1] = iquant(in_ptr[1]);
-        out_ptr[2] = iquant(in_ptr[2]);
-        out_ptr[3] = iquant(in_ptr[3]);
+        out_ptr[0] = iquant(in_ptr[0], tab);
+        out_ptr[1] = iquant(in_ptr[1], tab);
+        out_ptr[2] = iquant(in_ptr[2], tab);
+        out_ptr[3] = iquant(in_ptr[3], tab);
         out_ptr += 4;
         in_ptr += 4;
     }
@@ -311,7 +312,8 @@
 #endif
 
 #ifdef FIXED_POINT
-void apply_scalefactors(ic_stream *ics, real_t *x_invquant, uint16_t frame_len)
+void apply_scalefactors(faacDecHandle hDecoder, ic_stream *ics, real_t *x_invquant,
+                        uint16_t frame_len)
 #else
 void apply_scalefactors(ic_stream *ics, real_t *x_invquant, real_t *pow2_table,
                         uint16_t frame_len)
@@ -347,6 +349,16 @@
 #else
             exp = (ics->scale_factors[g][sfb] - 100) / 4;
             frac = (ics->scale_factors[g][sfb] - 100) % 4;
+
+            if (hDecoder->object_type == LD)
+            {
+                exp -= 9;
+            } else {
+                if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
+                    exp -= 7;
+                else
+                    exp -= 10;
+            }
 #endif
 
             /* minimum size of a sf band is 4 and always a multiple of 4 */
@@ -353,10 +365,10 @@
             for ( ; k < top; k += 4)
             {
 #ifndef FIXED_POINT
-                fp[0] = MUL(fp[0],scale);
-                fp[1] = MUL(fp[1],scale);
-                fp[2] = MUL(fp[2],scale);
-                fp[3] = MUL(fp[3],scale);
+                fp[0] = fp[0] * scale;
+                fp[1] = fp[1] * scale;
+                fp[2] = fp[2] * scale;
+                fp[3] = fp[3] * scale;
 #else
                 if (exp < 0)
                 {
--- a/libfaad/specrec.h
+++ b/libfaad/specrec.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: specrec.h,v 1.10 2002/11/28 18:48:30 menno Exp $
+** $Id: specrec.h,v 1.11 2003/05/15 20:58:47 menno Exp $
 **/
 
 #ifndef __SPECREC_H__
@@ -32,7 +32,8 @@
 void quant_to_spec(ic_stream *ics, real_t *spec_data, uint16_t frame_len);
 void inverse_quantization(real_t *x_invquant, int16_t *x_quant, uint16_t frame_len);
 #ifdef FIXED_POINT
-void apply_scalefactors(ic_stream *ics, real_t *x_invquant, uint16_t frame_len);
+void apply_scalefactors(faacDecHandle hDecoder, ic_stream *ics, real_t *x_invquant,
+                        uint16_t frame_len);
 #else
 void build_tables(real_t *pow2_table);
 void apply_scalefactors(ic_stream *ics, real_t *x_invquant, real_t *pow2_table,