changeset 13453:6d50ef45a058

Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12. patch by adland <adland123 at yahoo dot com>
author diego
date Fri, 24 Sep 2004 17:31:36 +0000
parents c364b7c13dd8
children f1f84313d7e7
files libfaad2/Makefile libfaad2/README libfaad2/cfft.c libfaad2/common.c libfaad2/common.h libfaad2/decoder.c libfaad2/decoder.h libfaad2/error.c libfaad2/error.h libfaad2/faad.h libfaad2/filtbank.c libfaad2/fixed.h libfaad2/hcr.c libfaad2/huffman.c libfaad2/iq_table.h libfaad2/is.c libfaad2/mdct.c libfaad2/mdct_tab.h libfaad2/mp4.c libfaad2/mp4.h libfaad2/neaacdec.h libfaad2/output.c libfaad2/output.h libfaad2/pns.c libfaad2/pns.h libfaad2/ps_dec.c libfaad2/ps_dec.h libfaad2/ps_syntax.c libfaad2/ps_tables.h libfaad2/sbr_dct.c libfaad2/sbr_dct.h libfaad2/sbr_dec.c libfaad2/sbr_dec.h libfaad2/sbr_e_nf.c libfaad2/sbr_e_nf.h libfaad2/sbr_fbt.c libfaad2/sbr_hfadj.c libfaad2/sbr_hfadj.h libfaad2/sbr_hfgen.c libfaad2/sbr_hfgen.h libfaad2/sbr_huff.c libfaad2/sbr_qmf.c libfaad2/sbr_qmf.h libfaad2/sbr_qmf_c.h libfaad2/sbr_syntax.c libfaad2/sbr_tf_grid.c libfaad2/specrec.c libfaad2/specrec.h libfaad2/structs.h libfaad2/syntax.c libfaad2/syntax.h libfaad2/tns.c
diffstat 52 files changed, 20316 insertions(+), 4651 deletions(-) [+]
line wrap: on
line diff
--- a/libfaad2/Makefile	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/Makefile	Fri Sep 24 17:31:36 2004 +0000
@@ -3,7 +3,7 @@
 
 include ../config.mak
 
-SRCS    = bits.c cfft.c common.c decoder.c drc.c error.c filtbank.c hcr.c huffman.c ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c pulse.c rvlc.c sbr_dct.c sbr_dec.c sbr_e_nf.c sbr_fbt.c sbr_hfadj.c sbr_hfgen.c sbr_huff.c sbr_qmf.c sbr_syntax.c sbr_tf_grid.c specrec.c ssr.c ssr_fb.c ssr_ipqf.c syntax.c tns.c
+SRCS    = bits.c cfft.c common.c decoder.c drc.c error.c filtbank.c hcr.c huffman.c ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c ps_dec.c ps_syntax.c  pulse.c rvlc.c sbr_dct.c sbr_dec.c sbr_e_nf.c sbr_fbt.c sbr_hfadj.c sbr_hfgen.c sbr_huff.c sbr_qmf.c sbr_syntax.c sbr_tf_grid.c specrec.c ssr.c ssr_fb.c ssr_ipqf.c syntax.c tns.c
 OBJS	= $(SRCS:.c=.o)
 
 CFLAGS  = -I. $(OPTFLAGS) 
--- a/libfaad2/README	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/README	Fri Sep 24 17:31:36 2004 +0000
@@ -1,1 +1,1 @@
-files from libfaad v2.0 tarball's libfaad/ and include/ subdir
+files from libfaad 2.1 beta CVS July 7th 2004 libfaad/ and include/ subdir
--- a/libfaad2/cfft.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/cfft.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: cfft.c,v 1.3 2004/06/02 22:59:02 diego Exp $
+** $Id: cfft.c,v 1.4 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -1377,17 +1377,17 @@
 
     switch (n)
     {
-    case 64: cfft->tab = cfft_tab_64; break;
-    case 512: cfft->tab = cfft_tab_512; break;
+    case 64: cfft->tab = (complex_t*)cfft_tab_64; break;
+    case 512: cfft->tab = (complex_t*)cfft_tab_512; break;
 #ifdef LD_DEC
-    case 256: cfft->tab = cfft_tab_256; break;
+    case 256: cfft->tab = (complex_t*)cfft_tab_256; break;
 #endif
 
 #ifdef ALLOW_SMALL_FRAMELENGTH
-    case 60: cfft->tab = cfft_tab_60; break;
-    case 480: cfft->tab = cfft_tab_480; break;
+    case 60: cfft->tab = (complex_t*)cfft_tab_60; break;
+    case 480: cfft->tab = (complex_t*)cfft_tab_480; break;
 #ifdef LD_DEC
-    case 240: cfft->tab = cfft_tab_240; break;
+    case 240: cfft->tab = (complex_t*)cfft_tab_240; break;
 #endif
 #endif
     }
--- a/libfaad2/common.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/common.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: common.c,v 1.3 2004/06/02 22:59:02 diego Exp $
+** $Id: common.c,v 1.4 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -233,7 +233,7 @@
 }
 
 /* common malloc function */
-void *faad_malloc(int32_t size)
+void *faad_malloc(size_t size)
 {
 #if 0 // defined(_WIN32) && !defined(_WIN32_WCE)
     return _aligned_malloc(size, 16);
@@ -304,3 +304,236 @@
 
 	return (__r1 = (t3 >> 1) | t1 ) ^ (__r2 = (t4 + t4) | t2 );
 }
+
+uint32_t ones32(uint32_t x)
+{
+    x -= ((x >> 1) & 0x55555555);
+    x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
+    x = (((x >> 4) + x) & 0x0f0f0f0f);
+    x += (x >> 8);
+    x += (x >> 16);
+
+    return (x & 0x0000003f);
+}
+
+uint32_t floor_log2(uint32_t x)
+{
+#if 1
+    x |= (x >> 1);
+    x |= (x >> 2);
+    x |= (x >> 4);
+    x |= (x >> 8);
+    x |= (x >> 16);
+
+    return (ones32(x) - 1);
+#else
+    uint32_t count = 0;
+
+    while (x >>= 1)
+        count++;
+
+    return count;
+#endif
+}
+
+/* returns position of first bit that is not 0 from msb,
+ * starting count at lsb */
+uint32_t wl_min_lzc(uint32_t x)
+{
+#if 1
+    x |= (x >> 1);
+    x |= (x >> 2);
+    x |= (x >> 4);
+    x |= (x >> 8);
+    x |= (x >> 16);
+
+    return (ones32(x));
+#else
+    uint32_t count = 0;
+
+    while (x >>= 1)
+        count++;
+
+    return (count + 1);
+#endif
+}
+
+#ifdef FIXED_POINT
+
+#define TABLE_BITS 6
+/* just take the maximum number of bits for interpolation */
+#define INTERP_BITS (REAL_BITS-TABLE_BITS)
+
+static const real_t pow2_tab[] = {
+    REAL_CONST(1.000000000000000), REAL_CONST(1.010889286051701), REAL_CONST(1.021897148654117),
+    REAL_CONST(1.033024879021228), REAL_CONST(1.044273782427414), REAL_CONST(1.055645178360557),
+    REAL_CONST(1.067140400676824), REAL_CONST(1.078760797757120), REAL_CONST(1.090507732665258),
+    REAL_CONST(1.102382583307841), REAL_CONST(1.114386742595892), REAL_CONST(1.126521618608242),
+    REAL_CONST(1.138788634756692), REAL_CONST(1.151189229952983), REAL_CONST(1.163724858777578),
+    REAL_CONST(1.176396991650281), REAL_CONST(1.189207115002721), REAL_CONST(1.202156731452703),
+    REAL_CONST(1.215247359980469), REAL_CONST(1.228480536106870), REAL_CONST(1.241857812073484),
+    REAL_CONST(1.255380757024691), REAL_CONST(1.269050957191733), REAL_CONST(1.282870016078778),
+    REAL_CONST(1.296839554651010), REAL_CONST(1.310961211524764), REAL_CONST(1.325236643159741),
+    REAL_CONST(1.339667524053303), REAL_CONST(1.354255546936893), REAL_CONST(1.369002422974591),
+    REAL_CONST(1.383909881963832), REAL_CONST(1.398979672538311), REAL_CONST(1.414213562373095),
+    REAL_CONST(1.429613338391970), REAL_CONST(1.445180806977047), REAL_CONST(1.460917794180647),
+    REAL_CONST(1.476826145939499), REAL_CONST(1.492907728291265), REAL_CONST(1.509164427593423),
+    REAL_CONST(1.525598150744538), REAL_CONST(1.542210825407941), REAL_CONST(1.559004400237837),
+    REAL_CONST(1.575980845107887), REAL_CONST(1.593142151342267), REAL_CONST(1.610490331949254),
+    REAL_CONST(1.628027421857348), REAL_CONST(1.645755478153965), REAL_CONST(1.663676580326736),
+    REAL_CONST(1.681792830507429), REAL_CONST(1.700106353718524), REAL_CONST(1.718619298122478),
+    REAL_CONST(1.737333835273706), REAL_CONST(1.756252160373300), REAL_CONST(1.775376492526521),
+    REAL_CONST(1.794709075003107), REAL_CONST(1.814252175500399), REAL_CONST(1.834008086409342),
+    REAL_CONST(1.853979125083386), REAL_CONST(1.874167634110300), REAL_CONST(1.894575981586966),
+    REAL_CONST(1.915206561397147), REAL_CONST(1.936061793492294), REAL_CONST(1.957144124175400),
+    REAL_CONST(1.978456026387951), REAL_CONST(2.000000000000000)
+};
+
+static const real_t log2_tab[] = {
+    REAL_CONST(0.000000000000000), REAL_CONST(0.022367813028455), REAL_CONST(0.044394119358453),
+    REAL_CONST(0.066089190457772), REAL_CONST(0.087462841250339), REAL_CONST(0.108524456778169),
+    REAL_CONST(0.129283016944966), REAL_CONST(0.149747119504682), REAL_CONST(0.169925001442312),
+    REAL_CONST(0.189824558880017), REAL_CONST(0.209453365628950), REAL_CONST(0.228818690495881),
+    REAL_CONST(0.247927513443585), REAL_CONST(0.266786540694901), REAL_CONST(0.285402218862248),
+    REAL_CONST(0.303780748177103), REAL_CONST(0.321928094887362), REAL_CONST(0.339850002884625),
+    REAL_CONST(0.357552004618084), REAL_CONST(0.375039431346925), REAL_CONST(0.392317422778760),
+    REAL_CONST(0.409390936137702), REAL_CONST(0.426264754702098), REAL_CONST(0.442943495848728),
+    REAL_CONST(0.459431618637297), REAL_CONST(0.475733430966398), REAL_CONST(0.491853096329675),
+    REAL_CONST(0.507794640198696), REAL_CONST(0.523561956057013), REAL_CONST(0.539158811108031),
+    REAL_CONST(0.554588851677637), REAL_CONST(0.569855608330948), REAL_CONST(0.584962500721156),
+    REAL_CONST(0.599912842187128), REAL_CONST(0.614709844115208), REAL_CONST(0.629356620079610),
+    REAL_CONST(0.643856189774725), REAL_CONST(0.658211482751795), REAL_CONST(0.672425341971496),
+    REAL_CONST(0.686500527183218), REAL_CONST(0.700439718141092), REAL_CONST(0.714245517666123),
+    REAL_CONST(0.727920454563199), REAL_CONST(0.741466986401147), REAL_CONST(0.754887502163469),
+    REAL_CONST(0.768184324776926), REAL_CONST(0.781359713524660), REAL_CONST(0.794415866350106),
+    REAL_CONST(0.807354922057604), REAL_CONST(0.820178962415188), REAL_CONST(0.832890014164742),
+    REAL_CONST(0.845490050944375), REAL_CONST(0.857980995127572), REAL_CONST(0.870364719583405),
+    REAL_CONST(0.882643049361841), REAL_CONST(0.894817763307943), REAL_CONST(0.906890595608519),
+    REAL_CONST(0.918863237274595), REAL_CONST(0.930737337562886), REAL_CONST(0.942514505339240),
+    REAL_CONST(0.954196310386875), REAL_CONST(0.965784284662087), REAL_CONST(0.977279923499917),
+    REAL_CONST(0.988684686772166), REAL_CONST(1.000000000000000)
+};
+
+real_t pow2_fix(real_t val)
+{
+    uint32_t x1, x2;
+    uint32_t errcorr;
+    uint32_t index_frac;
+    real_t retval;
+    int32_t whole = (val >> REAL_BITS);
+
+    /* rest = [0..1] */
+    int32_t rest = val - (whole << REAL_BITS);
+
+    /* index into pow2_tab */
+    int32_t index = rest >> (REAL_BITS-TABLE_BITS);
+
+
+    if (val == 0)
+        return (1<<REAL_BITS);
+
+    /* leave INTERP_BITS bits */
+    index_frac = rest >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
+    index_frac = index_frac & ((1<<INTERP_BITS)-1);
+
+    if (whole > 0)
+    {
+        retval = 1 << whole;
+    } else {
+        retval = REAL_CONST(1) >> -whole;
+    }
+
+    x1 = pow2_tab[index & ((1<<TABLE_BITS)-1)];
+    x2 = pow2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
+    errcorr = ( (index_frac*(x2-x1))) >> INTERP_BITS;
+
+    if (whole > 0)
+    {
+        retval = retval * (errcorr + x1);
+    } else {
+        retval = MUL_R(retval, (errcorr + x1));
+    }
+
+    return retval;
+}
+
+int32_t pow2_int(real_t val)
+{
+    uint32_t x1, x2;
+    uint32_t errcorr;
+    uint32_t index_frac;
+    real_t retval;
+    int32_t whole = (val >> REAL_BITS);
+
+    /* rest = [0..1] */
+    int32_t rest = val - (whole << REAL_BITS);
+
+    /* index into pow2_tab */
+    int32_t index = rest >> (REAL_BITS-TABLE_BITS);
+
+
+    if (val == 0)
+        return 1;
+
+    /* leave INTERP_BITS bits */
+    index_frac = rest >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
+    index_frac = index_frac & ((1<<INTERP_BITS)-1);
+
+    if (whole > 0)
+        retval = 1 << whole;
+    else
+        retval = 0;
+
+    x1 = pow2_tab[index & ((1<<TABLE_BITS)-1)];
+    x2 = pow2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
+    errcorr = ( (index_frac*(x2-x1))) >> INTERP_BITS;
+
+    retval = MUL_R(retval, (errcorr + x1));
+
+    return retval;
+}
+
+/* ld(x) = ld(x*y/y) = ld(x/y) + ld(y), with y=2^N and [1 <= (x/y) < 2] */
+int32_t log2_int(uint32_t val)
+{
+    uint32_t frac;
+    uint32_t whole = (val);
+    int8_t exp = 0;
+    uint32_t index;
+    uint32_t index_frac;
+    uint32_t x1, x2;
+    uint32_t errcorr;
+
+    /* error */
+    if (val == 0)
+        return -10000;
+
+    exp = floor_log2(val);
+    exp -= REAL_BITS;
+
+    /* frac = [1..2] */
+    if (exp >= 0)
+        frac = val >> exp;
+    else
+        frac = val << -exp;
+
+    /* index in the log2 table */
+    index = frac >> (REAL_BITS-TABLE_BITS);
+
+    /* leftover part for linear interpolation */
+    index_frac = frac & ((1<<(REAL_BITS-TABLE_BITS))-1);
+
+    /* leave INTERP_BITS bits */
+    index_frac = index_frac >> (REAL_BITS-TABLE_BITS-INTERP_BITS);
+
+    x1 = log2_tab[index & ((1<<TABLE_BITS)-1)];
+    x2 = log2_tab[(index & ((1<<TABLE_BITS)-1)) + 1];
+
+    /* linear interpolation */
+    /* retval = exp + ((index_frac)*x2 + (1-index_frac)*x1) */
+
+    errcorr = (index_frac * (x2-x1)) >> INTERP_BITS;
+
+    return ((exp+REAL_BITS) << REAL_BITS) + errcorr + x1;
+}
+#endif
--- a/libfaad2/common.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/common.h	Fri Sep 24 17:31:36 2004 +0000
@@ -39,8 +39,12 @@
 #define __STRICT_ANSI__
 #endif
 
+#ifdef HAVE_CONFIG_H
+#  include "../config.h"
+#endif
+
 #define INLINE __inline
-#if defined(_WIN32) && !defined(_WIN32_WCE)
+#if 0 //defined(_WIN32) && !defined(_WIN32_WCE)
 #define ALIGN __declspec(align(16))
 #else
 #define ALIGN
@@ -59,6 +63,10 @@
 /* #define USE_DOUBLE_PRECISION */
 /* use fixed point reals */
 //#define FIXED_POINT
+//#define BIG_IQ_TABLE
+
+/* Use if target platform has address generators with autoincrement */
+//#define PREFER_POINTERS
 
 #ifdef _WIN32_WCE
 #define FIXED_POINT
@@ -95,9 +103,10 @@
 #define ALLOW_SMALL_FRAMELENGTH
 
 
-// Define LC_ONLY_DECODER if you want a pure AAC LC decoder (independant of SBR_DEC)
+// Define LC_ONLY_DECODER if you want a pure AAC LC decoder (independant of SBR_DEC and PS_DEC)
 //#define LC_ONLY_DECODER
 #ifdef LC_ONLY_DECODER
+  #undef LD_DEC
   #undef LTP_DEC
   #undef MAIN_DEC
   #undef SSR_DEC
@@ -108,19 +117,13 @@
 
 #define SBR_DEC
 //#define SBR_LOW_POWER
-//#define PS_DEC
+#define PS_DEC
 
-/* FIXED POINT: No MAIN decoding, no SBR decoding */
+/* FIXED POINT: No MAIN decoding */
 #ifdef FIXED_POINT
 # ifdef MAIN_DEC
 #  undef MAIN_DEC
 # endif
-//# ifndef SBR_LOW_POWER
-//#  define SBR_LOW_POWER
-//# endif
-# ifdef SBR_DEC
-#  undef SBR_DEC
-# endif
 #endif // FIXED_POINT
 
 #ifdef DRM
@@ -137,9 +140,11 @@
 #endif
 
 #ifdef FIXED_POINT
-#define SBR_DIV(A, B) (((int64_t)A << REAL_BITS)/B)
+#define DIV_R(A, B) (((int64_t)A << REAL_BITS)/B)
+#define DIV_C(A, B) (((int64_t)A << COEF_BITS)/B)
 #else
-#define SBR_DIV(A, B) ((A)/(B))
+#define DIV_R(A, B) ((A)/(B))
+#define DIV_C(A, B) ((A)/(B))
 #endif
 
 #ifndef SBR_LOW_POWER
@@ -155,7 +160,9 @@
 
 /* END COMPILE TIME DEFINITIONS */
 
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(__MINGW32__)
+
+#include <stdlib.h>
 
 #if 0
 typedef unsigned __int64 uint64_t;
@@ -169,11 +176,11 @@
 #else
 #include <inttypes.h>
 #endif
+
 typedef float float32_t;
 
 
 #else
-/* Define if needed */
 
 /* #undef HAVE_FLOAT32_T */
 /* Define if you have the <inttypes.h> header file. */
@@ -295,6 +302,7 @@
 
   #define REAL_CONST(A) ((real_t)(A))
   #define COEF_CONST(A) ((real_t)(A))
+  #define Q2_CONST(A) ((real_t)(A))
   #define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */
 
 #else /* Normal floating point operation */
@@ -311,6 +319,7 @@
 
   #define REAL_CONST(A) ((real_t)(A))
   #define COEF_CONST(A) ((real_t)(A))
+  #define Q2_CONST(A) ((real_t)(A))
   #define FRAC_CONST(A) ((real_t)(A)) /* pure fractional part */
 
   /* Complex multiplication */
@@ -413,6 +422,15 @@
 /* common functions */
 uint8_t cpu_has_sse(void);
 uint32_t random_int(void);
+uint32_t ones32(uint32_t x);
+uint32_t floor_log2(uint32_t x);
+uint32_t wl_min_lzc(uint32_t x);
+#ifdef FIXED_POINT
+#define LOG2_MIN_INF REAL_CONST(-10000)
+int32_t log2_int(uint32_t val);
+int32_t pow2_int(real_t val);
+real_t pow2_fix(real_t val);
+#endif
 uint8_t get_sr_index(const uint32_t samplerate);
 uint8_t max_pred_sfb(const uint8_t sr_index);
 uint8_t max_tns_sfb(const uint8_t sr_index, const uint8_t object_type,
@@ -420,7 +438,7 @@
 uint32_t get_sample_rate(const uint8_t sr_index);
 int8_t can_decode_ot(const uint8_t object_type);
 
-void *faad_malloc(int32_t size);
+void *faad_malloc(size_t size);
 void faad_free(void *b);
 
 //#define PROFILE
--- a/libfaad2/decoder.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/decoder.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: decoder.c,v 1.3 2004/06/02 22:59:02 diego Exp $
+** $Id: decoder.c,v 1.4 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -52,14 +52,21 @@
 uint16_t dbg_count;
 #endif
 
-int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode)
+/* static function declarations */
+static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+                              uint8_t *buffer, uint32_t buffer_size,
+                              void **sample_buffer, uint32_t sample_buffer_size);
+static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo);
+
+
+char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode)
 {
     if (errcode >= NUM_ERROR_MESSAGES)
         return NULL;
     return err_msg[errcode];
 }
 
-uint32_t FAADAPI faacDecGetCapabilities(void)
+uint32_t NEAACDECAPI NeAACDecGetCapabilities(void)
 {
     uint32_t cap = 0;
 
@@ -85,15 +92,15 @@
     return cap;
 }
 
-faacDecHandle FAADAPI faacDecOpen(void)
+NeAACDecHandle NEAACDECAPI NeAACDecOpen(void)
 {
     uint8_t i;
-    faacDecHandle hDecoder = NULL;
+    NeAACDecHandle hDecoder = NULL;
 
-    if ((hDecoder = (faacDecHandle)faad_malloc(sizeof(faacDecStruct))) == NULL)
+    if ((hDecoder = (NeAACDecHandle)faad_malloc(sizeof(NeAACDecStruct))) == NULL)
         return NULL;
 
-    memset(hDecoder, 0, sizeof(faacDecStruct));
+    memset(hDecoder, 0, sizeof(NeAACDecStruct));
 
     hDecoder->config.outputFormat  = FAAD_FMT_16BIT;
     hDecoder->config.defObjectType = MAIN;
@@ -150,11 +157,11 @@
     return hDecoder;
 }
 
-faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder)
+NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder)
 {
     if (hDecoder)
     {
-        faacDecConfigurationPtr config = &(hDecoder->config);
+        NeAACDecConfigurationPtr config = &(hDecoder->config);
 
         return config;
     }
@@ -162,8 +169,8 @@
     return NULL;
 }
 
-uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
-                                    faacDecConfigurationPtr config)
+uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
+                                             NeAACDecConfigurationPtr config)
 {
     if (hDecoder && config)
     {
@@ -178,12 +185,18 @@
         hDecoder->config.defSampleRate = config->defSampleRate;
 
         /* check output format */
-        if ((config->outputFormat < 1) || (config->outputFormat > 9))
+#ifdef FIXED_POINT
+        if ((config->outputFormat < 1) || (config->outputFormat > 4))
             return 0;
+#else
+        if ((config->outputFormat < 1) || (config->outputFormat > 5))
+            return 0;
+#endif
         hDecoder->config.outputFormat = config->outputFormat;
 
         if (config->downMatrix > 1)
-            hDecoder->config.downMatrix = config->downMatrix;
+            return 0;
+        hDecoder->config.downMatrix = config->downMatrix;
 
         /* OK */
         return 1;
@@ -192,9 +205,9 @@
     return 0;
 }
 
-int32_t FAADAPI faacDecInit(faacDecHandle hDecoder, uint8_t *buffer,
-                            uint32_t buffer_size,
-                            uint32_t *samplerate, uint8_t *channels)
+int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer,
+                                 uint32_t buffer_size,
+                                 uint32_t *samplerate, uint8_t *channels)
 {
     uint32_t bits = 0;
     bitfile ld;
@@ -257,12 +270,23 @@
     }
     hDecoder->channelConfiguration = *channels;
 
+#if (defined(PS_DEC) || defined(DRM_PS))
+    /* check if we have a mono file */
+    if (*channels == 1)
+    {
+        /* upMatrix to 2 channels for implicit signalling of PS */
+        *channels = 2;
+    }
+#endif
+
 #ifdef SBR_DEC
     /* implicit signalling */
     if (*samplerate <= 24000 && !(hDecoder->config.dontUpSampleImplicitSBR))
     {
         *samplerate *= 2;
         hDecoder->forceUpSampling = 1;
+    } else if (*samplerate > 24000 && !(hDecoder->config.dontUpSampleImplicitSBR)) {
+        hDecoder->downSampledSBR = 1;
     }
 #endif
 
@@ -286,9 +310,9 @@
 }
 
 /* Init the library using a DecoderSpecificInfo */
-int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
-                            uint32_t SizeOfDecoderSpecificInfo,
-                            uint32_t *samplerate, uint8_t *channels)
+int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
+                                 uint32_t SizeOfDecoderSpecificInfo,
+                                 uint32_t *samplerate, uint8_t *channels)
 {
     int8_t rc;
     mp4AudioSpecificConfig mp4ASC;
@@ -318,6 +342,14 @@
         *channels = hDecoder->pce.channels;
         hDecoder->pce_set = 1;
     }
+#if (defined(PS_DEC) || defined(DRM_PS))
+    /* check if we have a mono file */
+    if (*channels == 1)
+    {
+        /* upMatrix to 2 channels for implicit signalling of PS */
+        *channels = 2;
+    }
+#endif
     hDecoder->sf_index = mp4ASC.samplingFrequencyIndex;
     hDecoder->object_type = mp4ASC.objectTypeIndex;
 #ifdef ERROR_RESILIENCE
@@ -327,13 +359,14 @@
 #endif
 #ifdef SBR_DEC
     hDecoder->sbr_present_flag = mp4ASC.sbr_present_flag;
+    hDecoder->downSampledSBR = mp4ASC.downSampledSBR;
     if (hDecoder->config.dontUpSampleImplicitSBR == 0)
         hDecoder->forceUpSampling = mp4ASC.forceUpSampling;
     else
         hDecoder->forceUpSampling = 0;
 
     /* AAC core decoder samplerate is 2 times as low */
-    if (hDecoder->sbr_present_flag == 1 || hDecoder->forceUpSampling == 1)
+    if (((hDecoder->sbr_present_flag == 1)&&(!hDecoder->downSampledSBR)) || hDecoder->forceUpSampling == 1)
     {
         hDecoder->sf_index = get_sr_index(mp4ASC.samplingFrequency / 2);
     }
@@ -368,100 +401,48 @@
 }
 
 #ifdef DRM
-int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
-                              uint8_t channels)
+int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
+                                   uint8_t channels)
 {
-    uint8_t i;
-
     if (hDecoder == NULL)
         return 1; /* error */
 
+    NeAACDecClose(*hDecoder);
+
+    *hDecoder = NeAACDecOpen();
+
     /* Special object type defined for DRM */
-    hDecoder->config.defObjectType = DRM_ER_LC;
+    (*hDecoder)->config.defObjectType = DRM_ER_LC;
 
-    hDecoder->config.defSampleRate = samplerate;
+    (*hDecoder)->config.defSampleRate = samplerate;
 #ifdef ERROR_RESILIENCE // This shoudl always be defined for DRM
-    hDecoder->aacSectionDataResilienceFlag = 1; /* VCB11 */
-    hDecoder->aacScalefactorDataResilienceFlag = 0; /* no RVLC */
-    hDecoder->aacSpectralDataResilienceFlag = 1; /* HCR */
+    (*hDecoder)->aacSectionDataResilienceFlag = 1; /* VCB11 */
+    (*hDecoder)->aacScalefactorDataResilienceFlag = 0; /* no RVLC */
+    (*hDecoder)->aacSpectralDataResilienceFlag = 1; /* HCR */
 #endif
-    hDecoder->frameLength = 960;
-    hDecoder->sf_index = get_sr_index(hDecoder->config.defSampleRate);
-    hDecoder->object_type = hDecoder->config.defObjectType;
+    (*hDecoder)->frameLength = 960;
+    (*hDecoder)->sf_index = get_sr_index((*hDecoder)->config.defSampleRate);
+    (*hDecoder)->object_type = (*hDecoder)->config.defObjectType;
 
     if ((channels == DRMCH_STEREO) || (channels == DRMCH_SBR_STEREO))
-        hDecoder->channelConfiguration = 2;
+        (*hDecoder)->channelConfiguration = 2;
     else
-        hDecoder->channelConfiguration = 1;
+        (*hDecoder)->channelConfiguration = 1;
 
 #ifdef SBR_DEC
-    if (channels == DRMCH_SBR_LC_STEREO)
-        hDecoder->lcstereo_flag = 1;
-    else
-        hDecoder->lcstereo_flag = 0;
-
     if ((channels == DRMCH_MONO) || (channels == DRMCH_STEREO))
-        hDecoder->sbr_present_flag = 0;
+        (*hDecoder)->sbr_present_flag = 0;
     else
-        hDecoder->sbr_present_flag = 1;
-
-    /* Reset sbr for new initialization */
-    sbrDecodeEnd(hDecoder->sbr[0]);
-    hDecoder->sbr[0] = NULL;
-#endif
-
-    if (hDecoder->fb) filter_bank_end(hDecoder->fb);
-    hDecoder->fb = NULL;
-
-    /* Take care of buffers */
-    if (hDecoder->sample_buffer) faad_free(hDecoder->sample_buffer);
-    hDecoder->sample_buffer = NULL;
-    hDecoder->alloced_channels = 0;
-
-    for (i = 0; i < MAX_CHANNELS; i++)
-    {
-        hDecoder->window_shape_prev[i] = 0;
+        (*hDecoder)->sbr_present_flag = 1;    
+#endif        
 
-        if (hDecoder->time_out[i]) faad_free(hDecoder->time_out[i]);
-        hDecoder->time_out[i] = NULL;
-        if (hDecoder->fb_intermed[i]) faad_free(hDecoder->fb_intermed[i]);
-        hDecoder->fb_intermed[i] = NULL;
-#ifdef SSR_DEC
-        if (hDecoder->ssr_overlap[i]) faad_free(hDecoder->ssr_overlap[i]);
-        hDecoder->ssr_overlap[i] = NULL;
-        if (hDecoder->prev_fmd[i]) faad_free(hDecoder->prev_fmd[i]);
-        hDecoder->prev_fmd[i] = NULL;
-#endif
-#ifdef MAIN_DEC
-        if (hDecoder->pred_stat[i]) faad_free(hDecoder->pred_stat[i]);
-        hDecoder->pred_stat[i] = NULL;
-#endif
-#ifdef LTP_DEC
-        hDecoder->ltp_lag[i] = 0;
-        if (hDecoder->lt_pred_stat[i]) faad_free(hDecoder->lt_pred_stat[i]);
-        hDecoder->lt_pred_stat[i] = NULL;
-#endif
-    }
-
-    for (i = 0; i < MAX_SYNTAX_ELEMENTS; i++)
-    {
-#ifdef SBR_DEC
-        if (hDecoder->sbr[i])
-            sbrDecodeEnd(hDecoder->sbr[i]);
-
-        hDecoder->sbr_alloced[i] = 0;
-#endif
-        hDecoder->element_alloced[i] = 0;
-        hDecoder->element_output_channels[i] = 0;
-    }
-
-    hDecoder->fb = filter_bank_init(hDecoder->frameLength);
+    (*hDecoder)->fb = filter_bank_init((*hDecoder)->frameLength);
 
     return 0;
 }
 #endif
 
-void FAADAPI faacDecClose(faacDecHandle hDecoder)
+void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder)
 {
     uint8_t i;
 
@@ -514,7 +495,7 @@
     if (hDecoder) faad_free(hDecoder);
 }
 
-void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, int32_t frame)
+void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame)
 {
     if (hDecoder)
     {
@@ -525,7 +506,7 @@
     }
 }
 
-static void create_channel_config(faacDecHandle hDecoder, faacDecFrameInfo *hInfo)
+static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo)
 {
     hInfo->num_front_channels = 0;
     hInfo->num_side_channels = 0;
@@ -730,9 +711,31 @@
     }
 }
 
-void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
-                            faacDecFrameInfo *hInfo,
-                            uint8_t *buffer, uint32_t buffer_size)
+void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
+                                 NeAACDecFrameInfo *hInfo,
+                                 uint8_t *buffer, uint32_t buffer_size)
+{
+    return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0);
+}
+
+void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
+                                  NeAACDecFrameInfo *hInfo,
+                                  uint8_t *buffer, uint32_t buffer_size,
+                                  void **sample_buffer, uint32_t sample_buffer_size)
+{
+    if ((sample_buffer == NULL) || (sample_buffer_size == 0))
+    {
+        hInfo->error = 27;
+        return NULL;
+    }
+
+    return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size,
+        sample_buffer, sample_buffer_size);
+}
+
+static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+                              uint8_t *buffer, uint32_t buffer_size,
+                              void **sample_buffer2, uint32_t sample_buffer_size)
 {
     uint8_t channels = 0;
     uint8_t output_channels = 0;
@@ -751,27 +754,49 @@
         return NULL;
     }
 
+#if 0
+    printf("%d\n", buffer_size*8);
+#endif
+
     frame_len = hDecoder->frameLength;
 
 
-    memset(hInfo, 0, sizeof(faacDecFrameInfo));
+    memset(hInfo, 0, sizeof(NeAACDecFrameInfo));
     memset(hDecoder->internal_channel, 0, MAX_CHANNELS*sizeof(hDecoder->internal_channel[0]));
 
     /* initialize the bitstream */
     faad_initbits(&ld, buffer, buffer_size);
 
+#if 0
+    {
+        int i;
+        for (i = 0; i < ((buffer_size+3)>>2); i++)
+        {
+            uint8_t *buf;
+            uint32_t temp = 0;
+            buf = faad_getbitbuffer(&ld, 32);
+            //temp = getdword((void*)buf);
+            temp = *((uint32_t*)buf);
+            printf("0x%.8X\n", temp);
+            free(buf);
+        }
+        faad_endbits(&ld);
+        faad_initbits(&ld, buffer, buffer_size);
+    }
+#endif
+
 #ifdef DRM
     if (hDecoder->object_type == DRM_ER_LC)
     {
         /* We do not support stereo right now */
-        if (hDecoder->channelConfiguration == 2)
+        if (0) //(hDecoder->channelConfiguration == 2)
         {
             hInfo->error = 8; // Throw CRC error
             goto error;
         }
 
         faad_getbits(&ld, 8
-            DEBUGVAR(1,1,"faacDecDecode(): skip CRC"));
+            DEBUGVAR(1,1,"NeAACDecDecode(): skip CRC"));
     }
 #endif
 
@@ -831,7 +856,7 @@
 
     if (!hDecoder->adts_header_present && !hDecoder->adif_header_present)
     {
-        if (channels != hDecoder->channelConfiguration)
+        if (hDecoder->channelConfiguration == 0)
             hDecoder->channelConfiguration = channels;
 
         if (channels == 8) /* 7.1 */
@@ -848,6 +873,17 @@
         output_channels = channels;
     }
 
+#if (defined(PS_DEC) || defined(DRM_PS))
+    hDecoder->upMatrix = 0;
+    /* check if we have a mono file */
+    if (output_channels == 1)
+    {
+        /* upMatrix to 2 channels for implicit signalling of PS */
+        hDecoder->upMatrix = 1;
+        output_channels = 2;
+    }
+#endif
+
     /* Make a channel configuration based on either a PCE or a channelConfiguration */
     create_channel_config(hDecoder, hInfo);
 
@@ -885,17 +921,32 @@
         };
         uint8_t stride = str[hDecoder->config.outputFormat-1];
 #ifdef SBR_DEC
-        if ((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
+        if (((hDecoder->sbr_present_flag == 1)&&(!hDecoder->downSampledSBR)) || (hDecoder->forceUpSampling == 1))
+        {
             stride = 2 * stride;
+        }
 #endif
-        if (hDecoder->sample_buffer)
-            faad_free(hDecoder->sample_buffer);
-        hDecoder->sample_buffer = NULL;
-        hDecoder->sample_buffer = faad_malloc(frame_len*output_channels*stride);
+        /* check if we want to use internal sample_buffer */
+        if (sample_buffer_size == 0)
+        {
+            if (hDecoder->sample_buffer)
+                faad_free(hDecoder->sample_buffer);
+            hDecoder->sample_buffer = NULL;
+            hDecoder->sample_buffer = faad_malloc(frame_len*output_channels*stride);
+        } else if (sample_buffer_size < frame_len*output_channels*stride) {
+            /* provided sample buffer is not big enough */
+            hInfo->error = 27;
+            return NULL;
+        }
         hDecoder->alloced_channels = output_channels;
     }
 
-    sample_buffer = hDecoder->sample_buffer;
+    if (sample_buffer_size == 0)
+    {
+        sample_buffer = hDecoder->sample_buffer;
+    } else {
+        sample_buffer = *sample_buffer2;
+    }
 
 #ifdef SBR_DEC
     if ((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
@@ -903,9 +954,12 @@
         uint8_t ele;
 
         /* this data is different when SBR is used or when the data is upsampled */
-        frame_len *= 2;
-        hInfo->samples *= 2;
-        hInfo->samplerate *= 2;
+        if (!hDecoder->downSampledSBR)
+        {
+            frame_len *= 2;
+            hInfo->samples *= 2;
+            hInfo->samplerate *= 2;
+        }
 
         /* check if every element was provided with SBR data */
         for (ele = 0; ele < hDecoder->fr_ch_ele; ele++)
@@ -925,6 +979,10 @@
         } else {
             hInfo->sbr = NO_SBR_UPSAMPLED;
         }
+        if (hDecoder->downSampledSBR)
+        {
+            hInfo->sbr = SBR_DOWNSAMPLED;
+        }
     }
 #endif
 
--- a/libfaad2/decoder.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/decoder.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: decoder.h,v 1.3 2004/06/02 22:59:02 diego Exp $
+** $Id: decoder.h,v 1.4 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -36,28 +36,22 @@
 
 #ifdef _WIN32
   #pragma pack(push, 8)
-  #ifndef FAADAPI
-    #define FAADAPI __cdecl
+  #ifndef NEAACDECAPI
+    #define NEAACDECAPI __cdecl
   #endif
 #else
-  #ifndef FAADAPI
-    #define FAADAPI
+  #ifndef NEAACDECAPI
+    #define NEAACDECAPI
   #endif
 #endif
 
-#include "bits.h"
-#include "syntax.h"
-#include "drc.h"
-#include "specrec.h"
-#include "filtbank.h"
-#include "ic_predict.h"
-
 
 /* library output formats */
 #define FAAD_FMT_16BIT  1
 #define FAAD_FMT_24BIT  2
 #define FAAD_FMT_32BIT  3
 #define FAAD_FMT_FLOAT  4
+#define FAAD_FMT_FIXED  FAAD_FMT_FLOAT
 #define FAAD_FMT_DOUBLE 5
 
 #define LC_DEC_CAP            (1<<0)
@@ -78,41 +72,46 @@
 #define LFE_CHANNEL          (9)
 #define UNKNOWN_CHANNEL      (0)
 
-int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode);
+char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode);
 
-uint32_t FAADAPI faacDecGetCapabilities(void);
+uint32_t NEAACDECAPI NeAACDecGetCapabilities(void);
 
-faacDecHandle FAADAPI faacDecOpen(void);
+NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
 
-faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
+NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
 
-uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
-                                    faacDecConfigurationPtr config);
+uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
+                                             NeAACDecConfigurationPtr config);
 
 /* Init the library based on info from the AAC file (ADTS/ADIF) */
-int32_t FAADAPI faacDecInit(faacDecHandle hDecoder,
-                            uint8_t *buffer,
-                            uint32_t buffer_size,
-                            uint32_t *samplerate,
-                            uint8_t *channels);
+int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
+                                 uint8_t *buffer,
+                                 uint32_t buffer_size,
+                                 uint32_t *samplerate,
+                                 uint8_t *channels);
 
 /* Init the library using a DecoderSpecificInfo */
-int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer,
-                         uint32_t SizeOfDecoderSpecificInfo,
-                         uint32_t *samplerate, uint8_t *channels);
+int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer,
+                                 uint32_t SizeOfDecoderSpecificInfo,
+                                 uint32_t *samplerate, uint8_t *channels);
 
 /* Init the library for DRM */
-int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
-                              uint8_t channels);
+int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate,
+                                   uint8_t channels);
 
-void FAADAPI faacDecClose(faacDecHandle hDecoder);
+void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
+
+void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame);
 
-void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, int32_t frame);
+void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
+                                 NeAACDecFrameInfo *hInfo,
+                                 uint8_t *buffer,
+                                 uint32_t buffer_size);
 
-void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
-                            faacDecFrameInfo *hInfo,
-                            uint8_t *buffer,
-                            uint32_t buffer_size);
+void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder,
+                                  NeAACDecFrameInfo *hInfo,
+                                  uint8_t *buffer, uint32_t buffer_size,
+                                  void **sample_buffer, uint32_t sample_buffer_size);
 
 #ifdef _WIN32
   #pragma pack(pop)
--- a/libfaad2/error.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/error.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,19 +23,19 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: error.c,v 1.2 2004/06/02 22:59:02 diego Exp $
+** $Id: error.c,v 1.3 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
 #include "common.h"
 #include "error.h"
 
-int8_t *err_msg[] = {
+char *err_msg[] = {
     "No error",
     "Gain control not yet implemented",
     "Pulse coding not allowed in short blocks",
     "Invalid huffman codebook",
-    "Negative scalefactor found, should be impossible",
+    "Scalefactor out of range",
     "Unable to find ADTS syncword",
     "Channel coupling not yet implemented",
     "Channel configuration not allowed in error resilient frame",
@@ -56,6 +56,8 @@
     "Error in program_config_element",
     "First SBR frame is not the same as first AAC frame",
     "Unexpected fill element with SBR data",
-    "Not all elements were provided with SBR data"
+    "Not all elements were provided with SBR data",
+    "LTP decoding not available",
+    "Output data buffer too small"
 };
 
--- a/libfaad2/error.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/error.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: error.h,v 1.2 2004/06/02 22:59:02 diego Exp $
+** $Id: error.h,v 1.3 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,8 +34,8 @@
 extern "C" {
 #endif
 
-#define NUM_ERROR_MESSAGES 26
-extern int8_t *err_msg[];
+#define NUM_ERROR_MESSAGES 28
+extern char *err_msg[];
 
 #ifdef __cplusplus
 }
--- a/libfaad2/faad.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/faad.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,200 +23,11 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: faad.h,v 1.3 2004/06/02 22:59:02 diego Exp $
+** $Id: faad.h,v 1.4 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
-
-#ifndef __AACDEC_H__
-#define __AACDEC_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifdef _WIN32
-  #pragma pack(push, 8)
-  #ifndef FAADAPI
-    #define FAADAPI __cdecl
-  #endif
-#else
-  #ifndef FAADAPI
-    #define FAADAPI
-  #endif
-#endif
-
-#define FAAD2_VERSION "2.0"
-
-/* object types for AAC */
-#define MAIN       1
-#define LC         2
-#define SSR        3
-#define LTP        4
-#define HE_AAC     5
-#define ER_LC     17
-#define ER_LTP    19
-#define LD        23
-#define DRM_ER_LC 27 /* special object type for DRM */
-
-/* header types */
-#define RAW        0
-#define ADIF       1
-#define ADTS       2
-
-/* SBR signalling */
-#define NO_SBR           0
-#define SBR_UPSAMPLED    1
-#define SBR_DOWNSAMPLED  2
-#define NO_SBR_UPSAMPLED 3
-
-/* library output formats */
-#define FAAD_FMT_16BIT  1
-#define FAAD_FMT_24BIT  2
-#define FAAD_FMT_32BIT  3
-#define FAAD_FMT_FLOAT  4
-#define FAAD_FMT_DOUBLE 5
-#define FAAD_FMT_16BIT_DITHER  6
-#define FAAD_FMT_16BIT_L_SHAPE 7
-#define FAAD_FMT_16BIT_M_SHAPE 8
-#define FAAD_FMT_16BIT_H_SHAPE 9
-
-/* Capabilities */
-#define LC_DEC_CAP            (1<<0)
-#define MAIN_DEC_CAP          (1<<1)
-#define LTP_DEC_CAP           (1<<2)
-#define LD_DEC_CAP            (1<<3)
-#define ERROR_RESILIENCE_CAP  (1<<4)
-#define FIXED_POINT_CAP       (1<<5)
-
-/* Channel definitions */
-#define FRONT_CHANNEL_CENTER (1)
-#define FRONT_CHANNEL_LEFT   (2)
-#define FRONT_CHANNEL_RIGHT  (3)
-#define SIDE_CHANNEL_LEFT    (4)
-#define SIDE_CHANNEL_RIGHT   (5)
-#define BACK_CHANNEL_LEFT    (6)
-#define BACK_CHANNEL_RIGHT   (7)
-#define BACK_CHANNEL_CENTER  (8)
-#define LFE_CHANNEL          (9)
-#define UNKNOWN_CHANNEL      (0)
-
-/* DRM channel definitions */
-#define DRMCH_MONO          1
-#define DRMCH_STEREO        2
-#define DRMCH_SBR_MONO      3
-#define DRMCH_SBR_LC_STEREO 4
-#define DRMCH_SBR_STEREO    5
-
-
-/* A decode call can eat up to FAAD_MIN_STREAMSIZE bytes per decoded channel,
-   so at least so much bytes per channel should be available in this stream */
-#define FAAD_MIN_STREAMSIZE 768 /* 6144 bits/channel */
-
-
-typedef void *faacDecHandle;
-
-typedef struct mp4AudioSpecificConfig
-{
-    /* Audio Specific Info */
-    unsigned char objectTypeIndex;
-    unsigned char samplingFrequencyIndex;
-    unsigned long samplingFrequency;
-    unsigned char channelsConfiguration;
+/* warn people for update */
+#pragma message("please update faad2 include filename and function names!")
 
-    /* GA Specific Info */
-    unsigned char frameLengthFlag;
-    unsigned char dependsOnCoreCoder;
-    unsigned short coreCoderDelay;
-    unsigned char extensionFlag;
-    unsigned char aacSectionDataResilienceFlag;
-    unsigned char aacScalefactorDataResilienceFlag;
-    unsigned char aacSpectralDataResilienceFlag;
-    unsigned char epConfig;
-
-    char sbr_present_flag;
-    char forceUpSampling;
-} mp4AudioSpecificConfig;
-
-typedef struct faacDecConfiguration
-{
-    unsigned char defObjectType;
-    unsigned long defSampleRate;
-    unsigned char outputFormat;
-    unsigned char downMatrix;
-    unsigned char useOldADTSFormat;
-} faacDecConfiguration, *faacDecConfigurationPtr;
-
-typedef struct faacDecFrameInfo
-{
-    unsigned long bytesconsumed;
-    unsigned long samples;
-    unsigned char channels;
-    unsigned char error;
-    unsigned long samplerate;
-
-    /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */
-    unsigned char sbr;
-
-    /* MPEG-4 ObjectType */
-    unsigned char object_type;
-
-    /* AAC header type; MP4 will be signalled as RAW also */
-    unsigned char header_type;
-
-    /* multichannel configuration */
-    unsigned char num_front_channels;
-    unsigned char num_side_channels;
-    unsigned char num_back_channels;
-    unsigned char num_lfe_channels;
-    unsigned char channel_position[64];
-} faacDecFrameInfo;
-
-char* FAADAPI faacDecGetErrorMessage(unsigned char errcode);
-
-unsigned long FAADAPI faacDecGetCapabilities();
-
-faacDecHandle FAADAPI faacDecOpen();
-
-faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder);
-
-unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder,
-                                    faacDecConfigurationPtr config);
-
-/* Init the library based on info from the AAC file (ADTS/ADIF) */
-long FAADAPI faacDecInit(faacDecHandle hDecoder,
-                        unsigned char *buffer,
-                        unsigned long buffer_size,
-                        unsigned long *samplerate,
-                        unsigned char *channels);
-
-/* Init the library using a DecoderSpecificInfo */
-char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer,
-                         unsigned long SizeOfDecoderSpecificInfo,
-                         unsigned long *samplerate, unsigned char *channels);
-
-/* Init the library for DRM */
-char FAADAPI faacDecInitDRM(faacDecHandle hDecoder, unsigned long samplerate,
-                            unsigned char channels);
-
-void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, long frame);
-
-void FAADAPI faacDecClose(faacDecHandle hDecoder);
-
-void* FAADAPI faacDecDecode(faacDecHandle hDecoder,
-                            faacDecFrameInfo *hInfo,
-                            unsigned char *buffer,
-                            unsigned long buffer_size);
-
-char FAADAPI AudioSpecificConfig(unsigned char *pBuffer,
-                                 unsigned long buffer_size,
-                                 mp4AudioSpecificConfig *mp4ASC);
-
-#ifdef _WIN32
-  #pragma pack(pop)
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
+/* Backwards compatible link */
+#include "neaacdec.h"
--- a/libfaad2/filtbank.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/filtbank.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: filtbank.c,v 1.3 2004/06/02 22:59:02 diego Exp $
+** $Id: filtbank.c,v 1.4 2004/06/23 13:50:49 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -217,6 +217,7 @@
     int64_t count = faad_get_ts();
 #endif
 
+    /* select windows of current frame and previous frame (Sine or KBD) */
 #ifdef LD_DEC
     if (object_type == LD)
     {
@@ -232,11 +233,24 @@
     }
 #endif
 
+#if 0
+    for (i = 0; i < 1024; i++)
+    {
+        printf("%d\n", freq_in[i]);
+    }
+#endif
+
+#if 0
+    printf("%d %d\n", window_sequence, window_shape);
+#endif
 
     switch (window_sequence)
     {
     case ONLY_LONG_SEQUENCE:
+        /* perform iMDCT */
         imdct_long(fb, freq_in, transf_buf, 2*nlong);
+
+        /* add second half output of previous frame to windowed output of current frame */
         for (i = 0; i < nlong; i+=4)
         {
             time_out[i]   = overlap[i]   + MUL_F(transf_buf[i],window_long_prev[i]);
@@ -244,6 +258,8 @@
             time_out[i+2] = overlap[i+2] + MUL_F(transf_buf[i+2],window_long_prev[i+2]);
             time_out[i+3] = overlap[i+3] + MUL_F(transf_buf[i+3],window_long_prev[i+3]);
         }
+
+        /* window the second half and save as overlap for next frame */
         for (i = 0; i < nlong; i+=4)
         {
             overlap[i]   = MUL_F(transf_buf[nlong+i],window_long[nlong-1-i]);
@@ -254,7 +270,10 @@
         break;
 
     case LONG_START_SEQUENCE:
+        /* perform iMDCT */
         imdct_long(fb, freq_in, transf_buf, 2*nlong);
+
+        /* add second half output of previous frame to windowed output of current frame */
         for (i = 0; i < nlong; i+=4)
         {
             time_out[i]   = overlap[i]   + MUL_F(transf_buf[i],window_long_prev[i]);
@@ -262,6 +281,9 @@
             time_out[i+2] = overlap[i+2] + MUL_F(transf_buf[i+2],window_long_prev[i+2]);
             time_out[i+3] = overlap[i+3] + MUL_F(transf_buf[i+3],window_long_prev[i+3]);
         }
+
+        /* window the second half and save as overlap for next frame */
+        /* construct second half window using padding with 1's and 0's */
         for (i = 0; i < nflat_ls; i++)
             overlap[i] = transf_buf[nlong+i];
         for (i = 0; i < nshort; i++)
@@ -271,6 +293,7 @@
         break;
 
     case EIGHT_SHORT_SEQUENCE:
+        /* perform iMDCT for each short block */
         faad_imdct(fb->mdct256, freq_in+0*nshort, transf_buf+2*nshort*0);
         faad_imdct(fb->mdct256, freq_in+1*nshort, transf_buf+2*nshort*1);
         faad_imdct(fb->mdct256, freq_in+2*nshort, transf_buf+2*nshort*2);
@@ -279,6 +302,8 @@
         faad_imdct(fb->mdct256, freq_in+5*nshort, transf_buf+2*nshort*5);
         faad_imdct(fb->mdct256, freq_in+6*nshort, transf_buf+2*nshort*6);
         faad_imdct(fb->mdct256, freq_in+7*nshort, transf_buf+2*nshort*7);
+
+        /* add second half output of previous frame to windowed output of current frame */
         for (i = 0; i < nflat_ls; i++)
             time_out[i] = overlap[i];
         for(i = 0; i < nshort; i++)
@@ -290,6 +315,8 @@
             if (i < trans)
                 time_out[nflat_ls+4*nshort+i] = overlap[nflat_ls+nshort*4+i] + MUL_F(transf_buf[nshort*7+i],window_short[nshort-1-i]) + MUL_F(transf_buf[nshort*8+i],window_short[i]);
         }
+
+        /* window the second half and save as overlap for next frame */
         for(i = 0; i < nshort; i++)
         {
             if (i >= trans)
@@ -304,18 +331,33 @@
         break;
 
     case LONG_STOP_SEQUENCE:
+        /* perform iMDCT */
         imdct_long(fb, freq_in, transf_buf, 2*nlong);
+
+        /* add second half output of previous frame to windowed output of current frame */
+        /* construct first half window using padding with 1's and 0's */
         for (i = 0; i < nflat_ls; i++)
             time_out[i] = overlap[i];
         for (i = 0; i < nshort; i++)
             time_out[nflat_ls+i] = overlap[nflat_ls+i] + MUL_F(transf_buf[nflat_ls+i],window_short_prev[i]);
         for (i = 0; i < nflat_ls; i++)
             time_out[nflat_ls+nshort+i] = overlap[nflat_ls+nshort+i] + transf_buf[nflat_ls+nshort+i];
+
+        /* window the second half and save as overlap for next frame */
         for (i = 0; i < nlong; i++)
             overlap[i] = MUL_F(transf_buf[nlong+i],window_long[nlong-1-i]);
 		break;
     }
 
+#if 0
+    for (i = 0; i < 1024; i++)
+    {
+        //printf("%d\n", time_out[i]);
+        printf("0x%.8X\n", time_out[i]);
+    }
+#endif
+
+
 #ifdef PROFILE
     count = faad_get_ts() - count;
     fb->cycles += count;
--- a/libfaad2/fixed.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/fixed.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: fixed.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: fixed.h,v 1.4 2004/06/23 13:50:50 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,7 +34,7 @@
 extern "C" {
 #endif
 
-#ifdef _WIN32_WCE
+#if defined(_WIN32_WCE) && defined(_ARM_)
 #include <cmnintrin.h>
 #endif
 
@@ -55,6 +55,11 @@
 #define REAL_CONST(A) (((A) >= 0) ? ((real_t)((A)*(REAL_PRECISION)+0.5)) : ((real_t)((A)*(REAL_PRECISION)-0.5)))
 #define COEF_CONST(A) (((A) >= 0) ? ((real_t)((A)*(COEF_PRECISION)+0.5)) : ((real_t)((A)*(COEF_PRECISION)-0.5)))
 #define FRAC_CONST(A) (((A) == 1.00) ? ((real_t)FRAC_MAX) : (((A) >= 0) ? ((real_t)((A)*(FRAC_PRECISION)+0.5)) : ((real_t)((A)*(FRAC_PRECISION)-0.5))))
+//#define FRAC_CONST(A) (((A) >= 0) ? ((real_t)((A)*(FRAC_PRECISION)+0.5)) : ((real_t)((A)*(FRAC_PRECISION)-0.5)))
+
+#define Q2_BITS 22
+#define Q2_PRECISION (1 << Q2_BITS)
+#define Q2_CONST(A) (((A) >= 0) ? ((real_t)((A)*(Q2_PRECISION)+0.5)) : ((real_t)((A)*(Q2_PRECISION)-0.5)))
 
 #if defined(_WIN32) && !defined(_WIN32_WCE)
 
@@ -78,6 +83,34 @@
     }
 }
 
+static INLINE real_t MUL_Q2(real_t A, real_t B)
+{
+    _asm {
+        mov eax,A
+        imul B
+        shrd eax,edx,Q2_BITS
+    }
+}
+
+static INLINE real_t MUL_SHIFT6(real_t A, real_t B)
+{
+    _asm {
+        mov eax,A
+        imul B
+        shrd eax,edx,6
+    }
+}
+
+static INLINE real_t MUL_SHIFT23(real_t A, real_t B)
+{
+    _asm {
+        mov eax,A
+        imul B
+        shrd eax,edx,23
+    }
+}
+
+#if 1
 static INLINE real_t _MulHigh(real_t A, real_t B)
 {
     _asm {
@@ -100,6 +133,24 @@
     *y1 = (_MulHigh(x1, c1) + _MulHigh(x2, c2))<<(FRAC_SIZE-FRAC_BITS);
     *y2 = (_MulHigh(x2, c1) - _MulHigh(x1, c2))<<(FRAC_SIZE-FRAC_BITS);
 }
+#else
+static INLINE real_t MUL_F(real_t A, real_t B)
+{
+    _asm {
+        mov eax,A
+        imul B
+        shrd eax,edx,FRAC_BITS
+    }
+}
+
+/* Complex multiplication */
+static INLINE void ComplexMult(real_t *y1, real_t *y2,
+    real_t x1, real_t x2, real_t c1, real_t c2)
+{
+    *y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
+    *y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
+}
+#endif
 
 #elif defined(__GNUC__) && defined (__arm__)
 
@@ -129,6 +180,21 @@
     return arm_mul(A, B, COEF_BITS);
 }
 
+static INLINE real_t MUL_Q2(real_t A, real_t B)
+{
+    return arm_mul(A, B, Q2_BITS);
+}
+
+static INLINE real_t MUL_SHIFT6(real_t A, real_t B)
+{
+    return arm_mul(A, B, 6);
+}
+
+static INLINE real_t MUL_SHIFT23(real_t A, real_t B)
+{
+    return arm_mul(A, B, 23);
+}
+
 static INLINE real_t _MulHigh(real_t x, real_t y)
 {
     uint32_t __lo;
@@ -169,16 +235,19 @@
   /* multiply with coef shift */
   #define MUL_C(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (COEF_BITS-1))) >> COEF_BITS)
   /* multiply with fractional shift */
-#ifndef _WIN32_WCE
-  #define _MulHigh(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (FRAC_SIZE-1))) >> FRAC_SIZE)
-  #define MUL_F(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (FRAC_BITS-1))) >> FRAC_BITS)
-#else
+#if defined(_WIN32_WCE) && defined(_ARM_)
   /* eVC for PocketPC has an intrinsic function that returns only the high 32 bits of a 32x32 bit multiply */
   static INLINE real_t MUL_F(real_t A, real_t B)
   {
       return _MulHigh(A,B) << (32-FRAC_BITS);
   }
+#else
+  #define _MulHigh(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (FRAC_SIZE-1))) >> FRAC_SIZE)
+  #define MUL_F(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (FRAC_BITS-1))) >> FRAC_BITS)
 #endif
+  #define MUL_Q2(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (Q2_BITS-1))) >> Q2_BITS)
+  #define MUL_SHIFT6(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (6-1))) >> 6)
+  #define MUL_SHIFT23(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (23-1))) >> 23)
 
 /* Complex multiplication */
 static INLINE void ComplexMult(real_t *y1, real_t *y2,
--- a/libfaad2/hcr.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/hcr.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: hcr.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: hcr.c,v 1.4 2004/06/23 13:50:50 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -144,7 +144,7 @@
 
 #define segmentWidth( codebook )	min( maxCwLen[codebook], ics->length_of_longest_codeword )
      
-uint8_t reordered_spectral_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
                                 int16_t *spectral_data)
 {
     uint16_t sp_offset[8];
--- a/libfaad2/huffman.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/huffman.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Alex Beregszaszi on 2003/10/03
-** $Id: huffman.c,v 1.2 2004/06/02 22:59:03 diego Exp $
+** $Id: huffman.c,v 1.3 2004/06/23 13:50:50 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -122,8 +122,8 @@
 static INLINE int16_t huffman_getescape(bitfile *ld, int16_t sp)
 {
     uint8_t neg, i;
-    int32_t j;
-	int32_t off;
+    int16_t j;
+	int16_t off;
 
     if (sp < 0)
     {
@@ -145,7 +145,7 @@
         }
     }
 
-    off = faad_getbits(ld, i
+    off = (int16_t)faad_getbits(ld, i
         DEBUGVAR(1,9,"huffman_getescape(): escape"));
 
     j = off | (1<<i);
--- a/libfaad2/iq_table.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/iq_table.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: iq_table.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: iq_table.h,v 1.4 2004/06/23 13:50:50 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -8245,7 +8245,11 @@
 
 #else
 
+#ifdef BIG_IQ_TABLE
+#define IQ_TABLE_SIZE  8192
+#else
 #define IQ_TABLE_SIZE  1026
+#endif
 
 ALIGN static const real_t iq_table[IQ_TABLE_SIZE] =
 {
@@ -9275,6 +9279,7174 @@
     REAL_CONST(10307.836270711066/8.0),
     REAL_CONST(10321.273240738796/8.0),
     REAL_CONST(10334.71458549278/8.0)
+#ifdef BIG_IQ_TABLE
+   ,REAL_CONST(10348.160302127204/8.0),
+    REAL_CONST(10361.610387800878/8.0),
+    REAL_CONST(10375.064839677221/8.0),
+    REAL_CONST(10388.523654924258/8.0),
+    REAL_CONST(10401.986830714593/8.0),
+    REAL_CONST(10415.454364225412/8.0),
+    REAL_CONST(10428.926252638465/8.0),
+    REAL_CONST(10442.402493140049/8.0),
+    REAL_CONST(10455.883082921007/8.0),
+    REAL_CONST(10469.368019176709/8.0),
+    REAL_CONST(10482.85729910704/8.0),
+    REAL_CONST(10496.350919916393/8.0),
+    REAL_CONST(10509.848878813653/8.0),
+    REAL_CONST(10523.351173012188/8.0),
+    REAL_CONST(10536.857799729838/8.0),
+    REAL_CONST(10550.3687561889/8.0),
+    REAL_CONST(10563.884039616123/8.0),
+    REAL_CONST(10577.403647242685/8.0),
+    REAL_CONST(10590.927576304197/8.0),
+    REAL_CONST(10604.455824040679/8.0),
+    REAL_CONST(10617.988387696556/8.0),
+    REAL_CONST(10631.525264520642/8.0),
+    REAL_CONST(10645.066451766135/8.0),
+    REAL_CONST(10658.611946690598/8.0),
+    REAL_CONST(10672.161746555956/8.0),
+    REAL_CONST(10685.715848628475/8.0),
+    REAL_CONST(10699.274250178762/8.0),
+    REAL_CONST(10712.836948481747/8.0),
+    REAL_CONST(10726.403940816675/8.0),
+    REAL_CONST(10739.975224467091/8.0),
+    REAL_CONST(10753.550796720834/8.0),
+    REAL_CONST(10767.130654870027/8.0),
+    REAL_CONST(10780.714796211059/8.0),
+    REAL_CONST(10794.303218044579/8.0),
+    REAL_CONST(10807.895917675487/8.0),
+    REAL_CONST(10821.492892412922/8.0),
+    REAL_CONST(10835.094139570248/8.0),
+    REAL_CONST(10848.699656465047/8.0),
+    REAL_CONST(10862.309440419107/8.0),
+    REAL_CONST(10875.923488758415/8.0),
+    REAL_CONST(10889.541798813138/8.0),
+    REAL_CONST(10903.16436791762/8.0),
+    REAL_CONST(10916.791193410372/8.0),
+    REAL_CONST(10930.422272634056/8.0),
+    REAL_CONST(10944.05760293548/8.0),
+    REAL_CONST(10957.697181665582/8.0),
+    REAL_CONST(10971.341006179427/8.0),
+    REAL_CONST(10984.98907383619/8.0),
+    REAL_CONST(10998.641381999149/8.0),
+    REAL_CONST(11012.297928035676/8.0),
+    REAL_CONST(11025.958709317223/8.0),
+    REAL_CONST(11039.623723219316/8.0),
+    REAL_CONST(11053.292967121541/8.0),
+    REAL_CONST(11066.966438407539/8.0),
+    REAL_CONST(11080.64413446499/8.0),
+    REAL_CONST(11094.326052685608/8.0),
+    REAL_CONST(11108.012190465128/8.0),
+    REAL_CONST(11121.702545203296/8.0),
+    REAL_CONST(11135.397114303863/8.0),
+    REAL_CONST(11149.095895174571/8.0),
+    REAL_CONST(11162.798885227143/8.0),
+    REAL_CONST(11176.506081877278/8.0),
+    REAL_CONST(11190.217482544635/8.0),
+    REAL_CONST(11203.933084652828/8.0),
+    REAL_CONST(11217.652885629415/8.0),
+    REAL_CONST(11231.376882905886/8.0),
+    REAL_CONST(11245.105073917659/8.0),
+    REAL_CONST(11258.837456104062/8.0),
+    REAL_CONST(11272.574026908333/8.0),
+    REAL_CONST(11286.314783777601/8.0),
+    REAL_CONST(11300.059724162888/8.0),
+    REAL_CONST(11313.808845519083/8.0),
+    REAL_CONST(11327.562145304952/8.0),
+    REAL_CONST(11341.319620983111/8.0),
+    REAL_CONST(11355.081270020033/8.0),
+    REAL_CONST(11368.847089886023/8.0),
+    REAL_CONST(11382.617078055218/8.0),
+    REAL_CONST(11396.391232005579/8.0),
+    REAL_CONST(11410.169549218874/8.0),
+    REAL_CONST(11423.952027180676/8.0),
+    REAL_CONST(11437.738663380349/8.0),
+    REAL_CONST(11451.529455311042/8.0),
+    REAL_CONST(11465.324400469679/8.0),
+    REAL_CONST(11479.123496356951/8.0),
+    REAL_CONST(11492.926740477304/8.0),
+    REAL_CONST(11506.734130338931/8.0),
+    REAL_CONST(11520.545663453764/8.0),
+    REAL_CONST(11534.361337337466/8.0),
+    REAL_CONST(11548.181149509423/8.0),
+    REAL_CONST(11562.005097492724/8.0),
+    REAL_CONST(11575.83317881417/8.0),
+    REAL_CONST(11589.665391004253/8.0),
+    REAL_CONST(11603.501731597149/8.0),
+    REAL_CONST(11617.342198130715/8.0),
+    REAL_CONST(11631.186788146468/8.0),
+    REAL_CONST(11645.035499189589/8.0),
+    REAL_CONST(11658.888328808911/8.0),
+    REAL_CONST(11672.745274556904/8.0),
+    REAL_CONST(11686.606333989675/8.0),
+    REAL_CONST(11700.471504666955/8.0),
+    REAL_CONST(11714.340784152086/8.0),
+    REAL_CONST(11728.214170012021/8.0),
+    REAL_CONST(11742.091659817312/8.0),
+    REAL_CONST(11755.973251142101/8.0),
+    REAL_CONST(11769.858941564111/8.0),
+    REAL_CONST(11783.748728664636/8.0),
+    REAL_CONST(11797.642610028539/8.0),
+    REAL_CONST(11811.540583244237/8.0),
+    REAL_CONST(11825.442645903697/8.0),
+    REAL_CONST(11839.34879560242/8.0),
+    REAL_CONST(11853.259029939445/8.0),
+    REAL_CONST(11867.173346517333/8.0),
+    REAL_CONST(11881.091742942155/8.0),
+    REAL_CONST(11895.014216823492/8.0),
+    REAL_CONST(11908.940765774427/8.0),
+    REAL_CONST(11922.871387411526/8.0),
+    REAL_CONST(11936.806079354839/8.0),
+    REAL_CONST(11950.744839227897/8.0),
+    REAL_CONST(11964.687664657684/8.0),
+    REAL_CONST(11978.634553274653/8.0),
+    REAL_CONST(11992.585502712702/8.0),
+    REAL_CONST(12006.540510609168/8.0),
+    REAL_CONST(12020.499574604828/8.0),
+    REAL_CONST(12034.462692343877/8.0),
+    REAL_CONST(12048.429861473938/8.0),
+    REAL_CONST(12062.401079646032/8.0),
+    REAL_CONST(12076.376344514589/8.0),
+    REAL_CONST(12090.355653737433/8.0),
+    REAL_CONST(12104.339004975769/8.0),
+    REAL_CONST(12118.326395894188/8.0),
+    REAL_CONST(12132.317824160644/8.0),
+    REAL_CONST(12146.313287446457/8.0),
+    REAL_CONST(12160.312783426305/8.0),
+    REAL_CONST(12174.316309778205/8.0),
+    REAL_CONST(12188.323864183525/8.0),
+    REAL_CONST(12202.335444326955/8.0),
+    REAL_CONST(12216.351047896511/8.0),
+    REAL_CONST(12230.370672583531/8.0),
+    REAL_CONST(12244.394316082657/8.0),
+    REAL_CONST(12258.421976091831/8.0),
+    REAL_CONST(12272.453650312296/8.0),
+    REAL_CONST(12286.489336448574/8.0),
+    REAL_CONST(12300.529032208471/8.0),
+    REAL_CONST(12314.572735303058/8.0),
+    REAL_CONST(12328.620443446678/8.0),
+    REAL_CONST(12342.672154356922/8.0),
+    REAL_CONST(12356.727865754638/8.0),
+    REAL_CONST(12370.787575363909/8.0),
+    REAL_CONST(12384.851280912055/8.0),
+    REAL_CONST(12398.918980129623/8.0),
+    REAL_CONST(12412.990670750381/8.0),
+    REAL_CONST(12427.066350511306/8.0),
+    REAL_CONST(12441.146017152583/8.0),
+    REAL_CONST(12455.229668417589/8.0),
+    REAL_CONST(12469.317302052901/8.0),
+    REAL_CONST(12483.40891580827/8.0),
+    REAL_CONST(12497.50450743663/8.0),
+    REAL_CONST(12511.604074694078/8.0),
+    REAL_CONST(12525.707615339878/8.0),
+    REAL_CONST(12539.815127136444/8.0),
+    REAL_CONST(12553.926607849342/8.0),
+    REAL_CONST(12568.042055247275/8.0),
+    REAL_CONST(12582.161467102082/8.0),
+    REAL_CONST(12596.284841188726/8.0),
+    REAL_CONST(12610.41217528529/8.0),
+    REAL_CONST(12624.543467172971/8.0),
+    REAL_CONST(12638.678714636069/8.0),
+    REAL_CONST(12652.817915461985/8.0),
+    REAL_CONST(12666.961067441209/8.0),
+    REAL_CONST(12681.108168367316/8.0),
+    REAL_CONST(12695.259216036962/8.0),
+    REAL_CONST(12709.414208249869/8.0),
+    REAL_CONST(12723.573142808827/8.0),
+    REAL_CONST(12737.736017519681/8.0),
+    REAL_CONST(12751.902830191326/8.0),
+    REAL_CONST(12766.073578635704/8.0),
+    REAL_CONST(12780.248260667788/8.0),
+    REAL_CONST(12794.426874105588/8.0),
+    REAL_CONST(12808.609416770132/8.0),
+    REAL_CONST(12822.795886485468/8.0),
+    REAL_CONST(12836.986281078653/8.0),
+    REAL_CONST(12851.180598379744/8.0),
+    REAL_CONST(12865.378836221802/8.0),
+    REAL_CONST(12879.580992440871/8.0),
+    REAL_CONST(12893.787064875984/8.0),
+    REAL_CONST(12907.997051369144/8.0),
+    REAL_CONST(12922.210949765335/8.0),
+    REAL_CONST(12936.428757912496/8.0),
+    REAL_CONST(12950.650473661524/8.0),
+    REAL_CONST(12964.876094866273/8.0),
+    REAL_CONST(12979.105619383534/8.0),
+    REAL_CONST(12993.339045073039/8.0),
+    REAL_CONST(13007.576369797454/8.0),
+    REAL_CONST(13021.817591422368/8.0),
+    REAL_CONST(13036.062707816285/8.0),
+    REAL_CONST(13050.311716850629/8.0),
+    REAL_CONST(13064.564616399723/8.0),
+    REAL_CONST(13078.821404340792/8.0),
+    REAL_CONST(13093.082078553954/8.0),
+    REAL_CONST(13107.346636922217/8.0),
+    REAL_CONST(13121.615077331464/8.0),
+    REAL_CONST(13135.887397670458/8.0),
+    REAL_CONST(13150.163595830827/8.0),
+    REAL_CONST(13164.44366970706/8.0),
+    REAL_CONST(13178.727617196502/8.0),
+    REAL_CONST(13193.015436199352/8.0),
+    REAL_CONST(13207.307124618648/8.0),
+    REAL_CONST(13221.602680360265/8.0),
+    REAL_CONST(13235.902101332911/8.0),
+    REAL_CONST(13250.205385448118/8.0),
+    REAL_CONST(13264.512530620239/8.0),
+    REAL_CONST(13278.823534766434/8.0),
+    REAL_CONST(13293.138395806676/8.0),
+    REAL_CONST(13307.457111663734/8.0),
+    REAL_CONST(13321.779680263176/8.0),
+    REAL_CONST(13336.106099533356/8.0),
+    REAL_CONST(13350.436367405409/8.0),
+    REAL_CONST(13364.77048181325/8.0),
+    REAL_CONST(13379.108440693562/8.0),
+    REAL_CONST(13393.450241985796/8.0),
+    REAL_CONST(13407.795883632158/8.0),
+    REAL_CONST(13422.145363577607/8.0),
+    REAL_CONST(13436.498679769853/8.0),
+    REAL_CONST(13450.855830159346/8.0),
+    REAL_CONST(13465.216812699266/8.0),
+    REAL_CONST(13479.581625345529/8.0),
+    REAL_CONST(13493.950266056772/8.0),
+    REAL_CONST(13508.32273279435/8.0),
+    REAL_CONST(13522.699023522329/8.0),
+    REAL_CONST(13537.079136207483/8.0),
+    REAL_CONST(13551.463068819286/8.0),
+    REAL_CONST(13565.850819329906/8.0),
+    REAL_CONST(13580.2423857142/8.0),
+    REAL_CONST(13594.63776594971/8.0),
+    REAL_CONST(13609.036958016657/8.0),
+    REAL_CONST(13623.439959897927/8.0),
+    REAL_CONST(13637.846769579081/8.0),
+    REAL_CONST(13652.257385048335/8.0),
+    REAL_CONST(13666.67180429656/8.0),
+    REAL_CONST(13681.090025317284/8.0),
+    REAL_CONST(13695.512046106669/8.0),
+    REAL_CONST(13709.937864663521/8.0),
+    REAL_CONST(13724.367478989278/8.0),
+    REAL_CONST(13738.800887088004/8.0),
+    REAL_CONST(13753.238086966385/8.0),
+    REAL_CONST(13767.679076633727/8.0),
+    REAL_CONST(13782.123854101939/8.0),
+    REAL_CONST(13796.572417385545/8.0),
+    REAL_CONST(13811.024764501659/8.0),
+    REAL_CONST(13825.480893469998/8.0),
+    REAL_CONST(13839.94080231286/8.0),
+    REAL_CONST(13854.404489055134/8.0),
+    REAL_CONST(13868.871951724283/8.0),
+    REAL_CONST(13883.34318835034/8.0),
+    REAL_CONST(13897.818196965914/8.0),
+    REAL_CONST(13912.296975606168/8.0),
+    REAL_CONST(13926.779522308825/8.0),
+    REAL_CONST(13941.26583511416/8.0),
+    REAL_CONST(13955.755912064991/8.0),
+    REAL_CONST(13970.249751206682/8.0),
+    REAL_CONST(13984.747350587126/8.0),
+    REAL_CONST(13999.248708256751/8.0),
+    REAL_CONST(14013.753822268511/8.0),
+    REAL_CONST(14028.262690677873/8.0),
+    REAL_CONST(14042.775311542828/8.0),
+    REAL_CONST(14057.291682923867/8.0),
+    REAL_CONST(14071.811802883994/8.0),
+    REAL_CONST(14086.335669488704/8.0),
+    REAL_CONST(14100.863280805994/8.0),
+    REAL_CONST(14115.394634906341/8.0),
+    REAL_CONST(14129.92972986271/8.0),
+    REAL_CONST(14144.468563750548/8.0),
+    REAL_CONST(14159.01113464777/8.0),
+    REAL_CONST(14173.55744063476/8.0),
+    REAL_CONST(14188.107479794369/8.0),
+    REAL_CONST(14202.661250211901/8.0),
+    REAL_CONST(14217.218749975118/8.0),
+    REAL_CONST(14231.779977174227/8.0),
+    REAL_CONST(14246.344929901879/8.0),
+    REAL_CONST(14260.913606253163/8.0),
+    REAL_CONST(14275.486004325601/8.0),
+    REAL_CONST(14290.062122219146/8.0),
+    REAL_CONST(14304.641958036171/8.0),
+    REAL_CONST(14319.225509881464/8.0),
+    REAL_CONST(14333.812775862236/8.0),
+    REAL_CONST(14348.403754088098/8.0),
+    REAL_CONST(14362.998442671067/8.0),
+    REAL_CONST(14377.59683972556/8.0),
+    REAL_CONST(14392.198943368388/8.0),
+    REAL_CONST(14406.804751718748/8.0),
+    REAL_CONST(14421.414262898223/8.0),
+    REAL_CONST(14436.027475030774/8.0),
+    REAL_CONST(14450.64438624274/8.0),
+    REAL_CONST(14465.264994662828/8.0),
+    REAL_CONST(14479.889298422106/8.0),
+    REAL_CONST(14494.517295654005/8.0),
+    REAL_CONST(14509.148984494313/8.0),
+    REAL_CONST(14523.784363081166/8.0),
+    REAL_CONST(14538.423429555049/8.0),
+    REAL_CONST(14553.066182058781/8.0),
+    REAL_CONST(14567.712618737527/8.0),
+    REAL_CONST(14582.362737738777/8.0),
+    REAL_CONST(14597.016537212348/8.0),
+    REAL_CONST(14611.674015310382/8.0),
+    REAL_CONST(14626.33517018734/8.0),
+    REAL_CONST(14640.999999999993/8.0),
+    REAL_CONST(14655.668502907418/8.0),
+    REAL_CONST(14670.340677071003/8.0),
+    REAL_CONST(14685.016520654426/8.0),
+    REAL_CONST(14699.696031823671/8.0),
+    REAL_CONST(14714.379208746999/8.0),
+    REAL_CONST(14729.066049594967/8.0),
+    REAL_CONST(14743.756552540408/8.0),
+    REAL_CONST(14758.45071575843/8.0),
+    REAL_CONST(14773.148537426418/8.0),
+    REAL_CONST(14787.850015724018/8.0),
+    REAL_CONST(14802.555148833142/8.0),
+    REAL_CONST(14817.263934937961/8.0),
+    REAL_CONST(14831.976372224897/8.0),
+    REAL_CONST(14846.692458882624/8.0),
+    REAL_CONST(14861.41219310206/8.0),
+    REAL_CONST(14876.135573076363/8.0),
+    REAL_CONST(14890.862597000923/8.0),
+    REAL_CONST(14905.593263073371/8.0),
+    REAL_CONST(14920.327569493558/8.0),
+    REAL_CONST(14935.065514463557/8.0),
+    REAL_CONST(14949.807096187662/8.0),
+    REAL_CONST(14964.552312872382/8.0),
+    REAL_CONST(14979.301162726431/8.0),
+    REAL_CONST(14994.053643960735/8.0),
+    REAL_CONST(15008.809754788414/8.0),
+    REAL_CONST(15023.569493424788/8.0),
+    REAL_CONST(15038.332858087369/8.0),
+    REAL_CONST(15053.099846995858/8.0),
+    REAL_CONST(15067.870458372134/8.0),
+    REAL_CONST(15082.644690440264/8.0),
+    REAL_CONST(15097.422541426484/8.0),
+    REAL_CONST(15112.204009559202/8.0),
+    REAL_CONST(15126.989093068994/8.0),
+    REAL_CONST(15141.777790188597/8.0),
+    REAL_CONST(15156.570099152905/8.0),
+    REAL_CONST(15171.366018198967/8.0),
+    REAL_CONST(15186.165545565986/8.0),
+    REAL_CONST(15200.968679495301/8.0),
+    REAL_CONST(15215.775418230402/8.0),
+    REAL_CONST(15230.585760016909/8.0),
+    REAL_CONST(15245.399703102579/8.0),
+    REAL_CONST(15260.217245737298/8.0),
+    REAL_CONST(15275.038386173073/8.0),
+    REAL_CONST(15289.863122664035/8.0),
+    REAL_CONST(15304.691453466432/8.0),
+    REAL_CONST(15319.523376838621/8.0),
+    REAL_CONST(15334.358891041069/8.0),
+    REAL_CONST(15349.197994336346/8.0),
+    REAL_CONST(15364.040684989128/8.0),
+    REAL_CONST(15378.886961266177/8.0),
+    REAL_CONST(15393.736821436356/8.0),
+    REAL_CONST(15408.590263770609/8.0),
+    REAL_CONST(15423.447286541972/8.0),
+    REAL_CONST(15438.307888025554/8.0),
+    REAL_CONST(15453.172066498542/8.0),
+    REAL_CONST(15468.039820240196/8.0),
+    REAL_CONST(15482.91114753184/8.0),
+    REAL_CONST(15497.786046656869/8.0),
+    REAL_CONST(15512.664515900733/8.0),
+    REAL_CONST(15527.546553550939/8.0),
+    REAL_CONST(15542.432157897045/8.0),
+    REAL_CONST(15557.32132723066/8.0),
+    REAL_CONST(15572.214059845435/8.0),
+    REAL_CONST(15587.110354037064/8.0),
+    REAL_CONST(15602.010208103273/8.0),
+    REAL_CONST(15616.913620343823/8.0),
+    REAL_CONST(15631.820589060506/8.0),
+    REAL_CONST(15646.731112557136/8.0),
+    REAL_CONST(15661.645189139546/8.0),
+    REAL_CONST(15676.562817115593/8.0),
+    REAL_CONST(15691.483994795139/8.0),
+    REAL_CONST(15706.408720490062/8.0),
+    REAL_CONST(15721.336992514242/8.0),
+    REAL_CONST(15736.268809183561/8.0),
+    REAL_CONST(15751.204168815901/8.0),
+    REAL_CONST(15766.143069731135/8.0),
+    REAL_CONST(15781.085510251132/8.0),
+    REAL_CONST(15796.03148869974/8.0),
+    REAL_CONST(15810.981003402798/8.0),
+    REAL_CONST(15825.934052688119/8.0),
+    REAL_CONST(15840.890634885489/8.0),
+    REAL_CONST(15855.850748326673/8.0),
+    REAL_CONST(15870.814391345401/8.0),
+    REAL_CONST(15885.781562277361/8.0),
+    REAL_CONST(15900.752259460214/8.0),
+    REAL_CONST(15915.726481233565/8.0),
+    REAL_CONST(15930.704225938984/8.0),
+    REAL_CONST(15945.685491919978/8.0),
+    REAL_CONST(15960.670277522009/8.0),
+    REAL_CONST(15975.658581092481/8.0),
+    REAL_CONST(15990.65040098073/8.0),
+    REAL_CONST(16005.645735538035/8.0),
+    REAL_CONST(16020.644583117599/8.0),
+    REAL_CONST(16035.646942074556/8.0),
+    REAL_CONST(16050.652810765967/8.0),
+    REAL_CONST(16065.662187550806/8.0),
+    REAL_CONST(16080.675070789974/8.0),
+    REAL_CONST(16095.691458846273/8.0),
+    REAL_CONST(16110.711350084424/8.0),
+    REAL_CONST(16125.734742871053/8.0),
+    REAL_CONST(16140.761635574685/8.0),
+    REAL_CONST(16155.792026565747/8.0),
+    REAL_CONST(16170.825914216561/8.0),
+    REAL_CONST(16185.863296901338/8.0),
+    REAL_CONST(16200.904172996183/8.0),
+    REAL_CONST(16215.948540879079/8.0),
+    REAL_CONST(16230.996398929899/8.0),
+    REAL_CONST(16246.047745530386/8.0),
+    REAL_CONST(16261.102579064163/8.0),
+    REAL_CONST(16276.160897916721/8.0),
+    REAL_CONST(16291.22270047542/8.0),
+    REAL_CONST(16306.287985129484/8.0),
+    REAL_CONST(16321.356750269995/8.0),
+    REAL_CONST(16336.428994289896/8.0),
+    REAL_CONST(16351.504715583982/8.0),
+    REAL_CONST(16366.5839125489/8.0),
+    REAL_CONST(16381.666583583141/8.0),
+    REAL_CONST(16396.752727087041/8.0),
+    REAL_CONST(16411.842341462776/8.0),
+    REAL_CONST(16426.935425114363/8.0),
+    REAL_CONST(16442.031976447644/8.0),
+    REAL_CONST(16457.131993870298/8.0),
+    REAL_CONST(16472.235475791829/8.0),
+    REAL_CONST(16487.342420623561/8.0),
+    REAL_CONST(16502.452826778641/8.0),
+    REAL_CONST(16517.566692672033/8.0),
+    REAL_CONST(16532.684016720516/8.0),
+    REAL_CONST(16547.804797342676/8.0),
+    REAL_CONST(16562.929032958902/8.0),
+    REAL_CONST(16578.056721991394/8.0),
+    REAL_CONST(16593.18786286415/8.0),
+    REAL_CONST(16608.322454002962/8.0),
+    REAL_CONST(16623.460493835417/8.0),
+    REAL_CONST(16638.601980790896/8.0),
+    REAL_CONST(16653.746913300558/8.0),
+    REAL_CONST(16668.895289797354/8.0),
+    REAL_CONST(16684.047108716015/8.0),
+    REAL_CONST(16699.202368493046/8.0),
+    REAL_CONST(16714.361067566726/8.0),
+    REAL_CONST(16729.523204377107/8.0),
+    REAL_CONST(16744.688777366009/8.0),
+    REAL_CONST(16759.857784977012/8.0),
+    REAL_CONST(16775.030225655464/8.0),
+    REAL_CONST(16790.206097848466/8.0),
+    REAL_CONST(16805.385400004874/8.0),
+    REAL_CONST(16820.568130575302/8.0),
+    REAL_CONST(16835.754288012104/8.0),
+    REAL_CONST(16850.943870769381/8.0),
+    REAL_CONST(16866.136877302983/8.0),
+    REAL_CONST(16881.333306070494/8.0),
+    REAL_CONST(16896.53315553123/8.0),
+    REAL_CONST(16911.736424146249/8.0),
+    REAL_CONST(16926.943110378332/8.0),
+    REAL_CONST(16942.153212691992/8.0),
+    REAL_CONST(16957.366729553454/8.0),
+    REAL_CONST(16972.583659430682/8.0),
+    REAL_CONST(16987.804000793338/8.0),
+    REAL_CONST(17003.027752112816/8.0),
+    REAL_CONST(17018.254911862205/8.0),
+    REAL_CONST(17033.485478516312/8.0),
+    REAL_CONST(17048.719450551645/8.0),
+    REAL_CONST(17063.956826446421/8.0),
+    REAL_CONST(17079.197604680547/8.0),
+    REAL_CONST(17094.44178373563/8.0),
+    REAL_CONST(17109.689362094967/8.0),
+    REAL_CONST(17124.940338243552/8.0),
+    REAL_CONST(17140.194710668064/8.0),
+    REAL_CONST(17155.452477856852/8.0),
+    REAL_CONST(17170.713638299967/8.0),
+    REAL_CONST(17185.978190489128/8.0),
+    REAL_CONST(17201.246132917724/8.0),
+    REAL_CONST(17216.517464080825/8.0),
+    REAL_CONST(17231.792182475165/8.0),
+    REAL_CONST(17247.070286599141/8.0),
+    REAL_CONST(17262.351774952826/8.0),
+    REAL_CONST(17277.636646037936/8.0),
+    REAL_CONST(17292.924898357855/8.0),
+    REAL_CONST(17308.216530417623/8.0),
+    REAL_CONST(17323.511540723921/8.0),
+    REAL_CONST(17338.809927785089/8.0),
+    REAL_CONST(17354.111690111105/8.0),
+    REAL_CONST(17369.416826213594/8.0),
+    REAL_CONST(17384.725334605821/8.0),
+    REAL_CONST(17400.037213802683/8.0),
+    REAL_CONST(17415.352462320716/8.0),
+    REAL_CONST(17430.67107867809/8.0),
+    REAL_CONST(17445.993061394587/8.0),
+    REAL_CONST(17461.318408991636/8.0),
+    REAL_CONST(17476.647119992274/8.0),
+    REAL_CONST(17491.979192921168/8.0),
+    REAL_CONST(17507.314626304586/8.0),
+    REAL_CONST(17522.653418670423/8.0),
+    REAL_CONST(17537.995568548187/8.0),
+    REAL_CONST(17553.341074468986/8.0),
+    REAL_CONST(17568.689934965536/8.0),
+    REAL_CONST(17584.042148572156/8.0),
+    REAL_CONST(17599.397713824768/8.0),
+    REAL_CONST(17614.75662926089/8.0),
+    REAL_CONST(17630.118893419625/8.0),
+    REAL_CONST(17645.484504841683/8.0),
+    REAL_CONST(17660.853462069354/8.0),
+    REAL_CONST(17676.225763646511/8.0),
+    REAL_CONST(17691.601408118619/8.0),
+    REAL_CONST(17706.980394032718/8.0),
+    REAL_CONST(17722.362719937424/8.0),
+    REAL_CONST(17737.748384382936/8.0),
+    REAL_CONST(17753.137385921014/8.0),
+    REAL_CONST(17768.529723104999/8.0),
+    REAL_CONST(17783.92539448979/8.0),
+    REAL_CONST(17799.324398631856/8.0),
+    REAL_CONST(17814.726734089225/8.0),
+    REAL_CONST(17830.13239942148/8.0),
+    REAL_CONST(17845.541393189767/8.0),
+    REAL_CONST(17860.95371395678/8.0),
+    REAL_CONST(17876.369360286772/8.0),
+    REAL_CONST(17891.788330745527/8.0),
+    REAL_CONST(17907.210623900395/8.0),
+    REAL_CONST(17922.636238320254/8.0),
+    REAL_CONST(17938.065172575527/8.0),
+    REAL_CONST(17953.497425238176/8.0),
+    REAL_CONST(17968.932994881692/8.0),
+    REAL_CONST(17984.371880081104/8.0),
+    REAL_CONST(17999.814079412972/8.0),
+    REAL_CONST(18015.259591455371/8.0),
+    REAL_CONST(18030.708414787914/8.0),
+    REAL_CONST(18046.160547991731/8.0),
+    REAL_CONST(18061.615989649465/8.0),
+    REAL_CONST(18077.074738345284/8.0),
+    REAL_CONST(18092.536792664861/8.0),
+    REAL_CONST(18108.002151195393/8.0),
+    REAL_CONST(18123.470812525571/8.0),
+    REAL_CONST(18138.942775245599/8.0),
+    REAL_CONST(18154.418037947191/8.0),
+    REAL_CONST(18169.896599223546/8.0),
+    REAL_CONST(18185.37845766938/8.0),
+    REAL_CONST(18200.863611880886/8.0),
+    REAL_CONST(18216.352060455767/8.0),
+    REAL_CONST(18231.843801993204/8.0),
+    REAL_CONST(18247.338835093873/8.0),
+    REAL_CONST(18262.837158359936/8.0),
+    REAL_CONST(18278.338770395032/8.0),
+    REAL_CONST(18293.84366980429/8.0),
+    REAL_CONST(18309.351855194309/8.0),
+    REAL_CONST(18324.863325173166/8.0),
+    REAL_CONST(18340.378078350412/8.0),
+    REAL_CONST(18355.896113337069/8.0),
+    REAL_CONST(18371.417428745623/8.0),
+    REAL_CONST(18386.942023190033/8.0),
+    REAL_CONST(18402.469895285718/8.0),
+    REAL_CONST(18418.00104364955/8.0),
+    REAL_CONST(18433.53546689987/8.0),
+    REAL_CONST(18449.073163656474/8.0),
+    REAL_CONST(18464.614132540602/8.0),
+    REAL_CONST(18480.158372174956/8.0),
+    REAL_CONST(18495.705881183676/8.0),
+    REAL_CONST(18511.256658192357/8.0),
+    REAL_CONST(18526.810701828035/8.0),
+    REAL_CONST(18542.368010719183/8.0),
+    REAL_CONST(18557.928583495715/8.0),
+    REAL_CONST(18573.492418788985/8.0),
+    REAL_CONST(18589.059515231773/8.0),
+    REAL_CONST(18604.629871458303/8.0),
+    REAL_CONST(18620.203486104212/8.0),
+    REAL_CONST(18635.78035780658/8.0),
+    REAL_CONST(18651.360485203899/8.0),
+    REAL_CONST(18666.943866936086/8.0),
+    REAL_CONST(18682.53050164448/8.0),
+    REAL_CONST(18698.120387971841/8.0),
+    REAL_CONST(18713.713524562332/8.0),
+    REAL_CONST(18729.30991006154/8.0),
+    REAL_CONST(18744.909543116457/8.0),
+    REAL_CONST(18760.512422375479/8.0),
+    REAL_CONST(18776.118546488418/8.0),
+    REAL_CONST(18791.727914106479/8.0),
+    REAL_CONST(18807.340523882274/8.0),
+    REAL_CONST(18822.95637446981/8.0),
+    REAL_CONST(18838.575464524489/8.0),
+    REAL_CONST(18854.197792703111/8.0),
+    REAL_CONST(18869.823357663863/8.0),
+    REAL_CONST(18885.452158066328/8.0),
+    REAL_CONST(18901.08419257147/8.0),
+    REAL_CONST(18916.719459841639/8.0),
+    REAL_CONST(18932.357958540564/8.0),
+    REAL_CONST(18947.999687333362/8.0),
+    REAL_CONST(18963.644644886521/8.0),
+    REAL_CONST(18979.292829867907/8.0),
+    REAL_CONST(18994.944240946759/8.0),
+    REAL_CONST(19010.598876793687/8.0),
+    REAL_CONST(19026.256736080668/8.0),
+    REAL_CONST(19041.917817481048/8.0),
+    REAL_CONST(19057.582119669532/8.0),
+    REAL_CONST(19073.2496413222/8.0),
+    REAL_CONST(19088.920381116473/8.0),
+    REAL_CONST(19104.594337731145/8.0),
+    REAL_CONST(19120.271509846356/8.0),
+    REAL_CONST(19135.951896143604/8.0),
+    REAL_CONST(19151.635495305738/8.0),
+    REAL_CONST(19167.322306016948/8.0),
+    REAL_CONST(19183.012326962784/8.0),
+    REAL_CONST(19198.705556830122/8.0),
+    REAL_CONST(19214.401994307198/8.0),
+    REAL_CONST(19230.101638083579/8.0),
+    REAL_CONST(19245.804486850167/8.0),
+    REAL_CONST(19261.510539299208/8.0),
+    REAL_CONST(19277.219794124274/8.0),
+    REAL_CONST(19292.932250020265/8.0),
+    REAL_CONST(19308.647905683421/8.0),
+    REAL_CONST(19324.366759811302/8.0),
+    REAL_CONST(19340.088811102793/8.0),
+    REAL_CONST(19355.8140582581/8.0),
+    REAL_CONST(19371.542499978754/8.0),
+    REAL_CONST(19387.2741349676/8.0),
+    REAL_CONST(19403.008961928797/8.0),
+    REAL_CONST(19418.746979567823/8.0),
+    REAL_CONST(19434.488186591469/8.0),
+    REAL_CONST(19450.232581707827/8.0),
+    REAL_CONST(19465.980163626304/8.0),
+    REAL_CONST(19481.730931057613/8.0),
+    REAL_CONST(19497.484882713761/8.0),
+    REAL_CONST(19513.242017308068/8.0),
+    REAL_CONST(19529.002333555141/8.0),
+    REAL_CONST(19544.765830170898/8.0),
+    REAL_CONST(19560.532505872539/8.0),
+    REAL_CONST(19576.302359378566/8.0),
+    REAL_CONST(19592.075389408761/8.0),
+    REAL_CONST(19607.851594684209/8.0),
+    REAL_CONST(19623.630973927269/8.0),
+    REAL_CONST(19639.41352586159/8.0),
+    REAL_CONST(19655.199249212103/8.0),
+    REAL_CONST(19670.988142705017/8.0),
+    REAL_CONST(19686.780205067826/8.0),
+    REAL_CONST(19702.575435029288/8.0),
+    REAL_CONST(19718.373831319448/8.0),
+    REAL_CONST(19734.175392669615/8.0),
+    REAL_CONST(19749.980117812371/8.0),
+    REAL_CONST(19765.788005481569/8.0),
+    REAL_CONST(19781.599054412323/8.0),
+    REAL_CONST(19797.413263341008/8.0),
+    REAL_CONST(19813.230631005274/8.0),
+    REAL_CONST(19829.051156144014/8.0),
+    REAL_CONST(19844.874837497395/8.0),
+    REAL_CONST(19860.701673806827/8.0),
+    REAL_CONST(19876.531663814985/8.0),
+    REAL_CONST(19892.364806265789/8.0),
+    REAL_CONST(19908.201099904403/8.0),
+    REAL_CONST(19924.040543477258/8.0),
+    REAL_CONST(19939.883135732012/8.0),
+    REAL_CONST(19955.728875417579/8.0),
+    REAL_CONST(19971.577761284105/8.0),
+    REAL_CONST(19987.429792082985/8.0),
+    REAL_CONST(20003.284966566847/8.0),
+    REAL_CONST(20019.14328348956/8.0),
+    REAL_CONST(20035.004741606219/8.0),
+    REAL_CONST(20050.869339673161/8.0),
+    REAL_CONST(20066.737076447946/8.0),
+    REAL_CONST(20082.607950689362/8.0),
+    REAL_CONST(20098.481961157428/8.0),
+    REAL_CONST(20114.359106613385/8.0),
+    REAL_CONST(20130.239385819699/8.0),
+    REAL_CONST(20146.122797540058/8.0),
+    REAL_CONST(20162.009340539353/8.0),
+    REAL_CONST(20177.899013583716/8.0),
+    REAL_CONST(20193.791815440476/8.0),
+    REAL_CONST(20209.687744878182/8.0),
+    REAL_CONST(20225.586800666591/8.0),
+    REAL_CONST(20241.488981576669/8.0),
+    REAL_CONST(20257.394286380597/8.0),
+    REAL_CONST(20273.302713851754/8.0),
+    REAL_CONST(20289.214262764715/8.0),
+    REAL_CONST(20305.128931895277/8.0),
+    REAL_CONST(20321.046720020415/8.0),
+    REAL_CONST(20336.967625918318/8.0),
+    REAL_CONST(20352.891648368361/8.0),
+    REAL_CONST(20368.818786151114/8.0),
+    REAL_CONST(20384.749038048347/8.0),
+    REAL_CONST(20400.682402843009/8.0),
+    REAL_CONST(20416.618879319249/8.0),
+    REAL_CONST(20432.558466262391/8.0),
+    REAL_CONST(20448.501162458953/8.0),
+    REAL_CONST(20464.446966696629/8.0),
+    REAL_CONST(20480.395877764302/8.0),
+    REAL_CONST(20496.347894452025/8.0),
+    REAL_CONST(20512.303015551031/8.0),
+    REAL_CONST(20528.261239853735/8.0),
+    REAL_CONST(20544.22256615372/8.0),
+    REAL_CONST(20560.186993245738/8.0),
+    REAL_CONST(20576.15451992572/8.0),
+    REAL_CONST(20592.125144990758/8.0),
+    REAL_CONST(20608.098867239107/8.0),
+    REAL_CONST(20624.075685470198/8.0),
+    REAL_CONST(20640.055598484618/8.0),
+    REAL_CONST(20656.038605084115/8.0),
+    REAL_CONST(20672.024704071595/8.0),
+    REAL_CONST(20688.013894251126/8.0),
+    REAL_CONST(20704.006174427926/8.0),
+    REAL_CONST(20720.001543408373/8.0),
+    REAL_CONST(20735.999999999989/8.0),
+    REAL_CONST(20752.001543011454/8.0),
+    REAL_CONST(20768.006171252597/8.0),
+    REAL_CONST(20784.013883534382/8.0),
+    REAL_CONST(20800.024678668931/8.0),
+    REAL_CONST(20816.038555469506/8.0),
+    REAL_CONST(20832.055512750507/8.0),
+    REAL_CONST(20848.075549327474/8.0),
+    REAL_CONST(20864.098664017085/8.0),
+    REAL_CONST(20880.124855637161/8.0),
+    REAL_CONST(20896.154123006647/8.0),
+    REAL_CONST(20912.186464945626/8.0),
+    REAL_CONST(20928.221880275312/8.0),
+    REAL_CONST(20944.260367818049/8.0),
+    REAL_CONST(20960.301926397311/8.0),
+    REAL_CONST(20976.346554837684/8.0),
+    REAL_CONST(20992.394251964895/8.0),
+    REAL_CONST(21008.445016605787/8.0),
+    REAL_CONST(21024.498847588318/8.0),
+    REAL_CONST(21040.555743741574/8.0),
+    REAL_CONST(21056.615703895754/8.0),
+    REAL_CONST(21072.678726882168/8.0),
+    REAL_CONST(21088.744811533252/8.0),
+    REAL_CONST(21104.813956682538/8.0),
+    REAL_CONST(21120.886161164683/8.0),
+    REAL_CONST(21136.961423815443/8.0),
+    REAL_CONST(21153.039743471683/8.0),
+    REAL_CONST(21169.121118971379/8.0),
+    REAL_CONST(21185.205549153605/8.0),
+    REAL_CONST(21201.293032858535/8.0),
+    REAL_CONST(21217.383568927453/8.0),
+    REAL_CONST(21233.477156202731/8.0),
+    REAL_CONST(21249.573793527841/8.0),
+    REAL_CONST(21265.673479747358/8.0),
+    REAL_CONST(21281.776213706937/8.0),
+    REAL_CONST(21297.881994253334/8.0),
+    REAL_CONST(21313.990820234398/8.0),
+    REAL_CONST(21330.102690499054/8.0),
+    REAL_CONST(21346.21760389733/8.0),
+    REAL_CONST(21362.335559280327/8.0),
+    REAL_CONST(21378.456555500241/8.0),
+    REAL_CONST(21394.580591410333/8.0),
+    REAL_CONST(21410.707665864964/8.0),
+    REAL_CONST(21426.83777771956/8.0),
+    REAL_CONST(21442.970925830628/8.0),
+    REAL_CONST(21459.107109055756/8.0),
+    REAL_CONST(21475.246326253604/8.0),
+    REAL_CONST(21491.388576283895/8.0),
+    REAL_CONST(21507.533858007431/8.0),
+    REAL_CONST(21523.682170286087/8.0),
+    REAL_CONST(21539.833511982797/8.0),
+    REAL_CONST(21555.987881961566/8.0),
+    REAL_CONST(21572.145279087465/8.0),
+    REAL_CONST(21588.305702226615/8.0),
+    REAL_CONST(21604.469150246216/8.0),
+    REAL_CONST(21620.635622014521/8.0),
+    REAL_CONST(21636.805116400832/8.0),
+    REAL_CONST(21652.977632275521/8.0),
+    REAL_CONST(21669.153168510009/8.0),
+    REAL_CONST(21685.331723976764/8.0),
+    REAL_CONST(21701.513297549318/8.0),
+    REAL_CONST(21717.697888102244/8.0),
+    REAL_CONST(21733.885494511167/8.0),
+    REAL_CONST(21750.076115652759/8.0),
+    REAL_CONST(21766.269750404736/8.0),
+    REAL_CONST(21782.466397645861/8.0),
+    REAL_CONST(21798.666056255934/8.0),
+    REAL_CONST(21814.868725115801/8.0),
+    REAL_CONST(21831.074403107345/8.0),
+    REAL_CONST(21847.283089113484/8.0),
+    REAL_CONST(21863.494782018177/8.0),
+    REAL_CONST(21879.709480706417/8.0),
+    REAL_CONST(21895.927184064229/8.0),
+    REAL_CONST(21912.147890978667/8.0),
+    REAL_CONST(21928.371600337818/8.0),
+    REAL_CONST(21944.598311030797/8.0),
+    REAL_CONST(21960.828021947746/8.0),
+    REAL_CONST(21977.060731979829/8.0),
+    REAL_CONST(21993.296440019243/8.0),
+    REAL_CONST(22009.535144959198/8.0),
+    REAL_CONST(22025.77684569393/8.0),
+    REAL_CONST(22042.021541118691/8.0),
+    REAL_CONST(22058.269230129757/8.0),
+    REAL_CONST(22074.519911624411/8.0),
+    REAL_CONST(22090.773584500959/8.0),
+    REAL_CONST(22107.030247658717/8.0),
+    REAL_CONST(22123.289899998013/8.0),
+    REAL_CONST(22139.552540420187/8.0),
+    REAL_CONST(22155.818167827587/8.0),
+    REAL_CONST(22172.086781123569/8.0),
+    REAL_CONST(22188.358379212495/8.0),
+    REAL_CONST(22204.632960999726/8.0),
+    REAL_CONST(22220.910525391639/8.0),
+    REAL_CONST(22237.191071295601/8.0),
+    REAL_CONST(22253.474597619981/8.0),
+    REAL_CONST(22269.761103274148/8.0),
+    REAL_CONST(22286.050587168469/8.0),
+    REAL_CONST(22302.343048214312/8.0),
+    REAL_CONST(22318.638485324027/8.0),
+    REAL_CONST(22334.936897410968/8.0),
+    REAL_CONST(22351.23828338947/8.0),
+    REAL_CONST(22367.542642174871/8.0),
+    REAL_CONST(22383.849972683485/8.0),
+    REAL_CONST(22400.160273832618/8.0),
+    REAL_CONST(22416.473544540564/8.0),
+    REAL_CONST(22432.789783726603/8.0),
+    REAL_CONST(22449.108990310986/8.0),
+    REAL_CONST(22465.431163214958/8.0),
+    REAL_CONST(22481.75630136074/8.0),
+    REAL_CONST(22498.084403671528/8.0),
+    REAL_CONST(22514.415469071497/8.0),
+    REAL_CONST(22530.749496485802/8.0),
+    REAL_CONST(22547.086484840562/8.0),
+    REAL_CONST(22563.426433062879/8.0),
+    REAL_CONST(22579.769340080824/8.0),
+    REAL_CONST(22596.115204823436/8.0),
+    REAL_CONST(22612.464026220721/8.0),
+    REAL_CONST(22628.815803203655/8.0),
+    REAL_CONST(22645.170534704179/8.0),
+    REAL_CONST(22661.5282196552/8.0),
+    REAL_CONST(22677.888856990587/8.0),
+    REAL_CONST(22694.252445645168/8.0),
+    REAL_CONST(22710.618984554734/8.0),
+    REAL_CONST(22726.988472656034/8.0),
+    REAL_CONST(22743.360908886778/8.0),
+    REAL_CONST(22759.736292185622/8.0),
+    REAL_CONST(22776.114621492186/8.0),
+    REAL_CONST(22792.495895747044/8.0),
+    REAL_CONST(22808.880113891719/8.0),
+    REAL_CONST(22825.267274868678/8.0),
+    REAL_CONST(22841.657377621348/8.0),
+    REAL_CONST(22858.050421094096/8.0),
+    REAL_CONST(22874.446404232243/8.0),
+    REAL_CONST(22890.845325982053/8.0),
+    REAL_CONST(22907.247185290722/8.0),
+    REAL_CONST(22923.651981106406/8.0),
+    REAL_CONST(22940.059712378195/8.0),
+    REAL_CONST(22956.470378056114/8.0),
+    REAL_CONST(22972.883977091129/8.0),
+    REAL_CONST(22989.300508435153/8.0),
+    REAL_CONST(23005.719971041017/8.0),
+    REAL_CONST(23022.142363862498/8.0),
+    REAL_CONST(23038.567685854305/8.0),
+    REAL_CONST(23054.995935972078/8.0),
+    REAL_CONST(23071.427113172387/8.0),
+    REAL_CONST(23087.86121641273/8.0),
+    REAL_CONST(23104.298244651531/8.0),
+    REAL_CONST(23120.738196848146/8.0),
+    REAL_CONST(23137.181071962848/8.0),
+    REAL_CONST(23153.626868956846/8.0),
+    REAL_CONST(23170.075586792263/8.0),
+    REAL_CONST(23186.527224432142/8.0),
+    REAL_CONST(23202.981780840448/8.0),
+    REAL_CONST(23219.439254982066/8.0),
+    REAL_CONST(23235.899645822796/8.0),
+    REAL_CONST(23252.362952329357/8.0),
+    REAL_CONST(23268.829173469378/8.0),
+    REAL_CONST(23285.298308211408/8.0),
+    REAL_CONST(23301.770355524899/8.0),
+    REAL_CONST(23318.245314380223/8.0),
+    REAL_CONST(23334.723183748658/8.0),
+    REAL_CONST(23351.203962602387/8.0),
+    REAL_CONST(23367.687649914504/8.0),
+    REAL_CONST(23384.174244659007/8.0),
+    REAL_CONST(23400.663745810798/8.0),
+    REAL_CONST(23417.15615234568/8.0),
+    REAL_CONST(23433.651463240367/8.0),
+    REAL_CONST(23450.149677472462/8.0),
+    REAL_CONST(23466.650794020472/8.0),
+    REAL_CONST(23483.154811863806/8.0),
+    REAL_CONST(23499.661729982763/8.0),
+    REAL_CONST(23516.171547358543/8.0),
+    REAL_CONST(23532.684262973235/8.0),
+    REAL_CONST(23549.199875809823/8.0),
+    REAL_CONST(23565.718384852185/8.0),
+    REAL_CONST(23582.239789085092/8.0),
+    REAL_CONST(23598.764087494197/8.0),
+    REAL_CONST(23615.291279066041/8.0),
+    REAL_CONST(23631.821362788058/8.0),
+    REAL_CONST(23648.354337648565/8.0),
+    REAL_CONST(23664.890202636761/8.0),
+    REAL_CONST(23681.428956742733/8.0),
+    REAL_CONST(23697.970598957443/8.0),
+    REAL_CONST(23714.515128272738/8.0),
+    REAL_CONST(23731.062543681343/8.0),
+    REAL_CONST(23747.612844176863/8.0),
+    REAL_CONST(23764.166028753778/8.0),
+    REAL_CONST(23780.72209640744/8.0),
+    REAL_CONST(23797.281046134085/8.0),
+    REAL_CONST(23813.842876930816/8.0),
+    REAL_CONST(23830.407587795606/8.0),
+    REAL_CONST(23846.975177727301/8.0),
+    REAL_CONST(23863.545645725622/8.0),
+    REAL_CONST(23880.11899079115/8.0),
+    REAL_CONST(23896.695211925336/8.0),
+    REAL_CONST(23913.274308130498/8.0),
+    REAL_CONST(23929.856278409821/8.0),
+    REAL_CONST(23946.441121767348/8.0),
+    REAL_CONST(23963.028837207989/8.0),
+    REAL_CONST(23979.619423737513/8.0),
+    REAL_CONST(23996.212880362549/8.0),
+    REAL_CONST(24012.809206090584/8.0),
+    REAL_CONST(24029.408399929966/8.0),
+    REAL_CONST(24046.010460889898/8.0),
+    REAL_CONST(24062.615387980433/8.0),
+    REAL_CONST(24079.223180212492/8.0),
+    REAL_CONST(24095.833836597827/8.0),
+    REAL_CONST(24112.447356149063/8.0),
+    REAL_CONST(24129.063737879667/8.0),
+    REAL_CONST(24145.682980803951/8.0),
+    REAL_CONST(24162.305083937081/8.0),
+    REAL_CONST(24178.930046295067/8.0),
+    REAL_CONST(24195.557866894767/8.0),
+    REAL_CONST(24212.188544753884/8.0),
+    REAL_CONST(24228.822078890964/8.0),
+    REAL_CONST(24245.458468325389/8.0),
+    REAL_CONST(24262.097712077397/8.0),
+    REAL_CONST(24278.739809168052/8.0),
+    REAL_CONST(24295.384758619261/8.0),
+    REAL_CONST(24312.032559453768/8.0),
+    REAL_CONST(24328.683210695162/8.0),
+    REAL_CONST(24345.336711367858/8.0),
+    REAL_CONST(24361.993060497109/8.0),
+    REAL_CONST(24378.652257108995/8.0),
+    REAL_CONST(24395.314300230442/8.0),
+    REAL_CONST(24411.979188889192/8.0),
+    REAL_CONST(24428.646922113825/8.0),
+    REAL_CONST(24445.317498933746/8.0),
+    REAL_CONST(24461.990918379193/8.0),
+    REAL_CONST(24478.667179481225/8.0),
+    REAL_CONST(24495.346281271726/8.0),
+    REAL_CONST(24512.028222783407/8.0),
+    REAL_CONST(24528.713003049801/8.0),
+    REAL_CONST(24545.400621105266/8.0),
+    REAL_CONST(24562.091075984976/8.0),
+    REAL_CONST(24578.784366724925/8.0),
+    REAL_CONST(24595.480492361927/8.0),
+    REAL_CONST(24612.179451933614/8.0),
+    REAL_CONST(24628.881244478438/8.0),
+    REAL_CONST(24645.585869035654/8.0),
+    REAL_CONST(24662.293324645343/8.0),
+    REAL_CONST(24679.003610348394/8.0),
+    REAL_CONST(24695.716725186514/8.0),
+    REAL_CONST(24712.432668202211/8.0),
+    REAL_CONST(24729.151438438807/8.0),
+    REAL_CONST(24745.873034940436/8.0),
+    REAL_CONST(24762.597456752032/8.0),
+    REAL_CONST(24779.324702919344/8.0),
+    REAL_CONST(24796.054772488926/8.0),
+    REAL_CONST(24812.787664508123/8.0),
+    REAL_CONST(24829.5233780251/8.0),
+    REAL_CONST(24846.261912088819/8.0),
+    REAL_CONST(24863.003265749034/8.0),
+    REAL_CONST(24879.747438056307/8.0),
+    REAL_CONST(24896.494428062004/8.0),
+    REAL_CONST(24913.244234818278/8.0),
+    REAL_CONST(24929.996857378079/8.0),
+    REAL_CONST(24946.752294795166/8.0),
+    REAL_CONST(24963.510546124078/8.0),
+    REAL_CONST(24980.271610420157/8.0),
+    REAL_CONST(24997.035486739525/8.0),
+    REAL_CONST(25013.802174139113/8.0),
+    REAL_CONST(25030.571671676629/8.0),
+    REAL_CONST(25047.343978410572/8.0),
+    REAL_CONST(25064.119093400237/8.0),
+    REAL_CONST(25080.897015705697/8.0),
+    REAL_CONST(25097.677744387816/8.0),
+    REAL_CONST(25114.461278508239/8.0),
+    REAL_CONST(25131.2476171294/8.0),
+    REAL_CONST(25148.036759314517/8.0),
+    REAL_CONST(25164.828704127583/8.0),
+    REAL_CONST(25181.623450633375/8.0),
+    REAL_CONST(25198.42099789745/8.0),
+    REAL_CONST(25215.221344986145/8.0),
+    REAL_CONST(25232.024490966574/8.0),
+    REAL_CONST(25248.830434906627/8.0),
+    REAL_CONST(25265.639175874974/8.0),
+    REAL_CONST(25282.450712941049/8.0),
+    REAL_CONST(25299.265045175071/8.0),
+    REAL_CONST(25316.082171648024/8.0),
+    REAL_CONST(25332.902091431668/8.0),
+    REAL_CONST(25349.724803598532/8.0),
+    REAL_CONST(25366.550307221914/8.0),
+    REAL_CONST(25383.378601375884/8.0),
+    REAL_CONST(25400.209685135269/8.0),
+    REAL_CONST(25417.043557575678/8.0),
+    REAL_CONST(25433.880217773472/8.0),
+    REAL_CONST(25450.719664805783/8.0),
+    REAL_CONST(25467.561897750507/8.0),
+    REAL_CONST(25484.406915686297/8.0),
+    REAL_CONST(25501.254717692573/8.0),
+    REAL_CONST(25518.105302849512/8.0),
+    REAL_CONST(25534.958670238051/8.0),
+    REAL_CONST(25551.814818939893/8.0),
+    REAL_CONST(25568.67374803748/8.0),
+    REAL_CONST(25585.535456614027/8.0),
+    REAL_CONST(25602.399943753502/8.0),
+    REAL_CONST(25619.267208540619/8.0),
+    REAL_CONST(25636.137250060852/8.0),
+    REAL_CONST(25653.010067400432/8.0),
+    REAL_CONST(25669.885659646327/8.0),
+    REAL_CONST(25686.76402588627/8.0),
+    REAL_CONST(25703.645165208734/8.0),
+    REAL_CONST(25720.529076702944/8.0),
+    REAL_CONST(25737.415759458876/8.0),
+    REAL_CONST(25754.305212567244/8.0),
+    REAL_CONST(25771.197435119517/8.0),
+    REAL_CONST(25788.092426207899/8.0),
+    REAL_CONST(25804.990184925344/8.0),
+    REAL_CONST(25821.890710365547/8.0),
+    REAL_CONST(25838.794001622944/8.0),
+    REAL_CONST(25855.700057792714/8.0),
+    REAL_CONST(25872.608877970775/8.0),
+    REAL_CONST(25889.520461253778/8.0),
+    REAL_CONST(25906.434806739118/8.0),
+    REAL_CONST(25923.351913524923/8.0),
+    REAL_CONST(25940.271780710063/8.0),
+    REAL_CONST(25957.194407394138/8.0),
+    REAL_CONST(25974.11979267748/8.0),
+    REAL_CONST(25991.047935661154/8.0),
+    REAL_CONST(26007.978835446964/8.0),
+    REAL_CONST(26024.912491137442/8.0),
+    REAL_CONST(26041.848901835841/8.0),
+    REAL_CONST(26058.788066646157/8.0),
+    REAL_CONST(26075.729984673108/8.0),
+    REAL_CONST(26092.674655022136/8.0),
+    REAL_CONST(26109.622076799409/8.0),
+    REAL_CONST(26126.572249111829/8.0),
+    REAL_CONST(26143.525171067016/8.0),
+    REAL_CONST(26160.480841773315/8.0),
+    REAL_CONST(26177.43926033979/8.0),
+    REAL_CONST(26194.400425876229/8.0),
+    REAL_CONST(26211.364337493149/8.0),
+    REAL_CONST(26228.330994301767/8.0),
+    REAL_CONST(26245.30039541404/8.0),
+    REAL_CONST(26262.272539942627/8.0),
+    REAL_CONST(26279.247427000919/8.0),
+    REAL_CONST(26296.225055703002/8.0),
+    REAL_CONST(26313.205425163702/8.0),
+    REAL_CONST(26330.188534498539/8.0),
+    REAL_CONST(26347.174382823756/8.0),
+    REAL_CONST(26364.162969256304/8.0),
+    REAL_CONST(26381.154292913852/8.0),
+    REAL_CONST(26398.148352914774/8.0),
+    REAL_CONST(26415.145148378149/8.0),
+    REAL_CONST(26432.144678423778/8.0),
+    REAL_CONST(26449.146942172156/8.0),
+    REAL_CONST(26466.151938744493/8.0),
+    REAL_CONST(26483.159667262702/8.0),
+    REAL_CONST(26500.170126849403/8.0),
+    REAL_CONST(26517.183316627921/8.0),
+    REAL_CONST(26534.199235722277/8.0),
+    REAL_CONST(26551.217883257199/8.0),
+    REAL_CONST(26568.239258358124/8.0),
+    REAL_CONST(26585.263360151173/8.0),
+    REAL_CONST(26602.290187763181/8.0),
+    REAL_CONST(26619.319740321676/8.0),
+    REAL_CONST(26636.352016954883/8.0),
+    REAL_CONST(26653.387016791727/8.0),
+    REAL_CONST(26670.424738961825/8.0),
+    REAL_CONST(26687.465182595493/8.0),
+    REAL_CONST(26704.508346823739/8.0),
+    REAL_CONST(26721.554230778267/8.0),
+    REAL_CONST(26738.602833591467/8.0),
+    REAL_CONST(26755.65415439643/8.0),
+    REAL_CONST(26772.708192326929/8.0),
+    REAL_CONST(26789.764946517433/8.0),
+    REAL_CONST(26806.824416103096/8.0),
+    REAL_CONST(26823.886600219761/8.0),
+    REAL_CONST(26840.95149800396/8.0),
+    REAL_CONST(26858.019108592915/8.0),
+    REAL_CONST(26875.089431124517/8.0),
+    REAL_CONST(26892.162464737365/8.0),
+    REAL_CONST(26909.238208570721/8.0),
+    REAL_CONST(26926.316661764544/8.0),
+    REAL_CONST(26943.397823459472/8.0),
+    REAL_CONST(26960.481692796813/8.0),
+    REAL_CONST(26977.568268918571/8.0),
+    REAL_CONST(26994.657550967422/8.0),
+    REAL_CONST(27011.749538086722/8.0),
+    REAL_CONST(27028.844229420498/8.0),
+    REAL_CONST(27045.941624113464/8.0),
+    REAL_CONST(27063.041721311005/8.0),
+    REAL_CONST(27080.144520159181/8.0),
+    REAL_CONST(27097.250019804727/8.0),
+    REAL_CONST(27114.35821939505/8.0),
+    REAL_CONST(27131.469118078236/8.0),
+    REAL_CONST(27148.582715003027/8.0),
+    REAL_CONST(27165.699009318858/8.0),
+    REAL_CONST(27182.818000175819/8.0),
+    REAL_CONST(27199.939686724665/8.0),
+    REAL_CONST(27217.064068116837/8.0),
+    REAL_CONST(27234.191143504428/8.0),
+    REAL_CONST(27251.320912040203/8.0),
+    REAL_CONST(27268.453372877593/8.0),
+    REAL_CONST(27285.588525170693/8.0),
+    REAL_CONST(27302.726368074269/8.0),
+    REAL_CONST(27319.866900743735/8.0),
+    REAL_CONST(27337.010122335181/8.0),
+    REAL_CONST(27354.156032005358/8.0),
+    REAL_CONST(27371.304628911668/8.0),
+    REAL_CONST(27388.455912212183/8.0),
+    REAL_CONST(27405.609881065626/8.0),
+    REAL_CONST(27422.766534631384/8.0),
+    REAL_CONST(27439.925872069507/8.0),
+    REAL_CONST(27457.087892540683/8.0),
+    REAL_CONST(27474.252595206275/8.0),
+    REAL_CONST(27491.419979228293/8.0),
+    REAL_CONST(27508.5900437694/8.0),
+    REAL_CONST(27525.762787992917/8.0),
+    REAL_CONST(27542.93821106281/8.0),
+    REAL_CONST(27560.116312143706/8.0),
+    REAL_CONST(27577.297090400876/8.0),
+    REAL_CONST(27594.480545000242/8.0),
+    REAL_CONST(27611.666675108383/8.0),
+    REAL_CONST(27628.855479892518/8.0),
+    REAL_CONST(27646.046958520514/8.0),
+    REAL_CONST(27663.241110160889/8.0),
+    REAL_CONST(27680.437933982801/8.0),
+    REAL_CONST(27697.637429156068/8.0),
+    REAL_CONST(27714.839594851132/8.0),
+    REAL_CONST(27732.04443023909/8.0),
+    REAL_CONST(27749.251934491687/8.0),
+    REAL_CONST(27766.462106781299/8.0),
+    REAL_CONST(27783.674946280949/8.0),
+    REAL_CONST(27800.890452164302/8.0),
+    REAL_CONST(27818.108623605654/8.0),
+    REAL_CONST(27835.329459779954/8.0),
+    REAL_CONST(27852.55295986278/8.0),
+    REAL_CONST(27869.779123030345/8.0),
+    REAL_CONST(27887.007948459504/8.0),
+    REAL_CONST(27904.239435327745/8.0),
+    REAL_CONST(27921.473582813196/8.0),
+    REAL_CONST(27938.710390094613/8.0),
+    REAL_CONST(27955.949856351392/8.0),
+    REAL_CONST(27973.19198076355/8.0),
+    REAL_CONST(27990.436762511745/8.0),
+    REAL_CONST(28007.684200777272/8.0),
+    REAL_CONST(28024.934294742041/8.0),
+    REAL_CONST(28042.187043588601/8.0),
+    REAL_CONST(28059.442446500128/8.0),
+    REAL_CONST(28076.700502660427/8.0),
+    REAL_CONST(28093.961211253929/8.0),
+    REAL_CONST(28111.224571465693/8.0),
+    REAL_CONST(28128.490582481401/8.0),
+    REAL_CONST(28145.759243487362/8.0),
+    REAL_CONST(28163.030553670509/8.0),
+    REAL_CONST(28180.304512218394/8.0),
+    REAL_CONST(28197.581118319198/8.0),
+    REAL_CONST(28214.860371161725/8.0),
+    REAL_CONST(28232.14226993539/8.0),
+    REAL_CONST(28249.42681383024/8.0),
+    REAL_CONST(28266.71400203693/8.0),
+    REAL_CONST(28284.003833746745/8.0),
+    REAL_CONST(28301.296308151585/8.0),
+    REAL_CONST(28318.591424443959/8.0),
+    REAL_CONST(28335.889181817001/8.0),
+    REAL_CONST(28353.189579464462/8.0),
+    REAL_CONST(28370.492616580705/8.0),
+    REAL_CONST(28387.798292360701/8.0),
+    REAL_CONST(28405.106606000048/8.0),
+    REAL_CONST(28422.417556694945/8.0),
+    REAL_CONST(28439.731143642206/8.0),
+    REAL_CONST(28457.047366039264/8.0),
+    REAL_CONST(28474.366223084147/8.0),
+    REAL_CONST(28491.687713975512/8.0),
+    REAL_CONST(28509.011837912611/8.0),
+    REAL_CONST(28526.338594095305/8.0),
+    REAL_CONST(28543.667981724069/8.0),
+    REAL_CONST(28560.999999999982/8.0),
+    REAL_CONST(28578.334648124732/8.0),
+    REAL_CONST(28595.671925300605/8.0),
+    REAL_CONST(28613.011830730498/8.0),
+    REAL_CONST(28630.354363617909/8.0),
+    REAL_CONST(28647.699523166943/8.0),
+    REAL_CONST(28665.0473085823/8.0),
+    REAL_CONST(28682.397719069289/8.0),
+    REAL_CONST(28699.750753833818/8.0),
+    REAL_CONST(28717.10641208239/8.0),
+    REAL_CONST(28734.464693022121/8.0),
+    REAL_CONST(28751.825595860708/8.0),
+    REAL_CONST(28769.189119806462/8.0),
+    REAL_CONST(28786.55526406828/8.0),
+    REAL_CONST(28803.924027855664/8.0),
+    REAL_CONST(28821.295410378701/8.0),
+    REAL_CONST(28838.669410848088/8.0),
+    REAL_CONST(28856.046028475103/8.0),
+    REAL_CONST(28873.425262471628/8.0),
+    REAL_CONST(28890.80711205013/8.0),
+    REAL_CONST(28908.191576423673/8.0),
+    REAL_CONST(28925.578654805915/8.0),
+    REAL_CONST(28942.968346411097/8.0),
+    REAL_CONST(28960.360650454055/8.0),
+    REAL_CONST(28977.755566150216/8.0),
+    REAL_CONST(28995.153092715591/8.0),
+    REAL_CONST(29012.553229366786/8.0),
+    REAL_CONST(29029.955975320987/8.0),
+    REAL_CONST(29047.361329795975/8.0),
+    REAL_CONST(29064.769292010107/8.0),
+    REAL_CONST(29082.179861182336/8.0),
+    REAL_CONST(29099.593036532187/8.0),
+    REAL_CONST(29117.00881727978/8.0),
+    REAL_CONST(29134.427202645813/8.0),
+    REAL_CONST(29151.848191851568/8.0),
+    REAL_CONST(29169.271784118911/8.0),
+    REAL_CONST(29186.697978670283/8.0),
+    REAL_CONST(29204.126774728706/8.0),
+    REAL_CONST(29221.55817151779/8.0),
+    REAL_CONST(29238.992168261717/8.0),
+    REAL_CONST(29256.42876418525/8.0),
+    REAL_CONST(29273.867958513725/8.0),
+    REAL_CONST(29291.309750473058/8.0),
+    REAL_CONST(29308.754139289747/8.0),
+    REAL_CONST(29326.201124190855/8.0),
+    REAL_CONST(29343.65070440403/8.0),
+    REAL_CONST(29361.102879157483/8.0),
+    REAL_CONST(29378.557647680012/8.0),
+    REAL_CONST(29396.015009200975/8.0),
+    REAL_CONST(29413.474962950309/8.0),
+    REAL_CONST(29430.937508158524/8.0),
+    REAL_CONST(29448.402644056692/8.0),
+    REAL_CONST(29465.870369876469/8.0),
+    REAL_CONST(29483.340684850071/8.0),
+    REAL_CONST(29500.81358821028/8.0),
+    REAL_CONST(29518.289079190454/8.0),
+    REAL_CONST(29535.767157024511/8.0),
+    REAL_CONST(29553.247820946945/8.0),
+    REAL_CONST(29570.731070192807/8.0),
+    REAL_CONST(29588.216903997723/8.0),
+    REAL_CONST(29605.70532159787/8.0),
+    REAL_CONST(29623.19632223/8.0),
+    REAL_CONST(29640.689905131429/8.0),
+    REAL_CONST(29658.186069540028/8.0),
+    REAL_CONST(29675.684814694236/8.0),
+    REAL_CONST(29693.186139833047/8.0),
+    REAL_CONST(29710.690044196028/8.0),
+    REAL_CONST(29728.196527023298/8.0),
+    REAL_CONST(29745.705587555527/8.0),
+    REAL_CONST(29763.217225033964/8.0),
+    REAL_CONST(29780.731438700397/8.0),
+    REAL_CONST(29798.248227797183/8.0),
+    REAL_CONST(29815.76759156723/8.0),
+    REAL_CONST(29833.289529254005/8.0),
+    REAL_CONST(29850.81404010153/8.0),
+    REAL_CONST(29868.341123354381/8.0),
+    REAL_CONST(29885.870778257693/8.0),
+    REAL_CONST(29903.403004057145/8.0),
+    REAL_CONST(29920.937799998974/8.0),
+    REAL_CONST(29938.475165329975/8.0),
+    REAL_CONST(29956.015099297485/8.0),
+    REAL_CONST(29973.557601149394/8.0),
+    REAL_CONST(29991.102670134147/8.0),
+    REAL_CONST(30008.650305500738/8.0),
+    REAL_CONST(30026.200506498706/8.0),
+    REAL_CONST(30043.753272378144/8.0),
+    REAL_CONST(30061.308602389683/8.0),
+    REAL_CONST(30078.866495784507/8.0),
+    REAL_CONST(30096.426951814352/8.0),
+    REAL_CONST(30113.989969731494/8.0),
+    REAL_CONST(30131.55554878875/8.0),
+    REAL_CONST(30149.123688239491/8.0),
+    REAL_CONST(30166.694387337629/8.0),
+    REAL_CONST(30184.267645337608/8.0),
+    REAL_CONST(30201.843461494434/8.0),
+    REAL_CONST(30219.42183506364/8.0),
+    REAL_CONST(30237.002765301309/8.0),
+    REAL_CONST(30254.586251464058/8.0),
+    REAL_CONST(30272.172292809046/8.0),
+    REAL_CONST(30289.760888593977/8.0),
+    REAL_CONST(30307.35203807709/8.0),
+    REAL_CONST(30324.94574051716/8.0),
+    REAL_CONST(30342.541995173502/8.0),
+    REAL_CONST(30360.140801305966/8.0),
+    REAL_CONST(30377.742158174944/8.0),
+    REAL_CONST(30395.346065041358/8.0),
+    REAL_CONST(30412.952521166666/8.0),
+    REAL_CONST(30430.561525812864/8.0),
+    REAL_CONST(30448.173078242475/8.0),
+    REAL_CONST(30465.787177718561/8.0),
+    REAL_CONST(30483.403823504719/8.0),
+    REAL_CONST(30501.02301486507/8.0),
+    REAL_CONST(30518.644751064272/8.0),
+    REAL_CONST(30536.269031367516/8.0),
+    REAL_CONST(30553.895855040515/8.0),
+    REAL_CONST(30571.525221349519/8.0),
+    REAL_CONST(30589.157129561307/8.0),
+    REAL_CONST(30606.791578943175/8.0),
+    REAL_CONST(30624.428568762964/8.0),
+    REAL_CONST(30642.06809828903/8.0),
+    REAL_CONST(30659.710166790261/8.0),
+    REAL_CONST(30677.35477353607/8.0),
+    REAL_CONST(30695.001917796391/8.0),
+    REAL_CONST(30712.651598841687/8.0),
+    REAL_CONST(30730.303815942945/8.0),
+    REAL_CONST(30747.958568371676/8.0),
+    REAL_CONST(30765.615855399912/8.0),
+    REAL_CONST(30783.275676300211/8.0),
+    REAL_CONST(30800.938030345646/8.0),
+    REAL_CONST(30818.602916809814/8.0),
+    REAL_CONST(30836.270334966837/8.0),
+    REAL_CONST(30853.940284091354/8.0),
+    REAL_CONST(30871.612763458521/8.0),
+    REAL_CONST(30889.287772344011/8.0),
+    REAL_CONST(30906.965310024025/8.0),
+    REAL_CONST(30924.645375775272/8.0),
+    REAL_CONST(30942.327968874983/8.0),
+    REAL_CONST(30960.013088600903/8.0),
+    REAL_CONST(30977.700734231294/8.0),
+    REAL_CONST(30995.390905044929/8.0),
+    REAL_CONST(31013.083600321101/8.0),
+    REAL_CONST(31030.778819339619/8.0),
+    REAL_CONST(31048.476561380798/8.0),
+    REAL_CONST(31066.17682572547/8.0),
+    REAL_CONST(31083.879611654978/8.0),
+    REAL_CONST(31101.584918451179/8.0),
+    REAL_CONST(31119.29274539644/8.0),
+    REAL_CONST(31137.003091773637/8.0),
+    REAL_CONST(31154.715956866155/8.0),
+    REAL_CONST(31172.431339957893/8.0),
+    REAL_CONST(31190.14924033326/8.0),
+    REAL_CONST(31207.869657277162/8.0),
+    REAL_CONST(31225.592590075023/8.0),
+    REAL_CONST(31243.318038012771/8.0),
+    REAL_CONST(31261.046000376838/8.0),
+    REAL_CONST(31278.776476454172/8.0),
+    REAL_CONST(31296.50946553221/8.0),
+    REAL_CONST(31314.24496689891/8.0),
+    REAL_CONST(31331.98297984272/8.0),
+    REAL_CONST(31349.7235036526/8.0),
+    REAL_CONST(31367.466537618013/8.0),
+    REAL_CONST(31385.212081028923/8.0),
+    REAL_CONST(31402.960133175795/8.0),
+    REAL_CONST(31420.710693349596/8.0),
+    REAL_CONST(31438.463760841791/8.0),
+    REAL_CONST(31456.219334944351/8.0),
+    REAL_CONST(31473.977414949743/8.0),
+    REAL_CONST(31491.738000150934/8.0),
+    REAL_CONST(31509.501089841389/8.0),
+    REAL_CONST(31527.266683315069/8.0),
+    REAL_CONST(31545.034779866437/8.0),
+    REAL_CONST(31562.80537879045/8.0),
+    REAL_CONST(31580.578479382562/8.0),
+    REAL_CONST(31598.35408093872/8.0),
+    REAL_CONST(31616.132182755369/8.0),
+    REAL_CONST(31633.91278412945/8.0),
+    REAL_CONST(31651.695884358396/8.0),
+    REAL_CONST(31669.481482740131/8.0),
+    REAL_CONST(31687.269578573076/8.0),
+    REAL_CONST(31705.060171156143/8.0),
+    REAL_CONST(31722.853259788735/8.0),
+    REAL_CONST(31740.648843770748/8.0),
+    REAL_CONST(31758.446922402567/8.0),
+    REAL_CONST(31776.247494985066/8.0),
+    REAL_CONST(31794.050560819614/8.0),
+    REAL_CONST(31811.85611920806/8.0),
+    REAL_CONST(31829.664169452753/8.0),
+    REAL_CONST(31847.474710856521/8.0),
+    REAL_CONST(31865.287742722685/8.0),
+    REAL_CONST(31883.103264355046/8.0),
+    REAL_CONST(31900.921275057899/8.0),
+    REAL_CONST(31918.741774136019/8.0),
+    REAL_CONST(31936.564760894671/8.0),
+    REAL_CONST(31954.390234639599/8.0),
+    REAL_CONST(31972.21819467704/8.0),
+    REAL_CONST(31990.048640313704/8.0),
+    REAL_CONST(32007.881570856793/8.0),
+    REAL_CONST(32025.716985613984/8.0),
+    REAL_CONST(32043.554883893445/8.0),
+    REAL_CONST(32061.395265003815/8.0),
+    REAL_CONST(32079.238128254223/8.0),
+    REAL_CONST(32097.083472954269/8.0),
+    REAL_CONST(32114.931298414049/8.0),
+    REAL_CONST(32132.781603944117/8.0),
+    REAL_CONST(32150.634388855524/8.0),
+    REAL_CONST(32168.48965245979/8.0),
+    REAL_CONST(32186.347394068915/8.0),
+    REAL_CONST(32204.207612995371/8.0),
+    REAL_CONST(32222.07030855212/8.0),
+    REAL_CONST(32239.935480052583/8.0),
+    REAL_CONST(32257.803126810672/8.0),
+    REAL_CONST(32275.673248140767/8.0),
+    REAL_CONST(32293.545843357719/8.0),
+    REAL_CONST(32311.420911776862/8.0),
+    REAL_CONST(32329.298452713996/8.0),
+    REAL_CONST(32347.178465485395/8.0),
+    REAL_CONST(32365.060949407813/8.0),
+    REAL_CONST(32382.945903798463/8.0),
+    REAL_CONST(32400.83332797504/8.0),
+    REAL_CONST(32418.723221255706/8.0),
+    REAL_CONST(32436.615582959093/8.0),
+    REAL_CONST(32454.510412404306/8.0),
+    REAL_CONST(32472.407708910916/8.0),
+    REAL_CONST(32490.307471798966/8.0),
+    REAL_CONST(32508.209700388961/8.0),
+    REAL_CONST(32526.114394001877/8.0),
+    REAL_CONST(32544.021551959166/8.0),
+    REAL_CONST(32561.931173582732/8.0),
+    REAL_CONST(32579.843258194956/8.0),
+    REAL_CONST(32597.757805118679/8.0),
+    REAL_CONST(32615.674813677211/8.0),
+    REAL_CONST(32633.594283194328/8.0),
+    REAL_CONST(32651.516212994258/8.0),
+    REAL_CONST(32669.440602401712/8.0),
+    REAL_CONST(32687.367450741847/8.0),
+    REAL_CONST(32705.296757340297/8.0),
+    REAL_CONST(32723.228521523146/8.0),
+    REAL_CONST(32741.162742616943/8.0),
+    REAL_CONST(32759.099419948703/8.0),
+    REAL_CONST(32777.038552845901/8.0),
+    REAL_CONST(32794.980140636464/8.0),
+    REAL_CONST(32812.924182648792/8.0),
+    REAL_CONST(32830.87067821173/8.0),
+    REAL_CONST(32848.819626654593/8.0),
+    REAL_CONST(32866.77102730715/8.0),
+    REAL_CONST(32884.724879499619/8.0),
+    REAL_CONST(32902.681182562686/8.0),
+    REAL_CONST(32920.639935827494/8.0),
+    REAL_CONST(32938.601138625643/8.0),
+    REAL_CONST(32956.56479028918/8.0),
+    REAL_CONST(32974.530890150607/8.0),
+    REAL_CONST(32992.499437542894/8.0),
+    REAL_CONST(33010.470431799447/8.0),
+    REAL_CONST(33028.443872254145/8.0),
+    REAL_CONST(33046.419758241311/8.0),
+    REAL_CONST(33064.39808909571/8.0),
+    REAL_CONST(33082.378864152583/8.0),
+    REAL_CONST(33100.36208274759/8.0),
+    REAL_CONST(33118.347744216881/8.0),
+    REAL_CONST(33136.335847897026/8.0),
+    REAL_CONST(33154.326393125062/8.0),
+    REAL_CONST(33172.31937923847/8.0),
+    REAL_CONST(33190.314805575174/8.0),
+    REAL_CONST(33208.312671473555/8.0),
+    REAL_CONST(33226.312976272442/8.0),
+    REAL_CONST(33244.315719311111/8.0),
+    REAL_CONST(33262.320899929284/8.0),
+    REAL_CONST(33280.328517467125/8.0),
+    REAL_CONST(33298.33857126526/8.0),
+    REAL_CONST(33316.351060664747/8.0),
+    REAL_CONST(33334.365985007091/8.0),
+    REAL_CONST(33352.383343634239/8.0),
+    REAL_CONST(33370.403135888591/8.0),
+    REAL_CONST(33388.42536111299/8.0),
+    REAL_CONST(33406.450018650721/8.0),
+    REAL_CONST(33424.477107845501/8.0),
+    REAL_CONST(33442.506628041512/8.0),
+    REAL_CONST(33460.53857858335/8.0),
+    REAL_CONST(33478.572958816083/8.0),
+    REAL_CONST(33496.609768085189/8.0),
+    REAL_CONST(33514.649005736617/8.0),
+    REAL_CONST(33532.690671116739/8.0),
+    REAL_CONST(33550.734763572356/8.0),
+    REAL_CONST(33568.781282450735/8.0),
+    REAL_CONST(33586.830227099563/8.0),
+    REAL_CONST(33604.881596866973/8.0),
+    REAL_CONST(33622.935391101528/8.0),
+    REAL_CONST(33640.991609152239/8.0),
+    REAL_CONST(33659.050250368542/8.0),
+    REAL_CONST(33677.111314100322/8.0),
+    REAL_CONST(33695.174799697881/8.0),
+    REAL_CONST(33713.240706511984/8.0),
+    REAL_CONST(33731.309033893805/8.0),
+    REAL_CONST(33749.37978119497/8.0),
+    REAL_CONST(33767.452947767531/8.0),
+    REAL_CONST(33785.528532963974/8.0),
+    REAL_CONST(33803.606536137209/8.0),
+    REAL_CONST(33821.686956640602/8.0),
+    REAL_CONST(33839.769793827938/8.0),
+    REAL_CONST(33857.855047053425/8.0),
+    REAL_CONST(33875.942715671707/8.0),
+    REAL_CONST(33894.032799037872/8.0),
+    REAL_CONST(33912.125296507431/8.0),
+    REAL_CONST(33930.220207436316/8.0),
+    REAL_CONST(33948.317531180888/8.0),
+    REAL_CONST(33966.417267097961/8.0),
+    REAL_CONST(33984.519414544746/8.0),
+    REAL_CONST(34002.623972878901/8.0),
+    REAL_CONST(34020.730941458511/8.0),
+    REAL_CONST(34038.840319642077/8.0),
+    REAL_CONST(34056.952106788536/8.0),
+    REAL_CONST(34075.066302257255/8.0),
+    REAL_CONST(34093.182905408015/8.0),
+    REAL_CONST(34111.301915601027/8.0),
+    REAL_CONST(34129.42333219693/8.0),
+    REAL_CONST(34147.547154556785/8.0),
+    REAL_CONST(34165.673382042078/8.0),
+    REAL_CONST(34183.80201401472/8.0),
+    REAL_CONST(34201.933049837033/8.0),
+    REAL_CONST(34220.06648887178/8.0),
+    REAL_CONST(34238.202330482141/8.0),
+    REAL_CONST(34256.340574031703/8.0),
+    REAL_CONST(34274.481218884495/8.0),
+    REAL_CONST(34292.624264404949/8.0),
+    REAL_CONST(34310.769709957938/8.0),
+    REAL_CONST(34328.91755490873/8.0),
+    REAL_CONST(34347.067798623029/8.0),
+    REAL_CONST(34365.220440466954/8.0),
+    REAL_CONST(34383.375479807051/8.0),
+    REAL_CONST(34401.532916010263/8.0),
+    REAL_CONST(34419.692748443973/8.0),
+    REAL_CONST(34437.854976475966/8.0),
+    REAL_CONST(34456.01959947445/8.0),
+    REAL_CONST(34474.18661680806/8.0),
+    REAL_CONST(34492.356027845817/8.0),
+    REAL_CONST(34510.527831957188/8.0),
+    REAL_CONST(34528.702028512052/8.0),
+    REAL_CONST(34546.878616880676/8.0),
+    REAL_CONST(34565.05759643377/8.0),
+    REAL_CONST(34583.238966542449/8.0),
+    REAL_CONST(34601.422726578232/8.0),
+    REAL_CONST(34619.608875913065/8.0),
+    REAL_CONST(34637.797413919296/8.0),
+    REAL_CONST(34655.988339969692/8.0),
+    REAL_CONST(34674.181653437423/8.0),
+    REAL_CONST(34692.37735369608/8.0),
+    REAL_CONST(34710.575440119668/8.0),
+    REAL_CONST(34728.775912082579/8.0),
+    REAL_CONST(34746.978768959649/8.0),
+    REAL_CONST(34765.184010126082/8.0),
+    REAL_CONST(34783.391634957537/8.0),
+    REAL_CONST(34801.60164283005/8.0),
+    REAL_CONST(34819.814033120063/8.0),
+    REAL_CONST(34838.028805204456/8.0),
+    REAL_CONST(34856.24595846048/8.0),
+    REAL_CONST(34874.465492265823/8.0),
+    REAL_CONST(34892.687405998557/8.0),
+    REAL_CONST(34910.911699037177/8.0),
+    REAL_CONST(34929.138370760564/8.0),
+    REAL_CONST(34947.367420548027/8.0),
+    REAL_CONST(34965.598847779271/8.0),
+    REAL_CONST(34983.832651834389/8.0),
+    REAL_CONST(35002.068832093908/8.0),
+    REAL_CONST(35020.307387938738/8.0),
+    REAL_CONST(35038.548318750189/8.0),
+    REAL_CONST(35056.79162390998/8.0),
+    REAL_CONST(35075.03730280025/8.0),
+    REAL_CONST(35093.285354803513/8.0),
+    REAL_CONST(35111.535779302685/8.0),
+    REAL_CONST(35129.788575681116/8.0),
+    REAL_CONST(35148.043743322516/8.0),
+    REAL_CONST(35166.301281611013/8.0),
+    REAL_CONST(35184.561189931141/8.0),
+    REAL_CONST(35202.823467667826/8.0),
+    REAL_CONST(35221.088114206388/8.0),
+    REAL_CONST(35239.355128932555/8.0),
+    REAL_CONST(35257.624511232447/8.0),
+    REAL_CONST(35275.896260492584/8.0),
+    REAL_CONST(35294.170376099886/8.0),
+    REAL_CONST(35312.446857441668/8.0),
+    REAL_CONST(35330.725703905628/8.0),
+    REAL_CONST(35349.006914879887/8.0),
+    REAL_CONST(35367.290489752944/8.0),
+    REAL_CONST(35385.576427913686/8.0),
+    REAL_CONST(35403.864728751418/8.0),
+    REAL_CONST(35422.155391655811/8.0),
+    REAL_CONST(35440.448416016967/8.0),
+    REAL_CONST(35458.743801225341/8.0),
+    REAL_CONST(35477.041546671804/8.0),
+    REAL_CONST(35495.341651747622/8.0),
+    REAL_CONST(35513.644115844436/8.0),
+    REAL_CONST(35531.948938354304/8.0),
+    REAL_CONST(35550.256118669655/8.0),
+    REAL_CONST(35568.565656183309/8.0),
+    REAL_CONST(35586.877550288496/8.0),
+    REAL_CONST(35605.191800378816/8.0),
+    REAL_CONST(35623.508405848268/8.0),
+    REAL_CONST(35641.827366091238/8.0),
+    REAL_CONST(35660.148680502505/8.0),
+    REAL_CONST(35678.472348477233/8.0),
+    REAL_CONST(35696.798369410979/8.0),
+    REAL_CONST(35715.126742699678/8.0),
+    REAL_CONST(35733.457467739659/8.0),
+    REAL_CONST(35751.790543927644/8.0),
+    REAL_CONST(35770.125970660738/8.0),
+    REAL_CONST(35788.46374733642/8.0),
+    REAL_CONST(35806.803873352568/8.0),
+    REAL_CONST(35825.146348107453/8.0),
+    REAL_CONST(35843.49117099971/8.0),
+    REAL_CONST(35861.838341428367/8.0),
+    REAL_CONST(35880.187858792851/8.0),
+    REAL_CONST(35898.539722492955/8.0),
+    REAL_CONST(35916.893931928862/8.0),
+    REAL_CONST(35935.250486501129/8.0),
+    REAL_CONST(35953.609385610718/8.0),
+    REAL_CONST(35971.970628658957/8.0),
+    REAL_CONST(35990.334215047558/8.0),
+    REAL_CONST(36008.700144178612/8.0),
+    REAL_CONST(36027.068415454596/8.0),
+    REAL_CONST(36045.439028278372/8.0),
+    REAL_CONST(36063.811982053165/8.0),
+    REAL_CONST(36082.187276182609/8.0),
+    REAL_CONST(36100.564910070694/8.0),
+    REAL_CONST(36118.944883121789/8.0),
+    REAL_CONST(36137.327194740654/8.0),
+    REAL_CONST(36155.711844332429/8.0),
+    REAL_CONST(36174.098831302617/8.0),
+    REAL_CONST(36192.488155057115/8.0),
+    REAL_CONST(36210.87981500219/8.0),
+    REAL_CONST(36229.273810544473/8.0),
+    REAL_CONST(36247.670141091003/8.0),
+    REAL_CONST(36266.068806049167/8.0),
+    REAL_CONST(36284.469804826738/8.0),
+    REAL_CONST(36302.873136831862/8.0),
+    REAL_CONST(36321.278801473069/8.0),
+    REAL_CONST(36339.686798159251/8.0),
+    REAL_CONST(36358.097126299683/8.0),
+    REAL_CONST(36376.509785304013/8.0),
+    REAL_CONST(36394.924774582258/8.0),
+    REAL_CONST(36413.342093544816/8.0),
+    REAL_CONST(36431.761741602444/8.0),
+    REAL_CONST(36450.183718166292/8.0),
+    REAL_CONST(36468.608022647859/8.0),
+    REAL_CONST(36487.034654459028/8.0),
+    REAL_CONST(36505.463613012063/8.0),
+    REAL_CONST(36523.894897719583/8.0),
+    REAL_CONST(36542.328507994578/8.0),
+    REAL_CONST(36560.764443250409/8.0),
+    REAL_CONST(36579.202702900831/8.0),
+    REAL_CONST(36597.643286359926/8.0),
+    REAL_CONST(36616.086193042182/8.0),
+    REAL_CONST(36634.531422362437/8.0),
+    REAL_CONST(36652.978973735895/8.0),
+    REAL_CONST(36671.428846578143/8.0),
+    REAL_CONST(36689.881040305125/8.0),
+    REAL_CONST(36708.335554333149/8.0),
+    REAL_CONST(36726.792388078902/8.0),
+    REAL_CONST(36745.251540959427/8.0),
+    REAL_CONST(36763.713012392138/8.0),
+    REAL_CONST(36782.176801794812/8.0),
+    REAL_CONST(36800.642908585593/8.0),
+    REAL_CONST(36819.111332182983/8.0),
+    REAL_CONST(36837.582072005869/8.0),
+    REAL_CONST(36856.055127473483/8.0),
+    REAL_CONST(36874.530498005421/8.0),
+    REAL_CONST(36893.008183021651/8.0),
+    REAL_CONST(36911.488181942506/8.0),
+    REAL_CONST(36929.970494188674/8.0),
+    REAL_CONST(36948.455119181206/8.0),
+    REAL_CONST(36966.942056341519/8.0),
+    REAL_CONST(36985.431305091392/8.0),
+    REAL_CONST(37003.922864852961/8.0),
+    REAL_CONST(37022.416735048733/8.0),
+    REAL_CONST(37040.912915101559/8.0),
+    REAL_CONST(37059.411404434657/8.0),
+    REAL_CONST(37077.91220247162/8.0),
+    REAL_CONST(37096.415308636388/8.0),
+    REAL_CONST(37114.920722353243/8.0),
+    REAL_CONST(37133.428443046862/8.0),
+    REAL_CONST(37151.938470142253/8.0),
+    REAL_CONST(37170.450803064785/8.0),
+    REAL_CONST(37188.965441240209/8.0),
+    REAL_CONST(37207.482384094597/8.0),
+    REAL_CONST(37226.001631054402/8.0),
+    REAL_CONST(37244.523181546429/8.0),
+    REAL_CONST(37263.047034997842/8.0),
+    REAL_CONST(37281.573190836149/8.0),
+    REAL_CONST(37300.101648489224/8.0),
+    REAL_CONST(37318.632407385296/8.0),
+    REAL_CONST(37337.165466952945/8.0),
+    REAL_CONST(37355.700826621112/8.0),
+    REAL_CONST(37374.238485819085/8.0),
+    REAL_CONST(37392.778443976509/8.0),
+    REAL_CONST(37411.320700523385/8.0),
+    REAL_CONST(37429.865254890057/8.0),
+    REAL_CONST(37448.412106507232/8.0),
+    REAL_CONST(37466.961254805974/8.0),
+    REAL_CONST(37485.512699217681/8.0),
+    REAL_CONST(37504.066439174116/8.0),
+    REAL_CONST(37522.622474107404/8.0),
+    REAL_CONST(37541.180803449992/8.0),
+    REAL_CONST(37559.741426634704/8.0),
+    REAL_CONST(37578.304343094693/8.0),
+    REAL_CONST(37596.869552263488/8.0),
+    REAL_CONST(37615.43705357494/8.0),
+    REAL_CONST(37634.006846463279/8.0),
+    REAL_CONST(37652.578930363044/8.0),
+    REAL_CONST(37671.153304709165/8.0),
+    REAL_CONST(37689.729968936896/8.0),
+    REAL_CONST(37708.308922481847/8.0),
+    REAL_CONST(37726.890164779965/8.0),
+    REAL_CONST(37745.473695267559/8.0),
+    REAL_CONST(37764.059513381275/8.0),
+    REAL_CONST(37782.647618558112/8.0),
+    REAL_CONST(37801.238010235415/8.0),
+    REAL_CONST(37819.830687850859/8.0),
+    REAL_CONST(37838.425650842495/8.0),
+    REAL_CONST(37857.022898648691/8.0),
+    REAL_CONST(37875.622430708172/8.0),
+    REAL_CONST(37894.224246460013/8.0),
+    REAL_CONST(37912.828345343616/8.0),
+    REAL_CONST(37931.434726798747/8.0),
+    REAL_CONST(37950.043390265506/8.0),
+    REAL_CONST(37968.654335184328/8.0),
+    REAL_CONST(37987.267560995999/8.0),
+    REAL_CONST(38005.883067141665/8.0),
+    REAL_CONST(38024.500853062775/8.0),
+    REAL_CONST(38043.120918201159/8.0),
+    REAL_CONST(38061.743261998963/8.0),
+    REAL_CONST(38080.367883898682/8.0),
+    REAL_CONST(38098.994783343158/8.0),
+    REAL_CONST(38117.623959775563/8.0),
+    REAL_CONST(38136.255412639417/8.0),
+    REAL_CONST(38154.889141378575/8.0),
+    REAL_CONST(38173.525145437234/8.0),
+    REAL_CONST(38192.163424259939/8.0),
+    REAL_CONST(38210.803977291551/8.0),
+    REAL_CONST(38229.446803977284/8.0),
+    REAL_CONST(38248.091903762703/8.0),
+    REAL_CONST(38266.739276093685/8.0),
+    REAL_CONST(38285.388920416466/8.0),
+    REAL_CONST(38304.040836177606/8.0),
+    REAL_CONST(38322.695022824002/8.0),
+    REAL_CONST(38341.351479802899/8.0),
+    REAL_CONST(38360.010206561863/8.0),
+    REAL_CONST(38378.671202548816/8.0),
+    REAL_CONST(38397.334467211993/8.0),
+    REAL_CONST(38415.999999999978/8.0),
+    REAL_CONST(38434.667800361683/8.0),
+    REAL_CONST(38453.33786774637/8.0),
+    REAL_CONST(38472.010201603611/8.0),
+    REAL_CONST(38490.684801383337/8.0),
+    REAL_CONST(38509.361666535784/8.0),
+    REAL_CONST(38528.040796511552/8.0),
+    REAL_CONST(38546.722190761553/8.0),
+    REAL_CONST(38565.405848737035/8.0),
+    REAL_CONST(38584.091769889594/8.0),
+    REAL_CONST(38602.779953671132/8.0),
+    REAL_CONST(38621.470399533908/8.0),
+    REAL_CONST(38640.163106930493/8.0),
+    REAL_CONST(38658.858075313794/8.0),
+    REAL_CONST(38677.555304137059/8.0),
+    REAL_CONST(38696.254792853862/8.0),
+    REAL_CONST(38714.956540918094/8.0),
+    REAL_CONST(38733.660547783991/8.0),
+    REAL_CONST(38752.366812906112/8.0),
+    REAL_CONST(38771.075335739348/8.0),
+    REAL_CONST(38789.78611573892/8.0),
+    REAL_CONST(38808.499152360368/8.0),
+    REAL_CONST(38827.214445059573/8.0),
+    REAL_CONST(38845.931993292739/8.0),
+    REAL_CONST(38864.651796516388/8.0),
+    REAL_CONST(38883.373854187383/8.0),
+    REAL_CONST(38902.098165762916/8.0),
+    REAL_CONST(38920.824730700486/8.0),
+    REAL_CONST(38939.553548457938/8.0),
+    REAL_CONST(38958.284618493431/8.0),
+    REAL_CONST(38977.017940265461/8.0),
+    REAL_CONST(38995.753513232834/8.0),
+    REAL_CONST(39014.491336854699/8.0),
+    REAL_CONST(39033.231410590517/8.0),
+    REAL_CONST(39051.973733900079/8.0),
+    REAL_CONST(39070.718306243485/8.0),
+    REAL_CONST(39089.465127081188/8.0),
+    REAL_CONST(39108.214195873945/8.0),
+    REAL_CONST(39126.965512082832/8.0),
+    REAL_CONST(39145.719075169261/8.0),
+    REAL_CONST(39164.474884594965/8.0),
+    REAL_CONST(39183.232939821988/8.0),
+    REAL_CONST(39201.99324031271/8.0),
+    REAL_CONST(39220.755785529815/8.0),
+    REAL_CONST(39239.52057493633/8.0),
+    REAL_CONST(39258.287607995589/8.0),
+    REAL_CONST(39277.056884171245/8.0),
+    REAL_CONST(39295.828402927284/8.0),
+    REAL_CONST(39314.602163728006/8.0),
+    REAL_CONST(39333.378166038019/8.0),
+    REAL_CONST(39352.15640932227/8.0),
+    REAL_CONST(39370.936893046004/8.0),
+    REAL_CONST(39389.719616674811/8.0),
+    REAL_CONST(39408.504579674584/8.0),
+    REAL_CONST(39427.291781511522/8.0),
+    REAL_CONST(39446.081221652174/8.0),
+    REAL_CONST(39464.872899563372/8.0),
+    REAL_CONST(39483.666814712291/8.0),
+    REAL_CONST(39502.462966566411/8.0),
+    REAL_CONST(39521.261354593538/8.0),
+    REAL_CONST(39540.06197826178/8.0),
+    REAL_CONST(39558.864837039568/8.0),
+    REAL_CONST(39577.669930395656/8.0),
+    REAL_CONST(39596.47725779911/8.0),
+    REAL_CONST(39615.286818719302/8.0),
+    REAL_CONST(39634.098612625923/8.0),
+    REAL_CONST(39652.912638988993/8.0),
+    REAL_CONST(39671.728897278823/8.0),
+    REAL_CONST(39690.547386966064/8.0),
+    REAL_CONST(39709.368107521652/8.0),
+    REAL_CONST(39728.191058416858/8.0),
+    REAL_CONST(39747.016239123259/8.0),
+    REAL_CONST(39765.84364911275/8.0),
+    REAL_CONST(39784.673287857528/8.0),
+    REAL_CONST(39803.505154830105/8.0),
+    REAL_CONST(39822.339249503319/8.0),
+    REAL_CONST(39841.175571350293/8.0),
+    REAL_CONST(39860.014119844491/8.0),
+    REAL_CONST(39878.854894459677/8.0),
+    REAL_CONST(39897.697894669909/8.0),
+    REAL_CONST(39916.54311994958/8.0),
+    REAL_CONST(39935.390569773372/8.0),
+    REAL_CONST(39954.240243616303/8.0),
+    REAL_CONST(39973.092140953675/8.0),
+    REAL_CONST(39991.946261261117/8.0),
+    REAL_CONST(40010.802604014549/8.0),
+    REAL_CONST(40029.661168690225/8.0),
+    REAL_CONST(40048.521954764678/8.0),
+    REAL_CONST(40067.384961714779/8.0),
+    REAL_CONST(40086.250189017679/8.0),
+    REAL_CONST(40105.117636150855/8.0),
+    REAL_CONST(40123.98730259209/8.0),
+    REAL_CONST(40142.859187819471/8.0),
+    REAL_CONST(40161.733291311379/8.0),
+    REAL_CONST(40180.609612546526/8.0),
+    REAL_CONST(40199.488151003912/8.0),
+    REAL_CONST(40218.368906162854/8.0),
+    REAL_CONST(40237.25187750296/8.0),
+    REAL_CONST(40256.137064504153/8.0),
+    REAL_CONST(40275.024466646668/8.0),
+    REAL_CONST(40293.914083411029/8.0),
+    REAL_CONST(40312.805914278084/8.0),
+    REAL_CONST(40331.699958728961/8.0),
+    REAL_CONST(40350.596216245103/8.0),
+    REAL_CONST(40369.494686308273/8.0),
+    REAL_CONST(40388.39536840051/8.0),
+    REAL_CONST(40407.298262004173/8.0),
+    REAL_CONST(40426.20336660192/8.0),
+    REAL_CONST(40445.110681676706/8.0),
+    REAL_CONST(40464.020206711793/8.0),
+    REAL_CONST(40482.931941190756/8.0),
+    REAL_CONST(40501.845884597446/8.0),
+    REAL_CONST(40520.762036416032/8.0),
+    REAL_CONST(40539.680396130985/8.0),
+    REAL_CONST(40558.600963227072/8.0),
+    REAL_CONST(40577.523737189367/8.0),
+    REAL_CONST(40596.448717503234/8.0),
+    REAL_CONST(40615.375903654342/8.0),
+    REAL_CONST(40634.305295128659/8.0),
+    REAL_CONST(40653.236891412453/8.0),
+    REAL_CONST(40672.170691992294/8.0),
+    REAL_CONST(40691.106696355047/8.0),
+    REAL_CONST(40710.044903987873/8.0),
+    REAL_CONST(40728.985314378238/8.0),
+    REAL_CONST(40747.927927013901/8.0),
+    REAL_CONST(40766.872741382918/8.0),
+    REAL_CONST(40785.819756973651/8.0),
+    REAL_CONST(40804.768973274746/8.0),
+    REAL_CONST(40823.720389775161/8.0),
+    REAL_CONST(40842.674005964131/8.0),
+    REAL_CONST(40861.629821331211/8.0),
+    REAL_CONST(40880.587835366234/8.0),
+    REAL_CONST(40899.548047559321/8.0),
+    REAL_CONST(40918.510457400931/8.0),
+    REAL_CONST(40937.475064381761/8.0),
+    REAL_CONST(40956.441867992849/8.0),
+    REAL_CONST(40975.410867725499/8.0),
+    REAL_CONST(40994.382063071331/8.0),
+    REAL_CONST(41013.355453522236/8.0),
+    REAL_CONST(41032.331038570417/8.0),
+    REAL_CONST(41051.308817708363/8.0),
+    REAL_CONST(41070.288790428858/8.0),
+    REAL_CONST(41089.270956224987/8.0),
+    REAL_CONST(41108.255314590111/8.0),
+    REAL_CONST(41127.241865017888/8.0),
+    REAL_CONST(41146.23060700229/8.0),
+    REAL_CONST(41165.221540037543/8.0),
+    REAL_CONST(41184.214663618193/8.0),
+    REAL_CONST(41203.209977239079/8.0),
+    REAL_CONST(41222.207480395307/8.0),
+    REAL_CONST(41241.207172582297/8.0),
+    REAL_CONST(41260.209053295752/8.0),
+    REAL_CONST(41279.213122031659/8.0),
+    REAL_CONST(41298.219378286303/8.0),
+    REAL_CONST(41317.227821556255/8.0),
+    REAL_CONST(41336.23845133838/8.0),
+    REAL_CONST(41355.251267129832/8.0),
+    REAL_CONST(41374.266268428037/8.0),
+    REAL_CONST(41393.283454730743/8.0),
+    REAL_CONST(41412.302825535953/8.0),
+    REAL_CONST(41431.324380341983/8.0),
+    REAL_CONST(41450.348118647416/8.0),
+    REAL_CONST(41469.374039951144/8.0),
+    REAL_CONST(41488.402143752326/8.0),
+    REAL_CONST(41507.432429550427/8.0),
+    REAL_CONST(41526.464896845187/8.0),
+    REAL_CONST(41545.499545136627/8.0),
+    REAL_CONST(41564.536373925075/8.0),
+    REAL_CONST(41583.575382711126/8.0),
+    REAL_CONST(41602.616570995662/8.0),
+    REAL_CONST(41621.659938279874/8.0),
+    REAL_CONST(41640.705484065205/8.0),
+    REAL_CONST(41659.753207853406/8.0),
+    REAL_CONST(41678.803109146495/8.0),
+    REAL_CONST(41697.855187446803/8.0),
+    REAL_CONST(41716.909442256911/8.0),
+    REAL_CONST(41735.965873079709/8.0),
+    REAL_CONST(41755.02447941836/8.0),
+    REAL_CONST(41774.085260776315/8.0),
+    REAL_CONST(41793.148216657297/8.0),
+    REAL_CONST(41812.213346565331/8.0),
+    REAL_CONST(41831.280650004708/8.0),
+    REAL_CONST(41850.350126480014/8.0),
+    REAL_CONST(41869.421775496106/8.0),
+    REAL_CONST(41888.495596558132/8.0),
+    REAL_CONST(41907.571589171515/8.0),
+    REAL_CONST(41926.649752841957/8.0),
+    REAL_CONST(41945.730087075463/8.0),
+    REAL_CONST(41964.812591378286/8.0),
+    REAL_CONST(41983.897265256979/8.0),
+    REAL_CONST(42002.984108218378/8.0),
+    REAL_CONST(42022.073119769593/8.0),
+    REAL_CONST(42041.164299418015/8.0),
+    REAL_CONST(42060.257646671307/8.0),
+    REAL_CONST(42079.353161037419/8.0),
+    REAL_CONST(42098.450842024591/8.0),
+    REAL_CONST(42117.550689141324/8.0),
+    REAL_CONST(42136.652701896404/8.0),
+    REAL_CONST(42155.756879798893/8.0),
+    REAL_CONST(42174.863222358137/8.0),
+    REAL_CONST(42193.971729083758/8.0),
+    REAL_CONST(42213.082399485655/8.0),
+    REAL_CONST(42232.195233074002/8.0),
+    REAL_CONST(42251.310229359246/8.0),
+    REAL_CONST(42270.427387852127/8.0),
+    REAL_CONST(42289.546708063644/8.0),
+    REAL_CONST(42308.668189505079/8.0),
+    REAL_CONST(42327.791831687995/8.0),
+    REAL_CONST(42346.917634124227/8.0),
+    REAL_CONST(42366.045596325886/8.0),
+    REAL_CONST(42385.175717805352/8.0),
+    REAL_CONST(42404.307998075295/8.0),
+    REAL_CONST(42423.442436648642/8.0),
+    REAL_CONST(42442.579033038608/8.0),
+    REAL_CONST(42461.717786758672/8.0),
+    REAL_CONST(42480.858697322597/8.0),
+    REAL_CONST(42500.001764244422/8.0),
+    REAL_CONST(42519.146987038446/8.0),
+    REAL_CONST(42538.294365219248/8.0),
+    REAL_CONST(42557.443898301688/8.0),
+    REAL_CONST(42576.595585800882/8.0),
+    REAL_CONST(42595.749427232236/8.0),
+    REAL_CONST(42614.90542211142/8.0),
+    REAL_CONST(42634.063569954378/8.0),
+    REAL_CONST(42653.223870277317/8.0),
+    REAL_CONST(42672.386322596729/8.0),
+    REAL_CONST(42691.55092642938/8.0),
+    REAL_CONST(42710.717681292292/8.0),
+    REAL_CONST(42729.886586702756/8.0),
+    REAL_CONST(42749.057642178363/8.0),
+    REAL_CONST(42768.23084723694/8.0),
+    REAL_CONST(42787.406201396603/8.0),
+    REAL_CONST(42806.58370417574/8.0),
+    REAL_CONST(42825.76335509299/8.0),
+    REAL_CONST(42844.945153667286/8.0),
+    REAL_CONST(42864.129099417805/8.0),
+    REAL_CONST(42883.315191864014/8.0),
+    REAL_CONST(42902.503430525649/8.0),
+    REAL_CONST(42921.693814922692/8.0),
+    REAL_CONST(42940.88634457541/8.0),
+    REAL_CONST(42960.081019004348/8.0),
+    REAL_CONST(42979.277837730297/8.0),
+    REAL_CONST(42998.476800274322/8.0),
+    REAL_CONST(43017.677906157769/8.0),
+    REAL_CONST(43036.881154902228/8.0),
+    REAL_CONST(43056.086546029583/8.0),
+    REAL_CONST(43075.294079061961/8.0),
+    REAL_CONST(43094.503753521763/8.0),
+    REAL_CONST(43113.715568931671/8.0),
+    REAL_CONST(43132.929524814601/8.0),
+    REAL_CONST(43152.145620693766/8.0),
+    REAL_CONST(43171.363856092619/8.0),
+    REAL_CONST(43190.584230534907/8.0),
+    REAL_CONST(43209.806743544621/8.0),
+    REAL_CONST(43229.031394646016/8.0),
+    REAL_CONST(43248.258183363621/8.0),
+    REAL_CONST(43267.487109222224/8.0),
+    REAL_CONST(43286.718171746885/8.0),
+    REAL_CONST(43305.951370462906/8.0),
+    REAL_CONST(43325.186704895881/8.0),
+    REAL_CONST(43344.42417457165/8.0),
+    REAL_CONST(43363.663779016322/8.0),
+    REAL_CONST(43382.905517756262/8.0),
+    REAL_CONST(43402.149390318104/8.0),
+    REAL_CONST(43421.395396228749/8.0),
+    REAL_CONST(43440.643535015348/8.0),
+    REAL_CONST(43459.89380620532/8.0),
+    REAL_CONST(43479.146209326354/8.0),
+    REAL_CONST(43498.400743906379/8.0),
+    REAL_CONST(43517.657409473606/8.0),
+    REAL_CONST(43536.916205556496/8.0),
+    REAL_CONST(43556.177131683784/8.0),
+    REAL_CONST(43575.44018738444/8.0),
+    REAL_CONST(43594.705372187724/8.0),
+    REAL_CONST(43613.972685623135/8.0),
+    REAL_CONST(43633.242127220445/8.0),
+    REAL_CONST(43652.513696509668/8.0),
+    REAL_CONST(43671.787393021099/8.0),
+    REAL_CONST(43691.063216285271/8.0),
+    REAL_CONST(43710.341165833001/8.0),
+    REAL_CONST(43729.621241195346/8.0),
+    REAL_CONST(43748.903441903625/8.0),
+    REAL_CONST(43768.187767489413/8.0),
+    REAL_CONST(43787.474217484552/8.0),
+    REAL_CONST(43806.762791421126/8.0),
+    REAL_CONST(43826.053488831501/8.0),
+    REAL_CONST(43845.346309248278/8.0),
+    REAL_CONST(43864.641252204325/8.0),
+    REAL_CONST(43883.938317232765/8.0),
+    REAL_CONST(43903.237503866971/8.0),
+    REAL_CONST(43922.538811640596/8.0),
+    REAL_CONST(43941.842240087513/8.0),
+    REAL_CONST(43961.147788741881/8.0),
+    REAL_CONST(43980.455457138101/8.0),
+    REAL_CONST(43999.765244810835/8.0),
+    REAL_CONST(44019.077151295001/8.0),
+    REAL_CONST(44038.391176125755/8.0),
+    REAL_CONST(44057.70731883854/8.0),
+    REAL_CONST(44077.02557896902/8.0),
+    REAL_CONST(44096.345956053141/8.0),
+    REAL_CONST(44115.668449627083/8.0),
+    REAL_CONST(44134.993059227287/8.0),
+    REAL_CONST(44154.319784390456/8.0),
+    REAL_CONST(44173.648624653535/8.0),
+    REAL_CONST(44192.979579553728/8.0),
+    REAL_CONST(44212.312648628489/8.0),
+    REAL_CONST(44231.647831415532/8.0),
+    REAL_CONST(44250.985127452805/8.0),
+    REAL_CONST(44270.324536278538/8.0),
+    REAL_CONST(44289.666057431183/8.0),
+    REAL_CONST(44309.009690449464/8.0),
+    REAL_CONST(44328.355434872348/8.0),
+    REAL_CONST(44347.703290239064/8.0),
+    REAL_CONST(44367.053256089079/8.0),
+    REAL_CONST(44386.405331962109/8.0),
+    REAL_CONST(44405.759517398139/8.0),
+    REAL_CONST(44425.115811937387/8.0),
+    REAL_CONST(44444.474215120332/8.0),
+    REAL_CONST(44463.834726487694/8.0),
+    REAL_CONST(44483.197345580462/8.0),
+    REAL_CONST(44502.562071939843/8.0),
+    REAL_CONST(44521.928905107328/8.0),
+    REAL_CONST(44541.297844624634/8.0),
+    REAL_CONST(44560.668890033732/8.0),
+    REAL_CONST(44580.042040876848/8.0),
+    REAL_CONST(44599.417296696454/8.0),
+    REAL_CONST(44618.794657035272/8.0),
+    REAL_CONST(44638.174121436256/8.0),
+    REAL_CONST(44657.555689442641/8.0),
+    REAL_CONST(44676.939360597877/8.0),
+    REAL_CONST(44696.325134445673/8.0),
+    REAL_CONST(44715.713010530002/8.0),
+    REAL_CONST(44735.102988395054/8.0),
+    REAL_CONST(44754.495067585296/8.0),
+    REAL_CONST(44773.88924764542/8.0),
+    REAL_CONST(44793.285528120374/8.0),
+    REAL_CONST(44812.683908555344/8.0),
+    REAL_CONST(44832.084388495779/8.0),
+    REAL_CONST(44851.486967487363/8.0),
+    REAL_CONST(44870.891645076015/8.0),
+    REAL_CONST(44890.298420807922/8.0),
+    REAL_CONST(44909.707294229491/8.0),
+    REAL_CONST(44929.118264887409/8.0),
+    REAL_CONST(44948.531332328566/8.0),
+    REAL_CONST(44967.946496100136/8.0),
+    REAL_CONST(44987.363755749502/8.0),
+    REAL_CONST(45006.783110824319/8.0),
+    REAL_CONST(45026.204560872473/8.0),
+    REAL_CONST(45045.628105442098/8.0),
+    REAL_CONST(45065.053744081561/8.0),
+    REAL_CONST(45084.48147633949/8.0),
+    REAL_CONST(45103.911301764747/8.0),
+    REAL_CONST(45123.343219906426/8.0),
+    REAL_CONST(45142.777230313885/8.0),
+    REAL_CONST(45162.21333253671/8.0),
+    REAL_CONST(45181.651526124733/8.0),
+    REAL_CONST(45201.091810628037/8.0),
+    REAL_CONST(45220.534185596924/8.0),
+    REAL_CONST(45239.978650581965/8.0),
+    REAL_CONST(45259.425205133957/8.0),
+    REAL_CONST(45278.873848803938/8.0),
+    REAL_CONST(45298.324581143192/8.0),
+    REAL_CONST(45317.777401703235/8.0),
+    REAL_CONST(45337.232310035848/8.0),
+    REAL_CONST(45356.68930569302/8.0),
+    REAL_CONST(45376.148388226997/8.0),
+    REAL_CONST(45395.60955719027/8.0),
+    REAL_CONST(45415.072812135557/8.0),
+    REAL_CONST(45434.538152615823/8.0),
+    REAL_CONST(45454.005578184282/8.0),
+    REAL_CONST(45473.475088394356/8.0),
+    REAL_CONST(45492.946682799746/8.0),
+    REAL_CONST(45512.420360954362/8.0),
+    REAL_CONST(45531.896122412363/8.0),
+    REAL_CONST(45551.373966728155/8.0),
+    REAL_CONST(45570.853893456362/8.0),
+    REAL_CONST(45590.33590215187/8.0),
+    REAL_CONST(45609.819992369776/8.0),
+    REAL_CONST(45629.306163665438/8.0),
+    REAL_CONST(45648.794415594442/8.0),
+    REAL_CONST(45668.284747712612/8.0),
+    REAL_CONST(45687.777159576006/8.0),
+    REAL_CONST(45707.27165074092/8.0),
+    REAL_CONST(45726.768220763894/8.0),
+    REAL_CONST(45746.266869201696/8.0),
+    REAL_CONST(45765.767595611323/8.0),
+    REAL_CONST(45785.270399550034/8.0),
+    REAL_CONST(45804.775280575297/8.0),
+    REAL_CONST(45824.282238244828/8.0),
+    REAL_CONST(45843.79127211657/8.0),
+    REAL_CONST(45863.302381748719/8.0),
+    REAL_CONST(45882.815566699683/8.0),
+    REAL_CONST(45902.33082652813/8.0),
+    REAL_CONST(45921.848160792935/8.0),
+    REAL_CONST(45941.367569053225/8.0),
+    REAL_CONST(45960.889050868354/8.0),
+    REAL_CONST(45980.41260579793/8.0),
+    REAL_CONST(45999.938233401757/8.0),
+    REAL_CONST(46019.465933239902/8.0),
+    REAL_CONST(46038.995704872657/8.0),
+    REAL_CONST(46058.527547860547/8.0),
+    REAL_CONST(46078.06146176433/8.0),
+    REAL_CONST(46097.597446144995/8.0),
+    REAL_CONST(46117.135500563774/8.0),
+    REAL_CONST(46136.675624582109/8.0),
+    REAL_CONST(46156.217817761702/8.0),
+    REAL_CONST(46175.762079664462/8.0),
+    REAL_CONST(46195.308409852543/8.0),
+    REAL_CONST(46214.856807888333/8.0),
+    REAL_CONST(46234.407273334444/8.0),
+    REAL_CONST(46253.959805753715/8.0),
+    REAL_CONST(46273.51440470924/8.0),
+    REAL_CONST(46293.071069764315/8.0),
+    REAL_CONST(46312.629800482478/8.0),
+    REAL_CONST(46332.190596427499/8.0),
+    REAL_CONST(46351.753457163381/8.0),
+    REAL_CONST(46371.318382254351/8.0),
+    REAL_CONST(46390.885371264863/8.0),
+    REAL_CONST(46410.45442375962/8.0),
+    REAL_CONST(46430.025539303526/8.0),
+    REAL_CONST(46449.598717461733/8.0),
+    REAL_CONST(46469.17395779962/8.0),
+    REAL_CONST(46488.751259882782/8.0),
+    REAL_CONST(46508.33062327707/8.0),
+    REAL_CONST(46527.912047548532/8.0),
+    REAL_CONST(46547.495532263471/8.0),
+    REAL_CONST(46567.081076988397/8.0),
+    REAL_CONST(46586.668681290059/8.0),
+    REAL_CONST(46606.258344735434/8.0),
+    REAL_CONST(46625.850066891719/8.0),
+    REAL_CONST(46645.443847326351/8.0),
+    REAL_CONST(46665.039685606986/8.0),
+    REAL_CONST(46684.637581301497/8.0),
+    REAL_CONST(46704.237533978005/8.0),
+    REAL_CONST(46723.839543204842/8.0),
+    REAL_CONST(46743.443608550573/8.0),
+    REAL_CONST(46763.049729583989/8.0),
+    REAL_CONST(46782.657905874104/8.0),
+    REAL_CONST(46802.268136990162/8.0),
+    REAL_CONST(46821.880422501628/8.0),
+    REAL_CONST(46841.494761978196/8.0),
+    REAL_CONST(46861.111154989776/8.0),
+    REAL_CONST(46880.729601106526/8.0),
+    REAL_CONST(46900.350099898795/8.0),
+    REAL_CONST(46919.97265093719/8.0),
+    REAL_CONST(46939.597253792526/8.0),
+    REAL_CONST(46959.223908035841/8.0),
+    REAL_CONST(46978.852613238392/8.0),
+    REAL_CONST(46998.483368971691/8.0),
+    REAL_CONST(47018.11617480743/8.0),
+    REAL_CONST(47037.751030317551/8.0),
+    REAL_CONST(47057.387935074221/8.0),
+    REAL_CONST(47077.026888649809/8.0),
+    REAL_CONST(47096.66789061694/8.0),
+    REAL_CONST(47116.310940548428/8.0),
+    REAL_CONST(47135.956038017328/8.0),
+    REAL_CONST(47155.603182596918/8.0),
+    REAL_CONST(47175.252373860698/8.0),
+    REAL_CONST(47194.903611382375/8.0),
+    REAL_CONST(47214.556894735892/8.0),
+    REAL_CONST(47234.212223495422/8.0),
+    REAL_CONST(47253.869597235338/8.0),
+    REAL_CONST(47273.52901553025/8.0),
+    REAL_CONST(47293.19047795498/8.0),
+    REAL_CONST(47312.853984084577/8.0),
+    REAL_CONST(47332.519533494306/8.0),
+    REAL_CONST(47352.187125759658/8.0),
+    REAL_CONST(47371.856760456343/8.0),
+    REAL_CONST(47391.528437160297/8.0),
+    REAL_CONST(47411.202155447652/8.0),
+    REAL_CONST(47430.877914894787/8.0),
+    REAL_CONST(47450.555715078299/8.0),
+    REAL_CONST(47470.235555574982/8.0),
+    REAL_CONST(47489.917435961863/8.0),
+    REAL_CONST(47509.601355816201/8.0),
+    REAL_CONST(47529.287314715453/8.0),
+    REAL_CONST(47548.975312237308/8.0),
+    REAL_CONST(47568.665347959672/8.0),
+    REAL_CONST(47588.357421460656/8.0),
+    REAL_CONST(47608.051532318605/8.0),
+    REAL_CONST(47627.747680112072/8.0),
+    REAL_CONST(47647.445864419846/8.0),
+    REAL_CONST(47667.14608482091/8.0),
+    REAL_CONST(47686.848340894474/8.0),
+    REAL_CONST(47706.552632219973/8.0),
+    REAL_CONST(47726.258958377046/8.0),
+    REAL_CONST(47745.967318945557/8.0),
+    REAL_CONST(47765.677713505589/8.0),
+    REAL_CONST(47785.390141637428/8.0),
+    REAL_CONST(47805.104602921601/8.0),
+    REAL_CONST(47824.821096938824/8.0),
+    REAL_CONST(47844.539623270044/8.0),
+    REAL_CONST(47864.260181496429/8.0),
+    REAL_CONST(47883.982771199349/8.0),
+    REAL_CONST(47903.707391960394/8.0),
+    REAL_CONST(47923.434043361369/8.0),
+    REAL_CONST(47943.162724984308/8.0),
+    REAL_CONST(47962.893436411439/8.0),
+    REAL_CONST(47982.626177225218/8.0),
+    REAL_CONST(48002.36094700831/8.0),
+    REAL_CONST(48022.097745343599/8.0),
+    REAL_CONST(48041.836571814172/8.0),
+    REAL_CONST(48061.57742600335/8.0),
+    REAL_CONST(48081.32030749465/8.0),
+    REAL_CONST(48101.065215871815/8.0),
+    REAL_CONST(48120.81215071879/8.0),
+    REAL_CONST(48140.56111161974/8.0),
+    REAL_CONST(48160.312098159047/8.0),
+    REAL_CONST(48180.065109921306/8.0),
+    REAL_CONST(48199.820146491307/8.0),
+    REAL_CONST(48219.577207454073/8.0),
+    REAL_CONST(48239.336292394844/8.0),
+    REAL_CONST(48259.097400899045/8.0),
+    REAL_CONST(48278.860532552339/8.0),
+    REAL_CONST(48298.625686940592/8.0),
+    REAL_CONST(48318.392863649875/8.0),
+    REAL_CONST(48338.162062266485/8.0),
+    REAL_CONST(48357.933282376915/8.0),
+    REAL_CONST(48377.706523567889/8.0),
+    REAL_CONST(48397.481785426316/8.0),
+    REAL_CONST(48417.259067539344/8.0),
+    REAL_CONST(48437.038369494308/8.0),
+    REAL_CONST(48456.819690878765/8.0),
+    REAL_CONST(48476.603031280487/8.0),
+    REAL_CONST(48496.388390287451/8.0),
+    REAL_CONST(48516.175767487839/8.0),
+    REAL_CONST(48535.965162470042/8.0),
+    REAL_CONST(48555.756574822684/8.0),
+    REAL_CONST(48575.550004134566/8.0),
+    REAL_CONST(48595.345449994718/8.0),
+    REAL_CONST(48615.142911992378/8.0),
+    REAL_CONST(48634.942389716991/8.0),
+    REAL_CONST(48654.743882758201/8.0),
+    REAL_CONST(48674.547390705877/8.0),
+    REAL_CONST(48694.352913150084/8.0),
+    REAL_CONST(48714.160449681112/8.0),
+    REAL_CONST(48733.969999889443/8.0),
+    REAL_CONST(48753.781563365759/8.0),
+    REAL_CONST(48773.595139700978/8.0),
+    REAL_CONST(48793.410728486211/8.0),
+    REAL_CONST(48813.228329312769/8.0),
+    REAL_CONST(48833.047941772187/8.0),
+    REAL_CONST(48852.869565456189/8.0),
+    REAL_CONST(48872.693199956717/8.0),
+    REAL_CONST(48892.518844865925/8.0),
+    REAL_CONST(48912.346499776155/8.0),
+    REAL_CONST(48932.176164279976/8.0),
+    REAL_CONST(48952.007837970152/8.0),
+    REAL_CONST(48971.841520439666/8.0),
+    REAL_CONST(48991.677211281676/8.0),
+    REAL_CONST(49011.514910089587/8.0),
+    REAL_CONST(49031.354616456978/8.0),
+    REAL_CONST(49051.196329977654/8.0),
+    REAL_CONST(49071.04005024561/8.0),
+    REAL_CONST(49090.885776855059/8.0),
+    REAL_CONST(49110.733509400408/8.0),
+    REAL_CONST(49130.583247476279/8.0),
+    REAL_CONST(49150.434990677488/8.0),
+    REAL_CONST(49170.288738599062/8.0),
+    REAL_CONST(49190.144490836232/8.0),
+    REAL_CONST(49210.002246984441/8.0),
+    REAL_CONST(49229.86200663932/8.0),
+    REAL_CONST(49249.723769396718/8.0),
+    REAL_CONST(49269.587534852675/8.0),
+    REAL_CONST(49289.453302603448/8.0),
+    REAL_CONST(49309.32107224549/8.0),
+    REAL_CONST(49329.190843375451/8.0),
+    REAL_CONST(49349.062615590192/8.0),
+    REAL_CONST(49368.936388486785/8.0),
+    REAL_CONST(49388.812161662492/8.0),
+    REAL_CONST(49408.689934714785/8.0),
+    REAL_CONST(49428.569707241324/8.0),
+    REAL_CONST(49448.45147883999/8.0),
+    REAL_CONST(49468.335249108866/8.0),
+    REAL_CONST(49488.22101764621/8.0),
+    REAL_CONST(49508.108784050521/8.0),
+    REAL_CONST(49527.99854792047/8.0),
+    REAL_CONST(49547.890308854934/8.0),
+    REAL_CONST(49567.784066453009/8.0),
+    REAL_CONST(49587.679820313977/8.0),
+    REAL_CONST(49607.57757003732/8.0),
+    REAL_CONST(49627.477315222721/8.0),
+    REAL_CONST(49647.379055470075/8.0),
+    REAL_CONST(49667.28279037946/8.0),
+    REAL_CONST(49687.188519551179/8.0),
+    REAL_CONST(49707.096242585707/8.0),
+    REAL_CONST(49727.005959083741/8.0),
+    REAL_CONST(49746.917668646165/8.0),
+    REAL_CONST(49766.831370874068/8.0),
+    REAL_CONST(49786.747065368734/8.0),
+    REAL_CONST(49806.66475173166/8.0),
+    REAL_CONST(49826.584429564515/8.0),
+    REAL_CONST(49846.506098469203/8.0),
+    REAL_CONST(49866.429758047794/8.0),
+    REAL_CONST(49886.355407902578/8.0),
+    REAL_CONST(49906.283047636032/8.0),
+    REAL_CONST(49926.212676850846/8.0),
+    REAL_CONST(49946.144295149883/8.0),
+    REAL_CONST(49966.077902136225/8.0),
+    REAL_CONST(49986.013497413151/8.0),
+    REAL_CONST(50005.951080584135/8.0),
+    REAL_CONST(50025.890651252834/8.0),
+    REAL_CONST(50045.832209023123/8.0),
+    REAL_CONST(50065.775753499074/8.0),
+    REAL_CONST(50085.721284284933/8.0),
+    REAL_CONST(50105.668800985164/8.0),
+    REAL_CONST(50125.618303204428/8.0),
+    REAL_CONST(50145.569790547575/8.0),
+    REAL_CONST(50165.523262619652/8.0),
+    REAL_CONST(50185.478719025901/8.0),
+    REAL_CONST(50205.436159371769/8.0),
+    REAL_CONST(50225.395583262893/8.0),
+    REAL_CONST(50245.356990305103/8.0),
+    REAL_CONST(50265.320380104429/8.0),
+    REAL_CONST(50285.285752267104/8.0),
+    REAL_CONST(50305.253106399534/8.0),
+    REAL_CONST(50325.222442108337/8.0),
+    REAL_CONST(50345.193759000336/8.0),
+    REAL_CONST(50365.16705668252/8.0),
+    REAL_CONST(50385.142334762102/8.0),
+    REAL_CONST(50405.119592846473/8.0),
+    REAL_CONST(50425.098830543218/8.0),
+    REAL_CONST(50445.080047460127/8.0),
+    REAL_CONST(50465.063243205179/8.0),
+    REAL_CONST(50485.048417386541/8.0),
+    REAL_CONST(50505.035569612577/8.0),
+    REAL_CONST(50525.024699491856/8.0),
+    REAL_CONST(50545.015806633128/8.0),
+    REAL_CONST(50565.008890645338/8.0),
+    REAL_CONST(50585.003951137631/8.0),
+    REAL_CONST(50605.00098771933/8.0),
+    REAL_CONST(50624.999999999971/8.0),
+    REAL_CONST(50645.000987589265/8.0),
+    REAL_CONST(50665.003950097132/8.0),
+    REAL_CONST(50685.008887133677/8.0),
+    REAL_CONST(50705.015798309192/8.0),
+    REAL_CONST(50725.024683234165/8.0),
+    REAL_CONST(50745.035541519283/8.0),
+    REAL_CONST(50765.048372775411/8.0),
+    REAL_CONST(50785.063176613621/8.0),
+    REAL_CONST(50805.079952645159/8.0),
+    REAL_CONST(50825.098700481489/8.0),
+    REAL_CONST(50845.119419734241/8.0),
+    REAL_CONST(50865.142110015244/8.0),
+    REAL_CONST(50885.166770936521/8.0),
+    REAL_CONST(50905.193402110279/8.0),
+    REAL_CONST(50925.222003148934/8.0),
+    REAL_CONST(50945.252573665071/8.0),
+    REAL_CONST(50965.285113271471/8.0),
+    REAL_CONST(50985.319621581119/8.0),
+    REAL_CONST(51005.356098207172/8.0),
+    REAL_CONST(51025.394542762981/8.0),
+    REAL_CONST(51045.434954862096/8.0),
+    REAL_CONST(51065.477334118244/8.0),
+    REAL_CONST(51085.521680145357/8.0),
+    REAL_CONST(51105.567992557546/8.0),
+    REAL_CONST(51125.616270969113/8.0),
+    REAL_CONST(51145.66651499454/8.0),
+    REAL_CONST(51165.718724248516/8.0),
+    REAL_CONST(51185.772898345916/8.0),
+    REAL_CONST(51205.829036901778/8.0),
+    REAL_CONST(51225.887139531362/8.0),
+    REAL_CONST(51245.947205850105/8.0),
+    REAL_CONST(51266.009235473619/8.0),
+    REAL_CONST(51286.073228017718/8.0),
+    REAL_CONST(51306.139183098399/8.0),
+    REAL_CONST(51326.207100331856/8.0),
+    REAL_CONST(51346.276979334456/8.0),
+    REAL_CONST(51366.348819722756/8.0),
+    REAL_CONST(51386.42262111351/8.0),
+    REAL_CONST(51406.498383123653/8.0),
+    REAL_CONST(51426.57610537031/8.0),
+    REAL_CONST(51446.655787470787/8.0),
+    REAL_CONST(51466.737429042587/8.0),
+    REAL_CONST(51486.82102970338/8.0),
+    REAL_CONST(51506.906589071048/8.0),
+    REAL_CONST(51526.994106763632/8.0),
+    REAL_CONST(51547.083582399391/8.0),
+    REAL_CONST(51567.175015596738/8.0),
+    REAL_CONST(51587.268405974297/8.0),
+    REAL_CONST(51607.363753150858/8.0),
+    REAL_CONST(51627.461056745415/8.0),
+    REAL_CONST(51647.56031637713/8.0),
+    REAL_CONST(51667.661531665362/8.0),
+    REAL_CONST(51687.764702229651/8.0),
+    REAL_CONST(51707.869827689727/8.0),
+    REAL_CONST(51727.976907665499/8.0),
+    REAL_CONST(51748.085941777055/8.0),
+    REAL_CONST(51768.196929644677/8.0),
+    REAL_CONST(51788.309870888836/8.0),
+    REAL_CONST(51808.42476513017/8.0),
+    REAL_CONST(51828.541611989524/8.0),
+    REAL_CONST(51848.660411087905/8.0),
+    REAL_CONST(51868.781162046515/8.0),
+    REAL_CONST(51888.90386448674/8.0),
+    REAL_CONST(51909.028518030143/8.0),
+    REAL_CONST(51929.155122298485/8.0),
+    REAL_CONST(51949.283676913685/8.0),
+    REAL_CONST(51969.414181497872/8.0),
+    REAL_CONST(51989.546635673345/8.0),
+    REAL_CONST(52009.681039062583/8.0),
+    REAL_CONST(52029.817391288263/8.0),
+    REAL_CONST(52049.955691973213/8.0),
+    REAL_CONST(52070.095940740481/8.0),
+    REAL_CONST(52090.238137213273/8.0),
+    REAL_CONST(52110.382281014987/8.0),
+    REAL_CONST(52130.5283717692/8.0),
+    REAL_CONST(52150.676409099666/8.0),
+    REAL_CONST(52170.826392630333/8.0),
+    REAL_CONST(52190.97832198532/8.0),
+    REAL_CONST(52211.132196788931/8.0),
+    REAL_CONST(52231.288016665654/8.0),
+    REAL_CONST(52251.445781240145/8.0),
+    REAL_CONST(52271.60549013727/8.0),
+    REAL_CONST(52291.76714298204/8.0),
+    REAL_CONST(52311.930739399664/8.0),
+    REAL_CONST(52332.096279015546/8.0),
+    REAL_CONST(52352.263761455244/8.0),
+    REAL_CONST(52372.433186344519/8.0),
+    REAL_CONST(52392.604553309284/8.0),
+    REAL_CONST(52412.777861975665/8.0),
+    REAL_CONST(52432.953111969946/8.0),
+    REAL_CONST(52453.130302918595/8.0),
+    REAL_CONST(52473.309434448267/8.0),
+    REAL_CONST(52493.490506185793/8.0),
+    REAL_CONST(52513.67351775818/8.0),
+    REAL_CONST(52533.858468792605/8.0),
+    REAL_CONST(52554.045358916446/8.0),
+    REAL_CONST(52574.234187757254/8.0),
+    REAL_CONST(52594.42495494274/8.0),
+    REAL_CONST(52614.617660100812/8.0),
+    REAL_CONST(52634.812302859558/8.0),
+    REAL_CONST(52655.008882847229/8.0),
+    REAL_CONST(52675.20739969227/8.0),
+    REAL_CONST(52695.407853023295/8.0),
+    REAL_CONST(52715.610242469098/8.0),
+    REAL_CONST(52735.814567658657/8.0),
+    REAL_CONST(52756.02082822111/8.0),
+    REAL_CONST(52776.229023785803/8.0),
+    REAL_CONST(52796.439153982225/8.0),
+    REAL_CONST(52816.651218440056/8.0),
+    REAL_CONST(52836.865216789171/8.0),
+    REAL_CONST(52857.081148659599/8.0),
+    REAL_CONST(52877.29901368155/8.0),
+    REAL_CONST(52897.518811485425/8.0),
+    REAL_CONST(52917.740541701773/8.0),
+    REAL_CONST(52937.964203961354/8.0),
+    REAL_CONST(52958.18979789508/8.0),
+    REAL_CONST(52978.417323134046/8.0),
+    REAL_CONST(52998.646779309529/8.0),
+    REAL_CONST(53018.878166052978/8.0),
+    REAL_CONST(53039.111482996006/8.0),
+    REAL_CONST(53059.346729770419/8.0),
+    REAL_CONST(53079.583906008193/8.0),
+    REAL_CONST(53099.823011341483/8.0),
+    REAL_CONST(53120.0640454026/8.0),
+    REAL_CONST(53140.307007824063/8.0),
+    REAL_CONST(53160.551898238533/8.0),
+    REAL_CONST(53180.79871627887/8.0),
+    REAL_CONST(53201.047461578091/8.0),
+    REAL_CONST(53221.2981337694/8.0),
+    REAL_CONST(53241.550732486176/8.0),
+    REAL_CONST(53261.805257361964/8.0),
+    REAL_CONST(53282.061708030487/8.0),
+    REAL_CONST(53302.32008412564/8.0),
+    REAL_CONST(53322.580385281493/8.0),
+    REAL_CONST(53342.842611132299/8.0),
+    REAL_CONST(53363.106761312469/8.0),
+    REAL_CONST(53383.372835456597/8.0),
+    REAL_CONST(53403.640833199453/8.0),
+    REAL_CONST(53423.910754175973/8.0),
+    REAL_CONST(53444.18259802126/8.0),
+    REAL_CONST(53464.456364370613/8.0),
+    REAL_CONST(53484.732052859479/8.0),
+    REAL_CONST(53505.009663123499/8.0),
+    REAL_CONST(53525.289194798468/8.0),
+    REAL_CONST(53545.570647520362/8.0),
+    REAL_CONST(53565.854020925333/8.0),
+    REAL_CONST(53586.139314649699/8.0),
+    REAL_CONST(53606.426528329954/8.0),
+    REAL_CONST(53626.715661602764/8.0),
+    REAL_CONST(53647.006714104959/8.0),
+    REAL_CONST(53667.299685473547/8.0),
+    REAL_CONST(53687.59457534572/8.0),
+    REAL_CONST(53707.891383358816/8.0),
+    REAL_CONST(53728.190109150361/8.0),
+    REAL_CONST(53748.490752358055/8.0),
+    REAL_CONST(53768.793312619753/8.0),
+    REAL_CONST(53789.09778957349/8.0),
+    REAL_CONST(53809.404182857485/8.0),
+    REAL_CONST(53829.712492110106/8.0),
+    REAL_CONST(53850.022716969899/8.0),
+    REAL_CONST(53870.334857075584/8.0),
+    REAL_CONST(53890.648912066055/8.0),
+    REAL_CONST(53910.964881580367/8.0),
+    REAL_CONST(53931.28276525774/8.0),
+    REAL_CONST(53951.602562737586/8.0),
+    REAL_CONST(53971.924273659461/8.0),
+    REAL_CONST(53992.24789766311/8.0),
+    REAL_CONST(54012.57343438844/8.0),
+    REAL_CONST(54032.90088347553/8.0),
+    REAL_CONST(54053.23024456462/8.0),
+    REAL_CONST(54073.561517296133/8.0),
+    REAL_CONST(54093.894701310644/8.0),
+    REAL_CONST(54114.22979624891/8.0),
+    REAL_CONST(54134.566801751855/8.0),
+    REAL_CONST(54154.90571746057/8.0),
+    REAL_CONST(54175.246543016314/8.0),
+    REAL_CONST(54195.589278060506/8.0),
+    REAL_CONST(54215.933922234755/8.0),
+    REAL_CONST(54236.280475180814/8.0),
+    REAL_CONST(54256.628936540626/8.0),
+    REAL_CONST(54276.97930595628/8.0),
+    REAL_CONST(54297.331583070045/8.0),
+    REAL_CONST(54317.685767524359/8.0),
+    REAL_CONST(54338.041858961828/8.0),
+    REAL_CONST(54358.399857025215/8.0),
+    REAL_CONST(54378.759761357462/8.0),
+    REAL_CONST(54399.121571601667/8.0),
+    REAL_CONST(54419.485287401105/8.0),
+    REAL_CONST(54439.850908399218/8.0),
+    REAL_CONST(54460.218434239614/8.0),
+    REAL_CONST(54480.587864566056/8.0),
+    REAL_CONST(54500.95919902248/8.0),
+    REAL_CONST(54521.332437252997/8.0),
+    REAL_CONST(54541.707578901878/8.0),
+    REAL_CONST(54562.084623613555/8.0),
+    REAL_CONST(54582.46357103264/8.0),
+    REAL_CONST(54602.844420803893/8.0),
+    REAL_CONST(54623.227172572246/8.0),
+    REAL_CONST(54643.611825982807/8.0),
+    REAL_CONST(54663.998380680838/8.0),
+    REAL_CONST(54684.386836311773/8.0),
+    REAL_CONST(54704.777192521207/8.0),
+    REAL_CONST(54725.169448954897/8.0),
+    REAL_CONST(54745.563605258772/8.0),
+    REAL_CONST(54765.959661078923/8.0),
+    REAL_CONST(54786.357616061614/8.0),
+    REAL_CONST(54806.757469853255/8.0),
+    REAL_CONST(54827.159222100439/8.0),
+    REAL_CONST(54847.562872449904/8.0),
+    REAL_CONST(54867.968420548583/8.0),
+    REAL_CONST(54888.375866043534/8.0),
+    REAL_CONST(54908.785208582012/8.0),
+    REAL_CONST(54929.196447811417/8.0),
+    REAL_CONST(54949.609583379322/8.0),
+    REAL_CONST(54970.024614933463/8.0),
+    REAL_CONST(54990.441542121727/8.0),
+    REAL_CONST(55010.86036459219/8.0),
+    REAL_CONST(55031.28108199306/8.0),
+    REAL_CONST(55051.703693972733/8.0),
+    REAL_CONST(55072.128200179759/8.0),
+    REAL_CONST(55092.554600262847/8.0),
+    REAL_CONST(55112.982893870874/8.0),
+    REAL_CONST(55133.413080652877/8.0),
+    REAL_CONST(55153.845160258061/8.0),
+    REAL_CONST(55174.279132335789/8.0),
+    REAL_CONST(55194.714996535586/8.0),
+    REAL_CONST(55215.152752507143/8.0),
+    REAL_CONST(55235.592399900306/8.0),
+    REAL_CONST(55256.033938365079/8.0),
+    REAL_CONST(55276.477367551655/8.0),
+    REAL_CONST(55296.92268711036/8.0),
+    REAL_CONST(55317.369896691685/8.0),
+    REAL_CONST(55337.818995946305/8.0),
+    REAL_CONST(55358.269984525024/8.0),
+    REAL_CONST(55378.72286207883/8.0),
+    REAL_CONST(55399.177628258869/8.0),
+    REAL_CONST(55419.634282716441/8.0),
+    REAL_CONST(55440.092825103013/8.0),
+    REAL_CONST(55460.553255070205/8.0),
+    REAL_CONST(55481.015572269804/8.0),
+    REAL_CONST(55501.479776353764/8.0),
+    REAL_CONST(55521.945866974187/8.0),
+    REAL_CONST(55542.413843783339/8.0),
+    REAL_CONST(55562.883706433655/8.0),
+    REAL_CONST(55583.355454577715/8.0),
+    REAL_CONST(55603.82908786826/8.0),
+    REAL_CONST(55624.304605958219/8.0),
+    REAL_CONST(55644.782008500639/8.0),
+    REAL_CONST(55665.261295148754/8.0),
+    REAL_CONST(55685.742465555952/8.0),
+    REAL_CONST(55706.225519375774/8.0),
+    REAL_CONST(55726.710456261928/8.0),
+    REAL_CONST(55747.197275868275/8.0),
+    REAL_CONST(55767.685977848843/8.0),
+    REAL_CONST(55788.176561857814/8.0),
+    REAL_CONST(55808.669027549528/8.0),
+    REAL_CONST(55829.163374578478/8.0),
+    REAL_CONST(55849.659602599328/8.0),
+    REAL_CONST(55870.157711266889/8.0),
+    REAL_CONST(55890.657700236145/8.0),
+    REAL_CONST(55911.159569162221/8.0),
+    REAL_CONST(55931.663317700411/8.0),
+    REAL_CONST(55952.168945506164/8.0),
+    REAL_CONST(55972.676452235086/8.0),
+    REAL_CONST(55993.185837542944/8.0),
+    REAL_CONST(56013.697101085651/8.0),
+    REAL_CONST(56034.210242519301/8.0),
+    REAL_CONST(56054.72526150012/8.0),
+    REAL_CONST(56075.242157684508/8.0),
+    REAL_CONST(56095.760930729011/8.0),
+    REAL_CONST(56116.281580290342/8.0),
+    REAL_CONST(56136.804106025367/8.0),
+    REAL_CONST(56157.328507591104/8.0),
+    REAL_CONST(56177.85478464474/8.0),
+    REAL_CONST(56198.382936843598/8.0),
+    REAL_CONST(56218.912963845185/8.0),
+    REAL_CONST(56239.444865307138/8.0),
+    REAL_CONST(56259.978640887268/8.0),
+    REAL_CONST(56280.514290243525/8.0),
+    REAL_CONST(56301.051813034042/8.0),
+    REAL_CONST(56321.591208917082/8.0),
+    REAL_CONST(56342.13247755108/8.0),
+    REAL_CONST(56362.675618594607/8.0),
+    REAL_CONST(56383.220631706419/8.0),
+    REAL_CONST(56403.767516545398/8.0),
+    REAL_CONST(56424.316272770608/8.0),
+    REAL_CONST(56444.866900041241/8.0),
+    REAL_CONST(56465.419398016667/8.0),
+    REAL_CONST(56485.973766356394/8.0),
+    REAL_CONST(56506.530004720102/8.0),
+    REAL_CONST(56527.088112767611/8.0),
+    REAL_CONST(56547.648090158902/8.0),
+    REAL_CONST(56568.209936554107/8.0),
+    REAL_CONST(56588.773651613519/8.0),
+    REAL_CONST(56609.339234997584/8.0),
+    REAL_CONST(56629.9066863669/8.0),
+    REAL_CONST(56650.47600538221/8.0),
+    REAL_CONST(56671.04719170442/8.0),
+    REAL_CONST(56691.620244994599/8.0),
+    REAL_CONST(56712.195164913959/8.0),
+    REAL_CONST(56732.771951123868/8.0),
+    REAL_CONST(56753.350603285835/8.0),
+    REAL_CONST(56773.931121061541/8.0),
+    REAL_CONST(56794.513504112823/8.0),
+    REAL_CONST(56815.097752101647/8.0),
+    REAL_CONST(56835.683864690152/8.0),
+    REAL_CONST(56856.271841540627/8.0),
+    REAL_CONST(56876.86168231551/8.0),
+    REAL_CONST(56897.453386677393/8.0),
+    REAL_CONST(56918.046954289028/8.0),
+    REAL_CONST(56938.642384813298/8.0),
+    REAL_CONST(56959.239677913261/8.0),
+    REAL_CONST(56979.838833252121/8.0),
+    REAL_CONST(57000.439850493225/8.0),
+    REAL_CONST(57021.04272930009/8.0),
+    REAL_CONST(57041.647469336371/8.0),
+    REAL_CONST(57062.254070265873/8.0),
+    REAL_CONST(57082.862531752558/8.0),
+    REAL_CONST(57103.472853460553/8.0),
+    REAL_CONST(57124.085035054108/8.0),
+    REAL_CONST(57144.699076197649/8.0),
+    REAL_CONST(57165.314976555739/8.0),
+    REAL_CONST(57185.932735793103/8.0),
+    REAL_CONST(57206.552353574611/8.0),
+    REAL_CONST(57227.173829565276/8.0),
+    REAL_CONST(57247.797163430281/8.0),
+    REAL_CONST(57268.42235483494/8.0),
+    REAL_CONST(57289.049403444733/8.0),
+    REAL_CONST(57309.678308925286/8.0),
+    REAL_CONST(57330.30907094237/8.0),
+    REAL_CONST(57350.941689161911/8.0),
+    REAL_CONST(57371.576163249985/8.0),
+    REAL_CONST(57392.212492872815/8.0),
+    REAL_CONST(57412.850677696784/8.0),
+    REAL_CONST(57433.490717388406/8.0),
+    REAL_CONST(57454.132611614368/8.0),
+    REAL_CONST(57474.776360041491/8.0),
+    REAL_CONST(57495.421962336746/8.0),
+    REAL_CONST(57516.069418167266/8.0),
+    REAL_CONST(57536.718727200314/8.0),
+    REAL_CONST(57557.36988910332/8.0),
+    REAL_CONST(57578.022903543861/8.0),
+    REAL_CONST(57598.677770189643/8.0),
+    REAL_CONST(57619.334488708548/8.0),
+    REAL_CONST(57639.993058768589/8.0),
+    REAL_CONST(57660.653480037938/8.0),
+    REAL_CONST(57681.315752184906/8.0),
+    REAL_CONST(57701.979874877965/8.0),
+    REAL_CONST(57722.64584778573/8.0),
+    REAL_CONST(57743.31367057695/8.0),
+    REAL_CONST(57763.983342920546/8.0),
+    REAL_CONST(57784.654864485572/8.0),
+    REAL_CONST(57805.328234941233/8.0),
+    REAL_CONST(57826.003453956881/8.0),
+    REAL_CONST(57846.680521202026/8.0),
+    REAL_CONST(57867.359436346305/8.0),
+    REAL_CONST(57888.040199059527/8.0),
+    REAL_CONST(57908.722809011633/8.0),
+    REAL_CONST(57929.407265872709/8.0),
+    REAL_CONST(57950.093569313001/8.0),
+    REAL_CONST(57970.781719002895/8.0),
+    REAL_CONST(57991.471714612911/8.0),
+    REAL_CONST(58012.16355581375/8.0),
+    REAL_CONST(58032.857242276223/8.0),
+    REAL_CONST(58053.552773671312/8.0),
+    REAL_CONST(58074.25014967013/8.0),
+    REAL_CONST(58094.949369943948/8.0),
+    REAL_CONST(58115.650434164185/8.0),
+    REAL_CONST(58136.353342002389/8.0),
+    REAL_CONST(58157.058093130276/8.0),
+    REAL_CONST(58177.764687219693/8.0),
+    REAL_CONST(58198.47312394264/8.0),
+    REAL_CONST(58219.183402971255/8.0),
+    REAL_CONST(58239.895523977837/8.0),
+    REAL_CONST(58260.609486634821/8.0),
+    REAL_CONST(58281.325290614775/8.0),
+    REAL_CONST(58302.042935590434/8.0),
+    REAL_CONST(58322.762421234678/8.0),
+    REAL_CONST(58343.483747220511/8.0),
+    REAL_CONST(58364.206913221096/8.0),
+    REAL_CONST(58384.931918909751/8.0),
+    REAL_CONST(58405.658763959924/8.0),
+    REAL_CONST(58426.3874480452/8.0),
+    REAL_CONST(58447.117970839339/8.0),
+    REAL_CONST(58467.85033201622/8.0),
+    REAL_CONST(58488.584531249864/8.0),
+    REAL_CONST(58509.320568214462/8.0),
+    REAL_CONST(58530.058442584334/8.0),
+    REAL_CONST(58550.798154033931/8.0),
+    REAL_CONST(58571.539702237875/8.0),
+    REAL_CONST(58592.283086870906/8.0),
+    REAL_CONST(58613.028307607929/8.0),
+    REAL_CONST(58633.775364123983/8.0),
+    REAL_CONST(58654.52425609425/8.0),
+    REAL_CONST(58675.274983194053/8.0),
+    REAL_CONST(58696.027545098877/8.0),
+    REAL_CONST(58716.781941484325/8.0),
+    REAL_CONST(58737.538172026158/8.0),
+    REAL_CONST(58758.296236400274/8.0),
+    REAL_CONST(58779.056134282728/8.0),
+    REAL_CONST(58799.817865349694/8.0),
+    REAL_CONST(58820.581429277503/8.0),
+    REAL_CONST(58841.346825742643/8.0),
+    REAL_CONST(58862.114054421712/8.0),
+    REAL_CONST(58882.883114991484/8.0),
+    REAL_CONST(58903.654007128847/8.0),
+    REAL_CONST(58924.426730510851/8.0),
+    REAL_CONST(58945.201284814684/8.0),
+    REAL_CONST(58965.977669717664/8.0),
+    REAL_CONST(58986.755884897269/8.0),
+    REAL_CONST(59007.535930031117/8.0),
+    REAL_CONST(59028.317804796949/8.0),
+    REAL_CONST(59049.101508872664/8.0),
+    REAL_CONST(59069.887041936301/8.0),
+    REAL_CONST(59090.674403666046/8.0),
+    REAL_CONST(59111.463593740213/8.0),
+    REAL_CONST(59132.254611837263/8.0),
+    REAL_CONST(59153.047457635803/8.0),
+    REAL_CONST(59173.84213081457/8.0),
+    REAL_CONST(59194.638631052461/8.0),
+    REAL_CONST(59215.436958028506/8.0),
+    REAL_CONST(59236.237111421855/8.0),
+    REAL_CONST(59257.039090911829/8.0),
+    REAL_CONST(59277.842896177877/8.0),
+    REAL_CONST(59298.648526899589/8.0),
+    REAL_CONST(59319.455982756685/8.0),
+    REAL_CONST(59340.26526342905/8.0),
+    REAL_CONST(59361.076368596696/8.0),
+    REAL_CONST(59381.889297939757/8.0),
+    REAL_CONST(59402.704051138542/8.0),
+    REAL_CONST(59423.520627873484/8.0),
+    REAL_CONST(59444.339027825139/8.0),
+    REAL_CONST(59465.159250674224/8.0),
+    REAL_CONST(59485.9812961016/8.0),
+    REAL_CONST(59506.805163788253/8.0),
+    REAL_CONST(59527.630853415307/8.0),
+    REAL_CONST(59548.458364664046/8.0),
+    REAL_CONST(59569.287697215863/8.0),
+    REAL_CONST(59590.118850752311/8.0),
+    REAL_CONST(59610.951824955089/8.0),
+    REAL_CONST(59631.786619506012/8.0),
+    REAL_CONST(59652.623234087048/8.0),
+    REAL_CONST(59673.461668380311/8.0),
+    REAL_CONST(59694.301922068029/8.0),
+    REAL_CONST(59715.143994832593/8.0),
+    REAL_CONST(59735.987886356525/8.0),
+    REAL_CONST(59756.833596322482/8.0),
+    REAL_CONST(59777.681124413255/8.0),
+    REAL_CONST(59798.530470311794/8.0),
+    REAL_CONST(59819.381633701159/8.0),
+    REAL_CONST(59840.234614264569/8.0),
+    REAL_CONST(59861.089411685381/8.0),
+    REAL_CONST(59881.94602564707/8.0),
+    REAL_CONST(59902.804455833269/8.0),
+    REAL_CONST(59923.664701927737/8.0),
+    REAL_CONST(59944.526763614384/8.0),
+    REAL_CONST(59965.390640577243/8.0),
+    REAL_CONST(59986.256332500488/8.0),
+    REAL_CONST(60007.123839068438/8.0),
+    REAL_CONST(60027.993159965539/8.0),
+    REAL_CONST(60048.864294876381/8.0),
+    REAL_CONST(60069.737243485688/8.0),
+    REAL_CONST(60090.612005478324/8.0),
+    REAL_CONST(60111.488580539284/8.0),
+    REAL_CONST(60132.366968353708/8.0),
+    REAL_CONST(60153.247168606867/8.0),
+    REAL_CONST(60174.129180984164/8.0),
+    REAL_CONST(60195.013005171153/8.0),
+    REAL_CONST(60215.898640853513/8.0),
+    REAL_CONST(60236.786087717061/8.0),
+    REAL_CONST(60257.675345447751/8.0),
+    REAL_CONST(60278.566413731671/8.0),
+    REAL_CONST(60299.459292255044/8.0),
+    REAL_CONST(60320.353980704247/8.0),
+    REAL_CONST(60341.25047876576/8.0),
+    REAL_CONST(60362.148786126229/8.0),
+    REAL_CONST(60383.048902472423/8.0),
+    REAL_CONST(60403.950827491237/8.0),
+    REAL_CONST(60424.854560869717/8.0),
+    REAL_CONST(60445.76010229504/8.0),
+    REAL_CONST(60466.667451454516/8.0),
+    REAL_CONST(60487.57660803559/8.0),
+    REAL_CONST(60508.487571725847/8.0),
+    REAL_CONST(60529.400342212997/8.0),
+    REAL_CONST(60550.314919184893/8.0),
+    REAL_CONST(60571.231302329521/8.0),
+    REAL_CONST(60592.149491335003/8.0),
+    REAL_CONST(60613.069485889588/8.0),
+    REAL_CONST(60633.991285681674/8.0),
+    REAL_CONST(60654.914890399785/8.0),
+    REAL_CONST(60675.840299732568/8.0),
+    REAL_CONST(60696.767513368832/8.0),
+    REAL_CONST(60717.696530997484/8.0),
+    REAL_CONST(60738.627352307602/8.0),
+    REAL_CONST(60759.55997698837/8.0),
+    REAL_CONST(60780.494404729128/8.0),
+    REAL_CONST(60801.430635219323/8.0),
+    REAL_CONST(60822.368668148556/8.0),
+    REAL_CONST(60843.308503206565/8.0),
+    REAL_CONST(60864.250140083204/8.0),
+    REAL_CONST(60885.193578468468/8.0),
+    REAL_CONST(60906.138818052495/8.0),
+    REAL_CONST(60927.085858525541/8.0),
+    REAL_CONST(60948.034699578006/8.0),
+    REAL_CONST(60968.985340900421/8.0),
+    REAL_CONST(60989.937782183442/8.0),
+    REAL_CONST(61010.892023117864/8.0),
+    REAL_CONST(61031.848063394616/8.0),
+    REAL_CONST(61052.805902704764/8.0),
+    REAL_CONST(61073.765540739492/8.0),
+    REAL_CONST(61094.726977190134/8.0),
+    REAL_CONST(61115.690211748137/8.0),
+    REAL_CONST(61136.655244105103/8.0),
+    REAL_CONST(61157.622073952742/8.0),
+    REAL_CONST(61178.590700982917/8.0),
+    REAL_CONST(61199.561124887616/8.0),
+    REAL_CONST(61220.533345358948/8.0),
+    REAL_CONST(61241.507362089171/8.0),
+    REAL_CONST(61262.483174770663/8.0),
+    REAL_CONST(61283.460783095943/8.0),
+    REAL_CONST(61304.440186757645/8.0),
+    REAL_CONST(61325.421385448557/8.0),
+    REAL_CONST(61346.404378861582/8.0),
+    REAL_CONST(61367.389166689762/8.0),
+    REAL_CONST(61388.375748626262/8.0),
+    REAL_CONST(61409.364124364387/8.0),
+    REAL_CONST(61430.354293597571/8.0),
+    REAL_CONST(61451.346256019373/8.0),
+    REAL_CONST(61472.340011323497/8.0),
+    REAL_CONST(61493.335559203762/8.0),
+    REAL_CONST(61514.332899354122/8.0),
+    REAL_CONST(61535.332031468672/8.0),
+    REAL_CONST(61556.332955241618/8.0),
+    REAL_CONST(61577.335670367313/8.0),
+    REAL_CONST(61598.340176540238/8.0),
+    REAL_CONST(61619.346473454993/8.0),
+    REAL_CONST(61640.354560806329/8.0),
+    REAL_CONST(61661.3644382891/8.0),
+    REAL_CONST(61682.376105598312/8.0),
+    REAL_CONST(61703.389562429089/8.0),
+    REAL_CONST(61724.404808476691/8.0),
+    REAL_CONST(61745.42184343651/8.0),
+    REAL_CONST(61766.440667004063/8.0),
+    REAL_CONST(61787.461278874987/8.0),
+    REAL_CONST(61808.483678745069/8.0),
+    REAL_CONST(61829.507866310203/8.0),
+    REAL_CONST(61850.533841266435/8.0),
+    REAL_CONST(61871.561603309929/8.0),
+    REAL_CONST(61892.591152136971/8.0),
+    REAL_CONST(61913.622487443987/8.0),
+    REAL_CONST(61934.655608927525/8.0),
+    REAL_CONST(61955.690516284267/8.0),
+    REAL_CONST(61976.727209211022/8.0),
+    REAL_CONST(61997.765687404724/8.0),
+    REAL_CONST(62018.805950562448/8.0),
+    REAL_CONST(62039.847998381381/8.0),
+    REAL_CONST(62060.891830558845/8.0),
+    REAL_CONST(62081.93744679229/8.0),
+    REAL_CONST(62102.984846779298/8.0),
+    REAL_CONST(62124.034030217575/8.0),
+    REAL_CONST(62145.084996804966/8.0),
+    REAL_CONST(62166.137746239416/8.0),
+    REAL_CONST(62187.19227821903/8.0),
+    REAL_CONST(62208.248592442025/8.0),
+    REAL_CONST(62229.306688606739/8.0),
+    REAL_CONST(62250.366566411656/8.0),
+    REAL_CONST(62271.428225555377/8.0),
+    REAL_CONST(62292.491665736627/8.0),
+    REAL_CONST(62313.556886654267/8.0),
+    REAL_CONST(62334.623888007271/8.0),
+    REAL_CONST(62355.692669494762/8.0),
+    REAL_CONST(62376.763230815974/8.0),
+    REAL_CONST(62397.835571670272/8.0),
+    REAL_CONST(62418.909691757144/8.0),
+    REAL_CONST(62439.98559077621/8.0),
+    REAL_CONST(62461.063268427228/8.0),
+    REAL_CONST(62482.142724410049/8.0),
+    REAL_CONST(62503.223958424685/8.0),
+    REAL_CONST(62524.306970171267/8.0),
+    REAL_CONST(62545.39175935003/8.0),
+    REAL_CONST(62566.478325661366/8.0),
+    REAL_CONST(62587.566668805768/8.0),
+    REAL_CONST(62608.656788483881/8.0),
+    REAL_CONST(62629.748684396451/8.0),
+    REAL_CONST(62650.842356244357/8.0),
+    REAL_CONST(62671.937803728622/8.0),
+    REAL_CONST(62693.035026550366/8.0),
+    REAL_CONST(62714.134024410858/8.0),
+    REAL_CONST(62735.234797011479/8.0),
+    REAL_CONST(62756.337344053733/8.0),
+    REAL_CONST(62777.441665239276/8.0),
+    REAL_CONST(62798.547760269852/8.0),
+    REAL_CONST(62819.655628847358/8.0),
+    REAL_CONST(62840.765270673801/8.0),
+    REAL_CONST(62861.876685451323/8.0),
+    REAL_CONST(62882.989872882186/8.0),
+    REAL_CONST(62904.104832668774/8.0),
+    REAL_CONST(62925.221564513602/8.0),
+    REAL_CONST(62946.340068119309/8.0),
+    REAL_CONST(62967.460343188657/8.0),
+    REAL_CONST(62988.582389424526/8.0),
+    REAL_CONST(63009.70620652994/8.0),
+    REAL_CONST(63030.831794208025/8.0),
+    REAL_CONST(63051.959152162039/8.0),
+    REAL_CONST(63073.08828009537/8.0),
+    REAL_CONST(63094.219177711529/8.0),
+    REAL_CONST(63115.351844714154/8.0),
+    REAL_CONST(63136.486280806988/8.0),
+    REAL_CONST(63157.622485693922/8.0),
+    REAL_CONST(63178.760459078956/8.0),
+    REAL_CONST(63199.900200666219/8.0),
+    REAL_CONST(63221.041710159967/8.0),
+    REAL_CONST(63242.184987264569/8.0),
+    REAL_CONST(63263.330031684534/8.0),
+    REAL_CONST(63284.476843124474/8.0),
+    REAL_CONST(63305.625421289144/8.0),
+    REAL_CONST(63326.775765883409/8.0),
+    REAL_CONST(63347.927876612259/8.0),
+    REAL_CONST(63369.081753180813/8.0),
+    REAL_CONST(63390.237395294316/8.0),
+    REAL_CONST(63411.39480265812/8.0),
+    REAL_CONST(63432.553974977716/8.0),
+    REAL_CONST(63453.714911958712/8.0),
+    REAL_CONST(63474.877613306839/8.0),
+    REAL_CONST(63496.042078727944/8.0),
+    REAL_CONST(63517.208307927998/8.0),
+    REAL_CONST(63538.376300613119/8.0),
+    REAL_CONST(63559.546056489504/8.0),
+    REAL_CONST(63580.717575263516/8.0),
+    REAL_CONST(63601.890856641607/8.0),
+    REAL_CONST(63623.065900330374/8.0),
+    REAL_CONST(63644.242706036515/8.0),
+    REAL_CONST(63665.421273466869/8.0),
+    REAL_CONST(63686.601602328381/8.0),
+    REAL_CONST(63707.783692328136/8.0),
+    REAL_CONST(63728.967543173334/8.0),
+    REAL_CONST(63750.153154571279/8.0),
+    REAL_CONST(63771.340526229418/8.0),
+    REAL_CONST(63792.529657855317/8.0),
+    REAL_CONST(63813.720549156649/8.0),
+    REAL_CONST(63834.913199841227/8.0),
+    REAL_CONST(63856.107609616978/8.0),
+    REAL_CONST(63877.303778191941/8.0),
+    REAL_CONST(63898.501705274284/8.0),
+    REAL_CONST(63919.7013905723/8.0),
+    REAL_CONST(63940.902833794404/8.0),
+    REAL_CONST(63962.106034649114/8.0),
+    REAL_CONST(63983.310992845094/8.0),
+    REAL_CONST(64004.517708091109/8.0),
+    REAL_CONST(64025.726180096048/8.0),
+    REAL_CONST(64046.936408568938/8.0),
+    REAL_CONST(64068.1483932189/8.0),
+    REAL_CONST(64089.362133755196/8.0),
+    REAL_CONST(64110.577629887193/8.0),
+    REAL_CONST(64131.794881324393/8.0),
+    REAL_CONST(64153.013887776404/8.0),
+    REAL_CONST(64174.234648952966/8.0),
+    REAL_CONST(64195.457164563937/8.0),
+    REAL_CONST(64216.681434319289/8.0),
+    REAL_CONST(64237.907457929112/8.0),
+    REAL_CONST(64259.135235103626/8.0),
+    REAL_CONST(64280.36476555316/8.0),
+    REAL_CONST(64301.596048988169/8.0),
+    REAL_CONST(64322.829085119236/8.0),
+    REAL_CONST(64344.06387365704/8.0),
+    REAL_CONST(64365.300414312398/8.0),
+    REAL_CONST(64386.538706796251/8.0),
+    REAL_CONST(64407.778750819634/8.0),
+    REAL_CONST(64429.020546093721/8.0),
+    REAL_CONST(64450.26409232981/8.0),
+    REAL_CONST(64471.509389239291/8.0),
+    REAL_CONST(64492.756436533709/8.0),
+    REAL_CONST(64514.005233924705/8.0),
+    REAL_CONST(64535.255781124033/8.0),
+    REAL_CONST(64556.50807784358/8.0),
+    REAL_CONST(64577.762123795357/8.0),
+    REAL_CONST(64599.017918691468/8.0),
+    REAL_CONST(64620.275462244172/8.0),
+    REAL_CONST(64641.534754165805/8.0),
+    REAL_CONST(64662.795794168844/8.0),
+    REAL_CONST(64684.058581965895/8.0),
+    REAL_CONST(64705.323117269661/8.0),
+    REAL_CONST(64726.589399792974/8.0),
+    REAL_CONST(64747.857429248776/8.0),
+    REAL_CONST(64769.127205350138/8.0),
+    REAL_CONST(64790.398727810236/8.0),
+    REAL_CONST(64811.671996342375/8.0),
+    REAL_CONST(64832.947010659969/8.0),
+    REAL_CONST(64854.223770476558/8.0),
+    REAL_CONST(64875.502275505794/8.0),
+    REAL_CONST(64896.782525461451/8.0),
+    REAL_CONST(64918.064520057414/8.0),
+    REAL_CONST(64939.348259007682/8.0),
+    REAL_CONST(64960.633742026388/8.0),
+    REAL_CONST(64981.920968827762/8.0),
+    REAL_CONST(65003.209939126165/8.0),
+    REAL_CONST(65024.500652636067/8.0),
+    REAL_CONST(65045.793109072067/8.0),
+    REAL_CONST(65067.087308148861/8.0),
+    REAL_CONST(65088.383249581282/8.0),
+    REAL_CONST(65109.680933084259/8.0),
+    REAL_CONST(65130.980358372864/8.0),
+    REAL_CONST(65152.28152516226/8.0),
+    REAL_CONST(65173.584433167736/8.0),
+    REAL_CONST(65194.889082104703/8.0),
+    REAL_CONST(65216.195471688683/8.0),
+    REAL_CONST(65237.503601635319/8.0),
+    REAL_CONST(65258.813471660353/8.0),
+    REAL_CONST(65280.125081479666/8.0),
+    REAL_CONST(65301.438430809241/8.0),
+    REAL_CONST(65322.753519365178/8.0),
+    REAL_CONST(65344.070346863708/8.0),
+    REAL_CONST(65365.388913021146/8.0),
+    REAL_CONST(65386.709217553958/8.0),
+    REAL_CONST(65408.031260178701/8.0),
+    REAL_CONST(65429.355040612056/8.0),
+    REAL_CONST(65450.680558570821/8.0),
+    REAL_CONST(65472.00781377191/8.0),
+    REAL_CONST(65493.336805932355/8.0),
+    REAL_CONST(65514.66753476928/8.0),
+    REAL_CONST(65535.999999999956/8.0),
+    REAL_CONST(65557.334201341757/8.0),
+    REAL_CONST(65578.670138512171/8.0),
+    REAL_CONST(65600.007811228788/8.0),
+    REAL_CONST(65621.347219209332/8.0),
+    REAL_CONST(65642.688362171626/8.0),
+    REAL_CONST(65664.031239833639/8.0),
+    REAL_CONST(65685.375851913413/8.0),
+    REAL_CONST(65706.722198129137/8.0),
+    REAL_CONST(65728.070278199084/8.0),
+    REAL_CONST(65749.420091841661/8.0),
+    REAL_CONST(65770.771638775404/8.0),
+    REAL_CONST(65792.124918718939/8.0),
+    REAL_CONST(65813.479931391004/8.0),
+    REAL_CONST(65834.836676510458/8.0),
+    REAL_CONST(65856.195153796303/8.0),
+    REAL_CONST(65877.5553629676/8.0),
+    REAL_CONST(65898.917303743554/8.0),
+    REAL_CONST(65920.280975843489/8.0),
+    REAL_CONST(65941.646378986843/8.0),
+    REAL_CONST(65963.013512893158/8.0),
+    REAL_CONST(65984.382377282076/8.0),
+    REAL_CONST(66005.752971873386/8.0),
+    REAL_CONST(66027.125296386963/8.0),
+    REAL_CONST(66048.499350542799/8.0),
+    REAL_CONST(66069.875134061018/8.0),
+    REAL_CONST(66091.252646661844/8.0),
+    REAL_CONST(66112.631888065618/8.0),
+    REAL_CONST(66134.01285799277/8.0),
+    REAL_CONST(66155.395556163887/8.0),
+    REAL_CONST(66176.779982299631/8.0),
+    REAL_CONST(66198.166136120795/8.0),
+    REAL_CONST(66219.554017348273/8.0),
+    REAL_CONST(66240.943625703105/8.0),
+    REAL_CONST(66262.334960906388/8.0),
+    REAL_CONST(66283.728022679396/8.0),
+    REAL_CONST(66305.122810743444/8.0),
+    REAL_CONST(66326.519324820023/8.0),
+    REAL_CONST(66347.917564630698/8.0),
+    REAL_CONST(66369.317529897162/8.0),
+    REAL_CONST(66390.719220341227/8.0),
+    REAL_CONST(66412.122635684791/8.0),
+    REAL_CONST(66433.527775649884/8.0),
+    REAL_CONST(66454.934639958636/8.0),
+    REAL_CONST(66476.343228333324/8.0),
+    REAL_CONST(66497.753540496284/8.0),
+    REAL_CONST(66519.165576169995/8.0),
+    REAL_CONST(66540.57933507704/8.0),
+    REAL_CONST(66561.994816940118/8.0),
+    REAL_CONST(66583.412021482043/8.0),
+    REAL_CONST(66604.830948425733/8.0),
+    REAL_CONST(66626.251597494222/8.0),
+    REAL_CONST(66647.673968410629/8.0),
+    REAL_CONST(66669.098060898235/8.0),
+    REAL_CONST(66690.523874680381/8.0),
+    REAL_CONST(66711.951409480564/8.0),
+    REAL_CONST(66733.380665022371/8.0),
+    REAL_CONST(66754.811641029475/8.0),
+    REAL_CONST(66776.244337225711/8.0),
+    REAL_CONST(66797.678753334985/8.0),
+    REAL_CONST(66819.11488908132/8.0),
+    REAL_CONST(66840.552744188884/8.0),
+    REAL_CONST(66861.992318381905/8.0),
+    REAL_CONST(66883.433611384738/8.0),
+    REAL_CONST(66904.876622921889/8.0),
+    REAL_CONST(66926.321352717903/8.0),
+    REAL_CONST(66947.767800497502/8.0),
+    REAL_CONST(66969.215965985466/8.0),
+    REAL_CONST(66990.665848906734/8.0),
+    REAL_CONST(67012.117448986304/8.0),
+    REAL_CONST(67033.570765949335/8.0),
+    REAL_CONST(67055.025799521056/8.0),
+    REAL_CONST(67076.482549426815/8.0),
+    REAL_CONST(67097.941015392076/8.0),
+    REAL_CONST(67119.401197142433/8.0),
+    REAL_CONST(67140.863094403554/8.0),
+    REAL_CONST(67162.326706901222/8.0),
+    REAL_CONST(67183.792034361351/8.0),
+    REAL_CONST(67205.259076509959/8.0),
+    REAL_CONST(67226.72783307315/8.0),
+    REAL_CONST(67248.198303777172/8.0),
+    REAL_CONST(67269.670488348347/8.0),
+    REAL_CONST(67291.144386513144/8.0),
+    REAL_CONST(67312.619997998088/8.0),
+    REAL_CONST(67334.09732252988/8.0),
+    REAL_CONST(67355.576359835293/8.0),
+    REAL_CONST(67377.057109641188/8.0),
+    REAL_CONST(67398.53957167457/8.0),
+    REAL_CONST(67420.023745662547/8.0),
+    REAL_CONST(67441.50963133233/8.0),
+    REAL_CONST(67462.99722841123/8.0),
+    REAL_CONST(67484.486536626689/8.0),
+    REAL_CONST(67505.977555706224/8.0),
+    REAL_CONST(67527.470285377494/8.0),
+    REAL_CONST(67548.964725368263/8.0),
+    REAL_CONST(67570.460875406367/8.0),
+    REAL_CONST(67591.9587352198/8.0),
+    REAL_CONST(67613.458304536631/8.0),
+    REAL_CONST(67634.95958308503/8.0),
+    REAL_CONST(67656.462570593329/8.0),
+    REAL_CONST(67677.967266789899/8.0),
+    REAL_CONST(67699.473671403248/8.0),
+    REAL_CONST(67720.981784162024/8.0),
+    REAL_CONST(67742.491604794923/8.0),
+    REAL_CONST(67764.003133030797/8.0),
+    REAL_CONST(67785.516368598575/8.0),
+    REAL_CONST(67807.031311227314/8.0),
+    REAL_CONST(67828.547960646174/8.0),
+    REAL_CONST(67850.066316584402/8.0),
+    REAL_CONST(67871.58637877139/8.0),
+    REAL_CONST(67893.108146936589/8.0),
+    REAL_CONST(67914.63162080961/8.0),
+    REAL_CONST(67936.156800120138/8.0),
+    REAL_CONST(67957.683684597971/8.0),
+    REAL_CONST(67979.212273973011/8.0),
+    REAL_CONST(68000.742567975263/8.0),
+    REAL_CONST(68022.274566334876/8.0),
+    REAL_CONST(68043.808268782057/8.0),
+    REAL_CONST(68065.343675047145/8.0),
+    REAL_CONST(68086.880784860579/8.0),
+    REAL_CONST(68108.419597952918/8.0),
+    REAL_CONST(68129.960114054789/8.0),
+    REAL_CONST(68151.502332896969/8.0),
+    REAL_CONST(68173.04625421032/8.0),
+    REAL_CONST(68194.591877725834/8.0),
+    REAL_CONST(68216.139203174564/8.0),
+    REAL_CONST(68237.688230287706/8.0),
+    REAL_CONST(68259.238958796544/8.0),
+    REAL_CONST(68280.791388432481/8.0),
+    REAL_CONST(68302.345518927032/8.0),
+    REAL_CONST(68323.901350011787/8.0),
+    REAL_CONST(68345.458881418483/8.0),
+    REAL_CONST(68367.018112878912/8.0),
+    REAL_CONST(68388.579044125028/8.0),
+    REAL_CONST(68410.141674888844/8.0),
+    REAL_CONST(68431.706004902502/8.0),
+    REAL_CONST(68453.272033898262/8.0),
+    REAL_CONST(68474.839761608455/8.0),
+    REAL_CONST(68496.409187765545/8.0),
+    REAL_CONST(68517.980312102081/8.0),
+    REAL_CONST(68539.553134350732/8.0),
+    REAL_CONST(68561.127654244279/8.0),
+    REAL_CONST(68582.70387151558/8.0),
+    REAL_CONST(68604.281785897634/8.0),
+    REAL_CONST(68625.861397123503/8.0),
+    REAL_CONST(68647.44270492639/8.0),
+    REAL_CONST(68669.025709039604/8.0),
+    REAL_CONST(68690.610409196524/8.0),
+    REAL_CONST(68712.196805130661/8.0),
+    REAL_CONST(68733.784896575627/8.0),
+    REAL_CONST(68755.374683265123/8.0),
+    REAL_CONST(68776.966164932994/8.0),
+    REAL_CONST(68798.559341313128/8.0),
+    REAL_CONST(68820.154212139591/8.0),
+    REAL_CONST(68841.750777146473/8.0),
+    REAL_CONST(68863.349036068044/8.0),
+    REAL_CONST(68884.948988638629/8.0),
+    REAL_CONST(68906.550634592684/8.0),
+    REAL_CONST(68928.153973664739/8.0),
+    REAL_CONST(68949.75900558944/8.0),
+    REAL_CONST(68971.365730101577/8.0),
+    REAL_CONST(68992.974146935987/8.0),
+    REAL_CONST(69014.584255827634/8.0),
+    REAL_CONST(69036.196056511588/8.0),
+    REAL_CONST(69057.809548723017/8.0),
+    REAL_CONST(69079.424732197207/8.0),
+    REAL_CONST(69101.041606669532/8.0),
+    REAL_CONST(69122.660171875468/8.0),
+    REAL_CONST(69144.280427550606/8.0),
+    REAL_CONST(69165.902373430625/8.0),
+    REAL_CONST(69187.526009251334/8.0),
+    REAL_CONST(69209.151334748618/8.0),
+    REAL_CONST(69230.778349658474/8.0),
+    REAL_CONST(69252.40705371699/8.0),
+    REAL_CONST(69274.037446660412/8.0),
+    REAL_CONST(69295.669528225/8.0),
+    REAL_CONST(69317.303298147192/8.0),
+    REAL_CONST(69338.938756163494/8.0),
+    REAL_CONST(69360.575902010532/8.0),
+    REAL_CONST(69382.214735425005/8.0),
+    REAL_CONST(69403.855256143754/8.0),
+    REAL_CONST(69425.497463903681/8.0),
+    REAL_CONST(69447.141358441833/8.0),
+    REAL_CONST(69468.78693949533/8.0),
+    REAL_CONST(69490.434206801394/8.0),
+    REAL_CONST(69512.083160097391/8.0),
+    REAL_CONST(69533.733799120717/8.0),
+    REAL_CONST(69555.386123608929/8.0),
+    REAL_CONST(69577.04013329967/8.0),
+    REAL_CONST(69598.695827930685/8.0),
+    REAL_CONST(69620.353207239794/8.0),
+    REAL_CONST(69642.012270964973/8.0),
+    REAL_CONST(69663.67301884426/8.0),
+    REAL_CONST(69685.335450615792/8.0),
+    REAL_CONST(69706.999566017839/8.0),
+    REAL_CONST(69728.665364788743/8.0),
+    REAL_CONST(69750.332846666963/8.0),
+    REAL_CONST(69772.002011391058/8.0),
+    REAL_CONST(69793.672858699691/8.0),
+    REAL_CONST(69815.345388331611/8.0),
+    REAL_CONST(69837.019600025669/8.0),
+    REAL_CONST(69858.695493520849/8.0),
+    REAL_CONST(69880.373068556204/8.0),
+    REAL_CONST(69902.052324870907/8.0),
+    REAL_CONST(69923.733262204216/8.0),
+    REAL_CONST(69945.415880295492/8.0),
+    REAL_CONST(69967.100178884211/8.0),
+    REAL_CONST(69988.786157709939/8.0),
+    REAL_CONST(70010.473816512356/8.0),
+    REAL_CONST(70032.163155031216/8.0),
+    REAL_CONST(70053.854173006403/8.0),
+    REAL_CONST(70075.546870177874/8.0),
+    REAL_CONST(70097.241246285717/8.0),
+    REAL_CONST(70118.937301070109/8.0),
+    REAL_CONST(70140.635034271298/8.0),
+    REAL_CONST(70162.334445629691/8.0),
+    REAL_CONST(70184.035534885741/8.0),
+    REAL_CONST(70205.738301780017/8.0),
+    REAL_CONST(70227.442746053217/8.0),
+    REAL_CONST(70249.1488674461/8.0),
+    REAL_CONST(70270.856665699539/8.0),
+    REAL_CONST(70292.566140554511/8.0),
+    REAL_CONST(70314.277291752107/8.0),
+    REAL_CONST(70335.990119033493/8.0),
+    REAL_CONST(70357.704622139936/8.0),
+    REAL_CONST(70379.420800812819/8.0),
+    REAL_CONST(70401.138654793613/8.0),
+    REAL_CONST(70422.85818382389/8.0),
+    REAL_CONST(70444.579387645339/8.0),
+    REAL_CONST(70466.302265999722/8.0),
+    REAL_CONST(70488.026818628918/8.0),
+    REAL_CONST(70509.753045274876/8.0),
+    REAL_CONST(70531.480945679708/8.0),
+    REAL_CONST(70553.210519585555/8.0),
+    REAL_CONST(70574.941766734701/8.0),
+    REAL_CONST(70596.674686869505/8.0),
+    REAL_CONST(70618.409279732456/8.0),
+    REAL_CONST(70640.145545066101/8.0),
+    REAL_CONST(70661.883482613106/8.0),
+    REAL_CONST(70683.623092116264/8.0),
+    REAL_CONST(70705.364373318414/8.0),
+    REAL_CONST(70727.107325962526/8.0),
+    REAL_CONST(70748.851949791671/8.0),
+    REAL_CONST(70770.598244549008/8.0),
+    REAL_CONST(70792.346209977783/8.0),
+    REAL_CONST(70814.095845821372/8.0),
+    REAL_CONST(70835.847151823225/8.0),
+    REAL_CONST(70857.600127726895/8.0),
+    REAL_CONST(70879.354773276034/8.0),
+    REAL_CONST(70901.111088214413/8.0),
+    REAL_CONST(70922.869072285859/8.0),
+    REAL_CONST(70944.628725234332/8.0),
+    REAL_CONST(70966.390046803877/8.0),
+    REAL_CONST(70988.153036738629/8.0),
+    REAL_CONST(71009.917694782853/8.0),
+    REAL_CONST(71031.684020680885/8.0),
+    REAL_CONST(71053.45201417715/8.0),
+    REAL_CONST(71075.221675016204/8.0),
+    REAL_CONST(71096.993002942661/8.0),
+    REAL_CONST(71118.765997701266/8.0),
+    REAL_CONST(71140.540659036851/8.0),
+    REAL_CONST(71162.316986694335/8.0),
+    REAL_CONST(71184.09498041874/8.0),
+    REAL_CONST(71205.874639955218/8.0),
+    REAL_CONST(71227.655965048951/8.0),
+    REAL_CONST(71249.438955445294/8.0),
+    REAL_CONST(71271.223610889632/8.0),
+    REAL_CONST(71293.009931127483/8.0),
+    REAL_CONST(71314.797915904477/8.0),
+    REAL_CONST(71336.587564966307/8.0),
+    REAL_CONST(71358.378878058764/8.0),
+    REAL_CONST(71380.171854927772/8.0),
+    REAL_CONST(71401.966495319313/8.0),
+    REAL_CONST(71423.762798979486/8.0),
+    REAL_CONST(71445.560765654489/8.0),
+    REAL_CONST(71467.360395090596/8.0),
+    REAL_CONST(71489.161687034211/8.0),
+    REAL_CONST(71510.964641231811/8.0),
+    REAL_CONST(71532.769257429973/8.0),
+    REAL_CONST(71554.575535375348/8.0),
+    REAL_CONST(71576.383474814749/8.0),
+    REAL_CONST(71598.19307549503/8.0),
+    REAL_CONST(71620.004337163133/8.0),
+    REAL_CONST(71641.817259566145/8.0),
+    REAL_CONST(71663.631842451214/8.0),
+    REAL_CONST(71685.4480855656/8.0),
+    REAL_CONST(71707.26598865664/8.0),
+    REAL_CONST(71729.085551471784/8.0),
+    REAL_CONST(71750.906773758586/8.0),
+    REAL_CONST(71772.729655264673/8.0),
+    REAL_CONST(71794.554195737772/8.0),
+    REAL_CONST(71816.380394925713/8.0),
+    REAL_CONST(71838.208252576442/8.0),
+    REAL_CONST(71860.037768437964/8.0),
+    REAL_CONST(71881.868942258385/8.0),
+    REAL_CONST(71903.701773785942/8.0),
+    REAL_CONST(71925.536262768932/8.0),
+    REAL_CONST(71947.372408955751/8.0),
+    REAL_CONST(71969.210212094898/8.0),
+    REAL_CONST(71991.049671934976/8.0),
+    REAL_CONST(72012.890788224686/8.0),
+    REAL_CONST(72034.73356071279/8.0),
+    REAL_CONST(72056.577989148165/8.0),
+    REAL_CONST(72078.424073279821/8.0),
+    REAL_CONST(72100.271812856794/8.0),
+    REAL_CONST(72122.121207628254/8.0),
+    REAL_CONST(72143.97225734347/8.0),
+    REAL_CONST(72165.824961751801/8.0),
+    REAL_CONST(72187.679320602692/8.0),
+    REAL_CONST(72209.53533364569/8.0),
+    REAL_CONST(72231.393000630429/8.0),
+    REAL_CONST(72253.252321306645/8.0),
+    REAL_CONST(72275.113295424177/8.0),
+    REAL_CONST(72296.975922732949/8.0),
+    REAL_CONST(72318.840202982959/8.0),
+    REAL_CONST(72340.706135924338/8.0),
+    REAL_CONST(72362.573721307272/8.0),
+    REAL_CONST(72384.442958882093/8.0),
+    REAL_CONST(72406.313848399179/8.0),
+    REAL_CONST(72428.186389609036/8.0),
+    REAL_CONST(72450.060582262216/8.0),
+    REAL_CONST(72471.936426109431/8.0),
+    REAL_CONST(72493.813920901433/8.0),
+    REAL_CONST(72515.693066389096/8.0),
+    REAL_CONST(72537.573862323392/8.0),
+    REAL_CONST(72559.456308455352/8.0),
+    REAL_CONST(72581.340404536139/8.0),
+    REAL_CONST(72603.226150316987/8.0),
+    REAL_CONST(72625.113545549248/8.0),
+    REAL_CONST(72647.002589984331/8.0),
+    REAL_CONST(72668.893283373764/8.0),
+    REAL_CONST(72690.785625469172/8.0),
+    REAL_CONST(72712.679616022273/8.0),
+    REAL_CONST(72734.575254784853/8.0),
+    REAL_CONST(72756.472541508803/8.0),
+    REAL_CONST(72778.371475946144/8.0),
+    REAL_CONST(72800.272057848939/8.0),
+    REAL_CONST(72822.174286969355/8.0),
+    REAL_CONST(72844.07816305969/8.0),
+    REAL_CONST(72865.983685872285/8.0),
+    REAL_CONST(72887.890855159596/8.0),
+    REAL_CONST(72909.799670674183/8.0),
+    REAL_CONST(72931.710132168693/8.0),
+    REAL_CONST(72953.622239395845/8.0),
+    REAL_CONST(72975.535992108475/8.0),
+    REAL_CONST(72997.451390059519/8.0),
+    REAL_CONST(73019.368433001961/8.0),
+    REAL_CONST(73041.287120688925/8.0),
+    REAL_CONST(73063.207452873612/8.0),
+    REAL_CONST(73085.129429309294/8.0),
+    REAL_CONST(73107.053049749389/8.0),
+    REAL_CONST(73128.978313947344/8.0),
+    REAL_CONST(73150.905221656736/8.0),
+    REAL_CONST(73172.833772631217/8.0),
+    REAL_CONST(73194.763966624567/8.0),
+    REAL_CONST(73216.695803390612/8.0),
+    REAL_CONST(73238.62928268328/8.0),
+    REAL_CONST(73260.564404256627/8.0),
+    REAL_CONST(73282.501167864757/8.0),
+    REAL_CONST(73304.439573261901/8.0),
+    REAL_CONST(73326.379620202337/8.0),
+    REAL_CONST(73348.321308440485/8.0),
+    REAL_CONST(73370.264637730841/8.0),
+    REAL_CONST(73392.209607827957/8.0),
+    REAL_CONST(73414.156218486532/8.0),
+    REAL_CONST(73436.104469461323/8.0),
+    REAL_CONST(73458.054360507173/8.0),
+    REAL_CONST(73480.005891379056/8.0),
+    REAL_CONST(73501.959061831993/8.0),
+    REAL_CONST(73523.913871621116/8.0),
+    REAL_CONST(73545.870320501665/8.0),
+    REAL_CONST(73567.828408228932/8.0),
+    REAL_CONST(73589.78813455833/8.0),
+    REAL_CONST(73611.749499245358/8.0),
+    REAL_CONST(73633.712502045615/8.0),
+    REAL_CONST(73655.677142714747/8.0),
+    REAL_CONST(73677.643421008557/8.0),
+    REAL_CONST(73699.611336682879/8.0),
+    REAL_CONST(73721.580889493693/8.0),
+    REAL_CONST(73743.552079197019/8.0),
+    REAL_CONST(73765.524905548999/8.0),
+    REAL_CONST(73787.499368305856/8.0),
+    REAL_CONST(73809.475467223907/8.0),
+    REAL_CONST(73831.453202059551/8.0),
+    REAL_CONST(73853.432572569291/8.0),
+    REAL_CONST(73875.413578509717/8.0),
+    REAL_CONST(73897.396219637507/8.0),
+    REAL_CONST(73919.380495709411/8.0),
+    REAL_CONST(73941.36640648231/8.0),
+    REAL_CONST(73963.353951713143/8.0),
+    REAL_CONST(73985.343131158952/8.0),
+    REAL_CONST(74007.333944576865/8.0),
+    REAL_CONST(74029.326391724098/8.0),
+    REAL_CONST(74051.320472357969/8.0),
+    REAL_CONST(74073.316186235883/8.0),
+    REAL_CONST(74095.313533115303/8.0),
+    REAL_CONST(74117.312512753837/8.0),
+    REAL_CONST(74139.313124909138/8.0),
+    REAL_CONST(74161.315369338976/8.0),
+    REAL_CONST(74183.319245801191/8.0),
+    REAL_CONST(74205.324754053727/8.0),
+    REAL_CONST(74227.331893854629/8.0),
+    REAL_CONST(74249.340664961986/8.0),
+    REAL_CONST(74271.351067134034/8.0),
+    REAL_CONST(74293.363100129049/8.0),
+    REAL_CONST(74315.376763705441/8.0),
+    REAL_CONST(74337.392057621662/8.0),
+    REAL_CONST(74359.408981636298/8.0),
+    REAL_CONST(74381.427535508003/8.0),
+    REAL_CONST(74403.447718995507/8.0),
+    REAL_CONST(74425.469531857671/8.0),
+    REAL_CONST(74447.492973853383/8.0),
+    REAL_CONST(74469.518044741693/8.0),
+    REAL_CONST(74491.54474428168/8.0),
+    REAL_CONST(74513.573072232539/8.0),
+    REAL_CONST(74535.603028353551/8.0),
+    REAL_CONST(74557.634612404087/8.0),
+    REAL_CONST(74579.667824143602/8.0),
+    REAL_CONST(74601.702663331642/8.0),
+    REAL_CONST(74623.739129727837/8.0),
+    REAL_CONST(74645.777223091936/8.0),
+    REAL_CONST(74667.816943183716/8.0),
+    REAL_CONST(74689.858289763113/8.0),
+    REAL_CONST(74711.901262590094/8.0),
+    REAL_CONST(74733.945861424741/8.0),
+    REAL_CONST(74755.992086027225/8.0),
+    REAL_CONST(74778.039936157802/8.0),
+    REAL_CONST(74800.089411576817/8.0),
+    REAL_CONST(74822.140512044702/8.0),
+    REAL_CONST(74844.193237321961/8.0),
+    REAL_CONST(74866.24758716923/8.0),
+    REAL_CONST(74888.303561347187/8.0),
+    REAL_CONST(74910.36115961663/8.0),
+    REAL_CONST(74932.420381738411/8.0),
+    REAL_CONST(74954.481227473516/8.0),
+    REAL_CONST(74976.543696582972/8.0),
+    REAL_CONST(74998.607788827925/8.0),
+    REAL_CONST(75020.673503969607/8.0),
+    REAL_CONST(75042.740841769322/8.0),
+    REAL_CONST(75064.809801988464/8.0),
+    REAL_CONST(75086.88038438854/8.0),
+    REAL_CONST(75108.952588731103/8.0),
+    REAL_CONST(75131.026414777836/8.0),
+    REAL_CONST(75153.101862290467/8.0),
+    REAL_CONST(75175.178931030852/8.0),
+    REAL_CONST(75197.257620760924/8.0),
+    REAL_CONST(75219.33793124267/8.0),
+    REAL_CONST(75241.419862238225/8.0),
+    REAL_CONST(75263.503413509738/8.0),
+    REAL_CONST(75285.588584819503/8.0),
+    REAL_CONST(75307.675375929874/8.0),
+    REAL_CONST(75329.763786603318/8.0),
+    REAL_CONST(75351.853816602365/8.0),
+    REAL_CONST(75373.945465689612/8.0),
+    REAL_CONST(75396.038733627807/8.0),
+    REAL_CONST(75418.133620179724/8.0),
+    REAL_CONST(75440.230125108254/8.0),
+    REAL_CONST(75462.32824817636/8.0),
+    REAL_CONST(75484.427989147109/8.0),
+    REAL_CONST(75506.529347783653/8.0),
+    REAL_CONST(75528.63232384919/8.0),
+    REAL_CONST(75550.736917107075/8.0),
+    REAL_CONST(75572.843127320695/8.0),
+    REAL_CONST(75594.950954253538/8.0),
+    REAL_CONST(75617.060397669193/8.0),
+    REAL_CONST(75639.171457331307/8.0),
+    REAL_CONST(75661.284133003646/8.0),
+    REAL_CONST(75683.398424450032/8.0),
+    REAL_CONST(75705.514331434402/8.0),
+    REAL_CONST(75727.631853720741/8.0),
+    REAL_CONST(75749.750991073175/8.0),
+    REAL_CONST(75771.871743255862/8.0),
+    REAL_CONST(75793.994110033076/8.0),
+    REAL_CONST(75816.118091169177/8.0),
+    REAL_CONST(75838.243686428585/8.0),
+    REAL_CONST(75860.370895575848/8.0),
+    REAL_CONST(75882.499718375562/8.0),
+    REAL_CONST(75904.630154592422/8.0),
+    REAL_CONST(75926.762203991224/8.0),
+    REAL_CONST(75948.895866336825/8.0),
+    REAL_CONST(75971.031141394182/8.0),
+    REAL_CONST(75993.168028928325/8.0),
+    REAL_CONST(76015.306528704401/8.0),
+    REAL_CONST(76037.4466404876/8.0),
+    REAL_CONST(76059.588364043215/8.0),
+    REAL_CONST(76081.731699136653/8.0),
+    REAL_CONST(76103.876645533353/8.0),
+    REAL_CONST(76126.023202998884/8.0),
+    REAL_CONST(76148.171371298871/8.0),
+    REAL_CONST(76170.321150199044/8.0),
+    REAL_CONST(76192.472539465205/8.0),
+    REAL_CONST(76214.625538863256/8.0),
+    REAL_CONST(76236.780148159174/8.0),
+    REAL_CONST(76258.936367119008/8.0),
+    REAL_CONST(76281.094195508922/8.0),
+    REAL_CONST(76303.253633095141/8.0),
+    REAL_CONST(76325.414679643975/8.0),
+    REAL_CONST(76347.577334921851/8.0),
+    REAL_CONST(76369.741598695226/8.0),
+    REAL_CONST(76391.907470730686/8.0),
+    REAL_CONST(76414.074950794879/8.0),
+    REAL_CONST(76436.244038654564/8.0),
+    REAL_CONST(76458.414734076548/8.0),
+    REAL_CONST(76480.587036827754/8.0),
+    REAL_CONST(76502.760946675175/8.0),
+    REAL_CONST(76524.936463385893/8.0),
+    REAL_CONST(76547.11358672705/8.0),
+    REAL_CONST(76569.292316465915/8.0),
+    REAL_CONST(76591.472652369819/8.0),
+    REAL_CONST(76613.654594206164/8.0),
+    REAL_CONST(76635.838141742468/8.0),
+    REAL_CONST(76658.023294746308/8.0),
+    REAL_CONST(76680.210052985349/8.0),
+    REAL_CONST(76702.398416227341/8.0),
+    REAL_CONST(76724.588384240138/8.0),
+    REAL_CONST(76746.779956791637/8.0),
+    REAL_CONST(76768.973133649866/8.0),
+    REAL_CONST(76791.167914582897/8.0),
+    REAL_CONST(76813.364299358902/8.0),
+    REAL_CONST(76835.562287746157/8.0),
+    REAL_CONST(76857.761879512967/8.0),
+    REAL_CONST(76879.963074427797/8.0),
+    REAL_CONST(76902.165872259109/8.0),
+    REAL_CONST(76924.37027277553/8.0),
+    REAL_CONST(76946.576275745727/8.0),
+    REAL_CONST(76968.783880938441/8.0),
+    REAL_CONST(76990.993088122515/8.0),
+    REAL_CONST(77013.203897066895/8.0),
+    REAL_CONST(77035.416307540567/8.0),
+    REAL_CONST(77057.630319312622/8.0),
+    REAL_CONST(77079.845932152239/8.0),
+    REAL_CONST(77102.063145828695/8.0),
+    REAL_CONST(77124.281960111301/8.0),
+    REAL_CONST(77146.50237476948/8.0),
+    REAL_CONST(77168.724389572759/8.0),
+    REAL_CONST(77190.948004290723/8.0),
+    REAL_CONST(77213.173218693031/8.0),
+    REAL_CONST(77235.400032549442/8.0),
+    REAL_CONST(77257.628445629802/8.0),
+    REAL_CONST(77279.858457704031/8.0),
+    REAL_CONST(77302.090068542122/8.0),
+    REAL_CONST(77324.323277914169/8.0),
+    REAL_CONST(77346.558085590339/8.0),
+    REAL_CONST(77368.794491340886/8.0),
+    REAL_CONST(77391.032494936138/8.0),
+    REAL_CONST(77413.272096146524/8.0),
+    REAL_CONST(77435.51329474253/8.0),
+    REAL_CONST(77457.756090494731/8.0),
+    REAL_CONST(77480.000483173804/8.0),
+    REAL_CONST(77502.246472550498/8.0),
+    REAL_CONST(77524.494058395634/8.0),
+    REAL_CONST(77546.743240480107/8.0),
+    REAL_CONST(77568.994018574944/8.0),
+    REAL_CONST(77591.246392451198/8.0),
+    REAL_CONST(77613.500361880026/8.0),
+    REAL_CONST(77635.755926632657/8.0),
+    REAL_CONST(77658.013086480438/8.0),
+    REAL_CONST(77680.271841194757/8.0),
+    REAL_CONST(77702.532190547092/8.0),
+    REAL_CONST(77724.794134309021/8.0),
+    REAL_CONST(77747.057672252195/8.0),
+    REAL_CONST(77769.322804148323/8.0),
+    REAL_CONST(77791.589529769248/8.0),
+    REAL_CONST(77813.857848886837/8.0),
+    REAL_CONST(77836.127761273063/8.0),
+    REAL_CONST(77858.399266699998/8.0),
+    REAL_CONST(77880.67236493979/8.0),
+    REAL_CONST(77902.947055764627/8.0),
+    REAL_CONST(77925.223338946831/8.0),
+    REAL_CONST(77947.50121425878/8.0),
+    REAL_CONST(77969.780681472927/8.0),
+    REAL_CONST(77992.061740361838/8.0),
+    REAL_CONST(78014.344390698127/8.0),
+    REAL_CONST(78036.628632254491/8.0),
+    REAL_CONST(78058.914464803747/8.0),
+    REAL_CONST(78081.201888118725/8.0),
+    REAL_CONST(78103.490901972415/8.0),
+    REAL_CONST(78125.781506137821/8.0),
+    REAL_CONST(78148.073700388064/8.0),
+    REAL_CONST(78170.367484496339/8.0),
+    REAL_CONST(78192.662858235926/8.0),
+    REAL_CONST(78214.959821380166/8.0),
+    REAL_CONST(78237.258373702498/8.0),
+    REAL_CONST(78259.558514976452/8.0),
+    REAL_CONST(78281.860244975614/8.0),
+    REAL_CONST(78304.163563473659/8.0),
+    REAL_CONST(78326.468470244363/8.0),
+    REAL_CONST(78348.77496506153/8.0),
+    REAL_CONST(78371.083047699125/8.0),
+    REAL_CONST(78393.392717931114/8.0),
+    REAL_CONST(78415.703975531578/8.0),
+    REAL_CONST(78438.016820274701/8.0),
+    REAL_CONST(78460.331251934695/8.0),
+    REAL_CONST(78482.647270285903/8.0),
+    REAL_CONST(78504.964875102727/8.0),
+    REAL_CONST(78527.284066159627/8.0),
+    REAL_CONST(78549.604843231195/8.0),
+    REAL_CONST(78571.927206092048/8.0),
+    REAL_CONST(78594.251154516911/8.0),
+    REAL_CONST(78616.576688280606/8.0),
+    REAL_CONST(78638.903807157985/8.0),
+    REAL_CONST(78661.232510924034/8.0),
+    REAL_CONST(78683.562799353778/8.0),
+    REAL_CONST(78705.894672222363/8.0),
+    REAL_CONST(78728.228129304945/8.0),
+    REAL_CONST(78750.563170376859/8.0),
+    REAL_CONST(78772.899795213423/8.0),
+    REAL_CONST(78795.238003590101/8.0),
+    REAL_CONST(78817.577795282399/8.0),
+    REAL_CONST(78839.919170065928/8.0),
+    REAL_CONST(78862.262127716356/8.0),
+    REAL_CONST(78884.606668009452/8.0),
+    REAL_CONST(78906.952790721043/8.0),
+    REAL_CONST(78929.300495627045/8.0),
+    REAL_CONST(78951.64978250346/8.0),
+    REAL_CONST(78974.000651126378/8.0),
+    REAL_CONST(78996.353101271932/8.0),
+    REAL_CONST(79018.707132716358/8.0),
+    REAL_CONST(79041.062745235977/8.0),
+    REAL_CONST(79063.41993860717/8.0),
+    REAL_CONST(79085.778712606436/8.0),
+    REAL_CONST(79108.139067010285/8.0),
+    REAL_CONST(79130.501001595389/8.0),
+    REAL_CONST(79152.864516138419/8.0),
+    REAL_CONST(79175.22961041618/8.0),
+    REAL_CONST(79197.596284205531/8.0),
+    REAL_CONST(79219.96453728342/8.0),
+    REAL_CONST(79242.33436942687/8.0),
+    REAL_CONST(79264.705780412987/8.0),
+    REAL_CONST(79287.078770018954/8.0),
+    REAL_CONST(79309.453338022009/8.0),
+    REAL_CONST(79331.829484199508/8.0),
+    REAL_CONST(79354.207208328866/8.0),
+    REAL_CONST(79376.586510187582/8.0),
+    REAL_CONST(79398.967389553218/8.0),
+    REAL_CONST(79421.349846203433/8.0),
+    REAL_CONST(79443.733879915948/8.0),
+    REAL_CONST(79466.119490468584/8.0),
+    REAL_CONST(79488.50667763922/8.0),
+    REAL_CONST(79510.895441205823/8.0),
+    REAL_CONST(79533.285780946433/8.0),
+    REAL_CONST(79555.677696639163/8.0),
+    REAL_CONST(79578.071188062226/8.0),
+    REAL_CONST(79600.466254993895/8.0),
+    REAL_CONST(79622.862897212515/8.0),
+    REAL_CONST(79645.261114496549/8.0),
+    REAL_CONST(79667.660906624471/8.0),
+    REAL_CONST(79690.062273374875/8.0),
+    REAL_CONST(79712.465214526455/8.0),
+    REAL_CONST(79734.869729857935/8.0),
+    REAL_CONST(79757.275819148126/8.0),
+    REAL_CONST(79779.683482175955/8.0),
+    REAL_CONST(79802.092718720378/8.0),
+    REAL_CONST(79824.503528560454/8.0),
+    REAL_CONST(79846.915911475327/8.0),
+    REAL_CONST(79869.329867244203/8.0),
+    REAL_CONST(79891.745395646343/8.0),
+    REAL_CONST(79914.162496461155/8.0),
+    REAL_CONST(79936.581169468045/8.0),
+    REAL_CONST(79959.001414446553/8.0),
+    REAL_CONST(79981.423231176261/8.0),
+    REAL_CONST(80003.846619436852/8.0),
+    REAL_CONST(80026.271579008084/8.0),
+    REAL_CONST(80048.698109669771/8.0),
+    REAL_CONST(80071.12621120183/8.0),
+    REAL_CONST(80093.555883384237/8.0),
+    REAL_CONST(80115.987125997053/8.0),
+    REAL_CONST(80138.419938820414/8.0),
+    REAL_CONST(80160.854321634528/8.0),
+    REAL_CONST(80183.290274219689/8.0),
+    REAL_CONST(80205.727796356281/8.0),
+    REAL_CONST(80228.166887824715/8.0),
+    REAL_CONST(80250.607548405547/8.0),
+    REAL_CONST(80273.049777879336/8.0),
+    REAL_CONST(80295.493576026798/8.0),
+    REAL_CONST(80317.938942628651/8.0),
+    REAL_CONST(80340.385877465727/8.0),
+    REAL_CONST(80362.834380318949/8.0),
+    REAL_CONST(80385.28445096928/8.0),
+    REAL_CONST(80407.736089197788/8.0),
+    REAL_CONST(80430.189294785596/8.0),
+    REAL_CONST(80452.644067513917/8.0),
+    REAL_CONST(80475.100407164035/8.0),
+    REAL_CONST(80497.558313517322/8.0),
+    REAL_CONST(80520.017786355209/8.0),
+    REAL_CONST(80542.478825459213/8.0),
+    REAL_CONST(80564.941430610925/8.0),
+    REAL_CONST(80587.405601592007/8.0),
+    REAL_CONST(80609.871338184195/8.0),
+    REAL_CONST(80632.338640169342/8.0),
+    REAL_CONST(80654.8075073293/8.0),
+    REAL_CONST(80677.277939446067/8.0),
+    REAL_CONST(80699.749936301683/8.0),
+    REAL_CONST(80722.223497678278/8.0),
+    REAL_CONST(80744.698623358039/8.0),
+    REAL_CONST(80767.17531312324/8.0),
+    REAL_CONST(80789.653566756242/8.0),
+    REAL_CONST(80812.133384039465/8.0),
+    REAL_CONST(80834.614764755403/8.0),
+    REAL_CONST(80857.097708686648/8.0),
+    REAL_CONST(80879.582215615854/8.0),
+    REAL_CONST(80902.068285325731/8.0),
+    REAL_CONST(80924.555917599093/8.0),
+    REAL_CONST(80947.045112218824/8.0),
+    REAL_CONST(80969.535868967869/8.0),
+    REAL_CONST(80992.028187629272/8.0),
+    REAL_CONST(81014.522067986123/8.0),
+    REAL_CONST(81037.017509821613/8.0),
+    REAL_CONST(81059.514512919006/8.0),
+    REAL_CONST(81082.013077061609/8.0),
+    REAL_CONST(81104.513202032831/8.0),
+    REAL_CONST(81127.014887616184/8.0),
+    REAL_CONST(81149.518133595193/8.0),
+    REAL_CONST(81172.022939753486/8.0),
+    REAL_CONST(81194.529305874807/8.0),
+    REAL_CONST(81217.037231742899/8.0),
+    REAL_CONST(81239.546717141639/8.0),
+    REAL_CONST(81262.057761854958/8.0),
+    REAL_CONST(81284.570365666848/8.0),
+    REAL_CONST(81307.084528361403/8.0),
+    REAL_CONST(81329.600249722775/8.0),
+    REAL_CONST(81352.117529535186/8.0),
+    REAL_CONST(81374.636367582949/8.0),
+    REAL_CONST(81397.156763650448/8.0),
+    REAL_CONST(81419.678717522125/8.0),
+    REAL_CONST(81442.202228982511/8.0),
+    REAL_CONST(81464.727297816222/8.0),
+    REAL_CONST(81487.253923807933/8.0),
+    REAL_CONST(81509.782106742379/8.0),
+    REAL_CONST(81532.311846404409/8.0),
+    REAL_CONST(81554.843142578902/8.0),
+    REAL_CONST(81577.375995050839/8.0),
+    REAL_CONST(81599.910403605274/8.0),
+    REAL_CONST(81622.446368027333/8.0),
+    REAL_CONST(81644.983888102215/8.0),
+    REAL_CONST(81667.522963615178/8.0),
+    REAL_CONST(81690.063594351581/8.0),
+    REAL_CONST(81712.605780096841/8.0),
+    REAL_CONST(81735.149520636449/8.0),
+    REAL_CONST(81757.694815755967/8.0),
+    REAL_CONST(81780.241665241047/8.0),
+    REAL_CONST(81802.79006887741/8.0),
+    REAL_CONST(81825.340026450824/8.0),
+    REAL_CONST(81847.891537747171/8.0),
+    REAL_CONST(81870.444602552379/8.0),
+    REAL_CONST(81892.999220652477/8.0),
+    REAL_CONST(81915.555391833506/8.0),
+    REAL_CONST(81938.113115881672/8.0),
+    REAL_CONST(81960.672392583176/8.0),
+    REAL_CONST(81983.233221724338/8.0),
+    REAL_CONST(82005.795603091537/8.0),
+    REAL_CONST(82028.359536471224/8.0),
+    REAL_CONST(82050.925021649906/8.0),
+    REAL_CONST(82073.492058414209/8.0),
+    REAL_CONST(82096.060646550788/8.0),
+    REAL_CONST(82118.630785846399/8.0),
+    REAL_CONST(82141.202476087841/8.0),
+    REAL_CONST(82163.775717062032/8.0),
+    REAL_CONST(82186.35050855593/8.0),
+    REAL_CONST(82208.926850356569/8.0),
+    REAL_CONST(82231.504742251054/8.0),
+    REAL_CONST(82254.084184026578/8.0),
+    REAL_CONST(82276.665175470393/8.0),
+    REAL_CONST(82299.24771636985/8.0),
+    REAL_CONST(82321.831806512317/8.0),
+    REAL_CONST(82344.417445685307/8.0),
+    REAL_CONST(82367.004633676348/8.0),
+    REAL_CONST(82389.593370273054/8.0),
+    REAL_CONST(82412.183655263143/8.0),
+    REAL_CONST(82434.775488434374/8.0),
+    REAL_CONST(82457.368869574595/8.0),
+    REAL_CONST(82479.963798471697/8.0),
+    REAL_CONST(82502.560274913689/8.0),
+    REAL_CONST(82525.158298688606/8.0),
+    REAL_CONST(82547.757869584602/8.0),
+    REAL_CONST(82570.35898738986/8.0),
+    REAL_CONST(82592.961651892678/8.0),
+    REAL_CONST(82615.565862881398/8.0),
+    REAL_CONST(82638.171620144421/8.0),
+    REAL_CONST(82660.778923470265/8.0),
+    REAL_CONST(82683.387772647475/8.0),
+    REAL_CONST(82705.998167464713/8.0),
+    REAL_CONST(82728.610107710658/8.0),
+    REAL_CONST(82751.223593174116/8.0),
+    REAL_CONST(82773.83862364394/8.0),
+    REAL_CONST(82796.45519890904/8.0),
+    REAL_CONST(82819.073318758441/8.0),
+    REAL_CONST(82841.692982981185/8.0),
+    REAL_CONST(82864.314191366429/8.0),
+    REAL_CONST(82886.936943703375/8.0),
+    REAL_CONST(82909.561239781324/8.0),
+    REAL_CONST(82932.187079389638/8.0),
+    REAL_CONST(82954.814462317736/8.0),
+    REAL_CONST(82977.443388355125/8.0),
+    REAL_CONST(83000.073857291369/8.0),
+    REAL_CONST(83022.70586891612/8.0),
+    REAL_CONST(83045.339423019104/8.0),
+    REAL_CONST(83067.974519390089/8.0),
+    REAL_CONST(83090.611157818959/8.0),
+    REAL_CONST(83113.249338095629/8.0),
+    REAL_CONST(83135.8890600101/8.0),
+    REAL_CONST(83158.530323352461/8.0),
+    REAL_CONST(83181.173127912858/8.0),
+    REAL_CONST(83203.817473481497/8.0),
+    REAL_CONST(83226.463359848669/8.0),
+    REAL_CONST(83249.11078680474/8.0),
+    REAL_CONST(83271.759754140134/8.0),
+    REAL_CONST(83294.410261645375/8.0),
+    REAL_CONST(83317.062309111003/8.0),
+    REAL_CONST(83339.715896327703/8.0),
+    REAL_CONST(83362.371023086147/8.0),
+    REAL_CONST(83385.027689177165/8.0),
+    REAL_CONST(83407.685894391587/8.0),
+    REAL_CONST(83430.345638520361/8.0),
+    REAL_CONST(83453.006921354478/8.0),
+    REAL_CONST(83475.669742685001/8.0),
+    REAL_CONST(83498.334102303095/8.0),
+    REAL_CONST(83520.999999999942/8.0),
+    REAL_CONST(83543.667435566866/8.0),
+    REAL_CONST(83566.336408795192/8.0),
+    REAL_CONST(83589.006919476349/8.0),
+    REAL_CONST(83611.678967401851/8.0),
+    REAL_CONST(83634.352552363242/8.0),
+    REAL_CONST(83657.027674152167/8.0),
+    REAL_CONST(83679.704332560359/8.0),
+    REAL_CONST(83702.382527379552/8.0),
+    REAL_CONST(83725.062258401638/8.0),
+    REAL_CONST(83747.743525418511/8.0),
+    REAL_CONST(83770.42632822218/8.0),
+    REAL_CONST(83793.110666604684/8.0),
+    REAL_CONST(83815.796540358162/8.0),
+    REAL_CONST(83838.483949274829/8.0),
+    REAL_CONST(83861.172893146941/8.0),
+    REAL_CONST(83883.863371766842/8.0),
+    REAL_CONST(83906.555384926964/8.0),
+    REAL_CONST(83929.248932419752/8.0),
+    REAL_CONST(83951.944014037799/8.0),
+    REAL_CONST(83974.640629573696/8.0),
+    REAL_CONST(83997.338778820151/8.0),
+    REAL_CONST(84020.038461569929/8.0),
+    REAL_CONST(84042.739677615857/8.0),
+    REAL_CONST(84065.442426750829/8.0),
+    REAL_CONST(84088.146708767847/8.0),
+    REAL_CONST(84110.852523459922/8.0),
+    REAL_CONST(84133.559870620171/8.0),
+    REAL_CONST(84156.268750041796/8.0),
+    REAL_CONST(84178.979161518029/8.0),
+    REAL_CONST(84201.691104842204/8.0),
+    REAL_CONST(84224.404579807713/8.0),
+    REAL_CONST(84247.119586208006/8.0),
+    REAL_CONST(84269.83612383662/8.0),
+    REAL_CONST(84292.55419248715/8.0),
+    REAL_CONST(84315.273791953281/8.0),
+    REAL_CONST(84337.994922028738/8.0),
+    REAL_CONST(84360.717582507335/8.0),
+    REAL_CONST(84383.441773182945/8.0),
+    REAL_CONST(84406.167493849513/8.0),
+    REAL_CONST(84428.894744301069/8.0),
+    REAL_CONST(84451.623524331691/8.0),
+    REAL_CONST(84474.353833735542/8.0),
+    REAL_CONST(84497.085672306828/8.0),
+    REAL_CONST(84519.819039839858/8.0),
+    REAL_CONST(84542.553936128999/8.0),
+    REAL_CONST(84565.290360968676/8.0),
+    REAL_CONST(84588.028314153402/8.0),
+    REAL_CONST(84610.767795477717/8.0),
+    REAL_CONST(84633.508804736295/8.0),
+    REAL_CONST(84656.251341723822/8.0),
+    REAL_CONST(84678.995406235073/8.0),
+    REAL_CONST(84701.740998064924/8.0),
+    REAL_CONST(84724.488117008252/8.0),
+    REAL_CONST(84747.236762860062/8.0),
+    REAL_CONST(84769.986935415407/8.0),
+    REAL_CONST(84792.73863446941/8.0),
+    REAL_CONST(84815.491859817252/8.0),
+    REAL_CONST(84838.246611254188/8.0),
+    REAL_CONST(84861.002888575575/8.0),
+    REAL_CONST(84883.760691576768/8.0),
+    REAL_CONST(84906.520020053256/8.0),
+    REAL_CONST(84929.28087380057/8.0),
+    REAL_CONST(84952.043252614312/8.0),
+    REAL_CONST(84974.807156290146/8.0),
+    REAL_CONST(84997.572584623806/8.0),
+    REAL_CONST(85020.339537411113/8.0),
+    REAL_CONST(85043.108014447949/8.0),
+    REAL_CONST(85065.878015530237/8.0),
+    REAL_CONST(85088.649540453989/8.0),
+    REAL_CONST(85111.422589015303/8.0),
+    REAL_CONST(85134.197161010321/8.0),
+    REAL_CONST(85156.973256235244/8.0),
+    REAL_CONST(85179.750874486374/8.0),
+    REAL_CONST(85202.530015560071/8.0),
+    REAL_CONST(85225.310679252725/8.0),
+    REAL_CONST(85248.092865360857/8.0),
+    REAL_CONST(85270.876573681016/8.0),
+    REAL_CONST(85293.661804009811/8.0),
+    REAL_CONST(85316.448556143951/8.0),
+    REAL_CONST(85339.236829880188/8.0),
+    REAL_CONST(85362.026625015351/8.0),
+    REAL_CONST(85384.817941346351/8.0),
+    REAL_CONST(85407.610778670132/8.0),
+    REAL_CONST(85430.405136783724/8.0),
+    REAL_CONST(85453.201015484257/8.0),
+    REAL_CONST(85475.998414568865/8.0),
+    REAL_CONST(85498.797333834795/8.0),
+    REAL_CONST(85521.597773079353/8.0),
+    REAL_CONST(85544.399732099904/8.0),
+    REAL_CONST(85567.203210693886/8.0),
+    REAL_CONST(85590.008208658808/8.0),
+    REAL_CONST(85612.814725792239/8.0),
+    REAL_CONST(85635.62276189182/8.0),
+    REAL_CONST(85658.432316755265/8.0),
+    REAL_CONST(85681.243390180331/8.0),
+    REAL_CONST(85704.055981964877/8.0),
+    REAL_CONST(85726.870091906807/8.0),
+    REAL_CONST(85749.685719804082/8.0),
+    REAL_CONST(85772.502865454764/8.0),
+    REAL_CONST(85795.321528656961/8.0),
+    REAL_CONST(85818.141709208852/8.0),
+    REAL_CONST(85840.963406908675/8.0),
+    REAL_CONST(85863.78662155474/8.0),
+    REAL_CONST(85886.611352945445/8.0),
+    REAL_CONST(85909.437600879217/8.0),
+    REAL_CONST(85932.26536515457/8.0),
+    REAL_CONST(85955.094645570091/8.0),
+    REAL_CONST(85977.92544192441/8.0),
+    REAL_CONST(86000.757754016275/8.0),
+    REAL_CONST(86023.591581644432/8.0),
+    REAL_CONST(86046.426924607746/8.0),
+    REAL_CONST(86069.263782705122/8.0),
+    REAL_CONST(86092.102155735556/8.0),
+    REAL_CONST(86114.942043498071/8.0),
+    REAL_CONST(86137.783445791807/8.0),
+    REAL_CONST(86160.626362415918/8.0),
+    REAL_CONST(86183.470793169676/8.0),
+    REAL_CONST(86206.316737852379/8.0),
+    REAL_CONST(86229.164196263402/8.0),
+    REAL_CONST(86252.013168202204/8.0),
+    REAL_CONST(86274.863653468303/8.0),
+    REAL_CONST(86297.715651861261/8.0),
+    REAL_CONST(86320.569163180728/8.0),
+    REAL_CONST(86343.424187226425/8.0),
+    REAL_CONST(86366.280723798132/8.0),
+    REAL_CONST(86389.138772695675/8.0),
+    REAL_CONST(86411.998333718977/8.0),
+    REAL_CONST(86434.859406668009/8.0),
+    REAL_CONST(86457.721991342827/8.0),
+    REAL_CONST(86480.586087543532/8.0),
+    REAL_CONST(86503.451695070296/8.0),
+    REAL_CONST(86526.318813723352/8.0),
+    REAL_CONST(86549.187443303032/8.0),
+    REAL_CONST(86572.057583609683/8.0),
+    REAL_CONST(86594.929234443756/8.0),
+    REAL_CONST(86617.802395605773/8.0),
+    REAL_CONST(86640.677066896271/8.0),
+    REAL_CONST(86663.553248115903/8.0),
+    REAL_CONST(86686.43093906538/8.0),
+    REAL_CONST(86709.310139545443/8.0),
+    REAL_CONST(86732.190849356964/8.0),
+    REAL_CONST(86755.073068300815/8.0),
+    REAL_CONST(86777.956796177954/8.0),
+    REAL_CONST(86800.842032789442/8.0),
+    REAL_CONST(86823.728777936354/8.0),
+    REAL_CONST(86846.617031419853/8.0),
+    REAL_CONST(86869.506793041175/8.0),
+    REAL_CONST(86892.398062601613/8.0),
+    REAL_CONST(86915.290839902518/8.0),
+    REAL_CONST(86938.185124745316/8.0),
+    REAL_CONST(86961.080916931489/8.0),
+    REAL_CONST(86983.978216262592/8.0),
+    REAL_CONST(87006.87702254027/8.0),
+    REAL_CONST(87029.777335566177/8.0),
+    REAL_CONST(87052.67915514209/8.0),
+    REAL_CONST(87075.582481069796/8.0),
+    REAL_CONST(87098.487313151185/8.0),
+    REAL_CONST(87121.39365118822/8.0),
+    REAL_CONST(87144.301494982894/8.0),
+    REAL_CONST(87167.210844337285/8.0),
+    REAL_CONST(87190.121699053532/8.0),
+    REAL_CONST(87213.034058933845/8.0),
+    REAL_CONST(87235.947923780506/8.0),
+    REAL_CONST(87258.863293395829/8.0),
+    REAL_CONST(87281.780167582241/8.0),
+    REAL_CONST(87304.698546142172/8.0),
+    REAL_CONST(87327.618428878181/8.0),
+    REAL_CONST(87350.539815592856/8.0),
+    REAL_CONST(87373.462706088845/8.0),
+    REAL_CONST(87396.387100168897/8.0),
+    REAL_CONST(87419.312997635774/8.0),
+    REAL_CONST(87442.240398292357/8.0),
+    REAL_CONST(87465.16930194154/8.0),
+    REAL_CONST(87488.099708386319/8.0),
+    REAL_CONST(87511.031617429733/8.0),
+    REAL_CONST(87533.965028874911/8.0),
+    REAL_CONST(87556.899942525008/8.0),
+    REAL_CONST(87579.836358183282/8.0),
+    REAL_CONST(87602.774275653021/8.0),
+    REAL_CONST(87625.713694737613/8.0),
+    REAL_CONST(87648.654615240492/8.0),
+    REAL_CONST(87671.597036965148/8.0),
+    REAL_CONST(87694.540959715145/8.0),
+    REAL_CONST(87717.486383294105/8.0),
+    REAL_CONST(87740.433307505737/8.0),
+    REAL_CONST(87763.381732153779/8.0),
+    REAL_CONST(87786.331657042057/8.0),
+    REAL_CONST(87809.283081974456/8.0),
+    REAL_CONST(87832.236006754916/8.0),
+    REAL_CONST(87855.190431187453/8.0),
+    REAL_CONST(87878.146355076155/8.0),
+    REAL_CONST(87901.103778225151/8.0),
+    REAL_CONST(87924.062700438633/8.0),
+    REAL_CONST(87947.023121520891/8.0),
+    REAL_CONST(87969.985041276246/8.0),
+    REAL_CONST(87992.948459509105/8.0),
+    REAL_CONST(88015.913376023906/8.0),
+    REAL_CONST(88038.879790625171/8.0),
+    REAL_CONST(88061.847703117513/8.0),
+    REAL_CONST(88084.817113305573/8.0),
+    REAL_CONST(88107.788020994049/8.0),
+    REAL_CONST(88130.760425987726/8.0),
+    REAL_CONST(88153.734328091465/8.0),
+    REAL_CONST(88176.709727110137/8.0),
+    REAL_CONST(88199.686622848749/8.0),
+    REAL_CONST(88222.665015112303/8.0),
+    REAL_CONST(88245.644903705906/8.0),
+    REAL_CONST(88268.626288434709/8.0),
+    REAL_CONST(88291.609169103947/8.0),
+    REAL_CONST(88314.593545518903/8.0),
+    REAL_CONST(88337.579417484914/8.0),
+    REAL_CONST(88360.566784807408/8.0),
+    REAL_CONST(88383.555647291854/8.0),
+    REAL_CONST(88406.546004743795/8.0),
+    REAL_CONST(88429.537856968818/8.0),
+    REAL_CONST(88452.531203772611/8.0),
+    REAL_CONST(88475.52604496089/8.0),
+    REAL_CONST(88498.522380339447/8.0),
+    REAL_CONST(88521.52020971413/8.0),
+    REAL_CONST(88544.519532890874/8.0),
+    REAL_CONST(88567.520349675644/8.0),
+    REAL_CONST(88590.522659874507/8.0),
+    REAL_CONST(88613.526463293543/8.0),
+    REAL_CONST(88636.531759738922/8.0),
+    REAL_CONST(88659.538549016899/8.0),
+    REAL_CONST(88682.546830933745/8.0),
+    REAL_CONST(88705.556605295846/8.0),
+    REAL_CONST(88728.567871909589/8.0),
+    REAL_CONST(88751.580630581491/8.0),
+    REAL_CONST(88774.594881118086/8.0),
+    REAL_CONST(88797.610623325963/8.0),
+    REAL_CONST(88820.62785701183/8.0),
+    REAL_CONST(88843.646581982393/8.0),
+    REAL_CONST(88866.666798044462/8.0),
+    REAL_CONST(88889.688505004888/8.0),
+    REAL_CONST(88912.711702670611/8.0),
+    REAL_CONST(88935.7363908486/8.0),
+    REAL_CONST(88958.762569345898/8.0),
+    REAL_CONST(88981.790237969632/8.0),
+    REAL_CONST(89004.81939652696/8.0),
+    REAL_CONST(89027.850044825114/8.0),
+    REAL_CONST(89050.882182671412/8.0),
+    REAL_CONST(89073.9158098732/8.0),
+    REAL_CONST(89096.950926237885/8.0),
+    REAL_CONST(89119.987531572973/8.0),
+    REAL_CONST(89143.025625686001/8.0),
+    REAL_CONST(89166.065208384563/8.0),
+    REAL_CONST(89189.106279476357/8.0),
+    REAL_CONST(89212.148838769106/8.0),
+    REAL_CONST(89235.192886070581/8.0),
+    REAL_CONST(89258.238421188667/8.0),
+    REAL_CONST(89281.285443931265/8.0),
+    REAL_CONST(89304.333954106376/8.0),
+    REAL_CONST(89327.383951522017/8.0),
+    REAL_CONST(89350.435435986306/8.0),
+    REAL_CONST(89373.488407307406/8.0),
+    REAL_CONST(89396.542865293537/8.0),
+    REAL_CONST(89419.598809753006/8.0),
+    REAL_CONST(89442.656240494165/8.0),
+    REAL_CONST(89465.715157325409/8.0),
+    REAL_CONST(89488.775560055219/8.0),
+    REAL_CONST(89511.837448492137/8.0),
+    REAL_CONST(89534.900822444746/8.0),
+    REAL_CONST(89557.965681721733/8.0),
+    REAL_CONST(89581.032026131812/8.0),
+    REAL_CONST(89604.099855483742/8.0),
+    REAL_CONST(89627.169169586399/8.0),
+    REAL_CONST(89650.239968248672/8.0),
+    REAL_CONST(89673.312251279538/8.0),
+    REAL_CONST(89696.386018488018/8.0),
+    REAL_CONST(89719.461269683205/8.0),
+    REAL_CONST(89742.53800467425/8.0),
+    REAL_CONST(89765.616223270365/8.0),
+    REAL_CONST(89788.69592528083/8.0),
+    REAL_CONST(89811.777110514988/8.0),
+    REAL_CONST(89834.859778782207/8.0),
+    REAL_CONST(89857.943929891975/8.0),
+    REAL_CONST(89881.029563653807/8.0),
+    REAL_CONST(89904.116679877261/8.0),
+    REAL_CONST(89927.205278372014/8.0),
+    REAL_CONST(89950.29535894774/8.0),
+    REAL_CONST(89973.386921414218/8.0),
+    REAL_CONST(89996.479965581268/8.0),
+    REAL_CONST(90019.574491258769/8.0),
+    REAL_CONST(90042.670498256688/8.0),
+    REAL_CONST(90065.767986385021/8.0),
+    REAL_CONST(90088.866955453836/8.0),
+    REAL_CONST(90111.967405273259/8.0),
+    REAL_CONST(90135.069335653476/8.0),
+    REAL_CONST(90158.172746404758/8.0),
+    REAL_CONST(90181.277637337407/8.0),
+    REAL_CONST(90204.384008261797/8.0),
+    REAL_CONST(90227.49185898836/8.0),
+    REAL_CONST(90250.601189327586/8.0),
+    REAL_CONST(90273.711999090039/8.0),
+    REAL_CONST(90296.824288086325/8.0),
+    REAL_CONST(90319.938056127125/8.0),
+    REAL_CONST(90343.053303023189/8.0),
+    REAL_CONST(90366.170028585286/8.0),
+    REAL_CONST(90389.288232624298/8.0),
+    REAL_CONST(90412.407914951138/8.0),
+    REAL_CONST(90435.529075376777/8.0),
+    REAL_CONST(90458.651713712257/8.0),
+    REAL_CONST(90481.775829768681/8.0),
+    REAL_CONST(90504.901423357209/8.0),
+    REAL_CONST(90528.028494289058/8.0),
+    REAL_CONST(90551.157042375504/8.0),
+    REAL_CONST(90574.287067427911/8.0),
+    REAL_CONST(90597.418569257643/8.0),
+    REAL_CONST(90620.551547676194/8.0),
+    REAL_CONST(90643.686002495073/8.0),
+    REAL_CONST(90666.821933525847/8.0),
+    REAL_CONST(90689.959340580186/8.0),
+    REAL_CONST(90713.098223469773/8.0),
+    REAL_CONST(90736.238582006365/8.0),
+    REAL_CONST(90759.380416001804/8.0),
+    REAL_CONST(90782.523725267951/8.0),
+    REAL_CONST(90805.668509616764/8.0),
+    REAL_CONST(90828.814768860233/8.0),
+    REAL_CONST(90851.962502810435/8.0),
+    REAL_CONST(90875.11171127946/8.0),
+    REAL_CONST(90898.262394079517/8.0),
+    REAL_CONST(90921.414551022855/8.0),
+    REAL_CONST(90944.568181921743/8.0),
+    REAL_CONST(90967.72328658856/8.0),
+    REAL_CONST(90990.879864835719/8.0),
+    REAL_CONST(91014.037916475718/8.0),
+    REAL_CONST(91037.19744132107/8.0),
+    REAL_CONST(91060.358439184391/8.0),
+    REAL_CONST(91083.520909878338/8.0),
+    REAL_CONST(91106.684853215629/8.0),
+    REAL_CONST(91129.850269009039/8.0),
+    REAL_CONST(91153.017157071401/8.0),
+    REAL_CONST(91176.185517215621/8.0),
+    REAL_CONST(91199.355349254649/8.0),
+    REAL_CONST(91222.526653001492/8.0),
+    REAL_CONST(91245.699428269247/8.0),
+    REAL_CONST(91268.873674871036/8.0),
+    REAL_CONST(91292.049392620058/8.0),
+    REAL_CONST(91315.226581329553/8.0),
+    REAL_CONST(91338.405240812834/8.0),
+    REAL_CONST(91361.585370883287/8.0),
+    REAL_CONST(91384.766971354344/8.0),
+    REAL_CONST(91407.950042039476/8.0),
+    REAL_CONST(91431.134582752245/8.0),
+    REAL_CONST(91454.320593306256/8.0),
+    REAL_CONST(91477.508073515171/8.0),
+    REAL_CONST(91500.697023192712/8.0),
+    REAL_CONST(91523.887442152685/8.0),
+    REAL_CONST(91547.07933020893/8.0),
+    REAL_CONST(91570.272687175326/8.0),
+    REAL_CONST(91593.467512865856/8.0),
+    REAL_CONST(91616.663807094534/8.0),
+    REAL_CONST(91639.861569675442/8.0),
+    REAL_CONST(91663.060800422725/8.0),
+    REAL_CONST(91686.261499150554/8.0),
+    REAL_CONST(91709.463665673218/8.0),
+    REAL_CONST(91732.66729980502/8.0),
+    REAL_CONST(91755.872401360321/8.0),
+    REAL_CONST(91779.078970153569/8.0),
+    REAL_CONST(91802.287005999257/8.0),
+    REAL_CONST(91825.49650871192/8.0),
+    REAL_CONST(91848.707478106167/8.0),
+    REAL_CONST(91871.91991399668/8.0),
+    REAL_CONST(91895.133816198169/8.0),
+    REAL_CONST(91918.349184525418/8.0),
+    REAL_CONST(91941.566018793281/8.0),
+    REAL_CONST(91964.784318816659/8.0),
+    REAL_CONST(91988.004084410495/8.0),
+    REAL_CONST(92011.22531538982/8.0),
+    REAL_CONST(92034.448011569708/8.0),
+    REAL_CONST(92057.672172765277/8.0),
+    REAL_CONST(92080.897798791746/8.0),
+    REAL_CONST(92104.124889464365/8.0),
+    REAL_CONST(92127.353444598411/8.0),
+    REAL_CONST(92150.58346400928/8.0),
+    REAL_CONST(92173.814947512379/8.0),
+    REAL_CONST(92197.04789492322/8.0),
+    REAL_CONST(92220.282306057314/8.0),
+    REAL_CONST(92243.518180730272/8.0),
+    REAL_CONST(92266.755518757753/8.0),
+    REAL_CONST(92289.994319955469/8.0),
+    REAL_CONST(92313.234584139194/8.0),
+    REAL_CONST(92336.476311124774/8.0),
+    REAL_CONST(92359.719500728082/8.0),
+    REAL_CONST(92382.964152765067/8.0),
+    REAL_CONST(92406.210267051734/8.0),
+    REAL_CONST(92429.457843404161/8.0),
+    REAL_CONST(92452.706881638471/8.0),
+    REAL_CONST(92475.957381570814/8.0),
+    REAL_CONST(92499.209343017443/8.0),
+    REAL_CONST(92522.462765794655/8.0),
+    REAL_CONST(92545.717649718805/8.0),
+    REAL_CONST(92568.973994606305/8.0),
+    REAL_CONST(92592.231800273614/8.0),
+    REAL_CONST(92615.491066537259/8.0),
+    REAL_CONST(92638.751793213814/8.0),
+    REAL_CONST(92662.01398011994/8.0),
+    REAL_CONST(92685.277627072326/8.0),
+    REAL_CONST(92708.54273388772/8.0),
+    REAL_CONST(92731.809300382942/8.0),
+    REAL_CONST(92755.077326374871/8.0),
+    REAL_CONST(92778.346811680414/8.0),
+    REAL_CONST(92801.617756116568/8.0),
+    REAL_CONST(92824.890159500384/8.0),
+    REAL_CONST(92848.164021648947/8.0),
+    REAL_CONST(92871.439342379424/8.0),
+    REAL_CONST(92894.716121509016/8.0),
+    REAL_CONST(92917.994358855023/8.0),
+    REAL_CONST(92941.274054234746/8.0),
+    REAL_CONST(92964.555207465572/8.0),
+    REAL_CONST(92987.837818364962/8.0),
+    REAL_CONST(93011.121886750407/8.0),
+    REAL_CONST(93034.407412439468/8.0),
+    REAL_CONST(93057.694395249753/8.0),
+    REAL_CONST(93080.982834998955/8.0),
+    REAL_CONST(93104.272731504767/8.0),
+    REAL_CONST(93127.564084584999/8.0),
+    REAL_CONST(93150.856894057491/8.0),
+    REAL_CONST(93174.15115974014/8.0),
+    REAL_CONST(93197.446881450916/8.0),
+    REAL_CONST(93220.744059007804/8.0),
+    REAL_CONST(93244.04269222889/8.0),
+    REAL_CONST(93267.342780932304/8.0),
+    REAL_CONST(93290.644324936235/8.0),
+    REAL_CONST(93313.947324058914/8.0),
+    REAL_CONST(93337.251778118633/8.0),
+    REAL_CONST(93360.557686933767/8.0),
+    REAL_CONST(93383.865050322696/8.0),
+    REAL_CONST(93407.173868103928/8.0),
+    REAL_CONST(93430.484140095941/8.0),
+    REAL_CONST(93453.795866117362/8.0),
+    REAL_CONST(93477.109045986799/8.0),
+    REAL_CONST(93500.423679522952/8.0),
+    REAL_CONST(93523.739766544561/8.0),
+    REAL_CONST(93547.057306870454/8.0),
+    REAL_CONST(93570.376300319491/8.0),
+    REAL_CONST(93593.696746710571/8.0),
+    REAL_CONST(93617.018645862699/8.0),
+    REAL_CONST(93640.341997594893/8.0),
+    REAL_CONST(93663.666801726242/8.0),
+    REAL_CONST(93686.993058075881/8.0),
+    REAL_CONST(93710.320766463032/8.0),
+    REAL_CONST(93733.64992670693/8.0),
+    REAL_CONST(93756.980538626914/8.0),
+    REAL_CONST(93780.312602042337/8.0),
+    REAL_CONST(93803.646116772637/8.0),
+    REAL_CONST(93826.981082637285/8.0),
+    REAL_CONST(93850.317499455836/8.0),
+    REAL_CONST(93873.655367047861/8.0),
+    REAL_CONST(93896.994685233032/8.0),
+    REAL_CONST(93920.335453831038/8.0),
+    REAL_CONST(93943.677672661666/8.0),
+    REAL_CONST(93967.021341544707/8.0),
+    REAL_CONST(93990.366460300051/8.0),
+    REAL_CONST(94013.713028747632/8.0),
+    REAL_CONST(94037.061046707429/8.0),
+    REAL_CONST(94060.410513999494/8.0),
+    REAL_CONST(94083.761430443905/8.0),
+    REAL_CONST(94107.113795860845/8.0),
+    REAL_CONST(94130.467610070496/8.0),
+    REAL_CONST(94153.822872893157/8.0),
+    REAL_CONST(94177.179584149111/8.0),
+    REAL_CONST(94200.537743658759/8.0),
+    REAL_CONST(94223.897351242529/8.0),
+    REAL_CONST(94247.25840672091/8.0),
+    REAL_CONST(94270.620909914433/8.0),
+    REAL_CONST(94293.98486064373/8.0),
+    REAL_CONST(94317.350258729421/8.0),
+    REAL_CONST(94340.71710399224/8.0),
+    REAL_CONST(94364.085396252936/8.0),
+    REAL_CONST(94387.455135332348/8.0),
+    REAL_CONST(94410.82632105134/8.0),
+    REAL_CONST(94434.198953230851/8.0),
+    REAL_CONST(94457.573031691878/8.0),
+    REAL_CONST(94480.948556255447/8.0),
+    REAL_CONST(94504.325526742658/8.0),
+    REAL_CONST(94527.70394297468/8.0),
+    REAL_CONST(94551.083804772716/8.0),
+    REAL_CONST(94574.465111958023/8.0),
+    REAL_CONST(94597.847864351934/8.0),
+    REAL_CONST(94621.232061775823/8.0),
+    REAL_CONST(94644.617704051096/8.0),
+    REAL_CONST(94668.004790999272/8.0),
+    REAL_CONST(94691.393322441872/8.0),
+    REAL_CONST(94714.783298200506/8.0),
+    REAL_CONST(94738.174718096794/8.0),
+    REAL_CONST(94761.567581952477/8.0),
+    REAL_CONST(94784.961889589307/8.0),
+    REAL_CONST(94808.357640829097/8.0),
+    REAL_CONST(94831.754835493703/8.0),
+    REAL_CONST(94855.153473405066/8.0),
+    REAL_CONST(94878.553554385173/8.0),
+    REAL_CONST(94901.955078256055/8.0),
+    REAL_CONST(94925.358044839784/8.0),
+    REAL_CONST(94948.762453958523/8.0),
+    REAL_CONST(94972.168305434476/8.0),
+    REAL_CONST(94995.575599089891/8.0),
+    REAL_CONST(95018.984334747074/8.0),
+    REAL_CONST(95042.394512228391/8.0),
+    REAL_CONST(95065.806131356265/8.0),
+    REAL_CONST(95089.219191953176/8.0),
+    REAL_CONST(95112.633693841635/8.0),
+    REAL_CONST(95136.04963684424/8.0),
+    REAL_CONST(95159.467020783617/8.0),
+    REAL_CONST(95182.885845482466/8.0),
+    REAL_CONST(95206.306110763529/8.0),
+    REAL_CONST(95229.727816449609/8.0),
+    REAL_CONST(95253.150962363579/8.0),
+    REAL_CONST(95276.575548328314/8.0),
+    REAL_CONST(95300.001574166803/8.0),
+    REAL_CONST(95323.429039702052/8.0),
+    REAL_CONST(95346.857944757154/8.0),
+    REAL_CONST(95370.288289155214/8.0),
+    REAL_CONST(95393.720072719429/8.0),
+    REAL_CONST(95417.153295273019/8.0),
+    REAL_CONST(95440.587956639298/8.0),
+    REAL_CONST(95464.024056641589/8.0),
+    REAL_CONST(95487.461595103305/8.0),
+    REAL_CONST(95510.900571847902/8.0),
+    REAL_CONST(95534.340986698866/8.0),
+    REAL_CONST(95557.782839479783/8.0),
+    REAL_CONST(95581.226130014256/8.0),
+    REAL_CONST(95604.670858125959/8.0),
+    REAL_CONST(95628.117023638595/8.0),
+    REAL_CONST(95651.564626375985/8.0),
+    REAL_CONST(95675.013666161918/8.0),
+    REAL_CONST(95698.464142820303/8.0),
+    REAL_CONST(95721.916056175076/8.0),
+    REAL_CONST(95745.369406050231/8.0),
+    REAL_CONST(95768.824192269807/8.0),
+    REAL_CONST(95792.280414657915/8.0),
+    REAL_CONST(95815.738073038709/8.0),
+    REAL_CONST(95839.197167236387/8.0),
+    REAL_CONST(95862.657697075221/8.0),
+    REAL_CONST(95886.11966237954/8.0),
+    REAL_CONST(95909.583062973688/8.0),
+    REAL_CONST(95933.047898682111/8.0),
+    REAL_CONST(95956.514169329268/8.0),
+    REAL_CONST(95979.981874739708/8.0),
+    REAL_CONST(96003.451014738006/8.0),
+    REAL_CONST(96026.921589148798/8.0),
+    REAL_CONST(96050.393597796792/8.0),
+    REAL_CONST(96073.867040506724/8.0),
+    REAL_CONST(96097.341917103375/8.0),
+    REAL_CONST(96120.818227411626/8.0),
+    REAL_CONST(96144.295971256375/8.0),
+    REAL_CONST(96167.775148462577/8.0),
+    REAL_CONST(96191.255758855244/8.0),
+    REAL_CONST(96214.737802259449/8.0),
+    REAL_CONST(96238.221278500292/8.0),
+    REAL_CONST(96261.70618740299/8.0),
+    REAL_CONST(96285.192528792715/8.0),
+    REAL_CONST(96308.680302494788/8.0),
+    REAL_CONST(96332.169508334526/8.0),
+    REAL_CONST(96355.660146137321/8.0),
+    REAL_CONST(96379.152215728609/8.0),
+    REAL_CONST(96402.645716933868/8.0),
+    REAL_CONST(96426.14064957868/8.0),
+    REAL_CONST(96449.637013488609/8.0),
+    REAL_CONST(96473.134808489311/8.0),
+    REAL_CONST(96496.63403440651/8.0),
+    REAL_CONST(96520.134691065963/8.0),
+    REAL_CONST(96543.636778293469/8.0),
+    REAL_CONST(96567.140295914898/8.0),
+    REAL_CONST(96590.645243756153/8.0),
+    REAL_CONST(96614.151621643221/8.0),
+    REAL_CONST(96637.659429402134/8.0),
+    REAL_CONST(96661.168666858954/8.0),
+    REAL_CONST(96684.679333839798/8.0),
+    REAL_CONST(96708.191430170875/8.0),
+    REAL_CONST(96731.70495567839/8.0),
+    REAL_CONST(96755.219910188665/8.0),
+    REAL_CONST(96778.736293528011/8.0),
+    REAL_CONST(96802.254105522836/8.0),
+    REAL_CONST(96825.77334599958/8.0),
+    REAL_CONST(96849.29401478474/8.0),
+    REAL_CONST(96872.816111704873/8.0),
+    REAL_CONST(96896.339636586577/8.0),
+    REAL_CONST(96919.864589256511/8.0),
+    REAL_CONST(96943.390969541389/8.0),
+    REAL_CONST(96966.918777267958/8.0),
+    REAL_CONST(96990.448012263048/8.0),
+    REAL_CONST(97013.978674353522/8.0),
+    REAL_CONST(97037.510763366285/8.0),
+    REAL_CONST(97061.044279128328/8.0),
+    REAL_CONST(97084.579221466673/8.0),
+    REAL_CONST(97108.115590208385/8.0),
+    REAL_CONST(97131.653385180587/8.0),
+    REAL_CONST(97155.19260621049/8.0),
+    REAL_CONST(97178.733253125291/8.0),
+    REAL_CONST(97202.2753257523/8.0),
+    REAL_CONST(97225.81882391886/8.0),
+    REAL_CONST(97249.363747452342/8.0),
+    REAL_CONST(97272.910096180189/8.0),
+    REAL_CONST(97296.457869929916/8.0),
+    REAL_CONST(97320.007068529041/8.0),
+    REAL_CONST(97343.557691805196/8.0),
+    REAL_CONST(97367.109739586012/8.0),
+    REAL_CONST(97390.663211699197/8.0),
+    REAL_CONST(97414.218107972498/8.0),
+    REAL_CONST(97437.774428233737/8.0),
+    REAL_CONST(97461.332172310766/8.0),
+    REAL_CONST(97484.891340031507/8.0),
+    REAL_CONST(97508.451931223899/8.0),
+    REAL_CONST(97532.013945715982/8.0),
+    REAL_CONST(97555.577383335811/8.0),
+    REAL_CONST(97579.142243911512/8.0),
+    REAL_CONST(97602.708527271257/8.0),
+    REAL_CONST(97626.276233243261/8.0),
+    REAL_CONST(97649.845361655811/8.0),
+    REAL_CONST(97673.415912337223/8.0),
+    REAL_CONST(97696.987885115886/8.0),
+    REAL_CONST(97720.561279820206/8.0),
+    REAL_CONST(97744.1360962787/8.0),
+    REAL_CONST(97767.712334319876/8.0),
+    REAL_CONST(97791.289993772341/8.0),
+    REAL_CONST(97814.869074464703/8.0),
+    REAL_CONST(97838.449576225685/8.0),
+    REAL_CONST(97862.031498883996/8.0),
+    REAL_CONST(97885.614842268449/8.0),
+    REAL_CONST(97909.199606207883/8.0),
+    REAL_CONST(97932.785790531183/8.0),
+    REAL_CONST(97956.37339506732/8.0),
+    REAL_CONST(97979.962419645264/8.0),
+    REAL_CONST(98003.552864094076/8.0),
+    REAL_CONST(98027.144728242856/8.0),
+    REAL_CONST(98050.738011920766/8.0),
+    REAL_CONST(98074.332714956996/8.0),
+    REAL_CONST(98097.928837180807/8.0),
+    REAL_CONST(98121.526378421506/8.0),
+    REAL_CONST(98145.125338508456/8.0),
+    REAL_CONST(98168.725717271067/8.0),
+    REAL_CONST(98192.327514538789/8.0),
+    REAL_CONST(98215.930730141132/8.0),
+    REAL_CONST(98239.535363907664/8.0),
+    REAL_CONST(98263.141415668011/8.0),
+    REAL_CONST(98286.748885251814/8.0),
+    REAL_CONST(98310.357772488816/8.0),
+    REAL_CONST(98333.968077208759/8.0),
+    REAL_CONST(98357.579799241488/8.0),
+    REAL_CONST(98381.192938416847/8.0),
+    REAL_CONST(98404.807494564782/8.0),
+    REAL_CONST(98428.42346751524/8.0),
+    REAL_CONST(98452.040857098269/8.0),
+    REAL_CONST(98475.659663143917/8.0),
+    REAL_CONST(98499.27988548232/8.0),
+    REAL_CONST(98522.901523943656/8.0),
+    REAL_CONST(98546.524578358163/8.0),
+    REAL_CONST(98570.149048556093/8.0),
+    REAL_CONST(98593.774934367786/8.0),
+    REAL_CONST(98617.402235623624/8.0),
+    REAL_CONST(98641.030952154048/8.0),
+    REAL_CONST(98664.661083789513/8.0),
+    REAL_CONST(98688.292630360564/8.0),
+    REAL_CONST(98711.925591697771/8.0),
+    REAL_CONST(98735.559967631794/8.0),
+    REAL_CONST(98759.195757993293/8.0),
+    REAL_CONST(98782.832962613014/8.0),
+    REAL_CONST(98806.471581321734/8.0),
+    REAL_CONST(98830.111613950285/8.0),
+    REAL_CONST(98853.753060329575/8.0),
+    REAL_CONST(98877.39592029051/8.0),
+    REAL_CONST(98901.040193664099/8.0),
+    REAL_CONST(98924.68588028138/8.0),
+    REAL_CONST(98948.33297997342/8.0),
+    REAL_CONST(98971.981492571387/8.0),
+    REAL_CONST(98995.63141790645/8.0),
+    REAL_CONST(99019.282755809851/8.0),
+    REAL_CONST(99042.935506112874/8.0),
+    REAL_CONST(99066.589668646877/8.0),
+    REAL_CONST(99090.245243243233/8.0),
+    REAL_CONST(99113.902229733401/8.0),
+    REAL_CONST(99137.560627948857/8.0),
+    REAL_CONST(99161.220437721131/8.0),
+    REAL_CONST(99184.881658881859/8.0),
+    REAL_CONST(99208.544291262631/8.0),
+    REAL_CONST(99232.208334695169/8.0),
+    REAL_CONST(99255.87378901121/8.0),
+    REAL_CONST(99279.540654042547/8.0),
+    REAL_CONST(99303.208929621018/8.0),
+    REAL_CONST(99326.878615578535/8.0),
+    REAL_CONST(99350.549711746993/8.0),
+    REAL_CONST(99374.222217958435/8.0),
+    REAL_CONST(99397.896134044888/8.0),
+    REAL_CONST(99421.571459838422/8.0),
+    REAL_CONST(99445.248195171211/8.0),
+    REAL_CONST(99468.926339875441/8.0),
+    REAL_CONST(99492.605893783344/8.0),
+    REAL_CONST(99516.286856727209/8.0),
+    REAL_CONST(99539.969228539398/8.0),
+    REAL_CONST(99563.653009052287/8.0),
+    REAL_CONST(99587.338198098325/8.0),
+    REAL_CONST(99611.024795510006/8.0),
+    REAL_CONST(99634.712801119866/8.0),
+    REAL_CONST(99658.402214760499/8.0),
+    REAL_CONST(99682.093036264545/8.0),
+    REAL_CONST(99705.785265464699/8.0),
+    REAL_CONST(99729.478902193689/8.0),
+    REAL_CONST(99753.173946284325/8.0),
+    REAL_CONST(99776.870397569437/8.0),
+    REAL_CONST(99800.56825588191/8.0),
+    REAL_CONST(99824.267521054688/8.0),
+    REAL_CONST(99847.968192920773/8.0),
+    REAL_CONST(99871.670271313182/8.0),
+    REAL_CONST(99895.373756065004/8.0),
+    REAL_CONST(99919.078647009388/8.0),
+    REAL_CONST(99942.78494397951/8.0),
+    REAL_CONST(99966.492646808634/8.0),
+    REAL_CONST(99990.20175533001/8.0),
+    REAL_CONST(100013.91226937699/8.0),
+    REAL_CONST(100037.62418878295/8.0),
+    REAL_CONST(100061.33751338134/8.0),
+    REAL_CONST(100085.05224300563/8.0),
+    REAL_CONST(100108.76837748935/8.0),
+    REAL_CONST(100132.4859166661/8.0),
+    REAL_CONST(100156.2048603695/8.0),
+    REAL_CONST(100179.92520843323/8.0),
+    REAL_CONST(100203.64696069101/8.0),
+    REAL_CONST(100227.37011697664/8.0),
+    REAL_CONST(100251.09467712394/8.0),
+    REAL_CONST(100274.82064096678/8.0),
+    REAL_CONST(100298.54800833909/8.0),
+    REAL_CONST(100322.27677907483/8.0),
+    REAL_CONST(100346.00695300807/8.0),
+    REAL_CONST(100369.73852997283/8.0),
+    REAL_CONST(100393.47150980328/8.0),
+    REAL_CONST(100417.20589233354/8.0),
+    REAL_CONST(100440.94167739789/8.0),
+    REAL_CONST(100464.67886483055/8.0),
+    REAL_CONST(100488.41745446586/8.0),
+    REAL_CONST(100512.1574461382/8.0),
+    REAL_CONST(100535.89883968196/8.0),
+    REAL_CONST(100559.64163493161/8.0),
+    REAL_CONST(100583.38583172169/8.0),
+    REAL_CONST(100607.13142988674/8.0),
+    REAL_CONST(100630.87842926137/8.0),
+    REAL_CONST(100654.62682968024/8.0),
+    REAL_CONST(100678.37663097809/8.0),
+    REAL_CONST(100702.12783298964/8.0),
+    REAL_CONST(100725.88043554971/8.0),
+    REAL_CONST(100749.63443849317/8.0),
+    REAL_CONST(100773.38984165489/8.0),
+    REAL_CONST(100797.14664486986/8.0),
+    REAL_CONST(100820.90484797307/8.0),
+    REAL_CONST(100844.66445079957/8.0),
+    REAL_CONST(100868.42545318443/8.0),
+    REAL_CONST(100892.18785496285/8.0),
+    REAL_CONST(100915.95165596998/8.0),
+    REAL_CONST(100939.71685604109/8.0),
+    REAL_CONST(100963.48345501146/8.0),
+    REAL_CONST(100987.25145271645/8.0),
+    REAL_CONST(101011.02084899142/8.0),
+    REAL_CONST(101034.79164367182/8.0),
+    REAL_CONST(101058.56383659317/8.0),
+    REAL_CONST(101082.33742759094/8.0),
+    REAL_CONST(101106.11241650078/8.0),
+    REAL_CONST(101129.88880315828/8.0),
+    REAL_CONST(101153.66658739912/8.0),
+    REAL_CONST(101177.44576905905/8.0),
+    REAL_CONST(101201.22634797383/8.0),
+    REAL_CONST(101225.00832397929/8.0),
+    REAL_CONST(101248.7916969113/8.0),
+    REAL_CONST(101272.57646660579/8.0),
+    REAL_CONST(101296.36263289873/8.0),
+    REAL_CONST(101320.15019562612/8.0),
+    REAL_CONST(101343.93915462404/8.0),
+    REAL_CONST(101367.7295097286/8.0),
+    REAL_CONST(101391.52126077596/8.0),
+    REAL_CONST(101415.31440760233/8.0),
+    REAL_CONST(101439.10895004397/8.0),
+    REAL_CONST(101462.9048879372/8.0),
+    REAL_CONST(101486.70222111834/8.0),
+    REAL_CONST(101510.50094942382/8.0),
+    REAL_CONST(101534.30107269008/8.0),
+    REAL_CONST(101558.10259075361/8.0),
+    REAL_CONST(101581.90550345098/8.0),
+    REAL_CONST(101605.70981061876/8.0),
+    REAL_CONST(101629.5155120936/8.0),
+    REAL_CONST(101653.32260771218/8.0),
+    REAL_CONST(101677.13109731126/8.0),
+    REAL_CONST(101700.9409807276/8.0),
+    REAL_CONST(101724.75225779804/8.0),
+    REAL_CONST(101748.56492835947/8.0),
+    REAL_CONST(101772.37899224881/8.0),
+    REAL_CONST(101796.19444930303/8.0),
+    REAL_CONST(101820.01129935916/8.0),
+    REAL_CONST(101843.82954225427/8.0),
+    REAL_CONST(101867.64917782549/8.0),
+    REAL_CONST(101891.47020590997/8.0),
+    REAL_CONST(101915.29262634492/8.0),
+    REAL_CONST(101939.11643896763/8.0),
+    REAL_CONST(101962.94164361537/8.0),
+    REAL_CONST(101986.76824012553/8.0),
+    REAL_CONST(102010.59622833549/8.0),
+    REAL_CONST(102034.42560808272/8.0),
+    REAL_CONST(102058.25637920471/8.0),
+    REAL_CONST(102082.08854153901/8.0),
+    REAL_CONST(102105.9220949232/8.0),
+    REAL_CONST(102129.75703919494/8.0),
+    REAL_CONST(102153.59337419191/8.0),
+    REAL_CONST(102177.43109975185/8.0),
+    REAL_CONST(102201.27021571253/8.0),
+    REAL_CONST(102225.1107219118/8.0),
+    REAL_CONST(102248.95261818753/8.0),
+    REAL_CONST(102272.79590437764/8.0),
+    REAL_CONST(102296.64058032009/8.0),
+    REAL_CONST(102320.48664585294/8.0),
+    REAL_CONST(102344.33410081422/8.0),
+    REAL_CONST(102368.18294504205/8.0),
+    REAL_CONST(102392.03317837461/8.0),
+    REAL_CONST(102415.88480065008/8.0),
+    REAL_CONST(102439.73781170673/8.0),
+    REAL_CONST(102463.59221138287/8.0),
+    REAL_CONST(102487.44799951684/8.0),
+    REAL_CONST(102511.30517594704/8.0),
+    REAL_CONST(102535.1637405119/8.0),
+    REAL_CONST(102559.02369304992/8.0),
+    REAL_CONST(102582.88503339965/8.0),
+    REAL_CONST(102606.74776139967/8.0),
+    REAL_CONST(102630.61187688859/8.0),
+    REAL_CONST(102654.4773797051/8.0),
+    REAL_CONST(102678.34426968795/8.0),
+    REAL_CONST(102702.21254667587/8.0),
+    REAL_CONST(102726.08221050771/8.0),
+    REAL_CONST(102749.95326102231/8.0),
+    REAL_CONST(102773.8256980586/8.0),
+    REAL_CONST(102797.69952145554/8.0),
+    REAL_CONST(102821.57473105213/8.0),
+    REAL_CONST(102845.45132668741/8.0),
+    REAL_CONST(102869.32930820051/8.0),
+    REAL_CONST(102893.20867543056/8.0),
+    REAL_CONST(102917.08942821674/8.0),
+    REAL_CONST(102940.97156639832/8.0),
+    REAL_CONST(102964.85508981455/8.0),
+    REAL_CONST(102988.73999830478/8.0),
+    REAL_CONST(103012.6262917084/8.0),
+    REAL_CONST(103036.51396986481/8.0),
+    REAL_CONST(103060.40303261351/8.0),
+    REAL_CONST(103084.293479794/8.0),
+    REAL_CONST(103108.18531124585/8.0),
+    REAL_CONST(103132.07852680866/8.0),
+    REAL_CONST(103155.97312632212/8.0),
+    REAL_CONST(103179.8691096259/8.0),
+    REAL_CONST(103203.76647655977/8.0),
+    REAL_CONST(103227.66522696352/8.0),
+    REAL_CONST(103251.56536067701/8.0),
+    REAL_CONST(103275.46687754011/8.0),
+    REAL_CONST(103299.36977739276/8.0),
+    REAL_CONST(103323.27406007495/8.0),
+    REAL_CONST(103347.1797254267/8.0),
+    REAL_CONST(103371.0867732881/8.0),
+    REAL_CONST(103394.99520349925/8.0),
+    REAL_CONST(103418.90501590034/8.0),
+    REAL_CONST(103442.81621033157/8.0),
+    REAL_CONST(103466.72878663319/8.0),
+    REAL_CONST(103490.64274464553/8.0),
+    REAL_CONST(103514.55808420894/8.0),
+    REAL_CONST(103538.4748051638/8.0),
+    REAL_CONST(103562.39290735057/8.0),
+    REAL_CONST(103586.31239060973/8.0),
+    REAL_CONST(103610.23325478184/8.0),
+    REAL_CONST(103634.15549970744/8.0),
+    REAL_CONST(103658.07912522719/8.0),
+    REAL_CONST(103682.00413118176/8.0),
+    REAL_CONST(103705.93051741188/8.0),
+    REAL_CONST(103729.85828375829/8.0),
+    REAL_CONST(103753.78743006183/8.0),
+    REAL_CONST(103777.71795616332/8.0),
+    REAL_CONST(103801.64986190372/8.0),
+    REAL_CONST(103825.58314712394/8.0),
+    REAL_CONST(103849.51781166498/8.0),
+    REAL_CONST(103873.4538553679/8.0),
+    REAL_CONST(103897.39127807376/8.0),
+    REAL_CONST(103921.33007962372/8.0),
+    REAL_CONST(103945.27025985894/8.0),
+    REAL_CONST(103969.21181862066/8.0),
+    REAL_CONST(103993.15475575015/8.0),
+    REAL_CONST(104017.0990710887/8.0),
+    REAL_CONST(104041.0447644777/8.0),
+    REAL_CONST(104064.99183575854/8.0),
+    REAL_CONST(104088.94028477269/8.0),
+    REAL_CONST(104112.89011136163/8.0),
+    REAL_CONST(104136.84131536692/8.0),
+    REAL_CONST(104160.79389663014/8.0),
+    REAL_CONST(104184.74785499295/8.0),
+    REAL_CONST(104208.70319029699/8.0),
+    REAL_CONST(104232.65990238401/8.0),
+    REAL_CONST(104256.61799109577/8.0),
+    REAL_CONST(104280.57745627411/8.0),
+    REAL_CONST(104304.53829776087/8.0),
+    REAL_CONST(104328.50051539797/8.0),
+    REAL_CONST(104352.46410902737/8.0),
+    REAL_CONST(104376.42907849104/8.0),
+    REAL_CONST(104400.39542363105/8.0),
+    REAL_CONST(104424.36314428948/8.0),
+    REAL_CONST(104448.33224030846/8.0),
+    REAL_CONST(104472.3027115302/8.0),
+    REAL_CONST(104496.27455779689/8.0),
+    REAL_CONST(104520.24777895081/8.0),
+    REAL_CONST(104544.22237483428/8.0),
+    REAL_CONST(104568.19834528965/8.0),
+    REAL_CONST(104592.17569015936/8.0),
+    REAL_CONST(104616.15440928582/8.0),
+    REAL_CONST(104640.13450251156/8.0),
+    REAL_CONST(104664.1159696791/8.0),
+    REAL_CONST(104688.09881063103/8.0),
+    REAL_CONST(104712.08302520998/8.0),
+    REAL_CONST(104736.06861325864/8.0),
+    REAL_CONST(104760.05557461972/8.0),
+    REAL_CONST(104784.043909136/8.0),
+    REAL_CONST(104808.03361665027/8.0),
+    REAL_CONST(104832.0246970054/8.0),
+    REAL_CONST(104856.01715004431/8.0),
+    REAL_CONST(104880.01097560991/8.0),
+    REAL_CONST(104904.00617354522/8.0),
+    REAL_CONST(104928.00274369326/8.0),
+    REAL_CONST(104952.00068589712/8.0),
+    REAL_CONST(104975.99999999993/8.0),
+    REAL_CONST(105000.00068584486/8.0),
+    REAL_CONST(105024.00274327511/8.0),
+    REAL_CONST(105048.00617213396/8.0),
+    REAL_CONST(105072.0109722647/8.0),
+    REAL_CONST(105096.0171435107/8.0),
+    REAL_CONST(105120.02468571534/8.0),
+    REAL_CONST(105144.03359872208/8.0),
+    REAL_CONST(105168.04388237436/8.0),
+    REAL_CONST(105192.05553651576/8.0),
+    REAL_CONST(105216.06856098982/8.0),
+    REAL_CONST(105240.08295564017/8.0),
+    REAL_CONST(105264.09872031047/8.0),
+    REAL_CONST(105288.11585484444/8.0),
+    REAL_CONST(105312.13435908582/8.0),
+    REAL_CONST(105336.1542328784/8.0),
+    REAL_CONST(105360.17547606604/8.0),
+    REAL_CONST(105384.19808849262/8.0),
+    REAL_CONST(105408.22207000206/8.0),
+    REAL_CONST(105432.24742043833/8.0),
+    REAL_CONST(105456.27413964548/8.0),
+    REAL_CONST(105480.30222746753/8.0),
+    REAL_CONST(105504.33168374863/8.0),
+    REAL_CONST(105528.36250833291/8.0),
+    REAL_CONST(105552.39470106458/8.0),
+    REAL_CONST(105576.42826178786/8.0),
+    REAL_CONST(105600.46319034706/8.0),
+    REAL_CONST(105624.49948658649/8.0),
+    REAL_CONST(105648.53715035053/8.0),
+    REAL_CONST(105672.5761814836/8.0),
+    REAL_CONST(105696.61657983017/8.0),
+    REAL_CONST(105720.65834523473/8.0),
+    REAL_CONST(105744.70147754184/8.0),
+    REAL_CONST(105768.7459765961/8.0),
+    REAL_CONST(105792.79184224214/8.0),
+    REAL_CONST(105816.83907432464/8.0),
+    REAL_CONST(105840.88767268835/8.0),
+    REAL_CONST(105864.93763717801/8.0),
+    REAL_CONST(105888.98896763846/8.0),
+    REAL_CONST(105913.04166391456/8.0),
+    REAL_CONST(105937.09572585119/8.0),
+    REAL_CONST(105961.15115329332/8.0),
+    REAL_CONST(105985.20794608595/8.0),
+    REAL_CONST(106009.26610407409/8.0),
+    REAL_CONST(106033.32562710284/8.0),
+    REAL_CONST(106057.38651501729/8.0),
+    REAL_CONST(106081.44876766266/8.0),
+    REAL_CONST(106105.51238488412/8.0),
+    REAL_CONST(106129.57736652695/8.0),
+    REAL_CONST(106153.64371243643/8.0),
+    REAL_CONST(106177.71142245791/8.0),
+    REAL_CONST(106201.78049643678/8.0),
+    REAL_CONST(106225.85093421848/8.0),
+    REAL_CONST(106249.92273564848/8.0),
+    REAL_CONST(106273.99590057228/8.0),
+    REAL_CONST(106298.07042883546/8.0),
+    REAL_CONST(106322.14632028362/8.0),
+    REAL_CONST(106346.22357476239/8.0),
+    REAL_CONST(106370.30219211751/8.0),
+    REAL_CONST(106394.38217219469/8.0),
+    REAL_CONST(106418.46351483969/8.0),
+    REAL_CONST(106442.54621989837/8.0),
+    REAL_CONST(106466.63028721658/8.0),
+    REAL_CONST(106490.71571664025/8.0),
+    REAL_CONST(106514.80250801529/8.0),
+    REAL_CONST(106538.89066118775/8.0),
+    REAL_CONST(106562.98017600364/8.0),
+    REAL_CONST(106587.07105230905/8.0),
+    REAL_CONST(106611.16328995011/8.0),
+    REAL_CONST(106635.25688877302/8.0),
+    REAL_CONST(106659.35184862395/8.0),
+    REAL_CONST(106683.44816934918/8.0),
+    REAL_CONST(106707.54585079502/8.0),
+    REAL_CONST(106731.64489280782/8.0),
+    REAL_CONST(106755.74529523395/8.0),
+    REAL_CONST(106779.84705791986/8.0),
+    REAL_CONST(106803.95018071201/8.0),
+    REAL_CONST(106828.05466345693/8.0),
+    REAL_CONST(106852.16050600118/8.0),
+    REAL_CONST(106876.26770819137/8.0),
+    REAL_CONST(106900.37626987413/8.0),
+    REAL_CONST(106924.48619089619/8.0),
+    REAL_CONST(106948.59747110425/8.0),
+    REAL_CONST(106972.71011034511/8.0),
+    REAL_CONST(106996.82410846559/8.0),
+    REAL_CONST(107020.93946531253/8.0),
+    REAL_CONST(107045.05618073288/8.0),
+    REAL_CONST(107069.17425457356/8.0),
+    REAL_CONST(107093.29368668159/8.0),
+    REAL_CONST(107117.41447690397/8.0),
+    REAL_CONST(107141.53662508781/8.0),
+    REAL_CONST(107165.66013108024/8.0),
+    REAL_CONST(107189.7849947284/8.0),
+    REAL_CONST(107213.91121587952/8.0),
+    REAL_CONST(107238.03879438085/8.0),
+    REAL_CONST(107262.16773007967/8.0),
+    REAL_CONST(107286.29802282334/8.0),
+    REAL_CONST(107310.42967245923/8.0),
+    REAL_CONST(107334.56267883476/8.0),
+    REAL_CONST(107358.69704179741/8.0),
+    REAL_CONST(107382.83276119467/8.0),
+    REAL_CONST(107406.96983687414/8.0),
+    REAL_CONST(107431.10826868335/8.0),
+    REAL_CONST(107455.24805646999/8.0),
+    REAL_CONST(107479.38920008171/8.0),
+    REAL_CONST(107503.53169936626/8.0),
+    REAL_CONST(107527.67555417139/8.0),
+    REAL_CONST(107551.82076434491/8.0),
+    REAL_CONST(107575.96732973469/8.0),
+    REAL_CONST(107600.11525018861/8.0),
+    REAL_CONST(107624.26452555459/8.0),
+    REAL_CONST(107648.41515568066/8.0),
+    REAL_CONST(107672.56714041479/8.0),
+    REAL_CONST(107696.72047960508/8.0),
+    REAL_CONST(107720.87517309963/8.0),
+    REAL_CONST(107745.03122074658/8.0),
+    REAL_CONST(107769.18862239413/8.0),
+    REAL_CONST(107793.34737789053/8.0),
+    REAL_CONST(107817.50748708403/8.0),
+    REAL_CONST(107841.66894982298/8.0),
+    REAL_CONST(107865.83176595572/8.0),
+    REAL_CONST(107889.99593533068/8.0),
+    REAL_CONST(107914.16145779629/8.0),
+    REAL_CONST(107938.32833320105/8.0),
+    REAL_CONST(107962.49656139348/8.0),
+    REAL_CONST(107986.66614222217/8.0),
+    REAL_CONST(108010.83707553572/8.0),
+    REAL_CONST(108035.00936118282/8.0),
+    REAL_CONST(108059.18299901215/8.0),
+    REAL_CONST(108083.35798887245/8.0),
+    REAL_CONST(108107.53433061253/8.0),
+    REAL_CONST(108131.71202408121/8.0),
+    REAL_CONST(108155.89106912735/8.0),
+    REAL_CONST(108180.07146559987/8.0),
+    REAL_CONST(108204.25321334775/8.0),
+    REAL_CONST(108228.43631221994/8.0),
+    REAL_CONST(108252.62076206553/8.0),
+    REAL_CONST(108276.80656273357/8.0),
+    REAL_CONST(108300.99371407321/8.0),
+    REAL_CONST(108325.18221593359/8.0),
+    REAL_CONST(108349.37206816394/8.0),
+    REAL_CONST(108373.56327061349/8.0),
+    REAL_CONST(108397.75582313156/8.0),
+    REAL_CONST(108421.94972556747/8.0),
+    REAL_CONST(108446.1449777706/8.0),
+    REAL_CONST(108470.34157959036/8.0),
+    REAL_CONST(108494.53953087622/8.0),
+    REAL_CONST(108518.73883147769/8.0),
+    REAL_CONST(108542.93948124432/8.0),
+    REAL_CONST(108567.14148002568/8.0),
+    REAL_CONST(108591.34482767139/8.0),
+    REAL_CONST(108615.54952403114/8.0),
+    REAL_CONST(108639.75556895464/8.0),
+    REAL_CONST(108663.96296229165/8.0),
+    REAL_CONST(108688.17170389196/8.0),
+    REAL_CONST(108712.38179360541/8.0),
+    REAL_CONST(108736.59323128188/8.0),
+    REAL_CONST(108760.80601677128/8.0),
+    REAL_CONST(108785.02014992358/8.0),
+    REAL_CONST(108809.23563058881/8.0),
+    REAL_CONST(108833.45245861699/8.0),
+    REAL_CONST(108857.67063385822/8.0),
+    REAL_CONST(108881.89015616261/8.0),
+    REAL_CONST(108906.11102538036/8.0),
+    REAL_CONST(108930.33324136167/8.0),
+    REAL_CONST(108954.55680395682/8.0),
+    REAL_CONST(108978.78171301607/8.0),
+    REAL_CONST(109003.00796838976/8.0),
+    REAL_CONST(109027.23556992831/8.0),
+    REAL_CONST(109051.46451748211/8.0),
+    REAL_CONST(109075.69481090162/8.0),
+    REAL_CONST(109099.92645003737/8.0),
+    REAL_CONST(109124.15943473989/8.0),
+    REAL_CONST(109148.39376485976/8.0),
+    REAL_CONST(109172.62944024763/8.0),
+    REAL_CONST(109196.86646075416/8.0),
+    REAL_CONST(109221.10482623006/8.0),
+    REAL_CONST(109245.34453652608/8.0),
+    REAL_CONST(109269.58559149304/8.0),
+    REAL_CONST(109293.82799098175/8.0),
+    REAL_CONST(109318.07173484311/8.0),
+    REAL_CONST(109342.31682292801/8.0),
+    REAL_CONST(109366.56325508743/8.0),
+    REAL_CONST(109390.81103117237/8.0),
+    REAL_CONST(109415.06015103387/8.0),
+    REAL_CONST(109439.31061452301/8.0),
+    REAL_CONST(109463.56242149093/8.0),
+    REAL_CONST(109487.8155717888/8.0),
+    REAL_CONST(109512.07006526781/8.0),
+    REAL_CONST(109536.3259017792/8.0),
+    REAL_CONST(109560.58308117429/8.0),
+    REAL_CONST(109584.8416033044/8.0),
+    REAL_CONST(109609.1014680209/8.0),
+    REAL_CONST(109633.36267517522/8.0),
+    REAL_CONST(109657.62522461878/8.0),
+    REAL_CONST(109681.88911620311/8.0),
+    REAL_CONST(109706.15434977971/8.0),
+    REAL_CONST(109730.4209252002/8.0),
+    REAL_CONST(109754.68884231619/8.0),
+    REAL_CONST(109778.95810097932/8.0),
+    REAL_CONST(109803.22870104131/8.0),
+    REAL_CONST(109827.50064235389/8.0),
+    REAL_CONST(109851.77392476884/8.0),
+    REAL_CONST(109876.04854813802/8.0),
+    REAL_CONST(109900.32451231324/8.0),
+    REAL_CONST(109924.60181714644/8.0),
+    REAL_CONST(109948.88046248957/8.0),
+    REAL_CONST(109973.1604481946/8.0),
+    REAL_CONST(109997.44177411357/8.0),
+    REAL_CONST(110021.72444009855/8.0),
+    REAL_CONST(110046.00844600165/8.0),
+    REAL_CONST(110070.29379167501/8.0),
+    REAL_CONST(110094.58047697082/8.0),
+    REAL_CONST(110118.86850174134/8.0),
+    REAL_CONST(110143.15786583882/8.0),
+    REAL_CONST(110167.44856911557/8.0),
+    REAL_CONST(110191.74061142397/8.0),
+    REAL_CONST(110216.03399261639/8.0),
+    REAL_CONST(110240.32871254528/8.0),
+    REAL_CONST(110264.62477106311/8.0),
+    REAL_CONST(110288.9221680224/8.0),
+    REAL_CONST(110313.22090327571/8.0),
+    REAL_CONST(110337.52097667565/8.0),
+    REAL_CONST(110361.82238807483/8.0),
+    REAL_CONST(110386.12513732594/8.0),
+    REAL_CONST(110410.42922428172/8.0),
+    REAL_CONST(110434.73464879491/8.0),
+    REAL_CONST(110459.04141071832/8.0),
+    REAL_CONST(110483.34950990479/8.0),
+    REAL_CONST(110507.6589462072/8.0),
+    REAL_CONST(110531.96971947847/8.0),
+    REAL_CONST(110556.28182957157/8.0),
+    REAL_CONST(110580.5952763395/8.0),
+    REAL_CONST(110604.91005963532/8.0),
+    REAL_CONST(110629.22617931209/8.0),
+    REAL_CONST(110653.54363522294/8.0),
+    REAL_CONST(110677.86242722106/8.0),
+    REAL_CONST(110702.18255515963/8.0),
+    REAL_CONST(110726.50401889188/8.0),
+    REAL_CONST(110750.82681827113/8.0),
+    REAL_CONST(110775.1509531507/8.0),
+    REAL_CONST(110799.47642338395/8.0),
+    REAL_CONST(110823.80322882428/8.0),
+    REAL_CONST(110848.13136932514/8.0),
+    REAL_CONST(110872.46084474004/8.0),
+    REAL_CONST(110896.79165492248/8.0),
+    REAL_CONST(110921.12379972603/8.0),
+    REAL_CONST(110945.4572790043/8.0),
+    REAL_CONST(110969.79209261097/8.0),
+    REAL_CONST(110994.12824039967/8.0),
+    REAL_CONST(111018.46572222417/8.0),
+    REAL_CONST(111042.80453793822/8.0),
+    REAL_CONST(111067.14468739564/8.0),
+    REAL_CONST(111091.48617045028/8.0),
+    REAL_CONST(111115.82898695602/8.0),
+    REAL_CONST(111140.1731367668/8.0),
+    REAL_CONST(111164.51861973655/8.0),
+    REAL_CONST(111188.86543571933/8.0),
+    REAL_CONST(111213.21358456917/8.0),
+    REAL_CONST(111237.56306614014/8.0),
+    REAL_CONST(111261.91388028639/8.0),
+    REAL_CONST(111286.26602686207/8.0),
+    REAL_CONST(111310.61950572141/8.0),
+    REAL_CONST(111334.97431671864/8.0),
+    REAL_CONST(111359.33045970804/8.0),
+    REAL_CONST(111383.68793454397/8.0),
+    REAL_CONST(111408.04674108078/8.0),
+    REAL_CONST(111432.40687917286/8.0),
+    REAL_CONST(111456.76834867468/8.0),
+    REAL_CONST(111481.13114944073/8.0),
+    REAL_CONST(111505.49528132551/8.0),
+    REAL_CONST(111529.86074418361/8.0),
+    REAL_CONST(111554.22753786964/8.0),
+    REAL_CONST(111578.59566223821/8.0),
+    REAL_CONST(111602.96511714405/8.0),
+    REAL_CONST(111627.33590244185/8.0),
+    REAL_CONST(111651.7080179864/8.0),
+    REAL_CONST(111676.08146363248/8.0),
+    REAL_CONST(111700.45623923496/8.0),
+    REAL_CONST(111724.8323446487/8.0),
+    REAL_CONST(111749.20977972864/8.0),
+    REAL_CONST(111773.58854432974/8.0),
+    REAL_CONST(111797.96863830699/8.0),
+    REAL_CONST(111822.35006151545/8.0),
+    REAL_CONST(111846.73281381019/8.0),
+    REAL_CONST(111871.11689504632/8.0),
+    REAL_CONST(111895.50230507903/8.0),
+    REAL_CONST(111919.8890437635/8.0),
+    REAL_CONST(111944.27711095495/8.0),
+    REAL_CONST(111968.6665065087/8.0),
+    REAL_CONST(111993.05723028004/8.0),
+    REAL_CONST(112017.44928212435/8.0),
+    REAL_CONST(112041.842661897/8.0),
+    REAL_CONST(112066.23736945343/8.0),
+    REAL_CONST(112090.63340464912/8.0),
+    REAL_CONST(112115.03076733962/8.0),
+    REAL_CONST(112139.42945738042/8.0),
+    REAL_CONST(112163.82947462716/8.0),
+    REAL_CONST(112188.23081893545/8.0),
+    REAL_CONST(112212.63349016097/8.0),
+    REAL_CONST(112237.03748815943/8.0),
+    REAL_CONST(112261.44281278658/8.0),
+    REAL_CONST(112285.84946389822/8.0),
+    REAL_CONST(112310.25744135017/8.0),
+    REAL_CONST(112334.66674499828/8.0),
+    REAL_CONST(112359.07737469849/8.0),
+    REAL_CONST(112383.48933030672/8.0),
+    REAL_CONST(112407.90261167898/8.0),
+    REAL_CONST(112432.31721867126/8.0),
+    REAL_CONST(112456.73315113965/8.0),
+    REAL_CONST(112481.15040894024/8.0),
+    REAL_CONST(112505.56899192919/8.0),
+    REAL_CONST(112529.98889996267/8.0),
+    REAL_CONST(112554.41013289688/8.0),
+    REAL_CONST(112578.8326905881/8.0),
+    REAL_CONST(112603.25657289263/8.0),
+    REAL_CONST(112627.68177966679/8.0),
+    REAL_CONST(112652.10831076698/8.0),
+    REAL_CONST(112676.53616604958/8.0),
+    REAL_CONST(112700.96534537108/8.0),
+    REAL_CONST(112725.39584858794/8.0),
+    REAL_CONST(112749.82767555672/8.0),
+    REAL_CONST(112774.26082613398/8.0),
+    REAL_CONST(112798.6953001763/8.0),
+    REAL_CONST(112823.13109754038/8.0),
+    REAL_CONST(112847.56821808286/8.0),
+    REAL_CONST(112872.00666166049/8.0),
+    REAL_CONST(112896.44642813003/8.0),
+    REAL_CONST(112920.88751734827/8.0),
+    REAL_CONST(112945.32992917208/8.0),
+    REAL_CONST(112969.77366345831/8.0),
+    REAL_CONST(112994.21872006389/8.0),
+    REAL_CONST(113018.66509884578/8.0),
+    REAL_CONST(113043.11279966099/8.0),
+    REAL_CONST(113067.56182236652/8.0),
+    REAL_CONST(113092.01216681948/8.0),
+    REAL_CONST(113116.46383287695/8.0),
+    REAL_CONST(113140.9168203961/8.0),
+    REAL_CONST(113165.37112923413/8.0),
+    REAL_CONST(113189.82675924824/8.0),
+    REAL_CONST(113214.28371029573/8.0),
+    REAL_CONST(113238.74198223387/8.0),
+    REAL_CONST(113263.20157492002/8.0),
+    REAL_CONST(113287.66248821157/8.0),
+    REAL_CONST(113312.12472196593/8.0),
+    REAL_CONST(113336.58827604055/8.0),
+    REAL_CONST(113361.05315029295/8.0),
+    REAL_CONST(113385.51934458067/8.0),
+    REAL_CONST(113409.98685876124/8.0),
+    REAL_CONST(113434.45569269233/8.0),
+    REAL_CONST(113458.92584623155/8.0),
+    REAL_CONST(113483.39731923661/8.0),
+    REAL_CONST(113507.87011156522/8.0),
+    REAL_CONST(113532.34422307517/8.0),
+    REAL_CONST(113556.81965362425/8.0),
+    REAL_CONST(113581.2964030703/8.0),
+    REAL_CONST(113605.77447127122/8.0),
+    REAL_CONST(113630.25385808491/8.0),
+    REAL_CONST(113654.73456336933/8.0),
+    REAL_CONST(113679.2165869825/8.0),
+    REAL_CONST(113703.69992878241/8.0),
+    REAL_CONST(113728.18458862718/8.0),
+    REAL_CONST(113752.67056637487/8.0),
+    REAL_CONST(113777.15786188368/8.0),
+    REAL_CONST(113801.64647501177/8.0),
+    REAL_CONST(113826.13640561736/8.0),
+    REAL_CONST(113850.62765355874/8.0),
+    REAL_CONST(113875.12021869418/8.0),
+    REAL_CONST(113899.61410088204/8.0),
+    REAL_CONST(113924.1092999807/8.0),
+    REAL_CONST(113948.60581584855/8.0),
+    REAL_CONST(113973.10364834407/8.0),
+    REAL_CONST(113997.60279732574/8.0),
+    REAL_CONST(114022.1032626521/8.0),
+    REAL_CONST(114046.60504418171/8.0),
+    REAL_CONST(114071.10814177318/8.0),
+    REAL_CONST(114095.61255528514/8.0),
+    REAL_CONST(114120.11828457628/8.0),
+    REAL_CONST(114144.62532950533/8.0),
+    REAL_CONST(114169.13368993104/8.0),
+    REAL_CONST(114193.6433657122/8.0),
+    REAL_CONST(114218.15435670764/8.0),
+    REAL_CONST(114242.66666277625/8.0),
+    REAL_CONST(114267.18028377694/8.0),
+    REAL_CONST(114291.69521956862/8.0),
+    REAL_CONST(114316.21147001031/8.0),
+    REAL_CONST(114340.72903496103/8.0),
+    REAL_CONST(114365.24791427983/8.0),
+    REAL_CONST(114389.7681078258/8.0),
+    REAL_CONST(114414.2896154581/8.0),
+    REAL_CONST(114438.81243703589/8.0),
+    REAL_CONST(114463.33657241837/8.0),
+    REAL_CONST(114487.8620214648/8.0),
+    REAL_CONST(114512.38878403447/8.0),
+    REAL_CONST(114536.91685998671/8.0),
+    REAL_CONST(114561.44624918087/8.0),
+    REAL_CONST(114585.97695147636/8.0),
+    REAL_CONST(114610.5089667326/8.0),
+    REAL_CONST(114635.04229480909/8.0),
+    REAL_CONST(114659.57693556532/8.0),
+    REAL_CONST(114684.11288886084/8.0),
+    REAL_CONST(114708.65015455526/8.0),
+    REAL_CONST(114733.18873250818/8.0),
+    REAL_CONST(114757.72862257928/8.0),
+    REAL_CONST(114782.26982462825/8.0),
+    REAL_CONST(114806.81233851484/8.0),
+    REAL_CONST(114831.35616409882/8.0),
+    REAL_CONST(114855.90130123998/8.0),
+    REAL_CONST(114880.44774979822/8.0),
+    REAL_CONST(114904.99550963337/8.0),
+    REAL_CONST(114929.5445806054/8.0),
+    REAL_CONST(114954.09496257425/8.0),
+    REAL_CONST(114978.64665539992/8.0),
+    REAL_CONST(115003.19965894247/8.0),
+    REAL_CONST(115027.75397306195/8.0),
+    REAL_CONST(115052.30959761847/8.0),
+    REAL_CONST(115076.86653247218/8.0),
+    REAL_CONST(115101.42477748329/8.0),
+    REAL_CONST(115125.984332512/8.0),
+    REAL_CONST(115150.54519741859/8.0),
+    REAL_CONST(115175.10737206334/8.0),
+    REAL_CONST(115199.67085630659/8.0),
+    REAL_CONST(115224.23565000873/8.0),
+    REAL_CONST(115248.80175303014/8.0),
+    REAL_CONST(115273.3691652313/8.0),
+    REAL_CONST(115297.93788647266/8.0),
+    REAL_CONST(115322.50791661476/8.0),
+    REAL_CONST(115347.07925551817/8.0),
+    REAL_CONST(115371.65190304347/8.0),
+    REAL_CONST(115396.22585905129/8.0),
+    REAL_CONST(115420.80112340231/8.0),
+    REAL_CONST(115445.37769595724/8.0),
+    REAL_CONST(115469.95557657682/8.0),
+    REAL_CONST(115494.53476512182/8.0),
+    REAL_CONST(115519.11526145306/8.0),
+    REAL_CONST(115543.69706543141/8.0),
+    REAL_CONST(115568.28017691776/8.0),
+    REAL_CONST(115592.86459577303/8.0),
+    REAL_CONST(115617.4503218582/8.0),
+    REAL_CONST(115642.03735503425/8.0),
+    REAL_CONST(115666.62569516223/8.0),
+    REAL_CONST(115691.21534210323/8.0),
+    REAL_CONST(115715.80629571836/8.0),
+    REAL_CONST(115740.39855586876/8.0),
+    REAL_CONST(115764.99212241563/8.0),
+    REAL_CONST(115789.58699522018/8.0),
+    REAL_CONST(115814.18317414368/8.0),
+    REAL_CONST(115838.78065904744/8.0),
+    REAL_CONST(115863.37944979276/8.0),
+    REAL_CONST(115887.97954624105/8.0),
+    REAL_CONST(115912.5809482537/8.0),
+    REAL_CONST(115937.18365569216/8.0),
+    REAL_CONST(115961.78766841792/8.0),
+    REAL_CONST(115986.39298629249/8.0),
+    REAL_CONST(116010.99960917742/8.0),
+    REAL_CONST(116035.60753693432/8.0),
+    REAL_CONST(116060.21676942479/8.0),
+    REAL_CONST(116084.82730651053/8.0),
+    REAL_CONST(116109.43914805322/8.0),
+    REAL_CONST(116134.0522939146/8.0),
+    REAL_CONST(116158.66674395646/8.0),
+    REAL_CONST(116183.2824980406/8.0),
+    REAL_CONST(116207.89955602887/8.0),
+    REAL_CONST(116232.51791778316/8.0),
+    REAL_CONST(116257.13758316539/8.0),
+    REAL_CONST(116281.75855203751/8.0),
+    REAL_CONST(116306.38082426153/8.0),
+    REAL_CONST(116331.00439969949/8.0),
+    REAL_CONST(116355.62927821343/8.0),
+    REAL_CONST(116380.25545966547/8.0),
+    REAL_CONST(116404.88294391775/8.0),
+    REAL_CONST(116429.51173083246/8.0),
+    REAL_CONST(116454.14182027178/8.0),
+    REAL_CONST(116478.77321209799/8.0),
+    REAL_CONST(116503.40590617337/8.0),
+    REAL_CONST(116528.03990236025/8.0),
+    REAL_CONST(116552.67520052097/8.0),
+    REAL_CONST(116577.31180051794/8.0),
+    REAL_CONST(116601.94970221359/8.0),
+    REAL_CONST(116626.5889054704/8.0),
+    REAL_CONST(116651.22941015086/8.0),
+    REAL_CONST(116675.87121611751/8.0),
+    REAL_CONST(116700.51432323294/8.0),
+    REAL_CONST(116725.15873135976/8.0),
+    REAL_CONST(116749.8044403606/8.0),
+    REAL_CONST(116774.45145009817/8.0),
+    REAL_CONST(116799.0997604352/8.0),
+    REAL_CONST(116823.74937123443/8.0),
+    REAL_CONST(116848.40028235866/8.0),
+    REAL_CONST(116873.05249367072/8.0),
+    REAL_CONST(116897.70600503348/8.0),
+    REAL_CONST(116922.36081630984/8.0),
+    REAL_CONST(116947.01692736275/8.0),
+    REAL_CONST(116971.67433805518/8.0),
+    REAL_CONST(116996.33304825013/8.0),
+    REAL_CONST(117020.99305781067/8.0),
+    REAL_CONST(117045.65436659988/8.0),
+    REAL_CONST(117070.31697448085/8.0),
+    REAL_CONST(117094.98088131678/8.0),
+    REAL_CONST(117119.64608697082/8.0),
+    REAL_CONST(117144.31259130624/8.0),
+    REAL_CONST(117168.98039418629/8.0),
+    REAL_CONST(117193.64949547425/8.0),
+    REAL_CONST(117218.31989503348/8.0),
+    REAL_CONST(117242.99159272734/8.0),
+    REAL_CONST(117267.66458841923/8.0),
+    REAL_CONST(117292.33888197262/8.0),
+    REAL_CONST(117317.01447325097/8.0),
+    REAL_CONST(117341.6913621178/8.0),
+    REAL_CONST(117366.36954843666/8.0),
+    REAL_CONST(117391.04903207115/8.0),
+    REAL_CONST(117415.72981288488/8.0),
+    REAL_CONST(117440.41189074152/8.0),
+    REAL_CONST(117465.09526550474/8.0),
+    REAL_CONST(117489.77993703831/8.0),
+    REAL_CONST(117514.46590520597/8.0),
+    REAL_CONST(117539.15316987153/8.0),
+    REAL_CONST(117563.84173089883/8.0),
+    REAL_CONST(117588.53158815173/8.0),
+    REAL_CONST(117613.22274149416/8.0),
+    REAL_CONST(117637.91519079007/8.0),
+    REAL_CONST(117662.60893590341/8.0),
+    REAL_CONST(117687.30397669821/8.0),
+    REAL_CONST(117712.00031303853/8.0),
+    REAL_CONST(117736.69794478847/8.0),
+    REAL_CONST(117761.39687181212/8.0),
+    REAL_CONST(117786.09709397367/8.0),
+    REAL_CONST(117810.7986111373/8.0),
+    REAL_CONST(117835.50142316725/8.0),
+    REAL_CONST(117860.20552992777/8.0),
+    REAL_CONST(117884.91093128319/8.0),
+    REAL_CONST(117909.6176270978/8.0),
+    REAL_CONST(117934.32561723603/8.0),
+    REAL_CONST(117959.03490156225/8.0),
+    REAL_CONST(117983.74547994092/8.0),
+    REAL_CONST(118008.45735223651/8.0),
+    REAL_CONST(118033.17051831353/8.0),
+    REAL_CONST(118057.88497803656/8.0),
+    REAL_CONST(118082.60073127014/8.0),
+    REAL_CONST(118107.31777787894/8.0),
+    REAL_CONST(118132.03611772758/8.0),
+    REAL_CONST(118156.75575068076/8.0),
+    REAL_CONST(118181.47667660323/8.0),
+    REAL_CONST(118206.19889535972/8.0),
+    REAL_CONST(118230.92240681504/8.0),
+    REAL_CONST(118255.64721083404/8.0),
+    REAL_CONST(118280.37330728157/8.0),
+    REAL_CONST(118305.10069602253/8.0),
+    REAL_CONST(118329.82937692189/8.0),
+    REAL_CONST(118354.55934984458/8.0),
+    REAL_CONST(118379.29061465565/8.0),
+    REAL_CONST(118404.02317122012/8.0),
+    REAL_CONST(118428.75701940308/8.0),
+    REAL_CONST(118453.49215906965/8.0),
+    REAL_CONST(118478.22859008498/8.0),
+    REAL_CONST(118502.96631231424/8.0),
+    REAL_CONST(118527.70532562268/8.0),
+    REAL_CONST(118552.44562987552/8.0),
+    REAL_CONST(118577.18722493808/8.0),
+    REAL_CONST(118601.93011067568/8.0),
+    REAL_CONST(118626.67428695368/8.0),
+    REAL_CONST(118651.41975363747/8.0),
+    REAL_CONST(118676.16651059251/8.0),
+    REAL_CONST(118700.91455768423/8.0),
+    REAL_CONST(118725.66389477813/8.0),
+    REAL_CONST(118750.41452173979/8.0),
+    REAL_CONST(118775.16643843475/8.0),
+    REAL_CONST(118799.91964472862/8.0),
+    REAL_CONST(118824.67414048707/8.0),
+    REAL_CONST(118849.42992557574/8.0),
+    REAL_CONST(118874.18699986035/8.0),
+    REAL_CONST(118898.94536320666/8.0),
+    REAL_CONST(118923.70501548045/8.0),
+    REAL_CONST(118948.46595654752/8.0),
+    REAL_CONST(118973.22818627374/8.0),
+    REAL_CONST(118997.99170452499/8.0),
+    REAL_CONST(119022.7565111672/8.0),
+    REAL_CONST(119047.52260606633/8.0),
+    REAL_CONST(119072.28998908834/8.0),
+    REAL_CONST(119097.0586600993/8.0),
+    REAL_CONST(119121.82861896523/8.0),
+    REAL_CONST(119146.59986555226/8.0),
+    REAL_CONST(119171.3723997265/8.0),
+    REAL_CONST(119196.14622135412/8.0),
+    REAL_CONST(119220.92133030134/8.0),
+    REAL_CONST(119245.69772643436/8.0),
+    REAL_CONST(119270.47540961947/8.0),
+    REAL_CONST(119295.25437972297/8.0),
+    REAL_CONST(119320.03463661121/8.0),
+    REAL_CONST(119344.81618015055/8.0),
+    REAL_CONST(119369.5990102074/8.0),
+    REAL_CONST(119394.38312664822/8.0),
+    REAL_CONST(119419.16852933947/8.0),
+    REAL_CONST(119443.95521814766/8.0),
+    REAL_CONST(119468.74319293935/8.0),
+    REAL_CONST(119493.53245358112/8.0),
+    REAL_CONST(119518.32299993958/8.0),
+    REAL_CONST(119543.11483188139/8.0),
+    REAL_CONST(119567.90794927324/8.0),
+    REAL_CONST(119592.70235198183/8.0),
+    REAL_CONST(119617.49803987393/8.0),
+    REAL_CONST(119642.29501281632/8.0),
+    REAL_CONST(119667.09327067583/8.0),
+    REAL_CONST(119691.89281331931/8.0),
+    REAL_CONST(119716.69364061367/8.0),
+    REAL_CONST(119741.49575242582/8.0),
+    REAL_CONST(119766.29914862274/8.0),
+    REAL_CONST(119791.10382907141/8.0),
+    REAL_CONST(119815.90979363887/8.0),
+    REAL_CONST(119840.71704219218/8.0),
+    REAL_CONST(119865.52557459843/8.0),
+    REAL_CONST(119890.33539072477/8.0),
+    REAL_CONST(119915.14649043836/8.0),
+    REAL_CONST(119939.95887360642/8.0),
+    REAL_CONST(119964.77254009615/8.0),
+    REAL_CONST(119989.58748977486/8.0),
+    REAL_CONST(120014.40372250983/8.0),
+    REAL_CONST(120039.22123816841/8.0),
+    REAL_CONST(120064.04003661797/8.0),
+    REAL_CONST(120088.86011772591/8.0),
+    REAL_CONST(120113.6814813597/8.0),
+    REAL_CONST(120138.5041273868/8.0),
+    REAL_CONST(120163.3280556747/8.0),
+    REAL_CONST(120188.15326609099/8.0),
+    REAL_CONST(120212.97975850321/8.0),
+    REAL_CONST(120237.807532779/8.0),
+    REAL_CONST(120262.63658878599/8.0),
+    REAL_CONST(120287.46692639188/8.0),
+    REAL_CONST(120312.29854546436/8.0),
+    REAL_CONST(120337.13144587121/8.0),
+    REAL_CONST(120361.9656274802/8.0),
+    REAL_CONST(120386.80109015915/8.0),
+    REAL_CONST(120411.63783377589/8.0),
+    REAL_CONST(120436.47585819835/8.0),
+    REAL_CONST(120461.31516329442/8.0),
+    REAL_CONST(120486.15574893207/8.0),
+    REAL_CONST(120510.99761497928/8.0),
+    REAL_CONST(120535.84076130406/8.0),
+    REAL_CONST(120560.68518777451/8.0),
+    REAL_CONST(120585.53089425867/8.0),
+    REAL_CONST(120610.3778806247/8.0),
+    REAL_CONST(120635.22614674074/8.0),
+    REAL_CONST(120660.07569247499/8.0),
+    REAL_CONST(120684.92651769568/8.0),
+    REAL_CONST(120709.77862227106/8.0),
+    REAL_CONST(120734.63200606944/8.0),
+    REAL_CONST(120759.48666895913/8.0),
+    REAL_CONST(120784.3426108085/8.0),
+    REAL_CONST(120809.19983148595/8.0),
+    REAL_CONST(120834.05833085992/8.0),
+    REAL_CONST(120858.91810879884/8.0),
+    REAL_CONST(120883.77916517125/8.0),
+    REAL_CONST(120908.64149984565/8.0),
+    REAL_CONST(120933.5051126906/8.0),
+    REAL_CONST(120958.37000357473/8.0),
+    REAL_CONST(120983.23617236665/8.0),
+    REAL_CONST(121008.10361893504/8.0),
+    REAL_CONST(121032.97234314861/8.0),
+    REAL_CONST(121057.84234487606/8.0),
+    REAL_CONST(121082.71362398617/8.0),
+    REAL_CONST(121107.58618034775/8.0),
+    REAL_CONST(121132.46001382964/8.0),
+    REAL_CONST(121157.33512430069/8.0),
+    REAL_CONST(121182.21151162982/8.0),
+    REAL_CONST(121207.08917568595/8.0),
+    REAL_CONST(121231.96811633807/8.0),
+    REAL_CONST(121256.84833345517/8.0),
+    REAL_CONST(121281.72982690629/8.0),
+    REAL_CONST(121306.61259656049/8.0),
+    REAL_CONST(121331.49664228689/8.0),
+    REAL_CONST(121356.38196395461/8.0),
+    REAL_CONST(121381.26856143285/8.0),
+    REAL_CONST(121406.15643459078/8.0),
+    REAL_CONST(121431.04558329767/8.0),
+    REAL_CONST(121455.93600742276/8.0),
+    REAL_CONST(121480.82770683538/8.0),
+    REAL_CONST(121505.72068140487/8.0),
+    REAL_CONST(121530.61493100057/8.0),
+    REAL_CONST(121555.51045549192/8.0),
+    REAL_CONST(121580.40725474835/8.0),
+    REAL_CONST(121605.30532863933/8.0),
+    REAL_CONST(121630.20467703436/8.0),
+    REAL_CONST(121655.10529980299/8.0),
+    REAL_CONST(121680.00719681478/8.0),
+    REAL_CONST(121704.91036793934/8.0),
+    REAL_CONST(121729.81481304632/8.0),
+    REAL_CONST(121754.72053200539/8.0),
+    REAL_CONST(121779.62752468624/8.0),
+    REAL_CONST(121804.53579095862/8.0),
+    REAL_CONST(121829.44533069231/8.0),
+    REAL_CONST(121854.3561437571/8.0),
+    REAL_CONST(121879.26823002285/8.0),
+    REAL_CONST(121904.1815893594/8.0),
+    REAL_CONST(121929.09622163669/8.0),
+    REAL_CONST(121954.01212672464/8.0),
+    REAL_CONST(121978.92930449323/8.0),
+    REAL_CONST(122003.84775481246/8.0),
+    REAL_CONST(122028.76747755238/8.0),
+    REAL_CONST(122053.68847258303/8.0),
+    REAL_CONST(122078.61073977455/8.0),
+    REAL_CONST(122103.53427899707/8.0),
+    REAL_CONST(122128.45909012076/8.0),
+    REAL_CONST(122153.38517301581/8.0),
+    REAL_CONST(122178.31252755247/8.0),
+    REAL_CONST(122203.24115360099/8.0),
+    REAL_CONST(122228.17105103172/8.0),
+    REAL_CONST(122253.10221971494/8.0),
+    REAL_CONST(122278.03465952107/8.0),
+    REAL_CONST(122302.96837032049/8.0),
+    REAL_CONST(122327.90335198362/8.0),
+    REAL_CONST(122352.83960438096/8.0),
+    REAL_CONST(122377.777127383/8.0),
+    REAL_CONST(122402.71592086025/8.0),
+    REAL_CONST(122427.65598468333/8.0),
+    REAL_CONST(122452.59731872278/8.0),
+    REAL_CONST(122477.53992284928/8.0),
+    REAL_CONST(122502.48379693348/8.0),
+    REAL_CONST(122527.42894084606/8.0),
+    REAL_CONST(122552.37535445779/8.0),
+    REAL_CONST(122577.32303763942/8.0),
+    REAL_CONST(122602.27199026172/8.0),
+    REAL_CONST(122627.22221219557/8.0),
+    REAL_CONST(122652.17370331181/8.0),
+    REAL_CONST(122677.12646348133/8.0),
+    REAL_CONST(122702.08049257506/8.0),
+    REAL_CONST(122727.03579046397/8.0),
+    REAL_CONST(122751.99235701906/8.0),
+    REAL_CONST(122776.95019211136/8.0),
+    REAL_CONST(122801.9092956119/8.0),
+    REAL_CONST(122826.8696673918/8.0),
+    REAL_CONST(122851.83130732219/8.0),
+    REAL_CONST(122876.79421527422/8.0),
+    REAL_CONST(122901.75839111909/8.0),
+    REAL_CONST(122926.72383472799/8.0),
+    REAL_CONST(122951.69054597223/8.0),
+    REAL_CONST(122976.65852472307/8.0),
+    REAL_CONST(123001.62777085182/8.0),
+    REAL_CONST(123026.59828422987/8.0),
+    REAL_CONST(123051.57006472857/8.0),
+    REAL_CONST(123076.54311221937/8.0),
+    REAL_CONST(123101.5174265737/8.0),
+    REAL_CONST(123126.49300766307/8.0),
+    REAL_CONST(123151.46985535898/8.0),
+    REAL_CONST(123176.44796953299/8.0),
+    REAL_CONST(123201.42735005668/8.0),
+    REAL_CONST(123226.40799680166/8.0),
+    REAL_CONST(123251.38990963959/8.0),
+    REAL_CONST(123276.37308844214/8.0),
+    REAL_CONST(123301.35753308103/8.0),
+    REAL_CONST(123326.343243428/8.0),
+    REAL_CONST(123351.33021935483/8.0),
+    REAL_CONST(123376.31846073334/8.0),
+    REAL_CONST(123401.30796743535/8.0),
+    REAL_CONST(123426.29873933276/8.0),
+    REAL_CONST(123451.29077629748/8.0),
+    REAL_CONST(123476.28407820144/8.0),
+    REAL_CONST(123501.2786449166/8.0),
+    REAL_CONST(123526.27447631498/8.0),
+    REAL_CONST(123551.27157226863/8.0),
+    REAL_CONST(123576.26993264959/8.0),
+    REAL_CONST(123601.26955732999/8.0),
+    REAL_CONST(123626.27044618195/8.0),
+    REAL_CONST(123651.27259907764/8.0),
+    REAL_CONST(123676.27601588926/8.0),
+    REAL_CONST(123701.28069648903/8.0),
+    REAL_CONST(123726.28664074924/8.0),
+    REAL_CONST(123751.29384854218/8.0),
+    REAL_CONST(123776.30231974016/8.0),
+    REAL_CONST(123801.31205421555/8.0),
+    REAL_CONST(123826.32305184075/8.0),
+    REAL_CONST(123851.33531248817/8.0),
+    REAL_CONST(123876.34883603029/8.0),
+    REAL_CONST(123901.36362233957/8.0),
+    REAL_CONST(123926.37967128855/8.0),
+    REAL_CONST(123951.39698274979/8.0),
+    REAL_CONST(123976.41555659588/8.0),
+    REAL_CONST(124001.43539269941/8.0),
+    REAL_CONST(124026.45649093305/8.0),
+    REAL_CONST(124051.47885116948/8.0),
+    REAL_CONST(124076.50247328142/8.0),
+    REAL_CONST(124101.5273571416/8.0),
+    REAL_CONST(124126.55350262282/8.0),
+    REAL_CONST(124151.58090959788/8.0),
+    REAL_CONST(124176.60957793961/8.0),
+    REAL_CONST(124201.63950752091/8.0),
+    REAL_CONST(124226.67069821467/8.0),
+    REAL_CONST(124251.70314989384/8.0),
+    REAL_CONST(124276.73686243138/8.0),
+    REAL_CONST(124301.7718357003/8.0),
+    REAL_CONST(124326.80806957364/8.0),
+    REAL_CONST(124351.84556392446/8.0),
+    REAL_CONST(124376.88431862585/8.0),
+    REAL_CONST(124401.92433355095/8.0),
+    REAL_CONST(124426.96560857294/8.0),
+    REAL_CONST(124452.00814356498/8.0),
+    REAL_CONST(124477.05193840031/8.0),
+    REAL_CONST(124502.0969929522/8.0),
+    REAL_CONST(124527.14330709392/8.0),
+    REAL_CONST(124552.19088069882/8.0),
+    REAL_CONST(124577.23971364023/8.0),
+    REAL_CONST(124602.28980579154/8.0),
+    REAL_CONST(124627.34115702618/8.0),
+    REAL_CONST(124652.3937672176/8.0),
+    REAL_CONST(124677.44763623926/8.0),
+    REAL_CONST(124702.50276396469/8.0),
+    REAL_CONST(124727.55915026742/8.0),
+    REAL_CONST(124752.61679502104/8.0),
+    REAL_CONST(124777.67569809916/8.0),
+    REAL_CONST(124802.73585937542/8.0),
+    REAL_CONST(124827.79727872348/8.0),
+    REAL_CONST(124852.85995601704/8.0),
+    REAL_CONST(124877.92389112986/8.0),
+    REAL_CONST(124902.98908393568/8.0),
+    REAL_CONST(124928.05553430831/8.0),
+    REAL_CONST(124953.1232421216/8.0),
+    REAL_CONST(124978.19220724938/8.0),
+    REAL_CONST(125003.26242956554/8.0),
+    REAL_CONST(125028.33390894404/8.0),
+    REAL_CONST(125053.40664525882/8.0),
+    REAL_CONST(125078.48063838384/8.0),
+    REAL_CONST(125103.55588819318/8.0),
+    REAL_CONST(125128.63239456083/8.0),
+    REAL_CONST(125153.71015736091/8.0),
+    REAL_CONST(125178.78917646752/8.0),
+    REAL_CONST(125203.86945175481/8.0),
+    REAL_CONST(125228.95098309696/8.0),
+    REAL_CONST(125254.03377036817/8.0),
+    REAL_CONST(125279.1178134427/8.0),
+    REAL_CONST(125304.20311219479/8.0),
+    REAL_CONST(125329.28966649878/8.0),
+    REAL_CONST(125354.37747622898/8.0),
+    REAL_CONST(125379.46654125977/8.0),
+    REAL_CONST(125404.55686146552/8.0),
+    REAL_CONST(125429.6484367207/8.0),
+    REAL_CONST(125454.74126689974/8.0),
+    REAL_CONST(125479.83535187715/8.0),
+    REAL_CONST(125504.93069152744/8.0),
+    REAL_CONST(125530.02728572517/8.0),
+    REAL_CONST(125555.12513434493/8.0),
+    REAL_CONST(125580.22423726133/8.0),
+    REAL_CONST(125605.32459434902/8.0),
+    REAL_CONST(125630.4262054827/8.0),
+    REAL_CONST(125655.52907053704/8.0),
+    REAL_CONST(125680.63318938682/8.0),
+    REAL_CONST(125705.73856190679/8.0),
+    REAL_CONST(125730.84518797178/8.0),
+    REAL_CONST(125755.9530674566/8.0),
+    REAL_CONST(125781.06220023613/8.0),
+    REAL_CONST(125806.17258618528/8.0),
+    REAL_CONST(125831.28422517896/8.0),
+    REAL_CONST(125856.39711709213/8.0),
+    REAL_CONST(125881.51126179981/8.0),
+    REAL_CONST(125906.62665917698/8.0),
+    REAL_CONST(125931.74330909875/8.0),
+    REAL_CONST(125956.86121144016/8.0),
+    REAL_CONST(125981.98036607634/8.0),
+    REAL_CONST(126007.10077288245/8.0),
+    REAL_CONST(126032.22243173365/8.0),
+    REAL_CONST(126057.34534250517/8.0),
+    REAL_CONST(126082.46950507225/8.0),
+    REAL_CONST(126107.59491931014/8.0),
+    REAL_CONST(126132.72158509417/8.0),
+    REAL_CONST(126157.84950229966/8.0),
+    REAL_CONST(126182.97867080198/8.0),
+    REAL_CONST(126208.10909047653/8.0),
+    REAL_CONST(126233.24076119871/8.0),
+    REAL_CONST(126258.37368284403/8.0),
+    REAL_CONST(126283.50785528794/8.0),
+    REAL_CONST(126308.64327840599/8.0),
+    REAL_CONST(126333.77995207369/8.0),
+    REAL_CONST(126358.91787616667/8.0),
+    REAL_CONST(126384.0570505605/8.0),
+    REAL_CONST(126409.19747513086/8.0),
+    REAL_CONST(126434.3391497534/8.0),
+    REAL_CONST(126459.48207430386/8.0),
+    REAL_CONST(126484.62624865794/8.0),
+    REAL_CONST(126509.77167269142/8.0),
+    REAL_CONST(126534.9183462801/8.0),
+    REAL_CONST(126560.06626929982/8.0),
+    REAL_CONST(126585.21544162642/8.0),
+    REAL_CONST(126610.36586313581/8.0),
+    REAL_CONST(126635.51753370393/8.0),
+    REAL_CONST(126660.67045320668/8.0),
+    REAL_CONST(126685.82462152008/8.0),
+    REAL_CONST(126710.98003852014/8.0),
+    REAL_CONST(126736.13670408291/8.0),
+    REAL_CONST(126761.29461808444/8.0),
+    REAL_CONST(126786.45378040087/8.0),
+    REAL_CONST(126811.61419090834/8.0),
+    REAL_CONST(126836.77584948298/8.0),
+    REAL_CONST(126861.93875600102/8.0),
+    REAL_CONST(126887.10291033868/8.0),
+    REAL_CONST(126912.26831237224/8.0),
+    REAL_CONST(126937.43496197795/8.0),
+    REAL_CONST(126962.60285903217/8.0),
+    REAL_CONST(126987.77200341123/8.0),
+    REAL_CONST(127012.94239499152/8.0),
+    REAL_CONST(127038.11403364947/8.0),
+    REAL_CONST(127063.2869192615/8.0),
+    REAL_CONST(127088.46105170409/8.0),
+    REAL_CONST(127113.63643085376/8.0),
+    REAL_CONST(127138.81305658702/8.0),
+    REAL_CONST(127163.99092878048/8.0),
+    REAL_CONST(127189.17004731069/8.0),
+    REAL_CONST(127214.35041205429/8.0),
+    REAL_CONST(127239.53202288797/8.0),
+    REAL_CONST(127264.71487968838/8.0),
+    REAL_CONST(127289.89898233226/8.0),
+    REAL_CONST(127315.08433069635/8.0),
+    REAL_CONST(127340.27092465744/8.0),
+    REAL_CONST(127365.45876409234/8.0),
+    REAL_CONST(127390.64784887788/8.0),
+    REAL_CONST(127415.83817889093/8.0),
+    REAL_CONST(127441.02975400841/8.0),
+    REAL_CONST(127466.22257410725/8.0),
+    REAL_CONST(127491.41663906439/8.0),
+    REAL_CONST(127516.61194875685/8.0),
+    REAL_CONST(127541.80850306165/8.0),
+    REAL_CONST(127567.00630185583/8.0),
+    REAL_CONST(127592.20534501647/8.0),
+    REAL_CONST(127617.4056324207/8.0),
+    REAL_CONST(127642.60716394568/8.0),
+    REAL_CONST(127667.80993946856/8.0),
+    REAL_CONST(127693.01395886653/8.0),
+    REAL_CONST(127718.21922201688/8.0),
+    REAL_CONST(127743.42572879682/8.0),
+    REAL_CONST(127768.63347908368/8.0),
+    REAL_CONST(127793.84247275478/8.0),
+    REAL_CONST(127819.05270968749/8.0),
+    REAL_CONST(127844.26418975917/8.0),
+    REAL_CONST(127869.47691284724/8.0),
+    REAL_CONST(127894.69087882918/8.0),
+    REAL_CONST(127919.90608758242/8.0),
+    REAL_CONST(127945.12253898452/8.0),
+    REAL_CONST(127970.34023291297/8.0),
+    REAL_CONST(127995.55916924537/8.0),
+    REAL_CONST(128020.77934785932/8.0),
+    REAL_CONST(128046.00076863244/8.0),
+    REAL_CONST(128071.22343144237/8.0),
+    REAL_CONST(128096.44733616684/8.0),
+    REAL_CONST(128121.67248268353/8.0),
+    REAL_CONST(128146.89887087021/8.0),
+    REAL_CONST(128172.12650060465/8.0),
+    REAL_CONST(128197.35537176467/8.0),
+    REAL_CONST(128222.5854842281/8.0),
+    REAL_CONST(128247.81683787282/8.0),
+    REAL_CONST(128273.04943257671/8.0),
+    REAL_CONST(128298.28326821771/8.0),
+    REAL_CONST(128323.51834467379/8.0),
+    REAL_CONST(128348.75466182294/8.0),
+    REAL_CONST(128373.99221954317/8.0),
+    REAL_CONST(128399.23101771252/8.0),
+    REAL_CONST(128424.47105620909/8.0),
+    REAL_CONST(128449.71233491098/8.0),
+    REAL_CONST(128474.95485369631/8.0),
+    REAL_CONST(128500.19861244329/8.0),
+    REAL_CONST(128525.44361103009/8.0),
+    REAL_CONST(128550.68984933494/8.0),
+    REAL_CONST(128575.93732723613/8.0),
+    REAL_CONST(128601.18604461191/8.0),
+    REAL_CONST(128626.43600134061/8.0),
+    REAL_CONST(128651.68719730059/8.0),
+    REAL_CONST(128676.93963237021/8.0),
+    REAL_CONST(128702.1933064279/8.0),
+    REAL_CONST(128727.44821935208/8.0),
+    REAL_CONST(128752.70437102125/8.0),
+    REAL_CONST(128777.96176131385/8.0),
+    REAL_CONST(128803.22039010846/8.0),
+    REAL_CONST(128828.48025728362/8.0),
+    REAL_CONST(128853.74136271792/8.0),
+    REAL_CONST(128879.00370628996/8.0),
+    REAL_CONST(128904.26728787841/8.0),
+    REAL_CONST(128929.53210736193/8.0),
+    REAL_CONST(128954.79816461923/8.0),
+    REAL_CONST(128980.06545952905/8.0),
+    REAL_CONST(129005.33399197015/8.0),
+    REAL_CONST(129030.60376182134/8.0),
+    REAL_CONST(129055.87476896142/8.0),
+    REAL_CONST(129081.14701326926/8.0),
+    REAL_CONST(129106.42049462376/8.0),
+    REAL_CONST(129131.6952129038/8.0),
+    REAL_CONST(129156.97116798835/8.0),
+    REAL_CONST(129182.24835975636/8.0),
+    REAL_CONST(129207.52678808685/8.0),
+    REAL_CONST(129232.80645285884/8.0),
+    REAL_CONST(129258.08735395141/8.0),
+    REAL_CONST(129283.36949124365/8.0),
+    REAL_CONST(129308.65286461466/8.0),
+    REAL_CONST(129333.9374739436/8.0),
+    REAL_CONST(129359.22331910966/8.0),
+    REAL_CONST(129384.51039999202/8.0),
+    REAL_CONST(129409.79871646997/8.0),
+    REAL_CONST(129435.08826842274/8.0),
+    REAL_CONST(129460.37905572963/8.0),
+    REAL_CONST(129485.67107826998/8.0),
+    REAL_CONST(129510.96433592314/8.0),
+    REAL_CONST(129536.25882856851/8.0),
+    REAL_CONST(129561.55455608548/8.0),
+    REAL_CONST(129586.85151835352/8.0),
+    REAL_CONST(129612.14971525209/8.0),
+    REAL_CONST(129637.4491466607/8.0),
+    REAL_CONST(129662.74981245887/8.0),
+    REAL_CONST(129688.0517125262/8.0),
+    REAL_CONST(129713.35484674224/8.0),
+    REAL_CONST(129738.65921498663/8.0),
+    REAL_CONST(129763.96481713903/8.0),
+    REAL_CONST(129789.27165307909/8.0),
+    REAL_CONST(129814.57972268655/8.0),
+    REAL_CONST(129839.88902584116/8.0),
+    REAL_CONST(129865.19956242264/8.0),
+    REAL_CONST(129890.51133231082/8.0),
+    REAL_CONST(129915.82433538554/8.0),
+    REAL_CONST(129941.13857152662/8.0),
+    REAL_CONST(129966.45404061397/8.0),
+    REAL_CONST(129991.7707425275/8.0),
+    REAL_CONST(130017.08867714716/8.0),
+    REAL_CONST(130042.4078443529/8.0),
+    REAL_CONST(130067.72824402474/8.0),
+    REAL_CONST(130093.04987604271/8.0),
+    REAL_CONST(130118.37274028687/8.0),
+    REAL_CONST(130143.69683663732/8.0),
+    REAL_CONST(130169.02216497416/8.0),
+    REAL_CONST(130194.34872517755/8.0),
+    REAL_CONST(130219.67651712766/8.0),
+    REAL_CONST(130245.0055407047/8.0),
+    REAL_CONST(130270.33579578891/8.0),
+    REAL_CONST(130295.66728226055/8.0),
+    REAL_CONST(130320.99999999991/8.0),
+    REAL_CONST(130346.33394888733/8.0),
+    REAL_CONST(130371.66912880314/8.0),
+    REAL_CONST(130397.00553962773/8.0),
+    REAL_CONST(130422.34318124152/8.0),
+    REAL_CONST(130447.68205352494/8.0),
+    REAL_CONST(130473.02215635845/8.0),
+    REAL_CONST(130498.36348962256/8.0),
+    REAL_CONST(130523.70605319779/8.0),
+    REAL_CONST(130549.0498469647/8.0),
+    REAL_CONST(130574.39487080388/8.0),
+    REAL_CONST(130599.74112459592/8.0),
+    REAL_CONST(130625.08860822149/8.0),
+    REAL_CONST(130650.43732156123/8.0),
+    REAL_CONST(130675.78726449587/8.0),
+    REAL_CONST(130701.13843690613/8.0),
+    REAL_CONST(130726.49083867275/8.0),
+    REAL_CONST(130751.84446967654/8.0),
+    REAL_CONST(130777.19932979831/8.0),
+    REAL_CONST(130802.5554189189/8.0),
+    REAL_CONST(130827.91273691918/8.0),
+    REAL_CONST(130853.27128368006/8.0),
+    REAL_CONST(130878.63105908247/8.0),
+    REAL_CONST(130903.99206300738/8.0),
+    REAL_CONST(130929.35429533575/8.0),
+    REAL_CONST(130954.71775594862/8.0),
+    REAL_CONST(130980.08244472703/8.0),
+    REAL_CONST(131005.44836155206/8.0),
+    REAL_CONST(131030.81550630482/8.0),
+    REAL_CONST(131056.18387886642/8.0),
+    REAL_CONST(131081.55347911804/8.0),
+    REAL_CONST(131106.92430694087/8.0),
+    REAL_CONST(131132.29636221612/8.0),
+    REAL_CONST(131157.66964482504/8.0),
+    REAL_CONST(131183.0441546489/8.0),
+    REAL_CONST(131208.41989156904/8.0),
+    REAL_CONST(131233.79685546676/8.0),
+    REAL_CONST(131259.17504622342/8.0),
+    REAL_CONST(131284.55446372041/8.0),
+    REAL_CONST(131309.93510783918/8.0),
+    REAL_CONST(131335.31697846117/8.0),
+    REAL_CONST(131360.70007546784/8.0),
+    REAL_CONST(131386.0843987407/8.0),
+    REAL_CONST(131411.46994816128/8.0),
+    REAL_CONST(131436.85672361116/8.0),
+    REAL_CONST(131462.24472497194/8.0),
+    REAL_CONST(131487.63395212521/8.0),
+    REAL_CONST(131513.02440495262/8.0),
+    REAL_CONST(131538.41608333588/8.0),
+    REAL_CONST(131563.80898715663/8.0),
+    REAL_CONST(131589.2031162967/8.0),
+    REAL_CONST(131614.59847063778/8.0),
+    REAL_CONST(131639.9950500617/8.0),
+    REAL_CONST(131665.39285445024/8.0),
+    REAL_CONST(131690.79188368531/8.0),
+    REAL_CONST(131716.19213764873/8.0),
+    REAL_CONST(131741.59361622241/8.0),
+    REAL_CONST(131766.99631928833/8.0),
+    REAL_CONST(131792.40024672839/8.0),
+    REAL_CONST(131817.80539842462/8.0),
+    REAL_CONST(131843.21177425905/8.0),
+    REAL_CONST(131868.61937411371/8.0),
+    REAL_CONST(131894.02819787065/8.0),
+    REAL_CONST(131919.43824541202/8.0),
+    REAL_CONST(131944.84951661993/8.0),
+    REAL_CONST(131970.26201137656/8.0),
+    REAL_CONST(131995.67572956407/8.0),
+    REAL_CONST(132021.09067106468/8.0),
+    REAL_CONST(132046.50683576067/8.0),
+    REAL_CONST(132071.9242235343/8.0),
+    REAL_CONST(132097.34283426782/8.0),
+    REAL_CONST(132122.76266784366/8.0),
+    REAL_CONST(132148.1837241441/8.0),
+    REAL_CONST(132173.60600305157/8.0),
+    REAL_CONST(132199.02950444847/8.0),
+    REAL_CONST(132224.45422821722/8.0),
+    REAL_CONST(132249.88017424036/8.0),
+    REAL_CONST(132275.30734240031/8.0),
+    REAL_CONST(132300.73573257966/8.0),
+    REAL_CONST(132326.16534466096/8.0),
+    REAL_CONST(132351.59617852676/8.0),
+    REAL_CONST(132377.02823405969/8.0),
+    REAL_CONST(132402.46151114244/8.0),
+    REAL_CONST(132427.89600965759/8.0),
+    REAL_CONST(132453.33172948789/8.0),
+    REAL_CONST(132478.76867051609/8.0),
+    REAL_CONST(132504.20683262491/8.0),
+    REAL_CONST(132529.64621569714/8.0),
+    REAL_CONST(132555.08681961559/8.0),
+    REAL_CONST(132580.5286442631/8.0),
+    REAL_CONST(132605.97168952253/8.0),
+    REAL_CONST(132631.41595527678/8.0),
+    REAL_CONST(132656.86144140881/8.0),
+    REAL_CONST(132682.30814780149/8.0),
+    REAL_CONST(132707.75607433787/8.0),
+    REAL_CONST(132733.20522090094/8.0),
+    REAL_CONST(132758.65558737374/8.0),
+    REAL_CONST(132784.10717363929/8.0),
+    REAL_CONST(132809.55997958075/8.0),
+    REAL_CONST(132835.01400508118/8.0),
+    REAL_CONST(132860.46925002377/8.0),
+    REAL_CONST(132885.92571429166/8.0),
+    REAL_CONST(132911.38339776811/8.0),
+    REAL_CONST(132936.84230033628/8.0),
+    REAL_CONST(132962.30242187946/8.0),
+    REAL_CONST(132987.76376228096/8.0),
+    REAL_CONST(133013.22632142407/8.0),
+    REAL_CONST(133038.69009919214/8.0),
+    REAL_CONST(133064.15509546854/8.0),
+    REAL_CONST(133089.62131013666/8.0),
+    REAL_CONST(133115.08874307995/8.0),
+    REAL_CONST(133140.55739418184/8.0),
+    REAL_CONST(133166.02726332581/8.0),
+    REAL_CONST(133191.49835039541/8.0),
+    REAL_CONST(133216.97065527414/8.0),
+    REAL_CONST(133242.44417784561/8.0),
+    REAL_CONST(133267.91891799335/8.0),
+    REAL_CONST(133293.39487560102/8.0),
+    REAL_CONST(133318.87205055228/8.0),
+    REAL_CONST(133344.35044273079/8.0),
+    REAL_CONST(133369.83005202023/8.0),
+    REAL_CONST(133395.31087830439/8.0),
+    REAL_CONST(133420.79292146701/8.0),
+    REAL_CONST(133446.27618139185/8.0),
+    REAL_CONST(133471.76065796276/8.0),
+    REAL_CONST(133497.24635106357/8.0),
+    REAL_CONST(133522.73326057816/8.0),
+    REAL_CONST(133548.22138639039/8.0),
+    REAL_CONST(133573.71072838426/8.0),
+    REAL_CONST(133599.20128644365/8.0),
+    REAL_CONST(133624.69306045261/8.0),
+    REAL_CONST(133650.1860502951/8.0),
+    REAL_CONST(133675.68025585517/8.0),
+    REAL_CONST(133701.1756770169/8.0),
+    REAL_CONST(133726.67231366437/8.0),
+    REAL_CONST(133752.17016568172/8.0),
+    REAL_CONST(133777.66923295305/8.0),
+    REAL_CONST(133803.16951536259/8.0),
+    REAL_CONST(133828.67101279454/8.0),
+    REAL_CONST(133854.17372513309/8.0),
+    REAL_CONST(133879.67765226253/8.0),
+    REAL_CONST(133905.18279406714/8.0),
+    REAL_CONST(133930.68915043125/8.0),
+    REAL_CONST(133956.19672123916/8.0),
+    REAL_CONST(133981.70550637526/8.0),
+    REAL_CONST(134007.21550572399/8.0),
+    REAL_CONST(134032.7267191697/8.0),
+    REAL_CONST(134058.23914659687/8.0),
+    REAL_CONST(134083.75278789/8.0),
+    REAL_CONST(134109.26764293358/8.0),
+    REAL_CONST(134134.78371161217/8.0),
+    REAL_CONST(134160.30099381026/8.0),
+    REAL_CONST(134185.8194894125/8.0),
+    REAL_CONST(134211.33919830353/8.0),
+    REAL_CONST(134236.8601203679/8.0),
+    REAL_CONST(134262.38225549037/8.0),
+    REAL_CONST(134287.90560355558/8.0),
+    REAL_CONST(134313.43016444831/8.0),
+    REAL_CONST(134338.95593805326/8.0),
+    REAL_CONST(134364.48292425525/8.0),
+    REAL_CONST(134390.01112293909/8.0),
+    REAL_CONST(134415.54053398955/8.0),
+    REAL_CONST(134441.07115729159/8.0),
+    REAL_CONST(134466.60299273001/8.0),
+    REAL_CONST(134492.1360401898/8.0),
+    REAL_CONST(134517.67029955584/8.0),
+    REAL_CONST(134543.20577071316/8.0),
+    REAL_CONST(134568.74245354676/8.0),
+    REAL_CONST(134594.28034794159/8.0),
+    REAL_CONST(134619.81945378278/8.0),
+    REAL_CONST(134645.35977095537/8.0),
+    REAL_CONST(134670.90129934452/8.0),
+    REAL_CONST(134696.4440388353/8.0),
+    REAL_CONST(134721.98798931291/8.0),
+    REAL_CONST(134747.53315066252/8.0),
+    REAL_CONST(134773.07952276937/8.0),
+    REAL_CONST(134798.62710551871/8.0),
+    REAL_CONST(134824.17589879577/8.0),
+    REAL_CONST(134849.72590248589/8.0),
+    REAL_CONST(134875.27711647438/8.0),
+    REAL_CONST(134900.82954064661/8.0),
+    REAL_CONST(134926.38317488792/8.0),
+    REAL_CONST(134951.93801908373/8.0),
+    REAL_CONST(134977.49407311951/8.0),
+    REAL_CONST(135003.05133688069/8.0),
+    REAL_CONST(135028.60981025276/8.0),
+    REAL_CONST(135054.16949312127/8.0),
+    REAL_CONST(135079.73038537172/8.0),
+    REAL_CONST(135105.29248688967/8.0),
+    REAL_CONST(135130.85579756077/8.0),
+    REAL_CONST(135156.42031727062/8.0),
+    REAL_CONST(135181.98604590484/8.0),
+    REAL_CONST(135207.55298334916/8.0),
+    REAL_CONST(135233.12112948924/8.0),
+    REAL_CONST(135258.69048421088/8.0),
+    REAL_CONST(135284.26104739975/8.0),
+    REAL_CONST(135309.83281894168/8.0),
+    REAL_CONST(135335.4057987225/8.0),
+    REAL_CONST(135360.97998662802/8.0),
+    REAL_CONST(135386.55538254412/8.0),
+    REAL_CONST(135412.13198635669/8.0),
+    REAL_CONST(135437.70979795168/8.0),
+    REAL_CONST(135463.28881721498/8.0),
+    REAL_CONST(135488.86904403262/8.0),
+    REAL_CONST(135514.45047829056/8.0),
+    REAL_CONST(135540.03311987486/8.0),
+    REAL_CONST(135565.61696867159/8.0),
+    REAL_CONST(135591.20202456677/8.0),
+    REAL_CONST(135616.78828744654/8.0),
+    REAL_CONST(135642.37575719706/8.0),
+    REAL_CONST(135667.96443370447/8.0),
+    REAL_CONST(135693.55431685498/8.0),
+    REAL_CONST(135719.14540653475/8.0),
+    REAL_CONST(135744.73770263011/8.0),
+    REAL_CONST(135770.33120502727/8.0),
+    REAL_CONST(135795.92591361253/8.0),
+    REAL_CONST(135821.52182827223/8.0),
+    REAL_CONST(135847.11894889272/8.0),
+    REAL_CONST(135872.7172753604/8.0),
+    REAL_CONST(135898.31680756161/8.0),
+    REAL_CONST(135923.91754538284/8.0),
+    REAL_CONST(135949.51948871053/8.0),
+    REAL_CONST(135975.12263743114/8.0),
+    REAL_CONST(136000.72699143123/8.0),
+    REAL_CONST(136026.33255059729/8.0),
+    REAL_CONST(136051.93931481591/8.0),
+    REAL_CONST(136077.54728397369/8.0),
+    REAL_CONST(136103.15645795723/8.0),
+    REAL_CONST(136128.76683665317/8.0),
+    REAL_CONST(136154.37841994822/8.0),
+    REAL_CONST(136179.99120772901/8.0),
+    REAL_CONST(136205.60519988232/8.0),
+    REAL_CONST(136231.2203962949/8.0),
+    REAL_CONST(136256.83679685349/8.0),
+    REAL_CONST(136282.45440144493/8.0),
+    REAL_CONST(136308.07320995603/8.0),
+    REAL_CONST(136333.69322227367/8.0),
+    REAL_CONST(136359.31443828469/8.0),
+    REAL_CONST(136384.93685787608/8.0),
+    REAL_CONST(136410.56048093468/8.0),
+    REAL_CONST(136436.18530734754/8.0),
+    REAL_CONST(136461.81133700156/8.0),
+    REAL_CONST(136487.43856978384/8.0),
+    REAL_CONST(136513.06700558143/8.0),
+    REAL_CONST(136538.6966442813/8.0),
+    REAL_CONST(136564.32748577066/8.0),
+    REAL_CONST(136589.95952993655/8.0),
+    REAL_CONST(136615.59277666616/8.0),
+    REAL_CONST(136641.22722584667/8.0),
+    REAL_CONST(136666.86287736523/8.0),
+    REAL_CONST(136692.49973110916/8.0),
+    REAL_CONST(136718.13778696564/8.0),
+    REAL_CONST(136743.77704482197/8.0),
+    REAL_CONST(136769.41750456547/8.0),
+    REAL_CONST(136795.05916608346/8.0),
+    REAL_CONST(136820.70202926331/8.0),
+    REAL_CONST(136846.34609399244/8.0),
+    REAL_CONST(136871.99136015819/8.0),
+    REAL_CONST(136897.63782764805/8.0),
+    REAL_CONST(136923.28549634948/8.0),
+    REAL_CONST(136948.93436614997/8.0),
+    REAL_CONST(136974.58443693706/8.0),
+    REAL_CONST(137000.23570859825/8.0),
+    REAL_CONST(137025.88818102115/8.0),
+    REAL_CONST(137051.54185409332/8.0),
+    REAL_CONST(137077.19672770242/8.0),
+    REAL_CONST(137102.85280173609/8.0),
+    REAL_CONST(137128.51007608202/8.0),
+    REAL_CONST(137154.16855062786/8.0),
+    REAL_CONST(137179.82822526142/8.0),
+    REAL_CONST(137205.48909987041/8.0),
+    REAL_CONST(137231.15117434258/8.0),
+    REAL_CONST(137256.8144485658/8.0),
+    REAL_CONST(137282.47892242789/8.0),
+    REAL_CONST(137308.14459581667/8.0),
+    REAL_CONST(137333.81146862009/8.0),
+    REAL_CONST(137359.47954072602/8.0),
+    REAL_CONST(137385.14881202241/8.0),
+    REAL_CONST(137410.81928239719/8.0),
+    REAL_CONST(137436.49095173844/8.0),
+    REAL_CONST(137462.16381993407/8.0),
+    REAL_CONST(137487.83788687221/8.0),
+    REAL_CONST(137513.51315244089/8.0),
+    REAL_CONST(137539.18961652822/8.0),
+    REAL_CONST(137564.86727902229/8.0),
+    REAL_CONST(137590.54613981131/8.0),
+    REAL_CONST(137616.22619878338/8.0),
+    REAL_CONST(137641.90745582676/8.0),
+    REAL_CONST(137667.58991082967/8.0),
+    REAL_CONST(137693.27356368033/8.0),
+    REAL_CONST(137718.95841426702/8.0),
+    REAL_CONST(137744.64446247809/8.0),
+    REAL_CONST(137770.33170820182/8.0),
+    REAL_CONST(137796.02015132661/8.0),
+    REAL_CONST(137821.70979174081/8.0),
+    REAL_CONST(137847.40062933284/8.0),
+    REAL_CONST(137873.09266399115/8.0),
+    REAL_CONST(137898.78589560417/8.0),
+    REAL_CONST(137924.48032406042/8.0),
+    REAL_CONST(137950.17594924837/8.0),
+    REAL_CONST(137975.8727710566/8.0),
+    REAL_CONST(138001.57078937365/8.0),
+    REAL_CONST(138027.27000408815/8.0),
+    REAL_CONST(138052.97041508864/8.0),
+    REAL_CONST(138078.67202226384/8.0),
+    REAL_CONST(138104.3748255024/8.0),
+    REAL_CONST(138130.07882469296/8.0),
+    REAL_CONST(138155.78401972432/8.0),
+    REAL_CONST(138181.49041048516/8.0),
+    REAL_CONST(138207.1979968643/8.0),
+    REAL_CONST(138232.9067787505/8.0),
+    REAL_CONST(138258.61675603263/8.0),
+    REAL_CONST(138284.32792859949/8.0),
+    REAL_CONST(138310.04029633995/8.0),
+    REAL_CONST(138335.75385914298/8.0),
+    REAL_CONST(138361.46861689744/8.0),
+    REAL_CONST(138387.18456949232/8.0),
+    REAL_CONST(138412.90171681659/8.0),
+    REAL_CONST(138438.62005875923/8.0),
+    REAL_CONST(138464.33959520931/8.0),
+    REAL_CONST(138490.06032605586/8.0),
+    REAL_CONST(138515.78225118798/8.0),
+    REAL_CONST(138541.50537049473/8.0),
+    REAL_CONST(138567.2296838653/8.0),
+    REAL_CONST(138592.95519118884/8.0),
+    REAL_CONST(138618.68189235451/8.0),
+    REAL_CONST(138644.40978725153/8.0),
+    REAL_CONST(138670.13887576913/8.0),
+    REAL_CONST(138695.86915779658/8.0),
+    REAL_CONST(138721.60063322316/8.0),
+    REAL_CONST(138747.33330193823/8.0),
+    REAL_CONST(138773.06716383106/8.0),
+    REAL_CONST(138798.80221879104/8.0),
+    REAL_CONST(138824.53846670757/8.0),
+    REAL_CONST(138850.27590747006/8.0),
+    REAL_CONST(138876.01454096794/8.0),
+    REAL_CONST(138901.7543670907/8.0),
+    REAL_CONST(138927.49538572782/8.0),
+    REAL_CONST(138953.2375967688/8.0),
+    REAL_CONST(138978.9810001032/8.0),
+    REAL_CONST(139004.72559562061/8.0),
+    REAL_CONST(139030.47138321059/8.0),
+    REAL_CONST(139056.2183627628/8.0),
+    REAL_CONST(139081.96653416683/8.0),
+    REAL_CONST(139107.71589731239/8.0),
+    REAL_CONST(139133.46645208917/8.0),
+    REAL_CONST(139159.21819838689/8.0),
+    REAL_CONST(139184.97113609532/8.0),
+    REAL_CONST(139210.72526510421/8.0),
+    REAL_CONST(139236.48058530336/8.0),
+    REAL_CONST(139262.23709658257/8.0),
+    REAL_CONST(139287.99479883176/8.0),
+    REAL_CONST(139313.75369194071/8.0),
+    REAL_CONST(139339.51377579942/8.0),
+    REAL_CONST(139365.27505029776/8.0),
+    REAL_CONST(139391.03751532568/8.0),
+    REAL_CONST(139416.80117077316/8.0),
+    REAL_CONST(139442.56601653024/8.0),
+    REAL_CONST(139468.33205248689/8.0),
+    REAL_CONST(139494.09927853322/8.0),
+    REAL_CONST(139519.86769455927/8.0),
+    REAL_CONST(139545.63730045516/8.0),
+    REAL_CONST(139571.408096111/8.0),
+    REAL_CONST(139597.18008141697/8.0),
+    REAL_CONST(139622.95325626322/8.0),
+    REAL_CONST(139648.72762054001/8.0),
+    REAL_CONST(139674.5031741375/8.0),
+    REAL_CONST(139700.27991694602/8.0),
+    REAL_CONST(139726.05784885579/8.0),
+    REAL_CONST(139751.83696975713/8.0),
+    REAL_CONST(139777.61727954043/8.0),
+    REAL_CONST(139803.39877809596/8.0),
+    REAL_CONST(139829.18146531415/8.0),
+    REAL_CONST(139854.96534108539/8.0),
+    REAL_CONST(139880.75040530015/8.0),
+    REAL_CONST(139906.53665784886/8.0),
+    REAL_CONST(139932.32409862199/8.0),
+    REAL_CONST(139958.11272751007/8.0),
+    REAL_CONST(139983.90254440365/8.0),
+    REAL_CONST(140009.69354919327/8.0),
+    REAL_CONST(140035.48574176949/8.0),
+    REAL_CONST(140061.27912202294/8.0),
+    REAL_CONST(140087.07368984428/8.0),
+    REAL_CONST(140112.86944512415/8.0),
+    REAL_CONST(140138.66638775321/8.0),
+    REAL_CONST(140164.4645176222/8.0),
+    REAL_CONST(140190.26383462184/8.0),
+    REAL_CONST(140216.06433864293/8.0),
+    REAL_CONST(140241.86602957622/8.0),
+    REAL_CONST(140267.66890731253/8.0),
+    REAL_CONST(140293.47297174268/8.0),
+    REAL_CONST(140319.27822275754/8.0),
+    REAL_CONST(140345.08466024802/8.0),
+    REAL_CONST(140370.89228410498/8.0),
+    REAL_CONST(140396.70109421943/8.0),
+    REAL_CONST(140422.51109048226/8.0),
+    REAL_CONST(140448.32227278448/8.0),
+    REAL_CONST(140474.13464101712/8.0),
+    REAL_CONST(140499.94819507122/8.0),
+    REAL_CONST(140525.76293483781/8.0),
+    REAL_CONST(140551.57886020801/8.0),
+    REAL_CONST(140577.3959710729/8.0),
+    REAL_CONST(140603.21426732364/8.0),
+    REAL_CONST(140629.03374885136/8.0),
+    REAL_CONST(140654.85441554731/8.0),
+    REAL_CONST(140680.67626730262/8.0),
+    REAL_CONST(140706.49930400858/8.0),
+    REAL_CONST(140732.32352555645/8.0),
+    REAL_CONST(140758.1489318375/8.0),
+    REAL_CONST(140783.97552274304/8.0),
+    REAL_CONST(140809.80329816442/8.0),
+    REAL_CONST(140835.63225799298/8.0),
+    REAL_CONST(140861.46240212015/8.0),
+    REAL_CONST(140887.29373043729/8.0),
+    REAL_CONST(140913.12624283586/8.0),
+    REAL_CONST(140938.95993920733/8.0),
+    REAL_CONST(140964.79481944317/8.0),
+    REAL_CONST(140990.63088343487/8.0),
+    REAL_CONST(141016.46813107401/8.0),
+    REAL_CONST(141042.30656225214/8.0),
+    REAL_CONST(141068.14617686081/8.0),
+    REAL_CONST(141093.98697479168/8.0),
+    REAL_CONST(141119.82895593636/8.0),
+    REAL_CONST(141145.6721201865/8.0),
+    REAL_CONST(141171.51646743377/8.0),
+    REAL_CONST(141197.36199756994/8.0),
+    REAL_CONST(141223.20871048668/8.0),
+    REAL_CONST(141249.05660607578/8.0),
+    REAL_CONST(141274.90568422904/8.0),
+    REAL_CONST(141300.75594483822/8.0),
+    REAL_CONST(141326.6073877952/8.0),
+    REAL_CONST(141352.4600129918/8.0),
+    REAL_CONST(141378.31382031992/8.0),
+    REAL_CONST(141404.16880967148/8.0),
+    REAL_CONST(141430.02498093838/8.0),
+    REAL_CONST(141455.8823340126/8.0),
+    REAL_CONST(141481.74086878612/8.0),
+    REAL_CONST(141507.60058515094/8.0),
+    REAL_CONST(141533.46148299909/8.0),
+    REAL_CONST(141559.32356222265/8.0),
+    REAL_CONST(141585.18682271364/8.0),
+    REAL_CONST(141611.05126436421/8.0),
+    REAL_CONST(141636.9168870665/8.0),
+    REAL_CONST(141662.78369071262/8.0),
+    REAL_CONST(141688.65167519479/8.0),
+    REAL_CONST(141714.5208404052/8.0),
+    REAL_CONST(141740.39118623605/8.0),
+    REAL_CONST(141766.26271257963/8.0),
+    REAL_CONST(141792.1354193282/8.0),
+    REAL_CONST(141818.00930637406/8.0),
+    REAL_CONST(141843.88437360956/8.0),
+    REAL_CONST(141869.760620927/8.0),
+    REAL_CONST(141895.6380482188/8.0),
+    REAL_CONST(141921.51665537735/8.0),
+    REAL_CONST(141947.39644229505/8.0),
+    REAL_CONST(141973.27740886438/8.0),
+    REAL_CONST(141999.15955497778/8.0),
+    REAL_CONST(142025.04288052776/8.0),
+    REAL_CONST(142050.92738540689/8.0),
+    REAL_CONST(142076.81306950765/8.0),
+    REAL_CONST(142102.69993272264/8.0),
+    REAL_CONST(142128.58797494444/8.0),
+    REAL_CONST(142154.47719606571/8.0),
+    REAL_CONST(142180.36759597904/8.0),
+    REAL_CONST(142206.25917457714/8.0),
+    REAL_CONST(142232.15193175265/8.0),
+    REAL_CONST(142258.04586739838/8.0),
+    REAL_CONST(142283.94098140698/8.0),
+    REAL_CONST(142309.83727367126/8.0),
+    REAL_CONST(142335.73474408401/8.0),
+    REAL_CONST(142361.63339253806/8.0),
+    REAL_CONST(142387.5332189262/8.0),
+    REAL_CONST(142413.43422314132/8.0),
+    REAL_CONST(142439.33640507635/8.0),
+    REAL_CONST(142465.23976462413/8.0),
+    REAL_CONST(142491.14430167765/8.0),
+    REAL_CONST(142517.05001612983/8.0),
+    REAL_CONST(142542.95690787368/8.0),
+    REAL_CONST(142568.86497680223/8.0),
+    REAL_CONST(142594.77422280848/8.0),
+    REAL_CONST(142620.68464578551/8.0),
+    REAL_CONST(142646.5962456264/8.0),
+    REAL_CONST(142672.50902222423/8.0),
+    REAL_CONST(142698.42297547215/8.0),
+    REAL_CONST(142724.33810526333/8.0),
+    REAL_CONST(142750.25441149093/8.0),
+    REAL_CONST(142776.17189404817/8.0),
+    REAL_CONST(142802.09055282827/8.0),
+    REAL_CONST(142828.01038772447/8.0),
+    REAL_CONST(142853.93139863008/8.0),
+    REAL_CONST(142879.85358543837/8.0),
+    REAL_CONST(142905.77694804268/8.0),
+    REAL_CONST(142931.70148633636/8.0),
+    REAL_CONST(142957.62720021277/8.0),
+    REAL_CONST(142983.55408956532/8.0),
+    REAL_CONST(143009.48215428743/8.0),
+    REAL_CONST(143035.41139427255/8.0),
+    REAL_CONST(143061.34180941415/8.0),
+    REAL_CONST(143087.27339960571/8.0),
+    REAL_CONST(143113.20616474075/8.0),
+    REAL_CONST(143139.14010471283/8.0),
+    REAL_CONST(143165.07521941551/8.0),
+    REAL_CONST(143191.01150874238/8.0),
+    REAL_CONST(143216.94897258704/8.0),
+    REAL_CONST(143242.88761084314/8.0),
+    REAL_CONST(143268.82742340435/8.0),
+    REAL_CONST(143294.76841016437/8.0),
+    REAL_CONST(143320.71057101688/8.0),
+    REAL_CONST(143346.65390585564/8.0),
+    REAL_CONST(143372.59841457437/8.0),
+    REAL_CONST(143398.54409706692/8.0),
+    REAL_CONST(143424.49095322701/8.0),
+    REAL_CONST(143450.43898294857/8.0),
+    REAL_CONST(143476.38818612538/8.0),
+    REAL_CONST(143502.33856265133/8.0),
+    REAL_CONST(143528.29011242036/8.0),
+    REAL_CONST(143554.24283532638/8.0),
+    REAL_CONST(143580.19673126334/8.0),
+    REAL_CONST(143606.1518001252/8.0),
+    REAL_CONST(143632.10804180597/8.0),
+    REAL_CONST(143658.06545619969/8.0),
+    REAL_CONST(143684.02404320039/8.0),
+    REAL_CONST(143709.98380270213/8.0),
+    REAL_CONST(143735.944734599/8.0),
+    REAL_CONST(143761.90683878519/8.0),
+    REAL_CONST(143787.87011515474/8.0),
+    REAL_CONST(143813.83456360188/8.0),
+    REAL_CONST(143839.8001840208/8.0),
+    REAL_CONST(143865.76697630569/8.0),
+    REAL_CONST(143891.73494035081/8.0),
+    REAL_CONST(143917.7040760504/8.0),
+    REAL_CONST(143943.67438329876/8.0),
+    REAL_CONST(143969.6458619902/8.0),
+    REAL_CONST(143995.61851201905/8.0),
+    REAL_CONST(144021.59233327967/8.0),
+    REAL_CONST(144047.56732566646/8.0),
+    REAL_CONST(144073.54348907378/8.0),
+    REAL_CONST(144099.52082339607/8.0),
+    REAL_CONST(144125.49932852783/8.0),
+    REAL_CONST(144151.4790043635/8.0),
+    REAL_CONST(144177.45985079758/8.0),
+    REAL_CONST(144203.44186772458/8.0),
+    REAL_CONST(144229.42505503909/8.0),
+    REAL_CONST(144255.40941263564/8.0),
+    REAL_CONST(144281.39494040885/8.0),
+    REAL_CONST(144307.38163825331/8.0),
+    REAL_CONST(144333.36950606373/8.0),
+    REAL_CONST(144359.35854373468/8.0),
+    REAL_CONST(144385.34875116093/8.0),
+    REAL_CONST(144411.34012823718/8.0),
+    REAL_CONST(144437.33267485813/8.0),
+    REAL_CONST(144463.32639091855/8.0),
+    REAL_CONST(144489.32127631325/8.0),
+    REAL_CONST(144515.31733093705/8.0),
+    REAL_CONST(144541.31455468474/8.0),
+    REAL_CONST(144567.3129474512/8.0),
+    REAL_CONST(144593.3125091313/8.0),
+    REAL_CONST(144619.31323961995/8.0),
+    REAL_CONST(144645.31513881206/8.0),
+    REAL_CONST(144671.31820660262/8.0),
+    REAL_CONST(144697.32244288657/8.0),
+    REAL_CONST(144723.32784755889/8.0),
+    REAL_CONST(144749.33442051467/8.0),
+    REAL_CONST(144775.34216164888/8.0),
+    REAL_CONST(144801.35107085665/8.0),
+    REAL_CONST(144827.36114803303/8.0),
+    REAL_CONST(144853.37239307314/8.0),
+    REAL_CONST(144879.38480587213/8.0),
+    REAL_CONST(144905.39838632516/8.0),
+    REAL_CONST(144931.41313432742/8.0),
+    REAL_CONST(144957.4290497741/8.0),
+    REAL_CONST(144983.44613256046/8.0),
+    REAL_CONST(145009.46438258173/8.0),
+    REAL_CONST(145035.48379973322/8.0),
+    REAL_CONST(145061.50438391021/8.0),
+    REAL_CONST(145087.52613500805/8.0),
+    REAL_CONST(145113.54905292206/8.0),
+    REAL_CONST(145139.57313754765/8.0),
+    REAL_CONST(145165.59838878017/8.0),
+    REAL_CONST(145191.62480651509/8.0),
+    REAL_CONST(145217.65239064783/8.0),
+    REAL_CONST(145243.68114107384/8.0),
+    REAL_CONST(145269.71105768863/8.0),
+    REAL_CONST(145295.74214038774/8.0),
+    REAL_CONST(145321.77438906668/8.0),
+    REAL_CONST(145347.80780362099/8.0),
+    REAL_CONST(145373.84238394629/8.0),
+    REAL_CONST(145399.87812993818/8.0),
+    REAL_CONST(145425.91504149229/8.0),
+    REAL_CONST(145451.95311850426/8.0),
+    REAL_CONST(145477.9923608698/8.0),
+    REAL_CONST(145504.03276848458/8.0),
+    REAL_CONST(145530.07434124436/8.0),
+    REAL_CONST(145556.11707904484/8.0),
+    REAL_CONST(145582.16098178181/8.0),
+    REAL_CONST(145608.20604935108/8.0),
+    REAL_CONST(145634.25228164849/8.0),
+    REAL_CONST(145660.29967856981/8.0),
+    REAL_CONST(145686.34824001096/8.0),
+    REAL_CONST(145712.39796586783/8.0),
+    REAL_CONST(145738.4488560363/8.0),
+    REAL_CONST(145764.50091041232/8.0),
+    REAL_CONST(145790.55412889185/8.0),
+    REAL_CONST(145816.60851137087/8.0),
+    REAL_CONST(145842.66405774537/8.0),
+    REAL_CONST(145868.72076791141/8.0),
+    REAL_CONST(145894.77864176501/8.0),
+    REAL_CONST(145920.83767920226/8.0),
+    REAL_CONST(145946.89788011924/8.0),
+    REAL_CONST(145972.95924441208/8.0),
+    REAL_CONST(145999.02177197693/8.0),
+    REAL_CONST(146025.08546270995/8.0),
+    REAL_CONST(146051.15031650732/8.0),
+    REAL_CONST(146077.21633326527/8.0),
+    REAL_CONST(146103.28351288004/8.0),
+    REAL_CONST(146129.35185524789/8.0),
+    REAL_CONST(146155.42136026506/8.0),
+    REAL_CONST(146181.49202782792/8.0),
+    REAL_CONST(146207.56385783272/8.0),
+    REAL_CONST(146233.63685017588/8.0),
+    REAL_CONST(146259.71100475377/8.0),
+    REAL_CONST(146285.78632146274/8.0),
+    REAL_CONST(146311.86280019928/8.0),
+    REAL_CONST(146337.94044085976/8.0),
+    REAL_CONST(146364.01924334071/8.0),
+    REAL_CONST(146390.09920753856/8.0),
+    REAL_CONST(146416.18033334985/8.0),
+    REAL_CONST(146442.26262067116/8.0),
+    REAL_CONST(146468.34606939898/8.0),
+    REAL_CONST(146494.43067942993/8.0),
+    REAL_CONST(146520.51645066062/8.0),
+    REAL_CONST(146546.60338298764/8.0),
+    REAL_CONST(146572.69147630769/8.0),
+    REAL_CONST(146598.78073051744/8.0),
+    REAL_CONST(146624.87114551352/8.0),
+    REAL_CONST(146650.96272119274/8.0),
+    REAL_CONST(146677.05545745179/8.0),
+    REAL_CONST(146703.14935418745/8.0),
+    REAL_CONST(146729.2444112965/8.0),
+    REAL_CONST(146755.34062867577/8.0),
+    REAL_CONST(146781.43800622207/8.0),
+    REAL_CONST(146807.53654383228/8.0),
+    REAL_CONST(146833.63624140329/8.0),
+    REAL_CONST(146859.73709883197/8.0),
+    REAL_CONST(146885.83911601527/8.0),
+    REAL_CONST(146911.94229285014/8.0),
+    REAL_CONST(146938.04662923355/8.0),
+    REAL_CONST(146964.15212506248/8.0),
+    REAL_CONST(146990.25878023397/8.0),
+    REAL_CONST(147016.36659464505/8.0),
+    REAL_CONST(147042.47556819281/8.0),
+    REAL_CONST(147068.58570077427/8.0),
+    REAL_CONST(147094.6969922866/8.0),
+    REAL_CONST(147120.80944262692/8.0),
+    REAL_CONST(147146.92305169237/8.0),
+    REAL_CONST(147173.03781938017/8.0),
+    REAL_CONST(147199.15374558745/8.0),
+    REAL_CONST(147225.27083021149/8.0),
+    REAL_CONST(147251.38907314953/8.0),
+    REAL_CONST(147277.50847429881/8.0),
+    REAL_CONST(147303.62903355664/8.0),
+    REAL_CONST(147329.75075082036/8.0),
+    REAL_CONST(147355.87362598727/8.0),
+    REAL_CONST(147381.99765895473/8.0),
+    REAL_CONST(147408.12284962015/8.0),
+    REAL_CONST(147434.24919788091/8.0),
+    REAL_CONST(147460.37670363448/8.0),
+    REAL_CONST(147486.50536677826/8.0),
+    REAL_CONST(147512.63518720976/8.0),
+    REAL_CONST(147538.76616482646/8.0),
+    REAL_CONST(147564.89829952587/8.0),
+    REAL_CONST(147591.03159120557/8.0),
+    REAL_CONST(147617.16603976308/8.0),
+    REAL_CONST(147643.30164509601/8.0),
+    REAL_CONST(147669.43840710199/8.0),
+    REAL_CONST(147695.57632567859/8.0),
+    REAL_CONST(147721.71540072354/8.0),
+    REAL_CONST(147747.85563213445/8.0),
+    REAL_CONST(147773.99701980909/8.0),
+    REAL_CONST(147800.13956364512/8.0),
+    REAL_CONST(147826.28326354033/8.0),
+    REAL_CONST(147852.42811939248/8.0),
+    REAL_CONST(147878.57413109933/8.0),
+    REAL_CONST(147904.72129855872/8.0),
+    REAL_CONST(147930.86962166851/8.0),
+    REAL_CONST(147957.01910032652/8.0),
+    REAL_CONST(147983.16973443062/8.0),
+    REAL_CONST(148009.32152387875/8.0),
+    REAL_CONST(148035.47446856883/8.0),
+    REAL_CONST(148061.62856839882/8.0),
+    REAL_CONST(148087.78382326665/8.0),
+    REAL_CONST(148113.94023307035/8.0),
+    REAL_CONST(148140.09779770792/8.0),
+    REAL_CONST(148166.25651707739/8.0),
+    REAL_CONST(148192.41639107687/8.0),
+    REAL_CONST(148218.57741960438/8.0),
+    REAL_CONST(148244.73960255808/8.0),
+    REAL_CONST(148270.90293983606/8.0),
+    REAL_CONST(148297.0674313365/8.0),
+    REAL_CONST(148323.23307695755/8.0),
+    REAL_CONST(148349.39987659742/8.0),
+    REAL_CONST(148375.56783015432/8.0),
+    REAL_CONST(148401.73693752653/8.0),
+    REAL_CONST(148427.90719861226/8.0),
+    REAL_CONST(148454.07861330983/8.0),
+    REAL_CONST(148480.25118151752/8.0),
+    REAL_CONST(148506.42490313368/8.0),
+    REAL_CONST(148532.59977805667/8.0),
+    REAL_CONST(148558.77580618486/8.0),
+    REAL_CONST(148584.95298741665/8.0),
+    REAL_CONST(148611.13132165043/8.0),
+    REAL_CONST(148637.31080878471/8.0),
+    REAL_CONST(148663.49144871789/8.0),
+    REAL_CONST(148689.6732413485/8.0),
+    REAL_CONST(148715.85618657502/8.0),
+    REAL_CONST(148742.040284296/8.0),
+    REAL_CONST(148768.22553440998/8.0),
+    REAL_CONST(148794.41193681557/8.0),
+    REAL_CONST(148820.59949141133/8.0),
+    REAL_CONST(148846.78819809589/8.0),
+    REAL_CONST(148872.97805676793/8.0),
+    REAL_CONST(148899.16906732606/8.0),
+    REAL_CONST(148925.36122966901/8.0),
+    REAL_CONST(148951.55454369547/8.0),
+    REAL_CONST(148977.74900930419/8.0),
+    REAL_CONST(149003.9446263939/8.0),
+    REAL_CONST(149030.1413948634/8.0),
+    REAL_CONST(149056.33931461151/8.0),
+    REAL_CONST(149082.53838553699/8.0),
+    REAL_CONST(149108.73860753875/8.0),
+    REAL_CONST(149134.9399805156/8.0),
+    REAL_CONST(149161.14250436646/8.0),
+    REAL_CONST(149187.34617899026/8.0),
+    REAL_CONST(149213.5510042859/8.0),
+    REAL_CONST(149239.75698015234/8.0),
+    REAL_CONST(149265.96410648854/8.0),
+    REAL_CONST(149292.17238319354/8.0),
+    REAL_CONST(149318.38181016635/8.0),
+    REAL_CONST(149344.59238730598/8.0),
+    REAL_CONST(149370.80411451156/8.0),
+    REAL_CONST(149397.01699168212/8.0),
+    REAL_CONST(149423.23101871679/8.0),
+    REAL_CONST(149449.44619551473/8.0),
+    REAL_CONST(149475.66252197503/8.0),
+    REAL_CONST(149501.87999799693/8.0),
+    REAL_CONST(149528.0986234796/8.0),
+    REAL_CONST(149554.31839832227/8.0),
+    REAL_CONST(149580.53932242419/8.0),
+    REAL_CONST(149606.76139568459/8.0),
+    REAL_CONST(149632.98461800278/8.0),
+    REAL_CONST(149659.20898927809/8.0),
+    REAL_CONST(149685.43450940982/8.0),
+    REAL_CONST(149711.66117829733/8.0),
+    REAL_CONST(149737.88899584001/8.0),
+    REAL_CONST(149764.11796193724/8.0),
+    REAL_CONST(149790.34807648844/8.0),
+    REAL_CONST(149816.57933939309/8.0),
+    REAL_CONST(149842.81175055061/8.0),
+    REAL_CONST(149869.04530986046/8.0),
+    REAL_CONST(149895.28001722222/8.0),
+    REAL_CONST(149921.51587253538/8.0),
+    REAL_CONST(149947.75287569952/8.0),
+    REAL_CONST(149973.99102661415/8.0),
+    REAL_CONST(150000.23032517891/8.0),
+    REAL_CONST(150026.47077129342/8.0),
+    REAL_CONST(150052.71236485732/8.0),
+    REAL_CONST(150078.95510577026/8.0),
+    REAL_CONST(150105.1989939319/8.0),
+    REAL_CONST(150131.444029242/8.0),
+    REAL_CONST(150157.69021160025/8.0),
+    REAL_CONST(150183.93754090639/8.0),
+    REAL_CONST(150210.18601706024/8.0),
+    REAL_CONST(150236.43563996154/8.0),
+    REAL_CONST(150262.68640951012/8.0),
+    REAL_CONST(150288.93832560582/8.0),
+    REAL_CONST(150315.19138814852/8.0),
+    REAL_CONST(150341.44559703805/8.0),
+    REAL_CONST(150367.70095217437/8.0),
+    REAL_CONST(150393.95745345735/8.0),
+    REAL_CONST(150420.21510078697/8.0),
+    REAL_CONST(150446.47389406321/8.0),
+    REAL_CONST(150472.73383318601/8.0),
+    REAL_CONST(150498.99491805542/8.0),
+    REAL_CONST(150525.25714857146/8.0),
+    REAL_CONST(150551.52052463419/8.0),
+    REAL_CONST(150577.78504614369/8.0),
+    REAL_CONST(150604.05071300003/8.0),
+    REAL_CONST(150630.31752510337/8.0),
+    REAL_CONST(150656.58548235384/8.0),
+    REAL_CONST(150682.85458465159/8.0),
+    REAL_CONST(150709.1248318968/8.0),
+    REAL_CONST(150735.39622398972/8.0),
+    REAL_CONST(150761.66876083051/8.0),
+    REAL_CONST(150787.9424423195/8.0),
+    REAL_CONST(150814.21726835691/8.0),
+    REAL_CONST(150840.49323884305/8.0),
+    REAL_CONST(150866.77035367821/8.0),
+    REAL_CONST(150893.04861276277/8.0),
+    REAL_CONST(150919.32801599705/8.0),
+    REAL_CONST(150945.60856328148/8.0),
+    REAL_CONST(150971.89025451642/8.0),
+    REAL_CONST(150998.17308960229/8.0),
+    REAL_CONST(151024.45706843957/8.0),
+    REAL_CONST(151050.74219092872/8.0),
+    REAL_CONST(151077.02845697021/8.0),
+    REAL_CONST(151103.31586646455/8.0),
+    REAL_CONST(151129.60441931229/8.0),
+    REAL_CONST(151155.894115414/8.0),
+    REAL_CONST(151182.1849546702/8.0),
+    REAL_CONST(151208.47693698155/8.0),
+    REAL_CONST(151234.77006224863/8.0),
+    REAL_CONST(151261.06433037209/8.0),
+    REAL_CONST(151287.35974125259/8.0),
+    REAL_CONST(151313.65629479082/8.0),
+    REAL_CONST(151339.95399088747/8.0),
+    REAL_CONST(151366.25282944329/8.0),
+    REAL_CONST(151392.55281035902/8.0),
+    REAL_CONST(151418.85393353543/8.0),
+    REAL_CONST(151445.1561988733/8.0),
+    REAL_CONST(151471.45960627345/8.0),
+    REAL_CONST(151497.76415563675/8.0),
+    REAL_CONST(151524.06984686397/8.0),
+    REAL_CONST(151550.37667985607/8.0),
+    REAL_CONST(151576.68465451393/8.0),
+    REAL_CONST(151602.99377073845/8.0),
+    REAL_CONST(151629.30402843058/8.0),
+    REAL_CONST(151655.61542749128/8.0),
+    REAL_CONST(151681.92796782157/8.0),
+    REAL_CONST(151708.24164932242/8.0),
+    REAL_CONST(151734.55647189484/8.0),
+    REAL_CONST(151760.87243543993/8.0),
+    REAL_CONST(151787.18953985872/8.0),
+    REAL_CONST(151813.50778505235/8.0),
+    REAL_CONST(151839.82717092187/8.0),
+    REAL_CONST(151866.14769736846/8.0),
+    REAL_CONST(151892.46936429327/8.0),
+    REAL_CONST(151918.79217159748/8.0),
+    REAL_CONST(151945.11611918229/8.0),
+    REAL_CONST(151971.44120694889/8.0),
+    REAL_CONST(151997.76743479856/8.0),
+    REAL_CONST(152024.09480263255/8.0),
+    REAL_CONST(152050.42331035214/8.0),
+    REAL_CONST(152076.75295785864/8.0),
+    REAL_CONST(152103.08374505339/8.0),
+    REAL_CONST(152129.41567183775/8.0),
+    REAL_CONST(152155.74873811303/8.0),
+    REAL_CONST(152182.08294378067/8.0),
+    REAL_CONST(152208.41828874208/8.0),
+    REAL_CONST(152234.75477289871/8.0),
+    REAL_CONST(152261.09239615197/8.0),
+    REAL_CONST(152287.43115840337/8.0),
+    REAL_CONST(152313.77105955439/8.0),
+    REAL_CONST(152340.11209950657/8.0),
+    REAL_CONST(152366.45427816146/8.0),
+    REAL_CONST(152392.79759542056/8.0),
+    REAL_CONST(152419.14205118554/8.0),
+    REAL_CONST(152445.48764535793/8.0),
+    REAL_CONST(152471.8343778394/8.0),
+    REAL_CONST(152498.18224853161/8.0),
+    REAL_CONST(152524.53125733617/8.0),
+    REAL_CONST(152550.88140415482/8.0),
+    REAL_CONST(152577.23268888926/8.0),
+    REAL_CONST(152603.58511144121/8.0),
+    REAL_CONST(152629.93867171241/8.0),
+    REAL_CONST(152656.29336960468/8.0),
+    REAL_CONST(152682.64920501978/8.0),
+    REAL_CONST(152709.00617785956/8.0),
+    REAL_CONST(152735.36428802583/8.0),
+    REAL_CONST(152761.72353542043/8.0),
+    REAL_CONST(152788.08391994529/8.0),
+    REAL_CONST(152814.44544150229/8.0),
+    REAL_CONST(152840.80809999333/8.0),
+    REAL_CONST(152867.17189532038/8.0),
+    REAL_CONST(152893.53682738543/8.0),
+    REAL_CONST(152919.90289609041/8.0),
+    REAL_CONST(152946.27010133737/8.0),
+    REAL_CONST(152972.63844302832/8.0),
+    REAL_CONST(152999.00792106529/8.0),
+    REAL_CONST(153025.37853535041/8.0),
+    REAL_CONST(153051.7502857857/8.0),
+    REAL_CONST(153078.12317227334/8.0),
+    REAL_CONST(153104.4971947154/8.0),
+    REAL_CONST(153130.8723530141/8.0),
+    REAL_CONST(153157.24864707157/8.0),
+    REAL_CONST(153183.62607679001/8.0),
+    REAL_CONST(153210.00464207167/8.0),
+    REAL_CONST(153236.38434281875/8.0),
+    REAL_CONST(153262.76517893354/8.0),
+    REAL_CONST(153289.14715031831/8.0),
+    REAL_CONST(153315.53025687535/8.0),
+    REAL_CONST(153341.91449850702/8.0),
+    REAL_CONST(153368.2998751156/8.0),
+    REAL_CONST(153394.68638660354/8.0),
+    REAL_CONST(153421.07403287315/8.0),
+    REAL_CONST(153447.46281382689/8.0),
+    REAL_CONST(153473.85272936718/8.0),
+    REAL_CONST(153500.24377939643/8.0),
+    REAL_CONST(153526.63596381716/8.0),
+    REAL_CONST(153553.02928253182/8.0),
+    REAL_CONST(153579.42373544298/8.0),
+    REAL_CONST(153605.81932245308/8.0),
+    REAL_CONST(153632.21604346478/8.0),
+    REAL_CONST(153658.61389838057/8.0),
+    REAL_CONST(153685.0128871031/8.0),
+    REAL_CONST(153711.41300953497/8.0),
+    REAL_CONST(153737.81426557881/8.0),
+    REAL_CONST(153764.21665513728/8.0),
+    REAL_CONST(153790.62017811305/8.0),
+    REAL_CONST(153817.02483440886/8.0),
+    REAL_CONST(153843.43062392739/8.0),
+    REAL_CONST(153869.83754657139/8.0),
+    REAL_CONST(153896.24560224367/8.0),
+    REAL_CONST(153922.65479084692/8.0),
+    REAL_CONST(153949.06511228404/8.0),
+    REAL_CONST(153975.4765664578/8.0),
+    REAL_CONST(154001.88915327107/8.0),
+    REAL_CONST(154028.30287262669/8.0),
+    REAL_CONST(154054.71772442761/8.0),
+    REAL_CONST(154081.13370857667/8.0),
+    REAL_CONST(154107.55082497682/8.0),
+    REAL_CONST(154133.96907353101/8.0),
+    REAL_CONST(154160.38845414223/8.0),
+    REAL_CONST(154186.80896671346/8.0),
+    REAL_CONST(154213.23061114774/8.0),
+    REAL_CONST(154239.65338734805/8.0),
+    REAL_CONST(154266.07729521746/8.0),
+    REAL_CONST(154292.50233465908/8.0),
+    REAL_CONST(154318.92850557598/8.0),
+    REAL_CONST(154345.35580787127/8.0),
+    REAL_CONST(154371.7842414481/8.0),
+    REAL_CONST(154398.21380620965/8.0),
+    REAL_CONST(154424.64450205903/8.0),
+    REAL_CONST(154451.07632889951/8.0),
+    REAL_CONST(154477.50928663427/8.0),
+    REAL_CONST(154503.94337516659/8.0),
+    REAL_CONST(154530.37859439969/8.0),
+    REAL_CONST(154556.81494423689/8.0),
+    REAL_CONST(154583.25242458144/8.0),
+    REAL_CONST(154609.69103533673/8.0),
+    REAL_CONST(154636.13077640603/8.0),
+    REAL_CONST(154662.57164769279/8.0),
+    REAL_CONST(154689.01364910032/8.0),
+    REAL_CONST(154715.45678053208/8.0),
+    REAL_CONST(154741.90104189145/8.0),
+    REAL_CONST(154768.34643308193/8.0),
+    REAL_CONST(154794.79295400696/8.0),
+    REAL_CONST(154821.24060457002/8.0),
+    REAL_CONST(154847.68938467462/8.0),
+    REAL_CONST(154874.13929422433/8.0),
+    REAL_CONST(154900.59033312264/8.0),
+    REAL_CONST(154927.04250127316/8.0),
+    REAL_CONST(154953.49579857948/8.0),
+    REAL_CONST(154979.95022494521/8.0),
+    REAL_CONST(155006.40578027396/8.0),
+    REAL_CONST(155032.86246446942/8.0),
+    REAL_CONST(155059.32027743524/8.0),
+    REAL_CONST(155085.77921907514/8.0),
+    REAL_CONST(155112.2392892928/8.0),
+    REAL_CONST(155138.70048799197/8.0),
+    REAL_CONST(155165.16281507642/8.0),
+    REAL_CONST(155191.62627044989/8.0),
+    REAL_CONST(155218.09085401625/8.0),
+    REAL_CONST(155244.55656567923/8.0),
+    REAL_CONST(155271.02340534274/8.0),
+    REAL_CONST(155297.49137291059/8.0),
+    REAL_CONST(155323.96046828668/8.0),
+    REAL_CONST(155350.4306913749/8.0),
+    REAL_CONST(155376.90204207919/8.0),
+    REAL_CONST(155403.37452030348/8.0),
+    REAL_CONST(155429.84812595171/8.0),
+    REAL_CONST(155456.32285892789/8.0),
+    REAL_CONST(155482.79871913602/8.0),
+    REAL_CONST(155509.27570648011/8.0),
+    REAL_CONST(155535.75382086422/8.0),
+    REAL_CONST(155562.23306219239/8.0),
+    REAL_CONST(155588.71343036872/8.0),
+    REAL_CONST(155615.19492529731/8.0),
+    REAL_CONST(155641.67754688227/8.0),
+    REAL_CONST(155668.16129502779/8.0),
+    REAL_CONST(155694.64616963797/8.0),
+    REAL_CONST(155721.13217061706/8.0),
+    REAL_CONST(155747.61929786921/8.0),
+    REAL_CONST(155774.10755129869/8.0),
+    REAL_CONST(155800.59693080973/8.0),
+    REAL_CONST(155827.08743630661/8.0),
+    REAL_CONST(155853.57906769359/8.0),
+    REAL_CONST(155880.07182487496/8.0),
+    REAL_CONST(155906.56570775513/8.0),
+    REAL_CONST(155933.06071623837/8.0),
+    REAL_CONST(155959.55685022907/8.0),
+    REAL_CONST(155986.05410963166/8.0),
+    REAL_CONST(156012.5524943505/8.0),
+    REAL_CONST(156039.05200429002/8.0),
+    REAL_CONST(156065.55263935472/8.0),
+    REAL_CONST(156092.054399449/8.0),
+    REAL_CONST(156118.5572844774/8.0),
+    REAL_CONST(156145.06129434443/8.0),
+    REAL_CONST(156171.5664289546/8.0),
+    REAL_CONST(156198.07268821247/8.0),
+    REAL_CONST(156224.5800720226/8.0),
+    REAL_CONST(156251.08858028959/8.0),
+    REAL_CONST(156277.59821291809/8.0),
+    REAL_CONST(156304.10896981266/8.0),
+    REAL_CONST(156330.62085087801/8.0),
+    REAL_CONST(156357.1338560188/8.0),
+    REAL_CONST(156383.64798513969/8.0),
+    REAL_CONST(156410.16323814544/8.0),
+    REAL_CONST(156436.67961494075/8.0),
+    REAL_CONST(156463.1971154304/8.0),
+    REAL_CONST(156489.71573951913/8.0),
+    REAL_CONST(156516.23548711176/8.0),
+    REAL_CONST(156542.75635811311/8.0),
+    REAL_CONST(156569.27835242799/8.0),
+    REAL_CONST(156595.80146996127/8.0),
+    REAL_CONST(156622.32571061782/8.0),
+    REAL_CONST(156648.85107430254/8.0),
+    REAL_CONST(156675.37756092031/8.0),
+    REAL_CONST(156701.90517037612/8.0),
+    REAL_CONST(156728.43390257491/8.0),
+    REAL_CONST(156754.96375742162/8.0),
+    REAL_CONST(156781.49473482129/8.0),
+    REAL_CONST(156808.02683467892/8.0),
+    REAL_CONST(156834.5600568995/8.0),
+    REAL_CONST(156861.09440138817/8.0),
+    REAL_CONST(156887.62986804993/8.0),
+    REAL_CONST(156914.16645678994/8.0),
+    REAL_CONST(156940.70416751326/8.0),
+    REAL_CONST(156967.24300012505/8.0),
+    REAL_CONST(156993.78295453047/8.0),
+    REAL_CONST(157020.32403063469/8.0),
+    REAL_CONST(157046.8662283429/8.0),
+    REAL_CONST(157073.40954756032/8.0),
+    REAL_CONST(157099.9539881922/8.0),
+    REAL_CONST(157126.49955014378/8.0),
+    REAL_CONST(157153.04623332032/8.0),
+    REAL_CONST(157179.59403762716/8.0),
+    REAL_CONST(157206.14296296958/8.0),
+    REAL_CONST(157232.69300925292/8.0),
+    REAL_CONST(157259.24417638258/8.0),
+    REAL_CONST(157285.79646426387/8.0),
+    REAL_CONST(157312.34987280221/8.0),
+    REAL_CONST(157338.90440190304/8.0),
+    REAL_CONST(157365.46005147175/8.0),
+    REAL_CONST(157392.01682141385/8.0),
+    REAL_CONST(157418.57471163478/8.0),
+    REAL_CONST(157445.13372204005/8.0),
+    REAL_CONST(157471.69385253513/8.0),
+    REAL_CONST(157498.25510302564/8.0),
+    REAL_CONST(157524.81747341706/8.0),
+    REAL_CONST(157551.38096361503/8.0),
+    REAL_CONST(157577.9455735251/8.0),
+    REAL_CONST(157604.51130305286/8.0),
+    REAL_CONST(157631.07815210402/8.0),
+    REAL_CONST(157657.64612058419/8.0),
+    REAL_CONST(157684.21520839902/8.0),
+    REAL_CONST(157710.78541545427/8.0),
+    REAL_CONST(157737.35674165559/8.0),
+    REAL_CONST(157763.92918690876/8.0),
+    REAL_CONST(157790.50275111952/8.0),
+    REAL_CONST(157817.07743419363/8.0),
+    REAL_CONST(157843.65323603692/8.0),
+    REAL_CONST(157870.23015655516/8.0),
+    REAL_CONST(157896.80819565422/8.0),
+    REAL_CONST(157923.3873532399/8.0),
+    REAL_CONST(157949.96762921812/8.0),
+    REAL_CONST(157976.54902349479/8.0),
+    REAL_CONST(158003.13153597576/8.0),
+    REAL_CONST(158029.71516656701/8.0),
+    REAL_CONST(158056.29991517449/8.0),
+    REAL_CONST(158082.88578170416/8.0),
+    REAL_CONST(158109.47276606198/8.0),
+    REAL_CONST(158136.06086815402/8.0),
+    REAL_CONST(158162.65008788629/8.0),
+    REAL_CONST(158189.24042516484/8.0),
+    REAL_CONST(158215.83187989573/8.0),
+    REAL_CONST(158242.42445198505/8.0),
+    REAL_CONST(158269.01814133892/8.0),
+    REAL_CONST(158295.61294786347/8.0),
+    REAL_CONST(158322.20887146486/8.0),
+    REAL_CONST(158348.80591204923/8.0),
+    REAL_CONST(158375.4040695228/8.0),
+    REAL_CONST(158402.00334379176/8.0),
+    REAL_CONST(158428.60373476235/8.0),
+    REAL_CONST(158455.2052423408/8.0),
+    REAL_CONST(158481.80786643337/8.0),
+    REAL_CONST(158508.41160694641/8.0),
+    REAL_CONST(158535.01646378616/8.0),
+    REAL_CONST(158561.62243685898/8.0),
+    REAL_CONST(158588.2295260712/8.0),
+    REAL_CONST(158614.8377313292/8.0),
+    REAL_CONST(158641.44705253936/8.0),
+    REAL_CONST(158668.05748960807/8.0),
+    REAL_CONST(158694.66904244179/8.0),
+    REAL_CONST(158721.28171094693/8.0),
+    REAL_CONST(158747.89549502998/8.0),
+    REAL_CONST(158774.5103945974/8.0),
+    REAL_CONST(158801.12640955573/8.0),
+    REAL_CONST(158827.74353981143/8.0),
+    REAL_CONST(158854.36178527112/8.0),
+    REAL_CONST(158880.9811458413/8.0),
+    REAL_CONST(158907.60162142856/8.0),
+    REAL_CONST(158934.22321193956/8.0),
+    REAL_CONST(158960.84591728085/8.0),
+    REAL_CONST(158987.46973735912/8.0),
+    REAL_CONST(159014.09467208097/8.0),
+    REAL_CONST(159040.72072135314/8.0),
+    REAL_CONST(159067.3478850823/8.0),
+    REAL_CONST(159093.97616317519/8.0),
+    REAL_CONST(159120.60555553852/8.0),
+    REAL_CONST(159147.23606207906/8.0),
+    REAL_CONST(159173.8676827036/8.0),
+    REAL_CONST(159200.50041731889/8.0),
+    REAL_CONST(159227.13426583182/8.0),
+    REAL_CONST(159253.76922814918/8.0),
+    REAL_CONST(159280.40530417781/8.0),
+    REAL_CONST(159307.04249382461/8.0),
+    REAL_CONST(159333.68079699649/8.0),
+    REAL_CONST(159360.32021360032/8.0),
+    REAL_CONST(159386.96074354305/8.0),
+    REAL_CONST(159413.60238673165/8.0),
+    REAL_CONST(159440.24514307309/8.0),
+    REAL_CONST(159466.88901247433/8.0),
+    REAL_CONST(159493.53399484244/8.0),
+    REAL_CONST(159520.18009008438/8.0),
+    REAL_CONST(159546.82729810724/8.0),
+    REAL_CONST(159573.47561881805/8.0),
+    REAL_CONST(159600.12505212394/8.0),
+    REAL_CONST(159626.77559793202/8.0),
+    REAL_CONST(159653.42725614941/8.0),
+    REAL_CONST(159680.08002668325/8.0),
+    REAL_CONST(159706.73390944069/8.0),
+    REAL_CONST(159733.38890432892/8.0),
+    REAL_CONST(159760.04501125516/8.0),
+    REAL_CONST(159786.70223012666/8.0),
+    REAL_CONST(159813.36056085059/8.0),
+    REAL_CONST(159840.02000333427/8.0),
+    REAL_CONST(159866.68055748497/8.0),
+    REAL_CONST(159893.34222320997/8.0),
+    REAL_CONST(159920.00500041663/8.0),
+    REAL_CONST(159946.66888901225/8.0),
+    REAL_CONST(159973.33388890422/8.0),
+    REAL_CONST(159999.99999999988/8.0),
+    REAL_CONST(160026.66722220668/8.0),
+    REAL_CONST(160053.33555543202/8.0),
+    REAL_CONST(160080.0049995833/8.0),
+    REAL_CONST(160106.67555456801/8.0),
+    REAL_CONST(160133.3472202936/8.0),
+    REAL_CONST(160160.0199966676/8.0),
+    REAL_CONST(160186.6938835975/8.0),
+    REAL_CONST(160213.36888099083/8.0),
+    REAL_CONST(160240.04498875517/8.0),
+    REAL_CONST(160266.72220679806/8.0),
+    REAL_CONST(160293.40053502709/8.0),
+    REAL_CONST(160320.07997334987/8.0),
+    REAL_CONST(160346.76052167406/8.0),
+    REAL_CONST(160373.44217990729/8.0),
+    REAL_CONST(160400.1249479572/8.0),
+    REAL_CONST(160426.80882573154/8.0),
+    REAL_CONST(160453.49381313793/8.0),
+    REAL_CONST(160480.17991008417/8.0),
+    REAL_CONST(160506.86711647795/8.0),
+    REAL_CONST(160533.55543222709/8.0),
+    REAL_CONST(160560.24485723933/8.0),
+    REAL_CONST(160586.93539142248/8.0),
+    REAL_CONST(160613.62703468435/8.0),
+    REAL_CONST(160640.31978693281/8.0),
+    REAL_CONST(160667.01364807569/8.0),
+    REAL_CONST(160693.70861802087/8.0),
+    REAL_CONST(160720.40469667627/8.0),
+    REAL_CONST(160747.1018839498/8.0),
+    REAL_CONST(160773.80017974938/8.0),
+    REAL_CONST(160800.49958398298/8.0),
+    REAL_CONST(160827.20009655855/8.0),
+    REAL_CONST(160853.90171738411/8.0),
+    REAL_CONST(160880.60444636765/8.0),
+    REAL_CONST(160907.30828341722/8.0),
+    REAL_CONST(160934.01322844089/8.0),
+    REAL_CONST(160960.71928134665/8.0),
+    REAL_CONST(160987.42644204266/8.0),
+    REAL_CONST(161014.13471043704/8.0),
+    REAL_CONST(161040.84408643784/8.0),
+    REAL_CONST(161067.55456995327/8.0),
+    REAL_CONST(161094.26616089148/8.0),
+    REAL_CONST(161120.97885916062/8.0),
+    REAL_CONST(161147.69266466892/8.0),
+    REAL_CONST(161174.40757732463/8.0),
+    REAL_CONST(161201.12359703594/8.0),
+    REAL_CONST(161227.84072371112/8.0),
+    REAL_CONST(161254.55895725847/8.0),
+    REAL_CONST(161281.27829758628/8.0),
+    REAL_CONST(161307.99874460287/8.0),
+    REAL_CONST(161334.72029821656/8.0),
+    REAL_CONST(161361.44295833571/8.0),
+    REAL_CONST(161388.1667248687/8.0),
+    REAL_CONST(161414.89159772391/8.0),
+    REAL_CONST(161441.61757680977/8.0),
+    REAL_CONST(161468.34466203468/8.0),
+    REAL_CONST(161495.07285330712/8.0),
+    REAL_CONST(161521.80215053557/8.0),
+    REAL_CONST(161548.53255362847/8.0),
+    REAL_CONST(161575.26406249436/8.0),
+    REAL_CONST(161601.99667704175/8.0),
+    REAL_CONST(161628.7303971792/8.0),
+    REAL_CONST(161655.46522281526/8.0),
+    REAL_CONST(161682.20115385848/8.0),
+    REAL_CONST(161708.93819021754/8.0),
+    REAL_CONST(161735.67633180099/8.0),
+    REAL_CONST(161762.41557851751/8.0),
+    REAL_CONST(161789.15593027571/8.0),
+    REAL_CONST(161815.89738698432/8.0),
+    REAL_CONST(161842.63994855201/8.0),
+    REAL_CONST(161869.38361488748/8.0),
+    REAL_CONST(161896.1283858995/8.0),
+    REAL_CONST(161922.87426149679/8.0),
+    REAL_CONST(161949.62124158812/8.0),
+    REAL_CONST(161976.36932608229/8.0),
+    REAL_CONST(162003.1185148881/8.0),
+    REAL_CONST(162029.8688079144/8.0),
+    REAL_CONST(162056.62020507001/8.0),
+    REAL_CONST(162083.37270626382/8.0),
+    REAL_CONST(162110.12631140469/8.0),
+    REAL_CONST(162136.88102040152/8.0),
+    REAL_CONST(162163.63683316324/8.0),
+    REAL_CONST(162190.39374959879/8.0),
+    REAL_CONST(162217.15176961714/8.0),
+    REAL_CONST(162243.91089312723/8.0),
+    REAL_CONST(162270.67112003808/8.0),
+    REAL_CONST(162297.43245025873/8.0),
+    REAL_CONST(162324.19488369819/8.0),
+    REAL_CONST(162350.9584202655/8.0),
+    REAL_CONST(162377.72305986975/8.0),
+    REAL_CONST(162404.48880242003/8.0),
+    REAL_CONST(162431.25564782543/8.0),
+    REAL_CONST(162458.02359599507/8.0),
+    REAL_CONST(162484.79264683815/8.0),
+    REAL_CONST(162511.56280026378/8.0),
+    REAL_CONST(162538.33405618116/8.0),
+    REAL_CONST(162565.10641449949/8.0),
+    REAL_CONST(162591.87987512801/8.0),
+    REAL_CONST(162618.65443797593/8.0),
+    REAL_CONST(162645.43010295252/8.0),
+    REAL_CONST(162672.20686996708/8.0),
+    REAL_CONST(162698.98473892888/8.0),
+    REAL_CONST(162725.76370974723/8.0),
+    REAL_CONST(162752.54378233149/8.0),
+    REAL_CONST(162779.32495659095/8.0),
+    REAL_CONST(162806.10723243505/8.0),
+    REAL_CONST(162832.89060977317/8.0),
+    REAL_CONST(162859.67508851466/8.0),
+    REAL_CONST(162886.46066856899/8.0),
+    REAL_CONST(162913.24734984562/8.0),
+    REAL_CONST(162940.03513225398/8.0),
+    REAL_CONST(162966.82401570358/8.0),
+    REAL_CONST(162993.6140001039/8.0),
+    REAL_CONST(163020.40508536444/8.0),
+    REAL_CONST(163047.19727139481/8.0),
+    REAL_CONST(163073.99055810447/8.0),
+    REAL_CONST(163100.78494540305/8.0),
+    REAL_CONST(163127.58043320014/8.0),
+    REAL_CONST(163154.37702140535/8.0),
+    REAL_CONST(163181.17470992831/8.0),
+    REAL_CONST(163207.97349867865/8.0),
+    REAL_CONST(163234.77338756606/8.0),
+    REAL_CONST(163261.57437650024/8.0),
+    REAL_CONST(163288.37646539087/8.0),
+    REAL_CONST(163315.17965414765/8.0),
+    REAL_CONST(163341.98394268038/8.0),
+    REAL_CONST(163368.78933089875/8.0),
+    REAL_CONST(163395.59581871261/8.0),
+    REAL_CONST(163422.40340603172/8.0),
+    REAL_CONST(163449.2120927659/8.0),
+    REAL_CONST(163476.02187882498/8.0),
+    REAL_CONST(163502.83276411882/8.0),
+    REAL_CONST(163529.6447485573/8.0),
+    REAL_CONST(163556.45783205028/8.0),
+    REAL_CONST(163583.2720145077/8.0),
+    REAL_CONST(163610.08729583945/8.0),
+    REAL_CONST(163636.90367595552/8.0),
+    REAL_CONST(163663.72115476584/8.0),
+    REAL_CONST(163690.53973218042/8.0),
+    REAL_CONST(163717.35940810922/8.0),
+    REAL_CONST(163744.18018246227/8.0),
+    REAL_CONST(163771.00205514964/8.0),
+    REAL_CONST(163797.82502608138/8.0),
+    REAL_CONST(163824.64909516752/8.0),
+    REAL_CONST(163851.4742623182/8.0),
+    REAL_CONST(163878.3005274435/8.0),
+    REAL_CONST(163905.12789045356/8.0),
+    REAL_CONST(163931.95635125853/8.0),
+    REAL_CONST(163958.78590976857/8.0),
+    REAL_CONST(163985.61656589387/8.0),
+    REAL_CONST(164012.44831954464/8.0),
+    REAL_CONST(164039.28117063109/8.0),
+    REAL_CONST(164066.11511906344/8.0),
+    REAL_CONST(164092.95016475199/8.0),
+    REAL_CONST(164119.78630760699/8.0),
+    REAL_CONST(164146.62354753874/8.0),
+    REAL_CONST(164173.46188445756/8.0),
+    REAL_CONST(164200.30131827376/8.0),
+    REAL_CONST(164227.14184889771/8.0),
+    REAL_CONST(164253.98347623978/8.0),
+    REAL_CONST(164280.82620021031/8.0),
+    REAL_CONST(164307.67002071979/8.0),
+    REAL_CONST(164334.51493767856/8.0),
+    REAL_CONST(164361.3609509971/8.0),
+    REAL_CONST(164388.20806058586/8.0),
+    REAL_CONST(164415.05626635533/8.0),
+    REAL_CONST(164441.905568216/8.0),
+    REAL_CONST(164468.75596607837/8.0),
+    REAL_CONST(164495.607459853/8.0),
+    REAL_CONST(164522.4600494504/8.0),
+    REAL_CONST(164549.31373478117/8.0),
+    REAL_CONST(164576.16851575591/8.0),
+    REAL_CONST(164603.02439228518/8.0),
+    REAL_CONST(164629.88136427966/8.0),
+    REAL_CONST(164656.73943164994/8.0),
+    REAL_CONST(164683.59859430668/8.0),
+    REAL_CONST(164710.45885216061/8.0),
+    REAL_CONST(164737.32020512238/8.0),
+    REAL_CONST(164764.1826531027/8.0),
+    REAL_CONST(164791.04619601235/8.0),
+    REAL_CONST(164817.91083376206/8.0),
+    REAL_CONST(164844.77656626256/8.0),
+    REAL_CONST(164871.64339342469/8.0),
+    REAL_CONST(164898.51131515924/8.0),
+    REAL_CONST(164925.38033137703/8.0),
+    REAL_CONST(164952.25044198887/8.0),
+    REAL_CONST(164979.1216469057/8.0),
+    REAL_CONST(165005.9939460383/8.0),
+    REAL_CONST(165032.86733929763/8.0),
+    REAL_CONST(165059.7418265946/8.0),
+    REAL_CONST(165086.61740784015/8.0),
+    REAL_CONST(165113.4940829452/8.0)
+#endif
 };
 
 #endif
--- a/libfaad2/is.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/is.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: is.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: is.c,v 1.4 2004/06/23 13:50:50 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -68,12 +68,14 @@
             {
                 if (is_intensity(icsr, g, sfb))
                 {
+#ifdef MAIN_DEC
                     /* For scalefactor bands coded in intensity stereo the
                        corresponding predictors in the right channel are
                        switched to "off".
                      */
                     ics->pred.prediction_used[sfb] = 0;
                     icsr->pred.prediction_used[sfb] = 0;
+#endif
 
 #ifndef FIXED_POINT
                     scale = (real_t)pow(0.5, (0.25*icsr->scale_factors[g][sfb]));
--- a/libfaad2/mdct.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/mdct.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: mdct.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: mdct.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -55,139 +55,40 @@
 
 #include "cfft.h"
 #include "mdct.h"
+#include "mdct_tab.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] =
-{
-    {    /* 2048 */
-        COEF_CONST(1),
-        FRAC_CONST(0.99999529380957619),
-        FRAC_CONST(0.0030679567629659761),
-        FRAC_CONST(0.99999992646571789),
-        FRAC_CONST(0.00038349518757139556)
-    }, { /* 1920 */
-        COEF_CONST(/* sqrt(1024/960) */ 1.0327955589886444),
-        FRAC_CONST(0.99999464540169647),
-        FRAC_CONST(0.0032724865065266251),
-        FRAC_CONST(0.99999991633432805),
-        FRAC_CONST(0.00040906153202803459)
-    }, { /* 1024 */
-        COEF_CONST(1),
-        FRAC_CONST(0.99998117528260111),
-        FRAC_CONST(0.0061358846491544753),
-        FRAC_CONST(0.99999970586288223),
-        FRAC_CONST(0.00076699031874270449)
-    }, { /* 960 */
-        COEF_CONST(/* sqrt(512/480) */ 1.0327955589886444),
-        FRAC_CONST(0.99997858166412923),
-        FRAC_CONST(0.0065449379673518581),
-        FRAC_CONST(0.99999966533732598),
-        FRAC_CONST(0.00081812299560725323)
-    }, { /* 256 */
-        COEF_CONST(1),
-        FRAC_CONST(0.99969881869620425),
-        FRAC_CONST(0.024541228522912288),
-        FRAC_CONST(0.99999529380957619),
-        FRAC_CONST(0.0030679567629659761)
-    }, {  /* 240 */
-        COEF_CONST(/* sqrt(256/240) */ 1.0327955589886444),
-        FRAC_CONST(0.99965732497555726),
-        FRAC_CONST(0.026176948307873149),
-        FRAC_CONST(0.99999464540169647),
-        FRAC_CONST(0.0032724865065266251)
-    }
-#ifdef SSR_DEC
-    ,{   /* 512 */
-        COEF_CONST(1),
-        FRAC_CONST(0.9999247018391445),
-        FRAC_CONST(0.012271538285719925),
-        FRAC_CONST(0.99999882345170188),
-        FRAC_CONST(0.0015339801862847655)
-    }, { /* 64 */
-        COEF_CONST(1),
-        FRAC_CONST(0.99518472667219693),
-        FRAC_CONST(0.098017140329560604),
-        FRAC_CONST(0.9999247018391445),
-        FRAC_CONST(0.012271538285719925)
-    }
-#endif
-};
-#endif
-
-#ifdef FIXED_POINT
-static uint8_t map_N_to_idx(uint16_t N)
-{
-    /* gives an index into const_tab above */
-    /* for normal AAC deocding (eg. no scalable profile) only */
-    /* index 0 and 4 will be used */
-    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;
-#ifdef SSR_DEC
-    case 512:  return 6;
-    case 64:   return 7;
-#endif
-    }
-    return 0;
-}
-#endif
 
 mdct_info *faad_mdct_init(uint16_t N)
 {
-    uint16_t k;
-#ifdef FIXED_POINT
-    uint16_t N_idx;
-    real_t cangle, sangle, c, s, cold;
-#endif
-	real_t scale;
-
     mdct_info *mdct = (mdct_info*)faad_malloc(sizeof(mdct_info));
 
     assert(N % 8 == 0);
 
     mdct->N = N;
-    mdct->sincos = (complex_t*)faad_malloc(N/4*sizeof(complex_t));
 
-#ifdef FIXED_POINT
-    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];
-#else
-    scale = (real_t)sqrt(2.0 / (real_t)N);
-#endif
+    /* NOTE: For "small framelengths" in FIXED_POINT the coefficients need to be
+     * scaled by sqrt("(nearest power of 2) > N" / N) */
 
-    /* (co)sine table build using recurrence relations */
-    /* this can also be done using static table lookup or */
-    /* some form of interpolation */
-    for (k = 0; k < N/4; k++)
+    /* RE(mdct->sincos[k]) = scale*(real_t)(cos(2.0*M_PI*(k+1./8.) / (real_t)N));
+     * IM(mdct->sincos[k]) = scale*(real_t)(sin(2.0*M_PI*(k+1./8.) / (real_t)N)); */
+    /* scale is 1 for fixed point, sqrt(N) for floating point */
+    switch (N)
     {
-#ifdef FIXED_POINT
-        RE(mdct->sincos[k]) = c; //MUL_C_C(c,scale);
-        IM(mdct->sincos[k]) = s; //MUL_C_C(s,scale);
-
-        cold = c;
-        c = MUL_F(c,cangle) - MUL_F(s,sangle);
-        s = MUL_F(s,cangle) + MUL_F(cold,sangle);
-#else
-        /* no recurrence, just sines */
-        RE(mdct->sincos[k]) = scale*(real_t)(cos(2.0*M_PI*(k+1./8.) / (real_t)N));
-        IM(mdct->sincos[k]) = scale*(real_t)(sin(2.0*M_PI*(k+1./8.) / (real_t)N));
+    case 2048: mdct->sincos = (complex_t*)mdct_tab_2048; break;
+    case 256:  mdct->sincos = (complex_t*)mdct_tab_256;  break;
+#ifdef LD_DEC
+    case 1024: mdct->sincos = (complex_t*)mdct_tab_1024; break;
+#endif
+#ifdef ALLOW_SMALL_FRAMELENGTH
+    case 1920: mdct->sincos = (complex_t*)mdct_tab_1920; break;
+    case 240:  mdct->sincos = (complex_t*)mdct_tab_240;  break;
+#ifdef LD_DEC
+    case 960:  mdct->sincos = (complex_t*)mdct_tab_960;  break;
+#endif
+#endif
+#ifdef SSR_DEC
+    case 512:  mdct->sincos = (complex_t*)mdct_tab_512;  break;
+    case 64:   mdct->sincos = (complex_t*)mdct_tab_64;   break;
 #endif
     }
 
@@ -213,8 +114,6 @@
 
         cfftu(mdct->cfft);
 
-        if (mdct->sincos) faad_free(mdct->sincos);
-
         faad_free(mdct);
     }
 }
@@ -224,6 +123,11 @@
     uint16_t k;
 
     complex_t x;
+#ifdef ALLOW_SMALL_FRAMELENGTH
+#ifdef FIXED_POINT
+    real_t scale, b_scale = 0;
+#endif
+#endif
     ALIGN complex_t Z1[512];
     complex_t *sincos = mdct->sincos;
 
@@ -236,6 +140,19 @@
     int64_t count1, count2 = faad_get_ts();
 #endif
 
+#ifdef ALLOW_SMALL_FRAMELENGTH
+#ifdef FIXED_POINT
+    /* detect non-power of 2 */
+    if (N & (N-1))
+    {
+        /* adjust scale for non-power of 2 MDCT */
+        /* 2048/1920 */
+        b_scale = 1;
+        scale = COEF_CONST(1.0666666666666667);
+    }
+#endif
+#endif
+
     /* pre-IFFT complex multiplication */
     for (k = 0; k < N4; k++)
     {
@@ -261,6 +178,17 @@
         IM(x) = IM(Z1[k]);
         ComplexMult(&IM(Z1[k]), &RE(Z1[k]),
             IM(x), RE(x), RE(sincos[k]), IM(sincos[k]));
+
+#ifdef ALLOW_SMALL_FRAMELENGTH
+#ifdef FIXED_POINT
+        /* non-power of 2 MDCT scaling */
+        if (b_scale)
+        {
+            RE(Z1[k]) = MUL_C(RE(Z1[k]), scale);
+            IM(Z1[k]) = MUL_C(IM(Z1[k]), scale);
+        }
+#endif
+#endif
     }
 
     /* reordering */
@@ -298,166 +226,6 @@
 #endif
 }
 
-#ifdef USE_SSE
-void faad_imdct_sse(mdct_info *mdct, real_t *X_in, real_t *X_out)
-{
-    uint16_t k;
-
-    ALIGN complex_t Z1[512];
-    complex_t *sincos = mdct->sincos;
-
-    uint16_t N  = mdct->N;
-    uint16_t N2 = N >> 1;
-    uint16_t N4 = N >> 2;
-    uint16_t N8 = N >> 3;
-
-#ifdef PROFILE
-    int64_t count1, count2 = faad_get_ts();
-#endif
-
-    /* pre-IFFT complex multiplication */
-    for (k = 0; k < N4; k+=4)
-    {
-        __m128 m12, m13, m14, m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11;
-        __m128 n12, n13, n14, n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11;
-        n12 = _mm_load_ps(&X_in[N2 - 2*k - 8]);
-        m12 = _mm_load_ps(&X_in[N2 - 2*k - 4]);
-        m13 = _mm_load_ps(&X_in[2*k]);
-        n13 = _mm_load_ps(&X_in[2*k + 4]);
-        m1 = _mm_load_ps(&RE(sincos[k]));
-        n1 = _mm_load_ps(&RE(sincos[k+2]));
-
-        m0 = _mm_shuffle_ps(m12, m13, _MM_SHUFFLE(2,0,1,3));
-        m2 = _mm_shuffle_ps(m1, m1, _MM_SHUFFLE(2,3,0,1));
-        m14 = _mm_shuffle_ps(m0, m0, _MM_SHUFFLE(3,1,2,0));
-        n0 = _mm_shuffle_ps(n12, n13, _MM_SHUFFLE(2,0,1,3));
-        n2 = _mm_shuffle_ps(n1, n1, _MM_SHUFFLE(2,3,0,1));
-        n14 = _mm_shuffle_ps(n0, n0, _MM_SHUFFLE(3,1,2,0));
-
-        m3 = _mm_mul_ps(m14, m1);
-        n3 = _mm_mul_ps(n14, n1);
-        m4 = _mm_mul_ps(m14, m2);
-        n4 = _mm_mul_ps(n14, n2);
-
-        m5 = _mm_shuffle_ps(m3, m4, _MM_SHUFFLE(2,0,2,0));
-        n5 = _mm_shuffle_ps(n3, n4, _MM_SHUFFLE(2,0,2,0));
-        m6 = _mm_shuffle_ps(m3, m4, _MM_SHUFFLE(3,1,3,1));
-        n6 = _mm_shuffle_ps(n3, n4, _MM_SHUFFLE(3,1,3,1));
-
-        m7 = _mm_add_ps(m5, m6);
-        n7 = _mm_add_ps(n5, n6);
-        m8 = _mm_sub_ps(m5, m6);
-        n8 = _mm_sub_ps(n5, n6);
-
-        m9 = _mm_shuffle_ps(m7, m7, _MM_SHUFFLE(3,2,3,2));
-        n9 = _mm_shuffle_ps(n7, n7, _MM_SHUFFLE(3,2,3,2));
-        m10 = _mm_shuffle_ps(m8, m8, _MM_SHUFFLE(1,0,1,0));
-        n10 = _mm_shuffle_ps(n8, n8, _MM_SHUFFLE(1,0,1,0));
-
-        m11 = _mm_unpacklo_ps(m10, m9);
-        n11 = _mm_unpacklo_ps(n10, n9);
-
-        _mm_store_ps(&RE(Z1[k]), m11);
-        _mm_store_ps(&RE(Z1[k+2]), n11);
-    }
-
-#ifdef PROFILE
-    count1 = faad_get_ts();
-#endif
-
-    /* complex IFFT, any non-scaling FFT can be used here */
-    cfftb_sse(mdct->cfft, Z1);
-
-#ifdef PROFILE
-    count1 = faad_get_ts() - count1;
-#endif
-
-    /* post-IFFT complex multiplication */
-    for (k = 0; k < N4; k+=4)
-    {
-        __m128 m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11;
-        __m128 n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11;
-        m0 = _mm_load_ps(&RE(Z1[k]));
-        n0 = _mm_load_ps(&RE(Z1[k+2]));
-        m1 = _mm_load_ps(&RE(sincos[k]));
-        n1 = _mm_load_ps(&RE(sincos[k+2]));
-
-        m2 = _mm_shuffle_ps(m1, m1, _MM_SHUFFLE(2,3,0,1));
-        n2 = _mm_shuffle_ps(n1, n1, _MM_SHUFFLE(2,3,0,1));
-
-        m3 = _mm_mul_ps(m0, m1);
-        n3 = _mm_mul_ps(n0, n1);
-        m4 = _mm_mul_ps(m0, m2);
-        n4 = _mm_mul_ps(n0, n2);
-
-        m5 = _mm_shuffle_ps(m3, m4, _MM_SHUFFLE(2,0,2,0));
-        n5 = _mm_shuffle_ps(n3, n4, _MM_SHUFFLE(2,0,2,0));
-        m6 = _mm_shuffle_ps(m3, m4, _MM_SHUFFLE(3,1,3,1));
-        n6 = _mm_shuffle_ps(n3, n4, _MM_SHUFFLE(3,1,3,1));
-
-        m7 = _mm_add_ps(m5, m6);
-        n7 = _mm_add_ps(n5, n6);
-        m8 = _mm_sub_ps(m5, m6);
-        n8 = _mm_sub_ps(n5, n6);
-
-        m9 = _mm_shuffle_ps(m7, m7, _MM_SHUFFLE(3,2,3,2));
-        n9 = _mm_shuffle_ps(n7, n7, _MM_SHUFFLE(3,2,3,2));
-        m10 = _mm_shuffle_ps(m8, m8, _MM_SHUFFLE(1,0,1,0));
-        n10 = _mm_shuffle_ps(n8, n8, _MM_SHUFFLE(1,0,1,0));
-
-        m11 = _mm_unpacklo_ps(m10, m9);
-        n11 = _mm_unpacklo_ps(n10, n9);
-
-        _mm_store_ps(&RE(Z1[k]), m11);
-        _mm_store_ps(&RE(Z1[k+2]), n11);
-    }
-
-    /* reordering */
-    for (k = 0; k < N8; k+=2)
-    {
-        __m128 m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m13;
-        __m128 n4, n5, n6, n7, n8, n9;
-        __m128 neg1 = _mm_set_ps(-1.0,  1.0, -1.0,  1.0);
-        __m128 neg2 = _mm_set_ps(-1.0, -1.0, -1.0, -1.0);
-
-        m0 = _mm_load_ps(&RE(Z1[k]));
-        m1 = _mm_load_ps(&RE(Z1[N8 - 2 - k]));
-        m2 = _mm_load_ps(&RE(Z1[N8 + k]));
-        m3 = _mm_load_ps(&RE(Z1[N4 - 2 - k]));
-
-        m10 = _mm_mul_ps(m0, neg1);
-        m11 = _mm_mul_ps(m1, neg2);
-        m13 = _mm_mul_ps(m3, neg1);
-
-        m5 = _mm_shuffle_ps(m2, m2, _MM_SHUFFLE(3,1,2,0));
-        n4 = _mm_shuffle_ps(m10, m10, _MM_SHUFFLE(3,1,2,0));
-        m4 = _mm_shuffle_ps(m11, m11, _MM_SHUFFLE(3,1,2,0));
-        n5 = _mm_shuffle_ps(m13, m13, _MM_SHUFFLE(3,1,2,0));
-
-        m6 = _mm_shuffle_ps(m4, m5, _MM_SHUFFLE(3,2,1,0));
-        n6 = _mm_shuffle_ps(n4, n5, _MM_SHUFFLE(3,2,1,0));
-        m7 = _mm_shuffle_ps(m5, m4, _MM_SHUFFLE(3,2,1,0));
-        n7 = _mm_shuffle_ps(n5, n4, _MM_SHUFFLE(3,2,1,0));
-
-        m8 = _mm_shuffle_ps(m6, m6, _MM_SHUFFLE(0,3,1,2));
-        n8 = _mm_shuffle_ps(n6, n6, _MM_SHUFFLE(2,1,3,0));
-        m9 = _mm_shuffle_ps(m7, m7, _MM_SHUFFLE(2,1,3,0));
-        n9 = _mm_shuffle_ps(n7, n7, _MM_SHUFFLE(0,3,1,2));
-
-        _mm_store_ps(&X_out[2*k], m8);
-        _mm_store_ps(&X_out[N4 + 2*k], n8);
-        _mm_store_ps(&X_out[N2 + 2*k], m9);
-        _mm_store_ps(&X_out[N2 + N4 + 2*k], n9);
-    }
-
-#ifdef PROFILE
-    count2 = faad_get_ts() - count2;
-    mdct->fft_cycles += count1;
-    mdct->cycles += (count2 - count1);
-#endif
-}
-#endif
-
 #ifdef LTP_DEC
 void faad_mdct(mdct_info *mdct, real_t *X_in, real_t *X_out)
 {
@@ -478,6 +246,18 @@
 	real_t scale = REAL_CONST(4.0/N);
 #endif
 
+#ifdef ALLOW_SMALL_FRAMELENGTH
+#ifdef FIXED_POINT
+    /* detect non-power of 2 */
+    if (N & (N-1))
+    {
+        /* adjust scale for non-power of 2 MDCT */
+        /* *= sqrt(2048/1920) */
+        scale = MUL_C(scale, COEF_CONST(1.0327955589886444));
+    }
+#endif
+#endif
+
     /* pre-FFT complex multiplication */
     for (k = 0; k < N8; k++)
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaad2/mdct_tab.h	Fri Sep 24 17:31:36 2004 +0000
@@ -0,0 +1,3653 @@
+/*
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+**
+** 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.
+**
+** Any non-GPL usage of this software or parts of this software is strictly
+** forbidden.
+**
+** Commercial non-GPL licensing of this software is possible.
+** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
+**
+** Initially modified for use with MPlayer by Diego Biurrun on 2004/09/24
+** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+**/
+
+#ifndef __MDCT_TAB_H__
+#define __MDCT_TAB_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef FIXED_POINT
+
+/* 256 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_2048[] =
+{
+    { FRAC_CONST(0.999999926465718), FRAC_CONST(0.000383495187571) },
+    { FRAC_CONST(0.999994043728986), FRAC_CONST(0.003451449920136) },
+    { FRAC_CONST(0.999978748667469), FRAC_CONST(0.006519372166339) },
+    { FRAC_CONST(0.999954041425130), FRAC_CONST(0.009587233049729) },
+    { FRAC_CONST(0.999919922234523), FRAC_CONST(0.012655003694430) },
+    { FRAC_CONST(0.999876391416790), FRAC_CONST(0.015722655225417) },
+    { FRAC_CONST(0.999823449381662), FRAC_CONST(0.018790158768785) },
+    { FRAC_CONST(0.999761096627447), FRAC_CONST(0.021857485452022) },
+    { FRAC_CONST(0.999689333741034), FRAC_CONST(0.024924606404281) },
+    { FRAC_CONST(0.999608161397882), FRAC_CONST(0.027991492756653) },
+    { FRAC_CONST(0.999517580362017), FRAC_CONST(0.031058115642435) },
+    { FRAC_CONST(0.999417591486022), FRAC_CONST(0.034124446197403) },
+    { FRAC_CONST(0.999308195711029), FRAC_CONST(0.037190455560088) },
+    { FRAC_CONST(0.999189394066715), FRAC_CONST(0.040256114872041) },
+    { FRAC_CONST(0.999061187671285), FRAC_CONST(0.043321395278110) },
+    { FRAC_CONST(0.998923577731466), FRAC_CONST(0.046386267926707) },
+    { FRAC_CONST(0.998776565542496), FRAC_CONST(0.049450703970085) },
+    { FRAC_CONST(0.998620152488109), FRAC_CONST(0.052514674564603) },
+    { FRAC_CONST(0.998454340040525), FRAC_CONST(0.055578150871005) },
+    { FRAC_CONST(0.998279129760433), FRAC_CONST(0.058641104054683) },
+    { FRAC_CONST(0.998094523296980), FRAC_CONST(0.061703505285957) },
+    { FRAC_CONST(0.997900522387752), FRAC_CONST(0.064765325740340) },
+    { FRAC_CONST(0.997697128858759), FRAC_CONST(0.067826536598811) },
+    { FRAC_CONST(0.997484344624418), FRAC_CONST(0.070887109048088) },
+    { FRAC_CONST(0.997262171687536), FRAC_CONST(0.073947014280897) },
+    { FRAC_CONST(0.997030612139289), FRAC_CONST(0.077006223496246) },
+    { FRAC_CONST(0.996789668159205), FRAC_CONST(0.080064707899691) },
+    { FRAC_CONST(0.996539342015138), FRAC_CONST(0.083122438703613) },
+    { FRAC_CONST(0.996279636063255), FRAC_CONST(0.086179387127485) },
+    { FRAC_CONST(0.996010552748006), FRAC_CONST(0.089235524398144) },
+    { FRAC_CONST(0.995732094602106), FRAC_CONST(0.092290821750062) },
+    { FRAC_CONST(0.995444264246510), FRAC_CONST(0.095345250425618) },
+    { FRAC_CONST(0.995147064390386), FRAC_CONST(0.098398781675364) },
+    { FRAC_CONST(0.994840497831093), FRAC_CONST(0.101451386758302) },
+    { FRAC_CONST(0.994524567454152), FRAC_CONST(0.104503036942151) },
+    { FRAC_CONST(0.994199276233219), FRAC_CONST(0.107553703503616) },
+    { FRAC_CONST(0.993864627230060), FRAC_CONST(0.110603357728662) },
+    { FRAC_CONST(0.993520623594518), FRAC_CONST(0.113651970912782) },
+    { FRAC_CONST(0.993167268564487), FRAC_CONST(0.116699514361268) },
+    { FRAC_CONST(0.992804565465879), FRAC_CONST(0.119745959389480) },
+    { FRAC_CONST(0.992432517712594), FRAC_CONST(0.122791277323117) },
+    { FRAC_CONST(0.992051128806486), FRAC_CONST(0.125835439498487) },
+    { FRAC_CONST(0.991660402337333), FRAC_CONST(0.128878417262777) },
+    { FRAC_CONST(0.991260341982802), FRAC_CONST(0.131920181974320) },
+    { FRAC_CONST(0.990850951508414), FRAC_CONST(0.134960705002869) },
+    { FRAC_CONST(0.990432234767506), FRAC_CONST(0.137999957729863) },
+    { FRAC_CONST(0.990004195701201), FRAC_CONST(0.141037911548698) },
+    { FRAC_CONST(0.989566838338365), FRAC_CONST(0.144074537864995) },
+    { FRAC_CONST(0.989120166795573), FRAC_CONST(0.147109808096872) },
+    { FRAC_CONST(0.988664185277066), FRAC_CONST(0.150143693675208) },
+    { FRAC_CONST(0.988198898074718), FRAC_CONST(0.153176166043918) },
+    { FRAC_CONST(0.987724309567987), FRAC_CONST(0.156207196660216) },
+    { FRAC_CONST(0.987240424223882), FRAC_CONST(0.159236756994888) },
+    { FRAC_CONST(0.986747246596917), FRAC_CONST(0.162264818532558) },
+    { FRAC_CONST(0.986244781329065), FRAC_CONST(0.165291352771958) },
+    { FRAC_CONST(0.985733033149723), FRAC_CONST(0.168316331226195) },
+    { FRAC_CONST(0.985212006875659), FRAC_CONST(0.171339725423019) },
+    { FRAC_CONST(0.984681707410971), FRAC_CONST(0.174361506905094) },
+    { FRAC_CONST(0.984142139747039), FRAC_CONST(0.177381647230260) },
+    { FRAC_CONST(0.983593308962479), FRAC_CONST(0.180400117971807) },
+    { FRAC_CONST(0.983035220223096), FRAC_CONST(0.183416890718739) },
+    { FRAC_CONST(0.982467878781833), FRAC_CONST(0.186431937076042) },
+    { FRAC_CONST(0.981891289978725), FRAC_CONST(0.189445228664950) },
+    { FRAC_CONST(0.981305459240845), FRAC_CONST(0.192456737123217) },
+    { FRAC_CONST(0.980710392082254), FRAC_CONST(0.195466434105377) },
+    { FRAC_CONST(0.980106094103952), FRAC_CONST(0.198474291283016) },
+    { FRAC_CONST(0.979492570993821), FRAC_CONST(0.201480280345038) },
+    { FRAC_CONST(0.978869828526574), FRAC_CONST(0.204484372997927) },
+    { FRAC_CONST(0.978237872563701), FRAC_CONST(0.207486540966021) },
+    { FRAC_CONST(0.977596709053412), FRAC_CONST(0.210486755991770) },
+    { FRAC_CONST(0.976946344030582), FRAC_CONST(0.213484989836008) },
+    { FRAC_CONST(0.976286783616694), FRAC_CONST(0.216481214278217) },
+    { FRAC_CONST(0.975618034019782), FRAC_CONST(0.219475401116790) },
+    { FRAC_CONST(0.974940101534372), FRAC_CONST(0.222467522169302) },
+    { FRAC_CONST(0.974252992541423), FRAC_CONST(0.225457549272769) },
+    { FRAC_CONST(0.973556713508266), FRAC_CONST(0.228445454283916) },
+    { FRAC_CONST(0.972851270988544), FRAC_CONST(0.231431209079446) },
+    { FRAC_CONST(0.972136671622152), FRAC_CONST(0.234414785556295) },
+    { FRAC_CONST(0.971412922135171), FRAC_CONST(0.237396155631907) },
+    { FRAC_CONST(0.970680029339806), FRAC_CONST(0.240375291244489) },
+    { FRAC_CONST(0.969938000134324), FRAC_CONST(0.243352164353285) },
+    { FRAC_CONST(0.969186841502986), FRAC_CONST(0.246326746938829) },
+    { FRAC_CONST(0.968426560515983), FRAC_CONST(0.249299011003218) },
+    { FRAC_CONST(0.967657164329370), FRAC_CONST(0.252268928570371) },
+    { FRAC_CONST(0.966878660184996), FRAC_CONST(0.255236471686292) },
+    { FRAC_CONST(0.966091055410439), FRAC_CONST(0.258201612419335) },
+    { FRAC_CONST(0.965294357418935), FRAC_CONST(0.261164322860466) },
+    { FRAC_CONST(0.964488573709308), FRAC_CONST(0.264124575123528) },
+    { FRAC_CONST(0.963673711865903), FRAC_CONST(0.267082341345496) },
+    { FRAC_CONST(0.962849779558509), FRAC_CONST(0.270037593686751) },
+    { FRAC_CONST(0.962016784542291), FRAC_CONST(0.272990304331330) },
+    { FRAC_CONST(0.961174734657714), FRAC_CONST(0.275940445487197) },
+    { FRAC_CONST(0.960323637830474), FRAC_CONST(0.278887989386500) },
+    { FRAC_CONST(0.959463502071418), FRAC_CONST(0.281832908285833) },
+    { FRAC_CONST(0.958594335476470), FRAC_CONST(0.284775174466498) },
+    { FRAC_CONST(0.957716146226559), FRAC_CONST(0.287714760234765) },
+    { FRAC_CONST(0.956828942587535), FRAC_CONST(0.290651637922133) },
+    { FRAC_CONST(0.955932732910098), FRAC_CONST(0.293585779885591) },
+    { FRAC_CONST(0.955027525629714), FRAC_CONST(0.296517158507877) },
+    { FRAC_CONST(0.954113329266539), FRAC_CONST(0.299445746197740) },
+    { FRAC_CONST(0.953190152425337), FRAC_CONST(0.302371515390196) },
+    { FRAC_CONST(0.952258003795400), FRAC_CONST(0.305294438546792) },
+    { FRAC_CONST(0.951316892150466), FRAC_CONST(0.308214488155861) },
+    { FRAC_CONST(0.950366826348636), FRAC_CONST(0.311131636732785) },
+    { FRAC_CONST(0.949407815332292), FRAC_CONST(0.314045856820251) },
+    { FRAC_CONST(0.948439868128010), FRAC_CONST(0.316957120988508) },
+    { FRAC_CONST(0.947462993846478), FRAC_CONST(0.319865401835631) },
+    { FRAC_CONST(0.946477201682409), FRAC_CONST(0.322770671987771) },
+    { FRAC_CONST(0.945482500914454), FRAC_CONST(0.325672904099420) },
+    { FRAC_CONST(0.944478900905116), FRAC_CONST(0.328572070853664) },
+    { FRAC_CONST(0.943466411100659), FRAC_CONST(0.331468144962441) },
+    { FRAC_CONST(0.942445041031025), FRAC_CONST(0.334361099166799) },
+    { FRAC_CONST(0.941414800309736), FRAC_CONST(0.337250906237151) },
+    { FRAC_CONST(0.940375698633812), FRAC_CONST(0.340137538973532) },
+    { FRAC_CONST(0.939327745783671), FRAC_CONST(0.343020970205856) },
+    { FRAC_CONST(0.938270951623047), FRAC_CONST(0.345901172794169) },
+    { FRAC_CONST(0.937205326098888), FRAC_CONST(0.348778119628908) },
+    { FRAC_CONST(0.936130879241267), FRAC_CONST(0.351651783631155) },
+    { FRAC_CONST(0.935047621163287), FRAC_CONST(0.354522137752887) },
+    { FRAC_CONST(0.933955562060987), FRAC_CONST(0.357389154977241) },
+    { FRAC_CONST(0.932854712213241), FRAC_CONST(0.360252808318757) },
+    { FRAC_CONST(0.931745081981669), FRAC_CONST(0.363113070823639) },
+    { FRAC_CONST(0.930626681810532), FRAC_CONST(0.365969915570009) },
+    { FRAC_CONST(0.929499522226639), FRAC_CONST(0.368823315668154) },
+    { FRAC_CONST(0.928363613839244), FRAC_CONST(0.371673244260787) },
+    { FRAC_CONST(0.927218967339952), FRAC_CONST(0.374519674523293) },
+    { FRAC_CONST(0.926065593502609), FRAC_CONST(0.377362579663988) },
+    { FRAC_CONST(0.924903503183211), FRAC_CONST(0.380201932924366) },
+    { FRAC_CONST(0.923732707319793), FRAC_CONST(0.383037707579352) },
+    { FRAC_CONST(0.922553216932333), FRAC_CONST(0.385869876937555) },
+    { FRAC_CONST(0.921365043122642), FRAC_CONST(0.388698414341519) },
+    { FRAC_CONST(0.920168197074266), FRAC_CONST(0.391523293167972) },
+    { FRAC_CONST(0.918962690052376), FRAC_CONST(0.394344486828080) },
+    { FRAC_CONST(0.917748533403661), FRAC_CONST(0.397161968767692) },
+    { FRAC_CONST(0.916525738556228), FRAC_CONST(0.399975712467595) },
+    { FRAC_CONST(0.915294317019487), FRAC_CONST(0.402785691443764) },
+    { FRAC_CONST(0.914054280384047), FRAC_CONST(0.405591879247604) },
+    { FRAC_CONST(0.912805640321604), FRAC_CONST(0.408394249466208) },
+    { FRAC_CONST(0.911548408584834), FRAC_CONST(0.411192775722600) },
+    { FRAC_CONST(0.910282597007282), FRAC_CONST(0.413987431675985) },
+    { FRAC_CONST(0.909008217503247), FRAC_CONST(0.416778191021998) },
+    { FRAC_CONST(0.907725282067676), FRAC_CONST(0.419565027492947) },
+    { FRAC_CONST(0.906433802776045), FRAC_CONST(0.422347914858067) },
+    { FRAC_CONST(0.905133791784250), FRAC_CONST(0.425126826923762) },
+    { FRAC_CONST(0.903825261328488), FRAC_CONST(0.427901737533854) },
+    { FRAC_CONST(0.902508223725146), FRAC_CONST(0.430672620569827) },
+    { FRAC_CONST(0.901182691370685), FRAC_CONST(0.433439449951074) },
+    { FRAC_CONST(0.899848676741519), FRAC_CONST(0.436202199635144) },
+    { FRAC_CONST(0.898506192393902), FRAC_CONST(0.438960843617984) },
+    { FRAC_CONST(0.897155250963809), FRAC_CONST(0.441715355934187) },
+    { FRAC_CONST(0.895795865166814), FRAC_CONST(0.444465710657234) },
+    { FRAC_CONST(0.894428047797974), FRAC_CONST(0.447211881899738) },
+    { FRAC_CONST(0.893051811731707), FRAC_CONST(0.449953843813691) },
+    { FRAC_CONST(0.891667169921672), FRAC_CONST(0.452691570590701) },
+    { FRAC_CONST(0.890274135400645), FRAC_CONST(0.455425036462242) },
+    { FRAC_CONST(0.888872721280396), FRAC_CONST(0.458154215699893) },
+    { FRAC_CONST(0.887462940751569), FRAC_CONST(0.460879082615579) },
+    { FRAC_CONST(0.886044807083556), FRAC_CONST(0.463599611561814) },
+    { FRAC_CONST(0.884618333624370), FRAC_CONST(0.466315776931944) },
+    { FRAC_CONST(0.883183533800523), FRAC_CONST(0.469027553160387) },
+    { FRAC_CONST(0.881740421116898), FRAC_CONST(0.471734914722871) },
+    { FRAC_CONST(0.880289009156621), FRAC_CONST(0.474437836136679) },
+    { FRAC_CONST(0.878829311580933), FRAC_CONST(0.477136291960885) },
+    { FRAC_CONST(0.877361342129065), FRAC_CONST(0.479830256796594) },
+    { FRAC_CONST(0.875885114618104), FRAC_CONST(0.482519705287184) },
+    { FRAC_CONST(0.874400642942865), FRAC_CONST(0.485204612118542) },
+    { FRAC_CONST(0.872907941075761), FRAC_CONST(0.487884952019301) },
+    { FRAC_CONST(0.871407023066671), FRAC_CONST(0.490560699761082) },
+    { FRAC_CONST(0.869897903042806), FRAC_CONST(0.493231830158728) },
+    { FRAC_CONST(0.868380595208580), FRAC_CONST(0.495898318070542) },
+    { FRAC_CONST(0.866855113845470), FRAC_CONST(0.498560138398525) },
+    { FRAC_CONST(0.865321473311890), FRAC_CONST(0.501217266088610) },
+    { FRAC_CONST(0.863779688043047), FRAC_CONST(0.503869676130899) },
+    { FRAC_CONST(0.862229772550811), FRAC_CONST(0.506517343559899) },
+    { FRAC_CONST(0.860671741423578), FRAC_CONST(0.509160243454755) },
+    { FRAC_CONST(0.859105609326130), FRAC_CONST(0.511798350939487) },
+    { FRAC_CONST(0.857531390999499), FRAC_CONST(0.514431641183223) },
+    { FRAC_CONST(0.855949101260827), FRAC_CONST(0.517060089400432) },
+    { FRAC_CONST(0.854358755003227), FRAC_CONST(0.519683670851158) },
+    { FRAC_CONST(0.852760367195645), FRAC_CONST(0.522302360841255) },
+    { FRAC_CONST(0.851153952882715), FRAC_CONST(0.524916134722613) },
+    { FRAC_CONST(0.849539527184621), FRAC_CONST(0.527524967893398) },
+    { FRAC_CONST(0.847917105296951), FRAC_CONST(0.530128835798279) },
+    { FRAC_CONST(0.846286702490560), FRAC_CONST(0.532727713928659) },
+    { FRAC_CONST(0.844648334111418), FRAC_CONST(0.535321577822907) },
+    { FRAC_CONST(0.843002015580473), FRAC_CONST(0.537910403066589) },
+    { FRAC_CONST(0.841347762393502), FRAC_CONST(0.540494165292695) },
+    { FRAC_CONST(0.839685590120966), FRAC_CONST(0.543072840181872) },
+    { FRAC_CONST(0.838015514407864), FRAC_CONST(0.545646403462649) },
+    { FRAC_CONST(0.836337550973584), FRAC_CONST(0.548214830911668) },
+    { FRAC_CONST(0.834651715611756), FRAC_CONST(0.550778098353912) },
+    { FRAC_CONST(0.832958024190107), FRAC_CONST(0.553336181662932) },
+    { FRAC_CONST(0.831256492650303), FRAC_CONST(0.555889056761074) },
+    { FRAC_CONST(0.829547137007809), FRAC_CONST(0.558436699619704) },
+    { FRAC_CONST(0.827829973351730), FRAC_CONST(0.560979086259438) },
+    { FRAC_CONST(0.826105017844665), FRAC_CONST(0.563516192750365) },
+    { FRAC_CONST(0.824372286722551), FRAC_CONST(0.566047995212271) },
+    { FRAC_CONST(0.822631796294515), FRAC_CONST(0.568574469814869) },
+    { FRAC_CONST(0.820883562942715), FRAC_CONST(0.571095592778017) },
+    { FRAC_CONST(0.819127603122188), FRAC_CONST(0.573611340371945) },
+    { FRAC_CONST(0.817363933360698), FRAC_CONST(0.576121688917478) },
+    { FRAC_CONST(0.815592570258577), FRAC_CONST(0.578626614786261) },
+    { FRAC_CONST(0.813813530488567), FRAC_CONST(0.581126094400978) },
+    { FRAC_CONST(0.812026830795670), FRAC_CONST(0.583620104235573) },
+    { FRAC_CONST(0.810232487996982), FRAC_CONST(0.586108620815476) },
+    { FRAC_CONST(0.808430518981543), FRAC_CONST(0.588591620717823) },
+    { FRAC_CONST(0.806620940710170), FRAC_CONST(0.591069080571671) },
+    { FRAC_CONST(0.804803770215303), FRAC_CONST(0.593540977058226) },
+    { FRAC_CONST(0.802979024600843), FRAC_CONST(0.596007286911057) },
+    { FRAC_CONST(0.801146721041991), FRAC_CONST(0.598467986916314) },
+    { FRAC_CONST(0.799306876785086), FRAC_CONST(0.600923053912954) },
+    { FRAC_CONST(0.797459509147442), FRAC_CONST(0.603372464792950) },
+    { FRAC_CONST(0.795604635517188), FRAC_CONST(0.605816196501515) },
+    { FRAC_CONST(0.793742273353100), FRAC_CONST(0.608254226037314) },
+    { FRAC_CONST(0.791872440184440), FRAC_CONST(0.610686530452686) },
+    { FRAC_CONST(0.789995153610791), FRAC_CONST(0.613113086853855) },
+    { FRAC_CONST(0.788110431301888), FRAC_CONST(0.615533872401147) },
+    { FRAC_CONST(0.786218290997456), FRAC_CONST(0.617948864309208) },
+    { FRAC_CONST(0.784318750507039), FRAC_CONST(0.620358039847214) },
+    { FRAC_CONST(0.782411827709837), FRAC_CONST(0.622761376339086) },
+    { FRAC_CONST(0.780497540554532), FRAC_CONST(0.625158851163708) },
+    { FRAC_CONST(0.778575907059125), FRAC_CONST(0.627550441755132) },
+    { FRAC_CONST(0.776646945310762), FRAC_CONST(0.629936125602796) },
+    { FRAC_CONST(0.774710673465566), FRAC_CONST(0.632315880251738) },
+    { FRAC_CONST(0.772767109748464), FRAC_CONST(0.634689683302798) },
+    { FRAC_CONST(0.770816272453019), FRAC_CONST(0.637057512412839) },
+    { FRAC_CONST(0.768858179941253), FRAC_CONST(0.639419345294951) },
+    { FRAC_CONST(0.766892850643481), FRAC_CONST(0.641775159718664) },
+    { FRAC_CONST(0.764920303058128), FRAC_CONST(0.644124933510155) },
+    { FRAC_CONST(0.762940555751566), FRAC_CONST(0.646468644552458) },
+    { FRAC_CONST(0.760953627357928), FRAC_CONST(0.648806270785673) },
+    { FRAC_CONST(0.758959536578942), FRAC_CONST(0.651137790207170) },
+    { FRAC_CONST(0.756958302183750), FRAC_CONST(0.653463180871802) },
+    { FRAC_CONST(0.754949943008733), FRAC_CONST(0.655782420892106) },
+    { FRAC_CONST(0.752934477957330), FRAC_CONST(0.658095488438511) },
+    { FRAC_CONST(0.750911925999868), FRAC_CONST(0.660402361739545) },
+    { FRAC_CONST(0.748882306173375), FRAC_CONST(0.662703019082037) },
+    { FRAC_CONST(0.746845637581407), FRAC_CONST(0.664997438811325) },
+    { FRAC_CONST(0.744801939393863), FRAC_CONST(0.667285599331456) },
+    { FRAC_CONST(0.742751230846809), FRAC_CONST(0.669567479105392) },
+    { FRAC_CONST(0.740693531242296), FRAC_CONST(0.671843056655212) },
+    { FRAC_CONST(0.738628859948175), FRAC_CONST(0.674112310562312) },
+    { FRAC_CONST(0.736557236397919), FRAC_CONST(0.676375219467612) },
+    { FRAC_CONST(0.734478680090438), FRAC_CONST(0.678631762071749) },
+    { FRAC_CONST(0.732393210589896), FRAC_CONST(0.680881917135287) },
+    { FRAC_CONST(0.730300847525525), FRAC_CONST(0.683125663478909) },
+    { FRAC_CONST(0.728201610591445), FRAC_CONST(0.685362979983619) },
+    { FRAC_CONST(0.726095519546471), FRAC_CONST(0.687593845590942) },
+    { FRAC_CONST(0.723982594213936), FRAC_CONST(0.689818239303122) },
+    { FRAC_CONST(0.721862854481496), FRAC_CONST(0.692036140183319) },
+    { FRAC_CONST(0.719736320300951), FRAC_CONST(0.694247527355803) },
+    { FRAC_CONST(0.717603011688049), FRAC_CONST(0.696452380006158) },
+    { FRAC_CONST(0.715462948722304), FRAC_CONST(0.698650677381469) },
+    { FRAC_CONST(0.713316151546803), FRAC_CONST(0.700842398790526) },
+    { FRAC_CONST(0.711162640368018), FRAC_CONST(0.703027523604011) },
+    { FRAC_CONST(0.709002435455618), FRAC_CONST(0.705206031254698) },
+    { FRAC_CONST(0.706835557142274), FRAC_CONST(0.707377901237642) },
+    { FRAC_CONST(0.704662025823469), FRAC_CONST(0.709543113110377) },
+    { FRAC_CONST(0.702481861957308), FRAC_CONST(0.711701646493103) },
+    { FRAC_CONST(0.700295086064324), FRAC_CONST(0.713853481068882) },
+    { FRAC_CONST(0.698101718727284), FRAC_CONST(0.715998596583829) },
+    { FRAC_CONST(0.695901780590997), FRAC_CONST(0.718136972847297) },
+    { FRAC_CONST(0.693695292362118), FRAC_CONST(0.720268589732077) },
+    { FRAC_CONST(0.691482274808956), FRAC_CONST(0.722393427174578) },
+    { FRAC_CONST(0.689262748761273), FRAC_CONST(0.724511465175020) },
+    { FRAC_CONST(0.687036735110096), FRAC_CONST(0.726622683797623) },
+    { FRAC_CONST(0.684804254807511), FRAC_CONST(0.728727063170794) },
+    { FRAC_CONST(0.682565328866473), FRAC_CONST(0.730824583487312) },
+    { FRAC_CONST(0.680319978360607), FRAC_CONST(0.732915225004518) },
+    { FRAC_CONST(0.678068224424007), FRAC_CONST(0.734998968044497) },
+    { FRAC_CONST(0.675810088251037), FRAC_CONST(0.737075792994266) },
+    { FRAC_CONST(0.673545591096136), FRAC_CONST(0.739145680305957) },
+    { FRAC_CONST(0.671274754273613), FRAC_CONST(0.741208610497004) },
+    { FRAC_CONST(0.668997599157450), FRAC_CONST(0.743264564150321) },
+    { FRAC_CONST(0.666714147181098), FRAC_CONST(0.745313521914490) },
+    { FRAC_CONST(0.664424419837275), FRAC_CONST(0.747355464503940) },
+    { FRAC_CONST(0.662128438677769), FRAC_CONST(0.749390372699130) },
+    { FRAC_CONST(0.659826225313227), FRAC_CONST(0.751418227346727) },
+    { FRAC_CONST(0.657517801412960), FRAC_CONST(0.753439009359794) },
+    { FRAC_CONST(0.655203188704732), FRAC_CONST(0.755452699717958) },
+    { FRAC_CONST(0.652882408974559), FRAC_CONST(0.757459279467601) },
+    { FRAC_CONST(0.650555484066504), FRAC_CONST(0.759458729722028) },
+    { FRAC_CONST(0.648222435882470), FRAC_CONST(0.761451031661654) },
+    { FRAC_CONST(0.645883286381996), FRAC_CONST(0.763436166534172) },
+    { FRAC_CONST(0.643538057582048), FRAC_CONST(0.765414115654738) },
+    { FRAC_CONST(0.641186771556811), FRAC_CONST(0.767384860406142) },
+    { FRAC_CONST(0.638829450437486), FRAC_CONST(0.769348382238982) },
+    { FRAC_CONST(0.636466116412077), FRAC_CONST(0.771304662671845) },
+    { FRAC_CONST(0.634096791725184), FRAC_CONST(0.773253683291473) },
+    { FRAC_CONST(0.631721498677792), FRAC_CONST(0.775195425752941) },
+    { FRAC_CONST(0.629340259627066), FRAC_CONST(0.777129871779832) },
+    { FRAC_CONST(0.626953096986133), FRAC_CONST(0.779057003164401) },
+    { FRAC_CONST(0.624560033223877), FRAC_CONST(0.780976801767754) },
+    { FRAC_CONST(0.622161090864727), FRAC_CONST(0.782889249520015) },
+    { FRAC_CONST(0.619756292488441), FRAC_CONST(0.784794328420499) },
+    { FRAC_CONST(0.617345660729897), FRAC_CONST(0.786692020537877) },
+    { FRAC_CONST(0.614929218278880), FRAC_CONST(0.788582308010347) },
+    { FRAC_CONST(0.612506987879866), FRAC_CONST(0.790465173045805) },
+    { FRAC_CONST(0.610078992331810), FRAC_CONST(0.792340597922007) },
+    { FRAC_CONST(0.607645254487931), FRAC_CONST(0.794208564986741) },
+    { FRAC_CONST(0.605205797255497), FRAC_CONST(0.796069056657988) },
+    { FRAC_CONST(0.602760643595607), FRAC_CONST(0.797922055424093) },
+    { FRAC_CONST(0.600309816522980), FRAC_CONST(0.799767543843926) },
+    { FRAC_CONST(0.597853339105734), FRAC_CONST(0.801605504547046) },
+    { FRAC_CONST(0.595391234465169), FRAC_CONST(0.803435920233868) },
+    { FRAC_CONST(0.592923525775551), FRAC_CONST(0.805258773675822) },
+    { FRAC_CONST(0.590450236263896), FRAC_CONST(0.807074047715518) },
+    { FRAC_CONST(0.587971389209745), FRAC_CONST(0.808881725266904) },
+    { FRAC_CONST(0.585487007944951), FRAC_CONST(0.810681789315431) },
+    { FRAC_CONST(0.582997115853458), FRAC_CONST(0.812474222918210) },
+    { FRAC_CONST(0.580501736371077), FRAC_CONST(0.814259009204175) },
+    { FRAC_CONST(0.578000892985270), FRAC_CONST(0.816036131374237) },
+    { FRAC_CONST(0.575494609234928), FRAC_CONST(0.817805572701444) },
+    { FRAC_CONST(0.572982908710149), FRAC_CONST(0.819567316531142) },
+    { FRAC_CONST(0.570465815052013), FRAC_CONST(0.821321346281127) },
+    { FRAC_CONST(0.567943351952366), FRAC_CONST(0.823067645441802) },
+    { FRAC_CONST(0.565415543153590), FRAC_CONST(0.824806197576334) },
+    { FRAC_CONST(0.562882412448385), FRAC_CONST(0.826536986320810) },
+    { FRAC_CONST(0.560343983679541), FRAC_CONST(0.828259995384386) },
+    { FRAC_CONST(0.557800280739717), FRAC_CONST(0.829975208549444) },
+    { FRAC_CONST(0.555251327571214), FRAC_CONST(0.831682609671745) },
+    { FRAC_CONST(0.552697148165750), FRAC_CONST(0.833382182680580) },
+    { FRAC_CONST(0.550137766564234), FRAC_CONST(0.835073911578919) },
+    { FRAC_CONST(0.547573206856540), FRAC_CONST(0.836757780443567) },
+    { FRAC_CONST(0.545003493181281), FRAC_CONST(0.838433773425308) },
+    { FRAC_CONST(0.542428649725581), FRAC_CONST(0.840101874749058) },
+    { FRAC_CONST(0.539848700724848), FRAC_CONST(0.841762068714012) },
+    { FRAC_CONST(0.537263670462543), FRAC_CONST(0.843414339693793) },
+    { FRAC_CONST(0.534673583269956), FRAC_CONST(0.845058672136595) },
+    { FRAC_CONST(0.532078463525974), FRAC_CONST(0.846695050565337) },
+    { FRAC_CONST(0.529478335656852), FRAC_CONST(0.848323459577802) },
+    { FRAC_CONST(0.526873224135985), FRAC_CONST(0.849943883846782) },
+    { FRAC_CONST(0.524263153483673), FRAC_CONST(0.851556308120229) },
+    { FRAC_CONST(0.521648148266897), FRAC_CONST(0.853160717221390) },
+    { FRAC_CONST(0.519028233099081), FRAC_CONST(0.854757096048957) },
+    { FRAC_CONST(0.516403432639864), FRAC_CONST(0.856345429577204) },
+    { FRAC_CONST(0.513773771594868), FRAC_CONST(0.857925702856130) },
+    { FRAC_CONST(0.511139274715464), FRAC_CONST(0.859497901011602) },
+    { FRAC_CONST(0.508499966798541), FRAC_CONST(0.861062009245491) },
+    { FRAC_CONST(0.505855872686269), FRAC_CONST(0.862618012835817) },
+    { FRAC_CONST(0.503207017265869), FRAC_CONST(0.864165897136879) },
+    { FRAC_CONST(0.500553425469378), FRAC_CONST(0.865705647579402) },
+    { FRAC_CONST(0.497895122273411), FRAC_CONST(0.867237249670668) },
+    { FRAC_CONST(0.495232132698931), FRAC_CONST(0.868760688994655) },
+    { FRAC_CONST(0.492564481811011), FRAC_CONST(0.870275951212172) },
+    { FRAC_CONST(0.489892194718595), FRAC_CONST(0.871783022060993) },
+    { FRAC_CONST(0.487215296574269), FRAC_CONST(0.873281887355994) },
+    { FRAC_CONST(0.484533812574016), FRAC_CONST(0.874772532989284) },
+    { FRAC_CONST(0.481847767956986), FRAC_CONST(0.876254944930338) },
+    { FRAC_CONST(0.479157188005253), FRAC_CONST(0.877729109226132) },
+    { FRAC_CONST(0.476462098043581), FRAC_CONST(0.879195012001267) },
+    { FRAC_CONST(0.473762523439183), FRAC_CONST(0.880652639458111) },
+    { FRAC_CONST(0.471058489601483), FRAC_CONST(0.882101977876918) },
+    { FRAC_CONST(0.468350021981877), FRAC_CONST(0.883543013615962) },
+    { FRAC_CONST(0.465637146073494), FRAC_CONST(0.884975733111667) },
+    { FRAC_CONST(0.462919887410955), FRAC_CONST(0.886400122878730) },
+    { FRAC_CONST(0.460198271570134), FRAC_CONST(0.887816169510255) },
+    { FRAC_CONST(0.457472324167916), FRAC_CONST(0.889223859677868) },
+    { FRAC_CONST(0.454742070861955), FRAC_CONST(0.890623180131856) },
+    { FRAC_CONST(0.452007537350437), FRAC_CONST(0.892014117701280) },
+    { FRAC_CONST(0.449268749371830), FRAC_CONST(0.893396659294108) },
+    { FRAC_CONST(0.446525732704651), FRAC_CONST(0.894770791897330) },
+    { FRAC_CONST(0.443778513167218), FRAC_CONST(0.896136502577087) },
+    { FRAC_CONST(0.441027116617407), FRAC_CONST(0.897493778478790) },
+    { FRAC_CONST(0.438271568952410), FRAC_CONST(0.898842606827242) },
+    { FRAC_CONST(0.435511896108492), FRAC_CONST(0.900182974926757) },
+    { FRAC_CONST(0.432748124060744), FRAC_CONST(0.901514870161279) },
+    { FRAC_CONST(0.429980278822841), FRAC_CONST(0.902838279994503) },
+    { FRAC_CONST(0.427208386446796), FRAC_CONST(0.904153191969992) },
+    { FRAC_CONST(0.424432473022717), FRAC_CONST(0.905459593711293) },
+    { FRAC_CONST(0.421652564678558), FRAC_CONST(0.906757472922057) },
+    { FRAC_CONST(0.418868687579875), FRAC_CONST(0.908046817386148) },
+    { FRAC_CONST(0.416080867929579), FRAC_CONST(0.909327614967767) },
+    { FRAC_CONST(0.413289131967691), FRAC_CONST(0.910599853611559) },
+    { FRAC_CONST(0.410493505971093), FRAC_CONST(0.911863521342729) },
+    { FRAC_CONST(0.407694016253280), FRAC_CONST(0.913118606267154) },
+    { FRAC_CONST(0.404890689164118), FRAC_CONST(0.914365096571498) },
+    { FRAC_CONST(0.402083551089587), FRAC_CONST(0.915602980523320) },
+    { FRAC_CONST(0.399272628451541), FRAC_CONST(0.916832246471184) },
+    { FRAC_CONST(0.396457947707454), FRAC_CONST(0.918052882844770) },
+    { FRAC_CONST(0.393639535350173), FRAC_CONST(0.919264878154985) },
+    { FRAC_CONST(0.390817417907669), FRAC_CONST(0.920468220994067) },
+    { FRAC_CONST(0.387991621942785), FRAC_CONST(0.921662900035695) },
+    { FRAC_CONST(0.385162174052990), FRAC_CONST(0.922848904035094) },
+    { FRAC_CONST(0.382329100870125), FRAC_CONST(0.924026221829144) },
+    { FRAC_CONST(0.379492429060153), FRAC_CONST(0.925194842336480) },
+    { FRAC_CONST(0.376652185322910), FRAC_CONST(0.926354754557603) },
+    { FRAC_CONST(0.373808396391851), FRAC_CONST(0.927505947574975) },
+    { FRAC_CONST(0.370961089033802), FRAC_CONST(0.928648410553131) },
+    { FRAC_CONST(0.368110290048703), FRAC_CONST(0.929782132738772) },
+    { FRAC_CONST(0.365256026269360), FRAC_CONST(0.930907103460875) },
+    { FRAC_CONST(0.362398324561191), FRAC_CONST(0.932023312130786) },
+    { FRAC_CONST(0.359537211821973), FRAC_CONST(0.933130748242325) },
+    { FRAC_CONST(0.356672714981588), FRAC_CONST(0.934229401371881) },
+    { FRAC_CONST(0.353804861001772), FRAC_CONST(0.935319261178512) },
+    { FRAC_CONST(0.350933676875858), FRAC_CONST(0.936400317404042) },
+    { FRAC_CONST(0.348059189628526), FRAC_CONST(0.937472559873159) },
+    { FRAC_CONST(0.345181426315543), FRAC_CONST(0.938535978493509) },
+    { FRAC_CONST(0.342300414023514), FRAC_CONST(0.939590563255789) },
+    { FRAC_CONST(0.339416179869623), FRAC_CONST(0.940636304233848) },
+    { FRAC_CONST(0.336528751001382), FRAC_CONST(0.941673191584771) },
+    { FRAC_CONST(0.333638154596371), FRAC_CONST(0.942701215548982) },
+    { FRAC_CONST(0.330744417861983), FRAC_CONST(0.943720366450326) },
+    { FRAC_CONST(0.327847568035171), FRAC_CONST(0.944730634696168) },
+    { FRAC_CONST(0.324947632382188), FRAC_CONST(0.945732010777477) },
+    { FRAC_CONST(0.322044638198335), FRAC_CONST(0.946724485268921) },
+    { FRAC_CONST(0.319138612807696), FRAC_CONST(0.947708048828952) },
+    { FRAC_CONST(0.316229583562890), FRAC_CONST(0.948682692199895) },
+    { FRAC_CONST(0.313317577844809), FRAC_CONST(0.949648406208035) },
+    { FRAC_CONST(0.310402623062359), FRAC_CONST(0.950605181763705) },
+    { FRAC_CONST(0.307484746652204), FRAC_CONST(0.951553009861369) },
+    { FRAC_CONST(0.304563976078509), FRAC_CONST(0.952491881579706) },
+    { FRAC_CONST(0.301640338832679), FRAC_CONST(0.953421788081700) },
+    { FRAC_CONST(0.298713862433100), FRAC_CONST(0.954342720614716) },
+    { FRAC_CONST(0.295784574424884), FRAC_CONST(0.955254670510587) },
+    { FRAC_CONST(0.292852502379605), FRAC_CONST(0.956157629185692) },
+    { FRAC_CONST(0.289917673895041), FRAC_CONST(0.957051588141041) },
+    { FRAC_CONST(0.286980116594916), FRAC_CONST(0.957936538962351) },
+    { FRAC_CONST(0.284039858128637), FRAC_CONST(0.958812473320129) },
+    { FRAC_CONST(0.281096926171038), FRAC_CONST(0.959679382969747) },
+    { FRAC_CONST(0.278151348422115), FRAC_CONST(0.960537259751520) },
+    { FRAC_CONST(0.275203152606767), FRAC_CONST(0.961386095590786) },
+    { FRAC_CONST(0.272252366474537), FRAC_CONST(0.962225882497979) },
+    { FRAC_CONST(0.269299017799346), FRAC_CONST(0.963056612568704) },
+    { FRAC_CONST(0.266343134379238), FRAC_CONST(0.963878277983814) },
+    { FRAC_CONST(0.263384744036113), FRAC_CONST(0.964690871009481) },
+    { FRAC_CONST(0.260423874615468), FRAC_CONST(0.965494383997270) },
+    { FRAC_CONST(0.257460553986133), FRAC_CONST(0.966288809384210) },
+    { FRAC_CONST(0.254494810040011), FRAC_CONST(0.967074139692867) },
+    { FRAC_CONST(0.251526670691813), FRAC_CONST(0.967850367531414) },
+    { FRAC_CONST(0.248556163878797), FRAC_CONST(0.968617485593698) },
+    { FRAC_CONST(0.245583317560504), FRAC_CONST(0.969375486659311) },
+    { FRAC_CONST(0.242608159718497), FRAC_CONST(0.970124363593660) },
+    { FRAC_CONST(0.239630718356094), FRAC_CONST(0.970864109348029) },
+    { FRAC_CONST(0.236651021498106), FRAC_CONST(0.971594716959650) },
+    { FRAC_CONST(0.233669097190577), FRAC_CONST(0.972316179551765) },
+    { FRAC_CONST(0.230684973500512), FRAC_CONST(0.973028490333694) },
+    { FRAC_CONST(0.227698678515621), FRAC_CONST(0.973731642600896) },
+    { FRAC_CONST(0.224710240344050), FRAC_CONST(0.974425629735035) },
+    { FRAC_CONST(0.221719687114115), FRAC_CONST(0.975110445204039) },
+    { FRAC_CONST(0.218727046974045), FRAC_CONST(0.975786082562164) },
+    { FRAC_CONST(0.215732348091706), FRAC_CONST(0.976452535450054) },
+    { FRAC_CONST(0.212735618654346), FRAC_CONST(0.977109797594801) },
+    { FRAC_CONST(0.209736886868323), FRAC_CONST(0.977757862810003) },
+    { FRAC_CONST(0.206736180958844), FRAC_CONST(0.978396724995823) },
+    { FRAC_CONST(0.203733529169694), FRAC_CONST(0.979026378139048) },
+    { FRAC_CONST(0.200728959762976), FRAC_CONST(0.979646816313141) },
+    { FRAC_CONST(0.197722501018842), FRAC_CONST(0.980258033678304) },
+    { FRAC_CONST(0.194714181235226), FRAC_CONST(0.980860024481524) },
+    { FRAC_CONST(0.191704028727580), FRAC_CONST(0.981452783056636) },
+    { FRAC_CONST(0.188692071828605), FRAC_CONST(0.982036303824369) },
+    { FRAC_CONST(0.185678338887988), FRAC_CONST(0.982610581292405) },
+    { FRAC_CONST(0.182662858272129), FRAC_CONST(0.983175610055424) },
+    { FRAC_CONST(0.179645658363882), FRAC_CONST(0.983731384795162) },
+    { FRAC_CONST(0.176626767562281), FRAC_CONST(0.984277900280454) },
+    { FRAC_CONST(0.173606214282275), FRAC_CONST(0.984815151367289) },
+    { FRAC_CONST(0.170584026954464), FRAC_CONST(0.985343132998855) },
+    { FRAC_CONST(0.167560234024824), FRAC_CONST(0.985861840205587) },
+    { FRAC_CONST(0.164534863954446), FRAC_CONST(0.986371268105216) },
+    { FRAC_CONST(0.161507945219266), FRAC_CONST(0.986871411902812) },
+    { FRAC_CONST(0.158479506309796), FRAC_CONST(0.987362266890832) },
+    { FRAC_CONST(0.155449575730856), FRAC_CONST(0.987843828449162) },
+    { FRAC_CONST(0.152418182001307), FRAC_CONST(0.988316092045160) },
+    { FRAC_CONST(0.149385353653780), FRAC_CONST(0.988779053233702) },
+    { FRAC_CONST(0.146351119234411), FRAC_CONST(0.989232707657220) },
+    { FRAC_CONST(0.143315507302572), FRAC_CONST(0.989677051045747) },
+    { FRAC_CONST(0.140278546430595), FRAC_CONST(0.990112079216954) },
+    { FRAC_CONST(0.137240265203516), FRAC_CONST(0.990537788076189) },
+    { FRAC_CONST(0.134200692218792), FRAC_CONST(0.990954173616519) },
+    { FRAC_CONST(0.131159856086043), FRAC_CONST(0.991361231918763) },
+    { FRAC_CONST(0.128117785426777), FRAC_CONST(0.991758959151536) },
+    { FRAC_CONST(0.125074508874121), FRAC_CONST(0.992147351571276) },
+    { FRAC_CONST(0.122030055072553), FRAC_CONST(0.992526405522286) },
+    { FRAC_CONST(0.118984452677633), FRAC_CONST(0.992896117436766) },
+    { FRAC_CONST(0.115937730355728), FRAC_CONST(0.993256483834846) },
+    { FRAC_CONST(0.112889916783750), FRAC_CONST(0.993607501324622) },
+    { FRAC_CONST(0.109841040648883), FRAC_CONST(0.993949166602181) },
+    { FRAC_CONST(0.106791130648307), FRAC_CONST(0.994281476451642) },
+    { FRAC_CONST(0.103740215488939), FRAC_CONST(0.994604427745176) },
+    { FRAC_CONST(0.100688323887154), FRAC_CONST(0.994918017443043) },
+    { FRAC_CONST(0.097635484568517), FRAC_CONST(0.995222242593618) },
+    { FRAC_CONST(0.094581726267515), FRAC_CONST(0.995517100333418) },
+    { FRAC_CONST(0.091527077727285), FRAC_CONST(0.995802587887129) },
+    { FRAC_CONST(0.088471567699341), FRAC_CONST(0.996078702567634) },
+    { FRAC_CONST(0.085415224943307), FRAC_CONST(0.996345441776036) },
+    { FRAC_CONST(0.082358078226647), FRAC_CONST(0.996602803001684) },
+    { FRAC_CONST(0.079300156324388), FRAC_CONST(0.996850783822197) },
+    { FRAC_CONST(0.076241488018856), FRAC_CONST(0.997089381903483) },
+    { FRAC_CONST(0.073182102099403), FRAC_CONST(0.997318594999769) },
+    { FRAC_CONST(0.070122027362134), FRAC_CONST(0.997538420953611) },
+    { FRAC_CONST(0.067061292609637), FRAC_CONST(0.997748857695926) },
+    { FRAC_CONST(0.063999926650714), FRAC_CONST(0.997949903246001) },
+    { FRAC_CONST(0.060937958300107), FRAC_CONST(0.998141555711521) },
+    { FRAC_CONST(0.057875416378229), FRAC_CONST(0.998323813288578) },
+    { FRAC_CONST(0.054812329710890), FRAC_CONST(0.998496674261695) },
+    { FRAC_CONST(0.051748727129028), FRAC_CONST(0.998660137003838) },
+    { FRAC_CONST(0.048684637468439), FRAC_CONST(0.998814199976435) },
+    { FRAC_CONST(0.045620089569500), FRAC_CONST(0.998958861729386) },
+    { FRAC_CONST(0.042555112276904), FRAC_CONST(0.999094120901079) },
+    { FRAC_CONST(0.039489734439384), FRAC_CONST(0.999219976218404) },
+    { FRAC_CONST(0.036423984909444), FRAC_CONST(0.999336426496761) },
+    { FRAC_CONST(0.033357892543086), FRAC_CONST(0.999443470640078) },
+    { FRAC_CONST(0.030291486199539), FRAC_CONST(0.999541107640813) },
+    { FRAC_CONST(0.027224794740988), FRAC_CONST(0.999629336579970) },
+    { FRAC_CONST(0.024157847032300), FRAC_CONST(0.999708156627105) },
+    { FRAC_CONST(0.021090671940755), FRAC_CONST(0.999777567040333) },
+    { FRAC_CONST(0.018023298335774), FRAC_CONST(0.999837567166337) },
+    { FRAC_CONST(0.014955755088644), FRAC_CONST(0.999888156440373) },
+    { FRAC_CONST(0.011888071072252), FRAC_CONST(0.999929334386276) },
+    { FRAC_CONST(0.008820275160808), FRAC_CONST(0.999961100616463) },
+    { FRAC_CONST(0.005752396229574), FRAC_CONST(0.999983454831938) },
+    { FRAC_CONST(0.002684463154596), FRAC_CONST(0.999996396822294) }
+};
+
+/* 64 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_256[] =
+{
+    { FRAC_CONST(0.999995293809576), FRAC_CONST(0.003067956762966) },
+    { FRAC_CONST(0.999618822495179), FRAC_CONST(0.027608145778966) },
+    { FRAC_CONST(0.998640218180265), FRAC_CONST(0.052131704680283) },
+    { FRAC_CONST(0.997060070339483), FRAC_CONST(0.076623861392031) },
+    { FRAC_CONST(0.994879330794806), FRAC_CONST(0.101069862754828) },
+    { FRAC_CONST(0.992099313142192), FRAC_CONST(0.125454983411546) },
+    { FRAC_CONST(0.988721691960324), FRAC_CONST(0.149764534677322) },
+    { FRAC_CONST(0.984748501801904), FRAC_CONST(0.173983873387464) },
+    { FRAC_CONST(0.980182135968117), FRAC_CONST(0.198098410717954) },
+    { FRAC_CONST(0.975025345066994), FRAC_CONST(0.222093620973204) },
+    { FRAC_CONST(0.969281235356549), FRAC_CONST(0.245955050335795) },
+    { FRAC_CONST(0.962953266873684), FRAC_CONST(0.269668325572915) },
+    { FRAC_CONST(0.956045251349996), FRAC_CONST(0.293219162694259) },
+    { FRAC_CONST(0.948561349915730), FRAC_CONST(0.316593375556166) },
+    { FRAC_CONST(0.940506070593268), FRAC_CONST(0.339776884406827) },
+    { FRAC_CONST(0.931884265581668), FRAC_CONST(0.362755724367397) },
+    { FRAC_CONST(0.922701128333879), FRAC_CONST(0.385516053843919) },
+    { FRAC_CONST(0.912962190428398), FRAC_CONST(0.408044162864979) },
+    { FRAC_CONST(0.902673318237259), FRAC_CONST(0.430326481340083) },
+    { FRAC_CONST(0.891840709392343), FRAC_CONST(0.452349587233771) },
+    { FRAC_CONST(0.880470889052161), FRAC_CONST(0.474100214650550) },
+    { FRAC_CONST(0.868570705971341), FRAC_CONST(0.495565261825773) },
+    { FRAC_CONST(0.856147328375194), FRAC_CONST(0.516731799017650) },
+    { FRAC_CONST(0.843208239641845), FRAC_CONST(0.537587076295645) },
+    { FRAC_CONST(0.829761233794523), FRAC_CONST(0.558118531220556) },
+    { FRAC_CONST(0.815814410806734), FRAC_CONST(0.578313796411656) },
+    { FRAC_CONST(0.801376171723140), FRAC_CONST(0.598160706996342) },
+    { FRAC_CONST(0.786455213599086), FRAC_CONST(0.617647307937804) },
+    { FRAC_CONST(0.771060524261814), FRAC_CONST(0.636761861236284) },
+    { FRAC_CONST(0.755201376896537), FRAC_CONST(0.655492852999615) },
+    { FRAC_CONST(0.738887324460615), FRAC_CONST(0.673829000378756) },
+    { FRAC_CONST(0.722128193929215), FRAC_CONST(0.691759258364158) },
+    { FRAC_CONST(0.704934080375905), FRAC_CONST(0.709272826438866) },
+    { FRAC_CONST(0.687315340891759), FRAC_CONST(0.726359155084346) },
+    { FRAC_CONST(0.669282588346636), FRAC_CONST(0.743007952135122) },
+    { FRAC_CONST(0.650846684996381), FRAC_CONST(0.759209188978388) },
+    { FRAC_CONST(0.632018735939809), FRAC_CONST(0.774953106594874) },
+    { FRAC_CONST(0.612810082429410), FRAC_CONST(0.790230221437310) },
+    { FRAC_CONST(0.593232295039800), FRAC_CONST(0.805031331142964) },
+    { FRAC_CONST(0.573297166698042), FRAC_CONST(0.819347520076797) },
+    { FRAC_CONST(0.553016705580028), FRAC_CONST(0.833170164701913) },
+    { FRAC_CONST(0.532403127877198), FRAC_CONST(0.846490938774052) },
+    { FRAC_CONST(0.511468850437971), FRAC_CONST(0.859301818357008) },
+    { FRAC_CONST(0.490226483288291), FRAC_CONST(0.871595086655951) },
+    { FRAC_CONST(0.468688822035828), FRAC_CONST(0.883363338665732) },
+    { FRAC_CONST(0.446868840162374), FRAC_CONST(0.894599485631383) },
+    { FRAC_CONST(0.424779681209109), FRAC_CONST(0.905296759318119) },
+    { FRAC_CONST(0.402434650859419), FRAC_CONST(0.915448716088268) },
+    { FRAC_CONST(0.379847208924051), FRAC_CONST(0.925049240782678) },
+    { FRAC_CONST(0.357030961233430), FRAC_CONST(0.934092550404259) },
+    { FRAC_CONST(0.333999651442009), FRAC_CONST(0.942573197601447) },
+    { FRAC_CONST(0.310767152749611), FRAC_CONST(0.950486073949482) },
+    { FRAC_CONST(0.287347459544730), FRAC_CONST(0.957826413027533) },
+    { FRAC_CONST(0.263754678974832), FRAC_CONST(0.964589793289813) },
+    { FRAC_CONST(0.240003022448742), FRAC_CONST(0.970772140728950) },
+    { FRAC_CONST(0.216106797076220), FRAC_CONST(0.976369731330021) },
+    { FRAC_CONST(0.192080397049892), FRAC_CONST(0.981379193313755) },
+    { FRAC_CONST(0.167938294974731), FRAC_CONST(0.985797509167567) },
+    { FRAC_CONST(0.143695033150295), FRAC_CONST(0.989622017463201) },
+    { FRAC_CONST(0.119365214810991), FRAC_CONST(0.992850414459865) },
+    { FRAC_CONST(0.094963495329639), FRAC_CONST(0.995480755491927) },
+    { FRAC_CONST(0.070504573389614), FRAC_CONST(0.997511456140303) },
+    { FRAC_CONST(0.046003182130915), FRAC_CONST(0.998941293186857) },
+    { FRAC_CONST(0.021474080275470), FRAC_CONST(0.999769405351215) }
+};
+
+#ifdef LD_DEC
+/* 256 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_1024[] =
+{
+    { FRAC_CONST(0.999999705862882), FRAC_CONST(0.000766990318743) },
+    { FRAC_CONST(0.999976174986898), FRAC_CONST(0.006902858724730) },
+    { FRAC_CONST(0.999914995573113), FRAC_CONST(0.013038467241987) },
+    { FRAC_CONST(0.999816169924900), FRAC_CONST(0.019173584868323) },
+    { FRAC_CONST(0.999679701762988), FRAC_CONST(0.025307980620025) },
+    { FRAC_CONST(0.999505596225325), FRAC_CONST(0.031441423540560) },
+    { FRAC_CONST(0.999293859866888), FRAC_CONST(0.037573682709270) },
+    { FRAC_CONST(0.999044500659429), FRAC_CONST(0.043704527250063) },
+    { FRAC_CONST(0.998757527991183), FRAC_CONST(0.049833726340107) },
+    { FRAC_CONST(0.998432952666508), FRAC_CONST(0.055961049218521) },
+    { FRAC_CONST(0.998070786905482), FRAC_CONST(0.062086265195060) },
+    { FRAC_CONST(0.997671044343441), FRAC_CONST(0.068209143658806) },
+    { FRAC_CONST(0.997233740030466), FRAC_CONST(0.074329454086846) },
+    { FRAC_CONST(0.996758890430818), FRAC_CONST(0.080446966052950) },
+    { FRAC_CONST(0.996246513422316), FRAC_CONST(0.086561449236251) },
+    { FRAC_CONST(0.995696628295664), FRAC_CONST(0.092672673429913) },
+    { FRAC_CONST(0.995109255753726), FRAC_CONST(0.098780408549800) },
+    { FRAC_CONST(0.994484417910748), FRAC_CONST(0.104884424643135) },
+    { FRAC_CONST(0.993822138291520), FRAC_CONST(0.110984491897163) },
+    { FRAC_CONST(0.993122441830496), FRAC_CONST(0.117080380647801) },
+    { FRAC_CONST(0.992385354870852), FRAC_CONST(0.123171861388280) },
+    { FRAC_CONST(0.991610905163495), FRAC_CONST(0.129258704777796) },
+    { FRAC_CONST(0.990799121866020), FRAC_CONST(0.135340681650134) },
+    { FRAC_CONST(0.989950035541609), FRAC_CONST(0.141417563022303) },
+    { FRAC_CONST(0.989063678157882), FRAC_CONST(0.147489120103154) },
+    { FRAC_CONST(0.988140083085693), FRAC_CONST(0.153555124301993) },
+    { FRAC_CONST(0.987179285097874), FRAC_CONST(0.159615347237193) },
+    { FRAC_CONST(0.986181320367928), FRAC_CONST(0.165669560744784) },
+    { FRAC_CONST(0.985146226468662), FRAC_CONST(0.171717536887050) },
+    { FRAC_CONST(0.984074042370776), FRAC_CONST(0.177759047961107) },
+    { FRAC_CONST(0.982964808441396), FRAC_CONST(0.183793866507478) },
+    { FRAC_CONST(0.981818566442553), FRAC_CONST(0.189821765318656) },
+    { FRAC_CONST(0.980635359529608), FRAC_CONST(0.195842517447658) },
+    { FRAC_CONST(0.979415232249635), FRAC_CONST(0.201855896216568) },
+    { FRAC_CONST(0.978158230539735), FRAC_CONST(0.207861675225075) },
+    { FRAC_CONST(0.976864401725313), FRAC_CONST(0.213859628358994) },
+    { FRAC_CONST(0.975533794518291), FRAC_CONST(0.219849529798779) },
+    { FRAC_CONST(0.974166459015280), FRAC_CONST(0.225831154028026) },
+    { FRAC_CONST(0.972762446695689), FRAC_CONST(0.231804275841965) },
+    { FRAC_CONST(0.971321810419786), FRAC_CONST(0.237768670355934) },
+    { FRAC_CONST(0.969844604426715), FRAC_CONST(0.243724113013852) },
+    { FRAC_CONST(0.968330884332445), FRAC_CONST(0.249670379596669) },
+    { FRAC_CONST(0.966780707127683), FRAC_CONST(0.255607246230807) },
+    { FRAC_CONST(0.965194131175725), FRAC_CONST(0.261534489396596) },
+    { FRAC_CONST(0.963571216210257), FRAC_CONST(0.267451885936678) },
+    { FRAC_CONST(0.961912023333112), FRAC_CONST(0.273359213064419) },
+    { FRAC_CONST(0.960216615011963), FRAC_CONST(0.279256248372291) },
+    { FRAC_CONST(0.958485055077976), FRAC_CONST(0.285142769840249) },
+    { FRAC_CONST(0.956717408723403), FRAC_CONST(0.291018555844085) },
+    { FRAC_CONST(0.954913742499131), FRAC_CONST(0.296883385163778) },
+    { FRAC_CONST(0.953074124312172), FRAC_CONST(0.302737036991819) },
+    { FRAC_CONST(0.951198623423113), FRAC_CONST(0.308579290941525) },
+    { FRAC_CONST(0.949287310443502), FRAC_CONST(0.314409927055337) },
+    { FRAC_CONST(0.947340257333192), FRAC_CONST(0.320228725813100) },
+    { FRAC_CONST(0.945357537397632), FRAC_CONST(0.326035468140330) },
+    { FRAC_CONST(0.943339225285108), FRAC_CONST(0.331829935416461) },
+    { FRAC_CONST(0.941285396983929), FRAC_CONST(0.337611909483075) },
+    { FRAC_CONST(0.939196129819570), FRAC_CONST(0.343381172652115) },
+    { FRAC_CONST(0.937071502451759), FRAC_CONST(0.349137507714085) },
+    { FRAC_CONST(0.934911594871516), FRAC_CONST(0.354880697946223) },
+    { FRAC_CONST(0.932716488398140), FRAC_CONST(0.360610527120662) },
+    { FRAC_CONST(0.930486265676150), FRAC_CONST(0.366326779512574) },
+    { FRAC_CONST(0.928221010672169), FRAC_CONST(0.372029239908285) },
+    { FRAC_CONST(0.925920808671770), FRAC_CONST(0.377717693613386) },
+    { FRAC_CONST(0.923585746276257), FRAC_CONST(0.383391926460809) },
+    { FRAC_CONST(0.921215911399409), FRAC_CONST(0.389051724818894) },
+    { FRAC_CONST(0.918811393264170), FRAC_CONST(0.394696875599434) },
+    { FRAC_CONST(0.916372282399289), FRAC_CONST(0.400327166265690) },
+    { FRAC_CONST(0.913898670635912), FRAC_CONST(0.405942384840403) },
+    { FRAC_CONST(0.911390651104122), FRAC_CONST(0.411542319913765) },
+    { FRAC_CONST(0.908848318229439), FRAC_CONST(0.417126760651388) },
+    { FRAC_CONST(0.906271767729258), FRAC_CONST(0.422695496802233) },
+    { FRAC_CONST(0.903661096609248), FRAC_CONST(0.428248318706532) },
+    { FRAC_CONST(0.901016403159702), FRAC_CONST(0.433785017303679) },
+    { FRAC_CONST(0.898337786951834), FRAC_CONST(0.439305384140100) },
+    { FRAC_CONST(0.895625348834030), FRAC_CONST(0.444809211377105) },
+    { FRAC_CONST(0.892879190928052), FRAC_CONST(0.450296291798709) },
+    { FRAC_CONST(0.890099416625192), FRAC_CONST(0.455766418819435) },
+    { FRAC_CONST(0.887286130582383), FRAC_CONST(0.461219386492092) },
+    { FRAC_CONST(0.884439438718254), FRAC_CONST(0.466654989515531) },
+    { FRAC_CONST(0.881559448209144), FRAC_CONST(0.472073023242369) },
+    { FRAC_CONST(0.878646267485068), FRAC_CONST(0.477473283686698) },
+    { FRAC_CONST(0.875700006225635), FRAC_CONST(0.482855567531766) },
+    { FRAC_CONST(0.872720775355914), FRAC_CONST(0.488219672137627) },
+    { FRAC_CONST(0.869708687042266), FRAC_CONST(0.493565395548775) },
+    { FRAC_CONST(0.866663854688111), FRAC_CONST(0.498892536501745) },
+    { FRAC_CONST(0.863586392929668), FRAC_CONST(0.504200894432690) },
+    { FRAC_CONST(0.860476417631632), FRAC_CONST(0.509490269484936) },
+    { FRAC_CONST(0.857334045882816), FRAC_CONST(0.514760462516501) },
+    { FRAC_CONST(0.854159395991739), FRAC_CONST(0.520011275107596) },
+    { FRAC_CONST(0.850952587482176), FRAC_CONST(0.525242509568095) },
+    { FRAC_CONST(0.847713741088654), FRAC_CONST(0.530453968944976) },
+    { FRAC_CONST(0.844442978751911), FRAC_CONST(0.535645457029741) },
+    { FRAC_CONST(0.841140423614298), FRAC_CONST(0.540816778365797) },
+    { FRAC_CONST(0.837806200015151), FRAC_CONST(0.545967738255818) },
+    { FRAC_CONST(0.834440433486103), FRAC_CONST(0.551098142769075) },
+    { FRAC_CONST(0.831043250746362), FRAC_CONST(0.556207798748740) },
+    { FRAC_CONST(0.827614779697938), FRAC_CONST(0.561296513819151) },
+    { FRAC_CONST(0.824155149420829), FRAC_CONST(0.566364096393064) },
+    { FRAC_CONST(0.820664490168157), FRAC_CONST(0.571410355678857) },
+    { FRAC_CONST(0.817142933361273), FRAC_CONST(0.576435101687722) },
+    { FRAC_CONST(0.813590611584799), FRAC_CONST(0.581438145240810) },
+    { FRAC_CONST(0.810007658581641), FRAC_CONST(0.586419297976361) },
+    { FRAC_CONST(0.806394209247956), FRAC_CONST(0.591378372356788) },
+    { FRAC_CONST(0.802750399628069), FRAC_CONST(0.596315181675744) },
+    { FRAC_CONST(0.799076366909352), FRAC_CONST(0.601229540065149) },
+    { FRAC_CONST(0.795372249417061), FRAC_CONST(0.606121262502186) },
+    { FRAC_CONST(0.791638186609126), FRAC_CONST(0.610990164816272) },
+    { FRAC_CONST(0.787874319070900), FRAC_CONST(0.615836063695985) },
+    { FRAC_CONST(0.784080788509870), FRAC_CONST(0.620658776695972) },
+    { FRAC_CONST(0.780257737750317), FRAC_CONST(0.625458122243814) },
+    { FRAC_CONST(0.776405310727940), FRAC_CONST(0.630233919646864) },
+    { FRAC_CONST(0.772523652484441), FRAC_CONST(0.634985989099049) },
+    { FRAC_CONST(0.768612909162058), FRAC_CONST(0.639714151687640) },
+    { FRAC_CONST(0.764673227998067), FRAC_CONST(0.644418229399988) },
+    { FRAC_CONST(0.760704757319237), FRAC_CONST(0.649098045130226) },
+    { FRAC_CONST(0.756707646536246), FRAC_CONST(0.653753422685936) },
+    { FRAC_CONST(0.752682046138055), FRAC_CONST(0.658384186794785) },
+    { FRAC_CONST(0.748628107686245), FRAC_CONST(0.662990163111121) },
+    { FRAC_CONST(0.744545983809307), FRAC_CONST(0.667571178222540) },
+    { FRAC_CONST(0.740435828196898), FRAC_CONST(0.672127059656412) },
+    { FRAC_CONST(0.736297795594053), FRAC_CONST(0.676657635886375) },
+    { FRAC_CONST(0.732132041795361), FRAC_CONST(0.681162736338795) },
+    { FRAC_CONST(0.727938723639099), FRAC_CONST(0.685642191399187) },
+    { FRAC_CONST(0.723717999001324), FRAC_CONST(0.690095832418600) },
+    { FRAC_CONST(0.719470026789933), FRAC_CONST(0.694523491719966) },
+    { FRAC_CONST(0.715194966938680), FRAC_CONST(0.698925002604414) },
+    { FRAC_CONST(0.710892980401152), FRAC_CONST(0.703300199357549) },
+    { FRAC_CONST(0.706564229144710), FRAC_CONST(0.707648917255684) },
+    { FRAC_CONST(0.702208876144392), FRAC_CONST(0.711970992572050) },
+    { FRAC_CONST(0.697827085376777), FRAC_CONST(0.716266262582953) },
+    { FRAC_CONST(0.693419021813812), FRAC_CONST(0.720534565573905) },
+    { FRAC_CONST(0.688984851416597), FRAC_CONST(0.724775740845711) },
+    { FRAC_CONST(0.684524741129142), FRAC_CONST(0.728989628720519) },
+    { FRAC_CONST(0.680038858872079), FRAC_CONST(0.733176070547833) },
+    { FRAC_CONST(0.675527373536339), FRAC_CONST(0.737334908710483) },
+    { FRAC_CONST(0.670990454976794), FRAC_CONST(0.741465986630563) },
+    { FRAC_CONST(0.666428274005865), FRAC_CONST(0.745569148775325) },
+    { FRAC_CONST(0.661841002387087), FRAC_CONST(0.749644240663033) },
+    { FRAC_CONST(0.657228812828643), FRAC_CONST(0.753691108868781) },
+    { FRAC_CONST(0.652591878976863), FRAC_CONST(0.757709601030268) },
+    { FRAC_CONST(0.647930375409685), FRAC_CONST(0.761699565853535) },
+    { FRAC_CONST(0.643244477630086), FRAC_CONST(0.765660853118662) },
+    { FRAC_CONST(0.638534362059467), FRAC_CONST(0.769593313685423) },
+    { FRAC_CONST(0.633800206031017), FRAC_CONST(0.773496799498899) },
+    { FRAC_CONST(0.629042187783036), FRAC_CONST(0.777371163595056) },
+    { FRAC_CONST(0.624260486452221), FRAC_CONST(0.781216260106276) },
+    { FRAC_CONST(0.619455282066924), FRAC_CONST(0.785031944266848) },
+    { FRAC_CONST(0.614626755540375), FRAC_CONST(0.788818072418420) },
+    { FRAC_CONST(0.609775088663868), FRAC_CONST(0.792574502015408) },
+    { FRAC_CONST(0.604900464099920), FRAC_CONST(0.796301091630359) },
+    { FRAC_CONST(0.600003065375389), FRAC_CONST(0.799997700959282) },
+    { FRAC_CONST(0.595083076874570), FRAC_CONST(0.803664190826924) },
+    { FRAC_CONST(0.590140683832249), FRAC_CONST(0.807300423192014) },
+    { FRAC_CONST(0.585176072326730), FRAC_CONST(0.810906261152460) },
+    { FRAC_CONST(0.580189429272832), FRAC_CONST(0.814481568950499) },
+    { FRAC_CONST(0.575180942414845), FRAC_CONST(0.818026211977813) },
+    { FRAC_CONST(0.570150800319470), FRAC_CONST(0.821540056780598) },
+    { FRAC_CONST(0.565099192368714), FRAC_CONST(0.825022971064580) },
+    { FRAC_CONST(0.560026308752760), FRAC_CONST(0.828474823700007) },
+    { FRAC_CONST(0.554932340462810), FRAC_CONST(0.831895484726578) },
+    { FRAC_CONST(0.549817479283891), FRAC_CONST(0.835284825358337) },
+    { FRAC_CONST(0.544681917787635), FRAC_CONST(0.838642717988527) },
+    { FRAC_CONST(0.539525849325029), FRAC_CONST(0.841969036194388) },
+    { FRAC_CONST(0.534349468019138), FRAC_CONST(0.845263654741918) },
+    { FRAC_CONST(0.529152968757791), FRAC_CONST(0.848526449590593) },
+    { FRAC_CONST(0.523936547186249), FRAC_CONST(0.851757297898029) },
+    { FRAC_CONST(0.518700399699835), FRAC_CONST(0.854956078024615) },
+    { FRAC_CONST(0.513444723436544), FRAC_CONST(0.858122669538086) },
+    { FRAC_CONST(0.508169716269615), FRAC_CONST(0.861256953218062) },
+    { FRAC_CONST(0.502875576800087), FRAC_CONST(0.864358811060534) },
+    { FRAC_CONST(0.497562504349319), FRAC_CONST(0.867428126282307) },
+    { FRAC_CONST(0.492230698951486), FRAC_CONST(0.870464783325398) },
+    { FRAC_CONST(0.486880361346047), FRAC_CONST(0.873468667861385) },
+    { FRAC_CONST(0.481511692970190), FRAC_CONST(0.876439666795714) },
+    { FRAC_CONST(0.476124895951244), FRAC_CONST(0.879377668271953) },
+    { FRAC_CONST(0.470720173099072), FRAC_CONST(0.882282561676009) },
+    { FRAC_CONST(0.465297727898435), FRAC_CONST(0.885154237640285) },
+    { FRAC_CONST(0.459857764501330), FRAC_CONST(0.887992588047806) },
+    { FRAC_CONST(0.454400487719304), FRAC_CONST(0.890797506036281) },
+    { FRAC_CONST(0.448926103015743), FRAC_CONST(0.893568886002136) },
+    { FRAC_CONST(0.443434816498138), FRAC_CONST(0.896306623604480) },
+    { FRAC_CONST(0.437926834910323), FRAC_CONST(0.899010615769039) },
+    { FRAC_CONST(0.432402365624690), FRAC_CONST(0.901680760692038) },
+    { FRAC_CONST(0.426861616634386), FRAC_CONST(0.904316957844028) },
+    { FRAC_CONST(0.421304796545480), FRAC_CONST(0.906919107973678) },
+    { FRAC_CONST(0.415732114569105), FRAC_CONST(0.909487113111505) },
+    { FRAC_CONST(0.410143780513590), FRAC_CONST(0.912020876573568) },
+    { FRAC_CONST(0.404540004776553), FRAC_CONST(0.914520302965104) },
+    { FRAC_CONST(0.398920998336983), FRAC_CONST(0.916985298184123) },
+    { FRAC_CONST(0.393286972747297), FRAC_CONST(0.919415769424947) },
+    { FRAC_CONST(0.387638140125373), FRAC_CONST(0.921811625181708) },
+    { FRAC_CONST(0.381974713146567), FRAC_CONST(0.924172775251791) },
+    { FRAC_CONST(0.376296905035705), FRAC_CONST(0.926499130739231) },
+    { FRAC_CONST(0.370604929559052), FRAC_CONST(0.928790604058057) },
+    { FRAC_CONST(0.364899001016267), FRAC_CONST(0.931047108935595) },
+    { FRAC_CONST(0.359179334232337), FRAC_CONST(0.933268560415712) },
+    { FRAC_CONST(0.353446144549481), FRAC_CONST(0.935454874862015) },
+    { FRAC_CONST(0.347699647819051), FRAC_CONST(0.937605969961000) },
+    { FRAC_CONST(0.341940060393402), FRAC_CONST(0.939721764725153) },
+    { FRAC_CONST(0.336167599117745), FRAC_CONST(0.941802179495998) },
+    { FRAC_CONST(0.330382481321983), FRAC_CONST(0.943847135947093) },
+    { FRAC_CONST(0.324584924812532), FRAC_CONST(0.945856557086984) },
+    { FRAC_CONST(0.318775147864118), FRAC_CONST(0.947830367262101) },
+    { FRAC_CONST(0.312953369211560), FRAC_CONST(0.949768492159607) },
+    { FRAC_CONST(0.307119808041533), FRAC_CONST(0.951670858810194) },
+    { FRAC_CONST(0.301274683984318), FRAC_CONST(0.953537395590833) },
+    { FRAC_CONST(0.295418217105532), FRAC_CONST(0.955368032227470) },
+    { FRAC_CONST(0.289550627897843), FRAC_CONST(0.957162699797670) },
+    { FRAC_CONST(0.283672137272669), FRAC_CONST(0.958921330733213) },
+    { FRAC_CONST(0.277782966551858), FRAC_CONST(0.960643858822638) },
+    { FRAC_CONST(0.271883337459360), FRAC_CONST(0.962330219213737) },
+    { FRAC_CONST(0.265973472112876), FRAC_CONST(0.963980348415994) },
+    { FRAC_CONST(0.260053593015495), FRAC_CONST(0.965594184302977) },
+    { FRAC_CONST(0.254123923047321), FRAC_CONST(0.967171666114677) },
+    { FRAC_CONST(0.248184685457075), FRAC_CONST(0.968712734459795) },
+    { FRAC_CONST(0.242236103853696), FRAC_CONST(0.970217331317979) },
+    { FRAC_CONST(0.236278402197920), FRAC_CONST(0.971685400042009) },
+    { FRAC_CONST(0.230311804793846), FRAC_CONST(0.973116885359925) },
+    { FRAC_CONST(0.224336536280494), FRAC_CONST(0.974511733377116) },
+    { FRAC_CONST(0.218352821623346), FRAC_CONST(0.975869891578341) },
+    { FRAC_CONST(0.212360886105879), FRAC_CONST(0.977191308829712) },
+    { FRAC_CONST(0.206360955321076), FRAC_CONST(0.978475935380617) },
+    { FRAC_CONST(0.200353255162940), FRAC_CONST(0.979723722865591) },
+    { FRAC_CONST(0.194338011817989), FRAC_CONST(0.980934624306142) },
+    { FRAC_CONST(0.188315451756732), FRAC_CONST(0.982108594112514) },
+    { FRAC_CONST(0.182285801725153), FRAC_CONST(0.983245588085407) },
+    { FRAC_CONST(0.176249288736168), FRAC_CONST(0.984345563417642) },
+    { FRAC_CONST(0.170206140061078), FRAC_CONST(0.985408478695768) },
+    { FRAC_CONST(0.164156583221016), FRAC_CONST(0.986434293901627) },
+    { FRAC_CONST(0.158100845978377), FRAC_CONST(0.987422970413855) },
+    { FRAC_CONST(0.152039156328246), FRAC_CONST(0.988374471009341) },
+    { FRAC_CONST(0.145971742489812), FRAC_CONST(0.989288759864625) },
+    { FRAC_CONST(0.139898832897777), FRAC_CONST(0.990165802557248) },
+    { FRAC_CONST(0.133820656193755), FRAC_CONST(0.991005566067049) },
+    { FRAC_CONST(0.127737441217662), FRAC_CONST(0.991808018777406) },
+    { FRAC_CONST(0.121649416999106), FRAC_CONST(0.992573130476429) },
+    { FRAC_CONST(0.115556812748755), FRAC_CONST(0.993300872358093) },
+    { FRAC_CONST(0.109459857849718), FRAC_CONST(0.993991217023329) },
+    { FRAC_CONST(0.103358781848900), FRAC_CONST(0.994644138481051) },
+    { FRAC_CONST(0.097253814448363), FRAC_CONST(0.995259612149133) },
+    { FRAC_CONST(0.091145185496681), FRAC_CONST(0.995837614855342) },
+    { FRAC_CONST(0.085033124980280), FRAC_CONST(0.996378124838200) },
+    { FRAC_CONST(0.078917863014785), FRAC_CONST(0.996881121747814) },
+    { FRAC_CONST(0.072799629836352), FRAC_CONST(0.997346586646633) },
+    { FRAC_CONST(0.066678655793002), FRAC_CONST(0.997774502010168) },
+    { FRAC_CONST(0.060555171335948), FRAC_CONST(0.998164851727646) },
+    { FRAC_CONST(0.054429407010919), FRAC_CONST(0.998517621102622) },
+    { FRAC_CONST(0.048301593449480), FRAC_CONST(0.998832796853528) },
+    { FRAC_CONST(0.042171961360348), FRAC_CONST(0.999110367114175) },
+    { FRAC_CONST(0.036040741520706), FRAC_CONST(0.999350321434199) },
+    { FRAC_CONST(0.029908164767517), FRAC_CONST(0.999552650779457) },
+    { FRAC_CONST(0.023774461988828), FRAC_CONST(0.999717347532362) },
+    { FRAC_CONST(0.017639864115082), FRAC_CONST(0.999844405492175) },
+    { FRAC_CONST(0.011504602110423), FRAC_CONST(0.999933819875236) },
+    { FRAC_CONST(0.005368906963996), FRAC_CONST(0.999985587315143) }
+};
+#endif // LD_DEC
+
+#ifdef ALLOW_SMALL_FRAMELENGTH
+/* 480 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_1920[] =
+{
+    { FRAC_CONST(0.999999916334328), FRAC_CONST(0.000409061532028) },
+    { FRAC_CONST(0.999993223088129), FRAC_CONST(0.003681545574400) },
+    { FRAC_CONST(0.999975820717897), FRAC_CONST(0.006953990190376) },
+    { FRAC_CONST(0.999947709409999), FRAC_CONST(0.010226360334704) },
+    { FRAC_CONST(0.999908889465485), FRAC_CONST(0.013498620962929) },
+    { FRAC_CONST(0.999859361300084), FRAC_CONST(0.016770737031768) },
+    { FRAC_CONST(0.999799125444203), FRAC_CONST(0.020042673499487) },
+    { FRAC_CONST(0.999728182542920), FRAC_CONST(0.023314395326274) },
+    { FRAC_CONST(0.999646533355977), FRAC_CONST(0.026585867474619) },
+    { FRAC_CONST(0.999554178757770), FRAC_CONST(0.029857054909681) },
+    { FRAC_CONST(0.999451119737344), FRAC_CONST(0.033127922599673) },
+    { FRAC_CONST(0.999337357398377), FRAC_CONST(0.036398435516228) },
+    { FRAC_CONST(0.999212892959173), FRAC_CONST(0.039668558634781) },
+    { FRAC_CONST(0.999077727752645), FRAC_CONST(0.042938256934941) },
+    { FRAC_CONST(0.998931863226306), FRAC_CONST(0.046207495400865) },
+    { FRAC_CONST(0.998775300942246), FRAC_CONST(0.049476239021636) },
+    { FRAC_CONST(0.998608042577122), FRAC_CONST(0.052744452791636) },
+    { FRAC_CONST(0.998430089922136), FRAC_CONST(0.056012101710921) },
+    { FRAC_CONST(0.998241444883019), FRAC_CONST(0.059279150785597) },
+    { FRAC_CONST(0.998042109480008), FRAC_CONST(0.062545565028192) },
+    { FRAC_CONST(0.997832085847824), FRAC_CONST(0.065811309458034) },
+    { FRAC_CONST(0.997611376235651), FRAC_CONST(0.069076349101624) },
+    { FRAC_CONST(0.997379983007114), FRAC_CONST(0.072340648993011) },
+    { FRAC_CONST(0.997137908640245), FRAC_CONST(0.075604174174166) },
+    { FRAC_CONST(0.996885155727469), FRAC_CONST(0.078866889695354) },
+    { FRAC_CONST(0.996621726975566), FRAC_CONST(0.082128760615515) },
+    { FRAC_CONST(0.996347625205645), FRAC_CONST(0.085389752002632) },
+    { FRAC_CONST(0.996062853353117), FRAC_CONST(0.088649828934106) },
+    { FRAC_CONST(0.995767414467660), FRAC_CONST(0.091908956497133) },
+    { FRAC_CONST(0.995461311713186), FRAC_CONST(0.095167099789075) },
+    { FRAC_CONST(0.995144548367810), FRAC_CONST(0.098424223917834) },
+    { FRAC_CONST(0.994817127823813), FRAC_CONST(0.101680294002229) },
+    { FRAC_CONST(0.994479053587606), FRAC_CONST(0.104935275172364) },
+    { FRAC_CONST(0.994130329279692), FRAC_CONST(0.108189132570007) },
+    { FRAC_CONST(0.993770958634630), FRAC_CONST(0.111441831348957) },
+    { FRAC_CONST(0.993400945500988), FRAC_CONST(0.114693336675426) },
+    { FRAC_CONST(0.993020293841312), FRAC_CONST(0.117943613728403) },
+    { FRAC_CONST(0.992629007732074), FRAC_CONST(0.121192627700032) },
+    { FRAC_CONST(0.992227091363634), FRAC_CONST(0.124440343795983) },
+    { FRAC_CONST(0.991814549040194), FRAC_CONST(0.127686727235827) },
+    { FRAC_CONST(0.991391385179751), FRAC_CONST(0.130931743253405) },
+    { FRAC_CONST(0.990957604314048), FRAC_CONST(0.134175357097202) },
+    { FRAC_CONST(0.990513211088533), FRAC_CONST(0.137417534030720) },
+    { FRAC_CONST(0.990058210262297), FRAC_CONST(0.140658239332849) },
+    { FRAC_CONST(0.989592606708036), FRAC_CONST(0.143897438298239) },
+    { FRAC_CONST(0.989116405411988), FRAC_CONST(0.147135096237670) },
+    { FRAC_CONST(0.988629611473887), FRAC_CONST(0.150371178478428) },
+    { FRAC_CONST(0.988132230106905), FRAC_CONST(0.153605650364672) },
+    { FRAC_CONST(0.987624266637598), FRAC_CONST(0.156838477257806) },
+    { FRAC_CONST(0.987105726505845), FRAC_CONST(0.160069624536852) },
+    { FRAC_CONST(0.986576615264794), FRAC_CONST(0.163299057598817) },
+    { FRAC_CONST(0.986036938580803), FRAC_CONST(0.166526741859069) },
+    { FRAC_CONST(0.985486702233375), FRAC_CONST(0.169752642751702) },
+    { FRAC_CONST(0.984925912115099), FRAC_CONST(0.172976725729910) },
+    { FRAC_CONST(0.984354574231587), FRAC_CONST(0.176198956266353) },
+    { FRAC_CONST(0.983772694701407), FRAC_CONST(0.179419299853531) },
+    { FRAC_CONST(0.983180279756024), FRAC_CONST(0.182637722004152) },
+    { FRAC_CONST(0.982577335739725), FRAC_CONST(0.185854188251500) },
+    { FRAC_CONST(0.981963869109555), FRAC_CONST(0.189068664149806) },
+    { FRAC_CONST(0.981339886435250), FRAC_CONST(0.192281115274616) },
+    { FRAC_CONST(0.980705394399163), FRAC_CONST(0.195491507223158) },
+    { FRAC_CONST(0.980060399796194), FRAC_CONST(0.198699805614714) },
+    { FRAC_CONST(0.979404909533716), FRAC_CONST(0.201905976090986) },
+    { FRAC_CONST(0.978738930631504), FRAC_CONST(0.205109984316464) },
+    { FRAC_CONST(0.978062470221657), FRAC_CONST(0.208311795978794) },
+    { FRAC_CONST(0.977375535548522), FRAC_CONST(0.211511376789145) },
+    { FRAC_CONST(0.976678133968618), FRAC_CONST(0.214708692482577) },
+    { FRAC_CONST(0.975970272950556), FRAC_CONST(0.217903708818409) },
+    { FRAC_CONST(0.975251960074958), FRAC_CONST(0.221096391580581) },
+    { FRAC_CONST(0.974523203034377), FRAC_CONST(0.224286706578026) },
+    { FRAC_CONST(0.973784009633218), FRAC_CONST(0.227474619645035) },
+    { FRAC_CONST(0.973034387787646), FRAC_CONST(0.230660096641619) },
+    { FRAC_CONST(0.972274345525510), FRAC_CONST(0.233843103453878) },
+    { FRAC_CONST(0.971503890986252), FRAC_CONST(0.237023605994367) },
+    { FRAC_CONST(0.970723032420820), FRAC_CONST(0.240201570202459) },
+    { FRAC_CONST(0.969931778191584), FRAC_CONST(0.243376962044711) },
+    { FRAC_CONST(0.969130136772239), FRAC_CONST(0.246549747515226) },
+    { FRAC_CONST(0.968318116747721), FRAC_CONST(0.249719892636022) },
+    { FRAC_CONST(0.967495726814114), FRAC_CONST(0.252887363457390) },
+    { FRAC_CONST(0.966662975778551), FRAC_CONST(0.256052126058264) },
+    { FRAC_CONST(0.965819872559127), FRAC_CONST(0.259214146546579) },
+    { FRAC_CONST(0.964966426184802), FRAC_CONST(0.262373391059634) },
+    { FRAC_CONST(0.964102645795299), FRAC_CONST(0.265529825764461) },
+    { FRAC_CONST(0.963228540641012), FRAC_CONST(0.268683416858178) },
+    { FRAC_CONST(0.962344120082907), FRAC_CONST(0.271834130568359) },
+    { FRAC_CONST(0.961449393592416), FRAC_CONST(0.274981933153391) },
+    { FRAC_CONST(0.960544370751341), FRAC_CONST(0.278126790902837) },
+    { FRAC_CONST(0.959629061251750), FRAC_CONST(0.281268670137799) },
+    { FRAC_CONST(0.958703474895872), FRAC_CONST(0.284407537211272) },
+    { FRAC_CONST(0.957767621595993), FRAC_CONST(0.287543358508512) },
+    { FRAC_CONST(0.956821511374351), FRAC_CONST(0.290676100447394) },
+    { FRAC_CONST(0.955865154363025), FRAC_CONST(0.293805729478766) },
+    { FRAC_CONST(0.954898560803832), FRAC_CONST(0.296932212086818) },
+    { FRAC_CONST(0.953921741048211), FRAC_CONST(0.300055514789431) },
+    { FRAC_CONST(0.952934705557117), FRAC_CONST(0.303175604138543) },
+    { FRAC_CONST(0.951937464900908), FRAC_CONST(0.306292446720504) },
+    { FRAC_CONST(0.950930029759229), FRAC_CONST(0.309406009156434) },
+    { FRAC_CONST(0.949912410920903), FRAC_CONST(0.312516258102580) },
+    { FRAC_CONST(0.948884619283808), FRAC_CONST(0.315623160250676) },
+    { FRAC_CONST(0.947846665854767), FRAC_CONST(0.318726682328294) },
+    { FRAC_CONST(0.946798561749429), FRAC_CONST(0.321826791099207) },
+    { FRAC_CONST(0.945740318192145), FRAC_CONST(0.324923453363742) },
+    { FRAC_CONST(0.944671946515855), FRAC_CONST(0.328016635959131) },
+    { FRAC_CONST(0.943593458161960), FRAC_CONST(0.331106305759876) },
+    { FRAC_CONST(0.942504864680205), FRAC_CONST(0.334192429678095) },
+    { FRAC_CONST(0.941406177728551), FRAC_CONST(0.337274974663880) },
+    { FRAC_CONST(0.940297409073052), FRAC_CONST(0.340353907705650) },
+    { FRAC_CONST(0.939178570587730), FRAC_CONST(0.343429195830507) },
+    { FRAC_CONST(0.938049674254446), FRAC_CONST(0.346500806104585) },
+    { FRAC_CONST(0.936910732162774), FRAC_CONST(0.349568705633406) },
+    { FRAC_CONST(0.935761756509868), FRAC_CONST(0.352632861562230) },
+    { FRAC_CONST(0.934602759600334), FRAC_CONST(0.355693241076410) },
+    { FRAC_CONST(0.933433753846097), FRAC_CONST(0.358749811401739) },
+    { FRAC_CONST(0.932254751766271), FRAC_CONST(0.361802539804806) },
+    { FRAC_CONST(0.931065765987021), FRAC_CONST(0.364851393593340) },
+    { FRAC_CONST(0.929866809241428), FRAC_CONST(0.367896340116568) },
+    { FRAC_CONST(0.928657894369357), FRAC_CONST(0.370937346765559) },
+    { FRAC_CONST(0.927439034317314), FRAC_CONST(0.373974380973575) },
+    { FRAC_CONST(0.926210242138311), FRAC_CONST(0.377007410216418) },
+    { FRAC_CONST(0.924971530991726), FRAC_CONST(0.380036402012783) },
+    { FRAC_CONST(0.923722914143160), FRAC_CONST(0.383061323924602) },
+    { FRAC_CONST(0.922464404964295), FRAC_CONST(0.386082143557389) },
+    { FRAC_CONST(0.921196016932755), FRAC_CONST(0.389098828560595) },
+    { FRAC_CONST(0.919917763631956), FRAC_CONST(0.392111346627946) },
+    { FRAC_CONST(0.918629658750963), FRAC_CONST(0.395119665497795) },
+    { FRAC_CONST(0.917331716084346), FRAC_CONST(0.398123752953462) },
+    { FRAC_CONST(0.916023949532027), FRAC_CONST(0.401123576823585) },
+    { FRAC_CONST(0.914706373099136), FRAC_CONST(0.404119104982459) },
+    { FRAC_CONST(0.913379000895858), FRAC_CONST(0.407110305350386) },
+    { FRAC_CONST(0.912041847137282), FRAC_CONST(0.410097145894012) },
+    { FRAC_CONST(0.910694926143251), FRAC_CONST(0.413079594626675) },
+    { FRAC_CONST(0.909338252338207), FRAC_CONST(0.416057619608744) },
+    { FRAC_CONST(0.907971840251037), FRAC_CONST(0.419031188947965) },
+    { FRAC_CONST(0.906595704514915), FRAC_CONST(0.422000270799800) },
+    { FRAC_CONST(0.905209859867151), FRAC_CONST(0.424964833367766) },
+    { FRAC_CONST(0.903814321149027), FRAC_CONST(0.427924844903780) },
+    { FRAC_CONST(0.902409103305641), FRAC_CONST(0.430880273708497) },
+    { FRAC_CONST(0.900994221385748), FRAC_CONST(0.433831088131649) },
+    { FRAC_CONST(0.899569690541596), FRAC_CONST(0.436777256572384) },
+    { FRAC_CONST(0.898135526028766), FRAC_CONST(0.439718747479604) },
+    { FRAC_CONST(0.896691743206008), FRAC_CONST(0.442655529352306) },
+    { FRAC_CONST(0.895238357535076), FRAC_CONST(0.445587570739915) },
+    { FRAC_CONST(0.893775384580563), FRAC_CONST(0.448514840242624) },
+    { FRAC_CONST(0.892302840009734), FRAC_CONST(0.451437306511726) },
+    { FRAC_CONST(0.890820739592359), FRAC_CONST(0.454354938249958) },
+    { FRAC_CONST(0.889329099200541), FRAC_CONST(0.457267704211826) },
+    { FRAC_CONST(0.887827934808551), FRAC_CONST(0.460175573203949) },
+    { FRAC_CONST(0.886317262492655), FRAC_CONST(0.463078514085383) },
+    { FRAC_CONST(0.884797098430938), FRAC_CONST(0.465976495767966) },
+    { FRAC_CONST(0.883267458903136), FRAC_CONST(0.468869487216642) },
+    { FRAC_CONST(0.881728360290461), FRAC_CONST(0.471757457449795) },
+    { FRAC_CONST(0.880179819075421), FRAC_CONST(0.474640375539586) },
+    { FRAC_CONST(0.878621851841649), FRAC_CONST(0.477518210612278) },
+    { FRAC_CONST(0.877054475273722), FRAC_CONST(0.480390931848569) },
+    { FRAC_CONST(0.875477706156984), FRAC_CONST(0.483258508483922) },
+    { FRAC_CONST(0.873891561377366), FRAC_CONST(0.486120909808896) },
+    { FRAC_CONST(0.872296057921204), FRAC_CONST(0.488978105169472) },
+    { FRAC_CONST(0.870691212875058), FRAC_CONST(0.491830063967383) },
+    { FRAC_CONST(0.869077043425529), FRAC_CONST(0.494676755660442) },
+    { FRAC_CONST(0.867453566859076), FRAC_CONST(0.497518149762867) },
+    { FRAC_CONST(0.865820800561827), FRAC_CONST(0.500354215845611) },
+    { FRAC_CONST(0.864178762019399), FRAC_CONST(0.503184923536685) },
+    { FRAC_CONST(0.862527468816704), FRAC_CONST(0.506010242521482) },
+    { FRAC_CONST(0.860866938637767), FRAC_CONST(0.508830142543107) },
+    { FRAC_CONST(0.859197189265532), FRAC_CONST(0.511644593402696) },
+    { FRAC_CONST(0.857518238581672), FRAC_CONST(0.514453564959741) },
+    { FRAC_CONST(0.855830104566401), FRAC_CONST(0.517257027132414) },
+    { FRAC_CONST(0.854132805298278), FRAC_CONST(0.520054949897887) },
+    { FRAC_CONST(0.852426358954015), FRAC_CONST(0.522847303292655) },
+    { FRAC_CONST(0.850710783808280), FRAC_CONST(0.525634057412856) },
+    { FRAC_CONST(0.848986098233506), FRAC_CONST(0.528415182414593) },
+    { FRAC_CONST(0.847252320699689), FRAC_CONST(0.531190648514252) },
+    { FRAC_CONST(0.845509469774194), FRAC_CONST(0.533960425988819) },
+    { FRAC_CONST(0.843757564121554), FRAC_CONST(0.536724485176205) },
+    { FRAC_CONST(0.841996622503271), FRAC_CONST(0.539482796475555) },
+    { FRAC_CONST(0.840226663777615), FRAC_CONST(0.542235330347571) },
+    { FRAC_CONST(0.838447706899422), FRAC_CONST(0.544982057314827) },
+    { FRAC_CONST(0.836659770919891), FRAC_CONST(0.547722947962084) },
+    { FRAC_CONST(0.834862874986380), FRAC_CONST(0.550457972936605) },
+    { FRAC_CONST(0.833057038342201), FRAC_CONST(0.553187102948470) },
+    { FRAC_CONST(0.831242280326413), FRAC_CONST(0.555910308770889) },
+    { FRAC_CONST(0.829418620373617), FRAC_CONST(0.558627561240515) },
+    { FRAC_CONST(0.827586078013746), FRAC_CONST(0.561338831257758) },
+    { FRAC_CONST(0.825744672871856), FRAC_CONST(0.564044089787093) },
+    { FRAC_CONST(0.823894424667918), FRAC_CONST(0.566743307857377) },
+    { FRAC_CONST(0.822035353216601), FRAC_CONST(0.569436456562150) },
+    { FRAC_CONST(0.820167478427070), FRAC_CONST(0.572123507059955) },
+    { FRAC_CONST(0.818290820302761), FRAC_CONST(0.574804430574639) },
+    { FRAC_CONST(0.816405398941175), FRAC_CONST(0.577479198395666) },
+    { FRAC_CONST(0.814511234533661), FRAC_CONST(0.580147781878420) },
+    { FRAC_CONST(0.812608347365198), FRAC_CONST(0.582810152444517) },
+    { FRAC_CONST(0.810696757814178), FRAC_CONST(0.585466281582107) },
+    { FRAC_CONST(0.808776486352191), FRAC_CONST(0.588116140846181) },
+    { FRAC_CONST(0.806847553543799), FRAC_CONST(0.590759701858874) },
+    { FRAC_CONST(0.804909980046325), FRAC_CONST(0.593396936309773) },
+    { FRAC_CONST(0.802963786609623), FRAC_CONST(0.596027815956215) },
+    { FRAC_CONST(0.801008994075862), FRAC_CONST(0.598652312623592) },
+    { FRAC_CONST(0.799045623379300), FRAC_CONST(0.601270398205654) },
+    { FRAC_CONST(0.797073695546059), FRAC_CONST(0.603882044664808) },
+    { FRAC_CONST(0.795093231693901), FRAC_CONST(0.606487224032418) },
+    { FRAC_CONST(0.793104253032005), FRAC_CONST(0.609085908409106) },
+    { FRAC_CONST(0.791106780860733), FRAC_CONST(0.611678069965050) },
+    { FRAC_CONST(0.789100836571407), FRAC_CONST(0.614263680940283) },
+    { FRAC_CONST(0.787086441646080), FRAC_CONST(0.616842713644988) },
+    { FRAC_CONST(0.785063617657302), FRAC_CONST(0.619415140459796) },
+    { FRAC_CONST(0.783032386267894), FRAC_CONST(0.621980933836084) },
+    { FRAC_CONST(0.780992769230711), FRAC_CONST(0.624540066296266) },
+    { FRAC_CONST(0.778944788388414), FRAC_CONST(0.627092510434089) },
+    { FRAC_CONST(0.776888465673232), FRAC_CONST(0.629638238914927) },
+    { FRAC_CONST(0.774823823106730), FRAC_CONST(0.632177224476073) },
+    { FRAC_CONST(0.772750882799570), FRAC_CONST(0.634709439927031) },
+    { FRAC_CONST(0.770669666951277), FRAC_CONST(0.637234858149809) },
+    { FRAC_CONST(0.768580197850002), FRAC_CONST(0.639753452099206) },
+    { FRAC_CONST(0.766482497872280), FRAC_CONST(0.642265194803105) },
+    { FRAC_CONST(0.764376589482793), FRAC_CONST(0.644770059362758) },
+    { FRAC_CONST(0.762262495234126), FRAC_CONST(0.647268018953079) },
+    { FRAC_CONST(0.760140237766532), FRAC_CONST(0.649759046822928) },
+    { FRAC_CONST(0.758009839807683), FRAC_CONST(0.652243116295397) },
+    { FRAC_CONST(0.755871324172429), FRAC_CONST(0.654720200768098) },
+    { FRAC_CONST(0.753724713762555), FRAC_CONST(0.657190273713446) },
+    { FRAC_CONST(0.751570031566534), FRAC_CONST(0.659653308678945) },
+    { FRAC_CONST(0.749407300659280), FRAC_CONST(0.662109279287469) },
+    { FRAC_CONST(0.747236544201905), FRAC_CONST(0.664558159237545) },
+    { FRAC_CONST(0.745057785441466), FRAC_CONST(0.666999922303638) },
+    { FRAC_CONST(0.742871047710719), FRAC_CONST(0.669434542336425) },
+    { FRAC_CONST(0.740676354427868), FRAC_CONST(0.671861993263083) },
+    { FRAC_CONST(0.738473729096316), FRAC_CONST(0.674282249087562) },
+    { FRAC_CONST(0.736263195304409), FRAC_CONST(0.676695283890867) },
+    { FRAC_CONST(0.734044776725190), FRAC_CONST(0.679101071831334) },
+    { FRAC_CONST(0.731818497116138), FRAC_CONST(0.681499587144906) },
+    { FRAC_CONST(0.729584380318920), FRAC_CONST(0.683890804145412) },
+    { FRAC_CONST(0.727342450259131), FRAC_CONST(0.686274697224838) },
+    { FRAC_CONST(0.725092730946042), FRAC_CONST(0.688651240853606) },
+    { FRAC_CONST(0.722835246472338), FRAC_CONST(0.691020409580841) },
+    { FRAC_CONST(0.720570021013866), FRAC_CONST(0.693382178034651) },
+    { FRAC_CONST(0.718297078829369), FRAC_CONST(0.695736520922392) },
+    { FRAC_CONST(0.716016444260233), FRAC_CONST(0.698083413030944) },
+    { FRAC_CONST(0.713728141730222), FRAC_CONST(0.700422829226978) },
+    { FRAC_CONST(0.711432195745216), FRAC_CONST(0.702754744457225) },
+    { FRAC_CONST(0.709128630892954), FRAC_CONST(0.705079133748748) },
+    { FRAC_CONST(0.706817471842764), FRAC_CONST(0.707395972209203) },
+    { FRAC_CONST(0.704498743345302), FRAC_CONST(0.709705235027113) },
+    { FRAC_CONST(0.702172470232289), FRAC_CONST(0.712006897472128) },
+    { FRAC_CONST(0.699838677416240), FRAC_CONST(0.714300934895292) },
+    { FRAC_CONST(0.697497389890200), FRAC_CONST(0.716587322729308) },
+    { FRAC_CONST(0.695148632727480), FRAC_CONST(0.718866036488799) },
+    { FRAC_CONST(0.692792431081381), FRAC_CONST(0.721137051770570) },
+    { FRAC_CONST(0.690428810184929), FRAC_CONST(0.723400344253874) },
+    { FRAC_CONST(0.688057795350606), FRAC_CONST(0.725655889700665) },
+    { FRAC_CONST(0.685679411970075), FRAC_CONST(0.727903663955865) },
+    { FRAC_CONST(0.683293685513912), FRAC_CONST(0.730143642947616) },
+    { FRAC_CONST(0.680900641531330), FRAC_CONST(0.732375802687543) },
+    { FRAC_CONST(0.678500305649909), FRAC_CONST(0.734600119271009) },
+    { FRAC_CONST(0.676092703575316), FRAC_CONST(0.736816568877370) },
+    { FRAC_CONST(0.673677861091036), FRAC_CONST(0.739025127770231) },
+    { FRAC_CONST(0.671255804058092), FRAC_CONST(0.741225772297702) },
+    { FRAC_CONST(0.668826558414768), FRAC_CONST(0.743418478892647) },
+    { FRAC_CONST(0.666390150176334), FRAC_CONST(0.745603224072940) },
+    { FRAC_CONST(0.663946605434765), FRAC_CONST(0.747779984441716) },
+    { FRAC_CONST(0.661495950358462), FRAC_CONST(0.749948736687619) },
+    { FRAC_CONST(0.659038211191971), FRAC_CONST(0.752109457585056) },
+    { FRAC_CONST(0.656573414255705), FRAC_CONST(0.754262123994441) },
+    { FRAC_CONST(0.654101585945659), FRAC_CONST(0.756406712862448) },
+    { FRAC_CONST(0.651622752733128), FRAC_CONST(0.758543201222251) },
+    { FRAC_CONST(0.649136941164425), FRAC_CONST(0.760671566193777) },
+    { FRAC_CONST(0.646644177860593), FRAC_CONST(0.762791784983948) },
+    { FRAC_CONST(0.644144489517126), FRAC_CONST(0.764903834886923) },
+    { FRAC_CONST(0.641637902903677), FRAC_CONST(0.767007693284345) },
+    { FRAC_CONST(0.639124444863776), FRAC_CONST(0.769103337645580) },
+    { FRAC_CONST(0.636604142314538), FRAC_CONST(0.771190745527961) },
+    { FRAC_CONST(0.634077022246379), FRAC_CONST(0.773269894577026) },
+    { FRAC_CONST(0.631543111722725), FRAC_CONST(0.775340762526760) },
+    { FRAC_CONST(0.629002437879721), FRAC_CONST(0.777403327199831) },
+    { FRAC_CONST(0.626455027925944), FRAC_CONST(0.779457566507828) },
+    { FRAC_CONST(0.623900909142107), FRAC_CONST(0.781503458451498) },
+    { FRAC_CONST(0.621340108880771), FRAC_CONST(0.783540981120982) },
+    { FRAC_CONST(0.618772654566049), FRAC_CONST(0.785570112696050) },
+    { FRAC_CONST(0.616198573693314), FRAC_CONST(0.787590831446332) },
+    { FRAC_CONST(0.613617893828905), FRAC_CONST(0.789603115731555) },
+    { FRAC_CONST(0.611030642609828), FRAC_CONST(0.791606944001769) },
+    { FRAC_CONST(0.608436847743468), FRAC_CONST(0.793602294797585) },
+    { FRAC_CONST(0.605836537007281), FRAC_CONST(0.795589146750397) },
+    { FRAC_CONST(0.603229738248508), FRAC_CONST(0.797567478582619) },
+    { FRAC_CONST(0.600616479383869), FRAC_CONST(0.799537269107905) },
+    { FRAC_CONST(0.597996788399267), FRAC_CONST(0.801498497231381) },
+    { FRAC_CONST(0.595370693349487), FRAC_CONST(0.803451141949871) },
+    { FRAC_CONST(0.592738222357898), FRAC_CONST(0.805395182352117) },
+    { FRAC_CONST(0.590099403616149), FRAC_CONST(0.807330597619008) },
+    { FRAC_CONST(0.587454265383869), FRAC_CONST(0.809257367023803) },
+    { FRAC_CONST(0.584802835988364), FRAC_CONST(0.811175469932349) },
+    { FRAC_CONST(0.582145143824311), FRAC_CONST(0.813084885803304) },
+    { FRAC_CONST(0.579481217353460), FRAC_CONST(0.814985594188359) },
+    { FRAC_CONST(0.576811085104321), FRAC_CONST(0.816877574732454) },
+    { FRAC_CONST(0.574134775671867), FRAC_CONST(0.818760807173997) },
+    { FRAC_CONST(0.571452317717222), FRAC_CONST(0.820635271345081) },
+    { FRAC_CONST(0.568763739967354), FRAC_CONST(0.822500947171703) },
+    { FRAC_CONST(0.566069071214772), FRAC_CONST(0.824357814673971) },
+    { FRAC_CONST(0.563368340317214), FRAC_CONST(0.826205853966327) },
+    { FRAC_CONST(0.560661576197336), FRAC_CONST(0.828045045257756) },
+    { FRAC_CONST(0.557948807842409), FRAC_CONST(0.829875368851995) },
+    { FRAC_CONST(0.555230064304002), FRAC_CONST(0.831696805147750) },
+    { FRAC_CONST(0.552505374697674), FRAC_CONST(0.833509334638900) },
+    { FRAC_CONST(0.549774768202663), FRAC_CONST(0.835312937914713) },
+    { FRAC_CONST(0.547038274061568), FRAC_CONST(0.837107595660044) },
+    { FRAC_CONST(0.544295921580046), FRAC_CONST(0.838893288655553) },
+    { FRAC_CONST(0.541547740126486), FRAC_CONST(0.840669997777901) },
+    { FRAC_CONST(0.538793759131706), FRAC_CONST(0.842437703999961) },
+    { FRAC_CONST(0.536034008088628), FRAC_CONST(0.844196388391019) },
+    { FRAC_CONST(0.533268516551970), FRAC_CONST(0.845946032116980) },
+    { FRAC_CONST(0.530497314137923), FRAC_CONST(0.847686616440563) },
+    { FRAC_CONST(0.527720430523840), FRAC_CONST(0.849418122721510) },
+    { FRAC_CONST(0.524937895447912), FRAC_CONST(0.851140532416778) },
+    { FRAC_CONST(0.522149738708856), FRAC_CONST(0.852853827080745) },
+    { FRAC_CONST(0.519355990165590), FRAC_CONST(0.854557988365401) },
+    { FRAC_CONST(0.516556679736915), FRAC_CONST(0.856252998020546) },
+    { FRAC_CONST(0.513751837401199), FRAC_CONST(0.857938837893991) },
+    { FRAC_CONST(0.510941493196049), FRAC_CONST(0.859615489931744) },
+    { FRAC_CONST(0.508125677217994), FRAC_CONST(0.861282936178208) },
+    { FRAC_CONST(0.505304419622159), FRAC_CONST(0.862941158776375) },
+    { FRAC_CONST(0.502477750621949), FRAC_CONST(0.864590139968012) },
+    { FRAC_CONST(0.499645700488717), FRAC_CONST(0.866229862093855) },
+    { FRAC_CONST(0.496808299551444), FRAC_CONST(0.867860307593799) },
+    { FRAC_CONST(0.493965578196415), FRAC_CONST(0.869481459007080) },
+    { FRAC_CONST(0.491117566866892), FRAC_CONST(0.871093298972471) },
+    { FRAC_CONST(0.488264296062789), FRAC_CONST(0.872695810228461) },
+    { FRAC_CONST(0.485405796340343), FRAC_CONST(0.874288975613440) },
+    { FRAC_CONST(0.482542098311789), FRAC_CONST(0.875872778065888) },
+    { FRAC_CONST(0.479673232645033), FRAC_CONST(0.877447200624553) },
+    { FRAC_CONST(0.476799230063322), FRAC_CONST(0.879012226428633) },
+    { FRAC_CONST(0.473920121344914), FRAC_CONST(0.880567838717962) },
+    { FRAC_CONST(0.471035937322751), FRAC_CONST(0.882114020833179) },
+    { FRAC_CONST(0.468146708884125), FRAC_CONST(0.883650756215917) },
+    { FRAC_CONST(0.465252466970353), FRAC_CONST(0.885178028408975) },
+    { FRAC_CONST(0.462353242576441), FRAC_CONST(0.886695821056495) },
+    { FRAC_CONST(0.459449066750752), FRAC_CONST(0.888204117904136) },
+    { FRAC_CONST(0.456539970594675), FRAC_CONST(0.889702902799251) },
+    { FRAC_CONST(0.453625985262295), FRAC_CONST(0.891192159691058) },
+    { FRAC_CONST(0.450707141960053), FRAC_CONST(0.892671872630812) },
+    { FRAC_CONST(0.447783471946415), FRAC_CONST(0.894142025771977) },
+    { FRAC_CONST(0.444855006531538), FRAC_CONST(0.895602603370393) },
+    { FRAC_CONST(0.441921777076935), FRAC_CONST(0.897053589784447) },
+    { FRAC_CONST(0.438983814995137), FRAC_CONST(0.898494969475242) },
+    { FRAC_CONST(0.436041151749356), FRAC_CONST(0.899926727006758) },
+    { FRAC_CONST(0.433093818853152), FRAC_CONST(0.901348847046022) },
+    { FRAC_CONST(0.430141847870093), FRAC_CONST(0.902761314363272) },
+    { FRAC_CONST(0.427185270413416), FRAC_CONST(0.904164113832116) },
+    { FRAC_CONST(0.424224118145690), FRAC_CONST(0.905557230429701) },
+    { FRAC_CONST(0.421258422778478), FRAC_CONST(0.906940649236866) },
+    { FRAC_CONST(0.418288216071994), FRAC_CONST(0.908314355438308) },
+    { FRAC_CONST(0.415313529834766), FRAC_CONST(0.909678334322736) },
+    { FRAC_CONST(0.412334395923293), FRAC_CONST(0.911032571283032) },
+    { FRAC_CONST(0.409350846241706), FRAC_CONST(0.912377051816407) },
+    { FRAC_CONST(0.406362912741425), FRAC_CONST(0.913711761524555) },
+    { FRAC_CONST(0.403370627420818), FRAC_CONST(0.915036686113806) },
+    { FRAC_CONST(0.400374022324857), FRAC_CONST(0.916351811395282) },
+    { FRAC_CONST(0.397373129544774), FRAC_CONST(0.917657123285050) },
+    { FRAC_CONST(0.394367981217720), FRAC_CONST(0.918952607804266) },
+    { FRAC_CONST(0.391358609526420), FRAC_CONST(0.920238251079332) },
+    { FRAC_CONST(0.388345046698826), FRAC_CONST(0.921514039342042) },
+    { FRAC_CONST(0.385327325007776), FRAC_CONST(0.922779958929729) },
+    { FRAC_CONST(0.382305476770645), FRAC_CONST(0.924035996285410) },
+    { FRAC_CONST(0.379279534348999), FRAC_CONST(0.925282137957935) },
+    { FRAC_CONST(0.376249530148250), FRAC_CONST(0.926518370602127) },
+    { FRAC_CONST(0.373215496617310), FRAC_CONST(0.927744680978929) },
+    { FRAC_CONST(0.370177466248239), FRAC_CONST(0.928961055955541) },
+    { FRAC_CONST(0.367135471575903), FRAC_CONST(0.930167482505564) },
+    { FRAC_CONST(0.364089545177621), FRAC_CONST(0.931363947709140) },
+    { FRAC_CONST(0.361039719672816), FRAC_CONST(0.932550438753087) },
+    { FRAC_CONST(0.357986027722671), FRAC_CONST(0.933726942931039) },
+    { FRAC_CONST(0.354928502029772), FRAC_CONST(0.934893447643582) },
+    { FRAC_CONST(0.351867175337763), FRAC_CONST(0.936049940398387) },
+    { FRAC_CONST(0.348802080430994), FRAC_CONST(0.937196408810347) },
+    { FRAC_CONST(0.345733250134169), FRAC_CONST(0.938332840601705) },
+    { FRAC_CONST(0.342660717311994), FRAC_CONST(0.939459223602190) },
+    { FRAC_CONST(0.339584514868829), FRAC_CONST(0.940575545749145) },
+    { FRAC_CONST(0.336504675748328), FRAC_CONST(0.941681795087657) },
+    { FRAC_CONST(0.333421232933097), FRAC_CONST(0.942777959770684) },
+    { FRAC_CONST(0.330334219444328), FRAC_CONST(0.943864028059183) },
+    { FRAC_CONST(0.327243668341457), FRAC_CONST(0.944939988322235) },
+    { FRAC_CONST(0.324149612721804), FRAC_CONST(0.946005829037171) },
+    { FRAC_CONST(0.321052085720218), FRAC_CONST(0.947061538789691) },
+    { FRAC_CONST(0.317951120508725), FRAC_CONST(0.948107106273994) },
+    { FRAC_CONST(0.314846750296171), FRAC_CONST(0.949142520292891) },
+    { FRAC_CONST(0.311739008327867), FRAC_CONST(0.950167769757930) },
+    { FRAC_CONST(0.308627927885232), FRAC_CONST(0.951182843689513) },
+    { FRAC_CONST(0.305513542285440), FRAC_CONST(0.952187731217013) },
+    { FRAC_CONST(0.302395884881056), FRAC_CONST(0.953182421578893) },
+    { FRAC_CONST(0.299274989059689), FRAC_CONST(0.954166904122818) },
+    { FRAC_CONST(0.296150888243624), FRAC_CONST(0.955141168305771) },
+    { FRAC_CONST(0.293023615889471), FRAC_CONST(0.956105203694164) },
+    { FRAC_CONST(0.289893205487806), FRAC_CONST(0.957058999963955) },
+    { FRAC_CONST(0.286759690562807), FRAC_CONST(0.958002546900750) },
+    { FRAC_CONST(0.283623104671904), FRAC_CONST(0.958935834399920) },
+    { FRAC_CONST(0.280483481405410), FRAC_CONST(0.959858852466706) },
+    { FRAC_CONST(0.277340854386169), FRAC_CONST(0.960771591216325) },
+    { FRAC_CONST(0.274195257269191), FRAC_CONST(0.961674040874080) },
+    { FRAC_CONST(0.271046723741295), FRAC_CONST(0.962566191775459) },
+    { FRAC_CONST(0.267895287520743), FRAC_CONST(0.963448034366243) },
+    { FRAC_CONST(0.264740982356888), FRAC_CONST(0.964319559202607) },
+    { FRAC_CONST(0.261583842029803), FRAC_CONST(0.965180756951218) },
+    { FRAC_CONST(0.258423900349924), FRAC_CONST(0.966031618389343) },
+    { FRAC_CONST(0.255261191157689), FRAC_CONST(0.966872134404937) },
+    { FRAC_CONST(0.252095748323171), FRAC_CONST(0.967702295996750) },
+    { FRAC_CONST(0.248927605745720), FRAC_CONST(0.968522094274417) },
+    { FRAC_CONST(0.245756797353599), FRAC_CONST(0.969331520458559) },
+    { FRAC_CONST(0.242583357103617), FRAC_CONST(0.970130565880871) },
+    { FRAC_CONST(0.239407318980770), FRAC_CONST(0.970919221984218) },
+    { FRAC_CONST(0.236228716997876), FRAC_CONST(0.971697480322728) },
+    { FRAC_CONST(0.233047585195206), FRAC_CONST(0.972465332561878) },
+    { FRAC_CONST(0.229863957640129), FRAC_CONST(0.973222770478587) },
+    { FRAC_CONST(0.226677868426735), FRAC_CONST(0.973969785961306) },
+    { FRAC_CONST(0.223489351675482), FRAC_CONST(0.974706371010097) },
+    { FRAC_CONST(0.220298441532823), FRAC_CONST(0.975432517736727) },
+    { FRAC_CONST(0.217105172170841), FRAC_CONST(0.976148218364747) },
+    { FRAC_CONST(0.213909577786886), FRAC_CONST(0.976853465229579) },
+    { FRAC_CONST(0.210711692603206), FRAC_CONST(0.977548250778596) },
+    { FRAC_CONST(0.207511550866582), FRAC_CONST(0.978232567571202) },
+    { FRAC_CONST(0.204309186847962), FRAC_CONST(0.978906408278914) },
+    { FRAC_CONST(0.201104634842092), FRAC_CONST(0.979569765685441) },
+    { FRAC_CONST(0.197897929167148), FRAC_CONST(0.980222632686756) },
+    { FRAC_CONST(0.194689104164373), FRAC_CONST(0.980865002291179) },
+    { FRAC_CONST(0.191478194197704), FRAC_CONST(0.981496867619447) },
+    { FRAC_CONST(0.188265233653407), FRAC_CONST(0.982118221904791) },
+    { FRAC_CONST(0.185050256939710), FRAC_CONST(0.982729058493005) },
+    { FRAC_CONST(0.181833298486427), FRAC_CONST(0.983329370842520) },
+    { FRAC_CONST(0.178614392744603), FRAC_CONST(0.983919152524473) },
+    { FRAC_CONST(0.175393574186129), FRAC_CONST(0.984498397222776) },
+    { FRAC_CONST(0.172170877303385), FRAC_CONST(0.985067098734184) },
+    { FRAC_CONST(0.168946336608867), FRAC_CONST(0.985625250968360) },
+    { FRAC_CONST(0.165719986634814), FRAC_CONST(0.986172847947943) },
+    { FRAC_CONST(0.162491861932842), FRAC_CONST(0.986709883808609) },
+    { FRAC_CONST(0.159261997073573), FRAC_CONST(0.987236352799134) },
+    { FRAC_CONST(0.156030426646266), FRAC_CONST(0.987752249281460) },
+    { FRAC_CONST(0.152797185258443), FRAC_CONST(0.988257567730749) },
+    { FRAC_CONST(0.149562307535523), FRAC_CONST(0.988752302735447) },
+    { FRAC_CONST(0.146325828120446), FRAC_CONST(0.989236448997339) },
+    { FRAC_CONST(0.143087781673307), FRAC_CONST(0.989710001331608) },
+    { FRAC_CONST(0.139848202870981), FRAC_CONST(0.990172954666889) },
+    { FRAC_CONST(0.136607126406757), FRAC_CONST(0.990625304045323) },
+    { FRAC_CONST(0.133364586989957), FRAC_CONST(0.991067044622612) },
+    { FRAC_CONST(0.130120619345575), FRAC_CONST(0.991498171668069) },
+    { FRAC_CONST(0.126875258213898), FRAC_CONST(0.991918680564670) },
+    { FRAC_CONST(0.123628538350136), FRAC_CONST(0.992328566809103) },
+    { FRAC_CONST(0.120380494524051), FRAC_CONST(0.992727826011815) },
+    { FRAC_CONST(0.117131161519582), FRAC_CONST(0.993116453897061) },
+    { FRAC_CONST(0.113880574134475), FRAC_CONST(0.993494446302948) },
+    { FRAC_CONST(0.110628767179910), FRAC_CONST(0.993861799181482) },
+    { FRAC_CONST(0.107375775480128), FRAC_CONST(0.994218508598608) },
+    { FRAC_CONST(0.104121633872055), FRAC_CONST(0.994564570734255) },
+    { FRAC_CONST(0.100866377204933), FRAC_CONST(0.994899981882376) },
+    { FRAC_CONST(0.097610040339947), FRAC_CONST(0.995224738450986) },
+    { FRAC_CONST(0.094352658149849), FRAC_CONST(0.995538836962204) },
+    { FRAC_CONST(0.091094265518583), FRAC_CONST(0.995842274052287) },
+    { FRAC_CONST(0.087834897340919), FRAC_CONST(0.996135046471667) },
+    { FRAC_CONST(0.084574588522070), FRAC_CONST(0.996417151084987) },
+    { FRAC_CONST(0.081313373977324), FRAC_CONST(0.996688584871134) },
+    { FRAC_CONST(0.078051288631670), FRAC_CONST(0.996949344923269) },
+    { FRAC_CONST(0.074788367419420), FRAC_CONST(0.997199428448862) },
+    { FRAC_CONST(0.071524645283840), FRAC_CONST(0.997438832769720) },
+    { FRAC_CONST(0.068260157176771), FRAC_CONST(0.997667555322013) },
+    { FRAC_CONST(0.064994938058259), FRAC_CONST(0.997885593656308) },
+    { FRAC_CONST(0.061729022896176), FRAC_CONST(0.998092945437590) },
+    { FRAC_CONST(0.058462446665851), FRAC_CONST(0.998289608445286) },
+    { FRAC_CONST(0.055195244349690), FRAC_CONST(0.998475580573295) },
+    { FRAC_CONST(0.051927450936806), FRAC_CONST(0.998650859830004) },
+    { FRAC_CONST(0.048659101422640), FRAC_CONST(0.998815444338313) },
+    { FRAC_CONST(0.045390230808591), FRAC_CONST(0.998969332335654) },
+    { FRAC_CONST(0.042120874101635), FRAC_CONST(0.999112522174011) },
+    { FRAC_CONST(0.038851066313958), FRAC_CONST(0.999245012319936) },
+    { FRAC_CONST(0.035580842462574), FRAC_CONST(0.999366801354564) },
+    { FRAC_CONST(0.032310237568951), FRAC_CONST(0.999477887973635) },
+    { FRAC_CONST(0.029039286658643), FRAC_CONST(0.999578270987499) },
+    { FRAC_CONST(0.025768024760904), FRAC_CONST(0.999667949321134) },
+    { FRAC_CONST(0.022496486908322), FRAC_CONST(0.999746922014158) },
+    { FRAC_CONST(0.019224708136438), FRAC_CONST(0.999815188220837) },
+    { FRAC_CONST(0.015952723483375), FRAC_CONST(0.999872747210095) },
+    { FRAC_CONST(0.012680567989461), FRAC_CONST(0.999919598365521) },
+    { FRAC_CONST(0.009408276696850), FRAC_CONST(0.999955741185376) },
+    { FRAC_CONST(0.006135884649155), FRAC_CONST(0.999981175282601) },
+    { FRAC_CONST(0.002863426891064), FRAC_CONST(0.999995900384816) }
+};
+
+#ifdef LD_DEC
+/* 240 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_960[] =
+{
+    { FRAC_CONST(0.999999665337326), FRAC_CONST(0.000818122995607) },
+    { FRAC_CONST(0.999972892444367), FRAC_CONST(0.007363041249780) },
+    { FRAC_CONST(0.999903284040864), FRAC_CONST(0.013907644095771) },
+    { FRAC_CONST(0.999790843108610), FRAC_CONST(0.020451651184577) },
+    { FRAC_CONST(0.999635574464198), FRAC_CONST(0.026994782192715) },
+    { FRAC_CONST(0.999437484758823), FRAC_CONST(0.033536756834230) },
+    { FRAC_CONST(0.999196582477986), FRAC_CONST(0.040077294872701) },
+    { FRAC_CONST(0.998912877941140), FRAC_CONST(0.046616116133247) },
+    { FRAC_CONST(0.998586383301244), FRAC_CONST(0.053152940514528) },
+    { FRAC_CONST(0.998217112544241), FRAC_CONST(0.059687488000744) },
+    { FRAC_CONST(0.997805081488460), FRAC_CONST(0.066219478673630) },
+    { FRAC_CONST(0.997350307783942), FRAC_CONST(0.072748632724445) },
+    { FRAC_CONST(0.996852810911678), FRAC_CONST(0.079274670465961) },
+    { FRAC_CONST(0.996312612182778), FRAC_CONST(0.085797312344440) },
+    { FRAC_CONST(0.995729734737558), FRAC_CONST(0.092316278951614) },
+    { FRAC_CONST(0.995104203544548), FRAC_CONST(0.098831291036650) },
+    { FRAC_CONST(0.994436045399422), FRAC_CONST(0.105342069518114) },
+    { FRAC_CONST(0.993725288923851), FRAC_CONST(0.111848335495926) },
+    { FRAC_CONST(0.992971964564277), FRAC_CONST(0.118349810263305) },
+    { FRAC_CONST(0.992176104590608), FRAC_CONST(0.124846215318711) },
+    { FRAC_CONST(0.991337743094838), FRAC_CONST(0.131337272377774) },
+    { FRAC_CONST(0.990456915989581), FRAC_CONST(0.137822703385212) },
+    { FRAC_CONST(0.989533661006540), FRAC_CONST(0.144302230526747) },
+    { FRAC_CONST(0.988568017694885), FRAC_CONST(0.150775576241001) },
+    { FRAC_CONST(0.987560027419562), FRAC_CONST(0.157242463231389) },
+    { FRAC_CONST(0.986509733359519), FRAC_CONST(0.163702614477995) },
+    { FRAC_CONST(0.985417180505858), FRAC_CONST(0.170155753249442) },
+    { FRAC_CONST(0.984282415659907), FRAC_CONST(0.176601603114742) },
+    { FRAC_CONST(0.983105487431216), FRAC_CONST(0.183039887955141) },
+    { FRAC_CONST(0.981886446235473), FRAC_CONST(0.189470331975943) },
+    { FRAC_CONST(0.980625344292344), FRAC_CONST(0.195892659718330) },
+    { FRAC_CONST(0.979322235623241), FRAC_CONST(0.202306596071156) },
+    { FRAC_CONST(0.977977176049000), FRAC_CONST(0.208711866282735) },
+    { FRAC_CONST(0.976590223187499), FRAC_CONST(0.215108195972610) },
+    { FRAC_CONST(0.975161436451181), FRAC_CONST(0.221495311143304) },
+    { FRAC_CONST(0.973690877044515), FRAC_CONST(0.227872938192063) },
+    { FRAC_CONST(0.972178607961371), FRAC_CONST(0.234240803922570) },
+    { FRAC_CONST(0.970624693982323), FRAC_CONST(0.240598635556650) },
+    { FRAC_CONST(0.969029201671875), FRAC_CONST(0.246946160745958) },
+    { FRAC_CONST(0.967392199375607), FRAC_CONST(0.253283107583640) },
+    { FRAC_CONST(0.965713757217249), FRAC_CONST(0.259609204615985) },
+    { FRAC_CONST(0.963993947095677), FRAC_CONST(0.265924180854051) },
+    { FRAC_CONST(0.962232842681832), FRAC_CONST(0.272227765785273) },
+    { FRAC_CONST(0.960430519415566), FRAC_CONST(0.278519689385053) },
+    { FRAC_CONST(0.958587054502409), FRAC_CONST(0.284799682128326) },
+    { FRAC_CONST(0.956702526910263), FRAC_CONST(0.291067475001103) },
+    { FRAC_CONST(0.954777017366017), FRAC_CONST(0.297322799511998) },
+    { FRAC_CONST(0.952810608352092), FRAC_CONST(0.303565387703730) },
+    { FRAC_CONST(0.950803384102905), FRAC_CONST(0.309794972164597) },
+    { FRAC_CONST(0.948755430601263), FRAC_CONST(0.316011286039934) },
+    { FRAC_CONST(0.946666835574676), FRAC_CONST(0.322214063043544) },
+    { FRAC_CONST(0.944537688491606), FRAC_CONST(0.328403037469105) },
+    { FRAC_CONST(0.942368080557626), FRAC_CONST(0.334577944201551) },
+    { FRAC_CONST(0.940158104711519), FRAC_CONST(0.340738518728429) },
+    { FRAC_CONST(0.937907855621296), FRAC_CONST(0.346884497151231) },
+    { FRAC_CONST(0.935617429680138), FRAC_CONST(0.353015616196696) },
+    { FRAC_CONST(0.933286925002268), FRAC_CONST(0.359131613228090) },
+    { FRAC_CONST(0.930916441418752), FRAC_CONST(0.365232226256457) },
+    { FRAC_CONST(0.928506080473216), FRAC_CONST(0.371317193951838) },
+    { FRAC_CONST(0.926055945417500), FRAC_CONST(0.377386255654469) },
+    { FRAC_CONST(0.923566141207236), FRAC_CONST(0.383439151385947) },
+    { FRAC_CONST(0.921036774497350), FRAC_CONST(0.389475621860365) },
+    { FRAC_CONST(0.918467953637492), FRAC_CONST(0.395495408495417) },
+    { FRAC_CONST(0.915859788667400), FRAC_CONST(0.401498253423481) },
+    { FRAC_CONST(0.913212391312179), FRAC_CONST(0.407483899502658) },
+    { FRAC_CONST(0.910525874977521), FRAC_CONST(0.413452090327791) },
+    { FRAC_CONST(0.907800354744844), FRAC_CONST(0.419402570241451) },
+    { FRAC_CONST(0.905035947366364), FRAC_CONST(0.425335084344881) },
+    { FRAC_CONST(0.902232771260093), FRAC_CONST(0.431249378508924) },
+    { FRAC_CONST(0.899390946504764), FRAC_CONST(0.437145199384900) },
+    { FRAC_CONST(0.896510594834693), FRAC_CONST(0.443022294415467) },
+    { FRAC_CONST(0.893591839634558), FRAC_CONST(0.448880411845433) },
+    { FRAC_CONST(0.890634805934118), FRAC_CONST(0.454719300732547) },
+    { FRAC_CONST(0.887639620402854), FRAC_CONST(0.460538710958240) },
+    { FRAC_CONST(0.884606411344546), FRAC_CONST(0.466338393238348) },
+    { FRAC_CONST(0.881535308691775), FRAC_CONST(0.472118099133784) },
+    { FRAC_CONST(0.878426444000357), FRAC_CONST(0.477877581061184) },
+    { FRAC_CONST(0.875279950443708), FRAC_CONST(0.483616592303511) },
+    { FRAC_CONST(0.872095962807140), FRAC_CONST(0.489334887020625) },
+    { FRAC_CONST(0.868874617482085), FRAC_CONST(0.495032220259813) },
+    { FRAC_CONST(0.865616052460258), FRAC_CONST(0.500708347966279) },
+    { FRAC_CONST(0.862320407327736), FRAC_CONST(0.506363026993605) },
+    { FRAC_CONST(0.858987823258990), FRAC_CONST(0.511996015114162) },
+    { FRAC_CONST(0.855618443010829), FRAC_CONST(0.517607071029487) },
+    { FRAC_CONST(0.852212410916289), FRAC_CONST(0.523195954380619) },
+    { FRAC_CONST(0.848769872878448), FRAC_CONST(0.528762425758396) },
+    { FRAC_CONST(0.845290976364179), FRAC_CONST(0.534306246713712) },
+    { FRAC_CONST(0.841775870397828), FRAC_CONST(0.539827179767727) },
+    { FRAC_CONST(0.838224705554838), FRAC_CONST(0.545324988422046) },
+    { FRAC_CONST(0.834637633955290), FRAC_CONST(0.550799437168844) },
+    { FRAC_CONST(0.831014809257393), FRAC_CONST(0.556250291500956) },
+    { FRAC_CONST(0.827356386650900), FRAC_CONST(0.561677317921925) },
+    { FRAC_CONST(0.823662522850458), FRAC_CONST(0.567080283956001) },
+    { FRAC_CONST(0.819933376088899), FRAC_CONST(0.572458958158102) },
+    { FRAC_CONST(0.816169106110459), FRAC_CONST(0.577813110123727) },
+    { FRAC_CONST(0.812369874163934), FRAC_CONST(0.583142510498826) },
+    { FRAC_CONST(0.808535842995778), FRAC_CONST(0.588446930989624) },
+    { FRAC_CONST(0.804667176843123), FRAC_CONST(0.593726144372402) },
+    { FRAC_CONST(0.800764041426753), FRAC_CONST(0.598979924503229) },
+    { FRAC_CONST(0.796826603943998), FRAC_CONST(0.604208046327650) },
+    { FRAC_CONST(0.792855033061574), FRAC_CONST(0.609410285890327) },
+    { FRAC_CONST(0.788849498908361), FRAC_CONST(0.614586420344631) },
+    { FRAC_CONST(0.784810173068109), FRAC_CONST(0.619736227962191) },
+    { FRAC_CONST(0.780737228572094), FRAC_CONST(0.624859488142386) },
+    { FRAC_CONST(0.776630839891703), FRAC_CONST(0.629955981421804) },
+    { FRAC_CONST(0.772491182930959), FRAC_CONST(0.635025489483633) },
+    { FRAC_CONST(0.768318435018988), FRAC_CONST(0.640067795167023) },
+    { FRAC_CONST(0.764112774902423), FRAC_CONST(0.645082682476378) },
+    { FRAC_CONST(0.759874382737746), FRAC_CONST(0.650069936590618) },
+    { FRAC_CONST(0.755603440083571), FRAC_CONST(0.655029343872374) },
+    { FRAC_CONST(0.751300129892866), FRAC_CONST(0.659960691877147) },
+    { FRAC_CONST(0.746964636505118), FRAC_CONST(0.664863769362399) },
+    { FRAC_CONST(0.742597145638433), FRAC_CONST(0.669738366296610) },
+    { FRAC_CONST(0.738197844381584), FRAC_CONST(0.674584273868271) },
+    { FRAC_CONST(0.733766921185995), FRAC_CONST(0.679401284494831) },
+    { FRAC_CONST(0.729304565857668), FRAC_CONST(0.684189191831585) },
+    { FRAC_CONST(0.724810969549055), FRAC_CONST(0.688947790780520) },
+    { FRAC_CONST(0.720286324750863), FRAC_CONST(0.693676877499095) },
+    { FRAC_CONST(0.715730825283819), FRAC_CONST(0.698376249408973) },
+    { FRAC_CONST(0.711144666290356), FRAC_CONST(0.703045705204703) },
+    { FRAC_CONST(0.706528044226263), FRAC_CONST(0.707685044862340) },
+    { FRAC_CONST(0.701881156852263), FRAC_CONST(0.712294069648014) },
+    { FRAC_CONST(0.697204203225545), FRAC_CONST(0.716872582126442) },
+    { FRAC_CONST(0.692497383691237), FRAC_CONST(0.721420386169390) },
+    { FRAC_CONST(0.687760899873822), FRAC_CONST(0.725937286964068) },
+    { FRAC_CONST(0.682994954668502), FRAC_CONST(0.730423091021479) },
+    { FRAC_CONST(0.678199752232508), FRAC_CONST(0.734877606184707) },
+    { FRAC_CONST(0.673375497976352), FRAC_CONST(0.739300641637149) },
+    { FRAC_CONST(0.668522398555031), FRAC_CONST(0.743692007910687) },
+    { FRAC_CONST(0.663640661859171), FRAC_CONST(0.748051516893805) },
+    { FRAC_CONST(0.658730497006124), FRAC_CONST(0.752378981839648) },
+    { FRAC_CONST(0.653792114331011), FRAC_CONST(0.756674217374021) },
+    { FRAC_CONST(0.648825725377709), FRAC_CONST(0.760937039503328) },
+    { FRAC_CONST(0.643831542889792), FRAC_CONST(0.765167265622459) },
+    { FRAC_CONST(0.638809780801414), FRAC_CONST(0.769364714522605) },
+    { FRAC_CONST(0.633760654228152), FRAC_CONST(0.773529206399025) },
+    { FRAC_CONST(0.628684379457781), FRAC_CONST(0.777660562858748) },
+    { FRAC_CONST(0.623581173941019), FRAC_CONST(0.781758606928213) },
+    { FRAC_CONST(0.618451256282204), FRAC_CONST(0.785823163060853) },
+    { FRAC_CONST(0.613294846229936), FRAC_CONST(0.789854057144609) },
+    { FRAC_CONST(0.608112164667659), FRAC_CONST(0.793851116509396) },
+    { FRAC_CONST(0.602903433604202), FRAC_CONST(0.797814169934493) },
+    { FRAC_CONST(0.597668876164268), FRAC_CONST(0.801743047655882) },
+    { FRAC_CONST(0.592408716578875), FRAC_CONST(0.805637581373517) },
+    { FRAC_CONST(0.587123180175754), FRAC_CONST(0.809497604258536) },
+    { FRAC_CONST(0.581812493369691), FRAC_CONST(0.813322950960406) },
+    { FRAC_CONST(0.576476883652835), FRAC_CONST(0.817113457614006) },
+    { FRAC_CONST(0.571116579584947), FRAC_CONST(0.820868961846646) },
+    { FRAC_CONST(0.565731810783613), FRAC_CONST(0.824589302785025) },
+    { FRAC_CONST(0.560322807914407), FRAC_CONST(0.828274321062119) },
+    { FRAC_CONST(0.554889802681009), FRAC_CONST(0.831923858824010) },
+    { FRAC_CONST(0.549433027815281), FRAC_CONST(0.835537759736646) },
+    { FRAC_CONST(0.543952717067296), FRAC_CONST(0.839115868992540) },
+    { FRAC_CONST(0.538449105195327), FRAC_CONST(0.842658033317402) },
+    { FRAC_CONST(0.532922427955790), FRAC_CONST(0.846164100976699) },
+    { FRAC_CONST(0.527372922093142), FRAC_CONST(0.849633921782164) },
+    { FRAC_CONST(0.521800825329746), FRAC_CONST(0.853067347098221) },
+    { FRAC_CONST(0.516206376355680), FRAC_CONST(0.856464229848356) },
+    { FRAC_CONST(0.510589814818519), FRAC_CONST(0.859824424521420) },
+    { FRAC_CONST(0.504951381313066), FRAC_CONST(0.863147787177854) },
+    { FRAC_CONST(0.499291317371047), FRAC_CONST(0.866434175455865) },
+    { FRAC_CONST(0.493609865450762), FRAC_CONST(0.869683448577516) },
+    { FRAC_CONST(0.487907268926702), FRAC_CONST(0.872895467354761) },
+    { FRAC_CONST(0.482183772079123), FRAC_CONST(0.876070094195407) },
+    { FRAC_CONST(0.476439620083580), FRAC_CONST(0.879207193109004) },
+    { FRAC_CONST(0.470675059000427), FRAC_CONST(0.882306629712678) },
+    { FRAC_CONST(0.464890335764274), FRAC_CONST(0.885368271236879) },
+    { FRAC_CONST(0.459085698173413), FRAC_CONST(0.888391986531075) },
+    { FRAC_CONST(0.453261394879198), FRAC_CONST(0.891377646069366) },
+    { FRAC_CONST(0.447417675375397), FRAC_CONST(0.894325121956035) },
+    { FRAC_CONST(0.441554789987504), FRAC_CONST(0.897234287931024) },
+    { FRAC_CONST(0.435672989862017), FRAC_CONST(0.900105019375345) },
+    { FRAC_CONST(0.429772526955677), FRAC_CONST(0.902937193316419) },
+    { FRAC_CONST(0.423853654024676), FRAC_CONST(0.905730688433339) },
+    { FRAC_CONST(0.417916624613831), FRAC_CONST(0.908485385062073) },
+    { FRAC_CONST(0.411961693045722), FRAC_CONST(0.911201165200584) },
+    { FRAC_CONST(0.405989114409798), FRAC_CONST(0.913877912513892) },
+    { FRAC_CONST(0.399999144551449), FRAC_CONST(0.916515512339049) },
+    { FRAC_CONST(0.393992040061048), FRAC_CONST(0.919113851690058) },
+    { FRAC_CONST(0.387968058262959), FRAC_CONST(0.921672819262709) },
+    { FRAC_CONST(0.381927457204511), FRAC_CONST(0.924192305439348) },
+    { FRAC_CONST(0.375870495644949), FRAC_CONST(0.926672202293573) },
+    { FRAC_CONST(0.369797433044349), FRAC_CONST(0.929112403594856) },
+    { FRAC_CONST(0.363708529552499), FRAC_CONST(0.931512804813095) },
+    { FRAC_CONST(0.357604045997758), FRAC_CONST(0.933873303123091) },
+    { FRAC_CONST(0.351484243875885), FRAC_CONST(0.936193797408954) },
+    { FRAC_CONST(0.345349385338836), FRAC_CONST(0.938474188268430) },
+    { FRAC_CONST(0.339199733183530), FRAC_CONST(0.940714378017165) },
+    { FRAC_CONST(0.333035550840599), FRAC_CONST(0.942914270692887) },
+    { FRAC_CONST(0.326857102363098), FRAC_CONST(0.945073772059514) },
+    { FRAC_CONST(0.320664652415198), FRAC_CONST(0.947192789611197) },
+    { FRAC_CONST(0.314458466260842), FRAC_CONST(0.949271232576274) },
+    { FRAC_CONST(0.308238809752391), FRAC_CONST(0.951309011921168) },
+    { FRAC_CONST(0.302005949319228), FRAC_CONST(0.953306040354194) },
+    { FRAC_CONST(0.295760151956351), FRAC_CONST(0.955262232329299) },
+    { FRAC_CONST(0.289501685212929), FRAC_CONST(0.957177504049732) },
+    { FRAC_CONST(0.283230817180850), FRAC_CONST(0.959051773471624) },
+    { FRAC_CONST(0.276947816483228), FRAC_CONST(0.960884960307514) },
+    { FRAC_CONST(0.270652952262902), FRAC_CONST(0.962676986029777) },
+    { FRAC_CONST(0.264346494170904), FRAC_CONST(0.964427773873996) },
+    { FRAC_CONST(0.258028712354909), FRAC_CONST(0.966137248842248) },
+    { FRAC_CONST(0.251699877447663), FRAC_CONST(0.967805337706313) },
+    { FRAC_CONST(0.245360260555389), FRAC_CONST(0.969431969010818) },
+    { FRAC_CONST(0.239010133246176), FRAC_CONST(0.971017073076290) },
+    { FRAC_CONST(0.232649767538342), FRAC_CONST(0.972560582002147) },
+    { FRAC_CONST(0.226279435888785), FRAC_CONST(0.974062429669605) },
+    { FRAC_CONST(0.219899411181310), FRAC_CONST(0.975522551744506) },
+    { FRAC_CONST(0.213509966714943), FRAC_CONST(0.976940885680082) },
+    { FRAC_CONST(0.207111376192219), FRAC_CONST(0.978317370719628) },
+    { FRAC_CONST(0.200703913707458), FRAC_CONST(0.979651947899104) },
+    { FRAC_CONST(0.194287853735029), FRAC_CONST(0.980944560049668) },
+    { FRAC_CONST(0.187863471117585), FRAC_CONST(0.982195151800116) },
+    { FRAC_CONST(0.181431041054297), FRAC_CONST(0.983403669579260) },
+    { FRAC_CONST(0.174990839089060), FRAC_CONST(0.984570061618221) },
+    { FRAC_CONST(0.168543141098691), FRAC_CONST(0.985694277952645) },
+    { FRAC_CONST(0.162088223281113), FRAC_CONST(0.986776270424848) },
+    { FRAC_CONST(0.155626362143520), FRAC_CONST(0.987815992685872) },
+    { FRAC_CONST(0.149157834490539), FRAC_CONST(0.988813400197476) },
+    { FRAC_CONST(0.142682917412363), FRAC_CONST(0.989768450234042) },
+    { FRAC_CONST(0.136201888272891), FRAC_CONST(0.990681101884405) },
+    { FRAC_CONST(0.129715024697841), FRAC_CONST(0.991551316053606) },
+    { FRAC_CONST(0.123222604562857), FRAC_CONST(0.992379055464567) },
+    { FRAC_CONST(0.116724905981611), FRAC_CONST(0.993164284659685) },
+    { FRAC_CONST(0.110222207293883), FRAC_CONST(0.993906970002356) },
+    { FRAC_CONST(0.103714787053643), FRAC_CONST(0.994607079678411) },
+    { FRAC_CONST(0.097202924017115), FRAC_CONST(0.995264583697482) },
+    { FRAC_CONST(0.090686897130838), FRAC_CONST(0.995879453894286) },
+    { FRAC_CONST(0.084166985519718), FRAC_CONST(0.996451663929828) },
+    { FRAC_CONST(0.077643468475068), FRAC_CONST(0.996981189292537) },
+    { FRAC_CONST(0.071116625442645), FRAC_CONST(0.997468007299307) },
+    { FRAC_CONST(0.064586736010684), FRAC_CONST(0.997912097096476) },
+    { FRAC_CONST(0.058054079897912), FRAC_CONST(0.998313439660714) },
+    { FRAC_CONST(0.051518936941578), FRAC_CONST(0.998672017799843) },
+    { FRAC_CONST(0.044981587085452), FRAC_CONST(0.998987816153567) },
+    { FRAC_CONST(0.038442310367847), FRAC_CONST(0.999260821194138) },
+    { FRAC_CONST(0.031901386909611), FRAC_CONST(0.999491021226926) },
+    { FRAC_CONST(0.025359096902136), FRAC_CONST(0.999678406390929) },
+    { FRAC_CONST(0.018815720595351), FRAC_CONST(0.999822968659191) },
+    { FRAC_CONST(0.012271538285720), FRAC_CONST(0.999924701839145) },
+    { FRAC_CONST(0.005726830304231), FRAC_CONST(0.999983601572879) }
+};
+#endif // LD_DEC
+
+/* 60 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_240[] =
+{
+    { FRAC_CONST(0.999994645401696), FRAC_CONST(0.003272486506527) },
+    { FRAC_CONST(0.999566308502021), FRAC_CONST(0.029448173247963) },
+    { FRAC_CONST(0.998452918783950), FRAC_CONST(0.055603677682425) },
+    { FRAC_CONST(0.996655239309180), FRAC_CONST(0.081721074133668) },
+    { FRAC_CONST(0.994174502117428), FRAC_CONST(0.107782463042759) },
+    { FRAC_CONST(0.991012407382049), FRAC_CONST(0.133769983235535) },
+    { FRAC_CONST(0.987171122244825), FRAC_CONST(0.159665824163761) },
+    { FRAC_CONST(0.982653279330712), FRAC_CONST(0.185452238111591) },
+    { FRAC_CONST(0.977461974943572), FRAC_CONST(0.211111552358965) },
+    { FRAC_CONST(0.971600766944121), FRAC_CONST(0.236626181293610) },
+    { FRAC_CONST(0.965073672311547), FRAC_CONST(0.261978638463337) },
+    { FRAC_CONST(0.957885164390477), FRAC_CONST(0.287151548560387) },
+    { FRAC_CONST(0.950040169825165), FRAC_CONST(0.312127659329594) },
+    { FRAC_CONST(0.941544065183021), FRAC_CONST(0.336889853392220) },
+    { FRAC_CONST(0.932402673269775), FRAC_CONST(0.361421159977355) },
+    { FRAC_CONST(0.922622259138823), FRAC_CONST(0.385704766552831) },
+    { FRAC_CONST(0.912209525797468), FRAC_CONST(0.409724030347695) },
+    { FRAC_CONST(0.901171609613013), FRAC_CONST(0.433462489758331) },
+    { FRAC_CONST(0.889516075421856), FRAC_CONST(0.456903875630421) },
+    { FRAC_CONST(0.877250911344924), FRAC_CONST(0.480032122409011) },
+    { FRAC_CONST(0.864384523313017), FRAC_CONST(0.502831379149042) },
+    { FRAC_CONST(0.850925729305802), FRAC_CONST(0.525286020378792) },
+    { FRAC_CONST(0.836883753308409), FRAC_CONST(0.547380656808797) },
+    { FRAC_CONST(0.822268218989775), FRAC_CONST(0.569100145878898) },
+    { FRAC_CONST(0.807089143107059), FRAC_CONST(0.590429602136201) },
+    { FRAC_CONST(0.791356928640660), FRAC_CONST(0.611354407436816) },
+    { FRAC_CONST(0.775082357664531), FRAC_CONST(0.631860220964409) },
+    { FRAC_CONST(0.758276583956687), FRAC_CONST(0.651932989058674) },
+    { FRAC_CONST(0.740951125354959), FRAC_CONST(0.671558954847018) },
+    { FRAC_CONST(0.723117855863248), FRAC_CONST(0.690724667672829) },
+    { FRAC_CONST(0.704788997513670), FRAC_CONST(0.709416992313883) },
+    { FRAC_CONST(0.685977111990193), FRAC_CONST(0.727623117984575) },
+    { FRAC_CONST(0.666695092019479), FRAC_CONST(0.745330567115786) },
+    { FRAC_CONST(0.646956152534857), FRAC_CONST(0.762527203906388) },
+    { FRAC_CONST(0.626773821619469), FRAC_CONST(0.779201242640517) },
+    { FRAC_CONST(0.606161931234795), FRAC_CONST(0.795341255764910) },
+    { FRAC_CONST(0.585134607740916), FRAC_CONST(0.810936181720784) },
+    { FRAC_CONST(0.563706262215017), FRAC_CONST(0.825975332524873) },
+    { FRAC_CONST(0.541891580574752), FRAC_CONST(0.840448401094438) },
+    { FRAC_CONST(0.519705513513249), FRAC_CONST(0.854345468311227) },
+    { FRAC_CONST(0.497163266252654), FRAC_CONST(0.867657009819544) },
+    { FRAC_CONST(0.474280288123229), FRAC_CONST(0.880373902553765) },
+    { FRAC_CONST(0.451072261975153), FRAC_CONST(0.892487430990834) },
+    { FRAC_CONST(0.427555093430282), FRAC_CONST(0.903989293123443) },
+    { FRAC_CONST(0.403744899981227), FRAC_CONST(0.914871606149819) },
+    { FRAC_CONST(0.379657999945233), FRAC_CONST(0.925126911876195) },
+    { FRAC_CONST(0.355310901280416), FRAC_CONST(0.934748181828292) },
+    { FRAC_CONST(0.330720290272038), FRAC_CONST(0.943728822068278) },
+    { FRAC_CONST(0.305903020096554), FRAC_CONST(0.952062677713924) },
+    { FRAC_CONST(0.280876099271292), FRAC_CONST(0.959744037156857) },
+    { FRAC_CONST(0.255656679997665), FRAC_CONST(0.966767635977008) },
+    { FRAC_CONST(0.230262046405902), FRAC_CONST(0.973128660550580) },
+    { FRAC_CONST(0.204709602709380), FRAC_CONST(0.978822751349072) },
+    { FRAC_CONST(0.179016861276633), FRAC_CONST(0.983846005927077) },
+    { FRAC_CONST(0.153201430629259), FRAC_CONST(0.988194981596825) },
+    { FRAC_CONST(0.127281003373913), FRAC_CONST(0.991866697787626) },
+    { FRAC_CONST(0.101273344076683), FRAC_CONST(0.994858638088611) },
+    { FRAC_CONST(0.075196277088140), FRAC_CONST(0.997168751973348) },
+    { FRAC_CONST(0.049067674327418), FRAC_CONST(0.998795456205172) },
+    { FRAC_CONST(0.022905443033697), FRAC_CONST(0.999737635922260) }
+};
+#endif // ALLOW_SMALL_FRAMELENGTH
+
+#ifdef SSR_DEC
+/* 128 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_512[] =
+{
+    { FRAC_CONST(0.999998823451702), FRAC_CONST(0.001533980186285) },
+    { FRAC_CONST(0.999904701082853), FRAC_CONST(0.013805388528060) },
+    { FRAC_CONST(0.999659996743959), FRAC_CONST(0.026074717829104) },
+    { FRAC_CONST(0.999264747286594), FRAC_CONST(0.038340120373553) },
+    { FRAC_CONST(0.998719012233873), FRAC_CONST(0.050599749036899) },
+    { FRAC_CONST(0.998022873771486), FRAC_CONST(0.062851757564161) },
+    { FRAC_CONST(0.997176436735326), FRAC_CONST(0.075094300847921) },
+    { FRAC_CONST(0.996179828595697), FRAC_CONST(0.087325535206192) },
+    { FRAC_CONST(0.995033199438119), FRAC_CONST(0.099543618660069) },
+    { FRAC_CONST(0.993736721940725), FRAC_CONST(0.111746711211127) },
+    { FRAC_CONST(0.992290591348257), FRAC_CONST(0.123932975118512) },
+    { FRAC_CONST(0.990695025442665), FRAC_CONST(0.136100575175706) },
+    { FRAC_CONST(0.988950264510303), FRAC_CONST(0.148247678986896) },
+    { FRAC_CONST(0.987056571305751), FRAC_CONST(0.160372457242928) },
+    { FRAC_CONST(0.985014231012240), FRAC_CONST(0.172473083996796) },
+    { FRAC_CONST(0.982823551198705), FRAC_CONST(0.184547736938620) },
+    { FRAC_CONST(0.980484861773469), FRAC_CONST(0.196594597670080) },
+    { FRAC_CONST(0.977998514934557), FRAC_CONST(0.208611851978263) },
+    { FRAC_CONST(0.975364885116657), FRAC_CONST(0.220597690108874) },
+    { FRAC_CONST(0.972584368934732), FRAC_CONST(0.232550307038775) },
+    { FRAC_CONST(0.969657385124292), FRAC_CONST(0.244467902747824) },
+    { FRAC_CONST(0.966584374478333), FRAC_CONST(0.256348682489943) },
+    { FRAC_CONST(0.963365799780954), FRAC_CONST(0.268190857063403) },
+    { FRAC_CONST(0.960002145737666), FRAC_CONST(0.279992643080273) },
+    { FRAC_CONST(0.956493918902395), FRAC_CONST(0.291752263234989) },
+    { FRAC_CONST(0.952841647601199), FRAC_CONST(0.303467946572011) },
+    { FRAC_CONST(0.949045881852701), FRAC_CONST(0.315137928752522) },
+    { FRAC_CONST(0.945107193285261), FRAC_CONST(0.326760452320132) },
+    { FRAC_CONST(0.941026175050889), FRAC_CONST(0.338333766965541) },
+    { FRAC_CONST(0.936803441735922), FRAC_CONST(0.349856129790135) },
+    { FRAC_CONST(0.932439629268462), FRAC_CONST(0.361325805568454) },
+    { FRAC_CONST(0.927935394822618), FRAC_CONST(0.372741067009516) },
+    { FRAC_CONST(0.923291416719528), FRAC_CONST(0.384100195016935) },
+    { FRAC_CONST(0.918508394325212), FRAC_CONST(0.395401478947816) },
+    { FRAC_CONST(0.913587047945251), FRAC_CONST(0.406643216870369) },
+    { FRAC_CONST(0.908528118716306), FRAC_CONST(0.417823715820212) },
+    { FRAC_CONST(0.903332368494512), FRAC_CONST(0.428941292055329) },
+    { FRAC_CONST(0.898000579740740), FRAC_CONST(0.439994271309633) },
+    { FRAC_CONST(0.892533555402765), FRAC_CONST(0.450980989045104) },
+    { FRAC_CONST(0.886932118794342), FRAC_CONST(0.461899790702463) },
+    { FRAC_CONST(0.881197113471222), FRAC_CONST(0.472749031950343) },
+    { FRAC_CONST(0.875329403104111), FRAC_CONST(0.483527078932919) },
+    { FRAC_CONST(0.869329871348607), FRAC_CONST(0.494232308515960) },
+    { FRAC_CONST(0.863199421712124), FRAC_CONST(0.504863108531268) },
+    { FRAC_CONST(0.856938977417829), FRAC_CONST(0.515417878019463) },
+    { FRAC_CONST(0.850549481265603), FRAC_CONST(0.525895027471085) },
+    { FRAC_CONST(0.844031895490066), FRAC_CONST(0.536292979065963) },
+    { FRAC_CONST(0.837387201615662), FRAC_CONST(0.546610166910835) },
+    { FRAC_CONST(0.830616400308846), FRAC_CONST(0.556845037275160) },
+    { FRAC_CONST(0.823720511227391), FRAC_CONST(0.566996048825109) },
+    { FRAC_CONST(0.816700572866828), FRAC_CONST(0.577061672855679) },
+    { FRAC_CONST(0.809557642404051), FRAC_CONST(0.587040393520918) },
+    { FRAC_CONST(0.802292795538116), FRAC_CONST(0.596930708062197) },
+    { FRAC_CONST(0.794907126328237), FRAC_CONST(0.606731127034524) },
+    { FRAC_CONST(0.787401747029031), FRAC_CONST(0.616440174530854) },
+    { FRAC_CONST(0.779777787923015), FRAC_CONST(0.626056388404344) },
+    { FRAC_CONST(0.772036397150385), FRAC_CONST(0.635578320488556) },
+    { FRAC_CONST(0.764178740536117), FRAC_CONST(0.645004536815544) },
+    { FRAC_CONST(0.756206001414395), FRAC_CONST(0.654333617831800) },
+    { FRAC_CONST(0.748119380450404), FRAC_CONST(0.663564158612040) },
+    { FRAC_CONST(0.739920095459516), FRAC_CONST(0.672694769070773) },
+    { FRAC_CONST(0.731609381223893), FRAC_CONST(0.681724074171650) },
+    { FRAC_CONST(0.723188489306527), FRAC_CONST(0.690650714134535) },
+    { FRAC_CONST(0.714658687862769), FRAC_CONST(0.699473344640284) },
+    { FRAC_CONST(0.706021261449340), FRAC_CONST(0.708190637033195) },
+    { FRAC_CONST(0.697277510830887), FRAC_CONST(0.716801278521100) },
+    { FRAC_CONST(0.688428752784091), FRAC_CONST(0.725303972373061) },
+    { FRAC_CONST(0.679476319899365), FRAC_CONST(0.733697438114660) },
+    { FRAC_CONST(0.670421560380173), FRAC_CONST(0.741980411720831) },
+    { FRAC_CONST(0.661265837839992), FRAC_CONST(0.750151645806215) },
+    { FRAC_CONST(0.652010531096960), FRAC_CONST(0.758209909813015) },
+    { FRAC_CONST(0.642657033966227), FRAC_CONST(0.766153990196313) },
+    { FRAC_CONST(0.633206755050057), FRAC_CONST(0.773982690606823) },
+    { FRAC_CONST(0.623661117525695), FRAC_CONST(0.781694832071059) },
+    { FRAC_CONST(0.614021558931038), FRAC_CONST(0.789289253168886) },
+    { FRAC_CONST(0.604289530948156), FRAC_CONST(0.796764810208419) },
+    { FRAC_CONST(0.594466499184665), FRAC_CONST(0.804120377398266) },
+    { FRAC_CONST(0.584553942953015), FRAC_CONST(0.811354847017064) },
+    { FRAC_CONST(0.574553355047716), FRAC_CONST(0.818467129580299) },
+    { FRAC_CONST(0.564466241520520), FRAC_CONST(0.825456154004377) },
+    { FRAC_CONST(0.554294121453620), FRAC_CONST(0.832320867767930) },
+    { FRAC_CONST(0.544038526730884), FRAC_CONST(0.839060237070313) },
+    { FRAC_CONST(0.533701001807153), FRAC_CONST(0.845673246987299) },
+    { FRAC_CONST(0.523283103475656), FRAC_CONST(0.852158901623920) },
+    { FRAC_CONST(0.512786400633563), FRAC_CONST(0.858516224264443) },
+    { FRAC_CONST(0.502212474045711), FRAC_CONST(0.864744257519462) },
+    { FRAC_CONST(0.491562916106550), FRAC_CONST(0.870842063470079) },
+    { FRAC_CONST(0.480839330600334), FRAC_CONST(0.876808723809146) },
+    { FRAC_CONST(0.470043332459596), FRAC_CONST(0.882643339979563) },
+    { FRAC_CONST(0.459176547521944), FRAC_CONST(0.888345033309596) },
+    { FRAC_CONST(0.448240612285220), FRAC_CONST(0.893912945145203) },
+    { FRAC_CONST(0.437237173661044), FRAC_CONST(0.899346236979341) },
+    { FRAC_CONST(0.426167888726800), FRAC_CONST(0.904644090578246) },
+    { FRAC_CONST(0.415034424476082), FRAC_CONST(0.909805708104652) },
+    { FRAC_CONST(0.403838457567654), FRAC_CONST(0.914830312237946) },
+    { FRAC_CONST(0.392581674072952), FRAC_CONST(0.919717146291227) },
+    { FRAC_CONST(0.381265769222162), FRAC_CONST(0.924465474325263) },
+    { FRAC_CONST(0.369892447148934), FRAC_CONST(0.929074581259316) },
+    { FRAC_CONST(0.358463420633737), FRAC_CONST(0.933543772978836) },
+    { FRAC_CONST(0.346980410845924), FRAC_CONST(0.937872376439990) },
+    { FRAC_CONST(0.335445147084532), FRAC_CONST(0.942059739771017) },
+    { FRAC_CONST(0.323859366517853), FRAC_CONST(0.946105232370403) },
+    { FRAC_CONST(0.312224813921825), FRAC_CONST(0.950008245001843) },
+    { FRAC_CONST(0.300543241417273), FRAC_CONST(0.953768189885990) },
+    { FRAC_CONST(0.288816408206049), FRAC_CONST(0.957384500788976) },
+    { FRAC_CONST(0.277046080306100), FRAC_CONST(0.960856633107680) },
+    { FRAC_CONST(0.265234030285512), FRAC_CONST(0.964184063951746) },
+    { FRAC_CONST(0.253382036995570), FRAC_CONST(0.967366292222329) },
+    { FRAC_CONST(0.241491885302869), FRAC_CONST(0.970402838687556) },
+    { FRAC_CONST(0.229565365820519), FRAC_CONST(0.973293246054698) },
+    { FRAC_CONST(0.217604274638484), FRAC_CONST(0.976037079039039) },
+    { FRAC_CONST(0.205610413053099), FRAC_CONST(0.978633924429423) },
+    { FRAC_CONST(0.193585587295804), FRAC_CONST(0.981083391150487) },
+    { FRAC_CONST(0.181531608261125), FRAC_CONST(0.983385110321551) },
+    { FRAC_CONST(0.169450291233968), FRAC_CONST(0.985538735312176) },
+    { FRAC_CONST(0.157343455616238), FRAC_CONST(0.987543941794359) },
+    { FRAC_CONST(0.145212924652848), FRAC_CONST(0.989400427791380) },
+    { FRAC_CONST(0.133060525157139), FRAC_CONST(0.991107913723277) },
+    { FRAC_CONST(0.120888087235777), FRAC_CONST(0.992666142448948) },
+    { FRAC_CONST(0.108697444013139), FRAC_CONST(0.994074879304879) },
+    { FRAC_CONST(0.096490431355253), FRAC_CONST(0.995333912140482) },
+    { FRAC_CONST(0.084268887593324), FRAC_CONST(0.996443051350043) },
+    { FRAC_CONST(0.072034653246889), FRAC_CONST(0.997402129901275) },
+    { FRAC_CONST(0.059789570746640), FRAC_CONST(0.998211003360478) },
+    { FRAC_CONST(0.047535484156959), FRAC_CONST(0.998869549914284) },
+    { FRAC_CONST(0.035274238898214), FRAC_CONST(0.999377670388003) },
+    { FRAC_CONST(0.023007681468839), FRAC_CONST(0.999735288260562) },
+    { FRAC_CONST(0.010737659167265), FRAC_CONST(0.999942349676024) }
+};
+
+/* 16 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_64[] =
+{
+    { FRAC_CONST(0.999924701839145), FRAC_CONST(0.012271538285720) },
+    { FRAC_CONST(0.993906970002356), FRAC_CONST(0.110222207293883) },
+    { FRAC_CONST(0.978317370719628), FRAC_CONST(0.207111376192219) },
+    { FRAC_CONST(0.953306040354194), FRAC_CONST(0.302005949319228) },
+    { FRAC_CONST(0.919113851690058), FRAC_CONST(0.393992040061048) },
+    { FRAC_CONST(0.876070094195407), FRAC_CONST(0.482183772079123) },
+    { FRAC_CONST(0.824589302785025), FRAC_CONST(0.565731810783613) },
+    { FRAC_CONST(0.765167265622459), FRAC_CONST(0.643831542889791) },
+    { FRAC_CONST(0.698376249408973), FRAC_CONST(0.715730825283819) },
+    { FRAC_CONST(0.624859488142386), FRAC_CONST(0.780737228572094) },
+    { FRAC_CONST(0.545324988422046), FRAC_CONST(0.838224705554838) },
+    { FRAC_CONST(0.460538710958240), FRAC_CONST(0.887639620402854) },
+    { FRAC_CONST(0.371317193951838), FRAC_CONST(0.928506080473215) },
+    { FRAC_CONST(0.278519689385053), FRAC_CONST(0.960430519415566) },
+    { FRAC_CONST(0.183039887955141), FRAC_CONST(0.983105487431216) },
+    { FRAC_CONST(0.085797312344440), FRAC_CONST(0.996312612182778) }
+};
+#endif // SSR_DEC
+
+#else // FIXED_POINT
+
+/* 256 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_2048[] =
+{
+    { FRAC_CONST(0.031249997702054), FRAC_CONST(0.000011984224612) },
+    { FRAC_CONST(0.031249813866531), FRAC_CONST(0.000107857810004) },
+    { FRAC_CONST(0.031249335895858), FRAC_CONST(0.000203730380198) },
+    { FRAC_CONST(0.031248563794535), FRAC_CONST(0.000299601032804) },
+    { FRAC_CONST(0.031247497569829), FRAC_CONST(0.000395468865451) },
+    { FRAC_CONST(0.031246137231775), FRAC_CONST(0.000491332975794) },
+    { FRAC_CONST(0.031244482793177), FRAC_CONST(0.000587192461525) },
+    { FRAC_CONST(0.031242534269608), FRAC_CONST(0.000683046420376) },
+    { FRAC_CONST(0.031240291679407), FRAC_CONST(0.000778893950134) },
+    { FRAC_CONST(0.031237755043684), FRAC_CONST(0.000874734148645) },
+    { FRAC_CONST(0.031234924386313), FRAC_CONST(0.000970566113826) },
+    { FRAC_CONST(0.031231799733938), FRAC_CONST(0.001066388943669) },
+    { FRAC_CONST(0.031228381115970), FRAC_CONST(0.001162201736253) },
+    { FRAC_CONST(0.031224668564585), FRAC_CONST(0.001258003589751) },
+    { FRAC_CONST(0.031220662114728), FRAC_CONST(0.001353793602441) },
+    { FRAC_CONST(0.031216361804108), FRAC_CONST(0.001449570872710) },
+    { FRAC_CONST(0.031211767673203), FRAC_CONST(0.001545334499065) },
+    { FRAC_CONST(0.031206879765253), FRAC_CONST(0.001641083580144) },
+    { FRAC_CONST(0.031201698126266), FRAC_CONST(0.001736817214719) },
+    { FRAC_CONST(0.031196222805014), FRAC_CONST(0.001832534501709) },
+    { FRAC_CONST(0.031190453853031), FRAC_CONST(0.001928234540186) },
+    { FRAC_CONST(0.031184391324617), FRAC_CONST(0.002023916429386) },
+    { FRAC_CONST(0.031178035276836), FRAC_CONST(0.002119579268713) },
+    { FRAC_CONST(0.031171385769513), FRAC_CONST(0.002215222157753) },
+    { FRAC_CONST(0.031164442865236), FRAC_CONST(0.002310844196278) },
+    { FRAC_CONST(0.031157206629353), FRAC_CONST(0.002406444484258) },
+    { FRAC_CONST(0.031149677129975), FRAC_CONST(0.002502022121865) },
+    { FRAC_CONST(0.031141854437973), FRAC_CONST(0.002597576209488) },
+    { FRAC_CONST(0.031133738626977), FRAC_CONST(0.002693105847734) },
+    { FRAC_CONST(0.031125329773375), FRAC_CONST(0.002788610137442) },
+    { FRAC_CONST(0.031116627956316), FRAC_CONST(0.002884088179689) },
+    { FRAC_CONST(0.031107633257703), FRAC_CONST(0.002979539075801) },
+    { FRAC_CONST(0.031098345762200), FRAC_CONST(0.003074961927355) },
+    { FRAC_CONST(0.031088765557222), FRAC_CONST(0.003170355836197) },
+    { FRAC_CONST(0.031078892732942), FRAC_CONST(0.003265719904442) },
+    { FRAC_CONST(0.031068727382288), FRAC_CONST(0.003361053234488) },
+    { FRAC_CONST(0.031058269600939), FRAC_CONST(0.003456354929021) },
+    { FRAC_CONST(0.031047519487329), FRAC_CONST(0.003551624091024) },
+    { FRAC_CONST(0.031036477142640), FRAC_CONST(0.003646859823790) },
+    { FRAC_CONST(0.031025142670809), FRAC_CONST(0.003742061230921) },
+    { FRAC_CONST(0.031013516178519), FRAC_CONST(0.003837227416347) },
+    { FRAC_CONST(0.031001597775203), FRAC_CONST(0.003932357484328) },
+    { FRAC_CONST(0.030989387573042), FRAC_CONST(0.004027450539462) },
+    { FRAC_CONST(0.030976885686963), FRAC_CONST(0.004122505686697) },
+    { FRAC_CONST(0.030964092234638), FRAC_CONST(0.004217522031340) },
+    { FRAC_CONST(0.030951007336485), FRAC_CONST(0.004312498679058) },
+    { FRAC_CONST(0.030937631115663), FRAC_CONST(0.004407434735897) },
+    { FRAC_CONST(0.030923963698074), FRAC_CONST(0.004502329308281) },
+    { FRAC_CONST(0.030910005212362), FRAC_CONST(0.004597181503027) },
+    { FRAC_CONST(0.030895755789908), FRAC_CONST(0.004691990427350) },
+    { FRAC_CONST(0.030881215564835), FRAC_CONST(0.004786755188872) },
+    { FRAC_CONST(0.030866384674000), FRAC_CONST(0.004881474895632) },
+    { FRAC_CONST(0.030851263256996), FRAC_CONST(0.004976148656090) },
+    { FRAC_CONST(0.030835851456154), FRAC_CONST(0.005070775579142) },
+    { FRAC_CONST(0.030820149416533), FRAC_CONST(0.005165354774124) },
+    { FRAC_CONST(0.030804157285929), FRAC_CONST(0.005259885350819) },
+    { FRAC_CONST(0.030787875214864), FRAC_CONST(0.005354366419469) },
+    { FRAC_CONST(0.030771303356593), FRAC_CONST(0.005448797090784) },
+    { FRAC_CONST(0.030754441867095), FRAC_CONST(0.005543176475946) },
+    { FRAC_CONST(0.030737290905077), FRAC_CONST(0.005637503686619) },
+    { FRAC_CONST(0.030719850631972), FRAC_CONST(0.005731777834961) },
+    { FRAC_CONST(0.030702121211932), FRAC_CONST(0.005825998033626) },
+    { FRAC_CONST(0.030684102811835), FRAC_CONST(0.005920163395780) },
+    { FRAC_CONST(0.030665795601276), FRAC_CONST(0.006014273035101) },
+    { FRAC_CONST(0.030647199752570), FRAC_CONST(0.006108326065793) },
+    { FRAC_CONST(0.030628315440748), FRAC_CONST(0.006202321602594) },
+    { FRAC_CONST(0.030609142843557), FRAC_CONST(0.006296258760782) },
+    { FRAC_CONST(0.030589682141455), FRAC_CONST(0.006390136656185) },
+    { FRAC_CONST(0.030569933517616), FRAC_CONST(0.006483954405188) },
+    { FRAC_CONST(0.030549897157919), FRAC_CONST(0.006577711124743) },
+    { FRAC_CONST(0.030529573250956), FRAC_CONST(0.006671405932375) },
+    { FRAC_CONST(0.030508961988022), FRAC_CONST(0.006765037946194) },
+    { FRAC_CONST(0.030488063563118), FRAC_CONST(0.006858606284900) },
+    { FRAC_CONST(0.030466878172949), FRAC_CONST(0.006952110067791) },
+    { FRAC_CONST(0.030445406016919), FRAC_CONST(0.007045548414774) },
+    { FRAC_CONST(0.030423647297133), FRAC_CONST(0.007138920446372) },
+    { FRAC_CONST(0.030401602218392), FRAC_CONST(0.007232225283733) },
+    { FRAC_CONST(0.030379270988192), FRAC_CONST(0.007325462048634) },
+    { FRAC_CONST(0.030356653816724), FRAC_CONST(0.007418629863497) },
+    { FRAC_CONST(0.030333750916869), FRAC_CONST(0.007511727851390) },
+    { FRAC_CONST(0.030310562504198), FRAC_CONST(0.007604755136040) },
+    { FRAC_CONST(0.030287088796968), FRAC_CONST(0.007697710841838) },
+    { FRAC_CONST(0.030263330016124), FRAC_CONST(0.007790594093851) },
+    { FRAC_CONST(0.030239286385293), FRAC_CONST(0.007883404017824) },
+    { FRAC_CONST(0.030214958130781), FRAC_CONST(0.007976139740197) },
+    { FRAC_CONST(0.030190345481576), FRAC_CONST(0.008068800388104) },
+    { FRAC_CONST(0.030165448669342), FRAC_CONST(0.008161385089390) },
+    { FRAC_CONST(0.030140267928416), FRAC_CONST(0.008253892972610) },
+    { FRAC_CONST(0.030114803495809), FRAC_CONST(0.008346323167047) },
+    { FRAC_CONST(0.030089055611203), FRAC_CONST(0.008438674802711) },
+    { FRAC_CONST(0.030063024516947), FRAC_CONST(0.008530947010354) },
+    { FRAC_CONST(0.030036710458054), FRAC_CONST(0.008623138921475) },
+    { FRAC_CONST(0.030010113682202), FRAC_CONST(0.008715249668328) },
+    { FRAC_CONST(0.029983234439732), FRAC_CONST(0.008807278383932) },
+    { FRAC_CONST(0.029956072983640), FRAC_CONST(0.008899224202078) },
+    { FRAC_CONST(0.029928629569580), FRAC_CONST(0.008991086257336) },
+    { FRAC_CONST(0.029900904455860), FRAC_CONST(0.009082863685067) },
+    { FRAC_CONST(0.029872897903441), FRAC_CONST(0.009174555621425) },
+    { FRAC_CONST(0.029844610175929), FRAC_CONST(0.009266161203371) },
+    { FRAC_CONST(0.029816041539579), FRAC_CONST(0.009357679568679) },
+    { FRAC_CONST(0.029787192263292), FRAC_CONST(0.009449109855944) },
+    { FRAC_CONST(0.029758062618606), FRAC_CONST(0.009540451204587) },
+    { FRAC_CONST(0.029728652879702), FRAC_CONST(0.009631702754871) },
+    { FRAC_CONST(0.029698963323395), FRAC_CONST(0.009722863647900) },
+    { FRAC_CONST(0.029668994229134), FRAC_CONST(0.009813933025633) },
+    { FRAC_CONST(0.029638745879000), FRAC_CONST(0.009904910030891) },
+    { FRAC_CONST(0.029608218557702), FRAC_CONST(0.009995793807363) },
+    { FRAC_CONST(0.029577412552575), FRAC_CONST(0.010086583499618) },
+    { FRAC_CONST(0.029546328153577), FRAC_CONST(0.010177278253107) },
+    { FRAC_CONST(0.029514965653285), FRAC_CONST(0.010267877214177) },
+    { FRAC_CONST(0.029483325346896), FRAC_CONST(0.010358379530076) },
+    { FRAC_CONST(0.029451407532220), FRAC_CONST(0.010448784348962) },
+    { FRAC_CONST(0.029419212509679), FRAC_CONST(0.010539090819911) },
+    { FRAC_CONST(0.029386740582307), FRAC_CONST(0.010629298092923) },
+    { FRAC_CONST(0.029353992055740), FRAC_CONST(0.010719405318933) },
+    { FRAC_CONST(0.029320967238220), FRAC_CONST(0.010809411649818) },
+    { FRAC_CONST(0.029287666440590), FRAC_CONST(0.010899316238403) },
+    { FRAC_CONST(0.029254089976290), FRAC_CONST(0.010989118238474) },
+    { FRAC_CONST(0.029220238161353), FRAC_CONST(0.011078816804778) },
+    { FRAC_CONST(0.029186111314406), FRAC_CONST(0.011168411093039) },
+    { FRAC_CONST(0.029151709756664), FRAC_CONST(0.011257900259961) },
+    { FRAC_CONST(0.029117033811927), FRAC_CONST(0.011347283463239) },
+    { FRAC_CONST(0.029082083806579), FRAC_CONST(0.011436559861563) },
+    { FRAC_CONST(0.029046860069582), FRAC_CONST(0.011525728614630) },
+    { FRAC_CONST(0.029011362932476), FRAC_CONST(0.011614788883150) },
+    { FRAC_CONST(0.028975592729373), FRAC_CONST(0.011703739828853) },
+    { FRAC_CONST(0.028939549796957), FRAC_CONST(0.011792580614500) },
+    { FRAC_CONST(0.028903234474475), FRAC_CONST(0.011881310403886) },
+    { FRAC_CONST(0.028866647103744), FRAC_CONST(0.011969928361855) },
+    { FRAC_CONST(0.028829788029135), FRAC_CONST(0.012058433654299) },
+    { FRAC_CONST(0.028792657597583), FRAC_CONST(0.012146825448172) },
+    { FRAC_CONST(0.028755256158571), FRAC_CONST(0.012235102911499) },
+    { FRAC_CONST(0.028717584064137), FRAC_CONST(0.012323265213377) },
+    { FRAC_CONST(0.028679641668864), FRAC_CONST(0.012411311523990) },
+    { FRAC_CONST(0.028641429329882), FRAC_CONST(0.012499241014612) },
+    { FRAC_CONST(0.028602947406859), FRAC_CONST(0.012587052857618) },
+    { FRAC_CONST(0.028564196262001), FRAC_CONST(0.012674746226488) },
+    { FRAC_CONST(0.028525176260050), FRAC_CONST(0.012762320295819) },
+    { FRAC_CONST(0.028485887768276), FRAC_CONST(0.012849774241331) },
+    { FRAC_CONST(0.028446331156478), FRAC_CONST(0.012937107239875) },
+    { FRAC_CONST(0.028406506796976), FRAC_CONST(0.013024318469437) },
+    { FRAC_CONST(0.028366415064615), FRAC_CONST(0.013111407109155) },
+    { FRAC_CONST(0.028326056336751), FRAC_CONST(0.013198372339315) },
+    { FRAC_CONST(0.028285430993258), FRAC_CONST(0.013285213341368) },
+    { FRAC_CONST(0.028244539416515), FRAC_CONST(0.013371929297933) },
+    { FRAC_CONST(0.028203381991411), FRAC_CONST(0.013458519392807) },
+    { FRAC_CONST(0.028161959105334), FRAC_CONST(0.013544982810971) },
+    { FRAC_CONST(0.028120271148172), FRAC_CONST(0.013631318738598) },
+    { FRAC_CONST(0.028078318512309), FRAC_CONST(0.013717526363062) },
+    { FRAC_CONST(0.028036101592619), FRAC_CONST(0.013803604872943) },
+    { FRAC_CONST(0.027993620786463), FRAC_CONST(0.013889553458039) },
+    { FRAC_CONST(0.027950876493687), FRAC_CONST(0.013975371309367) },
+    { FRAC_CONST(0.027907869116616), FRAC_CONST(0.014061057619178) },
+    { FRAC_CONST(0.027864599060052), FRAC_CONST(0.014146611580959) },
+    { FRAC_CONST(0.027821066731270), FRAC_CONST(0.014232032389445) },
+    { FRAC_CONST(0.027777272540012), FRAC_CONST(0.014317319240622) },
+    { FRAC_CONST(0.027733216898487), FRAC_CONST(0.014402471331737) },
+    { FRAC_CONST(0.027688900221361), FRAC_CONST(0.014487487861307) },
+    { FRAC_CONST(0.027644322925762), FRAC_CONST(0.014572368029123) },
+    { FRAC_CONST(0.027599485431266), FRAC_CONST(0.014657111036262) },
+    { FRAC_CONST(0.027554388159903), FRAC_CONST(0.014741716085090) },
+    { FRAC_CONST(0.027509031536144), FRAC_CONST(0.014826182379271) },
+    { FRAC_CONST(0.027463415986904), FRAC_CONST(0.014910509123778) },
+    { FRAC_CONST(0.027417541941533), FRAC_CONST(0.014994695524894) },
+    { FRAC_CONST(0.027371409831816), FRAC_CONST(0.015078740790225) },
+    { FRAC_CONST(0.027325020091965), FRAC_CONST(0.015162644128704) },
+    { FRAC_CONST(0.027278373158618), FRAC_CONST(0.015246404750603) },
+    { FRAC_CONST(0.027231469470833), FRAC_CONST(0.015330021867534) },
+    { FRAC_CONST(0.027184309470088), FRAC_CONST(0.015413494692460) },
+    { FRAC_CONST(0.027136893600268), FRAC_CONST(0.015496822439704) },
+    { FRAC_CONST(0.027089222307671), FRAC_CONST(0.015580004324954) },
+    { FRAC_CONST(0.027041296040997), FRAC_CONST(0.015663039565269) },
+    { FRAC_CONST(0.026993115251345), FRAC_CONST(0.015745927379091) },
+    { FRAC_CONST(0.026944680392213), FRAC_CONST(0.015828666986247) },
+    { FRAC_CONST(0.026895991919487), FRAC_CONST(0.015911257607961) },
+    { FRAC_CONST(0.026847050291442), FRAC_CONST(0.015993698466859) },
+    { FRAC_CONST(0.026797855968734), FRAC_CONST(0.016075988786976) },
+    { FRAC_CONST(0.026748409414401), FRAC_CONST(0.016158127793763) },
+    { FRAC_CONST(0.026698711093851), FRAC_CONST(0.016240114714099) },
+    { FRAC_CONST(0.026648761474864), FRAC_CONST(0.016321948776289) },
+    { FRAC_CONST(0.026598561027585), FRAC_CONST(0.016403629210082) },
+    { FRAC_CONST(0.026548110224519), FRAC_CONST(0.016485155246669) },
+    { FRAC_CONST(0.026497409540530), FRAC_CONST(0.016566526118696) },
+    { FRAC_CONST(0.026446459452830), FRAC_CONST(0.016647741060271) },
+    { FRAC_CONST(0.026395260440982), FRAC_CONST(0.016728799306966) },
+    { FRAC_CONST(0.026343812986890), FRAC_CONST(0.016809700095831) },
+    { FRAC_CONST(0.026292117574797), FRAC_CONST(0.016890442665397) },
+    { FRAC_CONST(0.026240174691280), FRAC_CONST(0.016971026255683) },
+    { FRAC_CONST(0.026187984825246), FRAC_CONST(0.017051450108208) },
+    { FRAC_CONST(0.026135548467924), FRAC_CONST(0.017131713465990) },
+    { FRAC_CONST(0.026082866112867), FRAC_CONST(0.017211815573560) },
+    { FRAC_CONST(0.026029938255941), FRAC_CONST(0.017291755676967) },
+    { FRAC_CONST(0.025976765395322), FRAC_CONST(0.017371533023784) },
+    { FRAC_CONST(0.025923348031494), FRAC_CONST(0.017451146863116) },
+    { FRAC_CONST(0.025869686667242), FRAC_CONST(0.017530596445607) },
+    { FRAC_CONST(0.025815781807646), FRAC_CONST(0.017609881023449) },
+    { FRAC_CONST(0.025761633960080), FRAC_CONST(0.017688999850383) },
+    { FRAC_CONST(0.025707243634204), FRAC_CONST(0.017767952181715) },
+    { FRAC_CONST(0.025652611341960), FRAC_CONST(0.017846737274313) },
+    { FRAC_CONST(0.025597737597568), FRAC_CONST(0.017925354386623) },
+    { FRAC_CONST(0.025542622917522), FRAC_CONST(0.018003802778671) },
+    { FRAC_CONST(0.025487267820581), FRAC_CONST(0.018082081712071) },
+    { FRAC_CONST(0.025431672827768), FRAC_CONST(0.018160190450031) },
+    { FRAC_CONST(0.025375838462365), FRAC_CONST(0.018238128257362) },
+    { FRAC_CONST(0.025319765249906), FRAC_CONST(0.018315894400484) },
+    { FRAC_CONST(0.025263453718173), FRAC_CONST(0.018393488147432) },
+    { FRAC_CONST(0.025206904397193), FRAC_CONST(0.018470908767865) },
+    { FRAC_CONST(0.025150117819228), FRAC_CONST(0.018548155533070) },
+    { FRAC_CONST(0.025093094518776), FRAC_CONST(0.018625227715971) },
+    { FRAC_CONST(0.025035835032562), FRAC_CONST(0.018702124591135) },
+    { FRAC_CONST(0.024978339899534), FRAC_CONST(0.018778845434780) },
+    { FRAC_CONST(0.024920609660858), FRAC_CONST(0.018855389524780) },
+    { FRAC_CONST(0.024862644859912), FRAC_CONST(0.018931756140672) },
+    { FRAC_CONST(0.024804446042284), FRAC_CONST(0.019007944563666) },
+    { FRAC_CONST(0.024746013755764), FRAC_CONST(0.019083954076646) },
+    { FRAC_CONST(0.024687348550337), FRAC_CONST(0.019159783964183) },
+    { FRAC_CONST(0.024628450978184), FRAC_CONST(0.019235433512536) },
+    { FRAC_CONST(0.024569321593670), FRAC_CONST(0.019310902009663) },
+    { FRAC_CONST(0.024509960953345), FRAC_CONST(0.019386188745225) },
+    { FRAC_CONST(0.024450369615932), FRAC_CONST(0.019461293010596) },
+    { FRAC_CONST(0.024390548142329), FRAC_CONST(0.019536214098866) },
+    { FRAC_CONST(0.024330497095598), FRAC_CONST(0.019610951304848) },
+    { FRAC_CONST(0.024270217040961), FRAC_CONST(0.019685503925087) },
+    { FRAC_CONST(0.024209708545799), FRAC_CONST(0.019759871257867) },
+    { FRAC_CONST(0.024148972179639), FRAC_CONST(0.019834052603212) },
+    { FRAC_CONST(0.024088008514157), FRAC_CONST(0.019908047262901) },
+    { FRAC_CONST(0.024026818123164), FRAC_CONST(0.019981854540467) },
+    { FRAC_CONST(0.023965401582609), FRAC_CONST(0.020055473741208) },
+    { FRAC_CONST(0.023903759470567), FRAC_CONST(0.020128904172192) },
+    { FRAC_CONST(0.023841892367236), FRAC_CONST(0.020202145142264) },
+    { FRAC_CONST(0.023779800854935), FRAC_CONST(0.020275195962052) },
+    { FRAC_CONST(0.023717485518092), FRAC_CONST(0.020348055943974) },
+    { FRAC_CONST(0.023654946943242), FRAC_CONST(0.020420724402244) },
+    { FRAC_CONST(0.023592185719023), FRAC_CONST(0.020493200652878) },
+    { FRAC_CONST(0.023529202436167), FRAC_CONST(0.020565484013703) },
+    { FRAC_CONST(0.023465997687496), FRAC_CONST(0.020637573804361) },
+    { FRAC_CONST(0.023402572067918), FRAC_CONST(0.020709469346314) },
+    { FRAC_CONST(0.023338926174419), FRAC_CONST(0.020781169962854) },
+    { FRAC_CONST(0.023275060606058), FRAC_CONST(0.020852674979108) },
+    { FRAC_CONST(0.023210975963963), FRAC_CONST(0.020923983722044) },
+    { FRAC_CONST(0.023146672851322), FRAC_CONST(0.020995095520475) },
+    { FRAC_CONST(0.023082151873380), FRAC_CONST(0.021066009705072) },
+    { FRAC_CONST(0.023017413637435), FRAC_CONST(0.021136725608363) },
+    { FRAC_CONST(0.022952458752826), FRAC_CONST(0.021207242564742) },
+    { FRAC_CONST(0.022887287830934), FRAC_CONST(0.021277559910478) },
+    { FRAC_CONST(0.022821901485173), FRAC_CONST(0.021347676983716) },
+    { FRAC_CONST(0.022756300330983), FRAC_CONST(0.021417593124488) },
+    { FRAC_CONST(0.022690484985827), FRAC_CONST(0.021487307674717) },
+    { FRAC_CONST(0.022624456069185), FRAC_CONST(0.021556819978223) },
+    { FRAC_CONST(0.022558214202547), FRAC_CONST(0.021626129380729) },
+    { FRAC_CONST(0.022491760009405), FRAC_CONST(0.021695235229869) },
+    { FRAC_CONST(0.022425094115252), FRAC_CONST(0.021764136875192) },
+    { FRAC_CONST(0.022358217147572), FRAC_CONST(0.021832833668171) },
+    { FRAC_CONST(0.022291129735838), FRAC_CONST(0.021901324962204) },
+    { FRAC_CONST(0.022223832511501), FRAC_CONST(0.021969610112625) },
+    { FRAC_CONST(0.022156326107988), FRAC_CONST(0.022037688476709) },
+    { FRAC_CONST(0.022088611160696), FRAC_CONST(0.022105559413676) },
+    { FRAC_CONST(0.022020688306983), FRAC_CONST(0.022173222284699) },
+    { FRAC_CONST(0.021952558186166), FRAC_CONST(0.022240676452909) },
+    { FRAC_CONST(0.021884221439510), FRAC_CONST(0.022307921283403) },
+    { FRAC_CONST(0.021815678710228), FRAC_CONST(0.022374956143245) },
+    { FRAC_CONST(0.021746930643469), FRAC_CONST(0.022441780401478) },
+    { FRAC_CONST(0.021677977886316), FRAC_CONST(0.022508393429127) },
+    { FRAC_CONST(0.021608821087780), FRAC_CONST(0.022574794599206) },
+    { FRAC_CONST(0.021539460898790), FRAC_CONST(0.022640983286719) },
+    { FRAC_CONST(0.021469897972190), FRAC_CONST(0.022706958868676) },
+    { FRAC_CONST(0.021400132962735), FRAC_CONST(0.022772720724087) },
+    { FRAC_CONST(0.021330166527077), FRAC_CONST(0.022838268233979) },
+    { FRAC_CONST(0.021259999323769), FRAC_CONST(0.022903600781391) },
+    { FRAC_CONST(0.021189632013250), FRAC_CONST(0.022968717751391) },
+    { FRAC_CONST(0.021119065257845), FRAC_CONST(0.023033618531071) },
+    { FRAC_CONST(0.021048299721754), FRAC_CONST(0.023098302509561) },
+    { FRAC_CONST(0.020977336071050), FRAC_CONST(0.023162769078031) },
+    { FRAC_CONST(0.020906174973670), FRAC_CONST(0.023227017629698) },
+    { FRAC_CONST(0.020834817099409), FRAC_CONST(0.023291047559828) },
+    { FRAC_CONST(0.020763263119915), FRAC_CONST(0.023354858265748) },
+    { FRAC_CONST(0.020691513708680), FRAC_CONST(0.023418449146848) },
+    { FRAC_CONST(0.020619569541038), FRAC_CONST(0.023481819604585) },
+    { FRAC_CONST(0.020547431294155), FRAC_CONST(0.023544969042494) },
+    { FRAC_CONST(0.020475099647023), FRAC_CONST(0.023607896866186) },
+    { FRAC_CONST(0.020402575280455), FRAC_CONST(0.023670602483363) },
+    { FRAC_CONST(0.020329858877078), FRAC_CONST(0.023733085303813) },
+    { FRAC_CONST(0.020256951121327), FRAC_CONST(0.023795344739427) },
+    { FRAC_CONST(0.020183852699437), FRAC_CONST(0.023857380204193) },
+    { FRAC_CONST(0.020110564299439), FRAC_CONST(0.023919191114211) },
+    { FRAC_CONST(0.020037086611150), FRAC_CONST(0.023980776887692) },
+    { FRAC_CONST(0.019963420326171), FRAC_CONST(0.024042136944968) },
+    { FRAC_CONST(0.019889566137877), FRAC_CONST(0.024103270708495) },
+    { FRAC_CONST(0.019815524741412), FRAC_CONST(0.024164177602859) },
+    { FRAC_CONST(0.019741296833681), FRAC_CONST(0.024224857054779) },
+    { FRAC_CONST(0.019666883113346), FRAC_CONST(0.024285308493120) },
+    { FRAC_CONST(0.019592284280817), FRAC_CONST(0.024345531348888) },
+    { FRAC_CONST(0.019517501038246), FRAC_CONST(0.024405525055242) },
+    { FRAC_CONST(0.019442534089523), FRAC_CONST(0.024465289047500) },
+    { FRAC_CONST(0.019367384140264), FRAC_CONST(0.024524822763141) },
+    { FRAC_CONST(0.019292051897809), FRAC_CONST(0.024584125641809) },
+    { FRAC_CONST(0.019216538071215), FRAC_CONST(0.024643197125323) },
+    { FRAC_CONST(0.019140843371246), FRAC_CONST(0.024702036657681) },
+    { FRAC_CONST(0.019064968510369), FRAC_CONST(0.024760643685063) },
+    { FRAC_CONST(0.018988914202748), FRAC_CONST(0.024819017655836) },
+    { FRAC_CONST(0.018912681164234), FRAC_CONST(0.024877158020562) },
+    { FRAC_CONST(0.018836270112363), FRAC_CONST(0.024935064232003) },
+    { FRAC_CONST(0.018759681766343), FRAC_CONST(0.024992735745123) },
+    { FRAC_CONST(0.018682916847054), FRAC_CONST(0.025050172017095) },
+    { FRAC_CONST(0.018605976077037), FRAC_CONST(0.025107372507308) },
+    { FRAC_CONST(0.018528860180486), FRAC_CONST(0.025164336677369) },
+    { FRAC_CONST(0.018451569883247), FRAC_CONST(0.025221063991110) },
+    { FRAC_CONST(0.018374105912805), FRAC_CONST(0.025277553914591) },
+    { FRAC_CONST(0.018296468998280), FRAC_CONST(0.025333805916107) },
+    { FRAC_CONST(0.018218659870421), FRAC_CONST(0.025389819466194) },
+    { FRAC_CONST(0.018140679261596), FRAC_CONST(0.025445594037630) },
+    { FRAC_CONST(0.018062527905790), FRAC_CONST(0.025501129105445) },
+    { FRAC_CONST(0.017984206538592), FRAC_CONST(0.025556424146920) },
+    { FRAC_CONST(0.017905715897192), FRAC_CONST(0.025611478641598) },
+    { FRAC_CONST(0.017827056720375), FRAC_CONST(0.025666292071285) },
+    { FRAC_CONST(0.017748229748511), FRAC_CONST(0.025720863920056) },
+    { FRAC_CONST(0.017669235723550), FRAC_CONST(0.025775193674260) },
+    { FRAC_CONST(0.017590075389012), FRAC_CONST(0.025829280822525) },
+    { FRAC_CONST(0.017510749489986), FRAC_CONST(0.025883124855762) },
+    { FRAC_CONST(0.017431258773116), FRAC_CONST(0.025936725267170) },
+    { FRAC_CONST(0.017351603986600), FRAC_CONST(0.025990081552242) },
+    { FRAC_CONST(0.017271785880180), FRAC_CONST(0.026043193208768) },
+    { FRAC_CONST(0.017191805205132), FRAC_CONST(0.026096059736841) },
+    { FRAC_CONST(0.017111662714267), FRAC_CONST(0.026148680638861) },
+    { FRAC_CONST(0.017031359161915), FRAC_CONST(0.026201055419541) },
+    { FRAC_CONST(0.016950895303924), FRAC_CONST(0.026253183585908) },
+    { FRAC_CONST(0.016870271897651), FRAC_CONST(0.026305064647313) },
+    { FRAC_CONST(0.016789489701954), FRAC_CONST(0.026356698115431) },
+    { FRAC_CONST(0.016708549477186), FRAC_CONST(0.026408083504269) },
+    { FRAC_CONST(0.016627451985187), FRAC_CONST(0.026459220330167) },
+    { FRAC_CONST(0.016546197989277), FRAC_CONST(0.026510108111806) },
+    { FRAC_CONST(0.016464788254250), FRAC_CONST(0.026560746370212) },
+    { FRAC_CONST(0.016383223546365), FRAC_CONST(0.026611134628757) },
+    { FRAC_CONST(0.016301504633341), FRAC_CONST(0.026661272413168) },
+    { FRAC_CONST(0.016219632284346), FRAC_CONST(0.026711159251530) },
+    { FRAC_CONST(0.016137607269996), FRAC_CONST(0.026760794674288) },
+    { FRAC_CONST(0.016055430362340), FRAC_CONST(0.026810178214254) },
+    { FRAC_CONST(0.015973102334858), FRAC_CONST(0.026859309406613) },
+    { FRAC_CONST(0.015890623962454), FRAC_CONST(0.026908187788922) },
+    { FRAC_CONST(0.015807996021446), FRAC_CONST(0.026956812901119) },
+    { FRAC_CONST(0.015725219289558), FRAC_CONST(0.027005184285527) },
+    { FRAC_CONST(0.015642294545918), FRAC_CONST(0.027053301486856) },
+    { FRAC_CONST(0.015559222571044), FRAC_CONST(0.027101164052208) },
+    { FRAC_CONST(0.015476004146842), FRAC_CONST(0.027148771531083) },
+    { FRAC_CONST(0.015392640056594), FRAC_CONST(0.027196123475380) },
+    { FRAC_CONST(0.015309131084956), FRAC_CONST(0.027243219439406) },
+    { FRAC_CONST(0.015225478017946), FRAC_CONST(0.027290058979875) },
+    { FRAC_CONST(0.015141681642938), FRAC_CONST(0.027336641655915) },
+    { FRAC_CONST(0.015057742748656), FRAC_CONST(0.027382967029073) },
+    { FRAC_CONST(0.014973662125164), FRAC_CONST(0.027429034663317) },
+    { FRAC_CONST(0.014889440563862), FRAC_CONST(0.027474844125040) },
+    { FRAC_CONST(0.014805078857474), FRAC_CONST(0.027520394983066) },
+    { FRAC_CONST(0.014720577800046), FRAC_CONST(0.027565686808654) },
+    { FRAC_CONST(0.014635938186934), FRAC_CONST(0.027610719175499) },
+    { FRAC_CONST(0.014551160814797), FRAC_CONST(0.027655491659740) },
+    { FRAC_CONST(0.014466246481592), FRAC_CONST(0.027700003839960) },
+    { FRAC_CONST(0.014381195986567), FRAC_CONST(0.027744255297195) },
+    { FRAC_CONST(0.014296010130247), FRAC_CONST(0.027788245614933) },
+    { FRAC_CONST(0.014210689714436), FRAC_CONST(0.027831974379120) },
+    { FRAC_CONST(0.014125235542201), FRAC_CONST(0.027875441178165) },
+    { FRAC_CONST(0.014039648417870), FRAC_CONST(0.027918645602941) },
+    { FRAC_CONST(0.013953929147020), FRAC_CONST(0.027961587246792) },
+    { FRAC_CONST(0.013868078536476), FRAC_CONST(0.028004265705534) },
+    { FRAC_CONST(0.013782097394294), FRAC_CONST(0.028046680577462) },
+    { FRAC_CONST(0.013695986529763), FRAC_CONST(0.028088831463351) },
+    { FRAC_CONST(0.013609746753390), FRAC_CONST(0.028130717966461) },
+    { FRAC_CONST(0.013523378876898), FRAC_CONST(0.028172339692540) },
+    { FRAC_CONST(0.013436883713214), FRAC_CONST(0.028213696249828) },
+    { FRAC_CONST(0.013350262076462), FRAC_CONST(0.028254787249062) },
+    { FRAC_CONST(0.013263514781960), FRAC_CONST(0.028295612303478) },
+    { FRAC_CONST(0.013176642646205), FRAC_CONST(0.028336171028814) },
+    { FRAC_CONST(0.013089646486871), FRAC_CONST(0.028376463043317) },
+    { FRAC_CONST(0.013002527122799), FRAC_CONST(0.028416487967743) },
+    { FRAC_CONST(0.012915285373990), FRAC_CONST(0.028456245425361) },
+    { FRAC_CONST(0.012827922061597), FRAC_CONST(0.028495735041960) },
+    { FRAC_CONST(0.012740438007915), FRAC_CONST(0.028534956445849) },
+    { FRAC_CONST(0.012652834036379), FRAC_CONST(0.028573909267859) },
+    { FRAC_CONST(0.012565110971550), FRAC_CONST(0.028612593141354) },
+    { FRAC_CONST(0.012477269639111), FRAC_CONST(0.028651007702224) },
+    { FRAC_CONST(0.012389310865858), FRAC_CONST(0.028689152588899) },
+    { FRAC_CONST(0.012301235479693), FRAC_CONST(0.028727027442343) },
+    { FRAC_CONST(0.012213044309615), FRAC_CONST(0.028764631906065) },
+    { FRAC_CONST(0.012124738185712), FRAC_CONST(0.028801965626115) },
+    { FRAC_CONST(0.012036317939156), FRAC_CONST(0.028839028251097) },
+    { FRAC_CONST(0.011947784402191), FRAC_CONST(0.028875819432161) },
+    { FRAC_CONST(0.011859138408130), FRAC_CONST(0.028912338823015) },
+    { FRAC_CONST(0.011770380791341), FRAC_CONST(0.028948586079925) },
+    { FRAC_CONST(0.011681512387245), FRAC_CONST(0.028984560861718) },
+    { FRAC_CONST(0.011592534032306), FRAC_CONST(0.029020262829785) },
+    { FRAC_CONST(0.011503446564022), FRAC_CONST(0.029055691648087) },
+    { FRAC_CONST(0.011414250820918), FRAC_CONST(0.029090846983152) },
+    { FRAC_CONST(0.011324947642537), FRAC_CONST(0.029125728504087) },
+    { FRAC_CONST(0.011235537869437), FRAC_CONST(0.029160335882573) },
+    { FRAC_CONST(0.011146022343175), FRAC_CONST(0.029194668792871) },
+    { FRAC_CONST(0.011056401906305), FRAC_CONST(0.029228726911828) },
+    { FRAC_CONST(0.010966677402371), FRAC_CONST(0.029262509918876) },
+    { FRAC_CONST(0.010876849675891), FRAC_CONST(0.029296017496036) },
+    { FRAC_CONST(0.010786919572361), FRAC_CONST(0.029329249327922) },
+    { FRAC_CONST(0.010696887938235), FRAC_CONST(0.029362205101743) },
+    { FRAC_CONST(0.010606755620926), FRAC_CONST(0.029394884507308) },
+    { FRAC_CONST(0.010516523468793), FRAC_CONST(0.029427287237024) },
+    { FRAC_CONST(0.010426192331137), FRAC_CONST(0.029459412985906) },
+    { FRAC_CONST(0.010335763058187), FRAC_CONST(0.029491261451573) },
+    { FRAC_CONST(0.010245236501099), FRAC_CONST(0.029522832334255) },
+    { FRAC_CONST(0.010154613511943), FRAC_CONST(0.029554125336796) },
+    { FRAC_CONST(0.010063894943698), FRAC_CONST(0.029585140164654) },
+    { FRAC_CONST(0.009973081650240), FRAC_CONST(0.029615876525905) },
+    { FRAC_CONST(0.009882174486340), FRAC_CONST(0.029646334131247) },
+    { FRAC_CONST(0.009791174307650), FRAC_CONST(0.029676512694001) },
+    { FRAC_CONST(0.009700081970699), FRAC_CONST(0.029706411930116) },
+    { FRAC_CONST(0.009608898332881), FRAC_CONST(0.029736031558168) },
+    { FRAC_CONST(0.009517624252453), FRAC_CONST(0.029765371299366) },
+    { FRAC_CONST(0.009426260588521), FRAC_CONST(0.029794430877553) },
+    { FRAC_CONST(0.009334808201034), FRAC_CONST(0.029823210019210) },
+    { FRAC_CONST(0.009243267950778), FRAC_CONST(0.029851708453456) },
+    { FRAC_CONST(0.009151640699363), FRAC_CONST(0.029879925912053) },
+    { FRAC_CONST(0.009059927309220), FRAC_CONST(0.029907862129408) },
+    { FRAC_CONST(0.008968128643591), FRAC_CONST(0.029935516842573) },
+    { FRAC_CONST(0.008876245566520), FRAC_CONST(0.029962889791254) },
+    { FRAC_CONST(0.008784278942845), FRAC_CONST(0.029989980717805) },
+    { FRAC_CONST(0.008692229638191), FRAC_CONST(0.030016789367235) },
+    { FRAC_CONST(0.008600098518961), FRAC_CONST(0.030043315487212) },
+    { FRAC_CONST(0.008507886452329), FRAC_CONST(0.030069558828062) },
+    { FRAC_CONST(0.008415594306230), FRAC_CONST(0.030095519142772) },
+    { FRAC_CONST(0.008323222949351), FRAC_CONST(0.030121196186994) },
+    { FRAC_CONST(0.008230773251129), FRAC_CONST(0.030146589719046) },
+    { FRAC_CONST(0.008138246081733), FRAC_CONST(0.030171699499915) },
+    { FRAC_CONST(0.008045642312067), FRAC_CONST(0.030196525293257) },
+    { FRAC_CONST(0.007952962813750), FRAC_CONST(0.030221066865402) },
+    { FRAC_CONST(0.007860208459119), FRAC_CONST(0.030245323985357) },
+    { FRAC_CONST(0.007767380121212), FRAC_CONST(0.030269296424803) },
+    { FRAC_CONST(0.007674478673766), FRAC_CONST(0.030292983958103) },
+    { FRAC_CONST(0.007581504991203), FRAC_CONST(0.030316386362302) },
+    { FRAC_CONST(0.007488459948628), FRAC_CONST(0.030339503417126) },
+    { FRAC_CONST(0.007395344421816), FRAC_CONST(0.030362334904989) },
+    { FRAC_CONST(0.007302159287206), FRAC_CONST(0.030384880610993) },
+    { FRAC_CONST(0.007208905421891), FRAC_CONST(0.030407140322928) },
+    { FRAC_CONST(0.007115583703613), FRAC_CONST(0.030429113831278) },
+    { FRAC_CONST(0.007022195010752), FRAC_CONST(0.030450800929220) },
+    { FRAC_CONST(0.006928740222316), FRAC_CONST(0.030472201412626) },
+    { FRAC_CONST(0.006835220217939), FRAC_CONST(0.030493315080068) },
+    { FRAC_CONST(0.006741635877866), FRAC_CONST(0.030514141732814) },
+    { FRAC_CONST(0.006647988082948), FRAC_CONST(0.030534681174838) },
+    { FRAC_CONST(0.006554277714635), FRAC_CONST(0.030554933212813) },
+    { FRAC_CONST(0.006460505654964), FRAC_CONST(0.030574897656119) },
+    { FRAC_CONST(0.006366672786553), FRAC_CONST(0.030594574316845) },
+    { FRAC_CONST(0.006272779992593), FRAC_CONST(0.030613963009786) },
+    { FRAC_CONST(0.006178828156839), FRAC_CONST(0.030633063552447) },
+    { FRAC_CONST(0.006084818163601), FRAC_CONST(0.030651875765048) },
+    { FRAC_CONST(0.005990750897737), FRAC_CONST(0.030670399470520) },
+    { FRAC_CONST(0.005896627244644), FRAC_CONST(0.030688634494512) },
+    { FRAC_CONST(0.005802448090250), FRAC_CONST(0.030706580665388) },
+    { FRAC_CONST(0.005708214321004), FRAC_CONST(0.030724237814232) },
+    { FRAC_CONST(0.005613926823871), FRAC_CONST(0.030741605774849) },
+    { FRAC_CONST(0.005519586486321), FRAC_CONST(0.030758684383764) },
+    { FRAC_CONST(0.005425194196321), FRAC_CONST(0.030775473480228) },
+    { FRAC_CONST(0.005330750842327), FRAC_CONST(0.030791972906214) },
+    { FRAC_CONST(0.005236257313276), FRAC_CONST(0.030808182506425) },
+    { FRAC_CONST(0.005141714498576), FRAC_CONST(0.030824102128288) },
+    { FRAC_CONST(0.005047123288102), FRAC_CONST(0.030839731621963) },
+    { FRAC_CONST(0.004952484572181), FRAC_CONST(0.030855070840339) },
+    { FRAC_CONST(0.004857799241589), FRAC_CONST(0.030870119639036) },
+    { FRAC_CONST(0.004763068187541), FRAC_CONST(0.030884877876411) },
+    { FRAC_CONST(0.004668292301681), FRAC_CONST(0.030899345413553) },
+    { FRAC_CONST(0.004573472476075), FRAC_CONST(0.030913522114288) },
+    { FRAC_CONST(0.004478609603205), FRAC_CONST(0.030927407845180) },
+    { FRAC_CONST(0.004383704575956), FRAC_CONST(0.030941002475530) },
+    { FRAC_CONST(0.004288758287610), FRAC_CONST(0.030954305877381) },
+    { FRAC_CONST(0.004193771631837), FRAC_CONST(0.030967317925516) },
+    { FRAC_CONST(0.004098745502689), FRAC_CONST(0.030980038497461) },
+    { FRAC_CONST(0.004003680794587), FRAC_CONST(0.030992467473486) },
+    { FRAC_CONST(0.003908578402316), FRAC_CONST(0.031004604736602) },
+    { FRAC_CONST(0.003813439221017), FRAC_CONST(0.031016450172571) },
+    { FRAC_CONST(0.003718264146176), FRAC_CONST(0.031028003669899) },
+    { FRAC_CONST(0.003623054073616), FRAC_CONST(0.031039265119839) },
+    { FRAC_CONST(0.003527809899492), FRAC_CONST(0.031050234416394) },
+    { FRAC_CONST(0.003432532520278), FRAC_CONST(0.031060911456318) },
+    { FRAC_CONST(0.003337222832760), FRAC_CONST(0.031071296139114) },
+    { FRAC_CONST(0.003241881734029), FRAC_CONST(0.031081388367037) },
+    { FRAC_CONST(0.003146510121474), FRAC_CONST(0.031091188045095) },
+    { FRAC_CONST(0.003051108892766), FRAC_CONST(0.031100695081051) },
+    { FRAC_CONST(0.002955678945860), FRAC_CONST(0.031109909385419) },
+    { FRAC_CONST(0.002860221178978), FRAC_CONST(0.031118830871473) },
+    { FRAC_CONST(0.002764736490604), FRAC_CONST(0.031127459455239) },
+    { FRAC_CONST(0.002669225779478), FRAC_CONST(0.031135795055501) },
+    { FRAC_CONST(0.002573689944583), FRAC_CONST(0.031143837593803) },
+    { FRAC_CONST(0.002478129885137), FRAC_CONST(0.031151586994444) },
+    { FRAC_CONST(0.002382546500589), FRAC_CONST(0.031159043184484) },
+    { FRAC_CONST(0.002286940690606), FRAC_CONST(0.031166206093743) },
+    { FRAC_CONST(0.002191313355067), FRAC_CONST(0.031173075654800) },
+    { FRAC_CONST(0.002095665394051), FRAC_CONST(0.031179651802998) },
+    { FRAC_CONST(0.001999997707835), FRAC_CONST(0.031185934476438) },
+    { FRAC_CONST(0.001904311196878), FRAC_CONST(0.031191923615985) },
+    { FRAC_CONST(0.001808606761820), FRAC_CONST(0.031197619165268) },
+    { FRAC_CONST(0.001712885303465), FRAC_CONST(0.031203021070678) },
+    { FRAC_CONST(0.001617147722782), FRAC_CONST(0.031208129281370) },
+    { FRAC_CONST(0.001521394920889), FRAC_CONST(0.031212943749264) },
+    { FRAC_CONST(0.001425627799047), FRAC_CONST(0.031217464429043) },
+    { FRAC_CONST(0.001329847258653), FRAC_CONST(0.031221691278159) },
+    { FRAC_CONST(0.001234054201231), FRAC_CONST(0.031225624256825) },
+    { FRAC_CONST(0.001138249528420), FRAC_CONST(0.031229263328024) },
+    { FRAC_CONST(0.001042434141971), FRAC_CONST(0.031232608457502) },
+    { FRAC_CONST(0.000946608943736), FRAC_CONST(0.031235659613775) },
+    { FRAC_CONST(0.000850774835656), FRAC_CONST(0.031238416768124) },
+    { FRAC_CONST(0.000754932719759), FRAC_CONST(0.031240879894597) },
+    { FRAC_CONST(0.000659083498149), FRAC_CONST(0.031243048970010) },
+    { FRAC_CONST(0.000563228072993), FRAC_CONST(0.031244923973948) },
+    { FRAC_CONST(0.000467367346520), FRAC_CONST(0.031246504888762) },
+    { FRAC_CONST(0.000371502221008), FRAC_CONST(0.031247791699571) },
+    { FRAC_CONST(0.000275633598775), FRAC_CONST(0.031248784394264) },
+    { FRAC_CONST(0.000179762382174), FRAC_CONST(0.031249482963498) },
+    { FRAC_CONST(0.000083889473581), FRAC_CONST(0.031249887400697) }
+};
+
+/* 64 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_256[] =
+{
+    { FRAC_CONST(0.088387931675923), FRAC_CONST(0.000271171628935) },
+    { FRAC_CONST(0.088354655998507), FRAC_CONST(0.002440238387037) },
+    { FRAC_CONST(0.088268158780110), FRAC_CONST(0.004607835236780) },
+    { FRAC_CONST(0.088128492123423), FRAC_CONST(0.006772656498875) },
+    { FRAC_CONST(0.087935740158418), FRAC_CONST(0.008933398165942) },
+    { FRAC_CONST(0.087690018991670), FRAC_CONST(0.011088758687994) },
+    { FRAC_CONST(0.087391476636423), FRAC_CONST(0.013237439756448) },
+    { FRAC_CONST(0.087040292923427), FRAC_CONST(0.015378147086172) },
+    { FRAC_CONST(0.086636679392621), FRAC_CONST(0.017509591195118) },
+    { FRAC_CONST(0.086180879165703), FRAC_CONST(0.019630488181053) },
+    { FRAC_CONST(0.085673166799686), FRAC_CONST(0.021739560494940) },
+    { FRAC_CONST(0.085113848121515), FRAC_CONST(0.023835537710479) },
+    { FRAC_CONST(0.084503260043847), FRAC_CONST(0.025917157289369) },
+    { FRAC_CONST(0.083841770362110), FRAC_CONST(0.027983165341813) },
+    { FRAC_CONST(0.083129777532952), FRAC_CONST(0.030032317381813) },
+    { FRAC_CONST(0.082367710434230), FRAC_CONST(0.032063379076803) },
+    { FRAC_CONST(0.081556028106671), FRAC_CONST(0.034075126991164) },
+    { FRAC_CONST(0.080695219477356), FRAC_CONST(0.036066349323177) },
+    { FRAC_CONST(0.079785803065216), FRAC_CONST(0.038035846634965) },
+    { FRAC_CONST(0.078828326668693), FRAC_CONST(0.039982432574992) },
+    { FRAC_CONST(0.077823367035766), FRAC_CONST(0.041904934592675) },
+    { FRAC_CONST(0.076771529516540), FRAC_CONST(0.043802194644686) },
+    { FRAC_CONST(0.075673447698606), FRAC_CONST(0.045673069892513) },
+    { FRAC_CONST(0.074529783025390), FRAC_CONST(0.047516433390863) },
+    { FRAC_CONST(0.073341224397728), FRAC_CONST(0.049331174766491) },
+    { FRAC_CONST(0.072108487758894), FRAC_CONST(0.051116200887052) },
+    { FRAC_CONST(0.070832315663343), FRAC_CONST(0.052870436519557) },
+    { FRAC_CONST(0.069513476829429), FRAC_CONST(0.054592824978055) },
+    { FRAC_CONST(0.068152765676348), FRAC_CONST(0.056282328760143) },
+    { FRAC_CONST(0.066751001845620), FRAC_CONST(0.057937930171918) },
+    { FRAC_CONST(0.065309029707361), FRAC_CONST(0.059558631940996) },
+    { FRAC_CONST(0.063827717851668), FRAC_CONST(0.061143457817234) },
+    { FRAC_CONST(0.062307958565413), FRAC_CONST(0.062691453160784) },
+    { FRAC_CONST(0.060750667294763), FRAC_CONST(0.064201685517134) },
+    { FRAC_CONST(0.059156782093749), FRAC_CONST(0.065673245178784) },
+    { FRAC_CONST(0.057527263059216), FRAC_CONST(0.067105245733220) },
+    { FRAC_CONST(0.055863091752499), FRAC_CONST(0.068496824596852) },
+    { FRAC_CONST(0.054165270608165), FRAC_CONST(0.069847143534609) },
+    { FRAC_CONST(0.052434822330188), FRAC_CONST(0.071155389164853) },
+    { FRAC_CONST(0.050672789275903), FRAC_CONST(0.072420773449336) },
+    { FRAC_CONST(0.048880232828135), FRAC_CONST(0.073642534167879) },
+    { FRAC_CONST(0.047058232755862), FRAC_CONST(0.074819935377512) },
+    { FRAC_CONST(0.045207886563797), FRAC_CONST(0.075952267855771) },
+    { FRAC_CONST(0.043330308831298), FRAC_CONST(0.077038849527912) },
+    { FRAC_CONST(0.041426630540984), FRAC_CONST(0.078079025877766) },
+    { FRAC_CONST(0.039497998397473), FRAC_CONST(0.079072170341994) },
+    { FRAC_CONST(0.037545574136653), FRAC_CONST(0.080017684687506) },
+    { FRAC_CONST(0.035570533825892), FRAC_CONST(0.080914999371817) },
+    { FRAC_CONST(0.033574067155622), FRAC_CONST(0.081763573886112) },
+    { FRAC_CONST(0.031557376722714), FRAC_CONST(0.082562897080836) },
+    { FRAC_CONST(0.029521677306074), FRAC_CONST(0.083312487473584) },
+    { FRAC_CONST(0.027468195134911), FRAC_CONST(0.084011893539132) },
+    { FRAC_CONST(0.025398167150101), FRAC_CONST(0.084660693981419) },
+    { FRAC_CONST(0.023312840259098), FRAC_CONST(0.085258497987320) },
+    { FRAC_CONST(0.021213470584847), FRAC_CONST(0.085804945462053) },
+    { FRAC_CONST(0.019101322709138), FRAC_CONST(0.086299707246093) },
+    { FRAC_CONST(0.016977668910873), FRAC_CONST(0.086742485313442) },
+    { FRAC_CONST(0.014843788399692), FRAC_CONST(0.087133012951149) },
+    { FRAC_CONST(0.012700966545425), FRAC_CONST(0.087471054919968) },
+    { FRAC_CONST(0.010550494103830), FRAC_CONST(0.087756407596056) },
+    { FRAC_CONST(0.008393666439096), FRAC_CONST(0.087988899093631) },
+    { FRAC_CONST(0.006231782743558), FRAC_CONST(0.088168389368510) },
+    { FRAC_CONST(0.004066145255116), FRAC_CONST(0.088294770302461) },
+    { FRAC_CONST(0.001898058472816), FRAC_CONST(0.088367965768336) }
+};
+
+#ifdef LD_DEC
+/* 128 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_1024[] =
+{
+    { FRAC_CONST(0.044194160825012), FRAC_CONST(0.000033896503468) },
+    { FRAC_CONST(0.044193120897389), FRAC_CONST(0.000305066138364) },
+    { FRAC_CONST(0.044190417123742), FRAC_CONST(0.000576224287693) },
+    { FRAC_CONST(0.044186049605866), FRAC_CONST(0.000847360742503) },
+    { FRAC_CONST(0.044180018508197), FRAC_CONST(0.001118465294660) },
+    { FRAC_CONST(0.044172324057802), FRAC_CONST(0.001389527737231) },
+    { FRAC_CONST(0.044162966544372), FRAC_CONST(0.001660537864867) },
+    { FRAC_CONST(0.044151946320213), FRAC_CONST(0.001931485474192) },
+    { FRAC_CONST(0.044139263800230), FRAC_CONST(0.002202360364180) },
+    { FRAC_CONST(0.044124919461912), FRAC_CONST(0.002473152336546) },
+    { FRAC_CONST(0.044108913845316), FRAC_CONST(0.002743851196123) },
+    { FRAC_CONST(0.044091247553044), FRAC_CONST(0.003014446751254) },
+    { FRAC_CONST(0.044071921250223), FRAC_CONST(0.003284928814169) },
+    { FRAC_CONST(0.044050935664476), FRAC_CONST(0.003555287201370) },
+    { FRAC_CONST(0.044028291585898), FRAC_CONST(0.003825511734018) },
+    { FRAC_CONST(0.044003989867028), FRAC_CONST(0.004095592238311) },
+    { FRAC_CONST(0.043978031422810), FRAC_CONST(0.004365518545871) },
+    { FRAC_CONST(0.043950417230565), FRAC_CONST(0.004635280494126) },
+    { FRAC_CONST(0.043921148329953), FRAC_CONST(0.004904867926689) },
+    { FRAC_CONST(0.043890225822930), FRAC_CONST(0.005174270693748) },
+    { FRAC_CONST(0.043857650873712), FRAC_CONST(0.005443478652439) },
+    { FRAC_CONST(0.043823424708727), FRAC_CONST(0.005712481667236) },
+    { FRAC_CONST(0.043787548616571), FRAC_CONST(0.005981269610326) },
+    { FRAC_CONST(0.043750023947958), FRAC_CONST(0.006249832361997) },
+    { FRAC_CONST(0.043710852115672), FRAC_CONST(0.006518159811011) },
+    { FRAC_CONST(0.043670034594508), FRAC_CONST(0.006786241854993) },
+    { FRAC_CONST(0.043627572921225), FRAC_CONST(0.007054068400804) },
+    { FRAC_CONST(0.043583468694479), FRAC_CONST(0.007321629364927) },
+    { FRAC_CONST(0.043537723574771), FRAC_CONST(0.007588914673843) },
+    { FRAC_CONST(0.043490339284377), FRAC_CONST(0.007855914264410) },
+    { FRAC_CONST(0.043441317607290), FRAC_CONST(0.008122618084246) },
+    { FRAC_CONST(0.043390660389149), FRAC_CONST(0.008389016092101) },
+    { FRAC_CONST(0.043338369537168), FRAC_CONST(0.008655098258243) },
+    { FRAC_CONST(0.043284447020070), FRAC_CONST(0.008920854564826) },
+    { FRAC_CONST(0.043228894868005), FRAC_CONST(0.009186275006278) },
+    { FRAC_CONST(0.043171715172482), FRAC_CONST(0.009451349589667) },
+    { FRAC_CONST(0.043112910086283), FRAC_CONST(0.009716068335087) },
+    { FRAC_CONST(0.043052481823387), FRAC_CONST(0.009980421276025) },
+    { FRAC_CONST(0.042990432658884), FRAC_CONST(0.010244398459743) },
+    { FRAC_CONST(0.042926764928889), FRAC_CONST(0.010507989947649) },
+    { FRAC_CONST(0.042861481030457), FRAC_CONST(0.010771185815673) },
+    { FRAC_CONST(0.042794583421490), FRAC_CONST(0.011033976154639) },
+    { FRAC_CONST(0.042726074620644), FRAC_CONST(0.011296351070639) },
+    { FRAC_CONST(0.042655957207238), FRAC_CONST(0.011558300685406) },
+    { FRAC_CONST(0.042584233821153), FRAC_CONST(0.011819815136685) },
+    { FRAC_CONST(0.042510907162732), FRAC_CONST(0.012080884578604) },
+    { FRAC_CONST(0.042435979992684), FRAC_CONST(0.012341499182048) },
+    { FRAC_CONST(0.042359455131975), FRAC_CONST(0.012601649135022) },
+    { FRAC_CONST(0.042281335461721), FRAC_CONST(0.012861324643029) },
+    { FRAC_CONST(0.042201623923085), FRAC_CONST(0.013120515929433) },
+    { FRAC_CONST(0.042120323517160), FRAC_CONST(0.013379213235827) },
+    { FRAC_CONST(0.042037437304862), FRAC_CONST(0.013637406822406) },
+    { FRAC_CONST(0.041952968406809), FRAC_CONST(0.013895086968325) },
+    { FRAC_CONST(0.041866920003207), FRAC_CONST(0.014152243972073) },
+    { FRAC_CONST(0.041779295333730), FRAC_CONST(0.014408868151835) },
+    { FRAC_CONST(0.041690097697398), FRAC_CONST(0.014664949845855) },
+    { FRAC_CONST(0.041599330452450), FRAC_CONST(0.014920479412801) },
+    { FRAC_CONST(0.041506997016224), FRAC_CONST(0.015175447232131) },
+    { FRAC_CONST(0.041413100865019), FRAC_CONST(0.015429843704450) },
+    { FRAC_CONST(0.041317645533974), FRAC_CONST(0.015683659251874) },
+    { FRAC_CONST(0.041220634616927), FRAC_CONST(0.015936884318392) },
+    { FRAC_CONST(0.041122071766285), FRAC_CONST(0.016189509370223) },
+    { FRAC_CONST(0.041021960692883), FRAC_CONST(0.016441524896177) },
+    { FRAC_CONST(0.040920305165846), FRAC_CONST(0.016692921408010) },
+    { FRAC_CONST(0.040817109012449), FRAC_CONST(0.016943689440788) },
+    { FRAC_CONST(0.040712376117967), FRAC_CONST(0.017193819553235) },
+    { FRAC_CONST(0.040606110425535), FRAC_CONST(0.017443302328094) },
+    { FRAC_CONST(0.040498315935996), FRAC_CONST(0.017692128372479) },
+    { FRAC_CONST(0.040388996707752), FRAC_CONST(0.017940288318230) },
+    { FRAC_CONST(0.040278156856609), FRAC_CONST(0.018187772822267) },
+    { FRAC_CONST(0.040165800555627), FRAC_CONST(0.018434572566936) },
+    { FRAC_CONST(0.040051932034955), FRAC_CONST(0.018680678260367) },
+    { FRAC_CONST(0.039936555581679), FRAC_CONST(0.018926080636820) },
+    { FRAC_CONST(0.039819675539659), FRAC_CONST(0.019170770457035) },
+    { FRAC_CONST(0.039701296309360), FRAC_CONST(0.019414738508577) },
+    { FRAC_CONST(0.039581422347694), FRAC_CONST(0.019657975606187) },
+    { FRAC_CONST(0.039460058167849), FRAC_CONST(0.019900472592126) },
+    { FRAC_CONST(0.039337208339116), FRAC_CONST(0.020142220336521) },
+    { FRAC_CONST(0.039212877486723), FRAC_CONST(0.020383209737704) },
+    { FRAC_CONST(0.039087070291656), FRAC_CONST(0.020623431722561) },
+    { FRAC_CONST(0.038959791490485), FRAC_CONST(0.020862877246870) },
+    { FRAC_CONST(0.038831045875184), FRAC_CONST(0.021101537295642) },
+    { FRAC_CONST(0.038700838292953), FRAC_CONST(0.021339402883462) },
+    { FRAC_CONST(0.038569173646034), FRAC_CONST(0.021576465054824) },
+    { FRAC_CONST(0.038436056891527), FRAC_CONST(0.021812714884472) },
+    { FRAC_CONST(0.038301493041202), FRAC_CONST(0.022048143477734) },
+    { FRAC_CONST(0.038165487161312), FRAC_CONST(0.022282741970855) },
+    { FRAC_CONST(0.038028044372402), FRAC_CONST(0.022516501531335) },
+    { FRAC_CONST(0.037889169849115), FRAC_CONST(0.022749413358259) },
+    { FRAC_CONST(0.037748868819998), FRAC_CONST(0.022981468682628) },
+    { FRAC_CONST(0.037607146567305), FRAC_CONST(0.023212658767690) },
+    { FRAC_CONST(0.037464008426800), FRAC_CONST(0.023442974909269) },
+    { FRAC_CONST(0.037319459787553), FRAC_CONST(0.023672408436094) },
+    { FRAC_CONST(0.037173506091737), FRAC_CONST(0.023900950710120) },
+    { FRAC_CONST(0.037026152834428), FRAC_CONST(0.024128593126861) },
+    { FRAC_CONST(0.036877405563392), FRAC_CONST(0.024355327115708) },
+    { FRAC_CONST(0.036727269878879), FRAC_CONST(0.024581144140255) },
+    { FRAC_CONST(0.036575751433414), FRAC_CONST(0.024806035698618) },
+    { FRAC_CONST(0.036422855931580), FRAC_CONST(0.025029993323758) },
+    { FRAC_CONST(0.036268589129807), FRAC_CONST(0.025253008583796) },
+    { FRAC_CONST(0.036112956836151), FRAC_CONST(0.025475073082334) },
+    { FRAC_CONST(0.035955964910083), FRAC_CONST(0.025696178458769) },
+    { FRAC_CONST(0.035797619262257), FRAC_CONST(0.025916316388609) },
+    { FRAC_CONST(0.035637925854300), FRAC_CONST(0.026135478583784) },
+    { FRAC_CONST(0.035476890698576), FRAC_CONST(0.026353656792963) },
+    { FRAC_CONST(0.035314519857970), FRAC_CONST(0.026570842801858) },
+    { FRAC_CONST(0.035150819445650), FRAC_CONST(0.026787028433540) },
+    { FRAC_CONST(0.034985795624846), FRAC_CONST(0.027002205548742) },
+    { FRAC_CONST(0.034819454608610), FRAC_CONST(0.027216366046166) },
+    { FRAC_CONST(0.034651802659589), FRAC_CONST(0.027429501862792) },
+    { FRAC_CONST(0.034482846089783), FRAC_CONST(0.027641604974175) },
+    { FRAC_CONST(0.034312591260311), FRAC_CONST(0.027852667394755) },
+    { FRAC_CONST(0.034141044581172), FRAC_CONST(0.028062681178149) },
+    { FRAC_CONST(0.033968212511001), FRAC_CONST(0.028271638417458) },
+    { FRAC_CONST(0.033794101556828), FRAC_CONST(0.028479531245560) },
+    { FRAC_CONST(0.033618718273831), FRAC_CONST(0.028686351835407) },
+    { FRAC_CONST(0.033442069265093), FRAC_CONST(0.028892092400321) },
+    { FRAC_CONST(0.033264161181349), FRAC_CONST(0.029096745194286) },
+    { FRAC_CONST(0.033085000720737), FRAC_CONST(0.029300302512241) },
+    { FRAC_CONST(0.032904594628548), FRAC_CONST(0.029502756690366) },
+    { FRAC_CONST(0.032722949696969), FRAC_CONST(0.029704100106376) },
+    { FRAC_CONST(0.032540072764829), FRAC_CONST(0.029904325179807) },
+    { FRAC_CONST(0.032355970717341), FRAC_CONST(0.030103424372297) },
+    { FRAC_CONST(0.032170650485843), FRAC_CONST(0.030301390187873) },
+    { FRAC_CONST(0.031984119047537), FRAC_CONST(0.030498215173235) },
+    { FRAC_CONST(0.031796383425227), FRAC_CONST(0.030693891918034) },
+    { FRAC_CONST(0.031607450687052), FRAC_CONST(0.030888413055150) },
+    { FRAC_CONST(0.031417327946223), FRAC_CONST(0.031081771260973) },
+    { FRAC_CONST(0.031226022360754), FRAC_CONST(0.031273959255676) },
+    { FRAC_CONST(0.031033541133193), FRAC_CONST(0.031464969803488) },
+    { FRAC_CONST(0.030839891510348), FRAC_CONST(0.031654795712972) },
+    { FRAC_CONST(0.030645080783018), FRAC_CONST(0.031843429837288) },
+    { FRAC_CONST(0.030449116285718), FRAC_CONST(0.032030865074469) },
+    { FRAC_CONST(0.030252005396399), FRAC_CONST(0.032217094367684) },
+    { FRAC_CONST(0.030053755536176), FRAC_CONST(0.032402110705505) },
+    { FRAC_CONST(0.029854374169043), FRAC_CONST(0.032585907122172) },
+    { FRAC_CONST(0.029653868801596), FRAC_CONST(0.032768476697853) },
+    { FRAC_CONST(0.029452246982750), FRAC_CONST(0.032949812558907) },
+    { FRAC_CONST(0.029249516303451), FRAC_CONST(0.033129907878142) },
+    { FRAC_CONST(0.029045684396395), FRAC_CONST(0.033308755875070) },
+    { FRAC_CONST(0.028840758935738), FRAC_CONST(0.033486349816166) },
+    { FRAC_CONST(0.028634747636808), FRAC_CONST(0.033662683015118) },
+    { FRAC_CONST(0.028427658255815), FRAC_CONST(0.033837748833080) },
+    { FRAC_CONST(0.028219498589555), FRAC_CONST(0.034011540678924) },
+    { FRAC_CONST(0.028010276475123), FRAC_CONST(0.034184052009485) },
+    { FRAC_CONST(0.027799999789613), FRAC_CONST(0.034355276329809) },
+    { FRAC_CONST(0.027588676449824), FRAC_CONST(0.034525207193396) },
+    { FRAC_CONST(0.027376314411959), FRAC_CONST(0.034693838202447) },
+    { FRAC_CONST(0.027162921671330), FRAC_CONST(0.034861163008098) },
+    { FRAC_CONST(0.026948506262053), FRAC_CONST(0.035027175310665) },
+    { FRAC_CONST(0.026733076256746), FRAC_CONST(0.035191868859880) },
+    { FRAC_CONST(0.026516639766228), FRAC_CONST(0.035355237455122) },
+    { FRAC_CONST(0.026299204939210), FRAC_CONST(0.035517274945657) },
+    { FRAC_CONST(0.026080779961991), FRAC_CONST(0.035677975230865) },
+    { FRAC_CONST(0.025861373058146), FRAC_CONST(0.035837332260471) },
+    { FRAC_CONST(0.025640992488223), FRAC_CONST(0.035995340034772) },
+    { FRAC_CONST(0.025419646549425), FRAC_CONST(0.036151992604866) },
+    { FRAC_CONST(0.025197343575302), FRAC_CONST(0.036307284072871) },
+    { FRAC_CONST(0.024974091935435), FRAC_CONST(0.036461208592152) },
+    { FRAC_CONST(0.024749900035122), FRAC_CONST(0.036613760367538) },
+    { FRAC_CONST(0.024524776315061), FRAC_CONST(0.036764933655540) },
+    { FRAC_CONST(0.024298729251033), FRAC_CONST(0.036914722764569) },
+    { FRAC_CONST(0.024071767353583), FRAC_CONST(0.037063122055150) },
+    { FRAC_CONST(0.023843899167697), FRAC_CONST(0.037210125940135) },
+    { FRAC_CONST(0.023615133272485), FRAC_CONST(0.037355728884908) },
+    { FRAC_CONST(0.023385478280852), FRAC_CONST(0.037499925407603) },
+    { FRAC_CONST(0.023154942839179), FRAC_CONST(0.037642710079302) },
+    { FRAC_CONST(0.022923535626995), FRAC_CONST(0.037784077524241) },
+    { FRAC_CONST(0.022691265356652), FRAC_CONST(0.037924022420018) },
+    { FRAC_CONST(0.022458140772993), FRAC_CONST(0.038062539497785) },
+    { FRAC_CONST(0.022224170653027), FRAC_CONST(0.038199623542453) },
+    { FRAC_CONST(0.021989363805598), FRAC_CONST(0.038335269392885) },
+    { FRAC_CONST(0.021753729071049), FRAC_CONST(0.038469471942092) },
+    { FRAC_CONST(0.021517275320897), FRAC_CONST(0.038602226137423) },
+    { FRAC_CONST(0.021280011457490), FRAC_CONST(0.038733526980758) },
+    { FRAC_CONST(0.021041946413679), FRAC_CONST(0.038863369528695) },
+    { FRAC_CONST(0.020803089152479), FRAC_CONST(0.038991748892734) },
+    { FRAC_CONST(0.020563448666730), FRAC_CONST(0.039118660239466) },
+    { FRAC_CONST(0.020323033978761), FRAC_CONST(0.039244098790750) },
+    { FRAC_CONST(0.020081854140050), FRAC_CONST(0.039368059823895) },
+    { FRAC_CONST(0.019839918230880), FRAC_CONST(0.039490538671839) },
+    { FRAC_CONST(0.019597235360003), FRAC_CONST(0.039611530723322) },
+    { FRAC_CONST(0.019353814664291), FRAC_CONST(0.039731031423061) },
+    { FRAC_CONST(0.019109665308395), FRAC_CONST(0.039849036271924) },
+    { FRAC_CONST(0.018864796484402), FRAC_CONST(0.039965540827094) },
+    { FRAC_CONST(0.018619217411483), FRAC_CONST(0.040080540702240) },
+    { FRAC_CONST(0.018372937335552), FRAC_CONST(0.040194031567683) },
+    { FRAC_CONST(0.018125965528915), FRAC_CONST(0.040306009150554) },
+    { FRAC_CONST(0.017878311289921), FRAC_CONST(0.040416469234963) },
+    { FRAC_CONST(0.017629983942612), FRAC_CONST(0.040525407662148) },
+    { FRAC_CONST(0.017380992836371), FRAC_CONST(0.040632820330639) },
+    { FRAC_CONST(0.017131347345575), FRAC_CONST(0.040738703196411) },
+    { FRAC_CONST(0.016881056869233), FRAC_CONST(0.040843052273033) },
+    { FRAC_CONST(0.016630130830641), FRAC_CONST(0.040945863631822) },
+    { FRAC_CONST(0.016378578677023), FRAC_CONST(0.041047133401988) },
+    { FRAC_CONST(0.016126409879175), FRAC_CONST(0.041146857770781) },
+    { FRAC_CONST(0.015873633931110), FRAC_CONST(0.041245032983635) },
+    { FRAC_CONST(0.015620260349699), FRAC_CONST(0.041341655344309) },
+    { FRAC_CONST(0.015366298674314), FRAC_CONST(0.041436721215026) },
+    { FRAC_CONST(0.015111758466470), FRAC_CONST(0.041530227016609) },
+    { FRAC_CONST(0.014856649309460), FRAC_CONST(0.041622169228618) },
+    { FRAC_CONST(0.014600980808001), FRAC_CONST(0.041712544389481) },
+    { FRAC_CONST(0.014344762587867), FRAC_CONST(0.041801349096623) },
+    { FRAC_CONST(0.014088004295529), FRAC_CONST(0.041888580006598) },
+    { FRAC_CONST(0.013830715597792), FRAC_CONST(0.041974233835211) },
+    { FRAC_CONST(0.013572906181430), FRAC_CONST(0.042058307357645) },
+    { FRAC_CONST(0.013314585752822), FRAC_CONST(0.042140797408577) },
+    { FRAC_CONST(0.013055764037585), FRAC_CONST(0.042221700882306) },
+    { FRAC_CONST(0.012796450780212), FRAC_CONST(0.042301014732860) },
+    { FRAC_CONST(0.012536655743699), FRAC_CONST(0.042378735974118) },
+    { FRAC_CONST(0.012276388709183), FRAC_CONST(0.042454861679919) },
+    { FRAC_CONST(0.012015659475571), FRAC_CONST(0.042529388984173) },
+    { FRAC_CONST(0.011754477859172), FRAC_CONST(0.042602315080970) },
+    { FRAC_CONST(0.011492853693324), FRAC_CONST(0.042673637224683) },
+    { FRAC_CONST(0.011230796828031), FRAC_CONST(0.042743352730074) },
+    { FRAC_CONST(0.010968317129584), FRAC_CONST(0.042811458972393) },
+    { FRAC_CONST(0.010705424480197), FRAC_CONST(0.042877953387479) },
+    { FRAC_CONST(0.010442128777629), FRAC_CONST(0.042942833471854) },
+    { FRAC_CONST(0.010178439934815), FRAC_CONST(0.043006096782821) },
+    { FRAC_CONST(0.009914367879490), FRAC_CONST(0.043067740938551) },
+    { FRAC_CONST(0.009649922553818), FRAC_CONST(0.043127763618177) },
+    { FRAC_CONST(0.009385113914016), FRAC_CONST(0.043186162561878) },
+    { FRAC_CONST(0.009119951929979), FRAC_CONST(0.043242935570968) },
+    { FRAC_CONST(0.008854446584907), FRAC_CONST(0.043298080507974) },
+    { FRAC_CONST(0.008588607874926), FRAC_CONST(0.043351595296722) },
+    { FRAC_CONST(0.008322445808712), FRAC_CONST(0.043403477922409) },
+    { FRAC_CONST(0.008055970407118), FRAC_CONST(0.043453726431684) },
+    { FRAC_CONST(0.007789191702791), FRAC_CONST(0.043502338932719) },
+    { FRAC_CONST(0.007522119739798), FRAC_CONST(0.043549313595281) },
+    { FRAC_CONST(0.007254764573250), FRAC_CONST(0.043594648650800) },
+    { FRAC_CONST(0.006987136268915), FRAC_CONST(0.043638342392438) },
+    { FRAC_CONST(0.006719244902849), FRAC_CONST(0.043680393175148) },
+    { FRAC_CONST(0.006451100561010), FRAC_CONST(0.043720799415744) },
+    { FRAC_CONST(0.006182713338881), FRAC_CONST(0.043759559592953) },
+    { FRAC_CONST(0.005914093341090), FRAC_CONST(0.043796672247476) },
+    { FRAC_CONST(0.005645250681027), FRAC_CONST(0.043832135982044) },
+    { FRAC_CONST(0.005376195480466), FRAC_CONST(0.043865949461465) },
+    { FRAC_CONST(0.005106937869184), FRAC_CONST(0.043898111412683) },
+    { FRAC_CONST(0.004837487984578), FRAC_CONST(0.043928620624817) },
+    { FRAC_CONST(0.004567855971284), FRAC_CONST(0.043957475949213) },
+    { FRAC_CONST(0.004298051980793), FRAC_CONST(0.043984676299484) },
+    { FRAC_CONST(0.004028086171076), FRAC_CONST(0.044010220651553) },
+    { FRAC_CONST(0.003757968706190), FRAC_CONST(0.044034108043689) },
+    { FRAC_CONST(0.003487709755907), FRAC_CONST(0.044056337576546) },
+    { FRAC_CONST(0.003217319495322), FRAC_CONST(0.044076908413193) },
+    { FRAC_CONST(0.002946808104477), FRAC_CONST(0.044095819779151) },
+    { FRAC_CONST(0.002676185767973), FRAC_CONST(0.044113070962418) },
+    { FRAC_CONST(0.002405462674586), FRAC_CONST(0.044128661313495) },
+    { FRAC_CONST(0.002134649016890), FRAC_CONST(0.044142590245416) },
+    { FRAC_CONST(0.001863754990865), FRAC_CONST(0.044154857233763) },
+    { FRAC_CONST(0.001592790795518), FRAC_CONST(0.044165461816692) },
+    { FRAC_CONST(0.001321766632497), FRAC_CONST(0.044174403594946) },
+    { FRAC_CONST(0.001050692705710), FRAC_CONST(0.044181682231873) },
+    { FRAC_CONST(0.000779579220936), FRAC_CONST(0.044187297453434) },
+    { FRAC_CONST(0.000508436385446), FRAC_CONST(0.044191249048222) },
+    { FRAC_CONST(0.000237274407613), FRAC_CONST(0.044193536867459) }
+};
+#endif // LD_DEC
+
+#ifdef ALLOW_SMALL_FRAMELENGTH
+/* 480 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_1920[] =
+{
+    { FRAC_CONST(0.032274858518097), FRAC_CONST(0.000013202404176) },
+    { FRAC_CONST(0.032274642494505), FRAC_CONST(0.000118821372483) },
+    { FRAC_CONST(0.032274080835421), FRAC_CONST(0.000224439068308) },
+    { FRAC_CONST(0.032273173546860), FRAC_CONST(0.000330054360572) },
+    { FRAC_CONST(0.032271920638538), FRAC_CONST(0.000435666118218) },
+    { FRAC_CONST(0.032270322123873), FRAC_CONST(0.000541273210231) },
+    { FRAC_CONST(0.032268378019984), FRAC_CONST(0.000646874505642) },
+    { FRAC_CONST(0.032266088347691), FRAC_CONST(0.000752468873546) },
+    { FRAC_CONST(0.032263453131514), FRAC_CONST(0.000858055183114) },
+    { FRAC_CONST(0.032260472399674), FRAC_CONST(0.000963632303600) },
+    { FRAC_CONST(0.032257146184092), FRAC_CONST(0.001069199104358) },
+    { FRAC_CONST(0.032253474520390), FRAC_CONST(0.001174754454853) },
+    { FRAC_CONST(0.032249457447888), FRAC_CONST(0.001280297224671) },
+    { FRAC_CONST(0.032245095009606), FRAC_CONST(0.001385826283535) },
+    { FRAC_CONST(0.032240387252262), FRAC_CONST(0.001491340501313) },
+    { FRAC_CONST(0.032235334226272), FRAC_CONST(0.001596838748031) },
+    { FRAC_CONST(0.032229935985750), FRAC_CONST(0.001702319893890) },
+    { FRAC_CONST(0.032224192588507), FRAC_CONST(0.001807782809271) },
+    { FRAC_CONST(0.032218104096050), FRAC_CONST(0.001913226364749) },
+    { FRAC_CONST(0.032211670573582), FRAC_CONST(0.002018649431111) },
+    { FRAC_CONST(0.032204892090000), FRAC_CONST(0.002124050879359) },
+    { FRAC_CONST(0.032197768717898), FRAC_CONST(0.002229429580728) },
+    { FRAC_CONST(0.032190300533560), FRAC_CONST(0.002334784406698) },
+    { FRAC_CONST(0.032182487616965), FRAC_CONST(0.002440114229003) },
+    { FRAC_CONST(0.032174330051782), FRAC_CONST(0.002545417919644) },
+    { FRAC_CONST(0.032165827925374), FRAC_CONST(0.002650694350905) },
+    { FRAC_CONST(0.032156981328790), FRAC_CONST(0.002755942395358) },
+    { FRAC_CONST(0.032147790356771), FRAC_CONST(0.002861160925883) },
+    { FRAC_CONST(0.032138255107744), FRAC_CONST(0.002966348815672) },
+    { FRAC_CONST(0.032128375683825), FRAC_CONST(0.003071504938250) },
+    { FRAC_CONST(0.032118152190814), FRAC_CONST(0.003176628167476) },
+    { FRAC_CONST(0.032107584738196), FRAC_CONST(0.003281717377568) },
+    { FRAC_CONST(0.032096673439141), FRAC_CONST(0.003386771443102) },
+    { FRAC_CONST(0.032085418410500), FRAC_CONST(0.003491789239036) },
+    { FRAC_CONST(0.032073819772804), FRAC_CONST(0.003596769640711) },
+    { FRAC_CONST(0.032061877650267), FRAC_CONST(0.003701711523874) },
+    { FRAC_CONST(0.032049592170778), FRAC_CONST(0.003806613764680) },
+    { FRAC_CONST(0.032036963465906), FRAC_CONST(0.003911475239711) },
+    { FRAC_CONST(0.032023991670893), FRAC_CONST(0.004016294825985) },
+    { FRAC_CONST(0.032010676924657), FRAC_CONST(0.004121071400967) },
+    { FRAC_CONST(0.031997019369789), FRAC_CONST(0.004225803842586) },
+    { FRAC_CONST(0.031983019152549), FRAC_CONST(0.004330491029241) },
+    { FRAC_CONST(0.031968676422869), FRAC_CONST(0.004435131839816) },
+    { FRAC_CONST(0.031953991334348), FRAC_CONST(0.004539725153692) },
+    { FRAC_CONST(0.031938964044252), FRAC_CONST(0.004644269850758) },
+    { FRAC_CONST(0.031923594713510), FRAC_CONST(0.004748764811426) },
+    { FRAC_CONST(0.031907883506716), FRAC_CONST(0.004853208916638) },
+    { FRAC_CONST(0.031891830592124), FRAC_CONST(0.004957601047881) },
+    { FRAC_CONST(0.031875436141648), FRAC_CONST(0.005061940087200) },
+    { FRAC_CONST(0.031858700330859), FRAC_CONST(0.005166224917208) },
+    { FRAC_CONST(0.031841623338985), FRAC_CONST(0.005270454421097) },
+    { FRAC_CONST(0.031824205348907), FRAC_CONST(0.005374627482653) },
+    { FRAC_CONST(0.031806446547156), FRAC_CONST(0.005478742986267) },
+    { FRAC_CONST(0.031788347123916), FRAC_CONST(0.005582799816945) },
+    { FRAC_CONST(0.031769907273017), FRAC_CONST(0.005686796860323) },
+    { FRAC_CONST(0.031751127191935), FRAC_CONST(0.005790733002674) },
+    { FRAC_CONST(0.031732007081789), FRAC_CONST(0.005894607130928) },
+    { FRAC_CONST(0.031712547147340), FRAC_CONST(0.005998418132675) },
+    { FRAC_CONST(0.031692747596989), FRAC_CONST(0.006102164896182) },
+    { FRAC_CONST(0.031672608642773), FRAC_CONST(0.006205846310406) },
+    { FRAC_CONST(0.031652130500364), FRAC_CONST(0.006309461265002) },
+    { FRAC_CONST(0.031631313389067), FRAC_CONST(0.006413008650337) },
+    { FRAC_CONST(0.031610157531816), FRAC_CONST(0.006516487357501) },
+    { FRAC_CONST(0.031588663155172), FRAC_CONST(0.006619896278321) },
+    { FRAC_CONST(0.031566830489325), FRAC_CONST(0.006723234305370) },
+    { FRAC_CONST(0.031544659768083), FRAC_CONST(0.006826500331981) },
+    { FRAC_CONST(0.031522151228878), FRAC_CONST(0.006929693252258) },
+    { FRAC_CONST(0.031499305112758), FRAC_CONST(0.007032811961088) },
+    { FRAC_CONST(0.031476121664387), FRAC_CONST(0.007135855354151) },
+    { FRAC_CONST(0.031452601132040), FRAC_CONST(0.007238822327937) },
+    { FRAC_CONST(0.031428743767604), FRAC_CONST(0.007341711779751) },
+    { FRAC_CONST(0.031404549826572), FRAC_CONST(0.007444522607730) },
+    { FRAC_CONST(0.031380019568042), FRAC_CONST(0.007547253710853) },
+    { FRAC_CONST(0.031355153254712), FRAC_CONST(0.007649903988952) },
+    { FRAC_CONST(0.031329951152882), FRAC_CONST(0.007752472342725) },
+    { FRAC_CONST(0.031304413532445), FRAC_CONST(0.007854957673748) },
+    { FRAC_CONST(0.031278540666888), FRAC_CONST(0.007957358884484) },
+    { FRAC_CONST(0.031252332833290), FRAC_CONST(0.008059674878300) },
+    { FRAC_CONST(0.031225790312316), FRAC_CONST(0.008161904559473) },
+    { FRAC_CONST(0.031198913388214), FRAC_CONST(0.008264046833205) },
+    { FRAC_CONST(0.031171702348814), FRAC_CONST(0.008366100605636) },
+    { FRAC_CONST(0.031144157485525), FRAC_CONST(0.008468064783849) },
+    { FRAC_CONST(0.031116279093331), FRAC_CONST(0.008569938275893) },
+    { FRAC_CONST(0.031088067470786), FRAC_CONST(0.008671719990782) },
+    { FRAC_CONST(0.031059522920014), FRAC_CONST(0.008773408838517) },
+    { FRAC_CONST(0.031030645746705), FRAC_CONST(0.008875003730092) },
+    { FRAC_CONST(0.031001436260110), FRAC_CONST(0.008976503577507) },
+    { FRAC_CONST(0.030971894773039), FRAC_CONST(0.009077907293780) },
+    { FRAC_CONST(0.030942021601857), FRAC_CONST(0.009179213792959) },
+    { FRAC_CONST(0.030911817066483), FRAC_CONST(0.009280421990133) },
+    { FRAC_CONST(0.030881281490382), FRAC_CONST(0.009381530801444) },
+    { FRAC_CONST(0.030850415200566), FRAC_CONST(0.009482539144097) },
+    { FRAC_CONST(0.030819218527589), FRAC_CONST(0.009583445936373) },
+    { FRAC_CONST(0.030787691805541), FRAC_CONST(0.009684250097643) },
+    { FRAC_CONST(0.030755835372048), FRAC_CONST(0.009784950548375) },
+    { FRAC_CONST(0.030723649568268), FRAC_CONST(0.009885546210147) },
+    { FRAC_CONST(0.030691134738883), FRAC_CONST(0.009986036005661) },
+    { FRAC_CONST(0.030658291232103), FRAC_CONST(0.010086418858753) },
+    { FRAC_CONST(0.030625119399655), FRAC_CONST(0.010186693694402) },
+    { FRAC_CONST(0.030591619596781), FRAC_CONST(0.010286859438745) },
+    { FRAC_CONST(0.030557792182239), FRAC_CONST(0.010386915019088) },
+    { FRAC_CONST(0.030523637518292), FRAC_CONST(0.010486859363916) },
+    { FRAC_CONST(0.030489155970710), FRAC_CONST(0.010586691402906) },
+    { FRAC_CONST(0.030454347908763), FRAC_CONST(0.010686410066936) },
+    { FRAC_CONST(0.030419213705216), FRAC_CONST(0.010786014288099) },
+    { FRAC_CONST(0.030383753736329), FRAC_CONST(0.010885502999714) },
+    { FRAC_CONST(0.030347968381849), FRAC_CONST(0.010984875136338) },
+    { FRAC_CONST(0.030311858025010), FRAC_CONST(0.011084129633775) },
+    { FRAC_CONST(0.030275423052523), FRAC_CONST(0.011183265429088) },
+    { FRAC_CONST(0.030238663854579), FRAC_CONST(0.011282281460612) },
+    { FRAC_CONST(0.030201580824838), FRAC_CONST(0.011381176667967) },
+    { FRAC_CONST(0.030164174360430), FRAC_CONST(0.011479949992062) },
+    { FRAC_CONST(0.030126444861948), FRAC_CONST(0.011578600375117) },
+    { FRAC_CONST(0.030088392733446), FRAC_CONST(0.011677126760663) },
+    { FRAC_CONST(0.030050018382430), FRAC_CONST(0.011775528093563) },
+    { FRAC_CONST(0.030011322219859), FRAC_CONST(0.011873803320018) },
+    { FRAC_CONST(0.029972304660138), FRAC_CONST(0.011971951387578) },
+    { FRAC_CONST(0.029932966121114), FRAC_CONST(0.012069971245157) },
+    { FRAC_CONST(0.029893307024070), FRAC_CONST(0.012167861843041) },
+    { FRAC_CONST(0.029853327793724), FRAC_CONST(0.012265622132901) },
+    { FRAC_CONST(0.029813028858222), FRAC_CONST(0.012363251067801) },
+    { FRAC_CONST(0.029772410649132), FRAC_CONST(0.012460747602215) },
+    { FRAC_CONST(0.029731473601443), FRAC_CONST(0.012558110692033) },
+    { FRAC_CONST(0.029690218153558), FRAC_CONST(0.012655339294575) },
+    { FRAC_CONST(0.029648644747289), FRAC_CONST(0.012752432368600) },
+    { FRAC_CONST(0.029606753827855), FRAC_CONST(0.012849388874320) },
+    { FRAC_CONST(0.029564545843872), FRAC_CONST(0.012946207773407) },
+    { FRAC_CONST(0.029522021247356), FRAC_CONST(0.013042888029011) },
+    { FRAC_CONST(0.029479180493710), FRAC_CONST(0.013139428605762) },
+    { FRAC_CONST(0.029436024041725), FRAC_CONST(0.013235828469789) },
+    { FRAC_CONST(0.029392552353570), FRAC_CONST(0.013332086588727) },
+    { FRAC_CONST(0.029348765894794), FRAC_CONST(0.013428201931728) },
+    { FRAC_CONST(0.029304665134313), FRAC_CONST(0.013524173469475) },
+    { FRAC_CONST(0.029260250544412), FRAC_CONST(0.013620000174189) },
+    { FRAC_CONST(0.029215522600735), FRAC_CONST(0.013715681019643) },
+    { FRAC_CONST(0.029170481782283), FRAC_CONST(0.013811214981173) },
+    { FRAC_CONST(0.029125128571406), FRAC_CONST(0.013906601035686) },
+    { FRAC_CONST(0.029079463453801), FRAC_CONST(0.014001838161674) },
+    { FRAC_CONST(0.029033486918505), FRAC_CONST(0.014096925339225) },
+    { FRAC_CONST(0.028987199457889), FRAC_CONST(0.014191861550031) },
+    { FRAC_CONST(0.028940601567655), FRAC_CONST(0.014286645777401) },
+    { FRAC_CONST(0.028893693746829), FRAC_CONST(0.014381277006273) },
+    { FRAC_CONST(0.028846476497755), FRAC_CONST(0.014475754223221) },
+    { FRAC_CONST(0.028798950326094), FRAC_CONST(0.014570076416472) },
+    { FRAC_CONST(0.028751115740811), FRAC_CONST(0.014664242575910) },
+    { FRAC_CONST(0.028702973254178), FRAC_CONST(0.014758251693091) },
+    { FRAC_CONST(0.028654523381760), FRAC_CONST(0.014852102761253) },
+    { FRAC_CONST(0.028605766642418), FRAC_CONST(0.014945794775326) },
+    { FRAC_CONST(0.028556703558297), FRAC_CONST(0.015039326731945) },
+    { FRAC_CONST(0.028507334654823), FRAC_CONST(0.015132697629457) },
+    { FRAC_CONST(0.028457660460698), FRAC_CONST(0.015225906467935) },
+    { FRAC_CONST(0.028407681507891), FRAC_CONST(0.015318952249187) },
+    { FRAC_CONST(0.028357398331639), FRAC_CONST(0.015411833976768) },
+    { FRAC_CONST(0.028306811470432), FRAC_CONST(0.015504550655988) },
+    { FRAC_CONST(0.028255921466016), FRAC_CONST(0.015597101293927) },
+    { FRAC_CONST(0.028204728863381), FRAC_CONST(0.015689484899442) },
+    { FRAC_CONST(0.028153234210760), FRAC_CONST(0.015781700483179) },
+    { FRAC_CONST(0.028101438059619), FRAC_CONST(0.015873747057582) },
+    { FRAC_CONST(0.028049340964652), FRAC_CONST(0.015965623636907) },
+    { FRAC_CONST(0.027996943483779), FRAC_CONST(0.016057329237229) },
+    { FRAC_CONST(0.027944246178133), FRAC_CONST(0.016148862876456) },
+    { FRAC_CONST(0.027891249612061), FRAC_CONST(0.016240223574335) },
+    { FRAC_CONST(0.027837954353113), FRAC_CONST(0.016331410352467) },
+    { FRAC_CONST(0.027784360972039), FRAC_CONST(0.016422422234315) },
+    { FRAC_CONST(0.027730470042780), FRAC_CONST(0.016513258245214) },
+    { FRAC_CONST(0.027676282142466), FRAC_CONST(0.016603917412384) },
+    { FRAC_CONST(0.027621797851405), FRAC_CONST(0.016694398764938) },
+    { FRAC_CONST(0.027567017753080), FRAC_CONST(0.016784701333894) },
+    { FRAC_CONST(0.027511942434143), FRAC_CONST(0.016874824152183) },
+    { FRAC_CONST(0.027456572484404), FRAC_CONST(0.016964766254662) },
+    { FRAC_CONST(0.027400908496833), FRAC_CONST(0.017054526678124) },
+    { FRAC_CONST(0.027344951067546), FRAC_CONST(0.017144104461307) },
+    { FRAC_CONST(0.027288700795801), FRAC_CONST(0.017233498644904) },
+    { FRAC_CONST(0.027232158283994), FRAC_CONST(0.017322708271577) },
+    { FRAC_CONST(0.027175324137651), FRAC_CONST(0.017411732385960) },
+    { FRAC_CONST(0.027118198965418), FRAC_CONST(0.017500570034678) },
+    { FRAC_CONST(0.027060783379060), FRAC_CONST(0.017589220266351) },
+    { FRAC_CONST(0.027003077993454), FRAC_CONST(0.017677682131607) },
+    { FRAC_CONST(0.026945083426576), FRAC_CONST(0.017765954683088) },
+    { FRAC_CONST(0.026886800299502), FRAC_CONST(0.017854036975468) },
+    { FRAC_CONST(0.026828229236397), FRAC_CONST(0.017941928065456) },
+    { FRAC_CONST(0.026769370864511), FRAC_CONST(0.018029627011808) },
+    { FRAC_CONST(0.026710225814170), FRAC_CONST(0.018117132875340) },
+    { FRAC_CONST(0.026650794718768), FRAC_CONST(0.018204444718934) },
+    { FRAC_CONST(0.026591078214767), FRAC_CONST(0.018291561607551) },
+    { FRAC_CONST(0.026531076941680), FRAC_CONST(0.018378482608238) },
+    { FRAC_CONST(0.026470791542075), FRAC_CONST(0.018465206790142) },
+    { FRAC_CONST(0.026410222661558), FRAC_CONST(0.018551733224515) },
+    { FRAC_CONST(0.026349370948775), FRAC_CONST(0.018638060984730) },
+    { FRAC_CONST(0.026288237055398), FRAC_CONST(0.018724189146286) },
+    { FRAC_CONST(0.026226821636121), FRAC_CONST(0.018810116786819) },
+    { FRAC_CONST(0.026165125348656), FRAC_CONST(0.018895842986112) },
+    { FRAC_CONST(0.026103148853718), FRAC_CONST(0.018981366826109) },
+    { FRAC_CONST(0.026040892815028), FRAC_CONST(0.019066687390916) },
+    { FRAC_CONST(0.025978357899296), FRAC_CONST(0.019151803766819) },
+    { FRAC_CONST(0.025915544776223), FRAC_CONST(0.019236715042290) },
+    { FRAC_CONST(0.025852454118485), FRAC_CONST(0.019321420307998) },
+    { FRAC_CONST(0.025789086601733), FRAC_CONST(0.019405918656817) },
+    { FRAC_CONST(0.025725442904582), FRAC_CONST(0.019490209183837) },
+    { FRAC_CONST(0.025661523708606), FRAC_CONST(0.019574290986376) },
+    { FRAC_CONST(0.025597329698327), FRAC_CONST(0.019658163163984) },
+    { FRAC_CONST(0.025532861561211), FRAC_CONST(0.019741824818458) },
+    { FRAC_CONST(0.025468119987662), FRAC_CONST(0.019825275053848) },
+    { FRAC_CONST(0.025403105671008), FRAC_CONST(0.019908512976470) },
+    { FRAC_CONST(0.025337819307501), FRAC_CONST(0.019991537694913) },
+    { FRAC_CONST(0.025272261596305), FRAC_CONST(0.020074348320047) },
+    { FRAC_CONST(0.025206433239491), FRAC_CONST(0.020156943965039) },
+    { FRAC_CONST(0.025140334942028), FRAC_CONST(0.020239323745355) },
+    { FRAC_CONST(0.025073967411776), FRAC_CONST(0.020321486778774) },
+    { FRAC_CONST(0.025007331359476), FRAC_CONST(0.020403432185395) },
+    { FRAC_CONST(0.024940427498748), FRAC_CONST(0.020485159087650) },
+    { FRAC_CONST(0.024873256546079), FRAC_CONST(0.020566666610309) },
+    { FRAC_CONST(0.024805819220816), FRAC_CONST(0.020647953880491) },
+    { FRAC_CONST(0.024738116245157), FRAC_CONST(0.020729020027676) },
+    { FRAC_CONST(0.024670148344147), FRAC_CONST(0.020809864183709) },
+    { FRAC_CONST(0.024601916245669), FRAC_CONST(0.020890485482816) },
+    { FRAC_CONST(0.024533420680433), FRAC_CONST(0.020970883061607) },
+    { FRAC_CONST(0.024464662381971), FRAC_CONST(0.021051056059087) },
+    { FRAC_CONST(0.024395642086630), FRAC_CONST(0.021131003616670) },
+    { FRAC_CONST(0.024326360533561), FRAC_CONST(0.021210724878181) },
+    { FRAC_CONST(0.024256818464715), FRAC_CONST(0.021290218989868) },
+    { FRAC_CONST(0.024187016624830), FRAC_CONST(0.021369485100415) },
+    { FRAC_CONST(0.024116955761430), FRAC_CONST(0.021448522360944) },
+    { FRAC_CONST(0.024046636624808), FRAC_CONST(0.021527329925030) },
+    { FRAC_CONST(0.023976059968027), FRAC_CONST(0.021605906948708) },
+    { FRAC_CONST(0.023905226546906), FRAC_CONST(0.021684252590480) },
+    { FRAC_CONST(0.023834137120014), FRAC_CONST(0.021762366011328) },
+    { FRAC_CONST(0.023762792448662), FRAC_CONST(0.021840246374720) },
+    { FRAC_CONST(0.023691193296893), FRAC_CONST(0.021917892846620) },
+    { FRAC_CONST(0.023619340431478), FRAC_CONST(0.021995304595495) },
+    { FRAC_CONST(0.023547234621902), FRAC_CONST(0.022072480792330) },
+    { FRAC_CONST(0.023474876640361), FRAC_CONST(0.022149420610628) },
+    { FRAC_CONST(0.023402267261751), FRAC_CONST(0.022226123226426) },
+    { FRAC_CONST(0.023329407263659), FRAC_CONST(0.022302587818300) },
+    { FRAC_CONST(0.023256297426359), FRAC_CONST(0.022378813567377) },
+    { FRAC_CONST(0.023182938532797), FRAC_CONST(0.022454799657339) },
+    { FRAC_CONST(0.023109331368588), FRAC_CONST(0.022530545274437) },
+    { FRAC_CONST(0.023035476722006), FRAC_CONST(0.022606049607496) },
+    { FRAC_CONST(0.022961375383975), FRAC_CONST(0.022681311847926) },
+    { FRAC_CONST(0.022887028148061), FRAC_CONST(0.022756331189727) },
+    { FRAC_CONST(0.022812435810462), FRAC_CONST(0.022831106829504) },
+    { FRAC_CONST(0.022737599170003), FRAC_CONST(0.022905637966469) },
+    { FRAC_CONST(0.022662519028125), FRAC_CONST(0.022979923802453) },
+    { FRAC_CONST(0.022587196188874), FRAC_CONST(0.023053963541915) },
+    { FRAC_CONST(0.022511631458899), FRAC_CONST(0.023127756391950) },
+    { FRAC_CONST(0.022435825647437), FRAC_CONST(0.023201301562294) },
+    { FRAC_CONST(0.022359779566306), FRAC_CONST(0.023274598265338) },
+    { FRAC_CONST(0.022283494029900), FRAC_CONST(0.023347645716133) },
+    { FRAC_CONST(0.022206969855176), FRAC_CONST(0.023420443132400) },
+    { FRAC_CONST(0.022130207861645), FRAC_CONST(0.023492989734537) },
+    { FRAC_CONST(0.022053208871367), FRAC_CONST(0.023565284745628) },
+    { FRAC_CONST(0.021975973708940), FRAC_CONST(0.023637327391451) },
+    { FRAC_CONST(0.021898503201489), FRAC_CONST(0.023709116900488) },
+    { FRAC_CONST(0.021820798178663), FRAC_CONST(0.023780652503931) },
+    { FRAC_CONST(0.021742859472618), FRAC_CONST(0.023851933435691) },
+    { FRAC_CONST(0.021664687918017), FRAC_CONST(0.023922958932406) },
+    { FRAC_CONST(0.021586284352013), FRAC_CONST(0.023993728233451) },
+    { FRAC_CONST(0.021507649614247), FRAC_CONST(0.024064240580942) },
+    { FRAC_CONST(0.021428784546832), FRAC_CONST(0.024134495219750) },
+    { FRAC_CONST(0.021349689994350), FRAC_CONST(0.024204491397504) },
+    { FRAC_CONST(0.021270366803840), FRAC_CONST(0.024274228364600) },
+    { FRAC_CONST(0.021190815824791), FRAC_CONST(0.024343705374213) },
+    { FRAC_CONST(0.021111037909128), FRAC_CONST(0.024412921682298) },
+    { FRAC_CONST(0.021031033911210), FRAC_CONST(0.024481876547605) },
+    { FRAC_CONST(0.020950804687815), FRAC_CONST(0.024550569231683) },
+    { FRAC_CONST(0.020870351098134), FRAC_CONST(0.024618998998889) },
+    { FRAC_CONST(0.020789674003759), FRAC_CONST(0.024687165116394) },
+    { FRAC_CONST(0.020708774268678), FRAC_CONST(0.024755066854194) },
+    { FRAC_CONST(0.020627652759262), FRAC_CONST(0.024822703485116) },
+    { FRAC_CONST(0.020546310344257), FRAC_CONST(0.024890074284826) },
+    { FRAC_CONST(0.020464747894775), FRAC_CONST(0.024957178531837) },
+    { FRAC_CONST(0.020382966284284), FRAC_CONST(0.025024015507516) },
+    { FRAC_CONST(0.020300966388600), FRAC_CONST(0.025090584496093) },
+    { FRAC_CONST(0.020218749085876), FRAC_CONST(0.025156884784668) },
+    { FRAC_CONST(0.020136315256592), FRAC_CONST(0.025222915663218) },
+    { FRAC_CONST(0.020053665783549), FRAC_CONST(0.025288676424605) },
+    { FRAC_CONST(0.019970801551857), FRAC_CONST(0.025354166364584) },
+    { FRAC_CONST(0.019887723448925), FRAC_CONST(0.025419384781811) },
+    { FRAC_CONST(0.019804432364452), FRAC_CONST(0.025484330977848) },
+    { FRAC_CONST(0.019720929190419), FRAC_CONST(0.025549004257175) },
+    { FRAC_CONST(0.019637214821078), FRAC_CONST(0.025613403927192) },
+    { FRAC_CONST(0.019553290152943), FRAC_CONST(0.025677529298230) },
+    { FRAC_CONST(0.019469156084779), FRAC_CONST(0.025741379683559) },
+    { FRAC_CONST(0.019384813517595), FRAC_CONST(0.025804954399392) },
+    { FRAC_CONST(0.019300263354632), FRAC_CONST(0.025868252764895) },
+    { FRAC_CONST(0.019215506501354), FRAC_CONST(0.025931274102193) },
+    { FRAC_CONST(0.019130543865439), FRAC_CONST(0.025994017736379) },
+    { FRAC_CONST(0.019045376356769), FRAC_CONST(0.026056482995518) },
+    { FRAC_CONST(0.018960004887419), FRAC_CONST(0.026118669210657) },
+    { FRAC_CONST(0.018874430371648), FRAC_CONST(0.026180575715833) },
+    { FRAC_CONST(0.018788653725892), FRAC_CONST(0.026242201848076) },
+    { FRAC_CONST(0.018702675868750), FRAC_CONST(0.026303546947421) },
+    { FRAC_CONST(0.018616497720974), FRAC_CONST(0.026364610356909) },
+    { FRAC_CONST(0.018530120205464), FRAC_CONST(0.026425391422602) },
+    { FRAC_CONST(0.018443544247254), FRAC_CONST(0.026485889493583) },
+    { FRAC_CONST(0.018356770773502), FRAC_CONST(0.026546103921965) },
+    { FRAC_CONST(0.018269800713483), FRAC_CONST(0.026606034062902) },
+    { FRAC_CONST(0.018182634998576), FRAC_CONST(0.026665679274589) },
+    { FRAC_CONST(0.018095274562256), FRAC_CONST(0.026725038918274) },
+    { FRAC_CONST(0.018007720340083), FRAC_CONST(0.026784112358263) },
+    { FRAC_CONST(0.017919973269692), FRAC_CONST(0.026842898961926) },
+    { FRAC_CONST(0.017832034290785), FRAC_CONST(0.026901398099707) },
+    { FRAC_CONST(0.017743904345116), FRAC_CONST(0.026959609145127) },
+    { FRAC_CONST(0.017655584376488), FRAC_CONST(0.027017531474792) },
+    { FRAC_CONST(0.017567075330734), FRAC_CONST(0.027075164468401) },
+    { FRAC_CONST(0.017478378155718), FRAC_CONST(0.027132507508750) },
+    { FRAC_CONST(0.017389493801313), FRAC_CONST(0.027189559981742) },
+    { FRAC_CONST(0.017300423219401), FRAC_CONST(0.027246321276391) },
+    { FRAC_CONST(0.017211167363854), FRAC_CONST(0.027302790784828) },
+    { FRAC_CONST(0.017121727190533), FRAC_CONST(0.027358967902310) },
+    { FRAC_CONST(0.017032103657269), FRAC_CONST(0.027414852027226) },
+    { FRAC_CONST(0.016942297723858), FRAC_CONST(0.027470442561102) },
+    { FRAC_CONST(0.016852310352050), FRAC_CONST(0.027525738908608) },
+    { FRAC_CONST(0.016762142505537), FRAC_CONST(0.027580740477564) },
+    { FRAC_CONST(0.016671795149944), FRAC_CONST(0.027635446678948) },
+    { FRAC_CONST(0.016581269252819), FRAC_CONST(0.027689856926900) },
+    { FRAC_CONST(0.016490565783622), FRAC_CONST(0.027743970638730) },
+    { FRAC_CONST(0.016399685713714), FRAC_CONST(0.027797787234924) },
+    { FRAC_CONST(0.016308630016347), FRAC_CONST(0.027851306139149) },
+    { FRAC_CONST(0.016217399666655), FRAC_CONST(0.027904526778260) },
+    { FRAC_CONST(0.016125995641641), FRAC_CONST(0.027957448582309) },
+    { FRAC_CONST(0.016034418920170), FRAC_CONST(0.028010070984544) },
+    { FRAC_CONST(0.015942670482954), FRAC_CONST(0.028062393421421) },
+    { FRAC_CONST(0.015850751312545), FRAC_CONST(0.028114415332610) },
+    { FRAC_CONST(0.015758662393324), FRAC_CONST(0.028166136160998) },
+    { FRAC_CONST(0.015666404711489), FRAC_CONST(0.028217555352697) },
+    { FRAC_CONST(0.015573979255046), FRAC_CONST(0.028268672357047) },
+    { FRAC_CONST(0.015481387013797), FRAC_CONST(0.028319486626627) },
+    { FRAC_CONST(0.015388628979331), FRAC_CONST(0.028369997617257) },
+    { FRAC_CONST(0.015295706145012), FRAC_CONST(0.028420204788004) },
+    { FRAC_CONST(0.015202619505968), FRAC_CONST(0.028470107601191) },
+    { FRAC_CONST(0.015109370059084), FRAC_CONST(0.028519705522399) },
+    { FRAC_CONST(0.015015958802984), FRAC_CONST(0.028568998020472) },
+    { FRAC_CONST(0.014922386738030), FRAC_CONST(0.028617984567529) },
+    { FRAC_CONST(0.014828654866302), FRAC_CONST(0.028666664638963) },
+    { FRAC_CONST(0.014734764191593), FRAC_CONST(0.028715037713449) },
+    { FRAC_CONST(0.014640715719398), FRAC_CONST(0.028763103272951) },
+    { FRAC_CONST(0.014546510456900), FRAC_CONST(0.028810860802724) },
+    { FRAC_CONST(0.014452149412962), FRAC_CONST(0.028858309791325) },
+    { FRAC_CONST(0.014357633598114), FRAC_CONST(0.028905449730613) },
+    { FRAC_CONST(0.014262964024545), FRAC_CONST(0.028952280115756) },
+    { FRAC_CONST(0.014168141706090), FRAC_CONST(0.028998800445240) },
+    { FRAC_CONST(0.014073167658220), FRAC_CONST(0.029045010220868) },
+    { FRAC_CONST(0.013978042898030), FRAC_CONST(0.029090908947771) },
+    { FRAC_CONST(0.013882768444231), FRAC_CONST(0.029136496134411) },
+    { FRAC_CONST(0.013787345317136), FRAC_CONST(0.029181771292585) },
+    { FRAC_CONST(0.013691774538648), FRAC_CONST(0.029226733937433) },
+    { FRAC_CONST(0.013596057132255), FRAC_CONST(0.029271383587441) },
+    { FRAC_CONST(0.013500194123014), FRAC_CONST(0.029315719764447) },
+    { FRAC_CONST(0.013404186537539), FRAC_CONST(0.029359741993647) },
+    { FRAC_CONST(0.013308035403995), FRAC_CONST(0.029403449803598) },
+    { FRAC_CONST(0.013211741752084), FRAC_CONST(0.029446842726223) },
+    { FRAC_CONST(0.013115306613032), FRAC_CONST(0.029489920296820) },
+    { FRAC_CONST(0.013018731019584), FRAC_CONST(0.029532682054063) },
+    { FRAC_CONST(0.012922016005985), FRAC_CONST(0.029575127540008) },
+    { FRAC_CONST(0.012825162607977), FRAC_CONST(0.029617256300097) },
+    { FRAC_CONST(0.012728171862781), FRAC_CONST(0.029659067883165) },
+    { FRAC_CONST(0.012631044809089), FRAC_CONST(0.029700561841444) },
+    { FRAC_CONST(0.012533782487056), FRAC_CONST(0.029741737730567) },
+    { FRAC_CONST(0.012436385938281), FRAC_CONST(0.029782595109573) },
+    { FRAC_CONST(0.012338856205805), FRAC_CONST(0.029823133540913) },
+    { FRAC_CONST(0.012241194334091), FRAC_CONST(0.029863352590452) },
+    { FRAC_CONST(0.012143401369021), FRAC_CONST(0.029903251827477) },
+    { FRAC_CONST(0.012045478357878), FRAC_CONST(0.029942830824699) },
+    { FRAC_CONST(0.011947426349339), FRAC_CONST(0.029982089158259) },
+    { FRAC_CONST(0.011849246393462), FRAC_CONST(0.030021026407731) },
+    { FRAC_CONST(0.011750939541676), FRAC_CONST(0.030059642156129) },
+    { FRAC_CONST(0.011652506846768), FRAC_CONST(0.030097935989909) },
+    { FRAC_CONST(0.011553949362874), FRAC_CONST(0.030135907498976) },
+    { FRAC_CONST(0.011455268145464), FRAC_CONST(0.030173556276684) },
+    { FRAC_CONST(0.011356464251335), FRAC_CONST(0.030210881919845) },
+    { FRAC_CONST(0.011257538738598), FRAC_CONST(0.030247884028732) },
+    { FRAC_CONST(0.011158492666665), FRAC_CONST(0.030284562207083) },
+    { FRAC_CONST(0.011059327096240), FRAC_CONST(0.030320916062102) },
+    { FRAC_CONST(0.010960043089307), FRAC_CONST(0.030356945204470) },
+    { FRAC_CONST(0.010860641709118), FRAC_CONST(0.030392649248343) },
+    { FRAC_CONST(0.010761124020182), FRAC_CONST(0.030428027811361) },
+    { FRAC_CONST(0.010661491088253), FRAC_CONST(0.030463080514646) },
+    { FRAC_CONST(0.010561743980319), FRAC_CONST(0.030497806982812) },
+    { FRAC_CONST(0.010461883764593), FRAC_CONST(0.030532206843968) },
+    { FRAC_CONST(0.010361911510496), FRAC_CONST(0.030566279729717) },
+    { FRAC_CONST(0.010261828288652), FRAC_CONST(0.030600025275167) },
+    { FRAC_CONST(0.010161635170872), FRAC_CONST(0.030633443118931) },
+    { FRAC_CONST(0.010061333230142), FRAC_CONST(0.030666532903129) },
+    { FRAC_CONST(0.009960923540617), FRAC_CONST(0.030699294273397) },
+    { FRAC_CONST(0.009860407177603), FRAC_CONST(0.030731726878888) },
+    { FRAC_CONST(0.009759785217550), FRAC_CONST(0.030763830372273) },
+    { FRAC_CONST(0.009659058738038), FRAC_CONST(0.030795604409750) },
+    { FRAC_CONST(0.009558228817767), FRAC_CONST(0.030827048651045) },
+    { FRAC_CONST(0.009457296536545), FRAC_CONST(0.030858162759415) },
+    { FRAC_CONST(0.009356262975275), FRAC_CONST(0.030888946401653) },
+    { FRAC_CONST(0.009255129215945), FRAC_CONST(0.030919399248091) },
+    { FRAC_CONST(0.009153896341616), FRAC_CONST(0.030949520972603) },
+    { FRAC_CONST(0.009052565436412), FRAC_CONST(0.030979311252611) },
+    { FRAC_CONST(0.008951137585505), FRAC_CONST(0.031008769769084) },
+    { FRAC_CONST(0.008849613875105), FRAC_CONST(0.031037896206544) },
+    { FRAC_CONST(0.008747995392451), FRAC_CONST(0.031066690253072) },
+    { FRAC_CONST(0.008646283225794), FRAC_CONST(0.031095151600306) },
+    { FRAC_CONST(0.008544478464390), FRAC_CONST(0.031123279943448) },
+    { FRAC_CONST(0.008442582198486), FRAC_CONST(0.031151074981266) },
+    { FRAC_CONST(0.008340595519310), FRAC_CONST(0.031178536416098) },
+    { FRAC_CONST(0.008238519519057), FRAC_CONST(0.031205663953853) },
+    { FRAC_CONST(0.008136355290878), FRAC_CONST(0.031232457304017) },
+    { FRAC_CONST(0.008034103928871), FRAC_CONST(0.031258916179656) },
+    { FRAC_CONST(0.007931766528065), FRAC_CONST(0.031285040297416) },
+    { FRAC_CONST(0.007829344184412), FRAC_CONST(0.031310829377528) },
+    { FRAC_CONST(0.007726837994772), FRAC_CONST(0.031336283143813) },
+    { FRAC_CONST(0.007624249056906), FRAC_CONST(0.031361401323680) },
+    { FRAC_CONST(0.007521578469457), FRAC_CONST(0.031386183648135) },
+    { FRAC_CONST(0.007418827331946), FRAC_CONST(0.031410629851778) },
+    { FRAC_CONST(0.007315996744755), FRAC_CONST(0.031434739672811) },
+    { FRAC_CONST(0.007213087809115), FRAC_CONST(0.031458512853036) },
+    { FRAC_CONST(0.007110101627101), FRAC_CONST(0.031481949137863) },
+    { FRAC_CONST(0.007007039301610), FRAC_CONST(0.031505048276306) },
+    { FRAC_CONST(0.006903901936357), FRAC_CONST(0.031527810020993) },
+    { FRAC_CONST(0.006800690635862), FRAC_CONST(0.031550234128164) },
+    { FRAC_CONST(0.006697406505433), FRAC_CONST(0.031572320357675) },
+    { FRAC_CONST(0.006594050651161), FRAC_CONST(0.031594068473000) },
+    { FRAC_CONST(0.006490624179905), FRAC_CONST(0.031615478241233) },
+    { FRAC_CONST(0.006387128199278), FRAC_CONST(0.031636549433095) },
+    { FRAC_CONST(0.006283563817639), FRAC_CONST(0.031657281822929) },
+    { FRAC_CONST(0.006179932144080), FRAC_CONST(0.031677675188707) },
+    { FRAC_CONST(0.006076234288412), FRAC_CONST(0.031697729312034) },
+    { FRAC_CONST(0.005972471361157), FRAC_CONST(0.031717443978146) },
+    { FRAC_CONST(0.005868644473532), FRAC_CONST(0.031736818975914) },
+    { FRAC_CONST(0.005764754737440), FRAC_CONST(0.031755854097848) },
+    { FRAC_CONST(0.005660803265456), FRAC_CONST(0.031774549140098) },
+    { FRAC_CONST(0.005556791170816), FRAC_CONST(0.031792903902453) },
+    { FRAC_CONST(0.005452719567407), FRAC_CONST(0.031810918188350) },
+    { FRAC_CONST(0.005348589569753), FRAC_CONST(0.031828591804869) },
+    { FRAC_CONST(0.005244402293001), FRAC_CONST(0.031845924562742) },
+    { FRAC_CONST(0.005140158852914), FRAC_CONST(0.031862916276347) },
+    { FRAC_CONST(0.005035860365855), FRAC_CONST(0.031879566763717) },
+    { FRAC_CONST(0.004931507948778), FRAC_CONST(0.031895875846539) },
+    { FRAC_CONST(0.004827102719212), FRAC_CONST(0.031911843350155) },
+    { FRAC_CONST(0.004722645795254), FRAC_CONST(0.031927469103567) },
+    { FRAC_CONST(0.004618138295554), FRAC_CONST(0.031942752939435) },
+    { FRAC_CONST(0.004513581339303), FRAC_CONST(0.031957694694082) },
+    { FRAC_CONST(0.004408976046222), FRAC_CONST(0.031972294207493) },
+    { FRAC_CONST(0.004304323536549), FRAC_CONST(0.031986551323320) },
+    { FRAC_CONST(0.004199624931030), FRAC_CONST(0.032000465888879) },
+    { FRAC_CONST(0.004094881350902), FRAC_CONST(0.032014037755158) },
+    { FRAC_CONST(0.003990093917884), FRAC_CONST(0.032027266776813) },
+    { FRAC_CONST(0.003885263754166), FRAC_CONST(0.032040152812170) },
+    { FRAC_CONST(0.003780391982394), FRAC_CONST(0.032052695723232) },
+    { FRAC_CONST(0.003675479725661), FRAC_CONST(0.032064895375674) },
+    { FRAC_CONST(0.003570528107494), FRAC_CONST(0.032076751638847) },
+    { FRAC_CONST(0.003465538251839), FRAC_CONST(0.032088264385780) },
+    { FRAC_CONST(0.003360511283053), FRAC_CONST(0.032099433493181) },
+    { FRAC_CONST(0.003255448325892), FRAC_CONST(0.032110258841438) },
+    { FRAC_CONST(0.003150350505494), FRAC_CONST(0.032120740314619) },
+    { FRAC_CONST(0.003045218947373), FRAC_CONST(0.032130877800478) },
+    { FRAC_CONST(0.002940054777404), FRAC_CONST(0.032140671190449) },
+    { FRAC_CONST(0.002834859121810), FRAC_CONST(0.032150120379653) },
+    { FRAC_CONST(0.002729633107153), FRAC_CONST(0.032159225266897) },
+    { FRAC_CONST(0.002624377860318), FRAC_CONST(0.032167985754674) },
+    { FRAC_CONST(0.002519094508504), FRAC_CONST(0.032176401749168) },
+    { FRAC_CONST(0.002413784179212), FRAC_CONST(0.032184473160250) },
+    { FRAC_CONST(0.002308448000231), FRAC_CONST(0.032192199901481) },
+    { FRAC_CONST(0.002203087099626), FRAC_CONST(0.032199581890114) },
+    { FRAC_CONST(0.002097702605728), FRAC_CONST(0.032206619047093) },
+    { FRAC_CONST(0.001992295647121), FRAC_CONST(0.032213311297057) },
+    { FRAC_CONST(0.001886867352628), FRAC_CONST(0.032219658568338) },
+    { FRAC_CONST(0.001781418851302), FRAC_CONST(0.032225660792960) },
+    { FRAC_CONST(0.001675951272410), FRAC_CONST(0.032231317906644) },
+    { FRAC_CONST(0.001570465745428), FRAC_CONST(0.032236629848809) },
+    { FRAC_CONST(0.001464963400018), FRAC_CONST(0.032241596562566) },
+    { FRAC_CONST(0.001359445366028), FRAC_CONST(0.032246217994727) },
+    { FRAC_CONST(0.001253912773470), FRAC_CONST(0.032250494095799) },
+    { FRAC_CONST(0.001148366752513), FRAC_CONST(0.032254424819990) },
+    { FRAC_CONST(0.001042808433471), FRAC_CONST(0.032258010125204) },
+    { FRAC_CONST(0.000937238946789), FRAC_CONST(0.032261249973045) },
+    { FRAC_CONST(0.000831659423030), FRAC_CONST(0.032264144328817) },
+    { FRAC_CONST(0.000726070992868), FRAC_CONST(0.032266693161525) },
+    { FRAC_CONST(0.000620474787068), FRAC_CONST(0.032268896443871) },
+    { FRAC_CONST(0.000514871936481), FRAC_CONST(0.032270754152261) },
+    { FRAC_CONST(0.000409263572030), FRAC_CONST(0.032272266266801) },
+    { FRAC_CONST(0.000303650824695), FRAC_CONST(0.032273432771295) },
+    { FRAC_CONST(0.000198034825504), FRAC_CONST(0.032274253653254) },
+    { FRAC_CONST(0.000092416705518), FRAC_CONST(0.032274728903884) }
+};
+
+#ifdef LD_DEC
+/* 240 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_960[] =
+{
+    { FRAC_CONST(0.045643531183573), FRAC_CONST(0.000037342034959) },
+    { FRAC_CONST(0.045642309173789), FRAC_CONST(0.000336075315362) },
+    { FRAC_CONST(0.045639131999390), FRAC_CONST(0.000634794199417) },
+    { FRAC_CONST(0.045633999796474), FRAC_CONST(0.000933485891002) },
+    { FRAC_CONST(0.045626912784890), FRAC_CONST(0.001232137595157) },
+    { FRAC_CONST(0.045617871268219), FRAC_CONST(0.001530736518639) },
+    { FRAC_CONST(0.045606875633772), FRAC_CONST(0.001829269870464) },
+    { FRAC_CONST(0.045593926352564), FRAC_CONST(0.002127724862455) },
+    { FRAC_CONST(0.045579023979299), FRAC_CONST(0.002426088709795) },
+    { FRAC_CONST(0.045562169152346), FRAC_CONST(0.002724348631569) },
+    { FRAC_CONST(0.045543362593709), FRAC_CONST(0.003022491851315) },
+    { FRAC_CONST(0.045522605108999), FRAC_CONST(0.003320505597570) },
+    { FRAC_CONST(0.045499897587396), FRAC_CONST(0.003618377104416) },
+    { FRAC_CONST(0.045475241001617), FRAC_CONST(0.003916093612031) },
+    { FRAC_CONST(0.045448636407866), FRAC_CONST(0.004213642367228) },
+    { FRAC_CONST(0.045420084945797), FRAC_CONST(0.004511010624011) },
+    { FRAC_CONST(0.045389587838458), FRAC_CONST(0.004808185644112) },
+    { FRAC_CONST(0.045357146392244), FRAC_CONST(0.005105154697544) },
+    { FRAC_CONST(0.045322761996840), FRAC_CONST(0.005401905063139) },
+    { FRAC_CONST(0.045286436125157), FRAC_CONST(0.005698424029100) },
+    { FRAC_CONST(0.045248170333275), FRAC_CONST(0.005994698893542) },
+    { FRAC_CONST(0.045207966260374), FRAC_CONST(0.006290716965035) },
+    { FRAC_CONST(0.045165825628663), FRAC_CONST(0.006586465563151) },
+    { FRAC_CONST(0.045121750243305), FRAC_CONST(0.006881932019003) },
+    { FRAC_CONST(0.045075741992343), FRAC_CONST(0.007177103675792) },
+    { FRAC_CONST(0.045027802846618), FRAC_CONST(0.007471967889347) },
+    { FRAC_CONST(0.044977934859683), FRAC_CONST(0.007766512028667) },
+    { FRAC_CONST(0.044926140167717), FRAC_CONST(0.008060723476460) },
+    { FRAC_CONST(0.044872420989432), FRAC_CONST(0.008354589629687) },
+    { FRAC_CONST(0.044816779625979), FRAC_CONST(0.008648097900101) },
+    { FRAC_CONST(0.044759218460849), FRAC_CONST(0.008941235714784) },
+    { FRAC_CONST(0.044699739959770), FRAC_CONST(0.009233990516688) },
+    { FRAC_CONST(0.044638346670603), FRAC_CONST(0.009526349765171) },
+    { FRAC_CONST(0.044575041223233), FRAC_CONST(0.009818300936537) },
+    { FRAC_CONST(0.044509826329454), FRAC_CONST(0.010109831524568) },
+    { FRAC_CONST(0.044442704782856), FRAC_CONST(0.010400929041064) },
+    { FRAC_CONST(0.044373679458701), FRAC_CONST(0.010691581016378) },
+    { FRAC_CONST(0.044302753313806), FRAC_CONST(0.010981774999945) },
+    { FRAC_CONST(0.044229929386409), FRAC_CONST(0.011271498560822) },
+    { FRAC_CONST(0.044155210796046), FRAC_CONST(0.011560739288214) },
+    { FRAC_CONST(0.044078600743413), FRAC_CONST(0.011849484792012) },
+    { FRAC_CONST(0.044000102510229), FRAC_CONST(0.012137722703321) },
+    { FRAC_CONST(0.043919719459097), FRAC_CONST(0.012425440674986) },
+    { FRAC_CONST(0.043837455033359), FRAC_CONST(0.012712626382127) },
+    { FRAC_CONST(0.043753312756950), FRAC_CONST(0.012999267522665) },
+    { FRAC_CONST(0.043667296234245), FRAC_CONST(0.013285351817848) },
+    { FRAC_CONST(0.043579409149906), FRAC_CONST(0.013570867012776) },
+    { FRAC_CONST(0.043489655268722), FRAC_CONST(0.013855800876928) },
+    { FRAC_CONST(0.043398038435451), FRAC_CONST(0.014140141204686) },
+    { FRAC_CONST(0.043304562574653), FRAC_CONST(0.014423875815857) },
+    { FRAC_CONST(0.043209231690524), FRAC_CONST(0.014706992556195) },
+    { FRAC_CONST(0.043112049866720), FRAC_CONST(0.014989479297920) },
+    { FRAC_CONST(0.043013021266188), FRAC_CONST(0.015271323940241) },
+    { FRAC_CONST(0.042912150130984), FRAC_CONST(0.015552514409871) },
+    { FRAC_CONST(0.042809440782090), FRAC_CONST(0.015833038661547) },
+    { FRAC_CONST(0.042704897619235), FRAC_CONST(0.016112884678543) },
+    { FRAC_CONST(0.042598525120698), FRAC_CONST(0.016392040473187) },
+    { FRAC_CONST(0.042490327843124), FRAC_CONST(0.016670494087374) },
+    { FRAC_CONST(0.042380310421324), FRAC_CONST(0.016948233593079) },
+    { FRAC_CONST(0.042268477568078), FRAC_CONST(0.017225247092864) },
+    { FRAC_CONST(0.042154834073934), FRAC_CONST(0.017501522720393) },
+    { FRAC_CONST(0.042039384807000), FRAC_CONST(0.017777048640940) },
+    { FRAC_CONST(0.041922134712739), FRAC_CONST(0.018051813051888) },
+    { FRAC_CONST(0.041803088813754), FRAC_CONST(0.018325804183247) },
+    { FRAC_CONST(0.041682252209576), FRAC_CONST(0.018599010298148) },
+    { FRAC_CONST(0.041559630076443), FRAC_CONST(0.018871419693350) },
+    { FRAC_CONST(0.041435227667079), FRAC_CONST(0.019143020699741) },
+    { FRAC_CONST(0.041309050310468), FRAC_CONST(0.019413801682838) },
+    { FRAC_CONST(0.041181103411629), FRAC_CONST(0.019683751043285) },
+    { FRAC_CONST(0.041051392451382), FRAC_CONST(0.019952857217350) },
+    { FRAC_CONST(0.040919922986111), FRAC_CONST(0.020221108677421) },
+    { FRAC_CONST(0.040786700647532), FRAC_CONST(0.020488493932496) },
+    { FRAC_CONST(0.040651731142446), FRAC_CONST(0.020755001528683) },
+    { FRAC_CONST(0.040515020252497), FRAC_CONST(0.021020620049682) },
+    { FRAC_CONST(0.040376573833925), FRAC_CONST(0.021285338117280) },
+    { FRAC_CONST(0.040236397817314), FRAC_CONST(0.021549144391836) },
+    { FRAC_CONST(0.040094498207337), FRAC_CONST(0.021812027572768) },
+    { FRAC_CONST(0.039950881082502), FRAC_CONST(0.022073976399034) },
+    { FRAC_CONST(0.039805552594888), FRAC_CONST(0.022334979649620) },
+    { FRAC_CONST(0.039658518969884), FRAC_CONST(0.022595026144014) },
+    { FRAC_CONST(0.039509786505922), FRAC_CONST(0.022854104742690) },
+    { FRAC_CONST(0.039359361574204), FRAC_CONST(0.023112204347583) },
+    { FRAC_CONST(0.039207250618434), FRAC_CONST(0.023369313902565) },
+    { FRAC_CONST(0.039053460154540), FRAC_CONST(0.023625422393919) },
+    { FRAC_CONST(0.038897996770393), FRAC_CONST(0.023880518850809) },
+    { FRAC_CONST(0.038740867125527), FRAC_CONST(0.024134592345752) },
+    { FRAC_CONST(0.038582077950852), FRAC_CONST(0.024387631995085) },
+    { FRAC_CONST(0.038421636048370), FRAC_CONST(0.024639626959432) },
+    { FRAC_CONST(0.038259548290876), FRAC_CONST(0.024890566444167) },
+    { FRAC_CONST(0.038095821621671), FRAC_CONST(0.025140439699877) },
+    { FRAC_CONST(0.037930463054261), FRAC_CONST(0.025389236022825) },
+    { FRAC_CONST(0.037763479672055), FRAC_CONST(0.025636944755403) },
+    { FRAC_CONST(0.037594878628068), FRAC_CONST(0.025883555286595) },
+    { FRAC_CONST(0.037424667144605), FRAC_CONST(0.026129057052425) },
+    { FRAC_CONST(0.037252852512960), FRAC_CONST(0.026373439536415) },
+    { FRAC_CONST(0.037079442093102), FRAC_CONST(0.026616692270033) },
+    { FRAC_CONST(0.036904443313354), FRAC_CONST(0.026858804833142) },
+    { FRAC_CONST(0.036727863670081), FRAC_CONST(0.027099766854444) },
+    { FRAC_CONST(0.036549710727369), FRAC_CONST(0.027339568011930) },
+    { FRAC_CONST(0.036369992116697), FRAC_CONST(0.027578198033315) },
+    { FRAC_CONST(0.036188715536611), FRAC_CONST(0.027815646696484) },
+    { FRAC_CONST(0.036005888752396), FRAC_CONST(0.028051903829926) },
+    { FRAC_CONST(0.035821519595745), FRAC_CONST(0.028286959313171) },
+    { FRAC_CONST(0.035635615964417), FRAC_CONST(0.028520803077226) },
+    { FRAC_CONST(0.035448185821906), FRAC_CONST(0.028753425105002) },
+    { FRAC_CONST(0.035259237197095), FRAC_CONST(0.028984815431745) },
+    { FRAC_CONST(0.035068778183914), FRAC_CONST(0.029214964145465) },
+    { FRAC_CONST(0.034876816940994), FRAC_CONST(0.029443861387355) },
+    { FRAC_CONST(0.034683361691315), FRAC_CONST(0.029671497352220) },
+    { FRAC_CONST(0.034488420721856), FRAC_CONST(0.029897862288892) },
+    { FRAC_CONST(0.034292002383240), FRAC_CONST(0.030122946500652) },
+    { FRAC_CONST(0.034094115089375), FRAC_CONST(0.030346740345641) },
+    { FRAC_CONST(0.033894767317093), FRAC_CONST(0.030569234237276) },
+    { FRAC_CONST(0.033693967605790), FRAC_CONST(0.030790418644658) },
+    { FRAC_CONST(0.033491724557057), FRAC_CONST(0.031010284092984) },
+    { FRAC_CONST(0.033288046834313), FRAC_CONST(0.031228821163949) },
+    { FRAC_CONST(0.033082943162434), FRAC_CONST(0.031446020496153) },
+    { FRAC_CONST(0.032876422327378), FRAC_CONST(0.031661872785500) },
+    { FRAC_CONST(0.032668493175811), FRAC_CONST(0.031876368785596) },
+    { FRAC_CONST(0.032459164614726), FRAC_CONST(0.032089499308145) },
+    { FRAC_CONST(0.032248445611061), FRAC_CONST(0.032301255223347) },
+    { FRAC_CONST(0.032036345191317), FRAC_CONST(0.032511627460281) },
+    { FRAC_CONST(0.031822872441171), FRAC_CONST(0.032720607007302) },
+    { FRAC_CONST(0.031608036505083), FRAC_CONST(0.032928184912422) },
+    { FRAC_CONST(0.031391846585912), FRAC_CONST(0.033134352283693) },
+    { FRAC_CONST(0.031174311944513), FRAC_CONST(0.033339100289593) },
+    { FRAC_CONST(0.030955441899347), FRAC_CONST(0.033542420159397) },
+    { FRAC_CONST(0.030735245826077), FRAC_CONST(0.033744303183559) },
+    { FRAC_CONST(0.030513733157171), FRAC_CONST(0.033944740714083) },
+    { FRAC_CONST(0.030290913381494), FRAC_CONST(0.034143724164891) },
+    { FRAC_CONST(0.030066796043904), FRAC_CONST(0.034341245012195) },
+    { FRAC_CONST(0.029841390744841), FRAC_CONST(0.034537294794860) },
+    { FRAC_CONST(0.029614707139919), FRAC_CONST(0.034731865114764) },
+    { FRAC_CONST(0.029386754939508), FRAC_CONST(0.034924947637164) },
+    { FRAC_CONST(0.029157543908322), FRAC_CONST(0.035116534091046) },
+    { FRAC_CONST(0.028927083864999), FRAC_CONST(0.035306616269485) },
+    { FRAC_CONST(0.028695384681680), FRAC_CONST(0.035495186029992) },
+    { FRAC_CONST(0.028462456283587), FRAC_CONST(0.035682235294866) },
+    { FRAC_CONST(0.028228308648598), FRAC_CONST(0.035867756051541) },
+    { FRAC_CONST(0.027992951806817), FRAC_CONST(0.036051740352923) },
+    { FRAC_CONST(0.027756395840148), FRAC_CONST(0.036234180317738) },
+    { FRAC_CONST(0.027518650881862), FRAC_CONST(0.036415068130865) },
+    { FRAC_CONST(0.027279727116161), FRAC_CONST(0.036594396043672) },
+    { FRAC_CONST(0.027039634777745), FRAC_CONST(0.036772156374348) },
+    { FRAC_CONST(0.026798384151369), FRAC_CONST(0.036948341508233) },
+    { FRAC_CONST(0.026555985571409), FRAC_CONST(0.037122943898140) },
+    { FRAC_CONST(0.026312449421412), FRAC_CONST(0.037295956064686) },
+    { FRAC_CONST(0.026067786133656), FRAC_CONST(0.037467370596605) },
+    { FRAC_CONST(0.025822006188702), FRAC_CONST(0.037637180151068) },
+    { FRAC_CONST(0.025575120114946), FRAC_CONST(0.037805377454000) },
+    { FRAC_CONST(0.025327138488165), FRAC_CONST(0.037971955300388) },
+    { FRAC_CONST(0.025078071931066), FRAC_CONST(0.038136906554591) },
+    { FRAC_CONST(0.024827931112832), FRAC_CONST(0.038300224150647) },
+    { FRAC_CONST(0.024576726748663), FRAC_CONST(0.038461901092573) },
+    { FRAC_CONST(0.024324469599317), FRAC_CONST(0.038621930454668) },
+    { FRAC_CONST(0.024071170470652), FRAC_CONST(0.038780305381806) },
+    { FRAC_CONST(0.023816840213160), FRAC_CONST(0.038937019089732) },
+    { FRAC_CONST(0.023561489721501), FRAC_CONST(0.039092064865353) },
+    { FRAC_CONST(0.023305129934041), FRAC_CONST(0.039245436067023) },
+    { FRAC_CONST(0.023047771832380), FRAC_CONST(0.039397126124832) },
+    { FRAC_CONST(0.022789426440883), FRAC_CONST(0.039547128540881) },
+    { FRAC_CONST(0.022530104826206), FRAC_CONST(0.039695436889566) },
+    { FRAC_CONST(0.022269818096825), FRAC_CONST(0.039842044817851) },
+    { FRAC_CONST(0.022008577402555), FRAC_CONST(0.039986946045542) },
+    { FRAC_CONST(0.021746393934081), FRAC_CONST(0.040130134365550) },
+    { FRAC_CONST(0.021483278922467), FRAC_CONST(0.040271603644166) },
+    { FRAC_CONST(0.021219243638687), FRAC_CONST(0.040411347821316) },
+    { FRAC_CONST(0.020954299393132), FRAC_CONST(0.040549360910825) },
+    { FRAC_CONST(0.020688457535133), FRAC_CONST(0.040685637000671) },
+    { FRAC_CONST(0.020421729452469), FRAC_CONST(0.040820170253240) },
+    { FRAC_CONST(0.020154126570884), FRAC_CONST(0.040952954905576) },
+    { FRAC_CONST(0.019885660353596), FRAC_CONST(0.041083985269625) },
+    { FRAC_CONST(0.019616342300802), FRAC_CONST(0.041213255732484) },
+    { FRAC_CONST(0.019346183949192), FRAC_CONST(0.041340760756635) },
+    { FRAC_CONST(0.019075196871451), FRAC_CONST(0.041466494880189) },
+    { FRAC_CONST(0.018803392675763), FRAC_CONST(0.041590452717113) },
+    { FRAC_CONST(0.018530783005316), FRAC_CONST(0.041712628957466) },
+    { FRAC_CONST(0.018257379537800), FRAC_CONST(0.041833018367625) },
+    { FRAC_CONST(0.017983193984910), FRAC_CONST(0.041951615790509) },
+    { FRAC_CONST(0.017708238091842), FRAC_CONST(0.042068416145797) },
+    { FRAC_CONST(0.017432523636792), FRAC_CONST(0.042183414430153) },
+    { FRAC_CONST(0.017156062430449), FRAC_CONST(0.042296605717432) },
+    { FRAC_CONST(0.016878866315491), FRAC_CONST(0.042407985158896) },
+    { FRAC_CONST(0.016600947166078), FRAC_CONST(0.042517547983420) },
+    { FRAC_CONST(0.016322316887341), FRAC_CONST(0.042625289497698) },
+    { FRAC_CONST(0.016042987414872), FRAC_CONST(0.042731205086442) },
+    { FRAC_CONST(0.015762970714219), FRAC_CONST(0.042835290212581) },
+    { FRAC_CONST(0.015482278780363), FRAC_CONST(0.042937540417454) },
+    { FRAC_CONST(0.015200923637213), FRAC_CONST(0.043037951321002) },
+    { FRAC_CONST(0.014918917337087), FRAC_CONST(0.043136518621958) },
+    { FRAC_CONST(0.014636271960196), FRAC_CONST(0.043233238098025) },
+    { FRAC_CONST(0.014352999614128), FRAC_CONST(0.043328105606063) },
+    { FRAC_CONST(0.014069112433327), FRAC_CONST(0.043421117082265) },
+    { FRAC_CONST(0.013784622578575), FRAC_CONST(0.043512268542327) },
+    { FRAC_CONST(0.013499542236471), FRAC_CONST(0.043601556081625) },
+    { FRAC_CONST(0.013213883618907), FRAC_CONST(0.043688975875378) },
+    { FRAC_CONST(0.012927658962548), FRAC_CONST(0.043774524178812) },
+    { FRAC_CONST(0.012640880528305), FRAC_CONST(0.043858197327323) },
+    { FRAC_CONST(0.012353560600813), FRAC_CONST(0.043939991736633) },
+    { FRAC_CONST(0.012065711487901), FRAC_CONST(0.044019903902940) },
+    { FRAC_CONST(0.011777345520066), FRAC_CONST(0.044097930403073) },
+    { FRAC_CONST(0.011488475049948), FRAC_CONST(0.044174067894638) },
+    { FRAC_CONST(0.011199112451794), FRAC_CONST(0.044248313116156) },
+    { FRAC_CONST(0.010909270120937), FRAC_CONST(0.044320662887211) },
+    { FRAC_CONST(0.010618960473257), FRAC_CONST(0.044391114108577) },
+    { FRAC_CONST(0.010328195944653), FRAC_CONST(0.044459663762361) },
+    { FRAC_CONST(0.010036988990509), FRAC_CONST(0.044526308912122) },
+    { FRAC_CONST(0.009745352085163), FRAC_CONST(0.044591046703005) },
+    { FRAC_CONST(0.009453297721368), FRAC_CONST(0.044653874361857) },
+    { FRAC_CONST(0.009160838409762), FRAC_CONST(0.044714789197351) },
+    { FRAC_CONST(0.008867986678328), FRAC_CONST(0.044773788600099) },
+    { FRAC_CONST(0.008574755071860), FRAC_CONST(0.044830870042761) },
+    { FRAC_CONST(0.008281156151424), FRAC_CONST(0.044886031080160) },
+    { FRAC_CONST(0.007987202493820), FRAC_CONST(0.044939269349379) },
+    { FRAC_CONST(0.007692906691044), FRAC_CONST(0.044990582569869) },
+    { FRAC_CONST(0.007398281349750), FRAC_CONST(0.045039968543542) },
+    { FRAC_CONST(0.007103339090706), FRAC_CONST(0.045087425154868) },
+    { FRAC_CONST(0.006808092548258), FRAC_CONST(0.045132950370962) },
+    { FRAC_CONST(0.006512554369783), FRAC_CONST(0.045176542241676) },
+    { FRAC_CONST(0.006216737215155), FRAC_CONST(0.045218198899680) },
+    { FRAC_CONST(0.005920653756196), FRAC_CONST(0.045257918560541) },
+    { FRAC_CONST(0.005624316676135), FRAC_CONST(0.045295699522801) },
+    { FRAC_CONST(0.005327738669067), FRAC_CONST(0.045331540168049) },
+    { FRAC_CONST(0.005030932439406), FRAC_CONST(0.045365438960992) },
+    { FRAC_CONST(0.004733910701344), FRAC_CONST(0.045397394449517) },
+    { FRAC_CONST(0.004436686178303), FRAC_CONST(0.045427405264758) },
+    { FRAC_CONST(0.004139271602393), FRAC_CONST(0.045455470121152) },
+    { FRAC_CONST(0.003841679713863), FRAC_CONST(0.045481587816494) },
+    { FRAC_CONST(0.003543923260561), FRAC_CONST(0.045505757231988) },
+    { FRAC_CONST(0.003246014997382), FRAC_CONST(0.045527977332297) },
+    { FRAC_CONST(0.002947967685724), FRAC_CONST(0.045548247165585) },
+    { FRAC_CONST(0.002649794092941), FRAC_CONST(0.045566565863562) },
+    { FRAC_CONST(0.002351506991799), FRAC_CONST(0.045582932641515) },
+    { FRAC_CONST(0.002053119159924), FRAC_CONST(0.045597346798344) },
+    { FRAC_CONST(0.001754643379257), FRAC_CONST(0.045609807716597) },
+    { FRAC_CONST(0.001456092435508), FRAC_CONST(0.045620314862489) },
+    { FRAC_CONST(0.001157479117605), FRAC_CONST(0.045628867785927) },
+    { FRAC_CONST(0.000858816217149), FRAC_CONST(0.045635466120535) },
+    { FRAC_CONST(0.000560116527865), FRAC_CONST(0.045640109583661) },
+    { FRAC_CONST(0.000261392845053), FRAC_CONST(0.045642797976394) }
+};
+#endif // LD_DEC
+
+/* 60 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_240[] =
+{
+    { FRAC_CONST(0.091286604111815), FRAC_CONST(0.000298735779793) },
+    { FRAC_CONST(0.091247502481454), FRAC_CONST(0.002688238127538) },
+    { FRAC_CONST(0.091145864370807), FRAC_CONST(0.005075898091152) },
+    { FRAC_CONST(0.090981759437558), FRAC_CONST(0.007460079287760) },
+    { FRAC_CONST(0.090755300151030), FRAC_CONST(0.009839147718664) },
+    { FRAC_CONST(0.090466641715108), FRAC_CONST(0.012211472889198) },
+    { FRAC_CONST(0.090115981961863), FRAC_CONST(0.014575428926191) },
+    { FRAC_CONST(0.089703561215976), FRAC_CONST(0.016929395692256) },
+    { FRAC_CONST(0.089229662130024), FRAC_CONST(0.019271759896156) },
+    { FRAC_CONST(0.088694609490769), FRAC_CONST(0.021600916198470) },
+    { FRAC_CONST(0.088098769996564), FRAC_CONST(0.023915268311810) },
+    { FRAC_CONST(0.087442552006035), FRAC_CONST(0.026213230094844) },
+    { FRAC_CONST(0.086726405258214), FRAC_CONST(0.028493226639351) },
+    { FRAC_CONST(0.085950820564309), FRAC_CONST(0.030753695349588) },
+    { FRAC_CONST(0.085116329471329), FRAC_CONST(0.032993087013213) },
+    { FRAC_CONST(0.084223503897785), FRAC_CONST(0.035209866863042) },
+    { FRAC_CONST(0.083272955741727), FRAC_CONST(0.037402515628894) },
+    { FRAC_CONST(0.082265336461381), FRAC_CONST(0.039569530578832) },
+    { FRAC_CONST(0.081201336628670), FRAC_CONST(0.041709426549053) },
+    { FRAC_CONST(0.080081685455930), FRAC_CONST(0.043820736961749) },
+    { FRAC_CONST(0.078907150296148), FRAC_CONST(0.045902014830227) },
+    { FRAC_CONST(0.077678536117054), FRAC_CONST(0.047951833750597) },
+    { FRAC_CONST(0.076396684949434), FRAC_CONST(0.049968788879362) },
+    { FRAC_CONST(0.075062475310050), FRAC_CONST(0.051951497896226) },
+    { FRAC_CONST(0.073676821599542), FRAC_CONST(0.053898601951466) },
+    { FRAC_CONST(0.072240673475749), FRAC_CONST(0.055808766597225) },
+    { FRAC_CONST(0.070755015202858), FRAC_CONST(0.057680682702068) },
+    { FRAC_CONST(0.069220864976840), FRAC_CONST(0.059513067348201) },
+    { FRAC_CONST(0.067639274227625), FRAC_CONST(0.061304664710718) },
+    { FRAC_CONST(0.066011326898512), FRAC_CONST(0.063054246918278) },
+    { FRAC_CONST(0.064338138703282), FRAC_CONST(0.064760614894630) },
+    { FRAC_CONST(0.062620856361546), FRAC_CONST(0.066422599180399) },
+    { FRAC_CONST(0.060860656812842), FRAC_CONST(0.068039060734572) },
+    { FRAC_CONST(0.059058746410016), FRAC_CONST(0.069608891715145) },
+    { FRAC_CONST(0.057216360092450), FRAC_CONST(0.071131016238378) },
+    { FRAC_CONST(0.055334760539699), FRAC_CONST(0.072604391116154) },
+    { FRAC_CONST(0.053415237306106), FRAC_CONST(0.074028006570930) },
+    { FRAC_CONST(0.051459105937014), FRAC_CONST(0.075400886927784) },
+    { FRAC_CONST(0.049467707067153), FRAC_CONST(0.076722091283096) },
+    { FRAC_CONST(0.047442405501835), FRAC_CONST(0.077990714149396) },
+    { FRAC_CONST(0.045384589281588), FRAC_CONST(0.079205886075941) },
+    { FRAC_CONST(0.043295668730857), FRAC_CONST(0.080366774244592) },
+    { FRAC_CONST(0.041177075491445), FRAC_CONST(0.081472583040586) },
+    { FRAC_CONST(0.039030261541332), FRAC_CONST(0.082522554597810) },
+    { FRAC_CONST(0.036856698199564), FRAC_CONST(0.083515969318206) },
+    { FRAC_CONST(0.034657875117883), FRAC_CONST(0.084452146364948) },
+    { FRAC_CONST(0.032435299259796), FRAC_CONST(0.085330444129049) },
+    { FRAC_CONST(0.030190493867775), FRAC_CONST(0.086150260669096) },
+    { FRAC_CONST(0.027924997419306), FRAC_CONST(0.086911034123781) },
+    { FRAC_CONST(0.025640362572491), FRAC_CONST(0.087612243096981) },
+    { FRAC_CONST(0.023338155101933), FRAC_CONST(0.088253407015092) },
+    { FRAC_CONST(0.021019952825636), FRAC_CONST(0.088834086456390) },
+    { FRAC_CONST(0.018687344523641), FRAC_CONST(0.089353883452193) },
+    { FRAC_CONST(0.016341928849164), FRAC_CONST(0.089812441759604) },
+    { FRAC_CONST(0.013985313232951), FRAC_CONST(0.090209447105664) },
+    { FRAC_CONST(0.011619112781631), FRAC_CONST(0.090544627402740) },
+    { FRAC_CONST(0.009244949170797), FRAC_CONST(0.090817752935000) },
+    { FRAC_CONST(0.006864449533597), FRAC_CONST(0.091028636515846) },
+    { FRAC_CONST(0.004479245345574), FRAC_CONST(0.091177133616206) },
+    { FRAC_CONST(0.002090971306534), FRAC_CONST(0.091263142463585) }
+};
+#endif // ALLOW_SMALL_FRAMELENGTH
+
+#ifdef SSR_DEC
+/* 128 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_512[] =
+{
+    { FRAC_CONST(0.062499926465731), FRAC_CONST(0.000095873761643) },
+    { FRAC_CONST(0.062494043817678), FRAC_CONST(0.000862836783004) },
+    { FRAC_CONST(0.062478749796497), FRAC_CONST(0.001629669864319) },
+    { FRAC_CONST(0.062454046705412), FRAC_CONST(0.002396257523347) },
+    { FRAC_CONST(0.062419938264617), FRAC_CONST(0.003162484314806) },
+    { FRAC_CONST(0.062376429610718), FRAC_CONST(0.003928234847760) },
+    { FRAC_CONST(0.062323527295958), FRAC_CONST(0.004693393802995) },
+    { FRAC_CONST(0.062261239287231), FRAC_CONST(0.005457845950387) },
+    { FRAC_CONST(0.062189574964882), FRAC_CONST(0.006221476166254) },
+    { FRAC_CONST(0.062108545121295), FRAC_CONST(0.006984169450695) },
+    { FRAC_CONST(0.062018161959266), FRAC_CONST(0.007745810944907) },
+    { FRAC_CONST(0.061918439090167), FRAC_CONST(0.008506285948482) },
+    { FRAC_CONST(0.061809391531894), FRAC_CONST(0.009265479936681) },
+    { FRAC_CONST(0.061691035706609), FRAC_CONST(0.010023278577683) },
+    { FRAC_CONST(0.061563389438265), FRAC_CONST(0.010779567749800) },
+    { FRAC_CONST(0.061426471949919), FRAC_CONST(0.011534233558664) },
+    { FRAC_CONST(0.061280303860842), FRAC_CONST(0.012287162354380) },
+    { FRAC_CONST(0.061124907183410), FRAC_CONST(0.013038240748641) },
+    { FRAC_CONST(0.060960305319791), FRAC_CONST(0.013787355631805) },
+    { FRAC_CONST(0.060786523058421), FRAC_CONST(0.014534394189923) },
+    { FRAC_CONST(0.060603586570268), FRAC_CONST(0.015279243921739) },
+    { FRAC_CONST(0.060411523404896), FRAC_CONST(0.016021792655621) },
+    { FRAC_CONST(0.060210362486310), FRAC_CONST(0.016761928566463) },
+    { FRAC_CONST(0.060000134108604), FRAC_CONST(0.017499540192517) },
+    { FRAC_CONST(0.059780869931400), FRAC_CONST(0.018234516452187) },
+    { FRAC_CONST(0.059552602975075), FRAC_CONST(0.018966746660751) },
+    { FRAC_CONST(0.059315367615794), FRAC_CONST(0.019696120547033) },
+    { FRAC_CONST(0.059069199580329), FRAC_CONST(0.020422528270008) },
+    { FRAC_CONST(0.058814135940681), FRAC_CONST(0.021145860435346) },
+    { FRAC_CONST(0.058550215108495), FRAC_CONST(0.021866008111883) },
+    { FRAC_CONST(0.058277476829279), FRAC_CONST(0.022582862848028) },
+    { FRAC_CONST(0.057995962176414), FRAC_CONST(0.023296316688095) },
+    { FRAC_CONST(0.057705713544970), FRAC_CONST(0.024006262188558) },
+    { FRAC_CONST(0.057406774645326), FRAC_CONST(0.024712592434239) },
+    { FRAC_CONST(0.057099190496578), FRAC_CONST(0.025415201054398) },
+    { FRAC_CONST(0.056783007419769), FRAC_CONST(0.026113982238763) },
+    { FRAC_CONST(0.056458273030907), FRAC_CONST(0.026808830753458) },
+    { FRAC_CONST(0.056125036233796), FRAC_CONST(0.027499641956852) },
+    { FRAC_CONST(0.055783347212673), FRAC_CONST(0.028186311815319) },
+    { FRAC_CONST(0.055433257424646), FRAC_CONST(0.028868736918904) },
+    { FRAC_CONST(0.055074819591951), FRAC_CONST(0.029546814496896) },
+    { FRAC_CONST(0.054708087694007), FRAC_CONST(0.030220442433307) },
+    { FRAC_CONST(0.054333116959288), FRAC_CONST(0.030889519282247) },
+    { FRAC_CONST(0.053949963857008), FRAC_CONST(0.031553944283204) },
+    { FRAC_CONST(0.053558686088614), FRAC_CONST(0.032213617376216) },
+    { FRAC_CONST(0.053159342579100), FRAC_CONST(0.032868439216943) },
+    { FRAC_CONST(0.052751993468129), FRAC_CONST(0.033518311191623) },
+    { FRAC_CONST(0.052336700100979), FRAC_CONST(0.034163135431927) },
+    { FRAC_CONST(0.051913525019303), FRAC_CONST(0.034802814829698) },
+    { FRAC_CONST(0.051482531951712), FRAC_CONST(0.035437253051569) },
+    { FRAC_CONST(0.051043785804177), FRAC_CONST(0.036066354553480) },
+    { FRAC_CONST(0.050597352650253), FRAC_CONST(0.036690024595057) },
+    { FRAC_CONST(0.050143299721132), FRAC_CONST(0.037308169253887) },
+    { FRAC_CONST(0.049681695395515), FRAC_CONST(0.037920695439658) },
+    { FRAC_CONST(0.049212609189314), FRAC_CONST(0.038527510908178) },
+    { FRAC_CONST(0.048736111745188), FRAC_CONST(0.039128524275271) },
+    { FRAC_CONST(0.048252274821899), FRAC_CONST(0.039723645030535) },
+    { FRAC_CONST(0.047761171283507), FRAC_CONST(0.040312783550971) },
+    { FRAC_CONST(0.047262875088400), FRAC_CONST(0.040895851114488) },
+    { FRAC_CONST(0.046757461278150), FRAC_CONST(0.041472759913252) },
+    { FRAC_CONST(0.046245005966220), FRAC_CONST(0.042043423066923) },
+    { FRAC_CONST(0.045725586326493), FRAC_CONST(0.042607754635728) },
+    { FRAC_CONST(0.045199280581658), FRAC_CONST(0.043165669633408) },
+    { FRAC_CONST(0.044666167991423), FRAC_CONST(0.043717084040018) },
+    { FRAC_CONST(0.044126328840584), FRAC_CONST(0.044261914814575) },
+    { FRAC_CONST(0.043579844426930), FRAC_CONST(0.044800079907569) },
+    { FRAC_CONST(0.043026797049006), FRAC_CONST(0.045331498273316) },
+    { FRAC_CONST(0.042467269993710), FRAC_CONST(0.045856089882166) },
+    { FRAC_CONST(0.041901347523761), FRAC_CONST(0.046373775732552) },
+    { FRAC_CONST(0.041329114865000), FRAC_CONST(0.046884477862888) },
+    { FRAC_CONST(0.040750658193560), FRAC_CONST(0.047388119363313) },
+    { FRAC_CONST(0.040166064622889), FRAC_CONST(0.047884624387270) },
+    { FRAC_CONST(0.039575422190629), FRAC_CONST(0.048373918162926) },
+    { FRAC_CONST(0.038978819845356), FRAC_CONST(0.048855927004441) },
+    { FRAC_CONST(0.038376347433190), FRAC_CONST(0.049330578323055) },
+    { FRAC_CONST(0.037768095684260), FRAC_CONST(0.049797800638026) },
+    { FRAC_CONST(0.037154156199042), FRAC_CONST(0.050257523587392) },
+    { FRAC_CONST(0.036534621434563), FRAC_CONST(0.050709677938566) },
+    { FRAC_CONST(0.035909584690482), FRAC_CONST(0.051154195598769) },
+    { FRAC_CONST(0.035279140095032), FRAC_CONST(0.051591009625274) },
+    { FRAC_CONST(0.034643382590851), FRAC_CONST(0.052020054235496) },
+    { FRAC_CONST(0.034002407920680), FRAC_CONST(0.052441264816895) },
+    { FRAC_CONST(0.033356312612947), FRAC_CONST(0.052854577936706) },
+    { FRAC_CONST(0.032705193967229), FRAC_CONST(0.053259931351495) },
+    { FRAC_CONST(0.032049150039598), FRAC_CONST(0.053657264016528) },
+    { FRAC_CONST(0.031388279627857), FRAC_CONST(0.054046516094966) },
+    { FRAC_CONST(0.030722682256659), FRAC_CONST(0.054427628966880) },
+    { FRAC_CONST(0.030052458162521), FRAC_CONST(0.054800545238072) },
+    { FRAC_CONST(0.029377708278725), FRAC_CONST(0.055165208748723) },
+    { FRAC_CONST(0.028698534220122), FRAC_CONST(0.055521564581850) },
+    { FRAC_CONST(0.028015038267826), FRAC_CONST(0.055869559071575) },
+    { FRAC_CONST(0.027327323353815), FRAC_CONST(0.056209139811209) },
+    { FRAC_CONST(0.026635493045425), FRAC_CONST(0.056540255661140) },
+    { FRAC_CONST(0.025939651529755), FRAC_CONST(0.056862856756541) },
+    { FRAC_CONST(0.025239903597978), FRAC_CONST(0.057176894514872) },
+    { FRAC_CONST(0.024536354629559), FRAC_CONST(0.057482321643202) },
+    { FRAC_CONST(0.023829110576385), FRAC_CONST(0.057779092145329) },
+    { FRAC_CONST(0.023118277946808), FRAC_CONST(0.058067161328707) },
+    { FRAC_CONST(0.022403963789609), FRAC_CONST(0.058346485811177) },
+    { FRAC_CONST(0.021686275677870), FRAC_CONST(0.058617023527499) },
+    { FRAC_CONST(0.020965321692783), FRAC_CONST(0.058878733735689) },
+    { FRAC_CONST(0.020241210407366), FRAC_CONST(0.059131577023150) },
+    { FRAC_CONST(0.019514050870114), FRAC_CONST(0.059375515312615) },
+    { FRAC_CONST(0.018783952588580), FRAC_CONST(0.059610511867874) },
+    { FRAC_CONST(0.018051025512878), FRAC_CONST(0.059836531299311) },
+    { FRAC_CONST(0.017315380019131), FRAC_CONST(0.060053539569230) },
+    { FRAC_CONST(0.016577126892844), FRAC_CONST(0.060261503996984) },
+    { FRAC_CONST(0.015836377312223), FRAC_CONST(0.060460393263896) },
+    { FRAC_CONST(0.015093242831429), FRAC_CONST(0.060650177417972) },
+    { FRAC_CONST(0.014347835363782), FRAC_CONST(0.060830827878419) },
+    { FRAC_CONST(0.013600267164905), FRAC_CONST(0.061002317439940) },
+    { FRAC_CONST(0.012850650815819), FRAC_CONST(0.061164620276839) },
+    { FRAC_CONST(0.012099099205988), FRAC_CONST(0.061317711946905) },
+    { FRAC_CONST(0.011345725516320), FRAC_CONST(0.061461569395097) },
+    { FRAC_CONST(0.010590643202123), FRAC_CONST(0.061596170957011) },
+    { FRAC_CONST(0.009833965976015), FRAC_CONST(0.061721496362147) },
+    { FRAC_CONST(0.009075807790803), FRAC_CONST(0.061837526736961) },
+    { FRAC_CONST(0.008316282822321), FRAC_CONST(0.061944244607705) },
+    { FRAC_CONST(0.007555505452236), FRAC_CONST(0.062041633903059) },
+    { FRAC_CONST(0.006793590250821), FRAC_CONST(0.062129679956555) },
+    { FRAC_CONST(0.006030651959703), FRAC_CONST(0.062208369508780) },
+    { FRAC_CONST(0.005266805474583), FRAC_CONST(0.062277690709378) },
+    { FRAC_CONST(0.004502165827931), FRAC_CONST(0.062337633118830) },
+    { FRAC_CONST(0.003736848171665), FRAC_CONST(0.062388187710030) },
+    { FRAC_CONST(0.002970967759810), FRAC_CONST(0.062429346869643) },
+    { FRAC_CONST(0.002204639931138), FRAC_CONST(0.062461104399250) },
+    { FRAC_CONST(0.001437980091802), FRAC_CONST(0.062483455516285) },
+    { FRAC_CONST(0.000671103697954), FRAC_CONST(0.062496396854751) }
+};
+
+/* 16 (N/4) complex twiddle factors */
+ALIGN static const complex_t mdct_tab_64[] =
+{
+    { FRAC_CONST(0.176763384336599), FRAC_CONST(0.002169321984356) },
+    { FRAC_CONST(0.175699589589310), FRAC_CONST(0.019484717553714) },
+    { FRAC_CONST(0.172943711747111), FRAC_CONST(0.036612464641599) },
+    { FRAC_CONST(0.168522291420137), FRAC_CONST(0.053387613680577) },
+    { FRAC_CONST(0.162477909303132), FRAC_CONST(0.069648610815172) },
+    { FRAC_CONST(0.154868776100077), FRAC_CONST(0.085238853753814) },
+    { FRAC_CONST(0.145768171923295), FRAC_CONST(0.100008199934509) },
+    { FRAC_CONST(0.135263740565902), FRAC_CONST(0.113814412479792) },
+    { FRAC_CONST(0.123456645444178), FRAC_CONST(0.126524530015608) },
+    { FRAC_CONST(0.110460595338559), FRAC_CONST(0.138016147162030) },
+    { FRAC_CONST(0.096400749315926), FRAC_CONST(0.148178593363981) },
+    { FRAC_CONST(0.081412511379371), FRAC_CONST(0.156913998709178) },
+    { FRAC_CONST(0.065640226453626), FRAC_CONST(0.164138236468888) },
+    { FRAC_CONST(0.049235790264535), FRAC_CONST(0.169781733284316) },
+    { FRAC_CONST(0.032357186500177), FRAC_CONST(0.173790139196080) },
+    { FRAC_CONST(0.015166965341583), FRAC_CONST(0.176124851064031) }
+};
+#endif // SSR_DEC
+
+#endif // FIXED_POINT
+
+#ifdef __cplusplus
+}
+#endif
+#endif
--- a/libfaad2/mp4.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/mp4.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: mp4.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: mp4.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -121,17 +121,17 @@
 };
 
 /* Table 1.6.1 */
-int8_t FAADAPI AudioSpecificConfig(uint8_t *pBuffer,
-                                   uint32_t buffer_size,
-                                   mp4AudioSpecificConfig *mp4ASC)
+int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
+                                               uint32_t buffer_size,
+                                               mp4AudioSpecificConfig *mp4ASC)
 {
     return AudioSpecificConfig2(pBuffer, buffer_size, mp4ASC, NULL);
 }
 
-int8_t FAADAPI AudioSpecificConfig2(uint8_t *pBuffer,
-                                    uint32_t buffer_size,
-                                    mp4AudioSpecificConfig *mp4ASC,
-                                    program_config *pce)
+int8_t AudioSpecificConfig2(uint8_t *pBuffer,
+                            uint32_t buffer_size,
+                            mp4AudioSpecificConfig *mp4ASC,
+                            program_config *pce)
 {
     bitfile ld;
     int8_t result = 0;
@@ -178,13 +178,28 @@
         return -3;
     }
 
+#if (defined(PS_DEC) || defined(DRM_PS))
+    /* check if we have a mono file */
+    if (mp4ASC->channelsConfiguration == 1)
+    {
+        /* upMatrix to 2 channels for implicit signalling of PS */
+        mp4ASC->channelsConfiguration = 2;
+    }
+#endif
+
 #ifdef SBR_DEC
     mp4ASC->sbr_present_flag = -1;
     if (mp4ASC->objectTypeIndex == 5)
     {
+        uint8_t tmp;
+
         mp4ASC->sbr_present_flag = 1;
-        mp4ASC->samplingFrequencyIndex = (uint8_t)faad_getbits(&ld, 4
+        tmp = (uint8_t)faad_getbits(&ld, 4
             DEBUGVAR(1,5,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
+        /* check for downsampled SBR */
+        if (tmp == mp4ASC->samplingFrequencyIndex)
+            mp4ASC->downSampledSBR = 1;
+        mp4ASC->samplingFrequencyIndex = tmp;
         if (mp4ASC->samplingFrequencyIndex == 15)
         {
             mp4ASC->samplingFrequency = (uint32_t)faad_getbits(&ld, 24
@@ -245,8 +260,15 @@
 
                 if (mp4ASC->sbr_present_flag)
                 {
-                    mp4ASC->samplingFrequencyIndex = (uint8_t)faad_getbits(&ld, 4
+                    uint8_t tmp;
+                    tmp = (uint8_t)faad_getbits(&ld, 4
                         DEBUGVAR(1,12,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));
+
+                    /* check for downsampled SBR */
+                    if (tmp == mp4ASC->samplingFrequencyIndex)
+                        mp4ASC->downSampledSBR = 1;
+                    mp4ASC->samplingFrequencyIndex = tmp;
+
                     if (mp4ASC->samplingFrequencyIndex == 15)
                     {
                         mp4ASC->samplingFrequency = (uint32_t)faad_getbits(&ld, 24
@@ -267,6 +289,8 @@
         {
             mp4ASC->samplingFrequency *= 2;
             mp4ASC->forceUpSampling = 1;
+        } else /* > 24000*/ {
+            mp4ASC->downSampledSBR = 1;
         }
     }
 #endif
--- a/libfaad2/mp4.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/mp4.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: mp4.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: mp4.h,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -36,14 +36,14 @@
 
 #include "decoder.h"
 
-int8_t FAADAPI AudioSpecificConfig(uint8_t *pBuffer,
-                                   uint32_t buffer_size,
-                                   mp4AudioSpecificConfig *mp4ASC);
+int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer,
+                                               uint32_t buffer_size,
+                                               mp4AudioSpecificConfig *mp4ASC);
 
-int8_t FAADAPI AudioSpecificConfig2(uint8_t *pBuffer,
-                                    uint32_t buffer_size,
-                                    mp4AudioSpecificConfig *mp4ASC,
-                                    program_config *pce);
+int8_t AudioSpecificConfig2(uint8_t *pBuffer,
+                            uint32_t buffer_size,
+                            mp4AudioSpecificConfig *mp4ASC,
+                            program_config *pce);
 
 #ifdef __cplusplus
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaad2/neaacdec.h	Fri Sep 24 17:31:36 2004 +0000
@@ -0,0 +1,243 @@
+/*
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+**
+** 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.
+**
+** Any non-GPL usage of this software or parts of this software is strictly
+** forbidden.
+**
+** Commercial non-GPL licensing of this software is possible.
+** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
+**
+** Initially modified for use with MPlayer by Diego Biurrun on 2004/09/24
+** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+**/
+
+#ifndef __NEAACDEC_H__
+#define __NEAACDEC_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#if 1
+/* MACROS FOR BACKWARDS COMPATIBILITY */
+/* structs */
+#define faacDecHandle                  NeAACDecHandle
+#define faacDecConfiguration           NeAACDecConfiguration
+#define faacDecConfigurationPtr        NeAACDecConfigurationPtr
+#define faacDecFrameInfo               NeAACDecFrameInfo
+/* functions */
+#define faacDecGetErrorMessage         NeAACDecGetErrorMessage
+#define faacDecSetConfiguration        NeAACDecSetConfiguration
+#define faacDecGetCurrentConfiguration NeAACDecGetCurrentConfiguration
+#define faacDecInit                    NeAACDecInit
+#define faacDecInit2                   NeAACDecInit2
+#define faacDecInitDRM                 NeAACDecInitDRM
+#define faacDecPostSeekReset           NeAACDecPostSeekReset
+#define faacDecOpen                    NeAACDecOpen
+#define faacDecClose                   NeAACDecClose
+#define faacDecDecode                  NeAACDecDecode
+#define AudioSpecificConfig            NeAACDecAudioSpecificConfig
+#endif
+
+
+#ifdef _WIN32
+  #pragma pack(push, 8)
+  #ifndef NEAACDECAPI
+    #define NEAACDECAPI __cdecl
+  #endif
+#else
+  #ifndef NEAACDECAPI
+    #define NEAACDECAPI
+  #endif
+#endif
+
+#define FAAD2_VERSION "2.1 beta"
+
+/* object types for AAC */
+#define MAIN       1
+#define LC         2
+#define SSR        3
+#define LTP        4
+#define HE_AAC     5
+#define ER_LC     17
+#define ER_LTP    19
+#define LD        23
+#define DRM_ER_LC 27 /* special object type for DRM */
+
+/* header types */
+#define RAW        0
+#define ADIF       1
+#define ADTS       2
+
+/* SBR signalling */
+#define NO_SBR           0
+#define SBR_UPSAMPLED    1
+#define SBR_DOWNSAMPLED  2
+#define NO_SBR_UPSAMPLED 3
+
+/* library output formats */
+#define FAAD_FMT_16BIT  1
+#define FAAD_FMT_24BIT  2
+#define FAAD_FMT_32BIT  3
+#define FAAD_FMT_FLOAT  4
+#define FAAD_FMT_FIXED  FAAD_FMT_FLOAT
+#define FAAD_FMT_DOUBLE 5
+
+/* Capabilities */
+#define LC_DEC_CAP           (1<<0) /* Can decode LC */
+#define MAIN_DEC_CAP         (1<<1) /* Can decode MAIN */
+#define LTP_DEC_CAP          (1<<2) /* Can decode LTP */
+#define LD_DEC_CAP           (1<<3) /* Can decode LD */
+#define ERROR_RESILIENCE_CAP (1<<4) /* Can decode ER */
+#define FIXED_POINT_CAP      (1<<5) /* Fixed point */
+
+/* Channel definitions */
+#define FRONT_CHANNEL_CENTER (1)
+#define FRONT_CHANNEL_LEFT   (2)
+#define FRONT_CHANNEL_RIGHT  (3)
+#define SIDE_CHANNEL_LEFT    (4)
+#define SIDE_CHANNEL_RIGHT   (5)
+#define BACK_CHANNEL_LEFT    (6)
+#define BACK_CHANNEL_RIGHT   (7)
+#define BACK_CHANNEL_CENTER  (8)
+#define LFE_CHANNEL          (9)
+#define UNKNOWN_CHANNEL      (0)
+
+/* DRM channel definitions */
+#define DRMCH_MONO          1
+#define DRMCH_STEREO        2
+#define DRMCH_SBR_MONO      3
+#define DRMCH_SBR_STEREO    4
+#define DRMCH_SBR_PS_STEREO 5
+
+
+/* A decode call can eat up to FAAD_MIN_STREAMSIZE bytes per decoded channel,
+   so at least so much bytes per channel should be available in this stream */
+#define FAAD_MIN_STREAMSIZE 768 /* 6144 bits/channel */
+
+
+typedef void *NeAACDecHandle;
+
+typedef struct mp4AudioSpecificConfig
+{
+    /* Audio Specific Info */
+    unsigned char objectTypeIndex;
+    unsigned char samplingFrequencyIndex;
+    unsigned long samplingFrequency;
+    unsigned char channelsConfiguration;
+
+    /* GA Specific Info */
+    unsigned char frameLengthFlag;
+    unsigned char dependsOnCoreCoder;
+    unsigned short coreCoderDelay;
+    unsigned char extensionFlag;
+    unsigned char aacSectionDataResilienceFlag;
+    unsigned char aacScalefactorDataResilienceFlag;
+    unsigned char aacSpectralDataResilienceFlag;
+    unsigned char epConfig;
+
+    char sbr_present_flag;
+    char forceUpSampling;
+    char downSampledSBR;
+} mp4AudioSpecificConfig;
+
+typedef struct NeAACDecConfiguration
+{
+    unsigned char defObjectType;
+    unsigned long defSampleRate;
+    unsigned char outputFormat;
+    unsigned char downMatrix;
+    unsigned char useOldADTSFormat;
+    unsigned char dontUpSampleImplicitSBR;
+} NeAACDecConfiguration, *NeAACDecConfigurationPtr;
+
+typedef struct NeAACDecFrameInfo
+{
+    unsigned long bytesconsumed;
+    unsigned long samples;
+    unsigned char channels;
+    unsigned char error;
+    unsigned long samplerate;
+
+    /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */
+    unsigned char sbr;
+
+    /* MPEG-4 ObjectType */
+    unsigned char object_type;
+
+    /* AAC header type; MP4 will be signalled as RAW also */
+    unsigned char header_type;
+
+    /* multichannel configuration */
+    unsigned char num_front_channels;
+    unsigned char num_side_channels;
+    unsigned char num_back_channels;
+    unsigned char num_lfe_channels;
+    unsigned char channel_position[64];
+} NeAACDecFrameInfo;
+
+char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode);
+
+unsigned long NEAACDECAPI NeAACDecGetCapabilities(void);
+
+NeAACDecHandle NEAACDECAPI NeAACDecOpen(void);
+
+NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder);
+
+unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder,
+                                                   NeAACDecConfigurationPtr config);
+
+/* Init the library based on info from the AAC file (ADTS/ADIF) */
+long NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder,
+                              unsigned char *buffer,
+                              unsigned long buffer_size,
+                              unsigned long *samplerate,
+                              unsigned char *channels);
+
+/* Init the library using a DecoderSpecificInfo */
+char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer,
+                               unsigned long SizeOfDecoderSpecificInfo,
+                               unsigned long *samplerate, unsigned char *channels);
+
+/* Init the library for DRM */
+char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned long samplerate,
+                                 unsigned char channels);
+
+void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, long frame);
+
+void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder);
+
+void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder,
+                                 NeAACDecFrameInfo *hInfo,
+                                 unsigned char *buffer,
+                                 unsigned long buffer_size);
+
+char NEAACDECAPI NeAACDecAudioSpecificConfig(unsigned char *pBuffer,
+                                             unsigned long buffer_size,
+                                             mp4AudioSpecificConfig *mp4ASC);
+
+#ifdef _WIN32
+  #pragma pack(pop)
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
--- a/libfaad2/output.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/output.c	Fri Sep 24 17:31:36 2004 +0000
@@ -86,7 +86,7 @@
 
 #define CONV(a,b) ((a<<1)|(b&0x1))
 
-static void to_PCM_16bit(faacDecHandle hDecoder, real_t **input,
+static void to_PCM_16bit(NeAACDecHandle hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          int16_t **sample_buffer)
 {
@@ -107,18 +107,32 @@
         }
         break;
     case CONV(2,0):
-        ch  = hDecoder->internal_channel[0];
-        ch1 = hDecoder->internal_channel[1];
-        for(i = 0; i < frame_len; i++)
+        if (hDecoder->upMatrix)
         {
-            real_t inp0 = input[ch ][i];
-            real_t inp1 = input[ch1][i];
+            ch  = hDecoder->internal_channel[0];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch][i];
+
+                CLIP(inp0, 32767.0f, -32768.0f);
 
-            CLIP(inp0, 32767.0f, -32768.0f);
-            CLIP(inp1, 32767.0f, -32768.0f);
+                (*sample_buffer)[(i*2)+0] = (int16_t)lrintf(inp0);
+                (*sample_buffer)[(i*2)+1] = (int16_t)lrintf(inp0);
+            }
+        } else {
+            ch  = hDecoder->internal_channel[0];
+            ch1 = hDecoder->internal_channel[1];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch ][i];
+                real_t inp1 = input[ch1][i];
 
-            (*sample_buffer)[(i*2)+0] = (int16_t)lrintf(inp0);
-            (*sample_buffer)[(i*2)+1] = (int16_t)lrintf(inp1);
+                CLIP(inp0, 32767.0f, -32768.0f);
+                CLIP(inp1, 32767.0f, -32768.0f);
+
+                (*sample_buffer)[(i*2)+0] = (int16_t)lrintf(inp0);
+                (*sample_buffer)[(i*2)+1] = (int16_t)lrintf(inp1);
+            }
         }
         break;
     default:
@@ -137,7 +151,7 @@
     }
 }
 
-static void to_PCM_24bit(faacDecHandle hDecoder, real_t **input,
+static void to_PCM_24bit(NeAACDecHandle hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          int32_t **sample_buffer)
 {
@@ -159,20 +173,35 @@
         }
         break;
     case CONV(2,0):
-        ch  = hDecoder->internal_channel[0];
-        ch1 = hDecoder->internal_channel[1];
-        for(i = 0; i < frame_len; i++)
+        if (hDecoder->upMatrix)
         {
-            real_t inp0 = input[ch ][i];
-            real_t inp1 = input[ch1][i];
+            ch = hDecoder->internal_channel[0];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch][i];
+
+                inp0 *= 256.0f;
+                CLIP(inp0, 8388607.0f, -8388608.0f);
 
-            inp0 *= 256.0f;
-            inp1 *= 256.0f;
-            CLIP(inp0, 8388607.0f, -8388608.0f);
-            CLIP(inp1, 8388607.0f, -8388608.0f);
+                (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
+                (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp0);
+            }
+        } else {
+            ch  = hDecoder->internal_channel[0];
+            ch1 = hDecoder->internal_channel[1];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch ][i];
+                real_t inp1 = input[ch1][i];
 
-            (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
-            (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp1);
+                inp0 *= 256.0f;
+                inp1 *= 256.0f;
+                CLIP(inp0, 8388607.0f, -8388608.0f);
+                CLIP(inp1, 8388607.0f, -8388608.0f);
+
+                (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
+                (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp1);
+            }
         }
         break;
     default:
@@ -192,7 +221,7 @@
     }
 }
 
-static void to_PCM_32bit(faacDecHandle hDecoder, real_t **input,
+static void to_PCM_32bit(NeAACDecHandle hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          int32_t **sample_buffer)
 {
@@ -214,20 +243,35 @@
         }
         break;
     case CONV(2,0):
-        ch  = hDecoder->internal_channel[0];
-        ch1 = hDecoder->internal_channel[1];
-        for(i = 0; i < frame_len; i++)
+        if (hDecoder->upMatrix)
         {
-            real_t inp0 = input[ch ][i];
-            real_t inp1 = input[ch1][i];
+            ch = hDecoder->internal_channel[0];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch][i];
+
+                inp0 *= 65536.0f;
+                CLIP(inp0, 2147483647.0f, -2147483648.0f);
 
-            inp0 *= 65536.0f;
-            inp1 *= 65536.0f;
-            CLIP(inp0, 2147483647.0f, -2147483648.0f);
-            CLIP(inp1, 2147483647.0f, -2147483648.0f);
+                (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
+                (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp0);
+            }
+        } else {
+            ch  = hDecoder->internal_channel[0];
+            ch1 = hDecoder->internal_channel[1];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch ][i];
+                real_t inp1 = input[ch1][i];
 
-            (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
-            (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp1);
+                inp0 *= 65536.0f;
+                inp1 *= 65536.0f;
+                CLIP(inp0, 2147483647.0f, -2147483648.0f);
+                CLIP(inp1, 2147483647.0f, -2147483648.0f);
+
+                (*sample_buffer)[(i*2)+0] = (int32_t)lrintf(inp0);
+                (*sample_buffer)[(i*2)+1] = (int32_t)lrintf(inp1);
+            }
         }
         break;
     default:
@@ -247,7 +291,7 @@
     }
 }
 
-static void to_PCM_float(faacDecHandle hDecoder, real_t **input,
+static void to_PCM_float(NeAACDecHandle hDecoder, real_t **input,
                          uint8_t channels, uint16_t frame_len,
                          float32_t **sample_buffer)
 {
@@ -265,14 +309,25 @@
         }
         break;
     case CONV(2,0):
-        ch  = hDecoder->internal_channel[0];
-        ch1 = hDecoder->internal_channel[1];
-        for(i = 0; i < frame_len; i++)
+        if (hDecoder->upMatrix)
         {
-            real_t inp0 = input[ch ][i];
-            real_t inp1 = input[ch1][i];
-            (*sample_buffer)[(i*2)+0] = inp0*FLOAT_SCALE;
-            (*sample_buffer)[(i*2)+1] = inp1*FLOAT_SCALE;
+            ch = hDecoder->internal_channel[0];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch][i];
+                (*sample_buffer)[(i*2)+0] = inp0*FLOAT_SCALE;
+                (*sample_buffer)[(i*2)+1] = inp0*FLOAT_SCALE;
+            }
+        } else {
+            ch  = hDecoder->internal_channel[0];
+            ch1 = hDecoder->internal_channel[1];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch ][i];
+                real_t inp1 = input[ch1][i];
+                (*sample_buffer)[(i*2)+0] = inp0*FLOAT_SCALE;
+                (*sample_buffer)[(i*2)+1] = inp1*FLOAT_SCALE;
+            }
         }
         break;
     default:
@@ -288,7 +343,7 @@
     }
 }
 
-static void to_PCM_double(faacDecHandle hDecoder, real_t **input,
+static void to_PCM_double(NeAACDecHandle hDecoder, real_t **input,
                           uint8_t channels, uint16_t frame_len,
                           double **sample_buffer)
 {
@@ -306,14 +361,25 @@
         }
         break;
     case CONV(2,0):
-        ch  = hDecoder->internal_channel[0];
-        ch1 = hDecoder->internal_channel[1];
-        for(i = 0; i < frame_len; i++)
+        if (hDecoder->upMatrix)
         {
-            real_t inp0 = input[ch ][i];
-            real_t inp1 = input[ch1][i];
-            (*sample_buffer)[(i*2)+0] = (double)inp0*FLOAT_SCALE;
-            (*sample_buffer)[(i*2)+1] = (double)inp1*FLOAT_SCALE;
+            ch = hDecoder->internal_channel[0];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch][i];
+                (*sample_buffer)[(i*2)+0] = (double)inp0*FLOAT_SCALE;
+                (*sample_buffer)[(i*2)+1] = (double)inp0*FLOAT_SCALE;
+            }
+        } else {
+            ch  = hDecoder->internal_channel[0];
+            ch1 = hDecoder->internal_channel[1];
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t inp0 = input[ch ][i];
+                real_t inp1 = input[ch1][i];
+                (*sample_buffer)[(i*2)+0] = (double)inp0*FLOAT_SCALE;
+                (*sample_buffer)[(i*2)+1] = (double)inp1*FLOAT_SCALE;
+            }
         }
         break;
     default:
@@ -329,7 +395,7 @@
     }
 }
 
-void *output_to_PCM(faacDecHandle hDecoder,
+void *output_to_PCM(NeAACDecHandle hDecoder,
                     real_t **input, void *sample_buffer, uint8_t channels,
                     uint16_t frame_len, uint8_t format)
 {
@@ -376,8 +442,12 @@
 #define RSQRT2 FRAC_CONST(0.7071067811865475244) // 1/sqrt(2)
 
 static INLINE real_t get_sample(real_t **input, uint8_t channel, uint16_t sample,
-                                uint8_t down_matrix, uint8_t *internal_channel)
+                                uint8_t down_matrix, uint8_t up_matrix,
+                                uint8_t *internal_channel)
 {
+    if (up_matrix == 1)
+        return input[internal_channel[0]][sample];
+
     if (!down_matrix)
         return input[internal_channel[channel]][sample];
 
@@ -395,7 +465,7 @@
     }
 }
 
-void* output_to_PCM(faacDecHandle hDecoder,
+void* output_to_PCM(NeAACDecHandle hDecoder,
                     real_t **input, void *sample_buffer, uint8_t channels,
                     uint16_t frame_len, uint8_t format)
 {
@@ -412,8 +482,8 @@
         case FAAD_FMT_16BIT:
             for(i = 0; i < frame_len; i++)
             {
-                //int32_t tmp = input[ch][i];
-                int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
+                int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
+                    hDecoder->internal_channel);
                 if (tmp >= 0)
                 {
                     tmp += (1 << (REAL_BITS-1));
@@ -435,8 +505,8 @@
         case FAAD_FMT_24BIT:
             for(i = 0; i < frame_len; i++)
             {
-                //int32_t tmp = input[ch][i];
-                int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
+                int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
+                    hDecoder->internal_channel);
                 if (tmp >= 0)
                 {
                     tmp += (1 << (REAL_BITS-9));
@@ -459,8 +529,8 @@
         case FAAD_FMT_32BIT:
             for(i = 0; i < frame_len; i++)
             {
-                //int32_t tmp = input[ch][i];
-                int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->internal_channel);
+                int32_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
+                    hDecoder->internal_channel);
                 if (tmp >= 0)
                 {
                     tmp += (1 << (16-REAL_BITS-1));
@@ -472,6 +542,14 @@
                 int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
             }
             break;
+        case FAAD_FMT_FIXED:
+            for(i = 0; i < frame_len; i++)
+            {
+                real_t tmp = get_sample(input, ch, i, hDecoder->downMatrix, hDecoder->upMatrix,
+                    hDecoder->internal_channel);
+                int_sample_buffer[(i*channels)+ch] = (int32_t)tmp;
+            }
+            break;
         }
     }
 
--- a/libfaad2/output.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/output.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: output.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: output.h,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,7 +34,7 @@
 extern "C" {
 #endif
 
-void* output_to_PCM(faacDecHandle hDecoder,
+void* output_to_PCM(NeAACDecHandle hDecoder,
                     real_t **input,
                     void *samplebuffer,
                     uint8_t channels,
--- a/libfaad2/pns.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/pns.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: pns.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: pns.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -72,9 +72,6 @@
 
 static real_t pow2_table[] =
 {
-    COEF_CONST(0.59460355750136),
-    COEF_CONST(0.70710678118655),
-    COEF_CONST(0.84089641525371),
     COEF_CONST(1.0),
     COEF_CONST(1.18920711500272),
     COEF_CONST(1.41421356237310),
@@ -133,8 +130,8 @@
     {
         scale = DIV(REAL_CONST(1),energy);
 
-        exp = scale_factor / 4;
-        frac = scale_factor % 4;
+        exp = scale_factor >> 2;
+        frac = scale_factor & 3;
 
         /* IMDCT pre-scaling */
         exp -= sub;
@@ -145,7 +142,7 @@
             scale <<= exp;
 
         if (frac)
-            scale = MUL_C(scale, pow2_table[frac + 3]);
+            scale = MUL_C(scale, pow2_table[frac]);
 
         for (i = 0; i < size; i++)
         {
@@ -189,6 +186,7 @@
             {
                 if (is_noise(ics_left, g, sfb))
                 {
+#ifdef LTP_DEC
                     /* Simultaneous use of LTP and PNS is not prevented in the
                        syntax. If both LTP, and PNS are enabled on the same
                        scalefactor band, PNS takes precedence, and no prediction
@@ -196,11 +194,14 @@
                     */
                     ics_left->ltp.long_used[sfb] = 0;
                     ics_left->ltp2.long_used[sfb] = 0;
+#endif
 
+#ifdef MAIN_DEC
                     /* For scalefactor bands coded using PNS the corresponding
                        predictors are switched to "off".
                     */
                     ics_left->pred.prediction_used[sfb] = 0;
+#endif
 
                     offs = ics_left->swb_offset[sfb];
                     size = ics_left->swb_offset[sfb+1] - offs;
@@ -242,9 +243,13 @@
                                     spec_left[(group*nshort) + offs + c];
                             }
                         } else /*if (ics_left->ms_mask_present == 0)*/ {
+#ifdef LTP_DEC
                             ics_right->ltp.long_used[sfb] = 0;
                             ics_right->ltp2.long_used[sfb] = 0;
+#endif
+#ifdef MAIN_DEC
                             ics_right->pred.prediction_used[sfb] = 0;
+#endif
 
                             offs = ics_right->swb_offset[sfb];
                             size = ics_right->swb_offset[sfb+1] - offs;
--- a/libfaad2/pns.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/pns.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: pns.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: pns.h,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,8 +34,6 @@
 extern "C" {
 #endif
 
-#include "common.h"
-
 #include "syntax.h"
 
 #define NOISE_OFFSET 90
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaad2/ps_dec.c	Fri Sep 24 17:31:36 2004 +0000
@@ -0,0 +1,1986 @@
+/*
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR and PS decoding
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+**
+** 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.
+**
+** Any non-GPL usage of this software or parts of this software is strictly
+** forbidden.
+**
+** Commercial non-GPL licensing of this software is possible.
+** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
+**
+** Initially modified for use with MPlayer by Diego Biurrun on 2004/09/24
+** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+**/
+
+#include "common.h"
+
+#ifdef PS_DEC
+
+#include <stdlib.h>
+#include "ps_dec.h"
+#include "ps_tables.h"
+
+/* constants */
+#define NEGATE_IPD_MASK            (0x1000)
+#define DECAY_SLOPE                FRAC_CONST(0.05)
+#define COEF_SQRT2                 COEF_CONST(1.4142135623731)
+
+/* tables */
+/* filters are mirrored in coef 6, second half left out */
+static const real_t p8_13_20[7] =
+{
+    FRAC_CONST(0.00746082949812),
+    FRAC_CONST(0.02270420949825),
+    FRAC_CONST(0.04546865930473),
+    FRAC_CONST(0.07266113929591),
+    FRAC_CONST(0.09885108575264),
+    FRAC_CONST(0.11793710567217),
+    FRAC_CONST(0.125)
+};
+
+static const real_t p2_13_20[7] =
+{
+    FRAC_CONST(0.0),
+    FRAC_CONST(0.01899487526049),
+    FRAC_CONST(0.0),
+    FRAC_CONST(-0.07293139167538),
+    FRAC_CONST(0.0),
+    FRAC_CONST(0.30596630545168),
+    FRAC_CONST(0.5)
+};
+
+static const real_t p12_13_34[7] =
+{
+    FRAC_CONST(0.04081179924692),
+    FRAC_CONST(0.03812810994926),
+    FRAC_CONST(0.05144908135699),
+    FRAC_CONST(0.06399831151592),
+    FRAC_CONST(0.07428313801106),
+    FRAC_CONST(0.08100347892914),
+    FRAC_CONST(0.08333333333333)
+};
+
+static const real_t p8_13_34[7] =
+{
+    FRAC_CONST(0.01565675600122),
+    FRAC_CONST(0.03752716391991),
+    FRAC_CONST(0.05417891378782),
+    FRAC_CONST(0.08417044116767),
+    FRAC_CONST(0.10307344158036),
+    FRAC_CONST(0.12222452249753),
+    FRAC_CONST(0.125)
+};
+
+static const real_t p4_13_34[7] =
+{
+    FRAC_CONST(-0.05908211155639),
+    FRAC_CONST(-0.04871498374946),
+    FRAC_CONST(0.0),
+    FRAC_CONST(0.07778723915851),
+    FRAC_CONST(0.16486303567403),
+    FRAC_CONST(0.23279856662996),
+    FRAC_CONST(0.25)
+};
+
+#ifdef PARAM_32KHZ
+static const uint8_t delay_length_d[2][NO_ALLPASS_LINKS] = {
+    { 1, 2, 3 } /* d_24kHz */,
+    { 3, 4, 5 } /* d_48kHz */
+};
+#else
+static const uint8_t delay_length_d[NO_ALLPASS_LINKS] = {
+    3, 4, 5 /* d_48kHz */
+};
+#endif
+static const real_t filter_a[NO_ALLPASS_LINKS] = { /* a(m) = exp(-d_48kHz(m)/7) */
+    FRAC_CONST(0.65143905753106),
+    FRAC_CONST(0.56471812200776),
+    FRAC_CONST(0.48954165955695)
+};
+
+static const uint8_t group_border20[10+12 + 1] =
+{
+    6, 7, 0, 1, 2, 3, /* 6 subqmf subbands */
+    9, 8,             /* 2 subqmf subbands */
+    10, 11,           /* 2 subqmf subbands */
+    3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64
+};
+
+static const uint8_t group_border34[32+18 + 1] =
+{
+     0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, /* 12 subqmf subbands */
+     12, 13, 14, 15, 16, 17, 18, 19,                 /*  8 subqmf subbands */
+     20, 21, 22, 23,                                 /*  4 subqmf subbands */
+     24, 25, 26, 27,                                 /*  4 subqmf subbands */
+     28, 29, 30, 31,                                 /*  4 subqmf subbands */
+     32-27, 33-27, 34-27, 35-27, 36-27, 37-27, 38-27, 40-27, 42-27, 44-27, 46-27, 48-27, 51-27, 54-27, 57-27, 60-27, 64-27, 68-27, 91-27
+};
+
+static const uint16_t map_group2bk20[10+12] =
+{
+    (NEGATE_IPD_MASK | 1), (NEGATE_IPD_MASK | 0),
+    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
+};
+
+static const uint16_t map_group2bk34[32+18] =
+{
+    0,  1,  2,  3,  4,  5,  6,  6,  7, (NEGATE_IPD_MASK | 2), (NEGATE_IPD_MASK | 1), (NEGATE_IPD_MASK | 0),
+    10, 10, 4,  5,  6,  7,  8,  9,
+    10, 11, 12, 9,
+    14, 11, 12, 13,
+    14, 15, 16, 13,
+    16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33
+};
+
+/* type definitions */
+typedef struct
+{
+    uint8_t frame_len;
+    uint8_t resolution20[3];
+    uint8_t resolution34[5];
+
+    qmf_t *work;
+    qmf_t **buffer;
+    qmf_t **temp;
+} hyb_info;
+
+/* static function declarations */
+static void ps_data_decode(ps_info *ps);
+static hyb_info *hybrid_init();
+static void channel_filter2(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
+                            qmf_t *buffer, qmf_t **X_hybrid);
+static void INLINE DCT3_4_unscaled(real_t *y, real_t *x);
+static void channel_filter8(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
+                            qmf_t *buffer, qmf_t **X_hybrid);
+static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
+                            uint8_t use34);
+static void hybrid_synthesis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
+                             uint8_t use34);
+static int8_t delta_clip(int8_t i, int8_t min, int8_t max);
+static void delta_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
+                         uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
+                         int8_t min_index, int8_t max_index);
+static void delta_modulo_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
+                                uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
+                                int8_t log2modulo);
+static void map20indexto34(int8_t *index, uint8_t bins);
+#ifdef PS_LOW_POWER
+static void map34indexto20(int8_t *index, uint8_t bins);
+#endif
+static void ps_data_decode(ps_info *ps);
+static void ps_decorrelate(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
+                           qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]);
+static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
+                         qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32]);
+
+/*  */
+
+
+static hyb_info *hybrid_init()
+{
+    uint8_t i;
+
+    hyb_info *hyb = (hyb_info*)faad_malloc(sizeof(hyb_info));
+
+    hyb->resolution34[0] = 12;
+    hyb->resolution34[1] = 8;
+    hyb->resolution34[2] = 4;
+    hyb->resolution34[3] = 4;
+    hyb->resolution34[4] = 4;
+
+    hyb->resolution20[0] = 8;
+    hyb->resolution20[1] = 2;
+    hyb->resolution20[2] = 2;
+
+    hyb->frame_len = 32;
+
+    hyb->work = (qmf_t*)faad_malloc((hyb->frame_len+12) * sizeof(qmf_t));
+    memset(hyb->work, 0, (hyb->frame_len+12) * sizeof(qmf_t));
+
+    hyb->buffer = (qmf_t**)faad_malloc(5 * sizeof(qmf_t*));
+    for (i = 0; i < 5; i++)
+    {
+        hyb->buffer[i] = (qmf_t*)faad_malloc(hyb->frame_len * sizeof(qmf_t));
+        memset(hyb->buffer[i], 0, hyb->frame_len * sizeof(qmf_t));
+    }
+
+    hyb->temp = (qmf_t**)faad_malloc(hyb->frame_len * sizeof(qmf_t*));
+    for (i = 0; i < hyb->frame_len; i++)
+    {
+        hyb->temp[i] = (qmf_t*)faad_malloc(12 /*max*/ * sizeof(qmf_t));
+    }
+
+    return hyb;
+}
+
+static void hybrid_free(hyb_info *hyb)
+{
+    uint8_t i;
+
+    if (hyb->work)
+        faad_free(hyb->work);
+
+    for (i = 0; i < 5; i++)
+    {
+        if (hyb->buffer[i])
+            faad_free(hyb->buffer[i]);
+    }
+    if (hyb->buffer)
+        faad_free(hyb->buffer);
+
+    for (i = 0; i < hyb->frame_len; i++)
+    {
+        if (hyb->temp[i])
+            faad_free(hyb->temp[i]);
+    }
+    if (hyb->temp)
+        faad_free(hyb->temp);
+}
+
+/* real filter, size 2 */
+static void channel_filter2(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
+                            qmf_t *buffer, qmf_t **X_hybrid)
+{
+    uint8_t i;
+
+    for (i = 0; i < frame_len; i++)
+    {
+        real_t r0 = MUL_F(filter[0],(QMF_RE(buffer[0+i]) + QMF_RE(buffer[12+i])));
+        real_t r1 = MUL_F(filter[1],(QMF_RE(buffer[1+i]) + QMF_RE(buffer[11+i])));
+        real_t r2 = MUL_F(filter[2],(QMF_RE(buffer[2+i]) + QMF_RE(buffer[10+i])));
+        real_t r3 = MUL_F(filter[3],(QMF_RE(buffer[3+i]) + QMF_RE(buffer[9+i])));
+        real_t r4 = MUL_F(filter[4],(QMF_RE(buffer[4+i]) + QMF_RE(buffer[8+i])));
+        real_t r5 = MUL_F(filter[5],(QMF_RE(buffer[5+i]) + QMF_RE(buffer[7+i])));
+        real_t r6 = MUL_F(filter[6],QMF_RE(buffer[6+i]));
+        real_t i0 = MUL_F(filter[0],(QMF_IM(buffer[0+i]) + QMF_IM(buffer[12+i])));
+        real_t i1 = MUL_F(filter[1],(QMF_IM(buffer[1+i]) + QMF_IM(buffer[11+i])));
+        real_t i2 = MUL_F(filter[2],(QMF_IM(buffer[2+i]) + QMF_IM(buffer[10+i])));
+        real_t i3 = MUL_F(filter[3],(QMF_IM(buffer[3+i]) + QMF_IM(buffer[9+i])));
+        real_t i4 = MUL_F(filter[4],(QMF_IM(buffer[4+i]) + QMF_IM(buffer[8+i])));
+        real_t i5 = MUL_F(filter[5],(QMF_IM(buffer[5+i]) + QMF_IM(buffer[7+i])));
+        real_t i6 = MUL_F(filter[6],QMF_IM(buffer[6+i]));
+
+        /* q = 0 */
+        QMF_RE(X_hybrid[i][0]) = r0 + r1 + r2 + r3 + r4 + r5 + r6;
+        QMF_IM(X_hybrid[i][0]) = i0 + i1 + i2 + i3 + i4 + i5 + i6;
+
+        /* q = 1 */
+        QMF_RE(X_hybrid[i][1]) = r0 - r1 + r2 - r3 + r4 - r5 + r6;
+        QMF_IM(X_hybrid[i][1]) = i0 - i1 + i2 - i3 + i4 - i5 + i6;
+    }
+}
+
+/* complex filter, size 4 */
+static void channel_filter4(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
+                            qmf_t *buffer, qmf_t **X_hybrid)
+{
+    uint8_t i;
+    real_t input_re1[2], input_re2[2], input_im1[2], input_im2[2];
+
+    for (i = 0; i < frame_len; i++)
+    {
+        input_re1[0] = -MUL_F(filter[2], (QMF_RE(buffer[i+2]) + QMF_RE(buffer[i+10]))) +
+            MUL_F(filter[6], QMF_RE(buffer[i+6]));
+        input_re1[1] = MUL_F(FRAC_CONST(-0.70710678118655),
+            (MUL_F(filter[1], (QMF_RE(buffer[i+1]) + QMF_RE(buffer[i+11]))) +
+            MUL_F(filter[3], (QMF_RE(buffer[i+3]) + QMF_RE(buffer[i+9]))) -
+            MUL_F(filter[5], (QMF_RE(buffer[i+5]) + QMF_RE(buffer[i+7])))));
+
+        input_im1[0] = MUL_F(filter[0], (QMF_IM(buffer[i+0]) - QMF_IM(buffer[i+12]))) -
+            MUL_F(filter[4], (QMF_IM(buffer[i+4]) - QMF_IM(buffer[i+8])));
+        input_im1[1] = MUL_F(FRAC_CONST(0.70710678118655),
+            (MUL_F(filter[1], (QMF_IM(buffer[i+1]) - QMF_IM(buffer[i+11]))) -
+            MUL_F(filter[3], (QMF_IM(buffer[i+3]) - QMF_IM(buffer[i+9]))) -
+            MUL_F(filter[5], (QMF_IM(buffer[i+5]) - QMF_IM(buffer[i+7])))));
+
+        input_re2[0] = MUL_F(filter[0], (QMF_RE(buffer[i+0]) - QMF_RE(buffer[i+12]))) -
+            MUL_F(filter[4], (QMF_RE(buffer[i+4]) - QMF_RE(buffer[i+8])));
+        input_re2[1] = MUL_F(FRAC_CONST(0.70710678118655),
+            (MUL_F(filter[1], (QMF_RE(buffer[i+1]) - QMF_RE(buffer[i+11]))) -
+            MUL_F(filter[3], (QMF_RE(buffer[i+3]) - QMF_RE(buffer[i+9]))) -
+            MUL_F(filter[5], (QMF_RE(buffer[i+5]) - QMF_RE(buffer[i+7])))));
+
+        input_im2[0] = -MUL_F(filter[2], (QMF_IM(buffer[i+2]) + QMF_IM(buffer[i+10]))) +
+            MUL_F(filter[6], QMF_IM(buffer[i+6]));
+        input_im2[1] = MUL_F(FRAC_CONST(-0.70710678118655),
+            (MUL_F(filter[1], (QMF_IM(buffer[i+1]) + QMF_IM(buffer[i+11]))) +
+            MUL_F(filter[3], (QMF_IM(buffer[i+3]) + QMF_IM(buffer[i+9]))) -
+            MUL_F(filter[5], (QMF_IM(buffer[i+5]) + QMF_IM(buffer[i+7])))));
+
+        /* q == 0 */
+        QMF_RE(X_hybrid[i][0]) =  input_re1[0] + input_re1[1] + input_im1[0] + input_im1[1];
+        QMF_IM(X_hybrid[i][0]) = -input_re2[0] - input_re2[1] + input_im2[0] + input_im2[1];
+
+        /* q == 1 */
+        QMF_RE(X_hybrid[i][1]) =  input_re1[0] - input_re1[1] - input_im1[0] + input_im1[1];
+        QMF_IM(X_hybrid[i][1]) =  input_re2[0] - input_re2[1] + input_im2[0] - input_im2[1];
+
+        /* q == 2 */
+        QMF_RE(X_hybrid[i][2]) =  input_re1[0] - input_re1[1] + input_im1[0] - input_im1[1];
+        QMF_IM(X_hybrid[i][2]) = -input_re2[0] + input_re2[1] + input_im2[0] - input_im2[1];
+
+        /* q == 3 */
+        QMF_RE(X_hybrid[i][3]) =  input_re1[0] + input_re1[1] - input_im1[0] - input_im1[1];
+        QMF_IM(X_hybrid[i][3]) =  input_re2[0] + input_re2[1] + input_im2[0] + input_im2[1];
+    }
+}
+
+static void INLINE DCT3_4_unscaled(real_t *y, real_t *x)
+{
+    real_t f0, f1, f2, f3, f4, f5, f6, f7, f8;
+
+    f0 = MUL_F(x[2], FRAC_CONST(0.7071067811865476));
+    f1 = x[0] - f0;
+    f2 = x[0] + f0;
+    f3 = x[1] + x[3];
+    f4 = MUL_C(x[1], COEF_CONST(1.3065629648763766));
+    f5 = MUL_F(f3, FRAC_CONST(-0.9238795325112866));
+    f6 = MUL_F(x[3], FRAC_CONST(-0.5411961001461967));
+    f7 = f4 + f5;
+    f8 = f6 - f5;
+    y[3] = f2 - f8;
+    y[0] = f2 + f8;
+    y[2] = f1 - f7;
+    y[1] = f1 + f7;
+}
+
+/* complex filter, size 8 */
+static void channel_filter8(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
+                            qmf_t *buffer, qmf_t **X_hybrid)
+{
+    uint8_t i, n;
+    real_t input_re1[4], input_re2[4], input_im1[4], input_im2[4];
+    real_t x[4];
+
+    for (i = 0; i < frame_len; i++)
+    {
+        input_re1[0] =  MUL_F(filter[6],QMF_RE(buffer[6+i]));
+        input_re1[1] =  MUL_F(filter[5],(QMF_RE(buffer[5+i]) + QMF_RE(buffer[7+i])));
+        input_re1[2] = -MUL_F(filter[0],(QMF_RE(buffer[0+i]) + QMF_RE(buffer[12+i]))) + MUL_F(filter[4],(QMF_RE(buffer[4+i]) + QMF_RE(buffer[8+i])));
+        input_re1[3] = -MUL_F(filter[1],(QMF_RE(buffer[1+i]) + QMF_RE(buffer[11+i]))) + MUL_F(filter[3],(QMF_RE(buffer[3+i]) + QMF_RE(buffer[9+i])));
+
+        input_im1[0] = MUL_F(filter[5],(QMF_IM(buffer[7+i]) - QMF_IM(buffer[5+i])));
+        input_im1[1] = MUL_F(filter[0],(QMF_IM(buffer[12+i]) - QMF_IM(buffer[0+i]))) + MUL_F(filter[4],(QMF_IM(buffer[8+i]) - QMF_IM(buffer[4+i])));
+        input_im1[2] = MUL_F(filter[1],(QMF_IM(buffer[11+i]) - QMF_IM(buffer[1+i]))) + MUL_F(filter[3],(QMF_IM(buffer[9+i]) - QMF_IM(buffer[3+i])));
+        input_im1[3] = MUL_F(filter[2],(QMF_IM(buffer[10+i]) - QMF_IM(buffer[2+i])));
+
+        for (n = 0; n < 4; n++)
+        {
+            x[n] = input_re1[n] - input_im1[3-n];
+        }
+        DCT3_4_unscaled(x, x);
+        QMF_RE(X_hybrid[i][7]) = x[0];
+        QMF_RE(X_hybrid[i][5]) = x[2];
+        QMF_RE(X_hybrid[i][3]) = x[3];
+        QMF_RE(X_hybrid[i][1]) = x[1];
+
+        for (n = 0; n < 4; n++)
+        {
+            x[n] = input_re1[n] + input_im1[3-n];
+        }
+        DCT3_4_unscaled(x, x);
+        QMF_RE(X_hybrid[i][6]) = x[1];
+        QMF_RE(X_hybrid[i][4]) = x[3];
+        QMF_RE(X_hybrid[i][2]) = x[2];
+        QMF_RE(X_hybrid[i][0]) = x[0];
+
+        input_im2[0] =  MUL_F(filter[6],QMF_IM(buffer[6+i]));
+        input_im2[1] =  MUL_F(filter[5],(QMF_IM(buffer[5+i]) + QMF_IM(buffer[7+i])));
+        input_im2[2] = -MUL_F(filter[0],(QMF_IM(buffer[0+i]) + QMF_IM(buffer[12+i]))) + MUL_F(filter[4],(QMF_IM(buffer[4+i]) + QMF_IM(buffer[8+i])));
+        input_im2[3] = -MUL_F(filter[1],(QMF_IM(buffer[1+i]) + QMF_IM(buffer[11+i]))) + MUL_F(filter[3],(QMF_IM(buffer[3+i]) + QMF_IM(buffer[9+i])));
+
+        input_re2[0] = MUL_F(filter[5],(QMF_RE(buffer[7+i]) - QMF_RE(buffer[5+i])));
+        input_re2[1] = MUL_F(filter[0],(QMF_RE(buffer[12+i]) - QMF_RE(buffer[0+i]))) + MUL_F(filter[4],(QMF_RE(buffer[8+i]) - QMF_RE(buffer[4+i])));
+        input_re2[2] = MUL_F(filter[1],(QMF_RE(buffer[11+i]) - QMF_RE(buffer[1+i]))) + MUL_F(filter[3],(QMF_RE(buffer[9+i]) - QMF_RE(buffer[3+i])));
+        input_re2[3] = MUL_F(filter[2],(QMF_RE(buffer[10+i]) - QMF_RE(buffer[2+i])));
+
+        for (n = 0; n < 4; n++)
+        {
+            x[n] = input_im2[n] + input_re2[3-n];
+        }
+        DCT3_4_unscaled(x, x);
+        QMF_IM(X_hybrid[i][7]) = x[0];
+        QMF_IM(X_hybrid[i][5]) = x[2];
+        QMF_IM(X_hybrid[i][3]) = x[3];
+        QMF_IM(X_hybrid[i][1]) = x[1];
+
+        for (n = 0; n < 4; n++)
+        {
+            x[n] = input_im2[n] - input_re2[3-n];
+        }
+        DCT3_4_unscaled(x, x);
+        QMF_IM(X_hybrid[i][6]) = x[1];
+        QMF_IM(X_hybrid[i][4]) = x[3];
+        QMF_IM(X_hybrid[i][2]) = x[2];
+        QMF_IM(X_hybrid[i][0]) = x[0];
+    }
+}
+
+static void INLINE DCT3_6_unscaled(real_t *y, real_t *x)
+{
+    real_t f0, f1, f2, f3, f4, f5, f6, f7;
+
+    f0 = MUL_F(x[3], FRAC_CONST(0.70710678118655));
+    f1 = x[0] + f0;
+    f2 = x[0] - f0;
+    f3 = MUL_F((x[1] - x[5]), FRAC_CONST(0.70710678118655));
+    f4 = MUL_F(x[2], FRAC_CONST(0.86602540378444)) + MUL_F(x[4], FRAC_CONST(0.5));
+    f5 = f4 - x[4];
+    f6 = MUL_F(x[1], FRAC_CONST(0.96592582628907)) + MUL_F(x[5], FRAC_CONST(0.25881904510252));
+    f7 = f6 - f3;
+    y[0] = f1 + f6 + f4;
+    y[1] = f2 + f3 - x[4];
+    y[2] = f7 + f2 - f5;
+    y[3] = f1 - f7 - f5;
+    y[4] = f1 - f3 - x[4];
+    y[5] = f2 - f6 + f4;
+}
+
+/* complex filter, size 12 */
+static void channel_filter12(hyb_info *hyb, uint8_t frame_len, const real_t *filter,
+                             qmf_t *buffer, qmf_t **X_hybrid)
+{
+    uint8_t i, n;
+    real_t input_re1[6], input_re2[6], input_im1[6], input_im2[6];
+    real_t out_re1[6], out_re2[6], out_im1[6], out_im2[6];
+
+    for (i = 0; i < frame_len; i++)
+    {
+        for (n = 0; n < 6; n++)
+        {
+            if (n == 0)
+            {
+                input_re1[0] = MUL_F(QMF_RE(buffer[6+i]), filter[6]);
+                input_re2[0] = MUL_F(QMF_IM(buffer[6+i]), filter[6]);
+            } else {
+                input_re1[6-n] = MUL_F((QMF_RE(buffer[n+i]) + QMF_RE(buffer[12-n+i])), filter[n]);
+                input_re2[6-n] = MUL_F((QMF_IM(buffer[n+i]) + QMF_IM(buffer[12-n+i])), filter[n]);
+            }
+            input_im2[n] = MUL_F((QMF_RE(buffer[n+i]) - QMF_RE(buffer[12-n+i])), filter[n]);
+            input_im1[n] = MUL_F((QMF_IM(buffer[n+i]) - QMF_IM(buffer[12-n+i])), filter[n]);
+        }
+
+        DCT3_6_unscaled(out_re1, input_re1);
+        DCT3_6_unscaled(out_re2, input_re2);
+
+        DCT3_6_unscaled(out_im1, input_im1);
+        DCT3_6_unscaled(out_im2, input_im2);
+
+        for (n = 0; n < 6; n += 2)
+        {
+            QMF_RE(X_hybrid[i][n]) = out_re1[n] - out_im1[n];
+            QMF_IM(X_hybrid[i][n]) = out_re2[n] + out_im2[n];
+            QMF_RE(X_hybrid[i][n+1]) = out_re1[n+1] + out_im1[n+1];
+            QMF_IM(X_hybrid[i][n+1]) = out_re2[n+1] - out_im2[n+1];
+
+            QMF_RE(X_hybrid[i][10-n]) = out_re1[n+1] - out_im1[n+1];
+            QMF_IM(X_hybrid[i][10-n]) = out_re2[n+1] + out_im2[n+1];
+            QMF_RE(X_hybrid[i][11-n]) = out_re1[n] + out_im1[n];
+            QMF_IM(X_hybrid[i][11-n]) = out_re2[n] - out_im2[n];
+        }
+    }
+}
+
+/* Hybrid analysis: further split up QMF subbands
+ * to improve frequency resolution
+ */
+static void hybrid_analysis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
+                            uint8_t use34)
+{
+    uint8_t k, n, band;
+    uint8_t offset = 0;
+    uint8_t qmf_bands = (use34) ? 5 : 3;
+    uint8_t *resolution = (use34) ? hyb->resolution34 : hyb->resolution20;
+
+    for (band = 0; band < qmf_bands; band++)
+    {
+        /* build working buffer */
+        memcpy(hyb->work, hyb->buffer[band], 12 * sizeof(qmf_t));
+
+        /* add new samples */
+        for (n = 0; n < hyb->frame_len; n++)
+        {
+            QMF_RE(hyb->work[12 + n]) = QMF_RE(X[n + 6 /*delay*/][band]);
+            QMF_IM(hyb->work[12 + n]) = QMF_IM(X[n + 6 /*delay*/][band]);
+        }
+
+        /* store samples */
+        memcpy(hyb->buffer[band], hyb->work + hyb->frame_len, 12 * sizeof(qmf_t));
+
+
+        switch(resolution[band])
+        {
+        case 2:
+            /* Type B real filter, Q[p] = 2 */
+            channel_filter2(hyb, hyb->frame_len, p2_13_20, hyb->work, hyb->temp);
+            break;
+        case 4:
+            /* Type A complex filter, Q[p] = 4 */
+            channel_filter4(hyb, hyb->frame_len, p4_13_34, hyb->work, hyb->temp);
+            break;
+        case 8:
+            /* Type A complex filter, Q[p] = 8 */
+            channel_filter8(hyb, hyb->frame_len, (use34) ? p8_13_34 : p8_13_20,
+                hyb->work, hyb->temp);
+            break;
+        case 12:
+            /* Type A complex filter, Q[p] = 12 */
+            channel_filter12(hyb, hyb->frame_len, p12_13_34, hyb->work, hyb->temp);
+            break;
+        }
+
+        for (n = 0; n < hyb->frame_len; n++)
+        {
+            for (k = 0; k < resolution[band]; k++)
+            {
+                QMF_RE(X_hybrid[n][offset + k]) = QMF_RE(hyb->temp[n][k]);
+                QMF_IM(X_hybrid[n][offset + k]) = QMF_IM(hyb->temp[n][k]);
+            }
+        }
+        offset += resolution[band];
+    }
+
+    /* group hybrid channels */
+    if (!use34)
+    {
+        for (n = 0; n < 32 /*30?*/; n++)
+        {
+            QMF_RE(X_hybrid[n][3]) += QMF_RE(X_hybrid[n][4]);
+            QMF_IM(X_hybrid[n][3]) += QMF_IM(X_hybrid[n][4]);
+            QMF_RE(X_hybrid[n][4]) = 0;
+            QMF_IM(X_hybrid[n][4]) = 0;
+
+            QMF_RE(X_hybrid[n][2]) += QMF_RE(X_hybrid[n][5]);
+            QMF_IM(X_hybrid[n][2]) += QMF_IM(X_hybrid[n][5]);
+            QMF_RE(X_hybrid[n][5]) = 0;
+            QMF_IM(X_hybrid[n][5]) = 0;
+        }
+    }
+}
+
+static void hybrid_synthesis(hyb_info *hyb, qmf_t X[32][64], qmf_t X_hybrid[32][32],
+                             uint8_t use34)
+{
+    uint8_t k, n, band;
+    uint8_t offset = 0;
+    uint8_t qmf_bands = (use34) ? 5 : 3;
+    uint8_t *resolution = (use34) ? hyb->resolution34 : hyb->resolution20;
+
+    for(band = 0; band < qmf_bands; band++)
+    {
+        for (n = 0; n < hyb->frame_len; n++)
+        {
+            QMF_RE(X[n][band]) = 0;
+            QMF_IM(X[n][band]) = 0;
+
+            for (k = 0; k < resolution[band]; k++)
+            {
+                QMF_RE(X[n][band]) += QMF_RE(X_hybrid[n][offset + k]);
+                QMF_IM(X[n][band]) += QMF_IM(X_hybrid[n][offset + k]);
+            }
+        }
+        offset += resolution[band];
+    }
+}
+
+/* limits the value i to the range [min,max] */
+static int8_t delta_clip(int8_t i, int8_t min, int8_t max)
+{
+    if (i < min)
+        return min;
+    else if (i > max)
+        return max;
+    else
+        return i;
+}
+
+//int iid = 0;
+
+/* delta decode array */
+static void delta_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
+                         uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
+                         int8_t min_index, int8_t max_index)
+{
+    int8_t i;
+
+    if (enable == 1)
+    {
+        if (dt_flag == 0)
+        {
+            /* delta coded in frequency direction */
+            index[0] = 0 + index[0];
+            index[0] = delta_clip(index[0], min_index, max_index);
+
+            for (i = 1; i < nr_par; i++)
+            {
+                index[i] = index[i-1] + index[i];
+                index[i] = delta_clip(index[i], min_index, max_index);
+            }
+        } else {
+            /* delta coded in time direction */
+            for (i = 0; i < nr_par; i++)
+            {
+                //int8_t tmp2;
+                //int8_t tmp = index[i];
+
+                //printf("%d %d\n", index_prev[i*stride], index[i]);
+                //printf("%d\n", index[i]);
+
+                index[i] = index_prev[i*stride] + index[i];
+                //tmp2 = index[i];
+                index[i] = delta_clip(index[i], min_index, max_index);
+
+                //if (iid)
+                //{
+                //    if (index[i] == 7)
+                //    {
+                //        printf("%d %d %d\n", index_prev[i*stride], tmp, tmp2);
+                //    }
+                //}
+            }
+        }
+    } else {
+        /* set indices to zero */
+        for (i = 0; i < nr_par; i++)
+        {
+            index[i] = 0;
+        }
+    }
+
+    /* coarse */
+    if (stride == 2)
+    {
+        for (i = (nr_par<<1)-1; i > 0; i--)
+        {
+            index[i] = index[i>>1];
+        }
+    }
+}
+
+/* delta modulo decode array */
+/* in: log2 value of the modulo value to allow using AND instead of MOD */
+static void delta_modulo_decode(uint8_t enable, int8_t *index, int8_t *index_prev,
+                                uint8_t dt_flag, uint8_t nr_par, uint8_t stride,
+                                int8_t log2modulo)
+{
+    int8_t i;
+
+    if (enable == 1)
+    {
+        if (dt_flag == 0)
+        {
+            /* delta coded in frequency direction */
+            index[0] = 0 + index[0];
+            index[0] &= log2modulo;
+
+            for (i = 1; i < nr_par; i++)
+            {
+                index[i] = index[i-1] + index[i];
+                index[i] &= log2modulo;
+            }
+        } else {
+            /* delta coded in time direction */
+            for (i = 0; i < nr_par; i++)
+            {
+                index[i] = index_prev[i*stride] + index[i];
+                index[i] &= log2modulo;
+            }
+        }
+    } else {
+        /* set indices to zero */
+        for (i = 0; i < nr_par; i++)
+        {
+            index[i] = 0;
+        }
+    }
+
+    /* coarse */
+    if (stride == 2)
+    {
+        index[0] = 0;
+        for (i = (nr_par<<1)-1; i > 0; i--)
+        {
+            index[i] = index[i>>1];
+        }
+    }
+}
+
+#ifdef PS_LOW_POWER
+static void map34indexto20(int8_t *index, uint8_t bins)
+{
+    index[0] = (2*index[0]+index[1])/3;
+    index[1] = (index[1]+2*index[2])/3;
+    index[2] = (2*index[3]+index[4])/3;
+    index[3] = (index[4]+2*index[5])/3;
+    index[4] = (index[6]+index[7])/2;
+    index[5] = (index[8]+index[9])/2;
+    index[6] = index[10];
+    index[7] = index[11];
+    index[8] = (index[12]+index[13])/2;
+    index[9] = (index[14]+index[15])/2;
+    index[10] = index[16];
+
+    if (bins == 34)
+    {
+        index[11] = index[17];
+        index[12] = index[18];
+        index[13] = index[19];
+        index[14] = (index[20]+index[21])/2;
+        index[15] = (index[22]+index[23])/2;
+        index[16] = (index[24]+index[25])/2;
+        index[17] = (index[26]+index[27])/2;
+        index[18] = (index[28]+index[29]+index[30]+index[31])/4;
+        index[19] = (index[32]+index[33])/2;
+    }
+}
+#endif
+
+static void map20indexto34(int8_t *index, uint8_t bins)
+{
+    index[0] = index[0];
+    index[1] = (index[0] + index[1])/2;
+    index[2] = index[1];
+    index[3] = index[2];
+    index[4] = (index[2] + index[3])/2;
+    index[5] = index[3];
+    index[6] = index[4];
+    index[7] = index[4];
+    index[8] = index[5];
+    index[9] = index[5];
+    index[10] = index[6];
+    index[11] = index[7];
+    index[12] = index[8];
+    index[13] = index[8];
+    index[14] = index[9];
+    index[15] = index[9];
+    index[16] = index[10];
+
+    if (bins == 34)
+    {
+        index[17] = index[11];
+        index[18] = index[12];
+        index[19] = index[13];
+        index[20] = index[14];
+        index[21] = index[14];
+        index[22] = index[15];
+        index[23] = index[15];
+        index[24] = index[16];
+        index[25] = index[16];
+        index[26] = index[17];
+        index[27] = index[17];
+        index[28] = index[18];
+        index[29] = index[18];
+        index[30] = index[18];
+        index[31] = index[18];
+        index[32] = index[19];
+        index[33] = index[19];
+    }
+}
+
+/* parse the bitstream data decoded in ps_data() */
+static void ps_data_decode(ps_info *ps)
+{
+    uint8_t env, bin;
+
+    /* ps data not available, use data from previous frame */
+    if (ps->ps_data_available == 0)
+    {
+        ps->num_env = 0;
+    }
+
+    for (env = 0; env < ps->num_env; env++)
+    {
+        int8_t *iid_index_prev;
+        int8_t *icc_index_prev;
+        int8_t *ipd_index_prev;
+        int8_t *opd_index_prev;
+
+        int8_t num_iid_steps = (ps->iid_mode < 3) ? 7 : 15 /*fine quant*/;
+
+        if (env == 0)
+        {
+            /* take last envelope from previous frame */
+            iid_index_prev = ps->iid_index_prev;
+            icc_index_prev = ps->icc_index_prev;
+            ipd_index_prev = ps->ipd_index_prev;
+            opd_index_prev = ps->opd_index_prev;
+        } else {
+            /* take index values from previous envelope */
+            iid_index_prev = ps->iid_index[env - 1];
+            icc_index_prev = ps->icc_index[env - 1];
+            ipd_index_prev = ps->ipd_index[env - 1];
+            opd_index_prev = ps->opd_index[env - 1];
+        }
+
+//        iid = 1;
+        /* delta decode iid parameters */
+        delta_decode(ps->enable_iid, ps->iid_index[env], iid_index_prev,
+            ps->iid_dt[env], ps->nr_iid_par,
+            (ps->iid_mode == 0 || ps->iid_mode == 3) ? 2 : 1,
+            -num_iid_steps, num_iid_steps);
+//        iid = 0;
+
+        /* delta decode icc parameters */
+        delta_decode(ps->enable_icc, ps->icc_index[env], icc_index_prev,
+            ps->icc_dt[env], ps->nr_icc_par,
+            (ps->icc_mode == 0 || ps->icc_mode == 3) ? 2 : 1,
+            0, 7);
+
+        /* delta modulo decode ipd parameters */
+        delta_modulo_decode(ps->enable_ipdopd, ps->ipd_index[env], ipd_index_prev,
+            ps->ipd_dt[env], ps->nr_ipdopd_par, 1, /*log2(8)*/ 3);
+
+        /* delta modulo decode opd parameters */
+        delta_modulo_decode(ps->enable_ipdopd, ps->opd_index[env], opd_index_prev,
+            ps->opd_dt[env], ps->nr_ipdopd_par, 1, /*log2(8)*/ 3);
+    }
+
+    /* handle error case */
+    if (ps->num_env == 0)
+    {
+        /* force to 1 */
+        ps->num_env = 1;
+
+        if (ps->enable_iid)
+        {
+            for (bin = 0; bin < 34; bin++)
+                ps->iid_index[0][bin] = ps->iid_index_prev[bin];
+        } else {
+            for (bin = 0; bin < 34; bin++)
+                ps->iid_index[0][bin] = 0;
+        }
+
+        if (ps->enable_icc)
+        {
+            for (bin = 0; bin < 34; bin++)
+                ps->icc_index[0][bin] = ps->icc_index_prev[bin];
+        } else {
+            for (bin = 0; bin < 34; bin++)
+                ps->icc_index[0][bin] = 0;
+        }
+
+        if (ps->enable_ipdopd)
+        {
+            for (bin = 0; bin < 17; bin++)
+            {
+                ps->ipd_index[0][bin] = ps->ipd_index_prev[bin];
+                ps->opd_index[0][bin] = ps->opd_index_prev[bin];
+            }
+        } else {
+            for (bin = 0; bin < 17; bin++)
+            {
+                ps->ipd_index[0][bin] = 0;
+                ps->opd_index[0][bin] = 0;
+            }
+        }
+    }
+
+    /* update previous indices */
+    for (bin = 0; bin < 34; bin++)
+        ps->iid_index_prev[bin] = ps->iid_index[ps->num_env-1][bin];
+    for (bin = 0; bin < 34; bin++)
+        ps->icc_index_prev[bin] = ps->icc_index[ps->num_env-1][bin];
+    for (bin = 0; bin < 17; bin++)
+    {
+        ps->ipd_index_prev[bin] = ps->ipd_index[ps->num_env-1][bin];
+        ps->opd_index_prev[bin] = ps->opd_index[ps->num_env-1][bin];
+    }
+
+    ps->ps_data_available = 0;
+
+    if (ps->frame_class == 0)
+    {
+        ps->border_position[0] = 0;
+        for (env = 1; env < ps->num_env; env++)
+        {
+            ps->border_position[env] = (env * 32 /* 30 for 960? */) / ps->num_env;
+        }
+        ps->border_position[ps->num_env] = 32 /* 30 for 960? */;
+    } else {
+        ps->border_position[0] = 0;
+
+        if (ps->border_position[ps->num_env] < 32 /* 30 for 960? */)
+        {
+            ps->num_env++;
+            ps->border_position[ps->num_env] = 32 /* 30 for 960? */;
+            for (bin = 0; bin < 34; bin++)
+            {
+                ps->iid_index[ps->num_env][bin] = ps->iid_index[ps->num_env-1][bin];
+                ps->icc_index[ps->num_env][bin] = ps->icc_index[ps->num_env-1][bin];
+            }
+            for (bin = 0; bin < 17; bin++)
+            {
+                ps->ipd_index[ps->num_env][bin] = ps->ipd_index[ps->num_env-1][bin];
+                ps->opd_index[ps->num_env][bin] = ps->opd_index[ps->num_env-1][bin];
+            }
+        }
+
+        for (env = 1; env < ps->num_env; env++)
+        {
+            int8_t thr = 32 /* 30 for 960? */ - (ps->num_env - env);
+
+            if (ps->border_position[env] > thr)
+            {
+                ps->border_position[env] = thr;
+            } else {
+                thr = ps->border_position[env-1]+1;
+                if (ps->border_position[env] < thr)
+                {
+                    ps->border_position[env] = thr;
+                }
+            }
+        }
+    }
+
+    /* make sure that the indices of all parameters can be mapped
+     * to the same hybrid synthesis filterbank
+     */
+#ifdef PS_LOW_POWER
+    for (env = 0; env < ps->num_env; env++)
+    {
+        if (ps->iid_mode == 2 || ps->iid_mode == 5)
+            map34indexto20(ps->iid_index[env], 34);
+        if (ps->icc_mode == 2 || ps->icc_mode == 5)
+            map34indexto20(ps->icc_index[env], 34);
+
+        /* disable ipd/opd */
+        for (bin = 0; bin < 17; bin++)
+        {
+            ps->aaIpdIndex[env][bin] = 0;
+            ps->aaOpdIndex[env][bin] = 0;
+        }
+    }
+#else
+    if (ps->use34hybrid_bands)
+    {
+        for (env = 0; env < ps->num_env; env++)
+        {
+            if (ps->iid_mode != 2 && ps->iid_mode != 5)
+                map20indexto34(ps->iid_index[env], 34);
+            if (ps->icc_mode != 2 && ps->icc_mode != 5)
+                map20indexto34(ps->icc_index[env], 34);
+            if (ps->ipd_mode != 2 && ps->ipd_mode != 5)
+            {
+                map20indexto34(ps->ipd_index[env], 17);
+                map20indexto34(ps->opd_index[env], 17);
+            }
+        }
+    }
+#endif
+
+#if 0
+    for (env = 0; env < ps->num_env; env++)
+    {
+        printf("iid[env:%d]:", env);
+        for (bin = 0; bin < 34; bin++)
+        {
+            printf(" %d", ps->iid_index[env][bin]);
+        }
+        printf("\n");
+    }
+    for (env = 0; env < ps->num_env; env++)
+    {
+        printf("icc[env:%d]:", env);
+        for (bin = 0; bin < 34; bin++)
+        {
+            printf(" %d", ps->icc_index[env][bin]);
+        }
+        printf("\n");
+    }
+    for (env = 0; env < ps->num_env; env++)
+    {
+        printf("ipd[env:%d]:", env);
+        for (bin = 0; bin < 17; bin++)
+        {
+            printf(" %d", ps->ipd_index[env][bin]);
+        }
+        printf("\n");
+    }
+    for (env = 0; env < ps->num_env; env++)
+    {
+        printf("opd[env:%d]:", env);
+        for (bin = 0; bin < 17; bin++)
+        {
+            printf(" %d", ps->opd_index[env][bin]);
+        }
+        printf("\n");
+    }
+    printf("\n");
+#endif
+}
+
+/* decorrelate the mono signal using an allpass filter */
+static void ps_decorrelate(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
+                           qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32])
+{
+    uint8_t gr, n, m, bk;
+    uint8_t temp_delay;
+    uint8_t sb, maxsb;
+    const complex_t *Phi_Fract_SubQmf;
+    uint8_t temp_delay_ser[NO_ALLPASS_LINKS];
+    real_t P_SmoothPeakDecayDiffNrg, nrg;
+    real_t P[32][34];
+    real_t G_TransientRatio[32][34] = {{0}};
+    complex_t inputLeft;
+
+
+    /* chose hybrid filterbank: 20 or 34 band case */
+    if (ps->use34hybrid_bands)
+    {
+        Phi_Fract_SubQmf = Phi_Fract_SubQmf34;
+    } else{
+        Phi_Fract_SubQmf = Phi_Fract_SubQmf20;
+    }
+
+    /* clear the energy values */
+    for (n = 0; n < 32; n++)
+    {
+        for (bk = 0; bk < 34; bk++)
+        {
+            P[n][bk] = 0;
+        }
+    }
+
+    /* calculate the energy in each parameter band b(k) */
+    for (gr = 0; gr < ps->num_groups; gr++)
+    {
+        /* select the parameter index b(k) to which this group belongs */
+        bk = (~NEGATE_IPD_MASK) & ps->map_group2bk[gr];
+
+        /* select the upper subband border for this group */
+        maxsb = (gr < ps->num_hybrid_groups) ? ps->group_border[gr]+1 : ps->group_border[gr+1];
+
+        for (sb = ps->group_border[gr]; sb < maxsb; sb++)
+        {
+            for (n = ps->border_position[0]; n < ps->border_position[ps->num_env]; n++)
+            {
+#ifdef FIXED_POINT
+                uint32_t in_re, in_im;
+#endif
+
+                /* input from hybrid subbands or QMF subbands */
+                if (gr < ps->num_hybrid_groups)
+                {
+                    RE(inputLeft) = QMF_RE(X_hybrid_left[n][sb]);
+                    IM(inputLeft) = QMF_IM(X_hybrid_left[n][sb]);
+                } else {
+                    RE(inputLeft) = QMF_RE(X_left[n][sb]);
+                    IM(inputLeft) = QMF_IM(X_left[n][sb]);
+                }
+
+                /* accumulate energy */
+#ifdef FIXED_POINT
+                /* NOTE: all input is scaled by 2^(-5) because of fixed point QMF
+                 * meaning that P will be scaled by 2^(-10) compared to floating point version
+                 */
+                in_re = ((abs(RE(inputLeft))+(1<<(REAL_BITS-1)))>>REAL_BITS);
+                in_im = ((abs(IM(inputLeft))+(1<<(REAL_BITS-1)))>>REAL_BITS);
+                P[n][bk] += in_re*in_re + in_im*in_im;
+#else
+                P[n][bk] += MUL_R(RE(inputLeft),RE(inputLeft)) + MUL_R(IM(inputLeft),IM(inputLeft));
+#endif
+            }
+        }
+    }
+
+#if 0
+    for (n = 0; n < 32; n++)
+    {
+        for (bk = 0; bk < 34; bk++)
+        {
+#ifdef FIXED_POINT
+            printf("%d %d: %d\n", n, bk, P[n][bk] /*/(float)REAL_PRECISION*/);
+#else
+            printf("%d %d: %f\n", n, bk, P[n][bk]/1024.0);
+#endif
+        }
+    }
+#endif
+
+    /* calculate transient reduction ratio for each parameter band b(k) */
+    for (bk = 0; bk < ps->nr_par_bands; bk++)
+    {
+        for (n = ps->border_position[0]; n < ps->border_position[ps->num_env]; n++)
+        {
+            const real_t gamma = COEF_CONST(1.5);
+
+            ps->P_PeakDecayNrg[bk] = MUL_F(ps->P_PeakDecayNrg[bk], ps->alpha_decay);
+            if (ps->P_PeakDecayNrg[bk] < P[n][bk])
+                ps->P_PeakDecayNrg[bk] = P[n][bk];
+
+            /* apply smoothing filter to peak decay energy */
+            P_SmoothPeakDecayDiffNrg = ps->P_SmoothPeakDecayDiffNrg_prev[bk];
+            P_SmoothPeakDecayDiffNrg += MUL_F((ps->P_PeakDecayNrg[bk] - P[n][bk] - ps->P_SmoothPeakDecayDiffNrg_prev[bk]), ps->alpha_smooth);
+            ps->P_SmoothPeakDecayDiffNrg_prev[bk] = P_SmoothPeakDecayDiffNrg;
+
+            /* apply smoothing filter to energy */
+            nrg = ps->P_prev[bk];
+            nrg += MUL_F((P[n][bk] - ps->P_prev[bk]), ps->alpha_smooth);
+            ps->P_prev[bk] = nrg;
+
+            /* calculate transient ratio */
+            if (MUL_C(P_SmoothPeakDecayDiffNrg, gamma) <= nrg)
+            {
+                G_TransientRatio[n][bk] = REAL_CONST(1.0);
+            } else {
+                G_TransientRatio[n][bk] = DIV_R(nrg, (MUL_C(P_SmoothPeakDecayDiffNrg, gamma)));
+            }
+        }
+    }
+
+#if 0
+    for (n = 0; n < 32; n++)
+    {
+        for (bk = 0; bk < 34; bk++)
+        {
+#ifdef FIXED_POINT
+            printf("%d %d: %f\n", n, bk, G_TransientRatio[n][bk]/(float)REAL_PRECISION);
+#else
+            printf("%d %d: %f\n", n, bk, G_TransientRatio[n][bk]);
+#endif
+        }
+    }
+#endif
+
+    /* apply stereo decorrelation filter to the signal */
+    for (gr = 0; gr < ps->num_groups; gr++)
+    {
+        if (gr < ps->num_hybrid_groups)
+            maxsb = ps->group_border[gr] + 1;
+        else
+            maxsb = ps->group_border[gr + 1];
+
+        /* QMF channel */
+        for (sb = ps->group_border[gr]; sb < maxsb; sb++)
+        {
+            real_t g_DecaySlope;
+            real_t g_DecaySlope_filt[NO_ALLPASS_LINKS];
+
+            /* g_DecaySlope: [0..1] */
+            if (gr < ps->num_hybrid_groups || sb <= ps->decay_cutoff)
+            {
+                g_DecaySlope = FRAC_CONST(1.0);
+            } else {
+                int8_t decay = ps->decay_cutoff - sb;
+                if (decay <= -20 /* -1/DECAY_SLOPE */)
+                {
+                    g_DecaySlope = 0;
+                } else {
+                    /* decay(int)*decay_slope(frac) = g_DecaySlope(frac) */
+                    g_DecaySlope = FRAC_CONST(1.0) + DECAY_SLOPE * decay;
+                }
+            }
+
+            /* calculate g_DecaySlope_filt for every m multiplied by filter_a[m] */
+            for (m = 0; m < NO_ALLPASS_LINKS; m++)
+            {
+                g_DecaySlope_filt[m] = MUL_F(g_DecaySlope, filter_a[m]);
+            }
+
+
+            /* set delay indices */
+            temp_delay = ps->saved_delay;
+            for (n = 0; n < NO_ALLPASS_LINKS; n++)
+                temp_delay_ser[n] = ps->delay_buf_index_ser[n];
+
+            for (n = ps->border_position[0]; n < ps->border_position[ps->num_env]; n++)
+            {
+                complex_t tmp, tmp0, R0;
+
+                if (gr < ps->num_hybrid_groups)
+                {
+                    /* hybrid filterbank input */
+                    RE(inputLeft) = QMF_RE(X_hybrid_left[n][sb]);
+                    IM(inputLeft) = QMF_IM(X_hybrid_left[n][sb]);
+                } else {
+                    /* QMF filterbank input */
+                    RE(inputLeft) = QMF_RE(X_left[n][sb]);
+                    IM(inputLeft) = QMF_IM(X_left[n][sb]);
+                }
+
+                if (sb > ps->nr_allpass_bands && gr >= ps->num_hybrid_groups)
+                {
+                    /* delay */
+
+                    /* never hybrid subbands here, always QMF subbands */
+                    RE(tmp) = RE(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]);
+                    IM(tmp) = IM(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]);
+                    RE(R0) = RE(tmp);
+                    IM(R0) = IM(tmp);
+                    RE(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]) = RE(inputLeft);
+                    IM(ps->delay_Qmf[ps->delay_buf_index_delay[sb]][sb]) = IM(inputLeft);
+                } else {
+                    /* allpass filter */
+                    uint8_t m;
+                    complex_t Phi_Fract;
+
+                    /* fetch parameters */
+                    if (gr < ps->num_hybrid_groups)
+                    {
+                        /* select data from the hybrid subbands */
+                        RE(tmp0) = RE(ps->delay_SubQmf[temp_delay][sb]);
+                        IM(tmp0) = IM(ps->delay_SubQmf[temp_delay][sb]);
+
+                        RE(ps->delay_SubQmf[temp_delay][sb]) = RE(inputLeft);
+                        IM(ps->delay_SubQmf[temp_delay][sb]) = IM(inputLeft);
+
+                        RE(Phi_Fract) = RE(Phi_Fract_SubQmf[sb]);
+                        IM(Phi_Fract) = IM(Phi_Fract_SubQmf[sb]);
+                    } else {
+                        /* select data from the QMF subbands */
+                        RE(tmp0) = RE(ps->delay_Qmf[temp_delay][sb]);
+                        IM(tmp0) = IM(ps->delay_Qmf[temp_delay][sb]);
+
+                        RE(ps->delay_Qmf[temp_delay][sb]) = RE(inputLeft);
+                        IM(ps->delay_Qmf[temp_delay][sb]) = IM(inputLeft);
+
+                        RE(Phi_Fract) = RE(Phi_Fract_Qmf[sb]);
+                        IM(Phi_Fract) = IM(Phi_Fract_Qmf[sb]);
+                    }
+
+                    /* z^(-2) * Phi_Fract[k] */
+                    ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(Phi_Fract), IM(Phi_Fract));
+
+                    RE(R0) = RE(tmp);
+                    IM(R0) = IM(tmp);
+                    for (m = 0; m < NO_ALLPASS_LINKS; m++)
+                    {
+                        complex_t Q_Fract_allpass, tmp2;
+
+                        /* fetch parameters */
+                        if (gr < ps->num_hybrid_groups)
+                        {
+                            /* select data from the hybrid subbands */
+                            RE(tmp0) = RE(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]);
+                            IM(tmp0) = IM(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]);
+
+                            if (ps->use34hybrid_bands)
+                            {
+                                RE(Q_Fract_allpass) = RE(Q_Fract_allpass_SubQmf34[sb][m]);
+                                IM(Q_Fract_allpass) = IM(Q_Fract_allpass_SubQmf34[sb][m]);
+                            } else {
+                                RE(Q_Fract_allpass) = RE(Q_Fract_allpass_SubQmf20[sb][m]);
+                                IM(Q_Fract_allpass) = IM(Q_Fract_allpass_SubQmf20[sb][m]);
+                            }
+                        } else {
+                            /* select data from the QMF subbands */
+                            RE(tmp0) = RE(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]);
+                            IM(tmp0) = IM(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]);
+
+                            RE(Q_Fract_allpass) = RE(Q_Fract_allpass_Qmf[sb][m]);
+                            IM(Q_Fract_allpass) = IM(Q_Fract_allpass_Qmf[sb][m]);
+                        }
+
+                        /* delay by a fraction */
+                        /* z^(-d(m)) * Q_Fract_allpass[k,m] */
+                        ComplexMult(&RE(tmp), &IM(tmp), RE(tmp0), IM(tmp0), RE(Q_Fract_allpass), IM(Q_Fract_allpass));
+
+                        /* -a(m) * g_DecaySlope[k] */
+                        RE(tmp) += -MUL_F(g_DecaySlope_filt[m], RE(R0));
+                        IM(tmp) += -MUL_F(g_DecaySlope_filt[m], IM(R0));
+
+                        /* -a(m) * g_DecaySlope[k] * Q_Fract_allpass[k,m] * z^(-d(m)) */
+                        RE(tmp2) = RE(R0) + MUL_F(g_DecaySlope_filt[m], RE(tmp));
+                        IM(tmp2) = IM(R0) + MUL_F(g_DecaySlope_filt[m], IM(tmp));
+
+                        /* store sample */
+                        if (gr < ps->num_hybrid_groups)
+                        {
+                            RE(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]) = RE(tmp2);
+                            IM(ps->delay_SubQmf_ser[m][temp_delay_ser[m]][sb]) = IM(tmp2);
+                        } else {
+                            RE(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]) = RE(tmp2);
+                            IM(ps->delay_Qmf_ser[m][temp_delay_ser[m]][sb]) = IM(tmp2);
+                        }
+
+                        /* store for next iteration (or as output value if last iteration) */
+                        RE(R0) = RE(tmp);
+                        IM(R0) = IM(tmp);
+                    }
+                }
+
+                /* select b(k) for reading the transient ratio */
+                bk = (~NEGATE_IPD_MASK) & ps->map_group2bk[gr];
+
+                /* duck if a past transient is found */
+                RE(R0) = MUL_R(G_TransientRatio[n][bk], RE(R0));
+                IM(R0) = MUL_R(G_TransientRatio[n][bk], IM(R0));
+
+                if (gr < ps->num_hybrid_groups)
+                {
+                    /* hybrid */
+                    QMF_RE(X_hybrid_right[n][sb]) = RE(R0);
+                    QMF_IM(X_hybrid_right[n][sb]) = IM(R0);
+                } else {
+                    /* QMF */
+                    QMF_RE(X_right[n][sb]) = RE(R0);
+                    QMF_IM(X_right[n][sb]) = IM(R0);
+                }
+
+                /* Update delay buffer index */
+                if (++temp_delay >= 2)
+                {
+                    temp_delay = 0;
+                }
+
+                /* update delay indices */
+                if (sb > ps->nr_allpass_bands && gr >= ps->num_hybrid_groups)
+                {
+                    /* delay_D depends on the samplerate, it can hold the values 14 and 1 */
+                    if (++ps->delay_buf_index_delay[sb] >= ps->delay_D[sb])
+                    {
+                        ps->delay_buf_index_delay[sb] = 0;
+                    }
+                }
+
+                for (m = 0; m < NO_ALLPASS_LINKS; m++)
+                {
+                    if (++temp_delay_ser[m] >= ps->num_sample_delay_ser[m])
+                    {
+                        temp_delay_ser[m] = 0;
+                    }
+                }
+            }
+        }
+    }
+
+    /* update delay indices */
+    ps->saved_delay = temp_delay;
+    for (m = 0; m < NO_ALLPASS_LINKS; m++)
+        ps->delay_buf_index_ser[m] = temp_delay_ser[m];
+}
+
+#ifdef FIXED_POINT
+#define step(shift) \
+    if ((0x40000000l >> shift) + root <= value)       \
+    {                                                 \
+        value -= (0x40000000l >> shift) + root;       \
+        root = (root >> 1) | (0x40000000l >> shift);  \
+    } else {                                          \
+        root = root >> 1;                             \
+    }
+
+/* fixed point square root approximation */
+static real_t ps_sqrt(real_t value)
+{
+    real_t root = 0;
+
+    step( 0); step( 2); step( 4); step( 6);
+    step( 8); step(10); step(12); step(14);
+    step(16); step(18); step(20); step(22);
+    step(24); step(26); step(28); step(30);
+
+    if (root < value)
+        ++root;
+
+    root <<= (REAL_BITS/2);
+
+    return root;
+}
+#else
+#define ps_sqrt(A) sqrt(A)
+#endif
+
+static const real_t ipdopd_cos_tab[] = {
+    FRAC_CONST(1.000000000000000),
+    FRAC_CONST(0.707106781186548),
+    FRAC_CONST(0.000000000000000),
+    FRAC_CONST(-0.707106781186547),
+    FRAC_CONST(-1.000000000000000),
+    FRAC_CONST(-0.707106781186548),
+    FRAC_CONST(-0.000000000000000),
+    FRAC_CONST(0.707106781186547),
+    FRAC_CONST(1.000000000000000)
+};
+
+static const real_t ipdopd_sin_tab[] = {
+    FRAC_CONST(0.000000000000000),
+    FRAC_CONST(0.707106781186547),
+    FRAC_CONST(1.000000000000000),
+    FRAC_CONST(0.707106781186548),
+    FRAC_CONST(0.000000000000000),
+    FRAC_CONST(-0.707106781186547),
+    FRAC_CONST(-1.000000000000000),
+    FRAC_CONST(-0.707106781186548),
+    FRAC_CONST(-0.000000000000000)
+};
+
+static void ps_mix_phase(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64],
+                         qmf_t X_hybrid_left[32][32], qmf_t X_hybrid_right[32][32])
+{
+    uint8_t n;
+    uint8_t gr;
+    uint8_t bk = 0;
+    uint8_t sb, maxsb;
+    uint8_t env;
+    uint8_t nr_ipdopd_par;
+    complex_t h11, h12, h21, h22;
+    complex_t H11, H12, H21, H22;
+    complex_t deltaH11, deltaH12, deltaH21, deltaH22;
+    complex_t tempLeft;
+    complex_t tempRight;
+    complex_t phaseLeft;
+    complex_t phaseRight;
+    real_t L;
+    const real_t *sf_iid;
+    uint8_t no_iid_steps;
+
+    if (ps->iid_mode >= 3)
+    {
+        no_iid_steps = 15;
+        sf_iid = sf_iid_fine;
+    } else {
+        no_iid_steps = 7;
+        sf_iid = sf_iid_normal;
+    }
+
+    if (ps->ipd_mode == 0 || ps->ipd_mode == 3)
+    {
+        nr_ipdopd_par = 11; /* resolution */
+    } else {
+        nr_ipdopd_par = ps->nr_ipdopd_par;
+    }
+
+    for (gr = 0; gr < ps->num_groups; gr++)
+    {
+        bk = (~NEGATE_IPD_MASK) & ps->map_group2bk[gr];
+
+        /* use one channel per group in the subqmf domain */
+        maxsb = (gr < ps->num_hybrid_groups) ? ps->group_border[gr] + 1 : ps->group_border[gr + 1];
+
+        for (env = 0; env < ps->num_env; env++)
+        {
+            if (ps->icc_mode < 3)
+            {
+                /* type 'A' mixing as described in 8.6.4.6.2.1 */
+                real_t c_1, c_2;
+                real_t cosa, sina;
+                real_t cosb, sinb;
+                real_t ab1, ab2;
+                real_t ab3, ab4;
+
+                /*
+                c_1 = sqrt(2.0 / (1.0 + pow(10.0, quant_iid[no_iid_steps + iid_index] / 10.0)));
+                c_2 = sqrt(2.0 / (1.0 + pow(10.0, quant_iid[no_iid_steps - iid_index] / 10.0)));
+                alpha = 0.5 * acos(quant_rho[icc_index]);
+                beta = alpha * ( c_1 - c_2 ) / sqrt(2.0);
+                */
+
+                //printf("%d\n", ps->iid_index[env][bk]);
+
+                /* calculate the scalefactors c_1 and c_2 from the intensity differences */
+                c_1 = sf_iid[no_iid_steps + ps->iid_index[env][bk]];
+                c_2 = sf_iid[no_iid_steps - ps->iid_index[env][bk]];
+
+                /* calculate alpha and beta using the ICC parameters */
+                cosa = cos_alphas[ps->icc_index[env][bk]];
+                sina = sin_alphas[ps->icc_index[env][bk]];
+
+                if (ps->iid_mode >= 3)
+                {
+                    if (ps->iid_index[env][bk] < 0)
+                    {
+                        cosb =  cos_betas_fine[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                        sinb = -sin_betas_fine[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                    } else {
+                        cosb = cos_betas_fine[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                        sinb = sin_betas_fine[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                    }
+                } else {
+                    if (ps->iid_index[env][bk] < 0)
+                    {
+                        cosb =  cos_betas_normal[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                        sinb = -sin_betas_normal[-ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                    } else {
+                        cosb = cos_betas_normal[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                        sinb = sin_betas_normal[ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                    }
+                }
+
+                ab1 = MUL_C(cosb, cosa);
+                ab2 = MUL_C(sinb, sina);
+                ab3 = MUL_C(sinb, cosa);
+                ab4 = MUL_C(cosb, sina);
+
+                /* h_xy: COEF */
+                RE(h11) = MUL_C(c_2, (ab1 - ab2));
+                RE(h12) = MUL_C(c_1, (ab1 + ab2));
+                RE(h21) = MUL_C(c_2, (ab3 + ab4));
+                RE(h22) = MUL_C(c_1, (ab3 - ab4));
+            } else {
+                /* type 'B' mixing as described in 8.6.4.6.2.2 */
+                real_t sina, cosa;
+                real_t cosg, sing;
+
+                /*
+                real_t c, rho, mu, alpha, gamma;
+                uint8_t i;
+
+                i = ps->iid_index[env][bk];
+                c = (real_t)pow(10.0, ((i)?(((i>0)?1:-1)*quant_iid[((i>0)?i:-i)-1]):0.)/20.0);
+                rho = quant_rho[ps->icc_index[env][bk]];
+
+                if (rho == 0.0f && c == 1.)
+                {
+                    alpha = (real_t)M_PI/4.0f;
+                    rho = 0.05f;
+                } else {
+                    if (rho <= 0.05f)
+                    {
+                        rho = 0.05f;
+                    }
+                    alpha = 0.5f*(real_t)atan( (2.0f*c*rho) / (c*c-1.0f) );
+
+                    if (alpha < 0.)
+                    {
+                        alpha += (real_t)M_PI/2.0f;
+                    }
+                    if (rho < 0.)
+                    {
+                        alpha += (real_t)M_PI;
+                    }
+                }
+                mu = c+1.0f/c;
+                mu = 1+(4.0f*rho*rho-4.0f)/(mu*mu);
+                gamma = (real_t)atan(sqrt((1.0f-sqrt(mu))/(1.0f+sqrt(mu))));
+                */
+
+                if (ps->iid_mode >= 3)
+                {
+                    uint8_t abs_iid = abs(ps->iid_index[env][bk]);
+
+                    cosa = sincos_alphas_B_fine[no_iid_steps + ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                    sina = sincos_alphas_B_fine[30 - (no_iid_steps + ps->iid_index[env][bk])][ps->icc_index[env][bk]];
+                    cosg = cos_gammas_fine[abs_iid][ps->icc_index[env][bk]];
+                    sing = sin_gammas_fine[abs_iid][ps->icc_index[env][bk]];
+                } else {
+                    uint8_t abs_iid = abs(ps->iid_index[env][bk]);
+
+                    cosa = sincos_alphas_B_normal[no_iid_steps + ps->iid_index[env][bk]][ps->icc_index[env][bk]];
+                    sina = sincos_alphas_B_normal[14 - (no_iid_steps + ps->iid_index[env][bk])][ps->icc_index[env][bk]];
+                    cosg = cos_gammas_normal[abs_iid][ps->icc_index[env][bk]];
+                    sing = sin_gammas_normal[abs_iid][ps->icc_index[env][bk]];
+                }
+
+                RE(h11) = MUL_C(COEF_SQRT2, MUL_C(cosa, cosg));
+                RE(h12) = MUL_C(COEF_SQRT2, MUL_C(sina, cosg));
+                RE(h21) = MUL_C(COEF_SQRT2, MUL_C(-cosa, sing));
+                RE(h22) = MUL_C(COEF_SQRT2, MUL_C(sina, sing));
+            }
+
+            /* calculate phase rotation parameters H_xy */
+            /* note that the imaginary part of these parameters are only calculated when
+               IPD and OPD are enabled
+             */
+            if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
+            {
+                int8_t i;
+                real_t xxyy, ppqq;
+                real_t yq, xp, xq, py, tmp;
+
+                /* ringbuffer index */
+                i = ps->phase_hist;
+
+                /* previous value */
+#ifdef FIXED_POINT
+                /* divide by 4, shift right 2 bits */
+                RE(tempLeft)  = RE(ps->ipd_prev[bk][i]) >> 2;
+                IM(tempLeft)  = IM(ps->ipd_prev[bk][i]) >> 2;
+                RE(tempRight) = RE(ps->opd_prev[bk][i]) >> 2;
+                IM(tempRight) = IM(ps->opd_prev[bk][i]) >> 2;
+#else
+                RE(tempLeft)  = MUL_F(RE(ps->ipd_prev[bk][i]), FRAC_CONST(0.25));
+                IM(tempLeft)  = MUL_F(IM(ps->ipd_prev[bk][i]), FRAC_CONST(0.25));
+                RE(tempRight) = MUL_F(RE(ps->opd_prev[bk][i]), FRAC_CONST(0.25));
+                IM(tempRight) = MUL_F(IM(ps->opd_prev[bk][i]), FRAC_CONST(0.25));
+#endif
+
+                /* save current value */
+                RE(ps->ipd_prev[bk][i]) = ipdopd_cos_tab[abs(ps->ipd_index[env][bk])];
+                IM(ps->ipd_prev[bk][i]) = ipdopd_sin_tab[abs(ps->ipd_index[env][bk])];
+                RE(ps->opd_prev[bk][i]) = ipdopd_cos_tab[abs(ps->opd_index[env][bk])];
+                IM(ps->opd_prev[bk][i]) = ipdopd_sin_tab[abs(ps->opd_index[env][bk])];
+
+                /* add current value */
+                RE(tempLeft)  += RE(ps->ipd_prev[bk][i]);
+                IM(tempLeft)  += IM(ps->ipd_prev[bk][i]);
+                RE(tempRight) += RE(ps->opd_prev[bk][i]);
+                IM(tempRight) += IM(ps->opd_prev[bk][i]);
+
+                /* ringbuffer index */
+                if (i == 0)
+                { 
+                    i = 2;
+                }
+                i--;
+
+                /* get value before previous */
+#ifdef FIXED_POINT
+                /* dividing by 2, shift right 1 bit */
+                RE(tempLeft)  += (RE(ps->ipd_prev[bk][i]) >> 1);
+                IM(tempLeft)  += (IM(ps->ipd_prev[bk][i]) >> 1);
+                RE(tempRight) += (RE(ps->opd_prev[bk][i]) >> 1);
+                IM(tempRight) += (IM(ps->opd_prev[bk][i]) >> 1);
+#else
+                RE(tempLeft)  += MUL_F(RE(ps->ipd_prev[bk][i]), FRAC_CONST(0.5));
+                IM(tempLeft)  += MUL_F(IM(ps->ipd_prev[bk][i]), FRAC_CONST(0.5));
+                RE(tempRight) += MUL_F(RE(ps->opd_prev[bk][i]), FRAC_CONST(0.5));
+                IM(tempRight) += MUL_F(IM(ps->opd_prev[bk][i]), FRAC_CONST(0.5));
+#endif
+
+#if 0 /* original code */
+                ipd = (float)atan2(IM(tempLeft), RE(tempLeft));
+                opd = (float)atan2(IM(tempRight), RE(tempRight));
+
+                /* phase rotation */
+                RE(phaseLeft) = (float)cos(opd);
+                IM(phaseLeft) = (float)sin(opd);
+                opd -= ipd;
+                RE(phaseRight) = (float)cos(opd);
+                IM(phaseRight) = (float)sin(opd);
+#else
+                // x = IM(tempLeft)
+                // y = RE(tempLeft)
+                // p = IM(tempRight)
+                // q = RE(tempRight)
+                // cos(atan2(x,y)) = 1/sqrt(1 + (x*x)/(y*y))
+                // sin(atan2(x,y)) = x/(y*sqrt(1 + (x*x)/(y*y)))
+                // cos(atan2(x,y)-atan2(p,q)) = (y*q+x*p)/(y*q * sqrt(1 + (x*x)/(y*y)) * sqrt(1 + (p*p)/(q*q)));
+                // sin(atan2(x,y)-atan2(p,q)) = (x*q-p*y)/(y*q * sqrt(1 + (x*x)/(y*y)) * sqrt(1 + (p*p)/(q*q)));
+
+                /* (x*x)/(y*y)  (REAL > 0) */
+                xxyy = DIV_R(MUL_C(IM(tempLeft),IM(tempLeft)), MUL_C(RE(tempLeft),RE(tempLeft)));
+                ppqq = DIV_R(MUL_C(IM(tempRight),IM(tempRight)), MUL_C(RE(tempRight),RE(tempRight)));
+
+                /* 1 + (x*x)/(y*y)  (REAL > 1) */
+                xxyy += REAL_CONST(1);
+                ppqq += REAL_CONST(1);
+
+                /* 1 / sqrt(1 + (x*x)/(y*y))  (FRAC <= 1) */
+                xxyy = DIV_R(FRAC_CONST(1), ps_sqrt(xxyy));
+                ppqq = DIV_R(FRAC_CONST(1), ps_sqrt(ppqq));
+
+                /* COEF */
+                yq = MUL_C(RE(tempLeft), RE(tempRight));
+                xp = MUL_C(IM(tempLeft), IM(tempRight));
+                xq = MUL_C(IM(tempLeft), RE(tempRight));
+                py = MUL_C(RE(tempLeft), IM(tempRight));
+
+                RE(phaseLeft) = xxyy;
+                IM(phaseLeft) = MUL_R(xxyy, (DIV_R(IM(tempLeft), RE(tempLeft))));
+
+                tmp = DIV_C(MUL_F(xxyy, ppqq), yq);
+
+                /* MUL_C(FRAC,COEF) = FRAC */
+                RE(phaseRight) = MUL_C(tmp, (yq+xp));
+                IM(phaseRight) = MUL_C(tmp, (xq-py));
+#endif
+
+                /* MUL_F(COEF, FRAC) = COEF */
+                IM(h11) = MUL_F(RE(h11), IM(phaseLeft));
+                IM(h12) = MUL_F(RE(h12), IM(phaseRight));
+                IM(h21) = MUL_F(RE(h21), IM(phaseLeft));
+                IM(h22) = MUL_F(RE(h22), IM(phaseRight));
+
+                RE(h11) = MUL_F(RE(h11), RE(phaseLeft));
+                RE(h12) = MUL_F(RE(h12), RE(phaseRight));
+                RE(h21) = MUL_F(RE(h21), RE(phaseLeft));
+                RE(h22) = MUL_F(RE(h22), RE(phaseRight));
+            }
+
+            /* length of the envelope n_e+1 - n_e (in time samples) */
+            /* 0 < L <= 32: integer */
+            L = (real_t)(ps->border_position[env + 1] - ps->border_position[env]);
+
+            /* obtain final H_xy by means of linear interpolation */
+            RE(deltaH11) = (RE(h11) - RE(ps->h11_prev[gr])) / L;
+            RE(deltaH12) = (RE(h12) - RE(ps->h12_prev[gr])) / L;
+            RE(deltaH21) = (RE(h21) - RE(ps->h21_prev[gr])) / L;
+            RE(deltaH22) = (RE(h22) - RE(ps->h22_prev[gr])) / L;
+
+            RE(H11) = RE(ps->h11_prev[gr]);
+            RE(H12) = RE(ps->h12_prev[gr]);
+            RE(H21) = RE(ps->h21_prev[gr]);
+            RE(H22) = RE(ps->h22_prev[gr]);
+
+            RE(ps->h11_prev[gr]) = RE(h11);
+            RE(ps->h12_prev[gr]) = RE(h12);
+            RE(ps->h21_prev[gr]) = RE(h21);
+            RE(ps->h22_prev[gr]) = RE(h22);
+
+            /* only calculate imaginary part when needed */
+            if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
+            {
+                /* obtain final H_xy by means of linear interpolation */
+                IM(deltaH11) = (IM(h11) - IM(ps->h11_prev[gr])) / L;
+                IM(deltaH12) = (IM(h12) - IM(ps->h12_prev[gr])) / L;
+                IM(deltaH21) = (IM(h21) - IM(ps->h21_prev[gr])) / L;
+                IM(deltaH22) = (IM(h22) - IM(ps->h22_prev[gr])) / L;
+
+                IM(H11) = IM(ps->h11_prev[gr]);
+                IM(H12) = IM(ps->h12_prev[gr]);
+                IM(H21) = IM(ps->h21_prev[gr]);
+                IM(H22) = IM(ps->h22_prev[gr]);
+
+                if ((NEGATE_IPD_MASK & ps->map_group2bk[gr]) != 0)
+                {
+                    IM(deltaH11) = -IM(deltaH11);
+                    IM(deltaH12) = -IM(deltaH12);
+                    IM(deltaH21) = -IM(deltaH21);
+                    IM(deltaH22) = -IM(deltaH22);
+
+                    IM(H11) = -IM(H11);
+                    IM(H12) = -IM(H12);
+                    IM(H21) = -IM(H21);
+                    IM(H22) = -IM(H22);
+                }
+
+                IM(ps->h11_prev[gr]) = IM(h11);
+                IM(ps->h12_prev[gr]) = IM(h12);
+                IM(ps->h21_prev[gr]) = IM(h21);
+                IM(ps->h22_prev[gr]) = IM(h22);
+            }
+
+            /* apply H_xy to the current envelope band of the decorrelated subband */
+            for (n = ps->border_position[env]; n < ps->border_position[env + 1]; n++)
+            {
+                /* addition finalises the interpolation over every n */
+                RE(H11) += RE(deltaH11);
+                RE(H12) += RE(deltaH12);
+                RE(H21) += RE(deltaH21);
+                RE(H22) += RE(deltaH22);
+                if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
+                {
+                    IM(H11) += IM(deltaH11);
+                    IM(H12) += IM(deltaH12);
+                    IM(H21) += IM(deltaH21);
+                    IM(H22) += IM(deltaH22);
+                }
+
+                /* channel is an alias to the subband */
+                for (sb = ps->group_border[gr]; sb < maxsb; sb++)
+                {
+                    complex_t inLeft, inRight;
+
+                    /* load decorrelated samples */
+                    if (gr < ps->num_hybrid_groups)
+                    {
+                        RE(inLeft) =  RE(X_hybrid_left[n][sb]);
+                        IM(inLeft) =  IM(X_hybrid_left[n][sb]);
+                        RE(inRight) = RE(X_hybrid_right[n][sb]);
+                        IM(inRight) = IM(X_hybrid_right[n][sb]);
+                    } else {
+                        RE(inLeft) =  RE(X_left[n][sb]);
+                        IM(inLeft) =  IM(X_left[n][sb]);
+                        RE(inRight) = RE(X_right[n][sb]);
+                        IM(inRight) = IM(X_right[n][sb]);
+                    }
+
+                    /* apply mixing */
+                    RE(tempLeft) =  MUL_C(RE(H11), RE(inLeft)) + MUL_C(RE(H21), RE(inRight));
+                    IM(tempLeft) =  MUL_C(RE(H11), IM(inLeft)) + MUL_C(RE(H21), IM(inRight));
+                    RE(tempRight) = MUL_C(RE(H12), RE(inLeft)) + MUL_C(RE(H22), RE(inRight));
+                    IM(tempRight) = MUL_C(RE(H12), IM(inLeft)) + MUL_C(RE(H22), IM(inRight));
+
+                    /* only perform imaginary operations when needed */
+                    if ((ps->enable_ipdopd) && (bk < nr_ipdopd_par))
+                    {
+                        /* apply rotation */
+                        RE(tempLeft)  -= MUL_C(IM(H11), IM(inLeft)) + MUL_C(IM(H21), IM(inRight));
+                        IM(tempLeft)  += MUL_C(IM(H11), RE(inLeft)) + MUL_C(IM(H21), RE(inRight));
+                        RE(tempRight) -= MUL_C(IM(H12), IM(inLeft)) + MUL_C(IM(H22), IM(inRight));
+                        IM(tempRight) += MUL_C(IM(H12), RE(inLeft)) + MUL_C(IM(H22), RE(inRight));
+                    }
+
+                    /* store final samples */
+                    if (gr < ps->num_hybrid_groups)
+                    {
+                        RE(X_hybrid_left[n][sb])  = RE(tempLeft);
+                        IM(X_hybrid_left[n][sb])  = IM(tempLeft);
+                        RE(X_hybrid_right[n][sb]) = RE(tempRight);
+                        IM(X_hybrid_right[n][sb]) = IM(tempRight);
+                    } else {
+                        RE(X_left[n][sb])  = RE(tempLeft);
+                        IM(X_left[n][sb])  = IM(tempLeft);
+                        RE(X_right[n][sb]) = RE(tempRight);
+                        IM(X_right[n][sb]) = IM(tempRight);
+                    }
+                }
+            }
+
+            /* shift phase smoother's circular buffer index */
+            ps->phase_hist++;
+            if (ps->phase_hist == 2)
+            {
+                ps->phase_hist = 0;
+            }
+        }
+    }
+}
+
+void ps_free(ps_info *ps)
+{
+    /* free hybrid filterbank structures */
+    hybrid_free(ps->hyb);
+
+    faad_free(ps);
+}
+
+ps_info *ps_init(uint8_t sr_index)
+{
+    uint8_t i;
+    uint8_t short_delay_band;
+
+    ps_info *ps = (ps_info*)faad_malloc(sizeof(ps_info));
+    memset(ps, 0, sizeof(ps_info));
+
+    ps->hyb = hybrid_init();
+
+    ps->ps_data_available = 0;
+
+    /* delay stuff*/
+    ps->saved_delay = 0;
+
+    for (i = 0; i < 64; i++)
+    {
+        ps->delay_buf_index_delay[i] = 0;
+    }
+
+    for (i = 0; i < NO_ALLPASS_LINKS; i++)
+    {
+        ps->delay_buf_index_ser[i] = 0;
+#ifdef PARAM_32KHZ
+        if (sr_index <= 5) /* >= 32 kHz*/
+        {
+            ps->num_sample_delay_ser[i] = delay_length_d[1][i];
+        } else {
+            ps->num_sample_delay_ser[i] = delay_length_d[0][i];
+        }
+#else
+        /* THESE ARE CONSTANTS NOW */
+        ps->num_sample_delay_ser[i] = delay_length_d[i];
+#endif
+    }
+
+#ifdef PARAM_32KHZ
+    if (sr_index <= 5) /* >= 32 kHz*/
+    {
+        short_delay_band = 35;
+        ps->nr_allpass_bands = 22;
+        ps->alpha_decay = FRAC_CONST(0.76592833836465);
+        ps->alpha_smooth = FRAC_CONST(0.25);
+    } else {
+        short_delay_band = 64;
+        ps->nr_allpass_bands = 45;
+        ps->alpha_decay = FRAC_CONST(0.58664621951003);
+        ps->alpha_smooth = FRAC_CONST(0.6);
+    }
+#else
+    /* THESE ARE CONSTANTS NOW */
+    short_delay_band = 35;
+    ps->nr_allpass_bands = 22;
+    ps->alpha_decay = FRAC_CONST(0.76592833836465);
+    ps->alpha_smooth = FRAC_CONST(0.25);
+#endif
+
+    /* THESE ARE CONSTANT NOW IF PS IS INDEPENDANT OF SAMPLERATE */
+    for (i = 0; i < short_delay_band; i++)
+    {
+        ps->delay_D[i] = 14;
+    }
+    for (i = short_delay_band; i < 64; i++)
+    {
+        ps->delay_D[i] = 1;
+    }
+
+    /* mixing and phase */
+    for (i = 0; i < 50; i++)
+    {
+        RE(ps->h11_prev[i]) = 1;
+        IM(ps->h12_prev[i]) = 1;
+        RE(ps->h11_prev[i]) = 1;
+        IM(ps->h12_prev[i]) = 1;
+    }
+
+    ps->phase_hist = 0;
+
+    for (i = 0; i < 20; i++)
+    {
+        RE(ps->ipd_prev[i][0]) = 0;
+        IM(ps->ipd_prev[i][0]) = 0;
+        RE(ps->ipd_prev[i][1]) = 0;
+        IM(ps->ipd_prev[i][1]) = 0;
+        RE(ps->opd_prev[i][0]) = 0;
+        IM(ps->opd_prev[i][0]) = 0;
+        RE(ps->opd_prev[i][1]) = 0;
+        IM(ps->opd_prev[i][1]) = 0;
+    }
+
+    return ps;
+}
+
+/* main Parametric Stereo decoding function */
+uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64])
+{
+    qmf_t X_hybrid_left[32][32] = {{0}};
+    qmf_t X_hybrid_right[32][32] = {{0}};
+
+    /* delta decoding of the bitstream data */
+    ps_data_decode(ps);
+
+    /* set up some parameters depending on filterbank type */
+    if (ps->use34hybrid_bands)
+    {
+        ps->group_border = (uint8_t*)group_border34;
+        ps->map_group2bk = (uint16_t*)map_group2bk34;
+        ps->num_groups = 32+18;
+        ps->num_hybrid_groups = 32;
+        ps->nr_par_bands = 34;
+        ps->decay_cutoff = 5;
+    } else {
+        ps->group_border = (uint8_t*)group_border20;
+        ps->map_group2bk = (uint16_t*)map_group2bk20;
+        ps->num_groups = 10+12;
+        ps->num_hybrid_groups = 10;
+        ps->nr_par_bands = 20;
+        ps->decay_cutoff = 3;
+    }
+
+    /* Perform further analysis on the lowest subbands to get a higher
+     * frequency resolution
+     */
+    hybrid_analysis((hyb_info*)ps->hyb, X_left, X_hybrid_left,
+        ps->use34hybrid_bands);
+
+    /* decorrelate mono signal */
+    ps_decorrelate(ps, X_left, X_right, X_hybrid_left, X_hybrid_right);
+
+    /* apply mixing and phase parameters */
+    ps_mix_phase(ps, X_left, X_right, X_hybrid_left, X_hybrid_right);
+
+    /* hybrid synthesis, to rebuild the SBR QMF matrices */
+    hybrid_synthesis((hyb_info*)ps->hyb, X_left, X_hybrid_left,
+        ps->use34hybrid_bands);
+
+    hybrid_synthesis((hyb_info*)ps->hyb, X_right, X_hybrid_right,
+        ps->use34hybrid_bands);
+
+    return 0;
+}
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaad2/ps_dec.h	Fri Sep 24 17:31:36 2004 +0000
@@ -0,0 +1,146 @@
+/*
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+**
+** 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.
+**
+** Any non-GPL usage of this software or parts of this software is strictly
+** forbidden.
+**
+** Commercial non-GPL licensing of this software is possible.
+** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
+**
+** Initially modified for use with MPlayer by Diego Biurrun on 2004/09/24
+** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+**/
+
+#ifndef __PS_DEC_H__
+#define __PS_DEC_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "bits.h"
+
+#define EXTENSION_ID_PS 2
+
+#define MAX_PS_ENVELOPES 5
+#define NO_ALLPASS_LINKS 3
+
+typedef struct
+{
+    /* bitstream parameters */
+    uint8_t enable_iid;
+    uint8_t enable_icc;
+    uint8_t enable_ext;
+
+    uint8_t iid_mode;
+    uint8_t icc_mode;
+    uint8_t nr_iid_par;
+    uint8_t nr_ipdopd_par;
+    uint8_t nr_icc_par;
+
+    uint8_t frame_class;
+    uint8_t num_env;
+
+    uint8_t border_position[MAX_PS_ENVELOPES+1];
+
+    uint8_t iid_dt[MAX_PS_ENVELOPES];
+    uint8_t icc_dt[MAX_PS_ENVELOPES];
+
+    uint8_t enable_ipdopd;
+    uint8_t ipd_mode;
+    uint8_t ipd_dt[MAX_PS_ENVELOPES];
+    uint8_t opd_dt[MAX_PS_ENVELOPES];
+
+    /* indices */
+    int8_t iid_index_prev[34];
+    int8_t icc_index_prev[34];
+    int8_t ipd_index_prev[17];
+    int8_t opd_index_prev[17];
+    int8_t iid_index[MAX_PS_ENVELOPES][34];
+    int8_t icc_index[MAX_PS_ENVELOPES][34];
+    int8_t ipd_index[MAX_PS_ENVELOPES][17];
+    int8_t opd_index[MAX_PS_ENVELOPES][17];
+
+    int8_t ipd_index_1[17];
+    int8_t opd_index_1[17];
+    int8_t ipd_index_2[17];
+    int8_t opd_index_2[17];
+
+    /* ps data was correctly read */
+    uint8_t ps_data_available;
+
+    /* hybrid filterbank parameters */
+    void *hyb;
+    uint8_t use34hybrid_bands;
+
+    /**/
+    uint8_t num_groups;
+    uint8_t num_hybrid_groups;
+    uint8_t nr_par_bands;
+    uint8_t nr_allpass_bands;
+    uint8_t decay_cutoff;
+
+    uint8_t *group_border;
+    uint16_t *map_group2bk;
+
+    /* filter delay handling */
+    uint8_t saved_delay;
+    uint8_t delay_buf_index_ser[NO_ALLPASS_LINKS];
+    uint8_t num_sample_delay_ser[NO_ALLPASS_LINKS];
+    uint8_t delay_D[64];
+    uint8_t delay_buf_index_delay[64];
+
+    complex_t delay_Qmf[14][64]; /* 14 samples delay max, 64 QMF channels */
+    complex_t delay_SubQmf[2][32]; /* 2 samples delay max (SubQmf is always allpass filtered) */
+    complex_t delay_Qmf_ser[NO_ALLPASS_LINKS][5][64]; /* 5 samples delay max (table 8.34), 64 QMF channels */
+    complex_t delay_SubQmf_ser[NO_ALLPASS_LINKS][5][32]; /* 5 samples delay max (table 8.34) */
+
+    /* transients */
+    real_t alpha_decay;
+    real_t alpha_smooth;
+
+    real_t P_PeakDecayNrg[34];
+    real_t P_prev[34];
+    real_t P_SmoothPeakDecayDiffNrg_prev[34];
+
+    /* mixing and phase */
+    complex_t h11_prev[50];
+    complex_t h12_prev[50];
+    complex_t h21_prev[50];
+    complex_t h22_prev[50];
+    uint8_t phase_hist;
+    complex_t ipd_prev[20][2];
+    complex_t opd_prev[20][2];
+
+} ps_info;
+
+/* ps_syntax.c */
+uint16_t ps_data(ps_info *ps, bitfile *ld);
+
+/* ps_dec.c */
+ps_info *ps_init(uint8_t sr_index);
+void ps_free(ps_info *ps);
+
+uint8_t ps_decode(ps_info *ps, qmf_t X_left[38][64], qmf_t X_right[38][64]);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaad2/ps_syntax.c	Fri Sep 24 17:31:36 2004 +0000
@@ -0,0 +1,536 @@
+/*
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR and PS decoding
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+**
+** 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.
+**
+** Any non-GPL usage of this software or parts of this software is strictly
+** forbidden.
+**
+** Commercial non-GPL licensing of this software is possible.
+** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
+**
+** Initially modified for use with MPlayer by Diego Biurrun on 2004/09/24
+** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+**/
+
+#include "common.h"
+
+#ifdef PS_DEC
+
+#include "bits.h"
+#include "ps_dec.h"
+
+/* type definitaions */
+typedef const int8_t (*ps_huff_tab)[2];
+
+/* static data tables */
+static const uint8_t nr_iid_par_tab[] = {
+    10, 20, 34, 10, 20, 34, 0, 0
+};
+static const uint8_t nr_ipdopd_par_tab[] = {
+    5, 11, 17, 5, 11, 17, 0, 0
+};
+static const uint8_t nr_icc_par_tab[] = {
+    10, 20, 34, 10, 20, 34, 0, 0
+};
+static const uint8_t num_env_tab[][4] = {
+    { 0, 1, 2, 4 },
+    { 1, 2, 3, 4 }
+};
+
+/* binary lookup huffman tables */
+static const int8_t f_huff_iid_def[][2] = {
+    { /*0*/ -31, 1 },             /* index 0: 1 bits: x */
+    { 2, 3 },                     /* index 1: 2 bits: 1x */
+    { /*1*/ -30, /*-1*/ -32 },    /* index 2: 3 bits: 10x */
+    { 4, 5 },                     /* index 3: 3 bits: 11x */
+    { /*2*/ -29, /*-2*/ -33 },    /* index 4: 4 bits: 110x */
+    { 6, 7 },                     /* index 5: 4 bits: 111x */
+    { /*3*/ -28, /*-3*/ -34 },    /* index 6: 5 bits: 1110x */
+    { 8, 9 },                     /* index 7: 5 bits: 1111x */
+    { /*-4*/ -35, /*4*/ -27 },    /* index 8: 6 bits: 11110x */
+    { /*5*/ -26, 10 },            /* index 9: 6 bits: 11111x */
+    { /*-5*/ -36, 11 },           /* index 10: 7 bits: 111111x */
+    { /*6*/ -25, 12 },            /* index 11: 8 bits: 1111111x */
+    { /*-6*/ -37, 13 },           /* index 12: 9 bits: 11111111x */
+    { /*-7*/ -38, 14 },           /* index 13: 10 bits: 111111111x */
+    { /*7*/ -24, 15 },            /* index 14: 11 bits: 1111111111x */
+    { 16, 17 },                   /* index 15: 12 bits: 11111111111x */
+    { /*8*/ -23, /*-8*/ -39 },    /* index 16: 13 bits: 111111111110x */
+    { 18, 19 },                   /* index 17: 13 bits: 111111111111x */
+    { /*9*/ -22, /*10*/ -21 },    /* index 18: 14 bits: 1111111111110x */
+    { 20, 21 },                   /* index 19: 14 bits: 1111111111111x */
+    { /*-9*/ -40, /*11*/ -20 },   /* index 20: 15 bits: 11111111111110x */
+    { 22, 23 },                   /* index 21: 15 bits: 11111111111111x */
+    { /*-10*/ -41, 24 },          /* index 22: 16 bits: 111111111111110x */
+    { 25, 26 },                   /* index 23: 16 bits: 111111111111111x */
+    { /*-11*/ -42, /*-14*/ -45 }, /* index 24: 17 bits: 1111111111111101x */
+    { /*-13*/ -44, /*-12*/ -43 }, /* index 25: 17 bits: 1111111111111110x */
+    { /*12*/ -19, 27 },           /* index 26: 17 bits: 1111111111111111x */
+    { /*13*/ -18, /*14*/ -17 }    /* index 27: 18 bits: 11111111111111111x */
+};
+
+static const int8_t t_huff_iid_def[][2] = {
+    { /*0*/ -31, 1 },             /* index 0: 1 bits: x */
+    { /*-1*/ -32, 2 },            /* index 1: 2 bits: 1x */
+    { /*1*/ -30, 3 },             /* index 2: 3 bits: 11x */
+    { /*-2*/ -33, 4 },            /* index 3: 4 bits: 111x */
+    { /*2*/ -29, 5 },             /* index 4: 5 bits: 1111x */
+    { /*-3*/ -34, 6 },            /* index 5: 6 bits: 11111x */
+    { /*3*/ -28, 7 },             /* index 6: 7 bits: 111111x */
+    { /*-4*/ -35, 8 },            /* index 7: 8 bits: 1111111x */
+    { /*4*/ -27, 9 },             /* index 8: 9 bits: 11111111x */
+    { /*-5*/ -36, 10 },           /* index 9: 10 bits: 111111111x */
+    { /*5*/ -26, 11 },            /* index 10: 11 bits: 1111111111x */
+    { /*-6*/ -37, 12 },           /* index 11: 12 bits: 11111111111x */
+    { /*6*/ -25, 13 },            /* index 12: 13 bits: 111111111111x */
+    { /*7*/ -24, 14 },            /* index 13: 14 bits: 1111111111111x */
+    { /*-7*/ -38, 15 },           /* index 14: 15 bits: 11111111111111x */
+    { 16, 17 },                   /* index 15: 16 bits: 111111111111111x */
+    { /*8*/ -23, /*-8*/ -39 },    /* index 16: 17 bits: 1111111111111110x */
+    { 18, 19 },                   /* index 17: 17 bits: 1111111111111111x */
+    { 20, 21 },                   /* index 18: 18 bits: 11111111111111110x */
+    { 22, 23 },                   /* index 19: 18 bits: 11111111111111111x */
+    { /*9*/ -22, /*-14*/ -45 },   /* index 20: 19 bits: 111111111111111100x */
+    { /*-13*/ -44, /*-12*/ -43 }, /* index 21: 19 bits: 111111111111111101x */
+    { 24, 25 },                   /* index 22: 19 bits: 111111111111111110x */
+    { 26, 27 },                   /* index 23: 19 bits: 111111111111111111x */
+    { /*-11*/ -42, /*-10*/ -41 }, /* index 24: 20 bits: 1111111111111111100x */
+    { /*-9*/ -40, /*10*/ -21 },   /* index 25: 20 bits: 1111111111111111101x */
+    { /*11*/ -20, /*12*/ -19 },   /* index 26: 20 bits: 1111111111111111110x */
+    { /*13*/ -18, /*14*/ -17 }    /* index 27: 20 bits: 1111111111111111111x */
+};
+
+static const int8_t f_huff_iid_fine[][2] = {
+    { 1, /*0*/ -31 },             /* index 0: 1 bits: x */
+    { 2, 3 },                     /* index 1: 2 bits: 0x */
+    { 4, /*-1*/ -32 },            /* index 2: 3 bits: 00x */
+    { /*1*/ -30, 5 },             /* index 3: 3 bits: 01x */
+    { /*-2*/ -33, /*2*/ -29 },    /* index 4: 4 bits: 000x */
+    { 6, 7 },                     /* index 5: 4 bits: 011x */
+    { /*-3*/ -34, /*3*/ -28 },    /* index 6: 5 bits: 0110x */
+    { 8, 9 },                     /* index 7: 5 bits: 0111x */
+    { /*-4*/ -35, /*4*/ -27 },    /* index 8: 6 bits: 01110x */
+    { 10, 11 },                   /* index 9: 6 bits: 01111x */
+    { /*-5*/ -36, /*5*/ -26 },    /* index 10: 7 bits: 011110x */
+    { 12, 13 },                   /* index 11: 7 bits: 011111x */
+    { /*-6*/ -37, /*6*/ -25 },    /* index 12: 8 bits: 0111110x */
+    { 14, 15 },                   /* index 13: 8 bits: 0111111x */
+    { /*7*/ -24, 16 },            /* index 14: 9 bits: 01111110x */
+    { 17, 18 },                   /* index 15: 9 bits: 01111111x */
+    { 19, /*-8*/ -39 },           /* index 16: 10 bits: 011111101x */
+    { /*8*/ -23, 20 },            /* index 17: 10 bits: 011111110x */
+    { 21, /*-7*/ -38 },           /* index 18: 10 bits: 011111111x */
+    { /*10*/ -21, 22 },           /* index 19: 11 bits: 0111111010x */
+    { 23, /*-9*/ -40 },           /* index 20: 11 bits: 0111111101x */
+    { /*9*/ -22, 24 },            /* index 21: 11 bits: 0111111110x */
+    { /*-11*/ -42, /*11*/ -20 },  /* index 22: 12 bits: 01111110101x */
+    { 25, 26 },                   /* index 23: 12 bits: 01111111010x */
+    { 27, /*-10*/ -41 },          /* index 24: 12 bits: 01111111101x */
+    { 28, /*-12*/ -43 },          /* index 25: 13 bits: 011111110100x */
+    { /*12*/ -19, 29 },           /* index 26: 13 bits: 011111110101x */
+    { 30, 31 },                   /* index 27: 13 bits: 011111111010x */
+    { 32, /*-14*/ -45 },          /* index 28: 14 bits: 0111111101000x */
+    { /*14*/ -17, 33 },           /* index 29: 14 bits: 0111111101011x */
+    { 34, /*-13*/ -44 },          /* index 30: 14 bits: 0111111110100x */
+    { /*13*/ -18, 35 },           /* index 31: 14 bits: 0111111110101x */
+    { 36, 37 },                   /* index 32: 15 bits: 01111111010000x */
+    { 38, /*-15*/ -46 },          /* index 33: 15 bits: 01111111010111x */
+    { /*15*/ -16, 39 },           /* index 34: 15 bits: 01111111101000x */
+    { 40, 41 },                   /* index 35: 15 bits: 01111111101011x */
+    { 42, 43 },                   /* index 36: 16 bits: 011111110100000x */
+    { /*-17*/ -48, /*17*/ -14 },  /* index 37: 16 bits: 011111110100001x */
+    { 44, 45 },                   /* index 38: 16 bits: 011111110101110x */
+    { 46, 47 },                   /* index 39: 16 bits: 011111111010001x */
+    { 48, 49 },                   /* index 40: 16 bits: 011111111010110x */
+    { /*-16*/ -47, /*16*/ -15 },  /* index 41: 16 bits: 011111111010111x */
+    { /*-21*/ -52, /*21*/ -10 },  /* index 42: 17 bits: 0111111101000000x */
+    { /*-19*/ -50, /*19*/ -12 },  /* index 43: 17 bits: 0111111101000001x */
+    { /*-18*/ -49, /*18*/ -13 },  /* index 44: 17 bits: 0111111101011100x */
+    { 50, 51 },                   /* index 45: 17 bits: 0111111101011101x */
+    { 52, 53 },                   /* index 46: 17 bits: 0111111110100010x */
+    { 54, 55 },                   /* index 47: 17 bits: 0111111110100011x */
+    { 56, 57 },                   /* index 48: 17 bits: 0111111110101100x */
+    { 58, 59 },                   /* index 49: 17 bits: 0111111110101101x */
+    { /*-26*/ -57, /*-25*/ -56 }, /* index 50: 18 bits: 01111111010111010x */
+    { /*-28*/ -59, /*-27*/ -58 }, /* index 51: 18 bits: 01111111010111011x */
+    { /*-22*/ -53, /*22*/ -9 },   /* index 52: 18 bits: 01111111101000100x */
+    { /*-24*/ -55, /*-23*/ -54 }, /* index 53: 18 bits: 01111111101000101x */
+    { /*25*/ -6, /*26*/ -5 },     /* index 54: 18 bits: 01111111101000110x */
+    { /*23*/ -8, /*24*/ -7 },     /* index 55: 18 bits: 01111111101000111x */
+    { /*29*/ -2, /*30*/ -1 },     /* index 56: 18 bits: 01111111101011000x */
+    { /*27*/ -4, /*28*/ -3 },     /* index 57: 18 bits: 01111111101011001x */
+    { /*-30*/ -61, /*-29*/ -60 }, /* index 58: 18 bits: 01111111101011010x */
+    { /*-20*/ -51, /*20*/ -11 }   /* index 59: 18 bits: 01111111101011011x */
+};
+
+static const int8_t t_huff_iid_fine[][2] = {
+    { 1, /*0*/ -31 },             /* index 0: 1 bits: x */
+    { /*1*/ -30, 2 },             /* index 1: 2 bits: 0x */
+    { 3, /*-1*/ -32 },            /* index 2: 3 bits: 01x */
+    { 4, 5 },                     /* index 3: 4 bits: 010x */
+    { 6, 7 },                     /* index 4: 5 bits: 0100x */
+    { /*-2*/ -33, /*2*/ -29 },    /* index 5: 5 bits: 0101x */
+    { 8, /*-3*/ -34 },            /* index 6: 6 bits: 01000x */
+    { /*3*/ -28, 9 },             /* index 7: 6 bits: 01001x */
+    { /*-4*/ -35, /*4*/ -27 },    /* index 8: 7 bits: 010000x */
+    { 10, 11 },                   /* index 9: 7 bits: 010011x */
+    { /*5*/ -26, 12 },            /* index 10: 8 bits: 0100110x */
+    { 13, 14 },                   /* index 11: 8 bits: 0100111x */
+    { /*-6*/ -37, /*6*/ -25 },    /* index 12: 9 bits: 01001101x */
+    { 15, 16 },                   /* index 13: 9 bits: 01001110x */
+    { 17, /*-5*/ -36 },           /* index 14: 9 bits: 01001111x */
+    { 18, /*-7*/ -38 },           /* index 15: 10 bits: 010011100x */
+    { /*7*/ -24, 19 },            /* index 16: 10 bits: 010011101x */
+    { 20, 21 },                   /* index 17: 10 bits: 010011110x */
+    { /*9*/ -22, 22 },            /* index 18: 11 bits: 0100111000x */
+    { 23, 24 },                   /* index 19: 11 bits: 0100111011x */
+    { /*-8*/ -39, /*8*/ -23 },    /* index 20: 11 bits: 0100111100x */
+    { 25, 26 },                   /* index 21: 11 bits: 0100111101x */
+    { /*11*/ -20, 27 },           /* index 22: 12 bits: 01001110001x */
+    { 28, 29 },                   /* index 23: 12 bits: 01001110110x */
+    { /*-10*/ -41, /*10*/ -21 },  /* index 24: 12 bits: 01001110111x */
+    { 30, 31 },                   /* index 25: 12 bits: 01001111010x */
+    { 32, /*-9*/ -40 },           /* index 26: 12 bits: 01001111011x */
+    { 33, /*-13*/ -44 },          /* index 27: 13 bits: 010011100011x */
+    { /*13*/ -18, 34 },           /* index 28: 13 bits: 010011101100x */
+    { 35, 36 },                   /* index 29: 13 bits: 010011101101x */
+    { 37, /*-12*/ -43 },          /* index 30: 13 bits: 010011110100x */
+    { /*12*/ -19, 38 },           /* index 31: 13 bits: 010011110101x */
+    { 39, /*-11*/ -42 },          /* index 32: 13 bits: 010011110110x */
+    { 40, 41 },                   /* index 33: 14 bits: 0100111000110x */
+    { 42, 43 },                   /* index 34: 14 bits: 0100111011001x */
+    { 44, 45 },                   /* index 35: 14 bits: 0100111011010x */
+    { 46, /*-15*/ -46 },          /* index 36: 14 bits: 0100111011011x */
+    { /*15*/ -16, 47 },           /* index 37: 14 bits: 0100111101000x */
+    { /*-14*/ -45, /*14*/ -17 },  /* index 38: 14 bits: 0100111101011x */
+    { 48, 49 },                   /* index 39: 14 bits: 0100111101100x */
+    { /*-21*/ -52, /*-20*/ -51 }, /* index 40: 15 bits: 01001110001100x */
+    { /*18*/ -13, /*19*/ -12 },   /* index 41: 15 bits: 01001110001101x */
+    { /*-19*/ -50, /*-18*/ -49 }, /* index 42: 15 bits: 01001110110010x */
+    { 50, 51 },                   /* index 43: 15 bits: 01001110110011x */
+    { 52, 53 },                   /* index 44: 15 bits: 01001110110100x */
+    { 54, 55 },                   /* index 45: 15 bits: 01001110110101x */
+    { 56, /*-17*/ -48 },          /* index 46: 15 bits: 01001110110110x */
+    { /*17*/ -14, 57 },           /* index 47: 15 bits: 01001111010001x */
+    { 58, /*-16*/ -47 },          /* index 48: 15 bits: 01001111011000x */
+    { /*16*/ -15, 59 },           /* index 49: 15 bits: 01001111011001x */
+    { /*-26*/ -57, /*26*/ -5 },   /* index 50: 16 bits: 010011101100110x */
+    { /*-28*/ -59, /*-27*/ -58 }, /* index 51: 16 bits: 010011101100111x */
+    { /*29*/ -2, /*30*/ -1 },     /* index 52: 16 bits: 010011101101000x */
+    { /*27*/ -4, /*28*/ -3 },     /* index 53: 16 bits: 010011101101001x */
+    { /*-30*/ -61, /*-29*/ -60 }, /* index 54: 16 bits: 010011101101010x */
+    { /*-25*/ -56, /*25*/ -6 },   /* index 55: 16 bits: 010011101101011x */
+    { /*-24*/ -55, /*24*/ -7 },   /* index 56: 16 bits: 010011101101100x */
+    { /*-23*/ -54, /*23*/ -8 },   /* index 57: 16 bits: 010011110100011x */
+    { /*-22*/ -53, /*22*/ -9 },   /* index 58: 16 bits: 010011110110000x */
+    { /*20*/ -11, /*21*/ -10 }    /* index 59: 16 bits: 010011110110011x */
+};
+
+static const int8_t f_huff_icc[][2] = {
+    { /*0*/ -31, 1 },            /* index 0: 1 bits: x */
+    { /*1*/ -30, 2 },            /* index 1: 2 bits: 1x */
+    { /*-1*/ -32, 3 },           /* index 2: 3 bits: 11x */
+    { /*2*/ -29, 4 },            /* index 3: 4 bits: 111x */
+    { /*-2*/ -33, 5 },           /* index 4: 5 bits: 1111x */
+    { /*3*/ -28, 6 },            /* index 5: 6 bits: 11111x */
+    { /*-3*/ -34, 7 },           /* index 6: 7 bits: 111111x */
+    { /*4*/ -27, 8 },            /* index 7: 8 bits: 1111111x */
+    { /*5*/ -26, 9 },            /* index 8: 9 bits: 11111111x */
+    { /*-4*/ -35, 10 },          /* index 9: 10 bits: 111111111x */
+    { /*6*/ -25, 11 },           /* index 10: 11 bits: 1111111111x */
+    { /*-5*/ -36, 12 },          /* index 11: 12 bits: 11111111111x */
+    { /*7*/ -24, 13 },           /* index 12: 13 bits: 111111111111x */
+    { /*-6*/ -37, /*-7*/ -38 }   /* index 13: 14 bits: 1111111111111x */
+};
+
+static const int8_t t_huff_icc[][2] = {
+    { /*0*/ -31, 1 },            /* index 0: 1 bits: x */
+    { /*1*/ -30, 2 },            /* index 1: 2 bits: 1x */
+    { /*-1*/ -32, 3 },           /* index 2: 3 bits: 11x */
+    { /*2*/ -29, 4 },            /* index 3: 4 bits: 111x */
+    { /*-2*/ -33, 5 },           /* index 4: 5 bits: 1111x */
+    { /*3*/ -28, 6 },            /* index 5: 6 bits: 11111x */
+    { /*-3*/ -34, 7 },           /* index 6: 7 bits: 111111x */
+    { /*4*/ -27, 8 },            /* index 7: 8 bits: 1111111x */
+    { /*-4*/ -35, 9 },           /* index 8: 9 bits: 11111111x */
+    { /*5*/ -26, 10 },           /* index 9: 10 bits: 111111111x */
+    { /*-5*/ -36, 11 },          /* index 10: 11 bits: 1111111111x */
+    { /*6*/ -25, 12 },           /* index 11: 12 bits: 11111111111x */
+    { /*-6*/ -37, 13 },          /* index 12: 13 bits: 111111111111x */
+    { /*-7*/ -38, /*7*/ -24 }    /* index 13: 14 bits: 1111111111111x */
+};
+
+static const int8_t f_huff_ipd[][2] = {
+    { 1, /*0*/ -31 },         /* index 0: 1 bits: x */
+    { 2, 3 },                 /* index 1: 2 bits: 0x */
+    { /*1*/ -30, 4 },         /* index 2: 3 bits: 00x */
+    { 5, 6 },                 /* index 3: 3 bits: 01x */
+    { /*4*/ -27, /*5*/ -26 }, /* index 4: 4 bits: 001x */
+    { /*3*/ -28, /*6*/ -25 }, /* index 5: 4 bits: 010x */
+    { /*2*/ -29, /*7*/ -24 }  /* index 6: 4 bits: 011x */
+};
+
+static const int8_t t_huff_ipd[][2] = {
+    { 1, /*0*/ -31 },         /* index 0: 1 bits: x */
+    { 2, 3 },                 /* index 1: 2 bits: 0x */
+    { 4, 5 },                 /* index 2: 3 bits: 00x */
+    { /*1*/ -30, /*7*/ -24 }, /* index 3: 3 bits: 01x */
+    { /*5*/ -26, 6 },         /* index 4: 4 bits: 000x */
+    { /*2*/ -29, /*6*/ -25 }, /* index 5: 4 bits: 001x */
+    { /*4*/ -27, /*3*/ -28 }  /* index 6: 5 bits: 0001x */
+};
+
+static const int8_t f_huff_opd[][2] = {
+    { 1, /*0*/ -31 },         /* index 0: 1 bits: x */
+    { 2, 3 },                 /* index 1: 2 bits: 0x */
+    { /*7*/ -24, /*1*/ -30 }, /* index 2: 3 bits: 00x */
+    { 4, 5 },                 /* index 3: 3 bits: 01x */
+    { /*3*/ -28, /*6*/ -25 }, /* index 4: 4 bits: 010x */
+    { /*2*/ -29, 6 },         /* index 5: 4 bits: 011x */
+    { /*5*/ -26, /*4*/ -27 }  /* index 6: 5 bits: 0111x */
+};
+
+static const int8_t t_huff_opd[][2] = {
+    { 1, /*0*/ -31 },         /* index 0: 1 bits: x */
+    { 2, 3 },                 /* index 1: 2 bits: 0x */
+    { 4, 5 },                 /* index 2: 3 bits: 00x */
+    { /*1*/ -30, /*7*/ -24 }, /* index 3: 3 bits: 01x */
+    { /*5*/ -26, 6 },         /* index 4: 4 bits: 000x */
+    { /*2*/ -29, /*6*/ -25 }, /* index 5: 4 bits: 001x */
+    { /*4*/ -27, /*3*/ -28 }  /* index 6: 5 bits: 0001x */
+};
+
+/* static function declarations */
+static uint16_t ps_extension(ps_info *ps, bitfile *ld,
+                             const uint8_t ps_extension_id,
+                             const uint16_t num_bits_left);
+static void huff_data(bitfile *ld, const uint8_t dt, const uint8_t nr_par,
+                      ps_huff_tab t_huff, ps_huff_tab f_huff, int8_t *par);
+static INLINE int8_t ps_huff_dec(bitfile *ld, ps_huff_tab t_huff);
+
+
+uint16_t ps_data(ps_info *ps, bitfile *ld)
+{
+    uint8_t tmp, n;
+    uint16_t bits = (uint16_t)faad_get_processed_bits(ld);
+
+    /* check for new PS header */
+    if (faad_get1bit(ld
+        DEBUGVAR(1,1000,"ps_data(): enable_ps_header")))
+    {
+        ps->use34hybrid_bands = 0;
+
+        /* Inter-channel Intensity Difference (IID) parameters enabled */
+        ps->enable_iid = (uint8_t)faad_get1bit(ld
+            DEBUGVAR(1,1001,"ps_data(): enable_iid"));
+
+        if (ps->enable_iid)
+        {
+            ps->iid_mode = (uint8_t)faad_getbits(ld, 3
+                DEBUGVAR(1,1002,"ps_data(): iid_mode"));
+
+            ps->nr_iid_par = nr_iid_par_tab[ps->iid_mode];
+            ps->nr_ipdopd_par = nr_ipdopd_par_tab[ps->iid_mode];
+
+            if (ps->iid_mode == 2 || ps->iid_mode == 5)
+                ps->use34hybrid_bands = 1;
+
+            /* IPD freq res equal to IID freq res */
+            ps->ipd_mode = ps->iid_mode;
+        }
+
+        /* Inter-channel Coherence (ICC) parameters enabled */
+        ps->enable_icc = (uint8_t)faad_get1bit(ld
+            DEBUGVAR(1,1003,"ps_data(): enable_icc"));
+
+        if (ps->enable_icc)
+        {
+            ps->icc_mode = (uint8_t)faad_getbits(ld, 3
+                DEBUGVAR(1,1004,"ps_data(): icc_mode"));
+
+            ps->nr_icc_par = nr_icc_par_tab[ps->icc_mode];
+
+            if (ps->icc_mode == 2 || ps->icc_mode == 5)
+                ps->use34hybrid_bands = 1;
+        }
+
+        /* PS extension layer enabled */
+        ps->enable_ext = (uint8_t)faad_get1bit(ld
+            DEBUGVAR(1,1005,"ps_data(): enable_ext"));
+    }
+
+    ps->frame_class = (uint8_t)faad_get1bit(ld
+        DEBUGVAR(1,1006,"ps_data(): frame_class"));
+    tmp = (uint8_t)faad_getbits(ld, 2
+        DEBUGVAR(1,1007,"ps_data(): num_env_idx"));
+
+    ps->num_env = num_env_tab[ps->frame_class][tmp];
+
+    if (ps->frame_class)
+    {
+        for (n = 1; n < ps->num_env+1; n++)
+        {
+            ps->border_position[n] = (uint8_t)faad_getbits(ld, 5
+                DEBUGVAR(1,1008,"ps_data(): border_position"));
+        }
+    }
+
+    if (ps->enable_iid)
+    {
+        for (n = 0; n < ps->num_env; n++)
+        {
+            ps->iid_dt[n] = (uint8_t)faad_get1bit(ld
+                DEBUGVAR(1,1009,"ps_data(): iid_dt"));
+
+            /* iid_data */
+            if (ps->iid_mode < 3)
+            {
+                huff_data(ld, ps->iid_dt[n], ps->nr_iid_par, t_huff_iid_def,
+                    f_huff_iid_def, ps->iid_index[n]);
+            } else {
+                huff_data(ld, ps->iid_dt[n], ps->nr_iid_par, t_huff_iid_fine,
+                    f_huff_iid_fine, ps->iid_index[n]);
+            }
+        }
+    }
+
+    if (ps->enable_icc)
+    {
+        for (n = 0; n < ps->num_env; n++)
+        {
+            ps->icc_dt[n] = (uint8_t)faad_get1bit(ld
+                DEBUGVAR(1,1010,"ps_data(): icc_dt"));
+
+            /* icc_data */
+            huff_data(ld, ps->icc_dt[n], ps->nr_icc_par, t_huff_icc,
+                f_huff_icc, ps->icc_index[n]);
+        }
+    }
+
+    if (ps->enable_ext)
+    {
+        uint16_t num_bits_left;
+        uint16_t cnt = (uint16_t)faad_getbits(ld, 4
+            DEBUGVAR(1,1011,"ps_data(): ps_extension_size"));
+        if (cnt == 15)
+        {
+            cnt += (uint16_t)faad_getbits(ld, 8
+                DEBUGVAR(1,1012,"ps_data(): esc_count"));
+        }
+
+        num_bits_left = 8 * cnt;
+        while (num_bits_left > 7)
+        {
+            uint8_t ps_extension_id = (uint8_t)faad_getbits(ld, 2
+                DEBUGVAR(1,1013,"ps_data(): ps_extension_size"));
+
+            num_bits_left -= 2;
+            num_bits_left -= ps_extension(ps, ld, ps_extension_id, num_bits_left);
+        }
+
+        faad_getbits(ld, num_bits_left
+            DEBUGVAR(1,1014,"ps_data(): fill_bits"));
+    }
+
+    bits = (uint16_t)faad_get_processed_bits(ld) - bits;
+
+    ps->ps_data_available = 1;
+
+    return bits;
+}
+
+static uint16_t ps_extension(ps_info *ps, bitfile *ld,
+                             const uint8_t ps_extension_id,
+                             const uint16_t num_bits_left)
+{
+    uint8_t n;
+    uint16_t bits = (uint16_t)faad_get_processed_bits(ld);
+
+    if (ps_extension_id == 0)
+    {
+        ps->enable_ipdopd = (uint8_t)faad_get1bit(ld
+            DEBUGVAR(1,1015,"ps_extension(): enable_ipdopd"));
+
+        if (ps->enable_ipdopd)
+        {
+            for (n = 0; n < ps->num_env; n++)
+            {
+                ps->ipd_dt[n] = (uint8_t)faad_get1bit(ld
+                    DEBUGVAR(1,1016,"ps_extension(): ipd_dt"));
+
+                /* ipd_data */
+                huff_data(ld, ps->ipd_dt[n], ps->nr_ipdopd_par, t_huff_ipd,
+                    f_huff_ipd, ps->ipd_index[n]);
+
+                ps->opd_dt[n] = (uint8_t)faad_get1bit(ld
+                    DEBUGVAR(1,1017,"ps_extension(): opd_dt"));
+
+                /* opd_data */
+                huff_data(ld, ps->opd_dt[n], ps->nr_ipdopd_par, t_huff_opd,
+                    f_huff_opd, ps->opd_index[n]);
+            }
+        }
+        faad_get1bit(ld
+            DEBUGVAR(1,1018,"ps_extension(): reserved_ps"));
+    }
+
+    /* return number of bits read */
+    bits = (uint16_t)faad_get_processed_bits(ld) - bits;
+
+    return bits;
+}
+
+/* read huffman data coded in either the frequency or the time direction */
+static void huff_data(bitfile *ld, const uint8_t dt, const uint8_t nr_par,
+                      ps_huff_tab t_huff, ps_huff_tab f_huff, int8_t *par)
+{
+    uint8_t n;
+
+    if (dt)
+    {
+        /* coded in time direction */
+        for (n = 0; n < nr_par; n++)
+        {
+            par[n] = ps_huff_dec(ld, t_huff);
+        }
+    } else {
+        /* coded in frequency direction */
+        par[0] = ps_huff_dec(ld, f_huff);
+
+        for (n = 1; n < nr_par; n++)
+        {
+            par[n] = ps_huff_dec(ld, f_huff);
+        }
+    }
+}
+
+/* binary search huffman decoding */
+static INLINE int8_t ps_huff_dec(bitfile *ld, ps_huff_tab t_huff)
+{
+    uint8_t bit;
+    int16_t index = 0;
+
+    while (index >= 0)
+    {
+        bit = (uint8_t)faad_get1bit(ld);
+        index = t_huff[index][bit];
+    }
+
+    return index + 31;
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libfaad2/ps_tables.h	Fri Sep 24 17:31:36 2004 +0000
@@ -0,0 +1,548 @@
+/*
+** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
+** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
+**
+** 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.
+**
+** Any non-GPL usage of this software or parts of this software is strictly
+** forbidden.
+**
+** Commercial non-GPL licensing of this software is possible.
+** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
+**
+** Initially modified for use with MPlayer by Diego Biurrun on 2004/09/24
+** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+**/
+
+#ifndef __PS_TABLES_H__
+#define __PS_TABLES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef _MSC_VER
+#pragma warning(disable:4305)
+#pragma warning(disable:4244)
+#endif
+
+#if 0
+#if 0
+float f_center_20[12] = {
+    0.5/4,  1.5/4,  2.5/4,  3.5/4,
+    4.5/4*0,  5.5/4*0, -1.5/4, -0.5/4,
+    3.5/2,  2.5/2,  4.5/2,  5.5/2
+};
+#else
+float f_center_20[12] = {
+    0.5/8,  1.5/8,  2.5/8,  3.5/8,
+    4.5/8*0,  5.5/8*0, -1.5/8, -0.5/8,
+    3.5/4,  2.5/4,  4.5/4,  5.5/4
+};
+#endif
+
+float f_center_34[32] = {
+    1/12,   3/12,   5/12,   7/12,
+    9/12,  11/12,  13/12,  15/12,
+    17/12, -5/12,  -3/12,  -1/12,
+    17/8,   19/8,    5/8,    7/8,
+    9/8,    11/8,   13/8,   15/8,
+    9/4,    11/4,   13/4,    7/4,
+    17/4,   11/4,   13/4,   15/4,
+    17/4,   19/4,   21/4,   15/4
+};
+
+static const real_t frac_delay_q[] = {
+    FRAC_CONST(0.43),
+    FRAC_CONST(0.75),
+    FRAC_CONST(0.347)
+};
+#endif
+
+/* RE(ps->Phi_Fract_Qmf[j]) = (float)cos(M_PI*(j+0.5)*(0.39)); */
+/* IM(ps->Phi_Fract_Qmf[j]) = (float)sin(M_PI*(j+0.5)*(0.39)); */
+static const complex_t Phi_Fract_Qmf[] = {
+    { FRAC_CONST(0.8181497455), FRAC_CONST(0.5750052333) },
+    { FRAC_CONST(-0.2638730407), FRAC_CONST(0.9645574093) },
+    { FRAC_CONST(-0.9969173074), FRAC_CONST(0.0784590989) },
+    { FRAC_CONST(-0.4115143716), FRAC_CONST(-0.9114032984) },
+    { FRAC_CONST(0.7181262970), FRAC_CONST(-0.6959127784) },
+    { FRAC_CONST(0.8980275989), FRAC_CONST(0.4399391711) },
+    { FRAC_CONST(-0.1097343117), FRAC_CONST(0.9939609766) },
+    { FRAC_CONST(-0.9723699093), FRAC_CONST(0.2334453613) },
+    { FRAC_CONST(-0.5490227938), FRAC_CONST(-0.8358073831) },
+    { FRAC_CONST(0.6004202366), FRAC_CONST(-0.7996846437) },
+    { FRAC_CONST(0.9557930231), FRAC_CONST(0.2940403223) },
+    { FRAC_CONST(0.0471064523), FRAC_CONST(0.9988898635) },
+    { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) },
+    { FRAC_CONST(-0.6730124950), FRAC_CONST(-0.7396311164) },
+    { FRAC_CONST(0.4679298103), FRAC_CONST(-0.8837656379) },
+    { FRAC_CONST(0.9900236726), FRAC_CONST(0.1409012377) },
+    { FRAC_CONST(0.2027872950), FRAC_CONST(0.9792228341) },
+    { FRAC_CONST(-0.8526401520), FRAC_CONST(0.5224985480) },
+    { FRAC_CONST(-0.7804304361), FRAC_CONST(-0.6252426505) },
+    { FRAC_CONST(0.3239174187), FRAC_CONST(-0.9460853338) },
+    { FRAC_CONST(0.9998766184), FRAC_CONST(-0.0157073177) },
+    { FRAC_CONST(0.3534748554), FRAC_CONST(0.9354440570) },
+    { FRAC_CONST(-0.7604059577), FRAC_CONST(0.6494480371) },
+    { FRAC_CONST(-0.8686315417), FRAC_CONST(-0.4954586625) },
+    { FRAC_CONST(0.1719291061), FRAC_CONST(-0.9851093292) },
+    { FRAC_CONST(0.9851093292), FRAC_CONST(-0.1719291061) },
+    { FRAC_CONST(0.4954586625), FRAC_CONST(0.8686315417) },
+    { FRAC_CONST(-0.6494480371), FRAC_CONST(0.7604059577) },
+    { FRAC_CONST(-0.9354440570), FRAC_CONST(-0.3534748554) },
+    { FRAC_CONST(0.0157073177), FRAC_CONST(-0.9998766184) },
+    { FRAC_CONST(0.9460853338), FRAC_CONST(-0.3239174187) },
+    { FRAC_CONST(0.6252426505), FRAC_CONST(0.7804304361) },
+    { FRAC_CONST(-0.5224985480), FRAC_CONST(0.8526401520) },
+    { FRAC_CONST(-0.9792228341), FRAC_CONST(-0.2027872950) },
+    { FRAC_CONST(-0.1409012377), FRAC_CONST(-0.9900236726) },
+    { FRAC_CONST(0.8837656379), FRAC_CONST(-0.4679298103) },
+    { FRAC_CONST(0.7396311164), FRAC_CONST(0.6730124950) },
+    { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) },
+    { FRAC_CONST(-0.9988898635), FRAC_CONST(-0.0471064523) },
+    { FRAC_CONST(-0.2940403223), FRAC_CONST(-0.9557930231) },
+    { FRAC_CONST(0.7996846437), FRAC_CONST(-0.6004202366) },
+    { FRAC_CONST(0.8358073831), FRAC_CONST(0.5490227938) },
+    { FRAC_CONST(-0.2334453613), FRAC_CONST(0.9723699093) },
+    { FRAC_CONST(-0.9939609766), FRAC_CONST(0.1097343117) },
+    { FRAC_CONST(-0.4399391711), FRAC_CONST(-0.8980275989) },
+    { FRAC_CONST(0.6959127784), FRAC_CONST(-0.7181262970) },
+    { FRAC_CONST(0.9114032984), FRAC_CONST(0.4115143716) },
+    { FRAC_CONST(-0.0784590989), FRAC_CONST(0.9969173074) },
+    { FRAC_CONST(-0.9645574093), FRAC_CONST(0.2638730407) },
+    { FRAC_CONST(-0.5750052333), FRAC_CONST(-0.8181497455) },
+    { FRAC_CONST(0.5750052333), FRAC_CONST(-0.8181497455) },
+    { FRAC_CONST(0.9645574093), FRAC_CONST(0.2638730407) },
+    { FRAC_CONST(0.0784590989), FRAC_CONST(0.9969173074) },
+    { FRAC_CONST(-0.9114032984), FRAC_CONST(0.4115143716) },
+    { FRAC_CONST(-0.6959127784), FRAC_CONST(-0.7181262970) },
+    { FRAC_CONST(0.4399391711), FRAC_CONST(-0.8980275989) },
+    { FRAC_CONST(0.9939609766), FRAC_CONST(0.1097343117) },
+    { FRAC_CONST(0.2334453613), FRAC_CONST(0.9723699093) },
+    { FRAC_CONST(-0.8358073831), FRAC_CONST(0.5490227938) },
+    { FRAC_CONST(-0.7996846437), FRAC_CONST(-0.6004202366) },
+    { FRAC_CONST(0.2940403223), FRAC_CONST(-0.9557930231) },
+    { FRAC_CONST(0.9988898635), FRAC_CONST(-0.0471064523) },
+    { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) },
+    { FRAC_CONST(-0.7396311164), FRAC_CONST(0.6730124950) }
+};
+
+/* RE(Phi_Fract_SubQmf20[j]) = (float)cos(M_PI*f_center_20[j]*0.39); */
+/* IM(Phi_Fract_SubQmf20[j]) = (float)sin(M_PI*f_center_20[j]*0.39); */
+static const complex_t Phi_Fract_SubQmf20[] = {
+    { FRAC_CONST(0.9882950187), FRAC_CONST(0.1525546312) },
+    { FRAC_CONST(0.8962930441), FRAC_CONST(0.4434623122) },
+    { FRAC_CONST(0.7208535671), FRAC_CONST(0.6930873394) },
+    { FRAC_CONST(0.4783087075), FRAC_CONST(0.8781917691) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(0.8962930441), FRAC_CONST(-0.4434623122) },
+    { FRAC_CONST(0.9882950187), FRAC_CONST(-0.1525546312) },
+    { FRAC_CONST(-0.5424415469), FRAC_CONST(0.8400935531) },
+    { FRAC_CONST(0.0392598175), FRAC_CONST(0.9992290139) },
+    { FRAC_CONST(-0.9268565774), FRAC_CONST(0.3754155636) },
+    { FRAC_CONST(-0.9741733670), FRAC_CONST(-0.2258012742) }
+};
+
+/* RE(Phi_Fract_SubQmf34[j]) = (float)cos(M_PI*f_center_34[j]*0.39); */
+/* IM(Phi_Fract_SubQmf34[j]) = (float)sin(M_PI*f_center_34[j]*0.39); */
+static const complex_t Phi_Fract_SubQmf34[] = {
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
+    { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
+    { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
+    { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) },
+    { FRAC_CONST(0.3387379348), FRAC_CONST(0.9408807755) },
+    { FRAC_CONST(0.1873813123), FRAC_CONST(-0.9822872281) },
+    { FRAC_CONST(-0.7705132365), FRAC_CONST(0.6374239922) },
+    { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) },
+    { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) },
+    { FRAC_CONST(0.1873813123), FRAC_CONST(-0.9822872281) },
+    { FRAC_CONST(0.1873813123), FRAC_CONST(-0.9822872281) },
+    { FRAC_CONST(0.9876883626), FRAC_CONST(-0.1564344615) },
+    { FRAC_CONST(-0.8607420325), FRAC_CONST(-0.5090414286) }
+};
+
+/* RE(Q_Fract_allpass_Qmf[j][i]) = (float)cos(M_PI*(j+0.5)*(frac_delay_q[i])); */
+/* IM(Q_Fract_allpass_Qmf[j][i]) = (float)sin(M_PI*(j+0.5)*(frac_delay_q[i])); */
+static const complex_t Q_Fract_allpass_Qmf[][3] = {
+    { { FRAC_CONST(0.7804303765), FRAC_CONST(0.6252426505) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.8550928831), FRAC_CONST(0.5184748173) } },
+    { { FRAC_CONST(-0.4399392009), FRAC_CONST(0.8980275393) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.0643581524), FRAC_CONST(0.9979268909) } },
+    { { FRAC_CONST(-0.9723699093), FRAC_CONST(-0.2334454209) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.9146071672), FRAC_CONST(0.4043435752) } },
+    { { FRAC_CONST(0.0157073960), FRAC_CONST(-0.9998766184) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.7814115286), FRAC_CONST(-0.6240159869) } },
+    { { FRAC_CONST(0.9792228341), FRAC_CONST(-0.2027871907) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.1920081824), FRAC_CONST(-0.9813933372) } },
+    { { FRAC_CONST(0.4115142524), FRAC_CONST(0.9114032984) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.9589683414), FRAC_CONST(-0.2835132182) } },
+    { { FRAC_CONST(-0.7996847630), FRAC_CONST(0.6004201174) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.6947838664), FRAC_CONST(0.7192186117) } },
+    { { FRAC_CONST(-0.7604058385), FRAC_CONST(-0.6494481564) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.3164770305), FRAC_CONST(0.9486001730) } },
+    { { FRAC_CONST(0.4679299891), FRAC_CONST(-0.8837655187) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.9874414206), FRAC_CONST(0.1579856575) } },
+    { { FRAC_CONST(0.9645573497), FRAC_CONST(0.2638732493) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.5966450572), FRAC_CONST(-0.8025052547) } },
+    { { FRAC_CONST(-0.0471066870), FRAC_CONST(0.9988898635) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.4357025325), FRAC_CONST(-0.9000906944) } },
+    { { FRAC_CONST(-0.9851093888), FRAC_CONST(0.1719288528) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9995546937), FRAC_CONST(-0.0298405960) } },
+    { { FRAC_CONST(-0.3826831877), FRAC_CONST(-0.9238796234) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.4886211455), FRAC_CONST(0.8724960685) } },
+    { { FRAC_CONST(0.8181498647), FRAC_CONST(-0.5750049949) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.5477093458), FRAC_CONST(0.8366686702) } },
+    { { FRAC_CONST(0.7396308780), FRAC_CONST(0.6730127335) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9951074123), FRAC_CONST(-0.0987988561) } },
+    { { FRAC_CONST(-0.4954589605), FRAC_CONST(0.8686313629) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.3725017905), FRAC_CONST(-0.9280315042) } },
+    { { FRAC_CONST(-0.9557929039), FRAC_CONST(-0.2940406799) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.6506417990), FRAC_CONST(-0.7593847513) } },
+    { { FRAC_CONST(0.0784594864), FRAC_CONST(-0.9969173074) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9741733670), FRAC_CONST(0.2258014232) } },
+    { { FRAC_CONST(0.9900237322), FRAC_CONST(-0.1409008205) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.2502108514), FRAC_CONST(0.9681913853) } },
+    { { FRAC_CONST(0.3534744382), FRAC_CONST(0.9354441762) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.7427945137), FRAC_CONST(0.6695194840) } },
+    { { FRAC_CONST(-0.8358076215), FRAC_CONST(0.5490224361) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9370992780), FRAC_CONST(-0.3490629196) } },
+    { { FRAC_CONST(-0.7181259394), FRAC_CONST(-0.6959131360) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.1237744763), FRAC_CONST(-0.9923103452) } },
+    { { FRAC_CONST(0.5224990249), FRAC_CONST(-0.8526399136) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.8226406574), FRAC_CONST(-0.5685616732) } },
+    { { FRAC_CONST(0.9460852146), FRAC_CONST(0.3239179254) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.8844994903), FRAC_CONST(0.4665412009) } },
+    { { FRAC_CONST(-0.1097348556), FRAC_CONST(0.9939609170) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.0047125919), FRAC_CONST(0.9999889135) } },
+    { { FRAC_CONST(-0.9939610362), FRAC_CONST(0.1097337380) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8888573647), FRAC_CONST(0.4581840038) } },
+    { { FRAC_CONST(-0.3239168525), FRAC_CONST(-0.9460855722) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8172453642), FRAC_CONST(-0.5762898922) } },
+    { { FRAC_CONST(0.8526405096), FRAC_CONST(-0.5224980116) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.1331215799), FRAC_CONST(-0.9910997152) } },
+    { { FRAC_CONST(0.6959123611), FRAC_CONST(0.7181267142) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.9403476119), FRAC_CONST(-0.3402152061) } },
+    { { FRAC_CONST(-0.5490233898), FRAC_CONST(0.8358070254) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.7364512086), FRAC_CONST(0.6764906645) } },
+    { { FRAC_CONST(-0.9354437590), FRAC_CONST(-0.3534754813) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.2593250275), FRAC_CONST(0.9657900929) } },
+    { { FRAC_CONST(0.1409019381), FRAC_CONST(-0.9900235534) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9762582779), FRAC_CONST(0.2166097313) } },
+    { { FRAC_CONST(0.9969173670), FRAC_CONST(-0.0784583688) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.6434556246), FRAC_CONST(-0.7654833794) } },
+    { { FRAC_CONST(0.2940396070), FRAC_CONST(0.9557932615) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.3812320232), FRAC_CONST(-0.9244794250) } },
+    { { FRAC_CONST(-0.8686318994), FRAC_CONST(0.4954580069) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9959943891), FRAC_CONST(-0.0894154981) } },
+    { { FRAC_CONST(-0.6730118990), FRAC_CONST(-0.7396316528) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.5397993922), FRAC_CONST(0.8417937160) } },
+    { { FRAC_CONST(0.5750059485), FRAC_CONST(-0.8181492686) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.4968227744), FRAC_CONST(0.8678520322) } },
+    { { FRAC_CONST(0.9238792062), FRAC_CONST(0.3826842010) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9992290139), FRAC_CONST(-0.0392601527) } },
+    { { FRAC_CONST(-0.1719299555), FRAC_CONST(0.9851091504) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.4271997511), FRAC_CONST(-0.9041572809) } },
+    { { FRAC_CONST(-0.9988899231), FRAC_CONST(0.0471055657) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.6041822433), FRAC_CONST(-0.7968461514) } },
+    { { FRAC_CONST(-0.2638721764), FRAC_CONST(-0.9645576477) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9859085083), FRAC_CONST(0.1672853529) } },
+    { { FRAC_CONST(0.8837660551), FRAC_CONST(-0.4679289758) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.3075223565), FRAC_CONST(0.9515408874) } },
+    { { FRAC_CONST(0.6494473219), FRAC_CONST(0.7604066133) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.7015317082), FRAC_CONST(0.7126382589) } },
+    { { FRAC_CONST(-0.6004210114), FRAC_CONST(0.7996840477) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.9562535882), FRAC_CONST(-0.2925389707) } },
+    { { FRAC_CONST(-0.9114028811), FRAC_CONST(-0.4115152657) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.1827499419), FRAC_CONST(-0.9831594229) } },
+    { { FRAC_CONST(0.2027882934), FRAC_CONST(-0.9792225957) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.7872582674), FRAC_CONST(-0.6166234016) } },
+    { { FRAC_CONST(0.9998766780), FRAC_CONST(-0.0157062728) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.9107555747), FRAC_CONST(0.4129458666) } },
+    { { FRAC_CONST(0.2334443331), FRAC_CONST(0.9723701477) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.0549497530), FRAC_CONST(0.9984891415) } },
+    { { FRAC_CONST(-0.8980280757), FRAC_CONST(0.4399381876) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.8599416018), FRAC_CONST(0.5103924870) } },
+    { { FRAC_CONST(-0.6252418160), FRAC_CONST(-0.7804310918) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(-0.8501682281), FRAC_CONST(-0.5265110731) } },
+    { { FRAC_CONST(0.6252435446), FRAC_CONST(-0.7804297209) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.0737608299), FRAC_CONST(-0.9972759485) } },
+    { { FRAC_CONST(0.8980270624), FRAC_CONST(0.4399402142) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.9183775187), FRAC_CONST(-0.3957053721) } },
+    { { FRAC_CONST(-0.2334465086), FRAC_CONST(0.9723696709) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.7754954696), FRAC_CONST(0.6313531399) } },
+    { { FRAC_CONST(-0.9998766184), FRAC_CONST(-0.0157085191) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.2012493610), FRAC_CONST(0.9795400500) } },
+    { { FRAC_CONST(-0.2027861029), FRAC_CONST(-0.9792230725) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.9615978599), FRAC_CONST(0.2744622827) } },
+    { { FRAC_CONST(0.9114037752), FRAC_CONST(-0.4115132093) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.6879743338), FRAC_CONST(-0.7257350087) } },
+    { { FRAC_CONST(0.6004192233), FRAC_CONST(0.7996854186) }, { FRAC_CONST(0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(0.3254036009), FRAC_CONST(-0.9455752373) } },
+    { { FRAC_CONST(-0.6494490504), FRAC_CONST(0.7604051232) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.9888865948), FRAC_CONST(-0.1486719251) } },
+    { { FRAC_CONST(-0.8837650418), FRAC_CONST(-0.4679309726) }, { FRAC_CONST(0.9238795042), FRAC_CONST(-0.3826834261) }, { FRAC_CONST(0.5890548825), FRAC_CONST(0.8080930114) } },
+    { { FRAC_CONST(0.2638743520), FRAC_CONST(-0.9645570517) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(0.9238795042) }, { FRAC_CONST(-0.4441666007), FRAC_CONST(0.8959442377) } },
+    { { FRAC_CONST(0.9988898039), FRAC_CONST(0.0471078083) }, { FRAC_CONST(-0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(-0.9997915030), FRAC_CONST(0.0204183888) } },
+    { { FRAC_CONST(0.1719277352), FRAC_CONST(0.9851095676) }, { FRAC_CONST(0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(-0.4803760946), FRAC_CONST(-0.8770626187) } },
+    { { FRAC_CONST(-0.9238800406), FRAC_CONST(0.3826821446) }, { FRAC_CONST(-0.9238795042), FRAC_CONST(0.3826834261) }, { FRAC_CONST(0.5555707216), FRAC_CONST(-0.8314692974) } },
+    { { FRAC_CONST(-0.5750041008), FRAC_CONST(-0.8181505203) }, { FRAC_CONST(0.3826834261), FRAC_CONST(-0.9238795042) }, { FRAC_CONST(0.9941320419), FRAC_CONST(0.1081734300) } }
+};
+
+/* RE(Q_Fract_allpass_SubQmf20[j][i]) = (float)cos(M_PI*f_center_20[j]*frac_delay_q[i]); */
+/* IM(Q_Fract_allpass_SubQmf20[j][i]) = (float)sin(M_PI*f_center_20[j]*frac_delay_q[i]); */
+static const complex_t Q_Fract_allpass_SubQmf20[][3] = {
+    { { FRAC_CONST(0.9857769012), FRAC_CONST(0.1680592746) }, { FRAC_CONST(0.9569403529), FRAC_CONST(0.2902846634) }, { FRAC_CONST(0.9907300472), FRAC_CONST(0.1358452588) } },
+    { { FRAC_CONST(0.8744080663), FRAC_CONST(0.4851911962) }, { FRAC_CONST(0.6343932748), FRAC_CONST(0.7730104327) }, { FRAC_CONST(0.9175986052), FRAC_CONST(0.3975082636) } },
+    { { FRAC_CONST(0.6642524004), FRAC_CONST(0.7475083470) }, { FRAC_CONST(0.0980171412), FRAC_CONST(0.9951847196) }, { FRAC_CONST(0.7767338753), FRAC_CONST(0.6298289299) } },
+    { { FRAC_CONST(0.3790524006), FRAC_CONST(0.9253752232) }, { FRAC_CONST(-0.4713967443), FRAC_CONST(0.8819212914) }, { FRAC_CONST(0.5785340071), FRAC_CONST(0.8156582713) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(0.8744080663), FRAC_CONST(-0.4851911962) }, { FRAC_CONST(0.6343932748), FRAC_CONST(-0.7730104327) }, { FRAC_CONST(0.9175986052), FRAC_CONST(-0.3975082636) } },
+    { { FRAC_CONST(0.9857769012), FRAC_CONST(-0.1680592746) }, { FRAC_CONST(0.9569403529), FRAC_CONST(-0.2902846634) }, { FRAC_CONST(0.9907300472), FRAC_CONST(-0.1358452588) } },
+    { { FRAC_CONST(-0.7126385570), FRAC_CONST(0.7015314102) }, { FRAC_CONST(-0.5555702448), FRAC_CONST(-0.8314695954) }, { FRAC_CONST(-0.3305967748), FRAC_CONST(0.9437720776) } },
+    { { FRAC_CONST(-0.1175374240), FRAC_CONST(0.9930684566) }, { FRAC_CONST(-0.9807852507), FRAC_CONST(0.1950903237) }, { FRAC_CONST(0.2066311091), FRAC_CONST(0.9784189463) } },
+    { { FRAC_CONST(-0.9947921634), FRAC_CONST(0.1019244045) }, { FRAC_CONST(0.5555702448), FRAC_CONST(-0.8314695954) }, { FRAC_CONST(-0.7720130086), FRAC_CONST(0.6356067061) } },
+    { { FRAC_CONST(-0.8400934935), FRAC_CONST(-0.5424416065) }, { FRAC_CONST(0.9807852507), FRAC_CONST(0.1950903237) }, { FRAC_CONST(-0.9896889329), FRAC_CONST(0.1432335079) } }
+};
+
+/* RE(Q_Fract_allpass_SubQmf34[j][i]) = (float)cos(M_PI*f_center_34[j]*frac_delay_q[i]); */
+/* IM(Q_Fract_allpass_SubQmf34[j][i]) = (float)sin(M_PI*f_center_34[j]*frac_delay_q[i]); */
+static const complex_t Q_Fract_allpass_SubQmf34[][3] = {
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
+    { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(1.0000000000), FRAC_CONST(0.0000000000) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
+    { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
+    { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } },
+    { { FRAC_CONST(0.2181432247), FRAC_CONST(0.9759167433) }, { FRAC_CONST(-0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(0.4623677433), FRAC_CONST(0.8866882324) } },
+    { { FRAC_CONST(0.6374240518), FRAC_CONST(-0.7705131769) }, { FRAC_CONST(-1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(-0.3446428776), FRAC_CONST(-0.9387338758) } },
+    { { FRAC_CONST(-0.9048270583), FRAC_CONST(0.4257792532) }, { FRAC_CONST(-0.0000000000), FRAC_CONST(-1.0000000000) }, { FRAC_CONST(-0.5724321604), FRAC_CONST(0.8199520707) } },
+    { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } },
+    { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } },
+    { { FRAC_CONST(0.6374240518), FRAC_CONST(-0.7705131769) }, { FRAC_CONST(-1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(-0.3446428776), FRAC_CONST(-0.9387338758) } },
+    { { FRAC_CONST(0.6374240518), FRAC_CONST(-0.7705131769) }, { FRAC_CONST(-1.0000000000), FRAC_CONST(0.0000000000) }, { FRAC_CONST(-0.3446428776), FRAC_CONST(-0.9387338758) } },
+    { { FRAC_CONST(0.8910064697), FRAC_CONST(0.4539906085) }, { FRAC_CONST(0.7071067691), FRAC_CONST(-0.7071067691) }, { FRAC_CONST(0.6730125546), FRAC_CONST(-0.7396310568) } },
+    { { FRAC_CONST(-0.6129069924), FRAC_CONST(-0.7901550531) }, { FRAC_CONST(0.7071067691), FRAC_CONST(0.7071067691) }, { FRAC_CONST(-0.9917160273), FRAC_CONST(-0.1284494549) } }
+};
+
+#if 0
+static float quant_rho[8] =
+{
+    FRAC_CONST(1.0), FRAC_CONST(0.937), FRAC_CONST(0.84118), FRAC_CONST(0.60092),
+    FRAC_CONST(0.36764), FRAC_CONST(0.0), FRAC_CONST(-0.589), FRAC_CONST(-1.0)
+};
+
+static const uint8_t quant_iid_normal[7] =
+{
+    2, 4, 7, 10, 14, 18, 25
+};
+
+static const uint8_t quant_iid_fine[15] =
+{
+    2, 4, 6, 8, 10, 13, 16, 19, 22, 25, 30, 35, 40, 45, 50
+};
+#endif
+
+static const real_t cos_alphas[] = {
+    COEF_CONST(1.0000000000), COEF_CONST(0.9841239700), COEF_CONST(0.9594738210),
+    COEF_CONST(0.8946843079), COEF_CONST(0.8269340931), COEF_CONST(0.7071067812),
+    COEF_CONST(0.4533210856), COEF_CONST(0.0000000000)
+};
+
+static const real_t sin_alphas[] = {
+    COEF_CONST(0.0000000000), COEF_CONST(0.1774824264), COEF_CONST(0.2817977763),
+    COEF_CONST(0.4466989918), COEF_CONST(0.5622988580), COEF_CONST(0.7071067812),
+    COEF_CONST(0.8913472911), COEF_CONST(1.0000000000)
+};
+
+static const real_t cos_betas_normal[][8] = {
+    { COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9995871699), COEF_CONST(0.9989419133), COEF_CONST(0.9972204583), COEF_CONST(0.9953790839), COEF_CONST(0.9920112747), COEF_CONST(0.9843408180), COEF_CONST(0.9681727381) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9984497744), COEF_CONST(0.9960279377), COEF_CONST(0.9895738413), COEF_CONST(0.9826814632), COEF_CONST(0.9701058164), COEF_CONST(0.9416098832), COEF_CONST(0.8822105900) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9959398908), COEF_CONST(0.9896038018), COEF_CONST(0.9727589768), COEF_CONST(0.9548355329), COEF_CONST(0.9223070404), COEF_CONST(0.8494349490), COEF_CONST(0.7013005535) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9932417400), COEF_CONST(0.9827071856), COEF_CONST(0.9547730996), COEF_CONST(0.9251668930), COEF_CONST(0.8717461589), COEF_CONST(0.7535520592), COEF_CONST(0.5198827312) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9902068095), COEF_CONST(0.9749613872), COEF_CONST(0.9346538534), COEF_CONST(0.8921231300), COEF_CONST(0.8158851259), COEF_CONST(0.6495964302), COEF_CONST(0.3313370772) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9880510933), COEF_CONST(0.9694670261), COEF_CONST(0.9204347876), COEF_CONST(0.8688622825), COEF_CONST(0.7768516704), COEF_CONST(0.5782161800), COEF_CONST(0.2069970356) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9858996945), COEF_CONST(0.9639898866), COEF_CONST(0.9063034786), COEF_CONST(0.8458214608), COEF_CONST(0.7384262300), COEF_CONST(0.5089811277), COEF_CONST(0.0905465944) }
+};
+
+static const real_t sin_betas_normal[][8] = {
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0287313368), COEF_CONST(-0.0459897147), COEF_CONST(-0.0745074328), COEF_CONST(-0.0960233266), COEF_CONST(-0.1261492408), COEF_CONST(-0.1762757894), COEF_CONST(-0.2502829383) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0556601118), COEF_CONST(-0.0890412670), COEF_CONST(-0.1440264301), COEF_CONST(-0.1853028382), COEF_CONST(-0.2426823129), COEF_CONST(-0.3367058477), COEF_CONST(-0.4708550466) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0900207420), COEF_CONST(-0.1438204281), COEF_CONST(-0.2318188366), COEF_CONST(-0.2971348264), COEF_CONST(-0.3864579191), COEF_CONST(-0.5276933461), COEF_CONST(-0.7128657193) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1160639735), COEF_CONST(-0.1851663774), COEF_CONST(-0.2973353800), COEF_CONST(-0.3795605619), COEF_CONST(-0.4899577884), COEF_CONST(-0.6573882369), COEF_CONST(-0.8542376401) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1396082894), COEF_CONST(-0.2223742196), COEF_CONST(-0.3555589603), COEF_CONST(-0.4517923427), COEF_CONST(-0.5782140273), COEF_CONST(-0.7602792104), COEF_CONST(-0.9435124489) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1541266914), COEF_CONST(-0.2452217065), COEF_CONST(-0.3908961522), COEF_CONST(-0.4950538699), COEF_CONST(-0.6296836366), COEF_CONST(-0.8158836002), COEF_CONST(-0.9783415698) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1673373610), COEF_CONST(-0.2659389001), COEF_CONST(-0.4226275012), COEF_CONST(-0.5334660781), COEF_CONST(-0.6743342664), COEF_CONST(-0.8607776784), COEF_CONST(-0.9958922202) }
+};
+
+static const real_t cos_betas_fine[][8] = {
+    { COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000), COEF_CONST(1.0000000000) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9995871699), COEF_CONST(0.9989419133), COEF_CONST(0.9972204583), COEF_CONST(0.9953790839), COEF_CONST(0.9920112747), COEF_CONST(0.9843408180), COEF_CONST(0.9681727381) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9984497744), COEF_CONST(0.9960279377), COEF_CONST(0.9895738413), COEF_CONST(0.9826814632), COEF_CONST(0.9701058164), COEF_CONST(0.9416098832), COEF_CONST(0.8822105900) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9968361371), COEF_CONST(0.9918968104), COEF_CONST(0.9787540479), COEF_CONST(0.9647515190), COEF_CONST(0.9392903010), COEF_CONST(0.8820167114), COEF_CONST(0.7645325390) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9950262915), COEF_CONST(0.9872675041), COEF_CONST(0.9666584578), COEF_CONST(0.9447588606), COEF_CONST(0.9050918405), COEF_CONST(0.8165997379), COEF_CONST(0.6383824796) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9932417400), COEF_CONST(0.9827071856), COEF_CONST(0.9547730996), COEF_CONST(0.9251668930), COEF_CONST(0.8717461589), COEF_CONST(0.7535520592), COEF_CONST(0.5198827312) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9908827998), COEF_CONST(0.9766855904), COEF_CONST(0.9391249214), COEF_CONST(0.8994531782), COEF_CONST(0.8282352693), COEF_CONST(0.6723983174), COEF_CONST(0.3719473225) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9890240165), COEF_CONST(0.9719459866), COEF_CONST(0.9268448110), COEF_CONST(0.8793388536), COEF_CONST(0.7944023271), COEF_CONST(0.6101812098), COEF_CONST(0.2621501145) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9876350461), COEF_CONST(0.9684073447), COEF_CONST(0.9176973944), COEF_CONST(0.8643930070), COEF_CONST(0.7693796058), COEF_CONST(0.5646720713), COEF_CONST(0.1838899556) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9866247085), COEF_CONST(0.9658349704), COEF_CONST(0.9110590761), COEF_CONST(0.8535668048), COEF_CONST(0.7513165426), COEF_CONST(0.5320914819), COEF_CONST(0.1289530943) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9858996945), COEF_CONST(0.9639898866), COEF_CONST(0.9063034786), COEF_CONST(0.8458214608), COEF_CONST(0.7384262300), COEF_CONST(0.5089811277), COEF_CONST(0.0905465944) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9851245614), COEF_CONST(0.9620180268), COEF_CONST(0.9012265590), COEF_CONST(0.8375623272), COEF_CONST(0.7247108045), COEF_CONST(0.4845204297), COEF_CONST(0.0504115003) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9846869856), COEF_CONST(0.9609052357), COEF_CONST(0.8983639533), COEF_CONST(0.8329098386), COEF_CONST(0.7169983441), COEF_CONST(0.4708245354), COEF_CONST(0.0281732509) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9844406325), COEF_CONST(0.9602788522), COEF_CONST(0.8967533934), COEF_CONST(0.8302936455), COEF_CONST(0.7126658102), COEF_CONST(0.4631492839), COEF_CONST(0.0157851140) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9843020502), COEF_CONST(0.9599265269), COEF_CONST(0.8958477331), COEF_CONST(0.8288229094), COEF_CONST(0.7102315840), COEF_CONST(0.4588429315), COEF_CONST(0.0088578059) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9842241136), COEF_CONST(0.9597283916), COEF_CONST(0.8953385094), COEF_CONST(0.8279961409), COEF_CONST(0.7088635748), COEF_CONST(0.4564246834), COEF_CONST(0.0049751355) }
+};
+
+static const real_t sin_betas_fine[][8] = {
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000), COEF_CONST(0.0000000000) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0287313368), COEF_CONST(-0.0459897147), COEF_CONST(-0.0745074328), COEF_CONST(-0.0960233266), COEF_CONST(-0.1261492408), COEF_CONST(-0.1762757894), COEF_CONST(-0.2502829383) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0556601118), COEF_CONST(-0.0890412670), COEF_CONST(-0.1440264301), COEF_CONST(-0.1853028382), COEF_CONST(-0.2426823129), COEF_CONST(-0.3367058477), COEF_CONST(-0.4708550466) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0794840594), COEF_CONST(-0.1270461238), COEF_CONST(-0.2050378347), COEF_CONST(-0.2631625097), COEF_CONST(-0.3431234916), COEF_CONST(-0.4712181245), COEF_CONST(-0.6445851354) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.0996126459), COEF_CONST(-0.1590687758), COEF_CONST(-0.2560691819), COEF_CONST(-0.3277662204), COEF_CONST(-0.4252161335), COEF_CONST(-0.5772043556), COEF_CONST(-0.7697193058) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1160639735), COEF_CONST(-0.1851663774), COEF_CONST(-0.2973353800), COEF_CONST(-0.3795605619), COEF_CONST(-0.4899577884), COEF_CONST(-0.6573882369), COEF_CONST(-0.8542376401) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1347266752), COEF_CONST(-0.2146747714), COEF_CONST(-0.3435758752), COEF_CONST(-0.4370171396), COEF_CONST(-0.5603805303), COEF_CONST(-0.7401895046), COEF_CONST(-0.9282538388) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1477548470), COEF_CONST(-0.2352041647), COEF_CONST(-0.3754446647), COEF_CONST(-0.4761965776), COEF_CONST(-0.6073919186), COEF_CONST(-0.7922618830), COEF_CONST(-0.9650271071) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1567705832), COEF_CONST(-0.2493736450), COEF_CONST(-0.3972801182), COEF_CONST(-0.5028167951), COEF_CONST(-0.6387918458), COEF_CONST(-0.8253153651), COEF_CONST(-0.9829468369) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1630082348), COEF_CONST(-0.2591578860), COEF_CONST(-0.4122758299), COEF_CONST(-0.5209834064), COEF_CONST(-0.6599420072), COEF_CONST(-0.8466868694), COEF_CONST(-0.9916506943) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1673373610), COEF_CONST(-0.2659389001), COEF_CONST(-0.4226275012), COEF_CONST(-0.5334660781), COEF_CONST(-0.6743342664), COEF_CONST(-0.8607776784), COEF_CONST(-0.9958922202) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1718417832), COEF_CONST(-0.2729859267), COEF_CONST(-0.4333482310), COEF_CONST(-0.5463417868), COEF_CONST(-0.6890531546), COEF_CONST(-0.8747799456), COEF_CONST(-0.9987285320) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1743316967), COEF_CONST(-0.2768774604), COEF_CONST(-0.4392518725), COEF_CONST(-0.5534087104), COEF_CONST(-0.6970748701), COEF_CONST(-0.8822268738), COEF_CONST(-0.9996030552) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1757175038), COEF_CONST(-0.2790421580), COEF_CONST(-0.4425306221), COEF_CONST(-0.5573261722), COEF_CONST(-0.7015037013), COEF_CONST(-0.8862802834), COEF_CONST(-0.9998754073) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1764921355), COEF_CONST(-0.2802517850), COEF_CONST(-0.4443611583), COEF_CONST(-0.5595110229), COEF_CONST(-0.7039681080), COEF_CONST(-0.8885173967), COEF_CONST(-0.9999607689) },
+    { COEF_CONST(0.0000000000), COEF_CONST(-0.1769262394), COEF_CONST(-0.2809295540), COEF_CONST(-0.4453862969), COEF_CONST(-0.5607337966), COEF_CONST(-0.7053456119), COEF_CONST(-0.8897620516), COEF_CONST(-0.9999876239) }
+};
+
+static const real_t sincos_alphas_B_normal[][8] = {
+    { COEF_CONST(0.0561454100), COEF_CONST(0.0526385859), COEF_CONST(0.0472937334), COEF_CONST(0.0338410641), COEF_CONST(0.0207261065), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635) },
+    { COEF_CONST(0.1249065138), COEF_CONST(0.1173697697), COEF_CONST(0.1057888284), COEF_CONST(0.0761985131), COEF_CONST(0.0468732723), COEF_CONST(0.0063956103), COEF_CONST(0.0063956103), COEF_CONST(0.0063956103) },
+    { COEF_CONST(0.1956693050), COEF_CONST(0.1846090179), COEF_CONST(0.1673645109), COEF_CONST(0.1220621836), COEF_CONST(0.0757362479), COEF_CONST(0.0103882630), COEF_CONST(0.0103882630), COEF_CONST(0.0103882630) },
+    { COEF_CONST(0.3015113269), COEF_CONST(0.2870525790), COEF_CONST(0.2637738799), COEF_CONST(0.1984573949), COEF_CONST(0.1260749909), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126) },
+    { COEF_CONST(0.4078449476), COEF_CONST(0.3929852420), COEF_CONST(0.3680589270), COEF_CONST(0.2911029124), COEF_CONST(0.1934512363), COEF_CONST(0.0278686716), COEF_CONST(0.0278686716), COEF_CONST(0.0278686716) },
+    { COEF_CONST(0.5336171261), COEF_CONST(0.5226637762), COEF_CONST(0.5033652606), COEF_CONST(0.4349162672), COEF_CONST(0.3224682122), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036) },
+    { COEF_CONST(0.6219832023), COEF_CONST(0.6161847276), COEF_CONST(0.6057251063), COEF_CONST(0.5654342668), COEF_CONST(0.4826149915), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758) },
+    { COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657) },
+    { COEF_CONST(0.7830305572), COEF_CONST(0.7876016373), COEF_CONST(0.7956739618), COEF_CONST(0.8247933372), COEF_CONST(0.8758325942), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542) },
+    { COEF_CONST(0.8457261833), COEF_CONST(0.8525388778), COEF_CONST(0.8640737401), COEF_CONST(0.9004708933), COEF_CONST(0.9465802987), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532) },
+    { COEF_CONST(0.9130511848), COEF_CONST(0.9195447612), COEF_CONST(0.9298024282), COEF_CONST(0.9566917233), COEF_CONST(0.9811098801), COEF_CONST(0.9996115928), COEF_CONST(0.9996115928), COEF_CONST(0.9996115928) },
+    { COEF_CONST(0.9534625907), COEF_CONST(0.9579148236), COEF_CONST(0.9645845234), COEF_CONST(0.9801095128), COEF_CONST(0.9920207064), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099) },
+    { COEF_CONST(0.9806699215), COEF_CONST(0.9828120260), COEF_CONST(0.9858950861), COEF_CONST(0.9925224431), COEF_CONST(0.9971278825), COEF_CONST(0.9999460406), COEF_CONST(0.9999460406), COEF_CONST(0.9999460406) },
+    { COEF_CONST(0.9921685024), COEF_CONST(0.9930882705), COEF_CONST(0.9943886135), COEF_CONST(0.9970926648), COEF_CONST(0.9989008403), COEF_CONST(0.9999795479), COEF_CONST(0.9999795479), COEF_CONST(0.9999795479) },
+    { COEF_CONST(0.9984226014), COEF_CONST(0.9986136287), COEF_CONST(0.9988810254), COEF_CONST(0.9994272242), COEF_CONST(0.9997851906), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221) }
+};
+
+static const real_t sincos_alphas_B_fine[][8] = {
+    { COEF_CONST(0.0031622158), COEF_CONST(0.0029630181), COEF_CONST(0.0026599892), COEF_CONST(0.0019002704), COEF_CONST(0.0011626042), COEF_CONST(0.0001580278), COEF_CONST(0.0001580278), COEF_CONST(0.0001580278) },
+    { COEF_CONST(0.0056232673), COEF_CONST(0.0052689825), COEF_CONST(0.0047302825), COEF_CONST(0.0033791756), COEF_CONST(0.0020674015), COEF_CONST(0.0002811710), COEF_CONST(0.0002811710), COEF_CONST(0.0002811710) },
+    { COEF_CONST(0.0099994225), COEF_CONST(0.0093696693), COEF_CONST(0.0084117414), COEF_CONST(0.0060093796), COEF_CONST(0.0036766009), COEF_CONST(0.0005000392), COEF_CONST(0.0005000392), COEF_CONST(0.0005000392) },
+    { COEF_CONST(0.0177799194), COEF_CONST(0.0166607102), COEF_CONST(0.0149581377), COEF_CONST(0.0106875809), COEF_CONST(0.0065392545), COEF_CONST(0.0008893767), COEF_CONST(0.0008893767), COEF_CONST(0.0008893767) },
+    { COEF_CONST(0.0316069684), COEF_CONST(0.0296211579), COEF_CONST(0.0265987295), COEF_CONST(0.0190113813), COEF_CONST(0.0116349973), COEF_CONST(0.0015826974), COEF_CONST(0.0015826974), COEF_CONST(0.0015826974) },
+    { COEF_CONST(0.0561454100), COEF_CONST(0.0526385859), COEF_CONST(0.0472937334), COEF_CONST(0.0338410641), COEF_CONST(0.0207261065), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635), COEF_CONST(0.0028205635) },
+    { COEF_CONST(0.0791834041), COEF_CONST(0.0742798103), COEF_CONST(0.0667907269), COEF_CONST(0.0478705292), COEF_CONST(0.0293500747), COEF_CONST(0.0039966755), COEF_CONST(0.0039966755), COEF_CONST(0.0039966755) },
+    { COEF_CONST(0.1115021177), COEF_CONST(0.1047141985), COEF_CONST(0.0943053154), COEF_CONST(0.0678120561), COEF_CONST(0.0416669150), COEF_CONST(0.0056813213), COEF_CONST(0.0056813213), COEF_CONST(0.0056813213) },
+    { COEF_CONST(0.1565355066), COEF_CONST(0.1473258371), COEF_CONST(0.1330924027), COEF_CONST(0.0963282233), COEF_CONST(0.0594509113), COEF_CONST(0.0081277946), COEF_CONST(0.0081277946), COEF_CONST(0.0081277946) },
+    { COEF_CONST(0.2184643682), COEF_CONST(0.2064579524), COEF_CONST(0.1876265439), COEF_CONST(0.1375744167), COEF_CONST(0.0856896681), COEF_CONST(0.0117817338), COEF_CONST(0.0117817338), COEF_CONST(0.0117817338) },
+    { COEF_CONST(0.3015113269), COEF_CONST(0.2870525790), COEF_CONST(0.2637738799), COEF_CONST(0.1984573949), COEF_CONST(0.1260749909), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126), COEF_CONST(0.0175600126) },
+    { COEF_CONST(0.3698741335), COEF_CONST(0.3547727297), COEF_CONST(0.3298252076), COEF_CONST(0.2556265829), COEF_CONST(0.1665990017), COEF_CONST(0.0236344541), COEF_CONST(0.0236344541), COEF_CONST(0.0236344541) },
+    { COEF_CONST(0.4480623975), COEF_CONST(0.4339410024), COEF_CONST(0.4098613774), COEF_CONST(0.3322709108), COEF_CONST(0.2266784729), COEF_CONST(0.0334094131), COEF_CONST(0.0334094131), COEF_CONST(0.0334094131) },
+    { COEF_CONST(0.5336171261), COEF_CONST(0.5226637762), COEF_CONST(0.5033652606), COEF_CONST(0.4349162672), COEF_CONST(0.3224682122), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036), COEF_CONST(0.0521999036) },
+    { COEF_CONST(0.6219832023), COEF_CONST(0.6161847276), COEF_CONST(0.6057251063), COEF_CONST(0.5654342668), COEF_CONST(0.4826149915), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758), COEF_CONST(0.1058044758) },
+    { COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657), COEF_CONST(0.7071067657) },
+    { COEF_CONST(0.7830305572), COEF_CONST(0.7876016373), COEF_CONST(0.7956739618), COEF_CONST(0.8247933372), COEF_CONST(0.8758325942), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542), COEF_CONST(0.9943869542) },
+    { COEF_CONST(0.8457261833), COEF_CONST(0.8525388778), COEF_CONST(0.8640737401), COEF_CONST(0.9004708933), COEF_CONST(0.9465802987), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532), COEF_CONST(0.9986366532) },
+    { COEF_CONST(0.8940022267), COEF_CONST(0.9009412572), COEF_CONST(0.9121477564), COEF_CONST(0.9431839770), COEF_CONST(0.9739696219), COEF_CONST(0.9994417480), COEF_CONST(0.9994417480), COEF_CONST(0.9994417480) },
+    { COEF_CONST(0.9290818561), COEF_CONST(0.9349525662), COEF_CONST(0.9440420138), COEF_CONST(0.9667755833), COEF_CONST(0.9860247275), COEF_CONST(0.9997206664), COEF_CONST(0.9997206664), COEF_CONST(0.9997206664) },
+    { COEF_CONST(0.9534625907), COEF_CONST(0.9579148236), COEF_CONST(0.9645845234), COEF_CONST(0.9801095128), COEF_CONST(0.9920207064), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099), COEF_CONST(0.9998458099) },
+    { COEF_CONST(0.9758449068), COEF_CONST(0.9784554646), COEF_CONST(0.9822404252), COEF_CONST(0.9904914275), COEF_CONST(0.9963218730), COEF_CONST(0.9999305926), COEF_CONST(0.9999305926), COEF_CONST(0.9999305926) },
+    { COEF_CONST(0.9876723320), COEF_CONST(0.9890880155), COEF_CONST(0.9911036356), COEF_CONST(0.9953496173), COEF_CONST(0.9982312259), COEF_CONST(0.9999669685), COEF_CONST(0.9999669685), COEF_CONST(0.9999669685) },
+    { COEF_CONST(0.9937641889), COEF_CONST(0.9945023501), COEF_CONST(0.9955433130), COEF_CONST(0.9976981117), COEF_CONST(0.9991315558), COEF_CONST(0.9999838610), COEF_CONST(0.9999838610), COEF_CONST(0.9999838610) },
+    { COEF_CONST(0.9968600642), COEF_CONST(0.9972374385), COEF_CONST(0.9977670024), COEF_CONST(0.9988535464), COEF_CONST(0.9995691924), COEF_CONST(0.9999920129), COEF_CONST(0.9999920129), COEF_CONST(0.9999920129) },
+    { COEF_CONST(0.9984226014), COEF_CONST(0.9986136287), COEF_CONST(0.9988810254), COEF_CONST(0.9994272242), COEF_CONST(0.9997851906), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221), COEF_CONST(0.9999960221) },
+    { COEF_CONST(0.9995003746), COEF_CONST(0.9995611974), COEF_CONST(0.9996461891), COEF_CONST(0.9998192657), COEF_CONST(0.9999323103), COEF_CONST(0.9999987475), COEF_CONST(0.9999987475), COEF_CONST(0.9999987475) },
+    { COEF_CONST(0.9998419236), COEF_CONST(0.9998611991), COEF_CONST(0.9998881193), COEF_CONST(0.9999428861), COEF_CONST(0.9999786185), COEF_CONST(0.9999996045), COEF_CONST(0.9999996045), COEF_CONST(0.9999996045) },
+    { COEF_CONST(0.9999500038), COEF_CONST(0.9999561034), COEF_CONST(0.9999646206), COEF_CONST(0.9999819429), COEF_CONST(0.9999932409), COEF_CONST(0.9999998750), COEF_CONST(0.9999998750), COEF_CONST(0.9999998750) },
+    { COEF_CONST(0.9999841890), COEF_CONST(0.9999861183), COEF_CONST(0.9999888121), COEF_CONST(0.9999942902), COEF_CONST(0.9999978628), COEF_CONST(0.9999999605), COEF_CONST(0.9999999605), COEF_CONST(0.9999999605) },
+    { COEF_CONST(0.9999950000), COEF_CONST(0.9999956102), COEF_CONST(0.9999964621), COEF_CONST(0.9999981945), COEF_CONST(0.9999993242), COEF_CONST(0.9999999875), COEF_CONST(0.9999999875), COEF_CONST(0.9999999875) }
+};
+
+static const real_t cos_gammas_normal[][8] = {
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9841239707), COEF_CONST(0.9594738226), COEF_CONST(0.8946843024), COEF_CONST(0.8269341029), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9849690570), COEF_CONST(0.9617776789), COEF_CONST(0.9020941550), COEF_CONST(0.8436830391), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9871656089), COEF_CONST(0.9676774734), COEF_CONST(0.9199102884), COEF_CONST(0.8785067015), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9913533967), COEF_CONST(0.9786000177), COEF_CONST(0.9496063381), COEF_CONST(0.9277157252), COEF_CONST(0.9133354077), COEF_CONST(0.9133354077), COEF_CONST(0.9133354077) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9948924435), COEF_CONST(0.9875319180), COEF_CONST(0.9716329849), COEF_CONST(0.9604805241), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9977406278), COEF_CONST(0.9945423840), COEF_CONST(0.9878736667), COEF_CONST(0.9833980494), COEF_CONST(0.9807207440), COEF_CONST(0.9807207440), COEF_CONST(0.9807207440) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9990607067), COEF_CONST(0.9977417734), COEF_CONST(0.9950323970), COEF_CONST(0.9932453273), COEF_CONST(0.9921884740), COEF_CONST(0.9921884740), COEF_CONST(0.9921884740) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9998081748), COEF_CONST(0.9995400312), COEF_CONST(0.9989936459), COEF_CONST(0.9986365356), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591) }
+};
+
+static const real_t cos_gammas_fine[][8] = {
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9841239707), COEF_CONST(0.9594738226), COEF_CONST(0.8946843024), COEF_CONST(0.8269341029), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486), COEF_CONST(0.7245688486) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9849690570), COEF_CONST(0.9617776789), COEF_CONST(0.9020941550), COEF_CONST(0.8436830391), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804), COEF_CONST(0.7846832804) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9871656089), COEF_CONST(0.9676774734), COEF_CONST(0.9199102884), COEF_CONST(0.8785067015), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214), COEF_CONST(0.8464232214) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9899597309), COEF_CONST(0.9750098690), COEF_CONST(0.9402333855), COEF_CONST(0.9129698759), COEF_CONST(0.8943765944), COEF_CONST(0.8943765944), COEF_CONST(0.8943765944) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9926607607), COEF_CONST(0.9819295710), COEF_CONST(0.9580160104), COEF_CONST(0.9404993670), COEF_CONST(0.9293004472), COEF_CONST(0.9293004472), COEF_CONST(0.9293004472) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9948924435), COEF_CONST(0.9875319180), COEF_CONST(0.9716329849), COEF_CONST(0.9604805241), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574), COEF_CONST(0.9535949574) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9972074644), COEF_CONST(0.9932414270), COEF_CONST(0.9849197629), COEF_CONST(0.9792926592), COEF_CONST(0.9759092525), COEF_CONST(0.9759092525), COEF_CONST(0.9759092525) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9985361982), COEF_CONST(0.9964742028), COEF_CONST(0.9922136306), COEF_CONST(0.9893845420), COEF_CONST(0.9877041371), COEF_CONST(0.9877041371), COEF_CONST(0.9877041371) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9992494366), COEF_CONST(0.9981967170), COEF_CONST(0.9960386625), COEF_CONST(0.9946185834), COEF_CONST(0.9937800239), COEF_CONST(0.9937800239), COEF_CONST(0.9937800239) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9996194722), COEF_CONST(0.9990869422), COEF_CONST(0.9979996269), COEF_CONST(0.9972873651), COEF_CONST(0.9968679747), COEF_CONST(0.9968679747), COEF_CONST(0.9968679747) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9998081748), COEF_CONST(0.9995400312), COEF_CONST(0.9989936459), COEF_CONST(0.9986365356), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591), COEF_CONST(0.9984265591) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9999390971), COEF_CONST(0.9998540271), COEF_CONST(0.9996809352), COEF_CONST(0.9995679735), COEF_CONST(0.9995016284), COEF_CONST(0.9995016284), COEF_CONST(0.9995016284) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9999807170), COEF_CONST(0.9999537862), COEF_CONST(0.9998990191), COEF_CONST(0.9998632947), COEF_CONST(0.9998423208), COEF_CONST(0.9998423208), COEF_CONST(0.9998423208) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9999938979), COEF_CONST(0.9999853814), COEF_CONST(0.9999680568), COEF_CONST(0.9999567596), COEF_CONST(0.9999501270), COEF_CONST(0.9999501270), COEF_CONST(0.9999501270) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9999980703), COEF_CONST(0.9999953731), COEF_CONST(0.9999898968), COEF_CONST(0.9999863277), COEF_CONST(0.9999842265), COEF_CONST(0.9999842265), COEF_CONST(0.9999842265) },
+    { COEF_CONST(1.0000000000), COEF_CONST(0.9999993891), COEF_CONST(0.9999985397), COEF_CONST(0.9999968037), COEF_CONST(0.9999956786), COEF_CONST(0.9999950155), COEF_CONST(0.9999950155), COEF_CONST(0.9999950155) }
+};
+
+static const real_t sin_gammas_normal[][8] = {
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1774824223), COEF_CONST(0.2817977711), COEF_CONST(0.4466990028), COEF_CONST(0.5622988435), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1727308798), COEF_CONST(0.2738315110), COEF_CONST(0.4315392630), COEF_CONST(0.5368416242), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1596999079), COEF_CONST(0.2521910140), COEF_CONST(0.3921288836), COEF_CONST(0.4777300236), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1312190642), COEF_CONST(0.2057717310), COEF_CONST(0.3134450552), COEF_CONST(0.3732874674), COEF_CONST(0.4072080955), COEF_CONST(0.4072080955), COEF_CONST(0.4072080955) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1009407043), COEF_CONST(0.1574189028), COEF_CONST(0.2364938532), COEF_CONST(0.2783471983), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0671836269), COEF_CONST(0.1043333428), COEF_CONST(0.1552598422), COEF_CONST(0.1814615013), COEF_CONST(0.1954144885), COEF_CONST(0.1954144885), COEF_CONST(0.1954144885) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0433324862), COEF_CONST(0.0671666110), COEF_CONST(0.0995516398), COEF_CONST(0.1160332699), COEF_CONST(0.1247478739), COEF_CONST(0.1247478739), COEF_CONST(0.1247478739) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0195860576), COEF_CONST(0.0303269852), COEF_CONST(0.0448519274), COEF_CONST(0.0522022017), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040) }
+};
+
+static const real_t sin_gammas_fine[][8] = {
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1774824223), COEF_CONST(0.2817977711), COEF_CONST(0.4466990028), COEF_CONST(0.5622988435), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258), COEF_CONST(0.6892024258) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1727308798), COEF_CONST(0.2738315110), COEF_CONST(0.4315392630), COEF_CONST(0.5368416242), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861), COEF_CONST(0.6198968861) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1596999079), COEF_CONST(0.2521910140), COEF_CONST(0.3921288836), COEF_CONST(0.4777300236), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795), COEF_CONST(0.5325107795) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1413496768), COEF_CONST(0.2221615526), COEF_CONST(0.3405307340), COEF_CONST(0.4080269669), COEF_CONST(0.4473147744), COEF_CONST(0.4473147744), COEF_CONST(0.4473147744) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1209322714), COEF_CONST(0.1892467110), COEF_CONST(0.2867147079), COEF_CONST(0.3397954394), COEF_CONST(0.3693246252), COEF_CONST(0.3693246252), COEF_CONST(0.3693246252) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.1009407043), COEF_CONST(0.1574189028), COEF_CONST(0.2364938532), COEF_CONST(0.2783471983), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396), COEF_CONST(0.3010924396) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0746811420), COEF_CONST(0.1160666523), COEF_CONST(0.1730117353), COEF_CONST(0.2024497161), COEF_CONST(0.2181768341), COEF_CONST(0.2181768341), COEF_CONST(0.2181768341) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0540875291), COEF_CONST(0.0838997203), COEF_CONST(0.1245476266), COEF_CONST(0.1453211203), COEF_CONST(0.1563346972), COEF_CONST(0.1563346972), COEF_CONST(0.1563346972) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0387371058), COEF_CONST(0.0600276114), COEF_CONST(0.0889212171), COEF_CONST(0.1036044086), COEF_CONST(0.1113609634), COEF_CONST(0.1113609634), COEF_CONST(0.1113609634) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0275846110), COEF_CONST(0.0427233177), COEF_CONST(0.0632198125), COEF_CONST(0.0736064637), COEF_CONST(0.0790837596), COEF_CONST(0.0790837596), COEF_CONST(0.0790837596) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0195860576), COEF_CONST(0.0303269852), COEF_CONST(0.0448519274), COEF_CONST(0.0522022017), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040), COEF_CONST(0.0560750040) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0110363955), COEF_CONST(0.0170857974), COEF_CONST(0.0252592108), COEF_CONST(0.0293916021), COEF_CONST(0.0315673054), COEF_CONST(0.0315673054), COEF_CONST(0.0315673054) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0062101284), COEF_CONST(0.0096138203), COEF_CONST(0.0142109649), COEF_CONST(0.0165345659), COEF_CONST(0.0177576316), COEF_CONST(0.0177576316), COEF_CONST(0.0177576316) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0034934509), COEF_CONST(0.0054071189), COEF_CONST(0.0079928316), COEF_CONST(0.0092994041), COEF_CONST(0.0099871631), COEF_CONST(0.0099871631), COEF_CONST(0.0099871631) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0019645397), COEF_CONST(0.0030419905), COEF_CONST(0.0044951511), COEF_CONST(0.0052291853), COEF_CONST(0.0056166498), COEF_CONST(0.0056166498), COEF_CONST(0.0056166498) },
+    { COEF_CONST(0.0000000000), COEF_CONST(0.0011053943), COEF_CONST(0.0017089869), COEF_CONST(0.0025283670), COEF_CONST(0.0029398552), COEF_CONST(0.0031573685), COEF_CONST(0.0031573685), COEF_CONST(0.0031573685) }
+};
+
+static const real_t sf_iid_normal[] = {
+    COEF_CONST(1.4119827747), COEF_CONST(1.4031381607), COEF_CONST(1.3868767023),
+    COEF_CONST(1.3483997583), COEF_CONST(1.2912493944), COEF_CONST(1.1960374117),
+    COEF_CONST(1.1073724031), COEF_CONST(1.0000000000), COEF_CONST(0.8796171546),
+    COEF_CONST(0.7546485662), COEF_CONST(0.5767799020), COEF_CONST(0.4264014363),
+    COEF_CONST(0.2767182887), COEF_CONST(0.1766446233), COEF_CONST(0.0794016272)
+};
+
+static const real_t sf_iid_fine[] = {
+    COEF_CONST(1.4142065048), COEF_CONST(1.4141912460), COEF_CONST(1.4141428471),
+    COEF_CONST(1.4139900208), COEF_CONST(1.4135069847), COEF_CONST(1.4119827747),
+    COEF_CONST(1.4097729921), COEF_CONST(1.4053947926), COEF_CONST(1.3967796564),
+    COEF_CONST(1.3800530434), COEF_CONST(1.3483997583), COEF_CONST(1.3139201403),
+    COEF_CONST(1.2643101215), COEF_CONST(1.1960374117), COEF_CONST(1.1073724031),
+    COEF_CONST(1.0000000000), COEF_CONST(0.8796171546), COEF_CONST(0.7546485662),
+    COEF_CONST(0.6336560845), COEF_CONST(0.5230810642), COEF_CONST(0.4264014363),
+    COEF_CONST(0.3089554012), COEF_CONST(0.2213746458), COEF_CONST(0.1576878875),
+    COEF_CONST(0.1119822487), COEF_CONST(0.0794016272), COEF_CONST(0.0446990170),
+    COEF_CONST(0.0251446925), COEF_CONST(0.0141414283), COEF_CONST(0.0079525812),
+    COEF_CONST(0.0044721137)
+};
+
+#ifdef __cplusplus
+
+#endif
+#endif
+
--- a/libfaad2/sbr_dct.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_dct.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_dct.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_dct.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -39,8 +39,758 @@
 
 #include "sbr_dct.h"
 
+void DCT4_32(real_t *y, real_t *x)
+{
+    real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
+    real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
+    real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
+    real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
+    real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
+    real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
+    real_t f61, f62, f63, f64, f65, f66, f67, f68, f69, f70;
+    real_t f71, f72, f73, f74, f75, f76, f77, f78, f79, f80;
+    real_t f81, f82, f83, f84, f85, f86, f87, f88, f89, f90;
+    real_t f91, f92, f93, f94, f95, f96, f97, f98, f99, f100;
+    real_t f101, f102, f103, f104, f105, f106, f107, f108, f109, f110;
+    real_t f111, f112, f113, f114, f115, f116, f117, f118, f119, f120;
+    real_t f121, f122, f123, f124, f125, f126, f127, f128, f129, f130;
+    real_t f131, f132, f133, f134, f135, f136, f137, f138, f139, f140;
+    real_t f141, f142, f143, f144, f145, f146, f147, f148, f149, f150;
+    real_t f151, f152, f153, f154, f155, f156, f157, f158, f159, f160;
+    real_t f161, f162, f163, f164, f165, f166, f167, f168, f169, f170;
+    real_t f171, f172, f173, f174, f175, f176, f177, f178, f179, f180;
+    real_t f181, f182, f183, f184, f185, f186, f187, f188, f189, f190;
+    real_t f191, f192, f193, f194, f195, f196, f197, f198, f199, f200;
+    real_t f201, f202, f203, f204, f205, f206, f207, f208, f209, f210;
+    real_t f211, f212, f213, f214, f215, f216, f217, f218, f219, f220;
+    real_t f221, f222, f223, f224, f225, f226, f227, f228, f229, f230;
+    real_t f231, f232, f233, f234, f235, f236, f237, f238, f239, f240;
+    real_t f241, f242, f243, f244, f245, f246, f247, f248, f249, f250;
+    real_t f251, f252, f253, f254, f255, f256, f257, f258, f259, f260;
+    real_t f261, f262, f263, f264, f265, f266, f267, f268, f269, f270;
+    real_t f271, f272, f273, f274, f275, f276, f277, f278, f279, f280;
+    real_t f281, f282, f283, f284, f285, f286, f287, f288, f289, f290;
+    real_t f291, f292, f293, f294, f295, f296, f297, f298, f299, f300;
+    real_t f301, f302, f303, f304, f305, f306, f307, f310, f311, f312;
+    real_t f313, f316, f317, f318, f319, f322, f323, f324, f325, f328;
+    real_t f329, f330, f331, f334, f335, f336, f337, f340, f341, f342;
+    real_t f343, f346, f347, f348, f349, f352, f353, f354, f355, f358;
+    real_t f359, f360, f361, f364, f365, f366, f367, f370, f371, f372;
+    real_t f373, f376, f377, f378, f379, f382, f383, f384, f385, f388;
+    real_t f389, f390, f391, f394, f395, f396, f397;
+
+    f0 = x[15] - x[16];
+    f1 = x[15] + x[16];
+    f2 = MUL_F(FRAC_CONST(0.7071067811865476), f1);
+    f3 = MUL_F(FRAC_CONST(0.7071067811865476), f0);
+    f4 = x[8] - x[23];
+    f5 = x[8] + x[23];
+    f6 = MUL_F(FRAC_CONST(0.7071067811865476), f5);
+    f7 = MUL_F(FRAC_CONST(0.7071067811865476), f4);
+    f8 = x[12] - x[19];
+    f9 = x[12] + x[19];
+    f10 = MUL_F(FRAC_CONST(0.7071067811865476), f9);
+    f11 = MUL_F(FRAC_CONST(0.7071067811865476), f8);
+    f12 = x[11] - x[20];
+    f13 = x[11] + x[20];
+    f14 = MUL_F(FRAC_CONST(0.7071067811865476), f13);
+    f15 = MUL_F(FRAC_CONST(0.7071067811865476), f12);
+    f16 = x[14] - x[17];
+    f17 = x[14] + x[17];
+    f18 = MUL_F(FRAC_CONST(0.7071067811865476), f17);
+    f19 = MUL_F(FRAC_CONST(0.7071067811865476), f16);
+    f20 = x[9] - x[22];
+    f21 = x[9] + x[22];
+    f22 = MUL_F(FRAC_CONST(0.7071067811865476), f21);
+    f23 = MUL_F(FRAC_CONST(0.7071067811865476), f20);
+    f24 = x[13] - x[18];
+    f25 = x[13] + x[18];
+    f26 = MUL_F(FRAC_CONST(0.7071067811865476), f25);
+    f27 = MUL_F(FRAC_CONST(0.7071067811865476), f24);
+    f28 = x[10] - x[21];
+    f29 = x[10] + x[21];
+    f30 = MUL_F(FRAC_CONST(0.7071067811865476), f29);
+    f31 = MUL_F(FRAC_CONST(0.7071067811865476), f28);
+    f32 = x[0] - f2;
+    f33 = x[0] + f2;
+    f34 = x[31] - f3;
+    f35 = x[31] + f3;
+    f36 = x[7] - f6;
+    f37 = x[7] + f6;
+    f38 = x[24] - f7;
+    f39 = x[24] + f7;
+    f40 = x[3] - f10;
+    f41 = x[3] + f10;
+    f42 = x[28] - f11;
+    f43 = x[28] + f11;
+    f44 = x[4] - f14;
+    f45 = x[4] + f14;
+    f46 = x[27] - f15;
+    f47 = x[27] + f15;
+    f48 = x[1] - f18;
+    f49 = x[1] + f18;
+    f50 = x[30] - f19;
+    f51 = x[30] + f19;
+    f52 = x[6] - f22;
+    f53 = x[6] + f22;
+    f54 = x[25] - f23;
+    f55 = x[25] + f23;
+    f56 = x[2] - f26;
+    f57 = x[2] + f26;
+    f58 = x[29] - f27;
+    f59 = x[29] + f27;
+    f60 = x[5] - f30;
+    f61 = x[5] + f30;
+    f62 = x[26] - f31;
+    f63 = x[26] + f31;
+    f64 = f39 + f37;
+    f65 = MUL_F(FRAC_CONST(-0.5411961001461969), f39);
+    f66 = MUL_F(FRAC_CONST(0.9238795325112867), f64);
+    f67 = MUL_C(COEF_CONST(1.3065629648763766), f37);
+    f68 = f65 + f66;
+    f69 = f67 - f66;
+    f70 = f38 + f36;
+    f71 = MUL_C(COEF_CONST(1.3065629648763770), f38);
+    f72 = MUL_F(FRAC_CONST(-0.3826834323650904), f70);
+    f73 = MUL_F(FRAC_CONST(0.5411961001461961), f36);
+    f74 = f71 + f72;
+    f75 = f73 - f72;
+    f76 = f47 + f45;
+    f77 = MUL_F(FRAC_CONST(-0.5411961001461969), f47);
+    f78 = MUL_F(FRAC_CONST(0.9238795325112867), f76);
+    f79 = MUL_C(COEF_CONST(1.3065629648763766), f45);
+    f80 = f77 + f78;
+    f81 = f79 - f78;
+    f82 = f46 + f44;
+    f83 = MUL_C(COEF_CONST(1.3065629648763770), f46);
+    f84 = MUL_F(FRAC_CONST(-0.3826834323650904), f82);
+    f85 = MUL_F(FRAC_CONST(0.5411961001461961), f44);
+    f86 = f83 + f84;
+    f87 = f85 - f84;
+    f88 = f55 + f53;
+    f89 = MUL_F(FRAC_CONST(-0.5411961001461969), f55);
+    f90 = MUL_F(FRAC_CONST(0.9238795325112867), f88);
+    f91 = MUL_C(COEF_CONST(1.3065629648763766), f53);
+    f92 = f89 + f90;
+    f93 = f91 - f90;
+    f94 = f54 + f52;
+    f95 = MUL_C(COEF_CONST(1.3065629648763770), f54);
+    f96 = MUL_F(FRAC_CONST(-0.3826834323650904), f94);
+    f97 = MUL_F(FRAC_CONST(0.5411961001461961), f52);
+    f98 = f95 + f96;
+    f99 = f97 - f96;
+    f100 = f63 + f61;
+    f101 = MUL_F(FRAC_CONST(-0.5411961001461969), f63);
+    f102 = MUL_F(FRAC_CONST(0.9238795325112867), f100);
+    f103 = MUL_C(COEF_CONST(1.3065629648763766), f61);
+    f104 = f101 + f102;
+    f105 = f103 - f102;
+    f106 = f62 + f60;
+    f107 = MUL_C(COEF_CONST(1.3065629648763770), f62);
+    f108 = MUL_F(FRAC_CONST(-0.3826834323650904), f106);
+    f109 = MUL_F(FRAC_CONST(0.5411961001461961), f60);
+    f110 = f107 + f108;
+    f111 = f109 - f108;
+    f112 = f33 - f68;
+    f113 = f33 + f68;
+    f114 = f35 - f69;
+    f115 = f35 + f69;
+    f116 = f32 - f74;
+    f117 = f32 + f74;
+    f118 = f34 - f75;
+    f119 = f34 + f75;
+    f120 = f41 - f80;
+    f121 = f41 + f80;
+    f122 = f43 - f81;
+    f123 = f43 + f81;
+    f124 = f40 - f86;
+    f125 = f40 + f86;
+    f126 = f42 - f87;
+    f127 = f42 + f87;
+    f128 = f49 - f92;
+    f129 = f49 + f92;
+    f130 = f51 - f93;
+    f131 = f51 + f93;
+    f132 = f48 - f98;
+    f133 = f48 + f98;
+    f134 = f50 - f99;
+    f135 = f50 + f99;
+    f136 = f57 - f104;
+    f137 = f57 + f104;
+    f138 = f59 - f105;
+    f139 = f59 + f105;
+    f140 = f56 - f110;
+    f141 = f56 + f110;
+    f142 = f58 - f111;
+    f143 = f58 + f111;
+    f144 = f123 + f121;
+    f145 = MUL_F(FRAC_CONST(-0.7856949583871021), f123);
+    f146 = MUL_F(FRAC_CONST(0.9807852804032304), f144);
+    f147 = MUL_C(COEF_CONST(1.1758756024193588), f121);
+    f148 = f145 + f146;
+    f149 = f147 - f146;
+    f150 = f127 + f125;
+    f151 = MUL_F(FRAC_CONST(0.2758993792829431), f127);
+    f152 = MUL_F(FRAC_CONST(0.5555702330196022), f150);
+    f153 = MUL_C(COEF_CONST(1.3870398453221475), f125);
+    f154 = f151 + f152;
+    f155 = f153 - f152;
+    f156 = f122 + f120;
+    f157 = MUL_C(COEF_CONST(1.1758756024193591), f122);
+    f158 = MUL_F(FRAC_CONST(-0.1950903220161287), f156);
+    f159 = MUL_F(FRAC_CONST(0.7856949583871016), f120);
+    f160 = f157 + f158;
+    f161 = f159 - f158;
+    f162 = f126 + f124;
+    f163 = MUL_C(COEF_CONST(1.3870398453221473), f126);
+    f164 = MUL_F(FRAC_CONST(-0.8314696123025455), f162);
+    f165 = MUL_F(FRAC_CONST(-0.2758993792829436), f124);
+    f166 = f163 + f164;
+    f167 = f165 - f164;
+    f168 = f139 + f137;
+    f169 = MUL_F(FRAC_CONST(-0.7856949583871021), f139);
+    f170 = MUL_F(FRAC_CONST(0.9807852804032304), f168);
+    f171 = MUL_C(COEF_CONST(1.1758756024193588), f137);
+    f172 = f169 + f170;
+    f173 = f171 - f170;
+    f174 = f143 + f141;
+    f175 = MUL_F(FRAC_CONST(0.2758993792829431), f143);
+    f176 = MUL_F(FRAC_CONST(0.5555702330196022), f174);
+    f177 = MUL_C(COEF_CONST(1.3870398453221475), f141);
+    f178 = f175 + f176;
+    f179 = f177 - f176;
+    f180 = f138 + f136;
+    f181 = MUL_C(COEF_CONST(1.1758756024193591), f138);
+    f182 = MUL_F(FRAC_CONST(-0.1950903220161287), f180);
+    f183 = MUL_F(FRAC_CONST(0.7856949583871016), f136);
+    f184 = f181 + f182;
+    f185 = f183 - f182;
+    f186 = f142 + f140;
+    f187 = MUL_C(COEF_CONST(1.3870398453221473), f142);
+    f188 = MUL_F(FRAC_CONST(-0.8314696123025455), f186);
+    f189 = MUL_F(FRAC_CONST(-0.2758993792829436), f140);
+    f190 = f187 + f188;
+    f191 = f189 - f188;
+    f192 = f113 - f148;
+    f193 = f113 + f148;
+    f194 = f115 - f149;
+    f195 = f115 + f149;
+    f196 = f117 - f154;
+    f197 = f117 + f154;
+    f198 = f119 - f155;
+    f199 = f119 + f155;
+    f200 = f112 - f160;
+    f201 = f112 + f160;
+    f202 = f114 - f161;
+    f203 = f114 + f161;
+    f204 = f116 - f166;
+    f205 = f116 + f166;
+    f206 = f118 - f167;
+    f207 = f118 + f167;
+    f208 = f129 - f172;
+    f209 = f129 + f172;
+    f210 = f131 - f173;
+    f211 = f131 + f173;
+    f212 = f133 - f178;
+    f213 = f133 + f178;
+    f214 = f135 - f179;
+    f215 = f135 + f179;
+    f216 = f128 - f184;
+    f217 = f128 + f184;
+    f218 = f130 - f185;
+    f219 = f130 + f185;
+    f220 = f132 - f190;
+    f221 = f132 + f190;
+    f222 = f134 - f191;
+    f223 = f134 + f191;
+    f224 = f211 + f209;
+    f225 = MUL_F(FRAC_CONST(-0.8971675863426361), f211);
+    f226 = MUL_F(FRAC_CONST(0.9951847266721968), f224);
+    f227 = MUL_C(COEF_CONST(1.0932018670017576), f209);
+    f228 = f225 + f226;
+    f229 = f227 - f226;
+    f230 = f215 + f213;
+    f231 = MUL_F(FRAC_CONST(-0.4105245275223571), f215);
+    f232 = MUL_F(FRAC_CONST(0.8819212643483549), f230);
+    f233 = MUL_C(COEF_CONST(1.3533180011743529), f213);
+    f234 = f231 + f232;
+    f235 = f233 - f232;
+    f236 = f219 + f217;
+    f237 = MUL_F(FRAC_CONST(0.1386171691990915), f219);
+    f238 = MUL_F(FRAC_CONST(0.6343932841636455), f236);
+    f239 = MUL_C(COEF_CONST(1.4074037375263826), f217);
+    f240 = f237 + f238;
+    f241 = f239 - f238;
+    f242 = f223 + f221;
+    f243 = MUL_F(FRAC_CONST(0.6666556584777466), f223);
+    f244 = MUL_F(FRAC_CONST(0.2902846772544623), f242);
+    f245 = MUL_C(COEF_CONST(1.2472250129866711), f221);
+    f246 = f243 + f244;
+    f247 = f245 - f244;
+    f248 = f210 + f208;
+    f249 = MUL_C(COEF_CONST(1.0932018670017574), f210);
+    f250 = MUL_F(FRAC_CONST(-0.0980171403295605), f248);
+    f251 = MUL_F(FRAC_CONST(0.8971675863426364), f208);
+    f252 = f249 + f250;
+    f253 = f251 - f250;
+    f254 = f214 + f212;
+    f255 = MUL_C(COEF_CONST(1.3533180011743529), f214);
+    f256 = MUL_F(FRAC_CONST(-0.4713967368259979), f254);
+    f257 = MUL_F(FRAC_CONST(0.4105245275223569), f212);
+    f258 = f255 + f256;
+    f259 = f257 - f256;
+    f260 = f218 + f216;
+    f261 = MUL_C(COEF_CONST(1.4074037375263826), f218);
+    f262 = MUL_F(FRAC_CONST(-0.7730104533627369), f260);
+    f263 = MUL_F(FRAC_CONST(-0.1386171691990913), f216);
+    f264 = f261 + f262;
+    f265 = f263 - f262;
+    f266 = f222 + f220;
+    f267 = MUL_C(COEF_CONST(1.2472250129866711), f222);
+    f268 = MUL_F(FRAC_CONST(-0.9569403357322089), f266);
+    f269 = MUL_F(FRAC_CONST(-0.6666556584777469), f220);
+    f270 = f267 + f268;
+    f271 = f269 - f268;
+    f272 = f193 - f228;
+    f273 = f193 + f228;
+    f274 = f195 - f229;
+    f275 = f195 + f229;
+    f276 = f197 - f234;
+    f277 = f197 + f234;
+    f278 = f199 - f235;
+    f279 = f199 + f235;
+    f280 = f201 - f240;
+    f281 = f201 + f240;
+    f282 = f203 - f241;
+    f283 = f203 + f241;
+    f284 = f205 - f246;
+    f285 = f205 + f246;
+    f286 = f207 - f247;
+    f287 = f207 + f247;
+    f288 = f192 - f252;
+    f289 = f192 + f252;
+    f290 = f194 - f253;
+    f291 = f194 + f253;
+    f292 = f196 - f258;
+    f293 = f196 + f258;
+    f294 = f198 - f259;
+    f295 = f198 + f259;
+    f296 = f200 - f264;
+    f297 = f200 + f264;
+    f298 = f202 - f265;
+    f299 = f202 + f265;
+    f300 = f204 - f270;
+    f301 = f204 + f270;
+    f302 = f206 - f271;
+    f303 = f206 + f271;
+    f304 = f275 + f273;
+    f305 = MUL_F(FRAC_CONST(-0.9751575901732920), f275);
+    f306 = MUL_F(FRAC_CONST(0.9996988186962043), f304);
+    f307 = MUL_C(COEF_CONST(1.0242400472191164), f273);
+    y[0] = f305 + f306;
+    y[31] = f307 - f306;
+    f310 = f279 + f277;
+    f311 = MUL_F(FRAC_CONST(-0.8700688593994936), f279);
+    f312 = MUL_F(FRAC_CONST(0.9924795345987100), f310);
+    f313 = MUL_C(COEF_CONST(1.1148902097979263), f277);
+    y[2] = f311 + f312;
+    y[29] = f313 - f312;
+    f316 = f283 + f281;
+    f317 = MUL_F(FRAC_CONST(-0.7566008898816587), f283);
+    f318 = MUL_F(FRAC_CONST(0.9757021300385286), f316);
+    f319 = MUL_C(COEF_CONST(1.1948033701953984), f281);
+    y[4] = f317 + f318;
+    y[27] = f319 - f318;
+    f322 = f287 + f285;
+    f323 = MUL_F(FRAC_CONST(-0.6358464401941451), f287);
+    f324 = MUL_F(FRAC_CONST(0.9495281805930367), f322);
+    f325 = MUL_C(COEF_CONST(1.2632099209919283), f285);
+    y[6] = f323 + f324;
+    y[25] = f325 - f324;
+    f328 = f291 + f289;
+    f329 = MUL_F(FRAC_CONST(-0.5089684416985408), f291);
+    f330 = MUL_F(FRAC_CONST(0.9142097557035307), f328);
+    f331 = MUL_C(COEF_CONST(1.3194510697085207), f289);
+    y[8] = f329 + f330;
+    y[23] = f331 - f330;
+    f334 = f295 + f293;
+    f335 = MUL_F(FRAC_CONST(-0.3771887988789273), f295);
+    f336 = MUL_F(FRAC_CONST(0.8700869911087114), f334);
+    f337 = MUL_C(COEF_CONST(1.3629851833384954), f293);
+    y[10] = f335 + f336;
+    y[21] = f337 - f336;
+    f340 = f299 + f297;
+    f341 = MUL_F(FRAC_CONST(-0.2417766217337384), f299);
+    f342 = MUL_F(FRAC_CONST(0.8175848131515837), f340);
+    f343 = MUL_C(COEF_CONST(1.3933930045694289), f297);
+    y[12] = f341 + f342;
+    y[19] = f343 - f342;
+    f346 = f303 + f301;
+    f347 = MUL_F(FRAC_CONST(-0.1040360035527077), f303);
+    f348 = MUL_F(FRAC_CONST(0.7572088465064845), f346);
+    f349 = MUL_C(COEF_CONST(1.4103816894602612), f301);
+    y[14] = f347 + f348;
+    y[17] = f349 - f348;
+    f352 = f274 + f272;
+    f353 = MUL_F(FRAC_CONST(0.0347065382144002), f274);
+    f354 = MUL_F(FRAC_CONST(0.6895405447370668), f352);
+    f355 = MUL_C(COEF_CONST(1.4137876276885337), f272);
+    y[16] = f353 + f354;
+    y[15] = f355 - f354;
+    f358 = f278 + f276;
+    f359 = MUL_F(FRAC_CONST(0.1731148370459795), f278);
+    f360 = MUL_F(FRAC_CONST(0.6152315905806268), f358);
+    f361 = MUL_C(COEF_CONST(1.4035780182072330), f276);
+    y[18] = f359 + f360;
+    y[13] = f361 - f360;
+    f364 = f282 + f280;
+    f365 = MUL_F(FRAC_CONST(0.3098559453626100), f282);
+    f366 = MUL_F(FRAC_CONST(0.5349976198870972), f364);
+    f367 = MUL_C(COEF_CONST(1.3798511851368043), f280);
+    y[20] = f365 + f366;
+    y[11] = f367 - f366;
+    f370 = f286 + f284;
+    f371 = MUL_F(FRAC_CONST(0.4436129715409088), f286);
+    f372 = MUL_F(FRAC_CONST(0.4496113296546065), f370);
+    f373 = MUL_C(COEF_CONST(1.3428356308501219), f284);
+    y[22] = f371 + f372;
+    y[9] = f373 - f372;
+    f376 = f290 + f288;
+    f377 = MUL_F(FRAC_CONST(0.5730977622997509), f290);
+    f378 = MUL_F(FRAC_CONST(0.3598950365349881), f376);
+    f379 = MUL_C(COEF_CONST(1.2928878353697271), f288);
+    y[24] = f377 + f378;
+    y[7] = f379 - f378;
+    f382 = f294 + f292;
+    f383 = MUL_F(FRAC_CONST(0.6970633083205415), f294);
+    f384 = MUL_F(FRAC_CONST(0.2667127574748984), f382);
+    f385 = MUL_C(COEF_CONST(1.2304888232703382), f292);
+    y[26] = f383 + f384;
+    y[5] = f385 - f384;
+    f388 = f298 + f296;
+    f389 = MUL_F(FRAC_CONST(0.8143157536286401), f298);
+    f390 = MUL_F(FRAC_CONST(0.1709618887603012), f388);
+    f391 = MUL_C(COEF_CONST(1.1562395311492424), f296);
+    y[28] = f389 + f390;
+    y[3] = f391 - f390;
+    f394 = f302 + f300;
+    f395 = MUL_F(FRAC_CONST(0.9237258930790228), f302);
+    f396 = MUL_F(FRAC_CONST(0.0735645635996674), f394);
+    f397 = MUL_C(COEF_CONST(1.0708550202783576), f300);
+    y[30] = f395 + f396;
+    y[1] = f397 - f396;
+}
+
 #ifdef SBR_LOW_POWER
 
+void DCT2_16_unscaled(real_t *y, real_t *x)
+{
+    real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
+    real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
+    real_t f21, f22, f23, f24, f25, f26, f27, f28, f31, f32;
+    real_t f33, f34, f37, f38, f39, f40, f41, f42, f43, f44;
+    real_t f45, f46, f47, f48, f49, f51, f53, f54, f57, f58;
+    real_t f59, f60, f61, f62, f63, f64, f65, f66, f67, f68;
+    real_t f69, f70, f71, f72, f73, f74, f75, f76, f77, f78;
+    real_t f79, f80, f81, f82, f83, f84, f85, f86, f87, f88;
+    real_t f89, f90, f91, f92, f95, f96, f97, f98, f101, f102;
+    real_t f103, f104, f107, f108, f109, f110;
+
+    f0 = x[0] - x[15];
+    f1 = x[0] + x[15];
+    f2 = x[1] - x[14];
+    f3 = x[1] + x[14];
+    f4 = x[2] - x[13];
+    f5 = x[2] + x[13];
+    f6 = x[3] - x[12];
+    f7 = x[3] + x[12];
+    f8 = x[4] - x[11];
+    f9 = x[4] + x[11];
+    f10 = x[5] - x[10];
+    f11 = x[5] + x[10];
+    f12 = x[6] - x[9];
+    f13 = x[6] + x[9];
+    f14 = x[7] - x[8];
+    f15 = x[7] + x[8];
+    f16 = f1 - f15;
+    f17 = f1 + f15;
+    f18 = f3 - f13;
+    f19 = f3 + f13;
+    f20 = f5 - f11;
+    f21 = f5 + f11;
+    f22 = f7 - f9;
+    f23 = f7 + f9;
+    f24 = f17 - f23;
+    f25 = f17 + f23;
+    f26 = f19 - f21;
+    f27 = f19 + f21;
+    f28 = f25 - f27;
+    y[0] = f25 + f27;
+    y[8] = MUL_F(f28, FRAC_CONST(0.7071067811865476));
+    f31 = f24 + f26;
+    f32 = MUL_C(f24, COEF_CONST(1.3065629648763766));
+    f33 = MUL_F(f31, FRAC_CONST(-0.9238795325112866));
+    f34 = MUL_F(f26, FRAC_CONST(-0.5411961001461967));
+    y[12] = f32 + f33;
+    y[4] = f34 - f33;
+    f37 = f16 + f22;
+    f38 = MUL_C(f16, COEF_CONST(1.1758756024193588));
+    f39 = MUL_F(f37, FRAC_CONST(-0.9807852804032304));
+    f40 = MUL_F(f22, FRAC_CONST(-0.7856949583871021));
+    f41 = f38 + f39;
+    f42 = f40 - f39;
+    f43 = f18 + f20;
+    f44 = MUL_C(f18, COEF_CONST(1.3870398453221473));
+    f45 = MUL_F(f43, FRAC_CONST(-0.8314696123025455));
+    f46 = MUL_F(f20, FRAC_CONST(-0.2758993792829436));
+    f47 = f44 + f45;
+    f48 = f46 - f45;
+    f49 = f42 - f48;
+    y[2] = f42 + f48;
+    f51 = MUL_F(f49, FRAC_CONST(0.7071067811865476));
+    y[14] = f41 - f47;
+    f53 = f41 + f47;
+    f54 = MUL_F(f53, FRAC_CONST(0.7071067811865476));
+    y[10] = f51 - f54;
+    y[6] = f51 + f54;
+    f57 = f2 - f4;
+    f58 = f2 + f4;
+    f59 = f6 - f8;
+    f60 = f6 + f8;
+    f61 = f10 - f12;
+    f62 = f10 + f12;
+    f63 = MUL_F(f60, FRAC_CONST(0.7071067811865476));
+    f64 = f0 - f63;
+    f65 = f0 + f63;
+    f66 = f58 + f62;
+    f67 = MUL_C(f58, COEF_CONST(1.3065629648763766));
+    f68 = MUL_F(f66, FRAC_CONST(-0.9238795325112866));
+    f69 = MUL_F(f62, FRAC_CONST(-0.5411961001461967));
+    f70 = f67 + f68;
+    f71 = f69 - f68;
+    f72 = f65 - f71;
+    f73 = f65 + f71;
+    f74 = f64 - f70;
+    f75 = f64 + f70;
+    f76 = MUL_F(f59, FRAC_CONST(0.7071067811865476));
+    f77 = f14 - f76;
+    f78 = f14 + f76;
+    f79 = f61 + f57;
+    f80 = MUL_C(f61, COEF_CONST(1.3065629648763766));
+    f81 = MUL_F(f79, FRAC_CONST(-0.9238795325112866));
+    f82 = MUL_F(f57, FRAC_CONST(-0.5411961001461967));
+    f83 = f80 + f81;
+    f84 = f82 - f81;
+    f85 = f78 - f84;
+    f86 = f78 + f84;
+    f87 = f77 - f83;
+    f88 = f77 + f83;
+    f89 = f86 + f73;
+    f90 = MUL_F(f86, FRAC_CONST(-0.8971675863426361));
+    f91 = MUL_F(f89, FRAC_CONST(0.9951847266721968));
+    f92 = MUL_C(f73, COEF_CONST(1.0932018670017576));
+    y[1] = f90 + f91;
+    y[15] = f92 - f91;
+    f95 = f75 - f88;
+    f96 = MUL_F(f88, FRAC_CONST(-0.6666556584777466));
+    f97 = MUL_F(f95, FRAC_CONST(0.9569403357322089));
+    f98 = MUL_C(f75, COEF_CONST(1.2472250129866713));
+    y[3] = f97 - f96;
+    y[13] = f98 - f97;
+    f101 = f87 + f74;
+    f102 = MUL_F(f87, FRAC_CONST(-0.4105245275223571));
+    f103 = MUL_F(f101, FRAC_CONST(0.8819212643483549));
+    f104 = MUL_C(f74, COEF_CONST(1.3533180011743529));
+    y[5] = f102 + f103;
+    y[11] = f104 - f103;
+    f107 = f72 - f85;
+    f108 = MUL_F(f85, FRAC_CONST(-0.1386171691990915));
+    f109 = MUL_F(f107, FRAC_CONST(0.7730104533627370));
+    f110 = MUL_C(f72, COEF_CONST(1.4074037375263826));
+    y[7] = f109 - f108;
+    y[9] = f110 - f109;
+}
+
+void DCT4_16(real_t *y, real_t *x)
+{
+    real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
+    real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
+    real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
+    real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
+    real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
+    real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
+    real_t f61, f62, f63, f64, f65, f66, f67, f68, f69, f70;
+    real_t f71, f72, f73, f74, f75, f76, f77, f78, f79, f80;
+    real_t f81, f82, f83, f84, f85, f86, f87, f88, f89, f90;
+    real_t f91, f92, f93, f94, f95, f96, f97, f98, f99, f100;
+    real_t f101, f102, f103, f104, f105, f106, f107, f108, f109, f110;
+    real_t f111, f112, f113, f114, f115, f116, f117, f118, f119, f120;
+    real_t f121, f122, f123, f124, f125, f126, f127, f128, f130, f132;
+    real_t f134, f136, f138, f140, f142, f144, f145, f148, f149, f152;
+    real_t f153, f156, f157;
+
+    f0 = x[0] + x[15];
+    f1 = MUL_C(COEF_CONST(1.0478631305325901), x[0]);
+    f2 = MUL_F(FRAC_CONST(-0.9987954562051724), f0);
+    f3 = MUL_F(FRAC_CONST(-0.9497277818777548), x[15]);
+    f4 = f1 + f2;
+    f5 = f3 - f2;
+    f6 = x[2] + x[13];
+    f7 = MUL_C(COEF_CONST(1.2130114330978077), x[2]);
+    f8 = MUL_F(FRAC_CONST(-0.9700312531945440), f6);
+    f9 = MUL_F(FRAC_CONST(-0.7270510732912803), x[13]);
+    f10 = f7 + f8;
+    f11 = f9 - f8;
+    f12 = x[4] + x[11];
+    f13 = MUL_C(COEF_CONST(1.3315443865537255), x[4]);
+    f14 = MUL_F(FRAC_CONST(-0.9039892931234433), f12);
+    f15 = MUL_F(FRAC_CONST(-0.4764341996931612), x[11]);
+    f16 = f13 + f14;
+    f17 = f15 - f14;
+    f18 = x[6] + x[9];
+    f19 = MUL_C(COEF_CONST(1.3989068359730781), x[6]);
+    f20 = MUL_F(FRAC_CONST(-0.8032075314806453), f18);
+    f21 = MUL_F(FRAC_CONST(-0.2075082269882124), x[9]);
+    f22 = f19 + f20;
+    f23 = f21 - f20;
+    f24 = x[8] + x[7];
+    f25 = MUL_C(COEF_CONST(1.4125100802019777), x[8]);
+    f26 = MUL_F(FRAC_CONST(-0.6715589548470187), f24);
+    f27 = MUL_F(FRAC_CONST(0.0693921705079402), x[7]);
+    f28 = f25 + f26;
+    f29 = f27 - f26;
+    f30 = x[10] + x[5];
+    f31 = MUL_C(COEF_CONST(1.3718313541934939), x[10]);
+    f32 = MUL_F(FRAC_CONST(-0.5141027441932219), f30);
+    f33 = MUL_F(FRAC_CONST(0.3436258658070501), x[5]);
+    f34 = f31 + f32;
+    f35 = f33 - f32;
+    f36 = x[12] + x[3];
+    f37 = MUL_C(COEF_CONST(1.2784339185752409), x[12]);
+    f38 = MUL_F(FRAC_CONST(-0.3368898533922200), f36);
+    f39 = MUL_F(FRAC_CONST(0.6046542117908008), x[3]);
+    f40 = f37 + f38;
+    f41 = f39 - f38;
+    f42 = x[14] + x[1];
+    f43 = MUL_C(COEF_CONST(1.1359069844201433), x[14]);
+    f44 = MUL_F(FRAC_CONST(-0.1467304744553624), f42);
+    f45 = MUL_F(FRAC_CONST(0.8424460355094185), x[1]);
+    f46 = f43 + f44;
+    f47 = f45 - f44;
+    f48 = f5 - f29;
+    f49 = f5 + f29;
+    f50 = f4 - f28;
+    f51 = f4 + f28;
+    f52 = f11 - f35;
+    f53 = f11 + f35;
+    f54 = f10 - f34;
+    f55 = f10 + f34;
+    f56 = f17 - f41;
+    f57 = f17 + f41;
+    f58 = f16 - f40;
+    f59 = f16 + f40;
+    f60 = f23 - f47;
+    f61 = f23 + f47;
+    f62 = f22 - f46;
+    f63 = f22 + f46;
+    f64 = f48 + f50;
+    f65 = MUL_C(COEF_CONST(1.1758756024193588), f48);
+    f66 = MUL_F(FRAC_CONST(-0.9807852804032304), f64);
+    f67 = MUL_F(FRAC_CONST(-0.7856949583871021), f50);
+    f68 = f65 + f66;
+    f69 = f67 - f66;
+    f70 = f52 + f54;
+    f71 = MUL_C(COEF_CONST(1.3870398453221475), f52);
+    f72 = MUL_F(FRAC_CONST(-0.5555702330196022), f70);
+    f73 = MUL_F(FRAC_CONST(0.2758993792829431), f54);
+    f74 = f71 + f72;
+    f75 = f73 - f72;
+    f76 = f56 + f58;
+    f77 = MUL_F(FRAC_CONST(0.7856949583871022), f56);
+    f78 = MUL_F(FRAC_CONST(0.1950903220161283), f76);
+    f79 = MUL_C(COEF_CONST(1.1758756024193586), f58);
+    f80 = f77 + f78;
+    f81 = f79 - f78;
+    f82 = f60 + f62;
+    f83 = MUL_F(FRAC_CONST(-0.2758993792829430), f60);
+    f84 = MUL_F(FRAC_CONST(0.8314696123025452), f82);
+    f85 = MUL_C(COEF_CONST(1.3870398453221475), f62);
+    f86 = f83 + f84;
+    f87 = f85 - f84;
+    f88 = f49 - f57;
+    f89 = f49 + f57;
+    f90 = f51 - f59;
+    f91 = f51 + f59;
+    f92 = f53 - f61;
+    f93 = f53 + f61;
+    f94 = f55 - f63;
+    f95 = f55 + f63;
+    f96 = f69 - f81;
+    f97 = f69 + f81;
+    f98 = f68 - f80;
+    f99 = f68 + f80;
+    f100 = f75 - f87;
+    f101 = f75 + f87;
+    f102 = f74 - f86;
+    f103 = f74 + f86;
+    f104 = f88 + f90;
+    f105 = MUL_C(COEF_CONST(1.3065629648763766), f88);
+    f106 = MUL_F(FRAC_CONST(-0.9238795325112866), f104);
+    f107 = MUL_F(FRAC_CONST(-0.5411961001461967), f90);
+    f108 = f105 + f106;
+    f109 = f107 - f106;
+    f110 = f92 + f94;
+    f111 = MUL_F(FRAC_CONST(0.5411961001461969), f92);
+    f112 = MUL_F(FRAC_CONST(0.3826834323650898), f110);
+    f113 = MUL_C(COEF_CONST(1.3065629648763766), f94);
+    f114 = f111 + f112;
+    f115 = f113 - f112;
+    f116 = f96 + f98;
+    f117 = MUL_C(COEF_CONST(1.3065629648763766), f96);
+    f118 = MUL_F(FRAC_CONST(-0.9238795325112866), f116);
+    f119 = MUL_F(FRAC_CONST(-0.5411961001461967), f98);
+    f120 = f117 + f118;
+    f121 = f119 - f118;
+    f122 = f100 + f102;
+    f123 = MUL_F(FRAC_CONST(0.5411961001461969), f100);
+    f124 = MUL_F(FRAC_CONST(0.3826834323650898), f122);
+    f125 = MUL_C(COEF_CONST(1.3065629648763766), f102);
+    f126 = f123 + f124;
+    f127 = f125 - f124;
+    f128 = f89 - f93;
+    y[0] = f89 + f93;
+    f130 = f91 - f95;
+    y[15] = f91 + f95;
+    f132 = f109 - f115;
+    y[3] = f109 + f115;
+    f134 = f108 - f114;
+    y[12] = f108 + f114;
+    f136 = f97 - f101;
+    y[1] = f97 + f101;
+    f138 = f99 - f103;
+    y[14] = f99 + f103;
+    f140 = f121 - f127;
+    y[2] = f121 + f127;
+    f142 = f120 - f126;
+    y[13] = f120 + f126;
+    f144 = f128 - f130;
+    f145 = f128 + f130;
+    y[8] = MUL_F(FRAC_CONST(0.7071067811865474), f144);
+    y[7] = MUL_F(FRAC_CONST(0.7071067811865474), f145);
+    f148 = f132 - f134;
+    f149 = f132 + f134;
+    y[11] = MUL_F(FRAC_CONST(0.7071067811865474), f148);
+    y[4] = MUL_F(FRAC_CONST(0.7071067811865474), f149);
+    f152 = f136 - f138;
+    f153 = f136 + f138;
+    y[9] = MUL_F(FRAC_CONST(0.7071067811865474), f152);
+    y[6] = MUL_F(FRAC_CONST(0.7071067811865474), f153);
+    f156 = f140 - f142;
+    f157 = f140 + f142;
+    y[10] = MUL_F(FRAC_CONST(0.7071067811865474), f156);
+    y[5] = MUL_F(FRAC_CONST(0.7071067811865474), f157);
+}
+
 void DCT3_32_unscaled(real_t *y, real_t *x)
 {
     real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
@@ -72,13 +822,13 @@
     real_t f261, f262, f263, f264, f265, f266, f267, f268, f269, f270;
     real_t f271, f272;
 
-    f0 = MUL_C(COEF_CONST(0.7071067811865476), x[16]);
+    f0 = MUL_F(x[16], FRAC_CONST(0.7071067811865476));
     f1 = x[0] - f0;
     f2 = x[0] + f0;
     f3 = x[8] + x[24];
-    f4 = MUL_C(COEF_CONST(1.3065629648763766), x[8]);
-    f5 = MUL_C(COEF_CONST((-0.9238795325112866)), f3);
-    f6 = MUL_C(COEF_CONST((-0.5411961001461967)), x[24]);
+    f4 = MUL_C(x[8], COEF_CONST(1.3065629648763766));
+    f5 = MUL_F(f3, FRAC_CONST((-0.9238795325112866)));
+    f6 = MUL_F(x[24], FRAC_CONST((-0.5411961001461967)));
     f7 = f4 + f5;
     f8 = f6 - f5;
     f9 = f2 - f8;
@@ -86,23 +836,23 @@
     f11 = f1 - f7;
     f12 = f1 + f7;
     f13 = x[4] + x[28];
-    f14 = MUL_C(COEF_CONST(1.1758756024193588), x[4]);
-    f15 = MUL_C(COEF_CONST((-0.9807852804032304)), f13);
-    f16 = MUL_C(COEF_CONST((-0.7856949583871021)), x[28]);
+    f14 = MUL_C(x[4], COEF_CONST(1.1758756024193588));
+    f15 = MUL_F(f13, FRAC_CONST((-0.9807852804032304)));
+    f16 = MUL_F(x[28], FRAC_CONST((-0.7856949583871021)));
     f17 = f14 + f15;
     f18 = f16 - f15;
     f19 = x[12] + x[20];
-    f20 = MUL_C(COEF_CONST(1.3870398453221473), x[12]);
-    f21 = MUL_C(COEF_CONST((-0.8314696123025455)), f19);
-    f22 = MUL_C(COEF_CONST((-0.2758993792829436)), x[20]);
+    f20 = MUL_C(x[12], COEF_CONST(1.3870398453221473));
+    f21 = MUL_F(f19, FRAC_CONST((-0.8314696123025455)));
+    f22 = MUL_F(x[20], FRAC_CONST((-0.2758993792829436)));
     f23 = f20 + f21;
     f24 = f22 - f21;
     f25 = f18 - f24;
     f26 = f18 + f24;
-    f27 = MUL_C(COEF_CONST(0.7071067811865476), f25);
+    f27 = MUL_F(f25, FRAC_CONST(0.7071067811865476));
     f28 = f17 - f23;
     f29 = f17 + f23;
-    f30 = MUL_C(COEF_CONST(0.7071067811865476), f29);
+    f30 = MUL_F(f29, FRAC_CONST(0.7071067811865476));
     f31 = f27 - f30;
     f32 = f27 + f30;
     f33 = f10 - f26;
@@ -114,27 +864,27 @@
     f39 = f9 - f28;
     f40 = f9 + f28;
     f41 = x[2] + x[30];
-    f42 = MUL_C(COEF_CONST(1.0932018670017569), x[2]);
-    f43 = MUL_C(COEF_CONST((-0.9951847266721969)), f41);
-    f44 = MUL_C(COEF_CONST((-0.8971675863426368)), x[30]);
+    f42 = MUL_C(x[2], COEF_CONST(1.0932018670017569));
+    f43 = MUL_F(f41, FRAC_CONST((-0.9951847266721969)));
+    f44 = MUL_F(x[30], FRAC_CONST((-0.8971675863426368)));
     f45 = f42 + f43;
     f46 = f44 - f43;
     f47 = x[6] + x[26];
-    f48 = MUL_C(COEF_CONST(1.2472250129866711), x[6]);
-    f49 = MUL_C(COEF_CONST((-0.9569403357322089)), f47);
-    f50 = MUL_C(COEF_CONST((-0.6666556584777469)), x[26]);
+    f48 = MUL_C(x[6], COEF_CONST(1.2472250129866711));
+    f49 = MUL_F(f47, FRAC_CONST((-0.9569403357322089)));
+    f50 = MUL_F(x[26], FRAC_CONST((-0.6666556584777469)));
     f51 = f48 + f49;
     f52 = f50 - f49;
     f53 = x[10] + x[22];
-    f54 = MUL_C(COEF_CONST(1.3533180011743526), x[10]);
-    f55 = MUL_C(COEF_CONST((-0.8819212643483551)), f53);
-    f56 = MUL_C(COEF_CONST((-0.4105245275223575)), x[22]);
+    f54 = MUL_C(x[10], COEF_CONST(1.3533180011743526));
+    f55 = MUL_F(f53, FRAC_CONST((-0.8819212643483551)));
+    f56 = MUL_F(x[22], FRAC_CONST((-0.4105245275223575)));
     f57 = f54 + f55;
     f58 = f56 - f55;
     f59 = x[14] + x[18];
-    f60 = MUL_C(COEF_CONST(1.4074037375263826), x[14]);
-    f61 = MUL_C(COEF_CONST((-0.7730104533627369)), f59);
-    f62 = MUL_C(COEF_CONST((-0.1386171691990913)), x[18]);
+    f60 = MUL_C(x[14], COEF_CONST(1.4074037375263826));
+    f61 = MUL_F(f59, FRAC_CONST((-0.7730104533627369)));
+    f62 = MUL_F(x[18], FRAC_CONST((-0.1386171691990913)));
     f63 = f60 + f61;
     f64 = f62 - f61;
     f65 = f46 - f64;
@@ -143,11 +893,11 @@
     f68 = f52 + f58;
     f69 = f66 - f68;
     f70 = f66 + f68;
-    f71 = MUL_C(COEF_CONST(0.7071067811865476), f69);
+    f71 = MUL_F(f69, FRAC_CONST(0.7071067811865476));
     f72 = f65 + f67;
-    f73 = MUL_C(COEF_CONST(1.3065629648763766), f65);
-    f74 = MUL_C(COEF_CONST((-0.9238795325112866)), f72);
-    f75 = MUL_C(COEF_CONST((-0.5411961001461967)), f67);
+    f73 = MUL_C(f65, COEF_CONST(1.3065629648763766));
+    f74 = MUL_F(f72, FRAC_CONST((-0.9238795325112866)));
+    f75 = MUL_F(f67, FRAC_CONST((-0.5411961001461967)));
     f76 = f73 + f74;
     f77 = f75 - f74;
     f78 = f45 - f63;
@@ -155,14 +905,14 @@
     f80 = f51 - f57;
     f81 = f51 + f57;
     f82 = f79 + f81;
-    f83 = MUL_C(COEF_CONST(1.3065629648763770), f79);
-    f84 = MUL_C(COEF_CONST((-0.3826834323650904)), f82);
-    f85 = MUL_C(COEF_CONST(0.5411961001461961), f81);
+    f83 = MUL_C(f79, COEF_CONST(1.3065629648763770));
+    f84 = MUL_F(f82, FRAC_CONST((-0.3826834323650904)));
+    f85 = MUL_F(f81, FRAC_CONST(0.5411961001461961));
     f86 = f83 + f84;
     f87 = f85 - f84;
     f88 = f78 - f80;
     f89 = f78 + f80;
-    f90 = MUL_C(COEF_CONST(0.7071067811865476), f89);
+    f90 = MUL_F(f89, FRAC_CONST(0.7071067811865476));
     f91 = f77 - f87;
     f92 = f77 + f87;
     f93 = f71 - f90;
@@ -186,51 +936,51 @@
     f111 = f33 - f88;
     f112 = f33 + f88;
     f113 = x[1] + x[31];
-    f114 = MUL_C(COEF_CONST(1.0478631305325901), x[1]);
-    f115 = MUL_C(COEF_CONST((-0.9987954562051724)), f113);
-    f116 = MUL_C(COEF_CONST((-0.9497277818777548)), x[31]);
+    f114 = MUL_C(x[1], COEF_CONST(1.0478631305325901));
+    f115 = MUL_F(f113, FRAC_CONST((-0.9987954562051724)));
+    f116 = MUL_F(x[31], FRAC_CONST((-0.9497277818777548)));
     f117 = f114 + f115;
     f118 = f116 - f115;
     f119 = x[5] + x[27];
-    f120 = MUL_C(COEF_CONST(1.2130114330978077), x[5]);
-    f121 = MUL_C(COEF_CONST((-0.9700312531945440)), f119);
-    f122 = MUL_C(COEF_CONST((-0.7270510732912803)), x[27]);
+    f120 = MUL_C(x[5], COEF_CONST(1.2130114330978077));
+    f121 = MUL_F(f119, FRAC_CONST((-0.9700312531945440)));
+    f122 = MUL_F(x[27], FRAC_CONST((-0.7270510732912803)));
     f123 = f120 + f121;
     f124 = f122 - f121;
     f125 = x[9] + x[23];
-    f126 = MUL_C(COEF_CONST(1.3315443865537255), x[9]);
-    f127 = MUL_C(COEF_CONST((-0.9039892931234433)), f125);
-    f128 = MUL_C(COEF_CONST((-0.4764341996931612)), x[23]);
+    f126 = MUL_C(x[9], COEF_CONST(1.3315443865537255));
+    f127 = MUL_F(f125, FRAC_CONST((-0.9039892931234433)));
+    f128 = MUL_F(x[23], FRAC_CONST((-0.4764341996931612)));
     f129 = f126 + f127;
     f130 = f128 - f127;
     f131 = x[13] + x[19];
-    f132 = MUL_C(COEF_CONST(1.3989068359730781), x[13]);
-    f133 = MUL_C(COEF_CONST((-0.8032075314806453)), f131);
-    f134 = MUL_C(COEF_CONST((-0.2075082269882124)), x[19]);
+    f132 = MUL_C(x[13], COEF_CONST(1.3989068359730781));
+    f133 = MUL_F(f131, FRAC_CONST((-0.8032075314806453)));
+    f134 = MUL_F(x[19], FRAC_CONST((-0.2075082269882124)));
     f135 = f132 + f133;
     f136 = f134 - f133;
     f137 = x[17] + x[15];
-    f138 = MUL_C(COEF_CONST(1.4125100802019777), x[17]);
-    f139 = MUL_C(COEF_CONST((-0.6715589548470187)), f137);
-    f140 = MUL_C(COEF_CONST(0.0693921705079402), x[15]);
+    f138 = MUL_C(x[17], COEF_CONST(1.4125100802019777));
+    f139 = MUL_F(f137, FRAC_CONST((-0.6715589548470187)));
+    f140 = MUL_F(x[15], FRAC_CONST(0.0693921705079402));
     f141 = f138 + f139;
     f142 = f140 - f139;
     f143 = x[21] + x[11];
-    f144 = MUL_C(COEF_CONST(1.3718313541934939), x[21]);
-    f145 = MUL_C(COEF_CONST((-0.5141027441932219)), f143);
-    f146 = MUL_C(COEF_CONST(0.3436258658070501), x[11]);
+    f144 = MUL_C(x[21], COEF_CONST(1.3718313541934939));
+    f145 = MUL_F(f143, FRAC_CONST((-0.5141027441932219)));
+    f146 = MUL_F(x[11], FRAC_CONST(0.3436258658070501));
     f147 = f144 + f145;
     f148 = f146 - f145;
     f149 = x[25] + x[7];
-    f150 = MUL_C(COEF_CONST(1.2784339185752409), x[25]);
-    f151 = MUL_C(COEF_CONST((-0.3368898533922200)), f149);
-    f152 = MUL_C(COEF_CONST(0.6046542117908008), x[7]);
+    f150 = MUL_C(x[25], COEF_CONST(1.2784339185752409));
+    f151 = MUL_F(f149, FRAC_CONST((-0.3368898533922200)));
+    f152 = MUL_F(x[7], FRAC_CONST(0.6046542117908008));
     f153 = f150 + f151;
     f154 = f152 - f151;
     f155 = x[29] + x[3];
-    f156 = MUL_C(COEF_CONST(1.1359069844201433), x[29]);
-    f157 = MUL_C(COEF_CONST((-0.1467304744553624)), f155);
-    f158 = MUL_C(COEF_CONST(0.8424460355094185), x[3]);
+    f156 = MUL_C(x[29], COEF_CONST(1.1359069844201433));
+    f157 = MUL_F(f155, FRAC_CONST((-0.1467304744553624)));
+    f158 = MUL_F(x[3], FRAC_CONST(0.8424460355094185));
     f159 = f156 + f157;
     f160 = f158 - f157;
     f161 = f118 - f142;
@@ -250,27 +1000,27 @@
     f175 = f135 - f159;
     f176 = f135 + f159;
     f177 = f161 + f163;
-    f178 = MUL_C(COEF_CONST(1.1758756024193588), f161);
-    f179 = MUL_C(COEF_CONST((-0.9807852804032304)), f177);
-    f180 = MUL_C(COEF_CONST((-0.7856949583871021)), f163);
+    f178 = MUL_C(f161, COEF_CONST(1.1758756024193588));
+    f179 = MUL_F(f177, FRAC_CONST((-0.9807852804032304)));
+    f180 = MUL_F(f163, FRAC_CONST((-0.7856949583871021)));
     f181 = f178 + f179;
     f182 = f180 - f179;
     f183 = f165 + f167;
-    f184 = MUL_C(COEF_CONST(1.3870398453221475), f165);
-    f185 = MUL_C(COEF_CONST((-0.5555702330196022)), f183);
-    f186 = MUL_C(COEF_CONST(0.2758993792829431), f167);
+    f184 = MUL_C(f165, COEF_CONST(1.3870398453221475));
+    f185 = MUL_F(f183, FRAC_CONST((-0.5555702330196022)));
+    f186 = MUL_F(f167, FRAC_CONST(0.2758993792829431));
     f187 = f184 + f185;
     f188 = f186 - f185;
     f189 = f169 + f171;
-    f190 = MUL_C(COEF_CONST(0.7856949583871022), f169);
-    f191 = MUL_C(COEF_CONST(0.1950903220161283), f189);
-    f192 = MUL_C(COEF_CONST(1.1758756024193586), f171);
+    f190 = MUL_F(f169, FRAC_CONST(0.7856949583871022));
+    f191 = MUL_F(f189, FRAC_CONST(0.1950903220161283));
+    f192 = MUL_C(f171, COEF_CONST(1.1758756024193586));
     f193 = f190 + f191;
     f194 = f192 - f191;
     f195 = f173 + f175;
-    f196 = MUL_C(COEF_CONST((-0.2758993792829430)), f173);
-    f197 = MUL_C(COEF_CONST(0.8314696123025452), f195);
-    f198 = MUL_C(COEF_CONST(1.3870398453221475), f175);
+    f196 = MUL_F(f173, FRAC_CONST((-0.2758993792829430)));
+    f197 = MUL_F(f195, FRAC_CONST(0.8314696123025452));
+    f198 = MUL_C(f175, COEF_CONST(1.3870398453221475));
     f199 = f196 + f197;
     f200 = f198 - f197;
     f201 = f162 - f170;
@@ -290,27 +1040,27 @@
     f215 = f187 - f199;
     f216 = f187 + f199;
     f217 = f201 + f203;
-    f218 = MUL_C(COEF_CONST(1.3065629648763766), f201);
-    f219 = MUL_C(COEF_CONST((-0.9238795325112866)), f217);
-    f220 = MUL_C(COEF_CONST((-0.5411961001461967)), f203);
+    f218 = MUL_C(f201, COEF_CONST(1.3065629648763766));
+    f219 = MUL_F(f217, FRAC_CONST((-0.9238795325112866)));
+    f220 = MUL_F(f203, FRAC_CONST((-0.5411961001461967)));
     f221 = f218 + f219;
     f222 = f220 - f219;
     f223 = f205 + f207;
-    f224 = MUL_C(COEF_CONST(0.5411961001461969), f205);
-    f225 = MUL_C(COEF_CONST(0.3826834323650898), f223);
-    f226 = MUL_C(COEF_CONST(1.3065629648763766), f207);
+    f224 = MUL_F(f205, FRAC_CONST(0.5411961001461969));
+    f225 = MUL_F(f223, FRAC_CONST(0.3826834323650898));
+    f226 = MUL_C(f207, COEF_CONST(1.3065629648763766));
     f227 = f224 + f225;
     f228 = f226 - f225;
     f229 = f209 + f211;
-    f230 = MUL_C(COEF_CONST(1.3065629648763766), f209);
-    f231 = MUL_C(COEF_CONST((-0.9238795325112866)), f229);
-    f232 = MUL_C(COEF_CONST((-0.5411961001461967)), f211);
+    f230 = MUL_C(f209, COEF_CONST(1.3065629648763766));
+    f231 = MUL_F(f229, FRAC_CONST((-0.9238795325112866)));
+    f232 = MUL_F(f211, FRAC_CONST((-0.5411961001461967)));
     f233 = f230 + f231;
     f234 = f232 - f231;
     f235 = f213 + f215;
-    f236 = MUL_C(COEF_CONST(0.5411961001461969), f213);
-    f237 = MUL_C(COEF_CONST(0.3826834323650898), f235);
-    f238 = MUL_C(COEF_CONST(1.3065629648763766), f215);
+    f236 = MUL_F(f213, FRAC_CONST(0.5411961001461969));
+    f237 = MUL_F(f235, FRAC_CONST(0.3826834323650898));
+    f238 = MUL_C(f215, COEF_CONST(1.3065629648763766));
     f239 = f236 + f237;
     f240 = f238 - f237;
     f241 = f202 - f206;
@@ -331,20 +1081,20 @@
     f256 = f233 + f239;
     f257 = f241 - f243;
     f258 = f241 + f243;
-    f259 = MUL_C(COEF_CONST(0.7071067811865474), f257);
-    f260 = MUL_C(COEF_CONST(0.7071067811865474), f258);
+    f259 = MUL_F(f257, FRAC_CONST(0.7071067811865474));
+    f260 = MUL_F(f258, FRAC_CONST(0.7071067811865474));
     f261 = f245 - f247;
     f262 = f245 + f247;
-    f263 = MUL_C(COEF_CONST(0.7071067811865474), f261);
-    f264 = MUL_C(COEF_CONST(0.7071067811865474), f262);
+    f263 = MUL_F(f261, FRAC_CONST(0.7071067811865474));
+    f264 = MUL_F(f262, FRAC_CONST(0.7071067811865474));
     f265 = f249 - f251;
     f266 = f249 + f251;
-    f267 = MUL_C(COEF_CONST(0.7071067811865474), f265);
-    f268 = MUL_C(COEF_CONST(0.7071067811865474), f266);
+    f267 = MUL_F(f265, FRAC_CONST(0.7071067811865474));
+    f268 = MUL_F(f266, FRAC_CONST(0.7071067811865474));
     f269 = f253 - f255;
     f270 = f253 + f255;
-    f271 = MUL_C(COEF_CONST(0.7071067811865474), f269);
-    f272 = MUL_C(COEF_CONST(0.7071067811865474), f270);
+    f271 = MUL_F(f269, FRAC_CONST(0.7071067811865474));
+    f272 = MUL_F(f270, FRAC_CONST(0.7071067811865474));
     y[31] = f98 - f242;
     y[0] = f98 + f242;
     y[30] = f100 - f250;
@@ -379,22 +1129,21 @@
     y[15] = f97 + f244;
 }
 
-void DCT2_64_unscaled(real_t *y, real_t *x)
+void DCT2_32_unscaled(real_t *y, real_t *x)
 {
-    int16_t i0;
-    real_t f2, f3, f4, f5, f6, f7, f8, f9, f10;
+    real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
     real_t f11, f12, f13, f14, f15, f16, f17, f18, f19, f20;
     real_t f21, f22, f23, f24, f25, f26, f27, f28, f29, f30;
     real_t f31, f32, f33, f34, f35, f36, f37, f38, f39, f40;
     real_t f41, f42, f43, f44, f45, f46, f47, f48, f49, f50;
     real_t f51, f52, f53, f54, f55, f56, f57, f58, f59, f60;
-    real_t f61, f62, f65, f66, f67, f68, f71, f72, f73, f74;
-    real_t f75, f76, f77, f78, f79, f80, f81, f82, f83, f85;
-    real_t f87, f88, f91, f92, f93, f94, f95, f96, f97, f98;
+    real_t f63, f64, f65, f66, f69, f70, f71, f72, f73, f74;
+    real_t f75, f76, f77, f78, f79, f80, f81, f83, f85, f86;
+    real_t f89, f90, f91, f92, f93, f94, f95, f96, f97, f98;
     real_t f99, f100, f101, f102, f103, f104, f105, f106, f107, f108;
     real_t f109, f110, f111, f112, f113, f114, f115, f116, f117, f118;
-    real_t f119, f120, f121, f122, f123, f124, f125, f126, f129, f130;
-    real_t f131, f132, f135, f136, f137, f138, f141, f142, f143, f144;
+    real_t f119, f120, f121, f122, f123, f124, f127, f128, f129, f130;
+    real_t f133, f134, f135, f136, f139, f140, f141, f142, f145, f146;
     real_t f147, f148, f149, f150, f151, f152, f153, f154, f155, f156;
     real_t f157, f158, f159, f160, f161, f162, f163, f164, f165, f166;
     real_t f167, f168, f169, f170, f171, f172, f173, f174, f175, f176;
@@ -404,2410 +1153,1121 @@
     real_t f207, f208, f209, f210, f211, f212, f213, f214, f215, f216;
     real_t f217, f218, f219, f220, f221, f222, f223, f224, f225, f226;
     real_t f227, f228, f229, f230, f231, f232, f233, f234, f235, f236;
-    real_t f237, f238, f239, f240, f241, f242, f243, f244, f245, f246;
-    real_t f247, f248, f249, f250, f251, f252, f253, f254, f255, f256;
-    real_t f257, f258, f259, f260, f261, f262, f265, f266, f267, f268;
-    real_t f271, f272, f273, f274, f277, f278, f279, f280, f283, f284;
-    real_t f285, f286, f289, f290, f291, f292, f295, f296, f297, f298;
-    real_t f301, f302, f303, f304, f307, f308, f309, f310, f311, f312;
-    real_t f313, f314, f315, f316, f317, f318, f319, f320, f321, f322;
-    real_t f323, f324, f325, f326, f327, f328, f329, f330, f331, f332;
-    real_t f333, f334, f335, f336, f337, f338, f339, f340, f341, f342;
-    real_t f343, f344, f345, f346, f347, f348, f349, f350, f351, f352;
-    real_t f353, f354, f355, f356, f357, f358, f359, f360, f361, f362;
-    real_t f363, f364, f365, f366, f367, f368, f369, f370, f371, f372;
-    real_t f373, f374, f375, f376, f377, f378, f379, f380, f381, f382;
-    real_t f383, f384, f385, f386, f387, f388, f389, f390, f391, f392;
-    real_t f393, f394, f395, f396, f397, f398, f399, f400, f401, f402;
-    real_t f403, f404, f405, f406, f407, f408, f409, f410, f411, f412;
-    real_t f413, f414, f415, f416, f417, f418, f419, f420, f421, f422;
-    real_t f423, f424, f425, f426, f427, f428, f429, f430, f431, f433;
-    real_t f434, f435, f436, f437, f438, f439, f440, f441, f442, f443;
-    real_t f444, f445, f446, f447, f448, f449, f450, f451, f452, f453;
-    real_t f454, f455, f456, f457, f458, f459, f460, f461, f462, f463;
-    real_t f464, f465, f466, f467, f468, f469, f470, f471, f472, f473;
-    real_t f474, f475, f476, f477, f478, f479, f480, f481, f482, f483;
-    real_t f484, f485, f486, f487, f488, f489, f490, f491, f492, f493;
-    real_t f494, f495, f496, f497, f498, f499, f500, f501, f502, f503;
-    real_t f504, f505, f506, f507, f508, f509, f510, f511, f512, f513;
-    real_t f514, f515, f516, f517, f518, f519, f520, f521, f522, f523;
-    real_t f524, f525, f526, f527, f528, f529, f530, f531, f532, f533;
-    real_t f534, f535, f536, f537, f538, f539, f540, f541, f542, f543;
-    real_t f544, f546, f547, f548, f549, f550, f551, f552, f553, f554;
-    real_t f555, f556, f557, f558, f559, f560, f561, f562, f563, f564;
-    real_t f565, f566, f567, f568, f569, f570, f571, f572, f573, f574;
-    real_t f575, f576, f577, f578, f579, f580, f581, f582, f583, f584;
-    real_t f585, f586, f587, f588, f589, f590, f591, f592, f593, f594;
-    real_t f595, f596, f597, f598, f599, f600, f601, f602, f603, f604;
-    real_t f605, f606, f607, f608, f609, f610, f611, f612, f613, f614;
-    real_t f615, f616, f617, f618, f619, f620, f621, f622, f623, f624;
-    real_t f625, f626, f627, f628;
-    ALIGN static real_t t2[64];
+    real_t f237, f238, f239, f240, f241, f242, f243, f244, f247, f248;
+    real_t f249, f250, f253, f254, f255, f256, f259, f260, f261, f262;
+    real_t f265, f266, f267, f268, f271, f272, f273, f274, f277, f278;
+    real_t f279, f280, f283, f284, f285, f286;
 
-    for (i0=0; i0<32; i0++)
-    {
-        t2[2*i0+1] = x[i0] - x[-i0+63];
-        t2[2*i0] = x[i0] + x[-i0+63];
-    }
-    f2 = t2[0] - t2[62];
-    f3 = t2[0] + t2[62];
-    f4 = t2[2] - t2[60];
-    f5 = t2[2] + t2[60];
-    f6 = t2[4] - t2[58];
-    f7 = t2[4] + t2[58];
-    f8 = t2[6] - t2[56];
-    f9 = t2[6] + t2[56];
-    f10 = t2[8] - t2[54];
-    f11 = t2[8] + t2[54];
-    f12 = t2[10] - t2[52];
-    f13 = t2[10] + t2[52];
-    f14 = t2[12] - t2[50];
-    f15 = t2[12] + t2[50];
-    f16 = t2[14] - t2[48];
-    f17 = t2[14] + t2[48];
-    f18 = t2[16] - t2[46];
-    f19 = t2[16] + t2[46];
-    f20 = t2[18] - t2[44];
-    f21 = t2[18] + t2[44];
-    f22 = t2[20] - t2[42];
-    f23 = t2[20] + t2[42];
-    f24 = t2[22] - t2[40];
-    f25 = t2[22] + t2[40];
-    f26 = t2[24] - t2[38];
-    f27 = t2[24] + t2[38];
-    f28 = t2[26] - t2[36];
-    f29 = t2[26] + t2[36];
-    f30 = t2[28] - t2[34];
-    f31 = t2[28] + t2[34];
-    f32 = t2[30] - t2[32];
-    f33 = t2[30] + t2[32];
-    f34 = f3 - f33;
-    f35 = f3 + f33;
-    f36 = f5 - f31;
-    f37 = f5 + f31;
-    f38 = f7 - f29;
-    f39 = f7 + f29;
-    f40 = f9 - f27;
-    f41 = f9 + f27;
-    f42 = f11 - f25;
-    f43 = f11 + f25;
-    f44 = f13 - f23;
-    f45 = f13 + f23;
-    f46 = f15 - f21;
-    f47 = f15 + f21;
-    f48 = f17 - f19;
-    f49 = f17 + f19;
-    f50 = f35 - f49;
-    f51 = f35 + f49;
-    f52 = f37 - f47;
-    f53 = f37 + f47;
-    f54 = f39 - f45;
-    f55 = f39 + f45;
-    f56 = f41 - f43;
-    f57 = f41 + f43;
-    f58 = f51 - f57;
-    f59 = f51 + f57;
-    f60 = f53 - f55;
-    f61 = f53 + f55;
-    f62 = f59 - f61;
-    y[0] = f59 + f61;
-    y[32] = MUL_C(COEF_CONST(0.7071067811865476), f62);
-    f65 = f58 + f60;
-    f66 = MUL_C(COEF_CONST(1.3065629648763766), f58);
-    f67 = MUL_C(COEF_CONST((-0.9238795325112866)), f65);
-    f68 = MUL_C(COEF_CONST((-0.5411961001461967)), f60);
-    y[48] = f66 + f67;
-    y[16] = f68 - f67;
-    f71 = f50 + f56;
-    f72 = MUL_C(COEF_CONST(1.1758756024193588), f50);
-    f73 = MUL_C(COEF_CONST((-0.9807852804032304)), f71);
-    f74 = MUL_C(COEF_CONST((-0.7856949583871021)), f56);
-    f75 = f72 + f73;
-    f76 = f74 - f73;
-    f77 = f52 + f54;
-    f78 = MUL_C(COEF_CONST(1.3870398453221473), f52);
-    f79 = MUL_C(COEF_CONST((-0.8314696123025455)), f77);
-    f80 = MUL_C(COEF_CONST((-0.2758993792829436)), f54);
-    f81 = f78 + f79;
-    f82 = f80 - f79;
-    f83 = f76 - f82;
-    y[8] = f76 + f82;
-    f85 = MUL_C(COEF_CONST(0.7071067811865476), f83);
-    y[56] = f75 - f81;
-    f87 = f75 + f81;
-    f88 = MUL_C(COEF_CONST(0.7071067811865476), f87);
-    y[40] = f85 - f88;
-    y[24] = f85 + f88;
-    f91 = f36 - f38;
-    f92 = f36 + f38;
-    f93 = f40 - f42;
-    f94 = f40 + f42;
-    f95 = f44 - f46;
-    f96 = f44 + f46;
-    f97 = MUL_C(COEF_CONST(0.7071067811865476), f94);
-    f98 = f34 - f97;
-    f99 = f34 + f97;
-    f100 = f92 + f96;
-    f101 = MUL_C(COEF_CONST(1.3065629648763766), f92);
-    f102 = MUL_C(COEF_CONST((-0.9238795325112866)), f100);
-    f103 = MUL_C(COEF_CONST((-0.5411961001461967)), f96);
-    f104 = f101 + f102;
-    f105 = f103 - f102;
-    f106 = f99 - f105;
-    f107 = f99 + f105;
-    f108 = f98 - f104;
-    f109 = f98 + f104;
-    f110 = f91 + f95;
-    f111 = MUL_C(COEF_CONST(1.3065629648763770), f91);
-    f112 = MUL_C(COEF_CONST((-0.3826834323650904)), f110);
-    f113 = MUL_C(COEF_CONST(0.5411961001461961), f95);
-    f114 = f111 + f112;
-    f115 = f113 - f112;
-    f116 = MUL_C(COEF_CONST(0.7071067811865476), f93);
-    f117 = f116 - f48;
-    f118 = f116 + f48;
-    f119 = f115 - f118;
-    f120 = f115 + f118;
-    f121 = f114 - f117;
-    f122 = f114 + f117;
-    f123 = f120 + f107;
-    f124 = MUL_C(COEF_CONST((-0.8971675863426361)), f120);
-    f125 = MUL_C(COEF_CONST(0.9951847266721968), f123);
-    f126 = MUL_C(COEF_CONST(1.0932018670017576), f107);
-    y[4] = f124 + f125;
-    y[60] = f126 - f125;
-    f129 = f122 + f109;
-    f130 = MUL_C(COEF_CONST((-0.6666556584777466)), f122);
-    f131 = MUL_C(COEF_CONST(0.9569403357322089), f129);
-    f132 = MUL_C(COEF_CONST(1.2472250129866713), f109);
-    y[12] = f130 + f131;
-    y[52] = f132 - f131;
-    f135 = f121 + f108;
-    f136 = MUL_C(COEF_CONST((-0.4105245275223571)), f121);
-    f137 = MUL_C(COEF_CONST(0.8819212643483549), f135);
-    f138 = MUL_C(COEF_CONST(1.3533180011743529), f108);
-    y[20] = f136 + f137;
-    y[44] = f138 - f137;
-    f141 = f119 + f106;
-    f142 = MUL_C(COEF_CONST((-0.1386171691990915)), f119);
-    f143 = MUL_C(COEF_CONST(0.7730104533627370), f141);
-    f144 = MUL_C(COEF_CONST(1.4074037375263826), f106);
-    y[28] = f142 + f143;
-    y[36] = f144 - f143;
-    f147 = f16 - f18;
-    f148 = f16 + f18;
-    f149 = MUL_C(COEF_CONST(0.7071067811865476), f148);
-    f150 = MUL_C(COEF_CONST(0.7071067811865476), f147);
-    f151 = f10 - f24;
-    f152 = f10 + f24;
-    f153 = MUL_C(COEF_CONST(0.7071067811865476), f152);
-    f154 = MUL_C(COEF_CONST(0.7071067811865476), f151);
-    f155 = f14 - f20;
-    f156 = f14 + f20;
-    f157 = MUL_C(COEF_CONST(0.7071067811865476), f156);
-    f158 = MUL_C(COEF_CONST(0.7071067811865476), f155);
-    f159 = f12 - f22;
-    f160 = f12 + f22;
-    f161 = MUL_C(COEF_CONST(0.7071067811865476), f160);
-    f162 = MUL_C(COEF_CONST(0.7071067811865476), f159);
-    f163 = f2 - f149;
-    f164 = f2 + f149;
-    f165 = f32 - f150;
-    f166 = f32 + f150;
-    f167 = f8 - f153;
-    f168 = f8 + f153;
-    f169 = f26 - f154;
-    f170 = f26 + f154;
-    f171 = f4 - f157;
-    f172 = f4 + f157;
-    f173 = f30 - f158;
-    f174 = f30 + f158;
-    f175 = f6 - f161;
-    f176 = f6 + f161;
-    f177 = f28 - f162;
-    f178 = f28 + f162;
-    f179 = f170 + f168;
-    f180 = MUL_C(COEF_CONST((-0.5411961001461969)), f170);
-    f181 = MUL_C(COEF_CONST(0.9238795325112867), f179);
-    f182 = MUL_C(COEF_CONST(1.3065629648763766), f168);
-    f183 = f180 + f181;
-    f184 = f182 - f181;
-    f185 = f169 + f167;
-    f186 = MUL_C(COEF_CONST(1.3065629648763770), f169);
-    f187 = MUL_C(COEF_CONST((-0.3826834323650904)), f185);
-    f188 = MUL_C(COEF_CONST(0.5411961001461961), f167);
-    f189 = f186 + f187;
-    f190 = f188 - f187;
-    f191 = f178 + f176;
-    f192 = MUL_C(COEF_CONST((-0.5411961001461969)), f178);
-    f193 = MUL_C(COEF_CONST(0.9238795325112867), f191);
-    f194 = MUL_C(COEF_CONST(1.3065629648763766), f176);
-    f195 = f192 + f193;
-    f196 = f194 - f193;
-    f197 = f177 + f175;
-    f198 = MUL_C(COEF_CONST(1.3065629648763770), f177);
-    f199 = MUL_C(COEF_CONST((-0.3826834323650904)), f197);
-    f200 = MUL_C(COEF_CONST(0.5411961001461961), f175);
-    f201 = f198 + f199;
-    f202 = f200 - f199;
-    f203 = f164 - f183;
-    f204 = f164 + f183;
-    f205 = f166 - f184;
-    f206 = f166 + f184;
-    f207 = f163 - f189;
-    f208 = f163 + f189;
-    f209 = f165 - f190;
-    f210 = f165 + f190;
-    f211 = f172 - f195;
-    f212 = f172 + f195;
-    f213 = f174 - f196;
-    f214 = f174 + f196;
-    f215 = f171 - f201;
-    f216 = f171 + f201;
-    f217 = f173 - f202;
-    f218 = f173 + f202;
-    f219 = f214 + f212;
-    f220 = MUL_C(COEF_CONST((-0.7856949583871021)), f214);
-    f221 = MUL_C(COEF_CONST(0.9807852804032304), f219);
-    f222 = MUL_C(COEF_CONST(1.1758756024193588), f212);
+    f0 = x[0] - x[31];
+    f1 = x[0] + x[31];
+    f2 = x[1] - x[30];
+    f3 = x[1] + x[30];
+    f4 = x[2] - x[29];
+    f5 = x[2] + x[29];
+    f6 = x[3] - x[28];
+    f7 = x[3] + x[28];
+    f8 = x[4] - x[27];
+    f9 = x[4] + x[27];
+    f10 = x[5] - x[26];
+    f11 = x[5] + x[26];
+    f12 = x[6] - x[25];
+    f13 = x[6] + x[25];
+    f14 = x[7] - x[24];
+    f15 = x[7] + x[24];
+    f16 = x[8] - x[23];
+    f17 = x[8] + x[23];
+    f18 = x[9] - x[22];
+    f19 = x[9] + x[22];
+    f20 = x[10] - x[21];
+    f21 = x[10] + x[21];
+    f22 = x[11] - x[20];
+    f23 = x[11] + x[20];
+    f24 = x[12] - x[19];
+    f25 = x[12] + x[19];
+    f26 = x[13] - x[18];
+    f27 = x[13] + x[18];
+    f28 = x[14] - x[17];
+    f29 = x[14] + x[17];
+    f30 = x[15] - x[16];
+    f31 = x[15] + x[16];
+    f32 = f1 - f31;
+    f33 = f1 + f31;
+    f34 = f3 - f29;
+    f35 = f3 + f29;
+    f36 = f5 - f27;
+    f37 = f5 + f27;
+    f38 = f7 - f25;
+    f39 = f7 + f25;
+    f40 = f9 - f23;
+    f41 = f9 + f23;
+    f42 = f11 - f21;
+    f43 = f11 + f21;
+    f44 = f13 - f19;
+    f45 = f13 + f19;
+    f46 = f15 - f17;
+    f47 = f15 + f17;
+    f48 = f33 - f47;
+    f49 = f33 + f47;
+    f50 = f35 - f45;
+    f51 = f35 + f45;
+    f52 = f37 - f43;
+    f53 = f37 + f43;
+    f54 = f39 - f41;
+    f55 = f39 + f41;
+    f56 = f49 - f55;
+    f57 = f49 + f55;
+    f58 = f51 - f53;
+    f59 = f51 + f53;
+    f60 = f57 - f59;
+    y[0] = f57 + f59;
+    y[16] = MUL_F(FRAC_CONST(0.7071067811865476), f60);
+    f63 = f56 + f58;
+    f64 = MUL_C(COEF_CONST(1.3065629648763766), f56);
+    f65 = MUL_F(FRAC_CONST(-0.9238795325112866), f63);
+    f66 = MUL_F(FRAC_CONST(-0.5411961001461967), f58);
+    y[24] = f64 + f65;
+    y[8] = f66 - f65;
+    f69 = f48 + f54;
+    f70 = MUL_C(COEF_CONST(1.1758756024193588), f48);
+    f71 = MUL_F(FRAC_CONST(-0.9807852804032304), f69);
+    f72 = MUL_F(FRAC_CONST(-0.7856949583871021), f54);
+    f73 = f70 + f71;
+    f74 = f72 - f71;
+    f75 = f50 + f52;
+    f76 = MUL_C(COEF_CONST(1.3870398453221473), f50);
+    f77 = MUL_F(FRAC_CONST(-0.8314696123025455), f75);
+    f78 = MUL_F(FRAC_CONST(-0.2758993792829436), f52);
+    f79 = f76 + f77;
+    f80 = f78 - f77;
+    f81 = f74 - f80;
+    y[4] = f74 + f80;
+    f83 = MUL_F(FRAC_CONST(0.7071067811865476), f81);
+    y[28] = f73 - f79;
+    f85 = f73 + f79;
+    f86 = MUL_F(FRAC_CONST(0.7071067811865476), f85);
+    y[20] = f83 - f86;
+    y[12] = f83 + f86;
+    f89 = f34 - f36;
+    f90 = f34 + f36;
+    f91 = f38 - f40;
+    f92 = f38 + f40;
+    f93 = f42 - f44;
+    f94 = f42 + f44;
+    f95 = MUL_F(FRAC_CONST(0.7071067811865476), f92);
+    f96 = f32 - f95;
+    f97 = f32 + f95;
+    f98 = f90 + f94;
+    f99 = MUL_C(COEF_CONST(1.3065629648763766), f90);
+    f100 = MUL_F(FRAC_CONST(-0.9238795325112866), f98);
+    f101 = MUL_F(FRAC_CONST(-0.5411961001461967), f94);
+    f102 = f99 + f100;
+    f103 = f101 - f100;
+    f104 = f97 - f103;
+    f105 = f97 + f103;
+    f106 = f96 - f102;
+    f107 = f96 + f102;
+    f108 = MUL_F(FRAC_CONST(0.7071067811865476), f91);
+    f109 = f46 - f108;
+    f110 = f46 + f108;
+    f111 = f93 + f89;
+    f112 = MUL_C(COEF_CONST(1.3065629648763766), f93);
+    f113 = MUL_F(FRAC_CONST(-0.9238795325112866), f111);
+    f114 = MUL_F(FRAC_CONST(-0.5411961001461967), f89);
+    f115 = f112 + f113;
+    f116 = f114 - f113;
+    f117 = f110 - f116;
+    f118 = f110 + f116;
+    f119 = f109 - f115;
+    f120 = f109 + f115;
+    f121 = f118 + f105;
+    f122 = MUL_F(FRAC_CONST(-0.8971675863426361), f118);
+    f123 = MUL_F(FRAC_CONST(0.9951847266721968), f121);
+    f124 = MUL_C(COEF_CONST(1.0932018670017576), f105);
+    y[2] = f122 + f123;
+    y[30] = f124 - f123;
+    f127 = f107 - f120;
+    f128 = MUL_F(FRAC_CONST(-0.6666556584777466), f120);
+    f129 = MUL_F(FRAC_CONST(0.9569403357322089), f127);
+    f130 = MUL_C(COEF_CONST(1.2472250129866713), f107);
+    y[6] = f129 - f128;
+    y[26] = f130 - f129;
+    f133 = f119 + f106;
+    f134 = MUL_F(FRAC_CONST(-0.4105245275223571), f119);
+    f135 = MUL_F(FRAC_CONST(0.8819212643483549), f133);
+    f136 = MUL_C(COEF_CONST(1.3533180011743529), f106);
+    y[10] = f134 + f135;
+    y[22] = f136 - f135;
+    f139 = f104 - f117;
+    f140 = MUL_F(FRAC_CONST(-0.1386171691990915), f117);
+    f141 = MUL_F(FRAC_CONST(0.7730104533627370), f139);
+    f142 = MUL_C(COEF_CONST(1.4074037375263826), f104);
+    y[14] = f141 - f140;
+    y[18] = f142 - f141;
+    f145 = f2 - f4;
+    f146 = f2 + f4;
+    f147 = f6 - f8;
+    f148 = f6 + f8;
+    f149 = f10 - f12;
+    f150 = f10 + f12;
+    f151 = f14 - f16;
+    f152 = f14 + f16;
+    f153 = f18 - f20;
+    f154 = f18 + f20;
+    f155 = f22 - f24;
+    f156 = f22 + f24;
+    f157 = f26 - f28;
+    f158 = f26 + f28;
+    f159 = MUL_F(FRAC_CONST(0.7071067811865476), f152);
+    f160 = f0 - f159;
+    f161 = f0 + f159;
+    f162 = f148 + f156;
+    f163 = MUL_C(COEF_CONST(1.3065629648763766), f148);
+    f164 = MUL_F(FRAC_CONST(-0.9238795325112866), f162);
+    f165 = MUL_F(FRAC_CONST(-0.5411961001461967), f156);
+    f166 = f163 + f164;
+    f167 = f165 - f164;
+    f168 = f161 - f167;
+    f169 = f161 + f167;
+    f170 = f160 - f166;
+    f171 = f160 + f166;
+    f172 = f146 + f158;
+    f173 = MUL_C(COEF_CONST(1.1758756024193588), f146);
+    f174 = MUL_F(FRAC_CONST(-0.9807852804032304), f172);
+    f175 = MUL_F(FRAC_CONST(-0.7856949583871021), f158);
+    f176 = f173 + f174;
+    f177 = f175 - f174;
+    f178 = f150 + f154;
+    f179 = MUL_C(COEF_CONST(1.3870398453221473), f150);
+    f180 = MUL_F(FRAC_CONST(-0.8314696123025455), f178);
+    f181 = MUL_F(FRAC_CONST(-0.2758993792829436), f154);
+    f182 = f179 + f180;
+    f183 = f181 - f180;
+    f184 = f177 - f183;
+    f185 = f177 + f183;
+    f186 = MUL_F(FRAC_CONST(0.7071067811865476), f184);
+    f187 = f176 - f182;
+    f188 = f176 + f182;
+    f189 = MUL_F(FRAC_CONST(0.7071067811865476), f188);
+    f190 = f186 - f189;
+    f191 = f186 + f189;
+    f192 = f169 - f185;
+    f193 = f169 + f185;
+    f194 = f171 - f191;
+    f195 = f171 + f191;
+    f196 = f170 - f190;
+    f197 = f170 + f190;
+    f198 = f168 - f187;
+    f199 = f168 + f187;
+    f200 = MUL_F(FRAC_CONST(0.7071067811865476), f151);
+    f201 = f30 - f200;
+    f202 = f30 + f200;
+    f203 = f155 + f147;
+    f204 = MUL_C(COEF_CONST(1.3065629648763766), f155);
+    f205 = MUL_F(FRAC_CONST(-0.9238795325112866), f203);
+    f206 = MUL_F(FRAC_CONST(-0.5411961001461967), f147);
+    f207 = f204 + f205;
+    f208 = f206 - f205;
+    f209 = f202 - f208;
+    f210 = f202 + f208;
+    f211 = f201 - f207;
+    f212 = f201 + f207;
+    f213 = f157 + f145;
+    f214 = MUL_C(COEF_CONST(1.1758756024193588), f157);
+    f215 = MUL_F(FRAC_CONST(-0.9807852804032304), f213);
+    f216 = MUL_F(FRAC_CONST(-0.7856949583871021), f145);
+    f217 = f214 + f215;
+    f218 = f216 - f215;
+    f219 = f153 + f149;
+    f220 = MUL_C(COEF_CONST(1.3870398453221473), f153);
+    f221 = MUL_F(FRAC_CONST(-0.8314696123025455), f219);
+    f222 = MUL_F(FRAC_CONST(-0.2758993792829436), f149);
     f223 = f220 + f221;
     f224 = f222 - f221;
-    f225 = f218 + f216;
-    f226 = MUL_C(COEF_CONST(0.2758993792829431), f218);
-    f227 = MUL_C(COEF_CONST(0.5555702330196022), f225);
-    f228 = MUL_C(COEF_CONST(1.3870398453221475), f216);
-    f229 = f226 + f227;
-    f230 = f228 - f227;
-    f231 = f213 + f211;
-    f232 = MUL_C(COEF_CONST(1.1758756024193591), f213);
-    f233 = MUL_C(COEF_CONST((-0.1950903220161287)), f231);
-    f234 = MUL_C(COEF_CONST(0.7856949583871016), f211);
-    f235 = f232 + f233;
-    f236 = f234 - f233;
-    f237 = f217 + f215;
-    f238 = MUL_C(COEF_CONST(1.3870398453221473), f217);
-    f239 = MUL_C(COEF_CONST((-0.8314696123025455)), f237);
-    f240 = MUL_C(COEF_CONST((-0.2758993792829436)), f215);
-    f241 = f238 + f239;
-    f242 = f240 - f239;
-    f243 = f204 - f223;
-    f244 = f204 + f223;
-    f245 = f206 - f224;
-    f246 = f206 + f224;
-    f247 = f208 - f229;
-    f248 = f208 + f229;
-    f249 = f210 - f230;
-    f250 = f210 + f230;
-    f251 = f203 - f235;
-    f252 = f203 + f235;
-    f253 = f205 - f236;
-    f254 = f205 + f236;
-    f255 = f207 - f241;
-    f256 = f207 + f241;
-    f257 = f209 - f242;
-    f258 = f209 + f242;
-    f259 = f246 + f244;
-    f260 = MUL_C(COEF_CONST((-0.9497277818777543)), f246);
-    f261 = MUL_C(COEF_CONST(0.9987954562051724), f259);
-    f262 = MUL_C(COEF_CONST(1.0478631305325905), f244);
-    y[2] = f260 + f261;
-    y[62] = f262 - f261;
-    f265 = f250 + f248;
-    f266 = MUL_C(COEF_CONST((-0.7270510732912801)), f250);
-    f267 = MUL_C(COEF_CONST(0.9700312531945440), f265);
-    f268 = MUL_C(COEF_CONST(1.2130114330978079), f248);
-    y[10] = f266 + f267;
-    y[54] = f268 - f267;
-    f271 = f254 + f252;
-    f272 = MUL_C(COEF_CONST((-0.4764341996931611)), f254);
-    f273 = MUL_C(COEF_CONST(0.9039892931234433), f271);
-    f274 = MUL_C(COEF_CONST(1.3315443865537255), f252);
-    y[18] = f272 + f273;
-    y[46] = f274 - f273;
-    f277 = f258 + f256;
-    f278 = MUL_C(COEF_CONST((-0.2075082269882114)), f258);
-    f279 = MUL_C(COEF_CONST(0.8032075314806448), f277);
-    f280 = MUL_C(COEF_CONST(1.3989068359730783), f256);
-    y[26] = f278 + f279;
-    y[38] = f280 - f279;
-    f283 = f245 + f243;
-    f284 = MUL_C(COEF_CONST(0.0693921705079408), f245);
-    f285 = MUL_C(COEF_CONST(0.6715589548470183), f283);
-    f286 = MUL_C(COEF_CONST(1.4125100802019774), f243);
-    y[34] = f284 + f285;
-    y[30] = f286 - f285;
-    f289 = f249 + f247;
-    f290 = MUL_C(COEF_CONST(0.3436258658070505), f249);
-    f291 = MUL_C(COEF_CONST(0.5141027441932217), f289);
-    f292 = MUL_C(COEF_CONST(1.3718313541934939), f247);
-    y[42] = f290 + f291;
-    y[22] = f292 - f291;
-    f295 = f253 + f251;
-    f296 = MUL_C(COEF_CONST(0.6046542117908007), f253);
-    f297 = MUL_C(COEF_CONST(0.3368898533922201), f295);
-    f298 = MUL_C(COEF_CONST(1.2784339185752409), f251);
-    y[50] = f296 + f297;
-    y[14] = f298 - f297;
-    f301 = f257 + f255;
-    f302 = MUL_C(COEF_CONST(0.8424460355094192), f257);
-    f303 = MUL_C(COEF_CONST(0.1467304744553618), f301);
-    f304 = MUL_C(COEF_CONST(1.1359069844201428), f255);
-    y[58] = f302 + f303;
-    y[6] = f304 - f303;
-    f307 = t2[1] + t2[63];
-    f308 = MUL_C(COEF_CONST(1.0242400472191162), t2[1]);
-    f309 = MUL_C(COEF_CONST((-0.9996988186962043)), f307);
-    f310 = MUL_C(COEF_CONST((-0.9751575901732922)), t2[63]);
-    f311 = f308 + f309;
-    f312 = f310 - f309;
-    f313 = t2[3] + t2[61];
-    f314 = MUL_C(COEF_CONST(1.0708550202783571),t2[3]);
-    f315 = MUL_C(COEF_CONST((-0.9972904566786902)), f313);
-    f316 = MUL_C(COEF_CONST((-0.9237258930790232)), t2[61]);
-    f317 = f314 + f315;
-    f318 = f316 - f315;
-    f319 = t2[5] + t2[59];
-    f320 = MUL_C(COEF_CONST(1.1148902097979256), t2[5]);
-    f321 = MUL_C(COEF_CONST((-0.9924795345987101)), f319);
-    f322 = MUL_C(COEF_CONST((-0.8700688593994945)), t2[59]);
-    f323 = f320 + f321;
-    f324 = f322 - f321;
-    f325 = t2[7] + t2[57];
-    f326 = MUL_C(COEF_CONST(1.1562395311492426), t2[7]);
-    f327 = MUL_C(COEF_CONST((-0.9852776423889412)), f325);
-    f328 = MUL_C(COEF_CONST((-0.8143157536286398)), t2[57]);
-    f329 = f326 + f327;
-    f330 = f328 - f327;
-    f331 = t2[9] + t2[55];
-    f332 = MUL_C(COEF_CONST(1.1948033701953984), t2[9]);
-    f333 = MUL_C(COEF_CONST((-0.9757021300385286)), f331);
-    f334 = MUL_C(COEF_CONST((-0.7566008898816589)), t2[55]);
-    f335 = f332 + f333;
-    f336 = f334 - f333;
-    f337 = t2[11] + t2[53];
-    f338 = MUL_C(COEF_CONST(1.2304888232703382), t2[11]);
-    f339 = MUL_C(COEF_CONST((-0.9637760657954400)), f337);
-    f340 = MUL_C(COEF_CONST((-0.6970633083205418)), t2[53]);
-    f341 = f338 + f339;
-    f342 = f340 - f339;
-    f343 = t2[13] + t2[51];
-    f344 = MUL_C(COEF_CONST(1.2632099209919279), t2[13]);
-    f345 = MUL_C(COEF_CONST((-0.9495281805930368)), f343);
-    f346 = MUL_C(COEF_CONST((-0.6358464401941457)), t2[51]);
-    f347 = f344 + f345;
-    f348 = f346 - f345;
-    f349 = t2[15] + t2[49];
-    f350 = MUL_C(COEF_CONST(1.2928878353697266), t2[15]);
-    f351 = MUL_C(COEF_CONST((-0.9329927988347391)), f349);
-    f352 = MUL_C(COEF_CONST((-0.5730977622997515)), t2[49]);
-    f353 = f350 + f351;
-    f354 = f352 - f351;
-    f355 = t2[17] + t2[47];
-    f356 = MUL_C(COEF_CONST(1.3194510697085207), t2[17]);
-    f357 = MUL_C(COEF_CONST((-0.9142097557035306)), f355);
-    f358 = MUL_C(COEF_CONST((-0.5089684416985405)), t2[47]);
-    f359 = f356 + f357;
-    f360 = f358 - f357;
-    f361 = t2[19] + t2[45];
-    f362 = MUL_C(COEF_CONST(1.3428356308501219), t2[19]);
-    f363 = MUL_C(COEF_CONST((-0.8932243011955153)), f361);
-    f364 = MUL_C(COEF_CONST((-0.4436129715409087)), t2[45]);
-    f365 = f362 + f363;
-    f366 = f364 - f363;
-    f367 = t2[21] + t2[43];
-    f368 = MUL_C(COEF_CONST(1.3629851833384954), t2[21]);
-    f369 = MUL_C(COEF_CONST((-0.8700869911087115)), f367);
-    f370 = MUL_C(COEF_CONST((-0.3771887988789276)), t2[43]);
-    f371 = f368 + f369;
-    f372 = f370 - f369;
-    f373 = t2[23] + t2[41];
-    f374 = MUL_C(COEF_CONST(1.3798511851368040), t2[23]);
-    f375 = MUL_C(COEF_CONST((-0.8448535652497072)), f373);
-    f376 = MUL_C(COEF_CONST((-0.3098559453626103)), t2[41]);
-    f377 = f374 + f375;
-    f378 = f376 - f375;
-    f379 = t2[25] + t2[39];
-    f380 = MUL_C(COEF_CONST(1.3933930045694289), t2[25]);
-    f381 = MUL_C(COEF_CONST((-0.8175848131515840)), f379);
-    f382 = MUL_C(COEF_CONST((-0.2417766217337392)), t2[39]);
-    f383 = f380 + f381;
-    f384 = f382 - f381;
-    f385 = t2[27] + t2[37];
-    f386 = MUL_C(COEF_CONST(1.4035780182072330), t2[27]);
-    f387 = MUL_C(COEF_CONST((-0.7883464276266061)), f385);
-    f388 = MUL_C(COEF_CONST((-0.1731148370459791)), t2[37]);
-    f389 = f386 + f387;
-    f390 = f388 - f387;
-    f391 = t2[29] + t2[35];
-    f392 = MUL_C(COEF_CONST(1.4103816894602614), t2[29]);
-    f393 = MUL_C(COEF_CONST((-0.7572088465064846)), f391);
-    f394 = MUL_C(COEF_CONST((-0.1040360035527078)), t2[35]);
-    f395 = f392 + f393;
-    f396 = f394 - f393;
-    f397 = t2[31] + t2[33];
-    f398 = MUL_C(COEF_CONST(1.4137876276885337), t2[31]);
-    f399 = MUL_C(COEF_CONST((-0.7242470829514670)), f397);
-    f400 = MUL_C(COEF_CONST((-0.0347065382144002)), t2[33]);
-    f401 = f398 + f399;
-    f402 = f400 - f399;
-    f403 = f312 - f402;
-    f404 = f312 + f402;
-    f405 = f318 - f396;
-    f406 = f318 + f396;
-    f407 = f324 - f390;
-    f408 = f324 + f390;
-    f409 = f330 - f384;
-    f410 = f330 + f384;
-    f411 = f336 - f378;
-    f412 = f336 + f378;
-    f413 = f342 - f372;
-    f414 = f342 + f372;
-    f415 = f348 - f366;
-    f416 = f348 + f366;
-    f417 = f354 - f360;
-    f418 = f354 + f360;
-    f419 = f404 - f418;
-    f420 = f404 + f418;
-    f421 = f406 - f416;
-    f422 = f406 + f416;
-    f423 = f408 - f414;
-    f424 = f408 + f414;
-    f425 = f410 - f412;
-    f426 = f410 + f412;
-    f427 = f420 - f426;
-    f428 = f420 + f426;
-    f429 = f422 - f424;
-    f430 = f422 + f424;
-    f431 = f428 - f430;
-    y[1] = f428 + f430;
-    f433 = MUL_C(COEF_CONST(0.7071067811865476), f431);
-    f434 = f427 + f429;
-    f435 = MUL_C(COEF_CONST(1.3065629648763766), f427);
-    f436 = MUL_C(COEF_CONST((-0.9238795325112866)), f434);
-    f437 = MUL_C(COEF_CONST((-0.5411961001461967)), f429);
-    f438 = f435 + f436;
-    f439 = f437 - f436;
-    f440 = f419 + f425;
-    f441 = MUL_C(COEF_CONST(1.1758756024193588), f419);
-    f442 = MUL_C(COEF_CONST((-0.9807852804032304)), f440);
-    f443 = MUL_C(COEF_CONST((-0.7856949583871021)), f425);
-    f444 = f441 + f442;
-    f445 = f443 - f442;
-    f446 = f421 + f423;
-    f447 = MUL_C(COEF_CONST(1.3870398453221473), f421);
-    f448 = MUL_C(COEF_CONST((-0.8314696123025455)), f446);
-    f449 = MUL_C(COEF_CONST((-0.2758993792829436)), f423);
-    f450 = f447 + f448;
-    f451 = f449 - f448;
-    f452 = f445 - f451;
-    f453 = f445 + f451;
-    f454 = MUL_C(COEF_CONST(0.7071067811865476), f452);
-    f455 = f444 - f450;
-    f456 = f444 + f450;
-    f457 = MUL_C(COEF_CONST(0.7071067811865476), f456);
-    f458 = f454 - f457;
-    f459 = f454 + f457;
-    f460 = f405 - f407;
-    f461 = f405 + f407;
-    f462 = f409 - f411;
-    f463 = f409 + f411;
-    f464 = f413 - f415;
-    f465 = f413 + f415;
-    f466 = MUL_C(COEF_CONST(0.7071067811865476), f463);
-    f467 = f403 - f466;
-    f468 = f403 + f466;
-    f469 = f461 + f465;
-    f470 = MUL_C(COEF_CONST(1.3065629648763766), f461);
-    f471 = MUL_C(COEF_CONST((-0.9238795325112866)), f469);
-    f472 = MUL_C(COEF_CONST((-0.5411961001461967)), f465);
-    f473 = f470 + f471;
-    f474 = f472 - f471;
-    f475 = f468 - f474;
-    f476 = f468 + f474;
-    f477 = f467 - f473;
-    f478 = f467 + f473;
-    f479 = f460 + f464;
-    f480 = MUL_C(COEF_CONST(1.3065629648763770), f460);
-    f481 = MUL_C(COEF_CONST((-0.3826834323650904)), f479);
-    f482 = MUL_C(COEF_CONST(0.5411961001461961), f464);
-    f483 = f480 + f481;
-    f484 = f482 - f481;
-    f485 = MUL_C(COEF_CONST(0.7071067811865476), f462);
-    f486 = f485 - f417;
-    f487 = f485 + f417;
-    f488 = f484 - f487;
-    f489 = f484 + f487;
-    f490 = f483 - f486;
-    f491 = f483 + f486;
-    f492 = f489 + f476;
-    f493 = MUL_C(COEF_CONST((-0.8971675863426361)), f489);
-    f494 = MUL_C(COEF_CONST(0.9951847266721968), f492);
-    f495 = MUL_C(COEF_CONST(1.0932018670017576), f476);
-    f496 = f493 + f494;
-    f497 = f495 - f494;
-    f498 = f491 + f478;
-    f499 = MUL_C(COEF_CONST((-0.6666556584777466)), f491);
-    f500 = MUL_C(COEF_CONST(0.9569403357322089), f498);
-    f501 = MUL_C(COEF_CONST(1.2472250129866713), f478);
-    f502 = f499 + f500;
-    f503 = f501 - f500;
-    f504 = f490 + f477;
-    f505 = MUL_C(COEF_CONST((-0.4105245275223571)), f490);
-    f506 = MUL_C(COEF_CONST(0.8819212643483549), f504);
-    f507 = MUL_C(COEF_CONST(1.3533180011743529), f477);
-    f508 = f505 + f506;
-    f509 = f507 - f506;
-    f510 = f488 + f475;
-    f511 = MUL_C(COEF_CONST((-0.1386171691990915)), f488);
-    f512 = MUL_C(COEF_CONST(0.7730104533627370), f510);
-    f513 = MUL_C(COEF_CONST(1.4074037375263826), f475);
-    f514 = f511 + f512;
-    f515 = f513 - f512;
-    f516 = f311 + f401;
-    f517 = f311 - f401;
-    f518 = f317 + f395;
-    f519 = f395 - f317;
-    f520 = f323 + f389;
-    f521 = f323 - f389;
-    f522 = f329 + f383;
-    f523 = f383 - f329;
-    f524 = f335 + f377;
-    f525 = f335 - f377;
-    f526 = f341 + f371;
-    f527 = f371 - f341;
-    f528 = f347 + f365;
-    f529 = f347 - f365;
-    f530 = f353 + f359;
-    f531 = f359 - f353;
-    f532 = f517 - f531;
-    f533 = f517 + f531;
-    f534 = f519 - f529;
-    f535 = f519 + f529;
-    f536 = f521 - f527;
-    f537 = f521 + f527;
-    f538 = f523 - f525;
-    f539 = f523 + f525;
-    f540 = f533 - f539;
-    f541 = f533 + f539;
-    f542 = f535 - f537;
-    f543 = f535 + f537;
-    f544 = f541 - f543;
-    y[63] = f541 + f543;
-    f546 = MUL_C(COEF_CONST(0.7071067811865476), f544);
-    f547 = f540 + f542;
-    f548 = MUL_C(COEF_CONST(1.3065629648763766), f540);
-    f549 = MUL_C(COEF_CONST((-0.9238795325112866)), f547);
-    f550 = MUL_C(COEF_CONST((-0.5411961001461967)), f542);
-    f551 = f548 + f549;
-    f552 = f550 - f549;
-    f553 = f532 + f538;
-    f554 = MUL_C(COEF_CONST(1.1758756024193588), f532);
-    f555 = MUL_C(COEF_CONST((-0.9807852804032304)), f553);
-    f556 = MUL_C(COEF_CONST((-0.7856949583871021)), f538);
-    f557 = f554 + f555;
-    f558 = f556 - f555;
-    f559 = f534 + f536;
-    f560 = MUL_C(COEF_CONST(1.3870398453221473), f534);
-    f561 = MUL_C(COEF_CONST((-0.8314696123025455)), f559);
-    f562 = MUL_C(COEF_CONST((-0.2758993792829436)), f536);
-    f563 = f560 + f561;
-    f564 = f562 - f561;
-    f565 = f558 - f564;
-    f566 = f558 + f564;
-    f567 = MUL_C(COEF_CONST(0.7071067811865476), f565);
-    f568 = f557 - f563;
-    f569 = f557 + f563;
-    f570 = MUL_C(COEF_CONST(0.7071067811865476), f569);
-    f571 = f567 - f570;
-    f572 = f567 + f570;
-    f573 = MUL_C(COEF_CONST(0.5024192861881557), f516);
-    f574 = MUL_C(COEF_CONST(0.5224986149396889), f518);
-    f575 = MUL_C(COEF_CONST(0.5669440348163577), f520);
-    f576 = MUL_C(COEF_CONST(0.6468217833599901), f522);
-    f577 = MUL_C(COEF_CONST(0.7881546234512502), f524);
-    f578 = MUL_C(COEF_CONST(1.0606776859903471), f526);
-    f579 = MUL_C(COEF_CONST(1.7224470982383342), f528);
-    f580 = MUL_C(COEF_CONST(5.1011486186891553), f530);
-    f581 = f573 + f580;
-    f582 = f573 - f580;
-    f583 = f574 + f579;
-    f584 = f579 - f574;
-    f585 = f575 + f578;
-    f586 = f575 - f578;
-    f587 = f576 + f577;
-    f588 = f577 - f576;
-    f589 = f582 - f588;
-    f590 = f582 + f588;
-    f591 = f584 - f586;
-    f592 = f584 + f586;
-    f593 = f590 - f592;
-    f594 = f590 + f592;
-    f595 = MUL_C(COEF_CONST(0.7071067811865476), f593);
-    f596 = f589 + f591;
-    f597 = MUL_C(COEF_CONST(1.3065629648763766), f589);
-    f598 = MUL_C(COEF_CONST((-0.9238795325112866)), f596);
-    f599 = MUL_C(COEF_CONST((-0.5411961001461967)), f591);
-    f600 = f597 + f598;
-    f601 = f599 - f598;
-    f602 = f583 + f585;
-    f603 = f585 - f583;
-    f604 = MUL_C(COEF_CONST(0.7071067811865476), f603);
-    f605 = MUL_C(COEF_CONST(0.7071067811865476), f602);
-    f606 = f581 - f604;
-    f607 = f581 + f604;
-    f608 = f605 - f587;
-    f609 = f587 + f605;
-    f610 = f607 - f609;
-    f611 = MUL_C(COEF_CONST((-0.7856949583871021)), f609);
-    f612 = MUL_C(COEF_CONST(0.9807852804032304), f610);
-    f613 = MUL_C(COEF_CONST(1.1758756024193588), f607);
-    f614 = f612 - f611;
-    f615 = f613 - f612;
-    f616 = f608 + f606;
-    f617 = MUL_C(COEF_CONST(0.2758993792829431), f608);
-    f618 = MUL_C(COEF_CONST(0.5555702330196022), f616);
-    f619 = MUL_C(COEF_CONST(1.3870398453221475), f606);
-    f620 = f617 + f618;
-    f621 = f619 - f618;
-    f622 = f594 + f614;
-    f623 = f614 + f601;
-    f624 = f601 + f621;
-    f625 = f621 + f595;
-    f626 = f595 + f620;
-    f627 = f620 + f600;
-    f628 = f600 + f615;
-    y[5] = f496 - f615;
-    y[3] = f496 + f615;
-    y[9] = f453 - f568;
-    y[7] = f453 + f568;
-    y[13] = f502 - f628;
-    y[11] = f502 + f628;
-    y[17] = f439 - f551;
-    y[15] = f439 + f551;
-    y[21] = f508 - f627;
-    y[19] = f508 + f627;
-    y[25] = f459 - f571;
-    y[23] = f459 + f571;
-    y[29] = f514 - f626;
-    y[27] = f514 + f626;
-    y[33] = f433 - f546;
-    y[31] = f433 + f546;
-    y[37] = f515 - f625;
-    y[35] = f515 + f625;
-    y[41] = f458 - f572;
-    y[39] = f458 + f572;
-    y[45] = f509 - f624;
-    y[43] = f509 + f624;
-    y[49] = f438 - f552;
-    y[47] = f438 + f552;
-    y[53] = f503 - f623;
-    y[51] = f503 + f623;
-    y[57] = f455 - f566;
-    y[55] = f455 + f566;
-    y[61] = f497 - f622;
-    y[59] = f497 + f622;
-}
-
-void DST2_64_unscaled(real_t *y, real_t *x)
-{
-    int16_t i0;
-    real_t f2, f3, f4, f5, f6, f7;
-    real_t f8, f9, f10, f11, f12, f13;
-    real_t f14, f15, f16, f17, f18, f19;
-    real_t f20, f21, f22, f23, f24, f25;
-    real_t f26, f27, f28, f29, f30, f31;
-    real_t f32, f33, f34, f35, f36, f37;
-    real_t f38, f39, f40, f41, f42, f43;
-    real_t f44, f45, f46, f47, f48, f49;
-    real_t f50, f51, f52, f53, f54, f55;
-    real_t f56, f57, f58, f59, f60, f61;
-    real_t f62, f63, f64, f65, f66, f67;
-    real_t f68, f69, f70, f71, f72, f73;
-    real_t f74, f75, f76, f77, f78, f79;
-    real_t f80, f81, f82, f83, f84, f85;
-    real_t f86, f87, f88, f89, f90, f91;
-    real_t f92, f93, f94, f95, f96, f97;
-    real_t f98, f99, f100, f101, f102, f103;
-    real_t f104, f105, f106, f107, f108, f109;
-    real_t f110, f111, f112, f113, f114, f115;
-    real_t f116, f117, f118, f119, f120, f121;
-    real_t f122, f123, f124, f125, f126, f127;
-    real_t f128, f129, f130, f131, f132, f133;
-    real_t f134, f135, f136, f137, f138, f139;
-    real_t f140, f141, f142, f143, f144, f145;
-    real_t f146, f147, f148, f149, f150, f151;
-    real_t f152, f153, f154, f155, f156, f157;
-    real_t f158, f159, f160, f161, f162, f163;
-    real_t f164, f165, f166, f167, f168, f169;
-    real_t f170, f171, f172, f173, f174, f175;
-    real_t f176, f177, f178, f179, f180, f181;
-    real_t f182, f183, f184, f185, f186, f187;
-    real_t f188, f189, f190, f191, f192, f193;
-    real_t f194, f195, f196, f197, f198, f199;
-    real_t f200, f201, f202, f203, f204, f205;
-    real_t f206, f207, f208, f209, f210, f211;
-    real_t f212, f213, f214, f215, f216, f217;
-    real_t f218, f219, f220, f221, f222, f223;
-    real_t f224, f225, f226, f227, f228, f229;
-    real_t f230, f231, f232, f233, f234, f235;
-    real_t f236, f237, f238, f239, f240, f241;
-    real_t f242, f243, f244, f245, f246, f247;
-    real_t f248, f249, f250, f251, f252, f253;
-    real_t f254, f255, f256, f257, f258, f259;
-    real_t f260, f261, f264, f265, f266, f267;
-    real_t f270, f271, f272, f273, f276, f277;
-    real_t f278, f279, f282, f283, f284, f285;
-    real_t f288, f289, f290, f291, f294, f295;
-    real_t f296, f297, f300, f301, f302, f303;
-    real_t f306, f307, f308, f309, f312, f313;
-    real_t f314, f315, f318, f319, f320, f321;
-    real_t f324, f325, f326, f327, f330, f331;
-    real_t f332, f333, f336, f337, f338, f339;
-    real_t f342, f343, f344, f345, f348, f349;
-    real_t f350, f351, f354, f355, f356, f357;
-    real_t f358, f359, f360, f361, f362, f363;
-    real_t f364, f365, f366, f367, f368, f369;
-    real_t f370, f371, f372, f373, f374, f375;
-    real_t f376, f377, f378, f379, f380, f381;
-    real_t f382, f383, f384, f385, f386, f387;
-    real_t f388, f389, f390, f391, f392, f393;
-    real_t f394, f395, f396, f397, f398, f399;
-    real_t f400, f401, f402, f403, f404, f405;
-    real_t f406, f407, f408, f409, f410, f411;
-    real_t f412, f413, f414, f415, f416, f417;
-    real_t f418, f419, f420, f421, f422, f423;
-    real_t f424, f425, f426, f427, f428, f429;
-    real_t f430, f431, f432, f433, f434, f435;
-    real_t f436, f437, f438, f439, f440, f441;
-    real_t f442, f443, f444, f445, f446, f447;
-    real_t f448, f449, f450, f451, f452, f453;
-    real_t f454, f455, f456, f457, f458, f459;
-    real_t f460, f461, f462, f463, f464, f465;
-    real_t f466, f467, f468, f469, f470, f471;
-    real_t f472, f473, f474, f475, f476, f477;
-    real_t f478, f479, f480, f481, f482, f483;
-    real_t f484, f485, f486, f487, f488, f489;
-    real_t f490, f491, f492, f493, f494, f495;
-    real_t f496, f497, f498, f499, f500, f501;
-    real_t f504, f505, f506, f507, f510, f511;
-    real_t f512, f513, f516, f517, f518, f519;
-    real_t f522, f523, f524, f525, f528, f529;
-    real_t f530, f531, f534, f535, f536, f537;
-    real_t f540, f541, f542, f543, f546, f547;
-    real_t f548, f549, f550, f551, f552, f553;
-    real_t f554, f555, f556, f557, f558, f559;
-    real_t f560, f561, f562, f563, f564, f565;
-    real_t f566, f567, f568, f569, f570, f571;
-    real_t f572, f573, f574, f577, f578, f579;
-    real_t f580, f583, f584, f585, f586, f587;
-    real_t f588, f589, f590, f591, f592, f593;
-    real_t f594, f595, f596, f597, f598, f603;
-    real_t f604, f605, f606, f607, f608, f609;
-    real_t f610, f611, f612, f613, f614, f615;
-    real_t f616, f617, f618, f619, f620, f621;
-    real_t f622, f623, f624, f625, f626, f627;
-    real_t f628, f629, f630, f631, f632, f633;
-    real_t f634, f635, f636, f637, f638, f639;
-    real_t f640, f641, f642, f643, f644, f645;
-    real_t f646, f647, f648, f649, f650;
-    ALIGN static real_t t2[64];
-
-    for (i0=0; i0<32; i0++)
-    {
-        t2[2*i0+1] = x[i0] - x[-i0+63];
-        t2[2*i0] = x[i0] + x[-i0+63];
-    }
-    f2 = t2[2] + t2[4];
-    f3 = t2[4] - t2[2];
-    f4 = t2[6] + t2[8];
-    f5 = t2[8] - t2[6];
-    f6 = t2[10] + t2[12];
-    f7 = t2[12] - t2[10];
-    f8 = t2[14] + t2[16];
-    f9 = t2[16] - t2[14];
-    f10 = t2[18] + t2[20];
-    f11 = t2[20] - t2[18];
-    f12 = t2[22] + t2[24];
-    f13 = t2[24] - t2[22];
-    f14 = t2[26] + t2[28];
-    f15 = t2[28] - t2[26];
-    f16 = t2[30] + t2[32];
-    f17 = t2[32] - t2[30];
-    f18 = t2[34] + t2[36];
-    f19 = t2[36] - t2[34];
-    f20 = t2[38] + t2[40];
-    f21 = t2[40] - t2[38];
-    f22 = t2[42] + t2[44];
-    f23 = t2[44] - t2[42];
-    f24 = t2[46] + t2[48];
-    f25 = t2[48] - t2[46];
-    f26 = t2[50] + t2[52];
-    f27 = t2[52] - t2[50];
-    f28 = t2[54] + t2[56];
-    f29 = t2[56] - t2[54];
-    f30 = t2[58] + t2[60];
-    f31 = t2[60] - t2[58];
-    f32 = MUL_C(COEF_CONST(0.7071067811865476), f17);
-    f33 = t2[0] - f32;
-    f34 = t2[0] + f32;
-    f35 = f9 + f25;
-    f36 = MUL_C(COEF_CONST(1.3065629648763766), f9);
-    f37 = MUL_C(COEF_CONST((-0.9238795325112866)), f35);
-    f38 = MUL_C(COEF_CONST((-0.5411961001461967)), f25);
-    f39 = f36 + f37;
-    f40 = f38 - f37;
-    f41 = f34 - f40;
-    f42 = f34 + f40;
-    f43 = f33 - f39;
-    f44 = f33 + f39;
-    f45 = MUL_C(COEF_CONST(2.5629154477415064), f5);
-    f46 = MUL_C(COEF_CONST(0.8999762231364158), f13);
-    f47 = MUL_C(COEF_CONST(0.5097955791041592), f29);
-    f48 = MUL_C(COEF_CONST(0.6013448869350453), f21);
-    f49 = f45 - f47;
-    f50 = f45 + f47;
-    f51 = f46 - f48;
-    f52 = f46 + f48;
-    f53 = f50 + f52;
-    f54 = MUL_C(COEF_CONST(1.3065629648763770), f50);
-    f55 = MUL_C(COEF_CONST((-0.3826834323650904)), f53);
-    f56 = MUL_C(COEF_CONST(0.5411961001461961), f52);
-    f57 = f54 + f55;
-    f58 = f56 - f55;
-    f59 = f51 - f49;
-    f60 = f49 + f51;
-    f61 = MUL_C(COEF_CONST(0.7071067811865476), f60);
-    f62 = f58 - f61;
-    f63 = f57 - f61;
-    f64 = f59 + f57;
-    f65 = f42 - f58;
-    f66 = f42 + f58;
-    f67 = f44 + f62;
-    f68 = f44 - f62;
-    f69 = f43 - f63;
-    f70 = f43 + f63;
-    f71 = f41 + f64;
-    f72 = f41 - f64;
-    f73 = f7 - f11;
-    f74 = f7 + f11;
-    f75 = f15 - f19;
-    f76 = f15 + f19;
-    f77 = f23 - f27;
-    f78 = f23 + f27;
-    f79 = MUL_C(COEF_CONST(0.7071067811865476), f76);
-    f80 = f3 - f79;
-    f81 = f3 + f79;
-    f82 = f74 + f78;
-    f83 = MUL_C(COEF_CONST(1.3065629648763766), f74);
-    f84 = MUL_C(COEF_CONST((-0.9238795325112866)), f82);
-    f85 = MUL_C(COEF_CONST((-0.5411961001461967)), f78);
-    f86 = f83 + f84;
-    f87 = f85 - f84;
-    f88 = f81 - f87;
-    f89 = f81 + f87;
-    f90 = f80 - f86;
-    f91 = f80 + f86;
-    f92 = MUL_C(COEF_CONST(0.7071067811865476), f75);
-    f93 = f31 - f92;
-    f94 = f31 + f92;
-    f95 = f77 + f73;
-    f96 = MUL_C(COEF_CONST(1.3065629648763766), f77);
-    f97 = MUL_C(COEF_CONST((-0.9238795325112866)), f95);
-    f98 = MUL_C(COEF_CONST((-0.5411961001461967)), f73);
-    f99 = f96 + f97;
-    f100 = f98 - f97;
-    f101 = f94 - f100;
-    f102 = f94 + f100;
-    f103 = f93 - f99;
-    f104 = f93 + f99;
-    f105 = f102 + f89;
-    f106 = MUL_C(COEF_CONST((-0.8971675863426361)), f102);
-    f107 = MUL_C(COEF_CONST(0.9951847266721968), f105);
-    f108 = MUL_C(COEF_CONST(1.0932018670017576), f89);
-    f109 = f106 + f107;
-    f110 = f108 - f107;
-    f111 = f91 - f104;
-    f112 = MUL_C(COEF_CONST((-0.6666556584777466)), f104);
-    f113 = MUL_C(COEF_CONST(0.9569403357322089), f111);
-    f114 = MUL_C(COEF_CONST(1.2472250129866713), f91);
-    f115 = f113 - f112;
-    f116 = f114 - f113;
-    f117 = f103 + f90;
-    f118 = MUL_C(COEF_CONST((-0.4105245275223571)), f103);
-    f119 = MUL_C(COEF_CONST(0.8819212643483549), f117);
-    f120 = MUL_C(COEF_CONST(1.3533180011743529), f90);
-    f121 = f118 + f119;
-    f122 = f120 - f119;
-    f123 = f88 - f101;
-    f124 = MUL_C(COEF_CONST((-0.1386171691990915)), f101);
-    f125 = MUL_C(COEF_CONST(0.7730104533627370), f123);
-    f126 = MUL_C(COEF_CONST(1.4074037375263826), f88);
-    f127 = f125 - f124;
-    f128 = f126 - f125;
-    f129 = f66 - f109;
-    f130 = f66 + f109;
-    f131 = f68 - f115;
-    f132 = f68 + f115;
-    f133 = f70 - f121;
-    f134 = f70 + f121;
-    f135 = f72 - f127;
-    f136 = f72 + f127;
-    f137 = f71 - f128;
-    f138 = f71 + f128;
-    f139 = f69 - f122;
-    f140 = f69 + f122;
-    f141 = f67 - f116;
-    f142 = f67 + f116;
-    f143 = f65 - f110;
-    f144 = f65 + f110;
-    f145 = f26 + f30;
-    f146 = f22 + f26;
-    f147 = f18 + f22;
-    f148 = f14 + f18;
-    f149 = f10 + f14;
-    f150 = f6 + f10;
-    f151 = f2 + f6;
-    f152 = MUL_C(COEF_CONST(0.7071067811865476), f148);
-    f153 = f152 - f30;
-    f154 = f30 + f152;
-    f155 = f146 + f150;
-    f156 = MUL_C(COEF_CONST(1.3065629648763766), f146);
-    f157 = MUL_C(COEF_CONST((-0.9238795325112866)), f155);
-    f158 = MUL_C(COEF_CONST((-0.5411961001461967)), f150);
-    f159 = f156 + f157;
-    f160 = f157 - f158;
-    f161 = f154 + f160;
-    f162 = f160 - f154;
-    f163 = f153 + f159;
-    f164 = f153 - f159;
-    f165 = f147 + f145;
-    f166 = f149 + f147;
-    f167 = f151 + f149;
-    f168 = MUL_C(COEF_CONST(0.7071067811865476), f166);
-    f169 = f168 - f145;
-    f170 = f145 + f168;
-    f171 = f165 + f167;
-    f172 = MUL_C(COEF_CONST(1.3065629648763766), f165);
-    f173 = MUL_C(COEF_CONST((-0.9238795325112866)), f171);
-    f174 = MUL_C(COEF_CONST((-0.5411961001461967)), f167);
-    f175 = f172 + f173;
-    f176 = f173 - f174;
-    f177 = f170 + f176;
-    f178 = f176 - f170;
-    f179 = f169 + f175;
-    f180 = f169 - f175;
-    f181 = MUL_C(COEF_CONST(0.5097955791041592), f178);
-    f182 = MUL_C(COEF_CONST(0.6013448869350453), f180);
-    f183 = MUL_C(COEF_CONST(0.8999762231364156), f179);
-    f184 = MUL_C(COEF_CONST(2.5629154477415055), f177);
-    f185 = f162 - f181;
-    f186 = f162 + f181;
-    f187 = f164 - f182;
-    f188 = f164 + f182;
-    f189 = f163 - f183;
-    f190 = f163 + f183;
-    f191 = f184 - f161;
-    f192 = f161 + f184;
-    f193 = MUL_C(COEF_CONST(0.5024192861881557), f186);
-    f194 = MUL_C(COEF_CONST(0.5224986149396889), f188);
-    f195 = MUL_C(COEF_CONST(0.5669440348163577), f190);
-    f196 = MUL_C(COEF_CONST(0.6468217833599901), f192);
-    f197 = MUL_C(COEF_CONST(0.7881546234512502), f191);
-    f198 = MUL_C(COEF_CONST(1.0606776859903471), f189);
-    f199 = MUL_C(COEF_CONST(1.7224470982383342), f187);
-    f200 = MUL_C(COEF_CONST(5.1011486186891553), f185);
-    f201 = MUL_C(COEF_CONST(0.7071067811865476), f16);
-    f202 = f201 - t2[62];
-    f203 = t2[62] + f201;
-    f204 = f24 + f8;
-    f205 = MUL_C(COEF_CONST(1.3065629648763766), f24);
-    f206 = MUL_C(COEF_CONST((-0.9238795325112866)), f204);
-    f207 = MUL_C(COEF_CONST((-0.5411961001461967)), f8);
-    f208 = f205 + f206;
-    f209 = f206 - f207;
-    f210 = f203 + f209;
-    f211 = f209 - f203;
-    f212 = f202 + f208;
-    f213 = f202 - f208;
-    f214 = f20 + f28;
-    f215 = f12 + f20;
-    f216 = f4 + f12;
-    f217 = MUL_C(COEF_CONST(0.7071067811865476), f215);
-    f218 = f217 - f28;
-    f219 = f28 + f217;
-    f220 = f214 + f216;
-    f221 = MUL_C(COEF_CONST(1.3065629648763766), f214);
-    f222 = MUL_C(COEF_CONST((-0.9238795325112866)), f220);
-    f223 = MUL_C(COEF_CONST((-0.5411961001461967)), f216);
-    f224 = f221 + f222;
-    f225 = f222 - f223;
-    f226 = f219 + f225;
-    f227 = f225 - f219;
-    f228 = f218 + f224;
-    f229 = f218 - f224;
-    f230 = MUL_C(COEF_CONST(0.5097955791041592), f227);
-    f231 = MUL_C(COEF_CONST(0.6013448869350453), f229);
-    f232 = MUL_C(COEF_CONST(0.8999762231364156), f228);
-    f233 = MUL_C(COEF_CONST(2.5629154477415055), f226);
-    f234 = f211 - f230;
-    f235 = f211 + f230;
-    f236 = f213 - f231;
-    f237 = f213 + f231;
-    f238 = f212 - f232;
-    f239 = f212 + f232;
-    f240 = f233 - f210;
-    f241 = f210 + f233;
-    f242 = f193 - f235;
-    f243 = f193 + f235;
-    f244 = f237 - f194;
-    f245 = f194 + f237;
-    f246 = f195 - f239;
-    f247 = f195 + f239;
-    f248 = f196 - f241;
-    f249 = f196 + f241;
-    f250 = f197 - f240;
-    f251 = f197 + f240;
-    f252 = f238 - f198;
-    f253 = f198 + f238;
-    f254 = f199 - f236;
-    f255 = f199 + f236;
-    f256 = f234 - f200;
-    f257 = f200 + f234;
-    f258 = f243 + f130;
-    f259 = MUL_C(COEF_CONST((-0.9751575901732920)), f243);
-    f260 = MUL_C(COEF_CONST(0.9996988186962043), f258);
-    f261 = MUL_C(COEF_CONST(1.0242400472191164), f130);
-    y[62] = f259 + f260;
-    y[0] = f261 - f260;
-    f264 = f132 - f245;
-    f265 = MUL_C(COEF_CONST((-0.9237258930790228)), f245);
-    f266 = MUL_C(COEF_CONST(0.9972904566786902), f264);
-    f267 = MUL_C(COEF_CONST(1.0708550202783576), f132);
-    y[60] = f266 - f265;
-    y[2] = f267 - f266;
-    f270 = f247 + f134;
-    f271 = MUL_C(COEF_CONST((-0.8700688593994936)), f247);
-    f272 = MUL_C(COEF_CONST(0.9924795345987100), f270);
-    f273 = MUL_C(COEF_CONST(1.1148902097979263), f134);
-    y[58] = f271 + f272;
-    y[4] = f273 - f272;
-    f276 = f249 + f136;
-    f277 = MUL_C(COEF_CONST((-0.8143157536286398)), f249);
-    f278 = MUL_C(COEF_CONST(0.9852776423889412), f276);
-    f279 = MUL_C(COEF_CONST(1.1562395311492426), f136);
-    y[56] = f277 + f278;
-    y[6] = f279 - f278;
-    f282 = f251 + f138;
-    f283 = MUL_C(COEF_CONST((-0.7566008898816587)), f251);
-    f284 = MUL_C(COEF_CONST(0.9757021300385286), f282);
-    f285 = MUL_C(COEF_CONST(1.1948033701953984), f138);
-    y[54] = f283 + f284;
-    y[8] = f285 - f284;
-    f288 = f140 - f253;
-    f289 = MUL_C(COEF_CONST((-0.6970633083205414)), f253);
-    f290 = MUL_C(COEF_CONST(0.9637760657954398), f288);
-    f291 = MUL_C(COEF_CONST(1.2304888232703384), f140);
-    y[52] = f290 - f289;
-    y[10] = f291 - f290;
-    f294 = f255 + f142;
-    f295 = MUL_C(COEF_CONST((-0.6358464401941451)), f255);
-    f296 = MUL_C(COEF_CONST(0.9495281805930367), f294);
-    f297 = MUL_C(COEF_CONST(1.2632099209919283), f142);
-    y[50] = f295 + f296;
-    y[12] = f297 - f296;
-    f300 = f144 - f257;
-    f301 = MUL_C(COEF_CONST((-0.5730977622997506)), f257);
-    f302 = MUL_C(COEF_CONST(0.9329927988347389), f300);
-    f303 = MUL_C(COEF_CONST(1.2928878353697271), f144);
-    y[48] = f302 - f301;
-    y[14] = f303 - f302;
-    f306 = f256 + f143;
-    f307 = MUL_C(COEF_CONST((-0.5089684416985408)), f256);
-    f308 = MUL_C(COEF_CONST(0.9142097557035307), f306);
-    f309 = MUL_C(COEF_CONST(1.3194510697085207), f143);
-    y[46] = f307 + f308;
-    y[16] = f309 - f308;
-    f312 = f254 + f141;
-    f313 = MUL_C(COEF_CONST((-0.4436129715409087)), f254);
-    f314 = MUL_C(COEF_CONST(0.8932243011955153), f312);
-    f315 = MUL_C(COEF_CONST(1.3428356308501219), f141);
-    y[44] = f313 + f314;
-    y[18] = f315 - f314;
-    f318 = f252 + f139;
-    f319 = MUL_C(COEF_CONST((-0.3771887988789273)), f252);
-    f320 = MUL_C(COEF_CONST(0.8700869911087114), f318);
-    f321 = MUL_C(COEF_CONST(1.3629851833384954), f139);
-    y[42] = f319 + f320;
-    y[20] = f321 - f320;
-    f324 = f250 + f137;
-    f325 = MUL_C(COEF_CONST((-0.3098559453626097)), f250);
-    f326 = MUL_C(COEF_CONST(0.8448535652497070), f324);
-    f327 = MUL_C(COEF_CONST(1.3798511851368043), f137);
-    y[40] = f325 + f326;
-    y[22] = f327 - f326;
-    f330 = f248 + f135;
-    f331 = MUL_C(COEF_CONST((-0.2417766217337384)), f248);
-    f332 = MUL_C(COEF_CONST(0.8175848131515837), f330);
-    f333 = MUL_C(COEF_CONST(1.3933930045694289), f135);
-    y[38] = f331 + f332;
-    y[24] = f333 - f332;
-    f336 = f246 + f133;
-    f337 = MUL_C(COEF_CONST((-0.1731148370459794)), f246);
-    f338 = MUL_C(COEF_CONST(0.7883464276266062), f336);
-    f339 = MUL_C(COEF_CONST(1.4035780182072330), f133);
-    y[36] = f337 + f338;
-    y[26] = f339 - f338;
-    f342 = f244 + f131;
-    f343 = MUL_C(COEF_CONST((-0.1040360035527077)), f244);
-    f344 = MUL_C(COEF_CONST(0.7572088465064845), f342);
-    f345 = MUL_C(COEF_CONST(1.4103816894602612), f131);
-    y[34] = f343 + f344;
-    y[28] = f345 - f344;
-    f348 = f242 + f129;
-    f349 = MUL_C(COEF_CONST((-0.0347065382144000)), f242);
-    f350 = MUL_C(COEF_CONST(0.7242470829514669), f348);
-    f351 = MUL_C(COEF_CONST(1.4137876276885337), f129);
-    y[32] = f349 + f350;
-    y[30] = f351 - f350;
-    f354 = t2[1] - t2[63];
-    f355 = t2[1] + t2[63];
-    f356 = t2[3] - t2[61];
-    f357 = t2[3] + t2[61];
-    f358 = t2[5] - t2[59];
-    f359 = t2[5] + t2[59];
-    f360 = t2[7] - t2[57];
-    f361 = t2[7] + t2[57];
-    f362 = t2[9] - t2[55];
-    f363 = t2[9] + t2[55];
-    f364 = t2[11] - t2[53];
-    f365 = t2[11] + t2[53];
-    f366 = t2[13] - t2[51];
-    f367 = t2[13] + t2[51];
-    f368 = t2[15] - t2[49];
-    f369 = t2[15] + t2[49];
-    f370 = t2[17] - t2[47];
-    f371 = t2[17] + t2[47];
-    f372 = t2[19] - t2[45];
-    f373 = t2[19] + t2[45];
-    f374 = t2[21] - t2[43];
-    f375 = t2[21] + t2[43];
-    f376 = t2[23] - t2[41];
-    f377 = t2[23] + t2[41];
-    f378 = t2[25] - t2[39];
-    f379 = t2[25] + t2[39];
-    f380 = t2[27] - t2[37];
-    f381 = t2[27] + t2[37];
-    f382 = t2[29] - t2[35];
-    f383 = t2[29] + t2[35];
-    f384 = t2[31] - t2[33];
-    f385 = t2[31] + t2[33];
-    f386 = f369 + f371;
-    f387 = f371 - f369;
-    f388 = MUL_C(COEF_CONST(0.7071067811865476), f387);
-    f389 = MUL_C(COEF_CONST(0.7071067811865476), f386);
-    f390 = f363 + f377;
-    f391 = f363 - f377;
-    f392 = MUL_C(COEF_CONST(0.7071067811865476), f391);
-    f393 = MUL_C(COEF_CONST(0.7071067811865476), f390);
-    f394 = f367 + f373;
-    f395 = f367 - f373;
-    f396 = MUL_C(COEF_CONST(0.7071067811865476), f395);
-    f397 = MUL_C(COEF_CONST(0.7071067811865476), f394);
-    f398 = f365 + f375;
-    f399 = f375 - f365;
-    f400 = MUL_C(COEF_CONST(0.7071067811865476), f399);
-    f401 = MUL_C(COEF_CONST(0.7071067811865476), f398);
-    f402 = f355 - f388;
-    f403 = f355 + f388;
-    f404 = f389 - f385;
-    f405 = f385 + f389;
-    f406 = f361 + f392;
-    f407 = f392 - f361;
-    f408 = f379 - f393;
-    f409 = f379 + f393;
-    f410 = f357 + f396;
-    f411 = f396 - f357;
-    f412 = f383 - f397;
-    f413 = f383 + f397;
-    f414 = f359 - f400;
-    f415 = f359 + f400;
-    f416 = f401 - f381;
-    f417 = f381 + f401;
-    f418 = f409 + f407;
-    f419 = MUL_C(COEF_CONST((-0.5411961001461969)), f409);
-    f420 = MUL_C(COEF_CONST(0.9238795325112867), f418);
-    f421 = MUL_C(COEF_CONST(1.3065629648763766), f407);
-    f422 = f419 + f420;
-    f423 = f421 - f420;
-    f424 = f408 - f406;
-    f425 = MUL_C(COEF_CONST(1.3065629648763770), f408);
-    f426 = MUL_C(COEF_CONST((-0.3826834323650904)), f424);
-    f427 = MUL_C(COEF_CONST(0.5411961001461961), f406);
-    f428 = f425 + f426;
-    f429 = f426 + f427;
-    f430 = f415 - f417;
-    f431 = MUL_C(COEF_CONST((-0.5411961001461969)), f417);
-    f432 = MUL_C(COEF_CONST(0.9238795325112867), f430);
-    f433 = MUL_C(COEF_CONST(1.3065629648763766), f415);
-    f434 = f432 - f431;
-    f435 = f433 - f432;
-    f436 = f416 + f414;
-    f437 = MUL_C(COEF_CONST(1.3065629648763770), f416);
-    f438 = MUL_C(COEF_CONST((-0.3826834323650904)), f436);
-    f439 = MUL_C(COEF_CONST(0.5411961001461961), f414);
-    f440 = f437 + f438;
-    f441 = f439 - f438;
-    f442 = f403 - f422;
-    f443 = f403 + f422;
-    f444 = f405 + f423;
-    f445 = f423 - f405;
-    f446 = f402 - f428;
-    f447 = f402 + f428;
-    f448 = f404 + f429;
-    f449 = f404 - f429;
-    f450 = f411 - f434;
-    f451 = f411 + f434;
-    f452 = f413 - f435;
-    f453 = f413 + f435;
-    f454 = f410 + f440;
-    f455 = f440 - f410;
-    f456 = f412 - f441;
-    f457 = f412 + f441;
-    f458 = f453 + f451;
-    f459 = MUL_C(COEF_CONST((-0.7856949583871021)), f453);
-    f460 = MUL_C(COEF_CONST(0.9807852804032304), f458);
-    f461 = MUL_C(COEF_CONST(1.1758756024193588), f451);
-    f462 = f459 + f460;
-    f463 = f461 - f460;
-    f464 = f457 + f455;
-    f465 = MUL_C(COEF_CONST(0.2758993792829431), f457);
-    f466 = MUL_C(COEF_CONST(0.5555702330196022), f464);
-    f467 = MUL_C(COEF_CONST(1.3870398453221475), f455);
-    f468 = f465 + f466;
-    f469 = f467 - f466;
-    f470 = f452 + f450;
-    f471 = MUL_C(COEF_CONST(1.1758756024193591), f452);
-    f472 = MUL_C(COEF_CONST((-0.1950903220161287)), f470);
-    f473 = MUL_C(COEF_CONST(0.7856949583871016), f450);
-    f474 = f471 + f472;
-    f475 = f473 - f472;
-    f476 = f456 - f454;
-    f477 = MUL_C(COEF_CONST(1.3870398453221473), f456);
-    f478 = MUL_C(COEF_CONST((-0.8314696123025455)), f476);
-    f479 = MUL_C(COEF_CONST((-0.2758993792829436)), f454);
-    f480 = f477 + f478;
-    f481 = f478 + f479;
-    f482 = f443 - f462;
-    f483 = f443 + f462;
-    f484 = f445 - f463;
-    f485 = f445 + f463;
-    f486 = f447 - f468;
-    f487 = f447 + f468;
-    f488 = f449 - f469;
-    f489 = f449 + f469;
-    f490 = f442 - f474;
-    f491 = f442 + f474;
-    f492 = f444 + f475;
-    f493 = f475 - f444;
-    f494 = f446 - f480;
-    f495 = f446 + f480;
-    f496 = f448 + f481;
-    f497 = f448 - f481;
-    f498 = f485 + f483;
-    f499 = MUL_C(COEF_CONST((-0.9497277818777543)), f485);
-    f500 = MUL_C(COEF_CONST(0.9987954562051724), f498);
-    f501 = MUL_C(COEF_CONST(1.0478631305325905), f483);
-    y[61] = f499 + f500;
-    y[1] = f501 - f500;
-    f504 = f489 + f487;
-    f505 = MUL_C(COEF_CONST((-0.7270510732912801)), f489);
-    f506 = MUL_C(COEF_CONST(0.9700312531945440), f504);
-    f507 = MUL_C(COEF_CONST(1.2130114330978079), f487);
-    y[53] = f505 + f506;
-    y[9] = f507 - f506;
-    f510 = f493 + f491;
-    f511 = MUL_C(COEF_CONST((-0.4764341996931611)), f493);
-    f512 = MUL_C(COEF_CONST(0.9039892931234433), f510);
-    f513 = MUL_C(COEF_CONST(1.3315443865537255), f491);
-    y[45] = f511 + f512;
-    y[17] = f513 - f512;
-    f516 = f497 + f495;
-    f517 = MUL_C(COEF_CONST((-0.2075082269882114)), f497);
-    f518 = MUL_C(COEF_CONST(0.8032075314806448), f516);
-    f519 = MUL_C(COEF_CONST(1.3989068359730783), f495);
-    y[37] = f517 + f518;
-    y[25] = f519 - f518;
-    f522 = f484 + f482;
-    f523 = MUL_C(COEF_CONST(0.0693921705079408), f484);
-    f524 = MUL_C(COEF_CONST(0.6715589548470183), f522);
-    f525 = MUL_C(COEF_CONST(1.4125100802019774), f482);
-    y[29] = f523 + f524;
-    y[33] = f525 - f524;
-    f528 = f488 + f486;
-    f529 = MUL_C(COEF_CONST(0.3436258658070505), f488);
-    f530 = MUL_C(COEF_CONST(0.5141027441932217), f528);
-    f531 = MUL_C(COEF_CONST(1.3718313541934939), f486);
-    y[21] = f529 + f530;
-    y[41] = f531 - f530;
-    f534 = f490 - f492;
-    f535 = MUL_C(COEF_CONST(0.6046542117908007), f492);
-    f536 = MUL_C(COEF_CONST(0.3368898533922201), f534);
-    f537 = MUL_C(COEF_CONST(1.2784339185752409), f490);
-    y[13] = f536 - f535;
-    y[49] = f537 - f536;
-    f540 = f496 + f494;
-    f541 = MUL_C(COEF_CONST(0.8424460355094192), f496);
-    f542 = MUL_C(COEF_CONST(0.1467304744553618), f540);
-    f543 = MUL_C(COEF_CONST(1.1359069844201428), f494);
-    y[5] = f541 + f542;
-    y[57] = f543 - f542;
-    f546 = f354 + f384;
-    f547 = f354 - f384;
-    f548 = f356 + f382;
-    f549 = f382 - f356;
-    f550 = f358 + f380;
-    f551 = f358 - f380;
-    f552 = f360 + f378;
-    f553 = f378 - f360;
-    f554 = f362 + f376;
-    f555 = f362 - f376;
-    f556 = f364 + f374;
-    f557 = f374 - f364;
-    f558 = f366 + f372;
-    f559 = f366 - f372;
-    f560 = f368 + f370;
-    f561 = f370 - f368;
-    f562 = f547 - f561;
-    f563 = f547 + f561;
-    f564 = f549 - f559;
-    f565 = f549 + f559;
-    f566 = f551 - f557;
-    f567 = f551 + f557;
-    f568 = f553 - f555;
-    f569 = f553 + f555;
-    f570 = f563 - f569;
-    f571 = f563 + f569;
-    f572 = f565 - f567;
-    f573 = f565 + f567;
-    f574 = f571 - f573;
-    y[63] = f571 + f573;
-    y[31] = MUL_C(COEF_CONST(0.7071067811865476), f574);
-    f577 = f570 + f572;
-    f578 = MUL_C(COEF_CONST(1.3065629648763766), f570);
-    f579 = MUL_C(COEF_CONST((-0.9238795325112866)), f577);
-    f580 = MUL_C(COEF_CONST((-0.5411961001461967)), f572);
-    y[15] = f578 + f579;
-    y[47] = f580 - f579;
-    f583 = f564 + f562;
-    f584 = f566 + f564;
-    f585 = f568 + f566;
-    f586 = MUL_C(COEF_CONST(0.7071067811865476), f584);
-    f587 = f562 - f586;
-    f588 = f562 + f586;
-    f589 = f583 + f585;
-    f590 = MUL_C(COEF_CONST(1.3065629648763766), f583);
-    f591 = MUL_C(COEF_CONST((-0.9238795325112866)), f589);
-    f592 = MUL_C(COEF_CONST((-0.5411961001461967)), f585);
-    f593 = f590 + f591;
-    f594 = f592 - f591;
-    f595 = f588 - f594;
-    f596 = f588 + f594;
-    f597 = f587 - f593;
-    f598 = f587 + f593;
-    y[55] = MUL_C(COEF_CONST(0.5097955791041592), f596);
-    y[39] = MUL_C(COEF_CONST(0.6013448869350453), f598);
-    y[23] = MUL_C(COEF_CONST(0.8999762231364156), f597);
-    y[7] = MUL_C(COEF_CONST(2.5629154477415055), f595);
-    f603 = MUL_C(COEF_CONST(0.5024192861881557), f546);
-    f604 = MUL_C(COEF_CONST(0.5224986149396889), f548);
-    f605 = MUL_C(COEF_CONST(0.5669440348163577), f550);
-    f606 = MUL_C(COEF_CONST(0.6468217833599901), f552);
-    f607 = MUL_C(COEF_CONST(0.7881546234512502), f554);
-    f608 = MUL_C(COEF_CONST(1.0606776859903471), f556);
-    f609 = MUL_C(COEF_CONST(1.7224470982383342), f558);
-    f610 = MUL_C(COEF_CONST(5.1011486186891553), f560);
-    f611 = f603 + f610;
-    f612 = f603 - f610;
-    f613 = f604 + f609;
-    f614 = f609 - f604;
-    f615 = f605 + f608;
-    f616 = f605 - f608;
-    f617 = f606 + f607;
-    f618 = f607 - f606;
-    f619 = f612 - f618;
-    f620 = f612 + f618;
-    f621 = f614 - f616;
-    f622 = f614 + f616;
-    f623 = f620 - f622;
-    f624 = f620 + f622;
-    f625 = MUL_C(COEF_CONST(0.7071067811865476), f623);
-    f626 = f619 + f621;
-    f627 = MUL_C(COEF_CONST(1.3065629648763766), f619);
-    f628 = MUL_C(COEF_CONST((-0.9238795325112866)), f626);
-    f629 = MUL_C(COEF_CONST((-0.5411961001461967)), f621);
-    f630 = f627 + f628;
-    f631 = f629 - f628;
-    f632 = f611 - f613;
-    f633 = f615 - f613;
-    f634 = f615 - f617;
-    f635 = MUL_C(COEF_CONST(0.7071067811865476), f633);
-    f636 = f611 - f635;
-    f637 = f611 + f635;
-    f638 = f632 + f634;
-    f639 = MUL_C(COEF_CONST(1.3065629648763766), f632);
-    f640 = MUL_C(COEF_CONST((-0.9238795325112866)), f638);
-    f641 = MUL_C(COEF_CONST((-0.5411961001461967)), f634);
-    f642 = f639 + f640;
-    f643 = f641 - f640;
-    f644 = f637 - f643;
-    f645 = f637 + f643;
-    f646 = f636 - f642;
-    f647 = f636 + f642;
-    f648 = MUL_C(COEF_CONST(0.5097955791041592), f645);
-    f649 = MUL_C(COEF_CONST(0.6013448869350453), f647);
-    f650 = MUL_C(COEF_CONST(0.8999762231364156), f646);
-    y[3] = MUL_C(COEF_CONST(2.5629154477415055), f644);
-    y[59] = f624 + f648;
-    y[51] = f648 + f631;
-    y[43] = f631 + f649;
-    y[35] = f649 + f625;
-    y[27] = f625 + f650;
-    y[19] = f650 + f630;
-    y[11] = f630 + y[3];
+    f225 = f218 - f224;
+    f226 = f218 + f224;
+    f227 = MUL_F(FRAC_CONST(0.7071067811865476), f225);
+    f228 = f217 - f223;
+    f229 = f217 + f223;
+    f230 = MUL_F(FRAC_CONST(0.7071067811865476), f229);
+    f231 = f227 - f230;
+    f232 = f227 + f230;
+    f233 = f210 - f226;
+    f234 = f210 + f226;
+    f235 = f212 - f232;
+    f236 = f212 + f232;
+    f237 = f211 - f231;
+    f238 = f211 + f231;
+    f239 = f209 - f228;
+    f240 = f209 + f228;
+    f241 = f234 + f193;
+    f242 = MUL_F(FRAC_CONST(-0.9497277818777543), f234);
+    f243 = MUL_F(FRAC_CONST(0.9987954562051724), f241);
+    f244 = MUL_C(COEF_CONST(1.0478631305325905), f193);
+    y[1] = f242 + f243;
+    y[31] = f244 - f243;
+    f247 = f195 - f236;
+    f248 = MUL_F(FRAC_CONST(-0.8424460355094192), f236);
+    f249 = MUL_F(FRAC_CONST(0.9891765099647810), f247);
+    f250 = MUL_C(COEF_CONST(1.1359069844201428), f195);
+    y[3] = f249 - f248;
+    y[29] = f250 - f249;
+    f253 = f238 + f197;
+    f254 = MUL_F(FRAC_CONST(-0.7270510732912801), f238);
+    f255 = MUL_F(FRAC_CONST(0.9700312531945440), f253);
+    f256 = MUL_C(COEF_CONST(1.2130114330978079), f197);
+    y[5] = f254 + f255;
+    y[27] = f256 - f255;
+    f259 = f199 - f240;
+    f260 = MUL_F(FRAC_CONST(-0.6046542117908007), f240);
+    f261 = MUL_F(FRAC_CONST(0.9415440651830208), f259);
+    f262 = MUL_C(COEF_CONST(1.2784339185752409), f199);
+    y[7] = f261 - f260;
+    y[25] = f262 - f261;
+    f265 = f239 + f198;
+    f266 = MUL_F(FRAC_CONST(-0.4764341996931611), f239);
+    f267 = MUL_F(FRAC_CONST(0.9039892931234433), f265);
+    f268 = MUL_C(COEF_CONST(1.3315443865537255), f198);
+    y[9] = f266 + f267;
+    y[23] = f268 - f267;
+    f271 = f196 - f237;
+    f272 = MUL_F(FRAC_CONST(-0.3436258658070505), f237);
+    f273 = MUL_F(FRAC_CONST(0.8577286100002721), f271);
+    f274 = MUL_C(COEF_CONST(1.3718313541934939), f196);
+    y[11] = f273 - f272;
+    y[21] = f274 - f273;
+    f277 = f235 + f194;
+    f278 = MUL_F(FRAC_CONST(-0.2075082269882114), f235);
+    f279 = MUL_F(FRAC_CONST(0.8032075314806448), f277);
+    f280 = MUL_C(COEF_CONST(1.3989068359730783), f194);
+    y[13] = f278 + f279;
+    y[19] = f280 - f279;
+    f283 = f192 - f233;
+    f284 = MUL_F(FRAC_CONST(-0.0693921705079408), f233);
+    f285 = MUL_F(FRAC_CONST(0.7409511253549591), f283);
+    f286 = MUL_C(COEF_CONST(1.4125100802019774), f192);
+    y[15] = f285 - f284;
+    y[17] = f286 - f285;
 }
 
 #else
 
-void DCT4_64(real_t *y, real_t *x)
+
+#define n 32
+#define log2n 5
+
+// w_array_real[i] = cos(2*M_PI*i/32)
+static const real_t w_array_real[] = {
+    FRAC_CONST(1.000000000000000), FRAC_CONST(0.980785279337272),
+    FRAC_CONST(0.923879528329380), FRAC_CONST(0.831469603195765),
+    FRAC_CONST(0.707106765732237), FRAC_CONST(0.555570210304169),
+    FRAC_CONST(0.382683402077046), FRAC_CONST(0.195090284503576),
+    FRAC_CONST(0.000000000000000), FRAC_CONST(-0.195090370246552),
+    FRAC_CONST(-0.382683482845162), FRAC_CONST(-0.555570282993553),
+    FRAC_CONST(-0.707106827549476), FRAC_CONST(-0.831469651765257),
+    FRAC_CONST(-0.923879561784627), FRAC_CONST(-0.980785296392607)
+};
+
+// w_array_imag[i] = sin(-2*M_PI*i/32)
+static const real_t w_array_imag[] = {
+    FRAC_CONST(0.000000000000000), FRAC_CONST(-0.195090327375064),
+    FRAC_CONST(-0.382683442461104), FRAC_CONST(-0.555570246648862),
+    FRAC_CONST(-0.707106796640858), FRAC_CONST(-0.831469627480512),
+    FRAC_CONST(-0.923879545057005), FRAC_CONST(-0.980785287864940),
+    FRAC_CONST(-1.000000000000000), FRAC_CONST(-0.980785270809601),
+    FRAC_CONST(-0.923879511601754), FRAC_CONST(-0.831469578911016),
+    FRAC_CONST(-0.707106734823616), FRAC_CONST(-0.555570173959476),
+    FRAC_CONST(-0.382683361692986), FRAC_CONST(-0.195090241632088)
+};
+
+// FFT decimation in frequency
+// 4*16*2+16=128+16=144 multiplications
+// 6*16*2+10*8+4*16*2=192+80+128=400 additions
+static void fft_dif(real_t * Real, real_t * Imag)
 {
-    int16_t i0;
-    ALIGN static real_t t2[64];
+    real_t w_real, w_imag; // For faster access
+    real_t point1_real, point1_imag, point2_real, point2_imag; // For faster access
+    uint32_t j, i, i2, w_index; // Counters
+
+    // First 2 stages of 32 point FFT decimation in frequency
+    // 4*16*2=64*2=128 multiplications
+    // 6*16*2=96*2=192 additions
+	// Stage 1 of 32 point FFT decimation in frequency
+    for (i = 0; i < 16; i++)
+    {
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+        i2 = i+16;
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        w_real = w_array_real[i];
+        w_imag = w_array_imag[i];
+
+        // temp1 = x[i] - x[i2]
+        point1_real -= point2_real;
+        point1_imag -= point2_imag;
+
+        // x[i1] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * w
+        Real[i2] = (MUL_F(point1_real,w_real) - MUL_F(point1_imag,w_imag));
+        Imag[i2] = (MUL_F(point1_real,w_imag) + MUL_F(point1_imag,w_real));
+     }
+    // Stage 2 of 32 point FFT decimation in frequency
+    for (j = 0, w_index = 0; j < 8; j++, w_index += 2)
+    {
+        w_real = w_array_real[w_index];
+        w_imag = w_array_imag[w_index];
+
+    	i = j;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+        i2 = i+8;
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // temp1 = x[i] - x[i2]
+        point1_real -= point2_real;
+        point1_imag -= point2_imag;
+
+        // x[i1] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * w
+        Real[i2] = (MUL_F(point1_real,w_real) - MUL_F(point1_imag,w_imag));
+        Imag[i2] = (MUL_F(point1_real,w_imag) + MUL_F(point1_imag,w_real));
+
+        i = j+16;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+        i2 = i+8;
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // temp1 = x[i] - x[i2]
+        point1_real -= point2_real;
+        point1_imag -= point2_imag;
+
+        // x[i1] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * w
+        Real[i2] = (MUL_F(point1_real,w_real) - MUL_F(point1_imag,w_imag));
+        Imag[i2] = (MUL_F(point1_real,w_imag) + MUL_F(point1_imag,w_real));
+    }
+
+    // Stage 3 of 32 point FFT decimation in frequency
+    // 2*4*2=16 multiplications
+    // 4*4*2+6*4*2=10*8=80 additions
+    for (i = 0; i < n; i += 8)
+    {
+        i2 = i+4;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // out[i1] = point1 + point2
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // out[i2] = point1 - point2
+        Real[i2] = point1_real - point2_real;
+        Imag[i2] = point1_imag - point2_imag;
+    }
+    w_real = w_array_real[4]; // = sqrt(2)/2
+    // w_imag = -w_real; // = w_array_imag[4]; // = -sqrt(2)/2
+    for (i = 1; i < n; i += 8)
+    {
+        i2 = i+4;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // temp1 = x[i] - x[i2]
+        point1_real -= point2_real;
+        point1_imag -= point2_imag;
+
+        // x[i1] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * w
+        Real[i2] = MUL_F(point1_real+point1_imag, w_real);
+        Imag[i2] = MUL_F(point1_imag-point1_real, w_real);
+    }
+    for (i = 2; i < n; i += 8)
+    {
+        i2 = i+4;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // x[i] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * (-i)
+        Real[i2] = point1_imag - point2_imag;
+        Imag[i2] = point2_real - point1_real;
+    }
+    w_real = w_array_real[12]; // = -sqrt(2)/2
+    // w_imag = w_real; // = w_array_imag[12]; // = -sqrt(2)/2
+    for (i = 3; i < n; i += 8)
+    {
+        i2 = i+4;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // temp1 = x[i] - x[i2]
+        point1_real -= point2_real;
+        point1_imag -= point2_imag;
+
+        // x[i1] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * w
+        Real[i2] = MUL_F(point1_real-point1_imag, w_real);
+        Imag[i2] = MUL_F(point1_real+point1_imag, w_real);
+    }
+
+
+    // Stage 4 of 32 point FFT decimation in frequency (no multiplications)
+    // 16*4=64 additions
+    for (i = 0; i < n; i += 4)
+    {
+        i2 = i+2;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
 
-    t2[0] = x[0];
-    for (i0=0; i0<31; i0++)
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // x[i1] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = x[i] - x[i2]
+        Real[i2] = point1_real - point2_real;
+        Imag[i2] = point1_imag - point2_imag;
+    }
+    for (i = 1; i < n; i += 4)
+    {
+        i2 = i+2;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // x[i] = x[i] + x[i2]
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // x[i2] = (x[i] - x[i2]) * (-i)
+        Real[i2] = point1_imag - point2_imag;
+        Imag[i2] = point2_real - point1_real;
+    }
+
+    // Stage 5 of 32 point FFT decimation in frequency (no multiplications)
+    // 16*4=64 additions
+    for (i = 0; i < n; i += 2)
     {
-        t2[2*i0+1] = x[2*i0+1] - x[2*i0+2];
-        t2[2*i0+2] = x[2*i0+1] + x[2*i0+2];
+        i2 = i+1;
+        point1_real = Real[i];
+        point1_imag = Imag[i];
+
+        point2_real = Real[i2];
+        point2_imag = Imag[i2];
+
+        // out[i1] = point1 + point2
+        Real[i] += point2_real;
+        Imag[i] += point2_imag;
+
+        // out[i2] = point1 - point2
+        Real[i2] = point1_real - point2_real;
+        Imag[i2] = point1_imag - point2_imag;
     }
-    t2[63] = x[63];
+
+#ifdef REORDER_IN_FFT
+    FFTReorder(Real, Imag);
+#endif // #ifdef REORDER_IN_FFT
+}
+#undef n
+#undef log2n
 
-    DCT4_64_kernel(y, t2);
+static const real_t dct4_64_tab[] = {
+    COEF_CONST(0.999924719333649), COEF_CONST(0.998118102550507),
+    COEF_CONST(0.993906974792480), COEF_CONST(0.987301409244537),
+    COEF_CONST(0.978317379951477), COEF_CONST(0.966976463794708),
+    COEF_CONST(0.953306019306183), COEF_CONST(0.937339007854462),
+    COEF_CONST(0.919113874435425), COEF_CONST(0.898674488067627),
+    COEF_CONST(0.876070082187653), COEF_CONST(0.851355195045471),
+    COEF_CONST(0.824589252471924), COEF_CONST(0.795836925506592),
+    COEF_CONST(0.765167236328125), COEF_CONST(0.732654273509979),
+    COEF_CONST(0.698376238346100), COEF_CONST(0.662415742874146),
+    COEF_CONST(0.624859452247620), COEF_CONST(0.585797846317291),
+    COEF_CONST(0.545324981212616), COEF_CONST(0.503538429737091),
+    COEF_CONST(0.460538715124130), COEF_CONST(0.416429549455643),
+    COEF_CONST(0.371317148208618), COEF_CONST(0.325310230255127),
+    COEF_CONST(0.278519600629807), COEF_CONST(0.231058135628700),
+    COEF_CONST(0.183039888739586), COEF_CONST(0.134580686688423),
+    COEF_CONST(0.085797272622585), COEF_CONST(0.036807164549828),
+    COEF_CONST(-1.012196302413940), COEF_CONST(-1.059438824653626),
+    COEF_CONST(-1.104129195213318), COEF_CONST(-1.146159529685974),
+    COEF_CONST(-1.185428738594055), COEF_CONST(-1.221842169761658),
+    COEF_CONST(-1.255311965942383), COEF_CONST(-1.285757660865784),
+    COEF_CONST(-1.313105940818787), COEF_CONST(-1.337290763854981),
+    COEF_CONST(-1.358253836631775), COEF_CONST(-1.375944852828980),
+    COEF_CONST(-1.390321016311646), COEF_CONST(-1.401347875595093),
+    COEF_CONST(-1.408998727798462), COEF_CONST(-1.413255214691162),
+    COEF_CONST(-1.414107084274292), COEF_CONST(-1.411552190780640),
+    COEF_CONST(-1.405596733093262), COEF_CONST(-1.396255016326904),
+    COEF_CONST(-1.383549690246582), COEF_CONST(-1.367511272430420),
+    COEF_CONST(-1.348178386688232), COEF_CONST(-1.325597524642944),
+    COEF_CONST(-1.299823284149170), COEF_CONST(-1.270917654037476),
+    COEF_CONST(-1.238950133323669), COEF_CONST(-1.203998088836670),
+    COEF_CONST(-1.166145324707031), COEF_CONST(-1.125483393669128),
+    COEF_CONST(-1.082109928131104), COEF_CONST(-1.036129593849182),
+    COEF_CONST(-0.987653195858002), COEF_CONST(-0.936797380447388),
+    COEF_CONST(-0.883684754371643), COEF_CONST(-0.828443288803101),
+    COEF_CONST(-0.771206021308899), COEF_CONST(-0.712110757827759),
+    COEF_CONST(-0.651300072669983), COEF_CONST(-0.588920354843140),
+    COEF_CONST(-0.525121808052063), COEF_CONST(-0.460058242082596),
+    COEF_CONST(-0.393886327743530), COEF_CONST(-0.326765477657318),
+    COEF_CONST(-0.258857429027557), COEF_CONST(-0.190325915813446),
+    COEF_CONST(-0.121335685253143), COEF_CONST(-0.052053272724152),
+    COEF_CONST(0.017354607582092), COEF_CONST(0.086720645427704),
+    COEF_CONST(0.155877828598022), COEF_CONST(0.224659323692322),
+    COEF_CONST(0.292899727821350), COEF_CONST(0.360434412956238),
+    COEF_CONST(0.427100926637650), COEF_CONST(0.492738455533981),
+    COEF_CONST(0.557188928127289), COEF_CONST(0.620297133922577),
+    COEF_CONST(0.681910991668701), COEF_CONST(0.741881847381592),
+    COEF_CONST(0.800065577030182), COEF_CONST(0.856321990489960),
+    COEF_CONST(0.910515367984772), COEF_CONST(0.962515234947205),
+    COEF_CONST(1.000000000000000), COEF_CONST(0.998795449733734),
+    COEF_CONST(0.995184719562531), COEF_CONST(0.989176511764526),
+    COEF_CONST(0.980785250663757), COEF_CONST(0.970031261444092),
+    COEF_CONST(0.956940352916718), COEF_CONST(0.941544055938721),
+    COEF_CONST(0.923879504203796), COEF_CONST(0.903989315032959),
+    COEF_CONST(0.881921231746674), COEF_CONST(0.857728600502014),
+    COEF_CONST(0.831469595432281), COEF_CONST(0.803207516670227),
+    COEF_CONST(0.773010432720184), COEF_CONST(0.740951120853424),
+    COEF_CONST(0.707106769084930), COEF_CONST(0.671558916568756),
+    COEF_CONST(0.634393274784088), COEF_CONST(0.595699310302734),
+    COEF_CONST(0.555570185184479), COEF_CONST(0.514102697372437),
+    COEF_CONST(0.471396654844284), COEF_CONST(0.427555114030838),
+    COEF_CONST(0.382683426141739), COEF_CONST(0.336889833211899),
+    COEF_CONST(0.290284633636475), COEF_CONST(0.242980122566223),
+    COEF_CONST(0.195090234279633), COEF_CONST(0.146730497479439),
+    COEF_CONST(0.098017133772373), COEF_CONST(0.049067649990320),
+    COEF_CONST(-1.000000000000000), COEF_CONST(-1.047863125801086),
+    COEF_CONST(-1.093201875686646), COEF_CONST(-1.135906934738159),
+    COEF_CONST(-1.175875544548035), COEF_CONST(-1.213011503219605),
+    COEF_CONST(-1.247225046157837), COEF_CONST(-1.278433918952942),
+    COEF_CONST(-1.306562900543213), COEF_CONST(-1.331544399261475),
+    COEF_CONST(-1.353317975997925), COEF_CONST(-1.371831417083740),
+    COEF_CONST(-1.387039899826050), COEF_CONST(-1.398906826972961),
+    COEF_CONST(-1.407403707504273), COEF_CONST(-1.412510156631470),
+    COEF_CONST(0), COEF_CONST(-1.412510156631470),
+    COEF_CONST(-1.407403707504273), COEF_CONST(-1.398906826972961),
+    COEF_CONST(-1.387039899826050), COEF_CONST(-1.371831417083740),
+    COEF_CONST(-1.353317975997925), COEF_CONST(-1.331544399261475),
+    COEF_CONST(-1.306562900543213), COEF_CONST(-1.278433918952942),
+    COEF_CONST(-1.247225046157837), COEF_CONST(-1.213011384010315),
+    COEF_CONST(-1.175875544548035), COEF_CONST(-1.135907053947449),
+    COEF_CONST(-1.093201875686646), COEF_CONST(-1.047863125801086),
+    COEF_CONST(-1.000000000000000), COEF_CONST(-0.949727773666382),
+    COEF_CONST(-0.897167563438416), COEF_CONST(-0.842446029186249),
+    COEF_CONST(-0.785694956779480), COEF_CONST(-0.727051079273224),
+    COEF_CONST(-0.666655659675598), COEF_CONST(-0.604654192924500),
+    COEF_CONST(-0.541196048259735), COEF_CONST(-0.476434230804443),
+    COEF_CONST(-0.410524487495422), COEF_CONST(-0.343625843524933),
+    COEF_CONST(-0.275899350643158), COEF_CONST(-0.207508206367493),
+    COEF_CONST(-0.138617098331451), COEF_CONST(-0.069392144680023),
+    COEF_CONST(0), COEF_CONST(0.069392263889313),
+    COEF_CONST(0.138617157936096), COEF_CONST(0.207508206367493),
+    COEF_CONST(0.275899469852448), COEF_CONST(0.343625962734222),
+    COEF_CONST(0.410524636507034), COEF_CONST(0.476434201002121),
+    COEF_CONST(0.541196107864380), COEF_CONST(0.604654192924500),
+    COEF_CONST(0.666655719280243), COEF_CONST(0.727051138877869),
+    COEF_CONST(0.785695075988770), COEF_CONST(0.842446029186249),
+    COEF_CONST(0.897167563438416), COEF_CONST(0.949727773666382)
+};
+
+/* size 64 only! */
+void dct4_kernel(real_t * in_real, real_t * in_imag, real_t * out_real, real_t * out_imag)
+{
+    // Tables with bit reverse values for 5 bits, bit reverse of i at i-th position
+    const uint8_t bit_rev_tab[32] = { 0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31 };
+    uint16_t i, i_rev;
+
+    /* Step 2: modulate */
+    // 3*32=96 multiplications
+    // 3*32=96 additions
+    for (i = 0; i < 32; i++)
+    {
+    	real_t x_re, x_im, tmp;
+    	x_re = in_real[i];
+    	x_im = in_imag[i];
+        tmp =        MUL_C(x_re + x_im, dct4_64_tab[i]);
+        in_real[i] = MUL_C(x_im, dct4_64_tab[i + 64]) + tmp;
+        in_imag[i] = MUL_C(x_re, dct4_64_tab[i + 32]) + tmp;
+    }
+
+    /* Step 3: FFT, but with output in bit reverse order */
+    fft_dif(in_real, in_imag);
+
+    /* Step 4: modulate + bitreverse reordering */
+    // 3*31+2=95 multiplications
+    // 3*31+2=95 additions
+    for (i = 0; i < 16; i++)
+    {
+    	real_t x_re, x_im, tmp;
+    	i_rev = bit_rev_tab[i];
+    	x_re = in_real[i_rev];
+    	x_im = in_imag[i_rev];
+
+        tmp =         MUL_C(x_re + x_im, dct4_64_tab[i + 3*32]);
+        out_real[i] = MUL_C(x_im, dct4_64_tab[i + 5*32]) + tmp;
+        out_imag[i] = MUL_C(x_re, dct4_64_tab[i + 4*32]) + tmp;
+    }
+    // i = 16, i_rev = 1 = rev(16);
+    out_imag[16] = MUL_C(in_imag[1] - in_real[1], dct4_64_tab[16 + 3*32]);
+    out_real[16] = MUL_C(in_real[1] + in_imag[1], dct4_64_tab[16 + 3*32]);
+    for (i = 17; i < 32; i++)
+    {
+    	real_t x_re, x_im, tmp;
+    	i_rev = bit_rev_tab[i];
+    	x_re = in_real[i_rev];
+    	x_im = in_imag[i_rev];
+        tmp =         MUL_C(x_re + x_im, dct4_64_tab[i + 3*32]);
+        out_real[i] = MUL_C(x_im, dct4_64_tab[i + 5*32]) + tmp;
+        out_imag[i] = MUL_C(x_re, dct4_64_tab[i + 4*32]) + tmp;
+    }
+
 }
 
-void DCT4_64_kernel(real_t *y, real_t *t2)
+void DST4_32(real_t *y, real_t *x)
 {
-    real_t f2, f3, f4, f5, f6, f7, f8;
-    real_t f9, f10, f11, f12, f13, f14, f15;
-    real_t f16, f17, f18, f19, f20, f21, f22;
-    real_t f23, f24, f25, f26, f27, f28, f29;
-    real_t f30, f31, f32, f33, f34, f35, f36;
-    real_t f37, f38, f39, f40, f41, f42, f43;
-    real_t f44, f45, f46, f47, f48, f49, f50;
-    real_t f51, f52, f53, f54, f55, f56, f57;
-    real_t f58, f59, f60, f61, f62, f63, f64;
-    real_t f65, f66, f67, f68, f69, f70, f71;
-    real_t f72, f73, f74, f75, f76, f77, f78;
-    real_t f79, f80, f81, f82, f83, f84, f85;
-    real_t f86, f87, f88, f89, f90, f91, f92;
-    real_t f93, f94, f95, f96, f97, f98, f99;
-    real_t f100, f101, f102, f103, f104, f105, f106;
-    real_t f107, f108, f109, f110, f111, f112, f113;
-    real_t f114, f115, f116, f117, f118, f119, f120;
-    real_t f121, f122, f123, f124, f125, f126, f127;
-    real_t f128, f129, f130, f131, f132, f133, f134;
-    real_t f135, f136, f137, f138, f139, f140, f141;
-    real_t f142, f143, f144, f145, f146, f147, f148;
-    real_t f149, f150, f151, f152, f153, f154, f155;
-    real_t f156, f157, f158, f159, f160, f161, f162;
-    real_t f163, f164, f165, f166, f167, f168, f169;
-    real_t f170, f171, f172, f173, f174, f175, f176;
-    real_t f177, f178, f179, f180, f181, f182, f183;
-    real_t f184, f185, f186, f187, f188, f189, f190;
-    real_t f191, f192, f193, f194, f195, f196, f197;
-    real_t f198, f199, f200, f201, f202, f203, f204;
-    real_t f205, f206, f207, f208, f209, f210, f211;
-    real_t f212, f213, f214, f215, f216, f217, f218;
-    real_t f219, f220, f221, f222, f223, f224, f225;
-    real_t f226, f227, f228, f229, f230, f231, f232;
-    real_t f233, f234, f235, f236, f237, f238, f239;
-    real_t f240, f241, f242, f243, f244, f245, f246;
-    real_t f247, f248, f249, f250, f251, f252, f253;
-    real_t f254, f255, f256, f257, f258, f259, f260;
-    real_t f261, f262, f263, f264, f265, f266, f267;
-    real_t f268, f269, f270, f271, f272, f273, f274;
-    real_t f275, f276, f277, f278, f279, f280, f281;
-    real_t f282, f283, f284, f285, f286, f287, f288;
-    real_t f289, f290, f291, f292, f293, f294, f295;
-    real_t f296, f297, f298, f299, f300, f301, f302;
-    real_t f303, f304, f305, f306, f307, f308, f309;
-    real_t f310, f311, f312, f313, f314, f315, f316;
-    real_t f317, f318, f319, f320, f321, f322, f323;
-    real_t f324, f325, f326, f327, f328, f329, f330;
-    real_t f331, f332, f333, f334, f335, f336, f337;
-    real_t f338, f339, f340, f341, f342, f343, f344;
-    real_t f345, f346, f347, f348, f349, f350, f351;
-    real_t f352, f353, f354, f355, f356, f357, f358;
-    real_t f359, f360, f361, f362, f363, f364, f365;
-    real_t f366, f367, f368, f369, f370, f371, f372;
-    real_t f373, f374, f375, f376, f377, f378, f379;
-    real_t f380, f381, f382, f383, f384, f385, f386;
-    real_t f387, f388, f389, f390, f391, f392, f393;
-    real_t f394, f395, f396, f397, f398, f399, f400;
-    real_t f401, f402, f403, f404, f405, f406, f407;
-    real_t f408, f409, f410, f411, f412, f413, f414;
-    real_t f415, f416, f417, f418, f419, f420, f421;
-    real_t f422, f423, f424, f425, f426, f427, f428;
-    real_t f429, f430, f431, f432, f433, f434, f435;
-    real_t f436, f437, f438, f439, f440, f441, f442;
-    real_t f443, f444, f445, f446, f447, f448, f449;
-    real_t f450, f451, f452, f453, f454, f455, f456;
-    real_t f457, f458, f459, f460, f461, f462, f463;
-    real_t f464, f465, f466, f467, f468, f469, f470;
-    real_t f471, f472, f473, f474, f475, f476, f477;
-    real_t f478, f479, f480, f481, f482, f483, f484;
-    real_t f485, f486, f487, f488, f489, f490, f491;
-    real_t f492, f493, f494, f495, f496, f497, f498;
-    real_t f499, f500, f501, f502, f503, f504, f505;
-    real_t f506, f507, f508, f509, f510, f511, f512;
-    real_t f513, f514, f515, f516, f517, f518, f519;
-    real_t f520, f521, f522, f523, f524, f525, f526;
-    real_t f527, f528, f529, f530, f531, f532, f533;
-    real_t f534, f535, f536, f537, f538, f539, f540;
-    real_t f541, f542, f543, f544, f545, f546, f547;
-    real_t f548, f549, f550, f551, f552, f553, f554;
-    real_t f555, f556, f557, f558, f559, f560, f561;
-    real_t f562, f563, f564, f565, f566, f567, f568;
-    real_t f569, f570, f571, f572, f573, f574, f575;
-    real_t f576, f577, f578, f579, f580, f581, f582;
-    real_t f583, f584, f585, f586, f587, f588, f589;
-    real_t f590, f591, f592, f593, f594, f595, f596;
-    real_t f597, f598, f599, f600, f601, f602, f603;
-    real_t f604, f605, f606, f607, f608, f609, f610;
-    real_t f611, f612, f613, f614, f615, f618, f619;
-    real_t f620, f621, f624, f625, f626, f627, f630;
-    real_t f631, f632, f633, f636, f637, f638, f639;
-    real_t f642, f643, f644, f645, f648, f649, f650;
-    real_t f651, f654, f655, f656, f657, f660, f661;
-    real_t f662, f663, f666, f667, f668, f669, f672;
-    real_t f673, f674, f675, f678, f679, f680, f681;
-    real_t f684, f685, f686, f687, f690, f691, f692;
-    real_t f693, f696, f697, f698, f699, f702, f703;
-    real_t f704, f705, f708, f709, f710, f711, f714;
-    real_t f715, f716, f717, f720, f721, f722, f723;
-    real_t f726, f727, f728, f729, f732, f733, f734;
-    real_t f735, f738, f739, f740, f741, f744, f745;
-    real_t f746, f747, f750, f751, f752, f753, f756;
-    real_t f757, f758, f759, f762, f763, f764, f765;
-    real_t f768, f769, f770, f771, f774, f775, f776;
-    real_t f777, f780, f781, f782, f783, f786, f787;
-    real_t f788, f789, f792, f793, f794, f795, f798;
-    real_t f799, f800, f801;
+    real_t f0, f1, f2, f3, f4, f5, f6, f7, f8, f9;
+    real_t f10, f11, f12, f13, f14, f15, f16, f17, f18, f19;
+    real_t f20, f21, f22, f23, f24, f25, f26, f27, f28, f29;
+    real_t f30, f31, f32, f33, f34, f35, f36, f37, f38, f39;
+    real_t f40, f41, f42, f43, f44, f45, f46, f47, f48, f49;
+    real_t f50, f51, f52, f53, f54, f55, f56, f57, f58, f59;
+    real_t f60, f61, f62, f63, f64, f65, f66, f67, f68, f69;
+    real_t f70, f71, f72, f73, f74, f75, f76, f77, f78, f79;
+    real_t f80, f81, f82, f83, f84, f85, f86, f87, f88, f89;
+    real_t f90, f91, f92, f93, f94, f95, f96, f97, f98, f99;
+    real_t f100, f101, f102, f103, f104, f105, f106, f107, f108, f109;
+    real_t f110, f111, f112, f113, f114, f115, f116, f117, f118, f119;
+    real_t f120, f121, f122, f123, f124, f125, f126, f127, f128, f129;
+    real_t f130, f131, f132, f133, f134, f135, f136, f137, f138, f139;
+    real_t f140, f141, f142, f143, f144, f145, f146, f147, f148, f149;
+    real_t f150, f151, f152, f153, f154, f155, f156, f157, f158, f159;
+    real_t f160, f161, f162, f163, f164, f165, f166, f167, f168, f169;
+    real_t f170, f171, f172, f173, f174, f175, f176, f177, f178, f179;
+    real_t f180, f181, f182, f183, f184, f185, f186, f187, f188, f189;
+    real_t f190, f191, f192, f193, f194, f195, f196, f197, f198, f199;
+    real_t f200, f201, f202, f203, f204, f205, f206, f207, f208, f209;
+    real_t f210, f211, f212, f213, f214, f215, f216, f217, f218, f219;
+    real_t f220, f221, f222, f223, f224, f225, f226, f227, f228, f229;
+    real_t f230, f231, f232, f233, f234, f235, f236, f237, f238, f239;
+    real_t f240, f241, f242, f243, f244, f245, f246, f247, f248, f249;
+    real_t f250, f251, f252, f253, f254, f255, f256, f257, f258, f259;
+    real_t f260, f261, f262, f263, f264, f265, f266, f267, f268, f269;
+    real_t f270, f271, f272, f273, f274, f275, f276, f277, f278, f279;
+    real_t f280, f281, f282, f283, f284, f285, f286, f287, f288, f289;
+    real_t f290, f291, f292, f293, f294, f295, f296, f297, f298, f299;
+    real_t f300, f301, f302, f303, f304, f305, f306, f307, f308, f309;
+    real_t f310, f311, f312, f313, f314, f315, f316, f317, f318, f319;
+    real_t f320, f321, f322, f323, f324, f325, f326, f327, f328, f329;
+    real_t f330, f331, f332, f333, f334, f335;
 
-    f2 = 0.7071067811865476 * t2[32];
-    f3 = t2[0] - f2;
-    f4 = t2[0] + f2;
-    f5 = t2[16] + t2[48];
-    f6 = 1.3065629648763766 * t2[16];
-    f7 = (-0.9238795325112866) * f5;
-    f8 = (-0.5411961001461967) * t2[48];
-    f9 = f6 + f7;
-    f10 = f8 - f7;
-    f11 = f4 - f10;
-    f12 = f4 + f10;
-    f13 = f3 - f9;
-    f14 = f3 + f9;
-    f15 = t2[8] + t2[56];
-    f16 = 1.1758756024193588 * t2[8];
-    f17 = (-0.9807852804032304) * f15;
-    f18 = (-0.7856949583871021) * t2[56];
-    f19 = f16 + f17;
-    f20 = f18 - f17;
-    f21 = t2[24] + t2[40];
-    f22 = 1.3870398453221473 * t2[24];
-    f23 = (-0.8314696123025455) * f21;
-    f24 = (-0.2758993792829436) * t2[40];
-    f25 = f22 + f23;
-    f26 = f24 - f23;
-    f27 = f20 - f26;
-    f28 = f20 + f26;
-    f29 = 0.7071067811865476 * f27;
-    f30 = f19 - f25;
-    f31 = f19 + f25;
-    f32 = 0.7071067811865476 * f31;
-    f33 = f29 - f32;
-    f34 = f29 + f32;
-    f35 = f12 - f28;
-    f36 = f12 + f28;
-    f37 = f14 - f34;
-    f38 = f14 + f34;
-    f39 = f13 - f33;
-    f40 = f13 + f33;
-    f41 = f11 - f30;
-    f42 = f11 + f30;
-    f43 = t2[4] + t2[60];
-    f44 = 1.0932018670017569 * t2[4];
-    f45 = (-0.9951847266721969) * f43;
-    f46 = (-0.8971675863426368) * t2[60];
-    f47 = f44 + f45;
-    f48 = f46 - f45;
-    f49 = t2[12] + t2[52];
-    f50 = 1.2472250129866711 * t2[12];
-    f51 = (-0.9569403357322089) * f49;
-    f52 = (-0.6666556584777469) * t2[52];
-    f53 = f50 + f51;
-    f54 = f52 - f51;
-    f55 = t2[20] + t2[44];
-    f56 = 1.3533180011743526 * t2[20];
-    f57 = (-0.8819212643483551) * f55;
-    f58 = (-0.4105245275223575) * t2[44];
-    f59 = f56 + f57;
-    f60 = f58 - f57;
-    f61 = t2[28] + t2[36];
-    f62 = 1.4074037375263826 * t2[28];
-    f63 = (-0.7730104533627369) * f61;
-    f64 = (-0.1386171691990913) * t2[36];
-    f65 = f62 + f63;
-    f66 = f64 - f63;
-    f67 = f48 - f66;
-    f68 = f48 + f66;
-    f69 = f54 - f60;
-    f70 = f54 + f60;
-    f71 = f68 - f70;
-    f72 = f68 + f70;
-    f73 = 0.7071067811865476 * f71;
-    f74 = f67 + f69;
-    f75 = 1.3065629648763766 * f67;
-    f76 = (-0.9238795325112866) * f74;
-    f77 = (-0.5411961001461967) * f69;
-    f78 = f75 + f76;
-    f79 = f77 - f76;
-    f80 = f47 - f65;
-    f81 = f47 + f65;
-    f82 = f53 - f59;
-    f83 = f53 + f59;
-    f84 = f81 + f83;
-    f85 = 1.3065629648763770 * f81;
-    f86 = (-0.3826834323650904) * f84;
-    f87 = 0.5411961001461961 * f83;
-    f88 = f85 + f86;
-    f89 = f87 - f86;
-    f90 = f80 - f82;
-    f91 = f80 + f82;
-    f92 = 0.7071067811865476 * f91;
-    f93 = f79 - f89;
-    f94 = f79 + f89;
-    f95 = f73 - f92;
-    f96 = f73 + f92;
-    f97 = f78 - f88;
-    f98 = f78 + f88;
-    f99 = f36 - f72;
-    f100 = f36 + f72;
-    f101 = f38 - f94;
-    f102 = f38 + f94;
-    f103 = f40 - f93;
-    f104 = f40 + f93;
-    f105 = f42 - f96;
-    f106 = f42 + f96;
-    f107 = f41 - f95;
-    f108 = f41 + f95;
-    f109 = f39 - f98;
-    f110 = f39 + f98;
-    f111 = f37 - f97;
-    f112 = f37 + f97;
-    f113 = f35 - f90;
-    f114 = f35 + f90;
-    f115 = t2[2] + t2[62];
-    f116 = 1.0478631305325901 * t2[2];
-    f117 = (-0.9987954562051724) * f115;
-    f118 = (-0.9497277818777548) * t2[62];
-    f119 = f116 + f117;
-    f120 = f118 - f117;
-    f121 = t2[10] + t2[54];
-    f122 = 1.2130114330978077 * t2[10];
-    f123 = (-0.9700312531945440) * f121;
-    f124 = (-0.7270510732912803) * t2[54];
-    f125 = f122 + f123;
+    f0 = x[0] - x[1];
+    f1 = x[2] - x[1];
+    f2 = x[2] - x[3];
+    f3 = x[4] - x[3];
+    f4 = x[4] - x[5];
+    f5 = x[6] - x[5];
+    f6 = x[6] - x[7];
+    f7 = x[8] - x[7];
+    f8 = x[8] - x[9];
+    f9 = x[10] - x[9];
+    f10 = x[10] - x[11];
+    f11 = x[12] - x[11];
+    f12 = x[12] - x[13];
+    f13 = x[14] - x[13];
+    f14 = x[14] - x[15];
+    f15 = x[16] - x[15];
+    f16 = x[16] - x[17];
+    f17 = x[18] - x[17];
+    f18 = x[18] - x[19];
+    f19 = x[20] - x[19];
+    f20 = x[20] - x[21];
+    f21 = x[22] - x[21];
+    f22 = x[22] - x[23];
+    f23 = x[24] - x[23];
+    f24 = x[24] - x[25];
+    f25 = x[26] - x[25];
+    f26 = x[26] - x[27];
+    f27 = x[28] - x[27];
+    f28 = x[28] - x[29];
+    f29 = x[30] - x[29];
+    f30 = x[30] - x[31];
+    f31 = MUL_F(FRAC_CONST(0.7071067811865476), f15);
+    f32 = x[0] - f31;
+    f33 = x[0] + f31;
+    f34 = f7 + f23;
+    f35 = MUL_C(COEF_CONST(1.3065629648763766), f7);
+    f36 = MUL_F(FRAC_CONST(-0.9238795325112866), f34);
+    f37 = MUL_F(FRAC_CONST(-0.5411961001461967), f23);
+    f38 = f35 + f36;
+    f39 = f37 - f36;
+    f40 = f33 - f39;
+    f41 = f33 + f39;
+    f42 = f32 - f38;
+    f43 = f32 + f38;
+    f44 = f11 - f19;
+    f45 = f11 + f19;
+    f46 = MUL_F(FRAC_CONST(0.7071067811865476), f45);
+    f47 = f3 - f46;
+    f48 = f3 + f46;
+    f49 = MUL_F(FRAC_CONST(0.7071067811865476), f44);
+    f50 = f49 - f27;
+    f51 = f49 + f27;
+    f52 = f51 + f48;
+    f53 = MUL_F(FRAC_CONST(-0.7856949583871021), f51);
+    f54 = MUL_F(FRAC_CONST(0.9807852804032304), f52);
+    f55 = MUL_C(COEF_CONST(1.1758756024193588), f48);
+    f56 = f53 + f54;
+    f57 = f55 - f54;
+    f58 = f50 + f47;
+    f59 = MUL_F(FRAC_CONST(-0.2758993792829430), f50);
+    f60 = MUL_F(FRAC_CONST(0.8314696123025452), f58);
+    f61 = MUL_C(COEF_CONST(1.3870398453221475), f47);
+    f62 = f59 + f60;
+    f63 = f61 - f60;
+    f64 = f41 - f56;
+    f65 = f41 + f56;
+    f66 = f43 - f62;
+    f67 = f43 + f62;
+    f68 = f42 - f63;
+    f69 = f42 + f63;
+    f70 = f40 - f57;
+    f71 = f40 + f57;
+    f72 = f5 - f9;
+    f73 = f5 + f9;
+    f74 = f13 - f17;
+    f75 = f13 + f17;
+    f76 = f21 - f25;
+    f77 = f21 + f25;
+    f78 = MUL_F(FRAC_CONST(0.7071067811865476), f75);
+    f79 = f1 - f78;
+    f80 = f1 + f78;
+    f81 = f73 + f77;
+    f82 = MUL_C(COEF_CONST(1.3065629648763766), f73);
+    f83 = MUL_F(FRAC_CONST(-0.9238795325112866), f81);
+    f84 = MUL_F(FRAC_CONST(-0.5411961001461967), f77);
+    f85 = f82 + f83;
+    f86 = f84 - f83;
+    f87 = f80 - f86;
+    f88 = f80 + f86;
+    f89 = f79 - f85;
+    f90 = f79 + f85;
+    f91 = MUL_F(FRAC_CONST(0.7071067811865476), f74);
+    f92 = f29 - f91;
+    f93 = f29 + f91;
+    f94 = f76 + f72;
+    f95 = MUL_C(COEF_CONST(1.3065629648763766), f76);
+    f96 = MUL_F(FRAC_CONST(-0.9238795325112866), f94);
+    f97 = MUL_F(FRAC_CONST(-0.5411961001461967), f72);
+    f98 = f95 + f96;
+    f99 = f97 - f96;
+    f100 = f93 - f99;
+    f101 = f93 + f99;
+    f102 = f92 - f98;
+    f103 = f92 + f98;
+    f104 = f101 + f88;
+    f105 = MUL_F(FRAC_CONST(-0.8971675863426361), f101);
+    f106 = MUL_F(FRAC_CONST(0.9951847266721968), f104);
+    f107 = MUL_C(COEF_CONST(1.0932018670017576), f88);
+    f108 = f105 + f106;
+    f109 = f107 - f106;
+    f110 = f90 - f103;
+    f111 = MUL_F(FRAC_CONST(-0.6666556584777466), f103);
+    f112 = MUL_F(FRAC_CONST(0.9569403357322089), f110);
+    f113 = MUL_C(COEF_CONST(1.2472250129866713), f90);
+    f114 = f112 - f111;
+    f115 = f113 - f112;
+    f116 = f102 + f89;
+    f117 = MUL_F(FRAC_CONST(-0.4105245275223571), f102);
+    f118 = MUL_F(FRAC_CONST(0.8819212643483549), f116);
+    f119 = MUL_C(COEF_CONST(1.3533180011743529), f89);
+    f120 = f117 + f118;
+    f121 = f119 - f118;
+    f122 = f87 - f100;
+    f123 = MUL_F(FRAC_CONST(-0.1386171691990915), f100);
+    f124 = MUL_F(FRAC_CONST(0.7730104533627370), f122);
+    f125 = MUL_C(COEF_CONST(1.4074037375263826), f87);
     f126 = f124 - f123;
-    f127 = t2[18] + t2[46];
-    f128 = 1.3315443865537255 * t2[18];
-    f129 = (-0.9039892931234433) * f127;
-    f130 = (-0.4764341996931612) * t2[46];
-    f131 = f128 + f129;
-    f132 = f130 - f129;
-    f133 = t2[26] + t2[38];
-    f134 = 1.3989068359730781 * t2[26];
-    f135 = (-0.8032075314806453) * f133;
-    f136 = (-0.2075082269882124) * t2[38];
-    f137 = f134 + f135;
-    f138 = f136 - f135;
-    f139 = t2[34] + t2[30];
-    f140 = 1.4125100802019777 * t2[34];
-    f141 = (-0.6715589548470187) * f139;
-    f142 = 0.0693921705079402 * t2[30];
-    f143 = f140 + f141;
-    f144 = f142 - f141;
-    f145 = t2[42] + t2[22];
-    f146 = 1.3718313541934939 * t2[42];
-    f147 = (-0.5141027441932219) * f145;
-    f148 = 0.3436258658070501 * t2[22];
-    f149 = f146 + f147;
-    f150 = f148 - f147;
-    f151 = t2[50] + t2[14];
-    f152 = 1.2784339185752409 * t2[50];
-    f153 = (-0.3368898533922200) * f151;
-    f154 = 0.6046542117908008 * t2[14];
-    f155 = f152 + f153;
-    f156 = f154 - f153;
-    f157 = t2[58] + t2[6];
-    f158 = 1.1359069844201433 * t2[58];
-    f159 = (-0.1467304744553624) * f157;
-    f160 = 0.8424460355094185 * t2[6];
-    f161 = f158 + f159;
-    f162 = f160 - f159;
-    f163 = f120 - f144;
-    f164 = f120 + f144;
-    f165 = f119 - f143;
-    f166 = f119 + f143;
-    f167 = f126 - f150;
-    f168 = f126 + f150;
-    f169 = f125 - f149;
-    f170 = f125 + f149;
-    f171 = f132 - f156;
-    f172 = f132 + f156;
-    f173 = f131 - f155;
-    f174 = f131 + f155;
-    f175 = f138 - f162;
-    f176 = f138 + f162;
-    f177 = f137 - f161;
-    f178 = f137 + f161;
-    f179 = f163 + f165;
-    f180 = 1.1758756024193588 * f163;
-    f181 = (-0.9807852804032304) * f179;
-    f182 = (-0.7856949583871021) * f165;
-    f183 = f180 + f181;
-    f184 = f182 - f181;
-    f185 = f167 + f169;
-    f186 = 1.3870398453221475 * f167;
-    f187 = (-0.5555702330196022) * f185;
-    f188 = 0.2758993792829431 * f169;
-    f189 = f186 + f187;
-    f190 = f188 - f187;
-    f191 = f171 + f173;
-    f192 = 0.7856949583871022 * f171;
-    f193 = 0.1950903220161283 * f191;
-    f194 = 1.1758756024193586 * f173;
-    f195 = f192 + f193;
-    f196 = f194 - f193;
-    f197 = f175 + f177;
-    f198 = (-0.2758993792829430) * f175;
-    f199 = 0.8314696123025452 * f197;
-    f200 = 1.3870398453221475 * f177;
-    f201 = f198 + f199;
-    f202 = f200 - f199;
-    f203 = f164 - f172;
-    f204 = f164 + f172;
-    f205 = f166 - f174;
-    f206 = f166 + f174;
-    f207 = f168 - f176;
-    f208 = f168 + f176;
-    f209 = f170 - f178;
-    f210 = f170 + f178;
-    f211 = f184 - f196;
-    f212 = f184 + f196;
-    f213 = f183 - f195;
-    f214 = f183 + f195;
-    f215 = f190 - f202;
-    f216 = f190 + f202;
-    f217 = f189 - f201;
-    f218 = f189 + f201;
-    f219 = f203 + f205;
-    f220 = 1.3065629648763766 * f203;
-    f221 = (-0.9238795325112866) * f219;
-    f222 = (-0.5411961001461967) * f205;
-    f223 = f220 + f221;
-    f224 = f222 - f221;
-    f225 = f207 + f209;
-    f226 = 0.5411961001461969 * f207;
-    f227 = 0.3826834323650898 * f225;
-    f228 = 1.3065629648763766 * f209;
-    f229 = f226 + f227;
-    f230 = f228 - f227;
-    f231 = f211 + f213;
-    f232 = 1.3065629648763766 * f211;
-    f233 = (-0.9238795325112866) * f231;
-    f234 = (-0.5411961001461967) * f213;
-    f235 = f232 + f233;
-    f236 = f234 - f233;
-    f237 = f215 + f217;
-    f238 = 0.5411961001461969 * f215;
-    f239 = 0.3826834323650898 * f237;
-    f240 = 1.3065629648763766 * f217;
-    f241 = f238 + f239;
-    f242 = f240 - f239;
-    f243 = f204 - f208;
-    f244 = f204 + f208;
-    f245 = f206 - f210;
-    f246 = f206 + f210;
-    f247 = f224 - f230;
-    f248 = f224 + f230;
-    f249 = f223 - f229;
-    f250 = f223 + f229;
-    f251 = f212 - f216;
-    f252 = f212 + f216;
-    f253 = f214 - f218;
-    f254 = f214 + f218;
-    f255 = f236 - f242;
-    f256 = f236 + f242;
-    f257 = f235 - f241;
-    f258 = f235 + f241;
-    f259 = f243 - f245;
-    f260 = f243 + f245;
-    f261 = 0.7071067811865474 * f259;
-    f262 = 0.7071067811865474 * f260;
-    f263 = f247 - f249;
-    f264 = f247 + f249;
-    f265 = 0.7071067811865474 * f263;
-    f266 = 0.7071067811865474 * f264;
-    f267 = f251 - f253;
-    f268 = f251 + f253;
-    f269 = 0.7071067811865474 * f267;
-    f270 = 0.7071067811865474 * f268;
-    f271 = f255 - f257;
-    f272 = f255 + f257;
-    f273 = 0.7071067811865474 * f271;
-    f274 = 0.7071067811865474 * f272;
-    f275 = f100 - f244;
-    f276 = f100 + f244;
-    f277 = f102 - f252;
-    f278 = f102 + f252;
-    f279 = f104 - f256;
-    f280 = f104 + f256;
-    f281 = f106 - f248;
-    f282 = f106 + f248;
-    f283 = f108 - f266;
-    f284 = f108 + f266;
-    f285 = f110 - f274;
-    f286 = f110 + f274;
-    f287 = f112 - f270;
-    f288 = f112 + f270;
-    f289 = f114 - f262;
-    f290 = f114 + f262;
-    f291 = f113 - f261;
-    f292 = f113 + f261;
-    f293 = f111 - f269;
-    f294 = f111 + f269;
-    f295 = f109 - f273;
-    f296 = f109 + f273;
-    f297 = f107 - f265;
-    f298 = f107 + f265;
-    f299 = f105 - f250;
-    f300 = f105 + f250;
-    f301 = f103 - f258;
-    f302 = f103 + f258;
-    f303 = f101 - f254;
-    f304 = f101 + f254;
-    f305 = f99 - f246;
-    f306 = f99 + f246;
-    f307 = t2[1] - t2[61];
-    f308 = 1.0478631305325901 * t2[1];
-    f309 = (-0.9987954562051724) * f307;
-    f310 = (-0.9497277818777548) * t2[61];
-    f311 = f308 + f309;
-    f312 = f309 + f310;
-    f313 = t2[9] - t2[53];
-    f314 = 1.2130114330978077 * t2[9];
-    f315 = (-0.9700312531945440) * f313;
-    f316 = (-0.7270510732912803) * t2[53];
-    f317 = f314 + f315;
-    f318 = f315 + f316;
-    f319 = t2[17] - t2[45];
-    f320 = 1.3315443865537255 * t2[17];
-    f321 = (-0.9039892931234433) * f319;
-    f322 = (-0.4764341996931612) * t2[45];
-    f323 = f320 + f321;
-    f324 = f321 + f322;
-    f325 = t2[25] - t2[37];
-    f326 = 1.3989068359730781 * t2[25];
-    f327 = (-0.8032075314806453) * f325;
-    f328 = (-0.2075082269882124) * t2[37];
-    f329 = f326 + f327;
-    f330 = f327 + f328;
-    f331 = t2[33] - t2[29];
-    f332 = 1.4125100802019777 * t2[33];
-    f333 = (-0.6715589548470187) * f331;
-    f334 = 0.0693921705079402 * t2[29];
-    f335 = f332 + f333;
-    f336 = f333 + f334;
-    f337 = t2[41] - t2[21];
-    f338 = 1.3718313541934939 * t2[41];
-    f339 = (-0.5141027441932219) * f337;
-    f340 = 0.3436258658070501 * t2[21];
-    f341 = f338 + f339;
-    f342 = f339 + f340;
-    f343 = t2[49] - t2[13];
-    f344 = 1.2784339185752409 * t2[49];
-    f345 = (-0.3368898533922200) * f343;
-    f346 = 0.6046542117908008 * t2[13];
-    f347 = f344 + f345;
-    f348 = f345 + f346;
-    f349 = t2[57] - t2[5];
-    f350 = 1.1359069844201433 * t2[57];
-    f351 = (-0.1467304744553624) * f349;
-    f352 = 0.8424460355094185 * t2[5];
-    f353 = f350 + f351;
-    f354 = f351 + f352;
-    f355 = f336 - f312;
-    f356 = f312 + f336;
-    f357 = f311 - f335;
-    f358 = f311 + f335;
-    f359 = f342 - f318;
-    f360 = f318 + f342;
-    f361 = f317 - f341;
-    f362 = f317 + f341;
-    f363 = f348 - f324;
-    f364 = f324 + f348;
-    f365 = f323 - f347;
-    f366 = f323 + f347;
-    f367 = f354 - f330;
-    f368 = f330 + f354;
-    f369 = f329 - f353;
-    f370 = f329 + f353;
-    f371 = f355 + f357;
-    f372 = 1.1758756024193588 * f355;
-    f373 = (-0.9807852804032304) * f371;
-    f374 = (-0.7856949583871021) * f357;
-    f375 = f372 + f373;
-    f376 = f374 - f373;
-    f377 = f359 + f361;
-    f378 = 1.3870398453221475 * f359;
-    f379 = (-0.5555702330196022) * f377;
-    f380 = 0.2758993792829431 * f361;
-    f381 = f378 + f379;
-    f382 = f380 - f379;
-    f383 = f363 + f365;
-    f384 = 0.7856949583871022 * f363;
-    f385 = 0.1950903220161283 * f383;
-    f386 = 1.1758756024193586 * f365;
-    f387 = f384 + f385;
-    f388 = f386 - f385;
-    f389 = f367 + f369;
-    f390 = (-0.2758993792829430) * f367;
-    f391 = 0.8314696123025452 * f389;
-    f392 = 1.3870398453221475 * f369;
-    f393 = f390 + f391;
-    f394 = f392 - f391;
-    f395 = f364 - f356;
-    f396 = f356 + f364;
-    f397 = f358 - f366;
-    f398 = f358 + f366;
-    f399 = f368 - f360;
-    f400 = f360 + f368;
-    f401 = f362 - f370;
-    f402 = f362 + f370;
-    f403 = f376 - f388;
-    f404 = f376 + f388;
-    f405 = f375 - f387;
-    f406 = f375 + f387;
-    f407 = f382 - f394;
-    f408 = f382 + f394;
-    f409 = f381 - f393;
-    f410 = f381 + f393;
-    f411 = f395 + f397;
-    f412 = 1.3065629648763766 * f395;
-    f413 = (-0.9238795325112866) * f411;
-    f414 = (-0.5411961001461967) * f397;
-    f415 = f412 + f413;
-    f416 = f414 - f413;
-    f417 = f399 + f401;
-    f418 = 0.5411961001461969 * f399;
-    f419 = 0.3826834323650898 * f417;
-    f420 = 1.3065629648763766 * f401;
-    f421 = f418 + f419;
-    f422 = f420 - f419;
-    f423 = f403 + f405;
-    f424 = 1.3065629648763766 * f403;
-    f425 = (-0.9238795325112866) * f423;
-    f426 = (-0.5411961001461967) * f405;
-    f427 = f424 + f425;
-    f428 = f426 - f425;
-    f429 = f407 + f409;
-    f430 = 0.5411961001461969 * f407;
-    f431 = 0.3826834323650898 * f429;
-    f432 = 1.3065629648763766 * f409;
-    f433 = f430 + f431;
-    f434 = f432 - f431;
-    f435 = f400 - f396;
-    f436 = f396 + f400;
-    f437 = f398 - f402;
-    f438 = f398 + f402;
-    f439 = f416 - f422;
-    f440 = f416 + f422;
-    f441 = f415 - f421;
-    f442 = f415 + f421;
-    f443 = f404 - f408;
-    f444 = f404 + f408;
-    f445 = f406 - f410;
-    f446 = f406 + f410;
-    f447 = f428 - f434;
-    f448 = f428 + f434;
-    f449 = f427 - f433;
-    f450 = f427 + f433;
-    f451 = f435 - f437;
-    f452 = f435 + f437;
-    f453 = 0.7071067811865474 * f451;
-    f454 = 0.7071067811865474 * f452;
-    f455 = f439 - f441;
-    f456 = f439 + f441;
-    f457 = 0.7071067811865474 * f455;
-    f458 = 0.7071067811865474 * f456;
-    f459 = f443 - f445;
-    f460 = f443 + f445;
-    f461 = 0.7071067811865474 * f459;
-    f462 = 0.7071067811865474 * f460;
-    f463 = f447 - f449;
-    f464 = f447 + f449;
-    f465 = 0.7071067811865474 * f463;
-    f466 = 0.7071067811865474 * f464;
-    f467 = 0.7071067811865476 * t2[31];
-    f468 = t2[63] - f467;
-    f469 = t2[63] + f467;
-    f470 = t2[47] + t2[15];
-    f471 = 1.3065629648763766 * t2[47];
-    f472 = (-0.9238795325112866) * f470;
-    f473 = (-0.5411961001461967) * t2[15];
-    f474 = f471 + f472;
-    f475 = f473 - f472;
-    f476 = f469 - f475;
-    f477 = f469 + f475;
-    f478 = f468 - f474;
-    f479 = f468 + f474;
-    f480 = t2[55] + t2[7];
-    f481 = 1.1758756024193588 * t2[55];
-    f482 = (-0.9807852804032304) * f480;
-    f483 = (-0.7856949583871021) * t2[7];
-    f484 = f481 + f482;
-    f485 = f483 - f482;
-    f486 = t2[39] + t2[23];
-    f487 = 1.3870398453221473 * t2[39];
-    f488 = (-0.8314696123025455) * f486;
-    f489 = (-0.2758993792829436) * t2[23];
-    f490 = f487 + f488;
-    f491 = f489 - f488;
-    f492 = f485 - f491;
-    f493 = f485 + f491;
-    f494 = 0.7071067811865476 * f492;
-    f495 = f484 - f490;
-    f496 = f484 + f490;
-    f497 = 0.7071067811865476 * f496;
-    f498 = f494 - f497;
-    f499 = f494 + f497;
-    f500 = f477 - f493;
-    f501 = f477 + f493;
-    f502 = f479 - f499;
-    f503 = f479 + f499;
-    f504 = f478 - f498;
-    f505 = f478 + f498;
-    f506 = f476 - f495;
-    f507 = f476 + f495;
-    f508 = t2[59] + t2[3];
-    f509 = 1.0932018670017569 * t2[59];
-    f510 = (-0.9951847266721969) * f508;
-    f511 = (-0.8971675863426368) * t2[3];
-    f512 = f509 + f510;
-    f513 = f511 - f510;
-    f514 = t2[51] + t2[11];
-    f515 = 1.2472250129866711 * t2[51];
-    f516 = (-0.9569403357322089) * f514;
-    f517 = (-0.6666556584777469) * t2[11];
-    f518 = f515 + f516;
-    f519 = f517 - f516;
-    f520 = t2[43] + t2[19];
-    f521 = 1.3533180011743526 * t2[43];
-    f522 = (-0.8819212643483551) * f520;
-    f523 = (-0.4105245275223575) * t2[19];
-    f524 = f521 + f522;
-    f525 = f523 - f522;
-    f526 = t2[35] + t2[27];
-    f527 = 1.4074037375263826 * t2[35];
-    f528 = (-0.7730104533627369) * f526;
-    f529 = (-0.1386171691990913) * t2[27];
-    f530 = f527 + f528;
-    f531 = f529 - f528;
-    f532 = f513 - f531;
-    f533 = f513 + f531;
-    f534 = f519 - f525;
-    f535 = f519 + f525;
-    f536 = f533 - f535;
-    f537 = f533 + f535;
-    f538 = 0.7071067811865476 * f536;
-    f539 = f532 + f534;
-    f540 = 1.3065629648763766 * f532;
-    f541 = (-0.9238795325112866) * f539;
-    f542 = (-0.5411961001461967) * f534;
-    f543 = f540 + f541;
-    f544 = f542 - f541;
-    f545 = f512 - f530;
-    f546 = f512 + f530;
-    f547 = f518 - f524;
-    f548 = f518 + f524;
-    f549 = f546 + f548;
-    f550 = 1.3065629648763770 * f546;
-    f551 = (-0.3826834323650904) * f549;
-    f552 = 0.5411961001461961 * f548;
-    f553 = f550 + f551;
-    f554 = f552 - f551;
-    f555 = f545 - f547;
-    f556 = f545 + f547;
-    f557 = 0.7071067811865476 * f556;
-    f558 = f544 - f554;
-    f559 = f544 + f554;
-    f560 = f538 - f557;
-    f561 = f538 + f557;
-    f562 = f543 - f553;
-    f563 = f543 + f553;
-    f564 = f501 - f537;
-    f565 = f501 + f537;
-    f566 = f503 - f559;
-    f567 = f503 + f559;
-    f568 = f505 - f558;
-    f569 = f505 + f558;
-    f570 = f507 - f561;
-    f571 = f507 + f561;
-    f572 = f506 - f560;
-    f573 = f506 + f560;
-    f574 = f504 - f563;
-    f575 = f504 + f563;
-    f576 = f502 - f562;
-    f577 = f502 + f562;
-    f578 = f500 - f555;
-    f579 = f500 + f555;
-    f580 = f438 - f565;
-    f581 = f438 + f565;
-    f582 = f446 + f567;
-    f583 = f446 - f567;
-    f584 = f450 - f569;
-    f585 = f450 + f569;
-    f586 = f442 + f571;
-    f587 = f442 - f571;
-    f588 = f457 - f573;
-    f589 = f457 + f573;
-    f590 = f465 + f575;
-    f591 = f465 - f575;
-    f592 = f461 - f577;
-    f593 = f461 + f577;
-    f594 = f453 + f579;
-    f595 = f453 - f579;
-    f596 = f454 - f578;
-    f597 = f454 + f578;
-    f598 = f462 + f576;
-    f599 = f462 - f576;
-    f600 = f466 - f574;
-    f601 = f466 + f574;
-    f602 = f458 + f572;
-    f603 = f458 - f572;
-    f604 = f440 - f570;
-    f605 = f440 + f570;
-    f606 = f448 + f568;
-    f607 = f448 - f568;
-    f608 = f444 - f566;
-    f609 = f444 + f566;
-    f610 = f564 - f436;
-    f611 = f436 + f564;
-    f612 = f581 + f276;
-    f613 = (-0.9876531635534246) * f581;
-    f614 = 0.9999247018391445 * f612;
-    f615 = 1.0121962401248645 * f276;
-    y[0] = f613 + f614;
-    y[63] = f615 - f614;
-    f618 = f583 + f278;
-    f619 = (-0.9625151616469906) * f583;
-    f620 = 0.9993223845883495 * f618;
-    f621 = 1.0361296075297086 * f278;
-    y[1] = f619 + f620;
-    y[62] = f621 - f620;
-    f624 = f585 + f280;
-    f625 = (-0.9367973765979405) * f585;
-    f626 = 0.9981181129001492 * f624;
-    f627 = 1.0594388492023579 * f280;
-    y[2] = f625 + f626;
-    y[61] = f627 - f626;
-    f630 = f587 + f282;
-    f631 = (-0.9105152998383381) * f587;
-    f632 = 0.9963126121827780 * f630;
-    f633 = 1.0821099245272179 * f282;
-    y[3] = f631 + f632;
-    y[60] = f633 - f632;
-    f636 = f589 + f284;
-    f637 = (-0.8836847627084729) * f589;
-    f638 = 0.9939069700023561 * f636;
-    f639 = 1.1041291772962392 * f284;
-    y[4] = f637 + f638;
-    y[59] = f639 - f638;
-    f642 = f591 + f286;
-    f643 = (-0.8563219269206538) * f591;
-    f644 = 0.9909026354277800 * f642;
-    f645 = 1.1254833439349063 * f286;
-    y[5] = f643 + f644;
-    y[58] = f645 - f644;
-    f648 = f593 + f288;
-    f649 = (-0.8284432748239970) * f593;
-    f650 = 0.9873014181578584 * f648;
-    f651 = 1.1461595614917197 * f288;
-    y[6] = f649 + f650;
-    y[57] = f651 - f650;
-    f654 = f595 + f290;
-    f655 = (-0.8000655994760753) * f595;
-    f656 = 0.9831054874312163 * f654;
-    f657 = 1.1661453753863573 * f290;
-    y[7] = f655 + f656;
-    y[56] = f657 - f656;
-    f660 = f597 + f292;
-    f661 = (-0.7712059945274091) * f597;
-    f662 = 0.9783173707196277 * f660;
-    f663 = 1.1854287469118463 * f292;
-    y[8] = f661 + f662;
-    y[55] = f663 - f662;
-    f666 = f599 + f294;
-    f667 = (-0.7418818439248888) * f599;
-    f668 = 0.9729399522055601 * f666;
-    f669 = 1.2039980604862313 * f294;
-    y[9] = f667 + f668;
-    y[54] = f669 - f668;
-    f672 = f601 + f296;
-    f673 = (-0.7121108114403374) * f601;
-    f674 = 0.9669764710448521 * f672;
-    f675 = 1.2218421306493668 * f296;
-    y[10] = f673 + f674;
-    y[53] = f675 - f674;
-    f678 = f603 + f298;
-    f679 = (-0.6819108300305128) * f603;
-    f680 = 0.9604305194155658 * f678;
-    f681 = 1.2389502088006188 * f298;
-    y[11] = f679 + f680;
-    y[52] = f681 - f680;
-    f684 = f605 + f300;
-    f685 = (-0.6513000910349656) * f605;
-    f686 = 0.9533060403541938 * f684;
-    f687 = 1.2553119896734219 * f300;
-    y[12] = f685 + f686;
-    y[51] = f687 - f686;
-    f690 = f607 + f302;
-    f691 = (-0.6202970332182582) * f607;
-    f692 = 0.9456073253805213 * f690;
-    f693 = 1.2709176175427843 * f302;
-    y[13] = f691 + f692;
-    y[50] = f693 - f692;
-    f696 = f609 + f304;
-    f697 = (-0.5889203316631404) * f609;
-    f698 = 0.9373390119125750 * f696;
-    f699 = 1.2857576921620095 * f304;
-    y[14] = f697 + f698;
-    y[49] = f699 - f698;
-    f702 = f306 - f611;
-    f703 = (-0.5571888865213779) * f611;
-    f704 = 0.9285060804732155 * f702;
-    f705 = 1.2998232744250531 * f306;
-    y[15] = f704 - f703;
-    y[48] = f705 - f704;
-    f708 = f610 + f305;
-    f709 = (-0.5251218116290097) * f610;
-    f710 = 0.9191138516900578 * f708;
-    f711 = 1.3131058917511058 * f305;
-    y[16] = f709 + f710;
-    y[47] = f711 - f710;
-    f714 = f608 + f303;
-    f715 = (-0.4927384229928850) * f608;
-    f716 = 0.9091679830905223 * f714;
-    f717 = 1.3255975431881595 * f303;
-    y[17] = f715 + f716;
-    y[46] = f717 - f716;
-    f720 = f606 + f301;
-    f721 = (-0.4600582271554261) * f606;
-    f722 = 0.8986744656939538 * f720;
-    f723 = 1.3372907042324815 * f301;
-    y[18] = f721 + f722;
-    y[45] = f723 - f722;
-    f726 = f604 + f299;
-    f727 = (-0.4271009094446139) * f604;
-    f728 = 0.8876396204028539 * f726;
-    f729 = 1.3481783313610940 * f299;
-    y[19] = f727 + f728;
-    y[44] = f729 - f728;
-    f732 = f602 + f297;
-    f733 = (-0.3938863221162838) * f602;
-    f734 = 0.8760700941954066 * f732;
-    f735 = 1.3582538662745294 * f297;
-    y[20] = f733 + f734;
-    y[43] = f735 - f734;
-    f738 = f600 + f295;
-    f739 = (-0.3604344723958691) * f600;
-    f740 = 0.8639728561215867 * f738;
-    f741 = 1.3675112398473042 * f295;
-    y[21] = f739 + f740;
-    y[42] = f741 - f740;
-    f744 = f598 + f293;
-    f745 = (-0.3267655104267964) * f598;
-    f746 = 0.8513551931052652 * f744;
-    f747 = 1.3759448757837340 * f293;
-    y[22] = f745 + f746;
-    y[41] = f747 - f746;
-    f750 = f596 + f291;
-    f751 = (-0.2928997171327915) * f596;
-    f752 = 0.8382247055548380 * f750;
-    f753 = 1.3835496939768843 * f291;
-    y[23] = f751 + f752;
-    y[40] = f753 - f752;
-    f756 = f594 + f289;
-    f757 = (-0.2588574920014121) * f594;
-    f758 = 0.8245893027850253 * f756;
-    f759 = 1.3903211135686386 * f289;
-    y[24] = f757 + f758;
-    y[39] = f759 - f758;
-    f762 = f592 + f287;
-    f763 = (-0.2246593407961559) * f592;
-    f764 = 0.8104571982525948 * f762;
-    f765 = 1.3962550557090336 * f287;
-    y[25] = f763 + f764;
-    y[38] = f765 - f764;
-    f768 = f590 + f285;
-    f769 = (-0.1903258632045579) * f590;
-    f770 = 0.7958369046088835 * f768;
-    f771 = 1.4013479460132090 * f285;
-    y[26] = f769 + f770;
-    y[37] = f771 - f770;
-    f774 = f588 + f283;
-    f775 = (-0.1558777404297079) * f588;
-    f776 = 0.7807372285720944 * f774;
-    f777 = 1.4055967167144807 * f283;
-    y[27] = f775 + f776;
-    y[36] = f777 - f776;
-    f780 = f586 + f281;
-    f781 = (-0.1213357227326675) * f586;
-    f782 = 0.7651672656224590 * f780;
-    f783 = 1.4089988085122505 * f281;
-    y[28] = f781 + f782;
-    y[35] = f783 - f782;
-    f786 = f584 + f279;
-    f787 = (-0.0867206169332875) * f584;
-    f788 = 0.7491363945234593 * f786;
-    f789 = 1.4115521721136310 * f279;
-    y[29] = f787 + f788;
-    y[34] = f789 - f788;
-    f792 = f582 + f277;
-    f793 = (-0.0520532738769597) * f582;
-    f794 = 0.7326542716724128 * f792;
-    f795 = 1.4132552694678659 * f277;
-    y[30] = f793 + f794;
-    y[33] = f795 - f794;
-    f798 = f580 + f275;
-    f799 = (-0.0173545758748457) * f580;
-    f800 = 0.7157308252838186 * f798;
-    f801 = 1.4141070746927915 * f275;
-    y[31] = f799 + f800;
-    y[32] = f801 - f800;
+    f127 = f125 - f124;
+    f128 = f65 - f108;
+    f129 = f65 + f108;
+    f130 = f67 - f114;
+    f131 = f67 + f114;
+    f132 = f69 - f120;
+    f133 = f69 + f120;
+    f134 = f71 - f126;
+    f135 = f71 + f126;
+    f136 = f70 - f127;
+    f137 = f70 + f127;
+    f138 = f68 - f121;
+    f139 = f68 + f121;
+    f140 = f66 - f115;
+    f141 = f66 + f115;
+    f142 = f64 - f109;
+    f143 = f64 + f109;
+    f144 = f0 + f30;
+    f145 = MUL_C(COEF_CONST(1.0478631305325901), f0);
+    f146 = MUL_F(FRAC_CONST(-0.9987954562051724), f144);
+    f147 = MUL_F(FRAC_CONST(-0.9497277818777548), f30);
+    f148 = f145 + f146;
+    f149 = f147 - f146;
+    f150 = f4 + f26;
+    f151 = MUL_F(FRAC_CONST(1.2130114330978077), f4);
+    f152 = MUL_F(FRAC_CONST(-0.9700312531945440), f150);
+    f153 = MUL_F(FRAC_CONST(-0.7270510732912803), f26);
+    f154 = f151 + f152;
+    f155 = f153 - f152;
+    f156 = f8 + f22;
+    f157 = MUL_C(COEF_CONST(1.3315443865537255), f8);
+    f158 = MUL_F(FRAC_CONST(-0.9039892931234433), f156);
+    f159 = MUL_F(FRAC_CONST(-0.4764341996931612), f22);
+    f160 = f157 + f158;
+    f161 = f159 - f158;
+    f162 = f12 + f18;
+    f163 = MUL_C(COEF_CONST(1.3989068359730781), f12);
+    f164 = MUL_F(FRAC_CONST(-0.8032075314806453), f162);
+    f165 = MUL_F(FRAC_CONST(-0.2075082269882124), f18);
+    f166 = f163 + f164;
+    f167 = f165 - f164;
+    f168 = f16 + f14;
+    f169 = MUL_C(COEF_CONST(1.4125100802019777), f16);
+    f170 = MUL_F(FRAC_CONST(-0.6715589548470187), f168);
+    f171 = MUL_F(FRAC_CONST(0.0693921705079402), f14);
+    f172 = f169 + f170;
+    f173 = f171 - f170;
+    f174 = f20 + f10;
+    f175 = MUL_C(COEF_CONST(1.3718313541934939), f20);
+    f176 = MUL_F(FRAC_CONST(-0.5141027441932219), f174);
+    f177 = MUL_F(FRAC_CONST(0.3436258658070501), f10);
+    f178 = f175 + f176;
+    f179 = f177 - f176;
+    f180 = f24 + f6;
+    f181 = MUL_C(COEF_CONST(1.2784339185752409), f24);
+    f182 = MUL_F(FRAC_CONST(-0.3368898533922200), f180);
+    f183 = MUL_F(FRAC_CONST(0.6046542117908008), f6);
+    f184 = f181 + f182;
+    f185 = f183 - f182;
+    f186 = f28 + f2;
+    f187 = MUL_C(COEF_CONST(1.1359069844201433), f28);
+    f188 = MUL_F(FRAC_CONST(-0.1467304744553624), f186);
+    f189 = MUL_F(FRAC_CONST(0.8424460355094185), f2);
+    f190 = f187 + f188;
+    f191 = f189 - f188;
+    f192 = f149 - f173;
+    f193 = f149 + f173;
+    f194 = f148 - f172;
+    f195 = f148 + f172;
+    f196 = f155 - f179;
+    f197 = f155 + f179;
+    f198 = f154 - f178;
+    f199 = f154 + f178;
+    f200 = f161 - f185;
+    f201 = f161 + f185;
+    f202 = f160 - f184;
+    f203 = f160 + f184;
+    f204 = f167 - f191;
+    f205 = f167 + f191;
+    f206 = f166 - f190;
+    f207 = f166 + f190;
+    f208 = f192 + f194;
+    f209 = MUL_C(COEF_CONST(1.1758756024193588), f192);
+    f210 = MUL_F(FRAC_CONST(-0.9807852804032304), f208);
+    f211 = MUL_F(FRAC_CONST(-0.7856949583871021), f194);
+    f212 = f209 + f210;
+    f213 = f211 - f210;
+    f214 = f196 + f198;
+    f215 = MUL_C(COEF_CONST(1.3870398453221475), f196);
+    f216 = MUL_F(FRAC_CONST(-0.5555702330196022), f214);
+    f217 = MUL_F(FRAC_CONST(0.2758993792829431), f198);
+    f218 = f215 + f216;
+    f219 = f217 - f216;
+    f220 = f200 + f202;
+    f221 = MUL_F(FRAC_CONST(0.7856949583871022), f200);
+    f222 = MUL_F(FRAC_CONST(0.1950903220161283), f220);
+    f223 = MUL_C(COEF_CONST(1.1758756024193586), f202);
+    f224 = f221 + f222;
+    f225 = f223 - f222;
+    f226 = f204 + f206;
+    f227 = MUL_F(FRAC_CONST(-0.2758993792829430), f204);
+    f228 = MUL_F(FRAC_CONST(0.8314696123025452), f226);
+    f229 = MUL_C(COEF_CONST(1.3870398453221475), f206);
+    f230 = f227 + f228;
+    f231 = f229 - f228;
+    f232 = f193 - f201;
+    f233 = f193 + f201;
+    f234 = f195 - f203;
+    f235 = f195 + f203;
+    f236 = f197 - f205;
+    f237 = f197 + f205;
+    f238 = f199 - f207;
+    f239 = f199 + f207;
+    f240 = f213 - f225;
+    f241 = f213 + f225;
+    f242 = f212 - f224;
+    f243 = f212 + f224;
+    f244 = f219 - f231;
+    f245 = f219 + f231;
+    f246 = f218 - f230;
+    f247 = f218 + f230;
+    f248 = f232 + f234;
+    f249 = MUL_C(COEF_CONST(1.3065629648763766), f232);
+    f250 = MUL_F(FRAC_CONST(-0.9238795325112866), f248);
+    f251 = MUL_F(FRAC_CONST(-0.5411961001461967), f234);
+    f252 = f249 + f250;
+    f253 = f251 - f250;
+    f254 = f236 + f238;
+    f255 = MUL_F(FRAC_CONST(0.5411961001461969), f236);
+    f256 = MUL_F(FRAC_CONST(0.3826834323650898), f254);
+    f257 = MUL_C(COEF_CONST(1.3065629648763766), f238);
+    f258 = f255 + f256;
+    f259 = f257 - f256;
+    f260 = f240 + f242;
+    f261 = MUL_C(COEF_CONST(1.3065629648763766), f240);
+    f262 = MUL_F(FRAC_CONST(-0.9238795325112866), f260);
+    f263 = MUL_F(FRAC_CONST(-0.5411961001461967), f242);
+    f264 = f261 + f262;
+    f265 = f263 - f262;
+    f266 = f244 + f246;
+    f267 = MUL_F(FRAC_CONST(0.5411961001461969), f244);
+    f268 = MUL_F(FRAC_CONST(0.3826834323650898), f266);
+    f269 = MUL_C(COEF_CONST(1.3065629648763766), f246);
+    f270 = f267 + f268;
+    f271 = f269 - f268;
+    f272 = f233 - f237;
+    f273 = f233 + f237;
+    f274 = f235 - f239;
+    f275 = f235 + f239;
+    f276 = f253 - f259;
+    f277 = f253 + f259;
+    f278 = f252 - f258;
+    f279 = f252 + f258;
+    f280 = f241 - f245;
+    f281 = f241 + f245;
+    f282 = f243 - f247;
+    f283 = f243 + f247;
+    f284 = f265 - f271;
+    f285 = f265 + f271;
+    f286 = f264 - f270;
+    f287 = f264 + f270;
+    f288 = f272 - f274;
+    f289 = f272 + f274;
+    f290 = MUL_F(FRAC_CONST(0.7071067811865474), f288);
+    f291 = MUL_F(FRAC_CONST(0.7071067811865474), f289);
+    f292 = f276 - f278;
+    f293 = f276 + f278;
+    f294 = MUL_F(FRAC_CONST(0.7071067811865474), f292);
+    f295 = MUL_F(FRAC_CONST(0.7071067811865474), f293);
+    f296 = f280 - f282;
+    f297 = f280 + f282;
+    f298 = MUL_F(FRAC_CONST(0.7071067811865474), f296);
+    f299 = MUL_F(FRAC_CONST(0.7071067811865474), f297);
+    f300 = f284 - f286;
+    f301 = f284 + f286;
+    f302 = MUL_F(FRAC_CONST(0.7071067811865474), f300);
+    f303 = MUL_F(FRAC_CONST(0.7071067811865474), f301);
+    f304 = f129 - f273;
+    f305 = f129 + f273;
+    f306 = f131 - f281;
+    f307 = f131 + f281;
+    f308 = f133 - f285;
+    f309 = f133 + f285;
+    f310 = f135 - f277;
+    f311 = f135 + f277;
+    f312 = f137 - f295;
+    f313 = f137 + f295;
+    f314 = f139 - f303;
+    f315 = f139 + f303;
+    f316 = f141 - f299;
+    f317 = f141 + f299;
+    f318 = f143 - f291;
+    f319 = f143 + f291;
+    f320 = f142 - f290;
+    f321 = f142 + f290;
+    f322 = f140 - f298;
+    f323 = f140 + f298;
+    f324 = f138 - f302;
+    f325 = f138 + f302;
+    f326 = f136 - f294;
+    f327 = f136 + f294;
+    f328 = f134 - f279;
+    f329 = f134 + f279;
+    f330 = f132 - f287;
+    f331 = f132 + f287;
+    f332 = f130 - f283;
+    f333 = f130 + f283;
+    f334 = f128 - f275;
+    f335 = f128 + f275;
+    y[31] = MUL_F(FRAC_CONST(0.5001506360206510), f305);
+    y[30] = MUL_F(FRAC_CONST(0.5013584524464084), f307);
+    y[29] = MUL_F(FRAC_CONST(0.5037887256810443), f309);
+    y[28] = MUL_F(FRAC_CONST(0.5074711720725553), f311);
+    y[27] = MUL_F(FRAC_CONST(0.5124514794082247), f313);
+    y[26] = MUL_F(FRAC_CONST(0.5187927131053328), f315);
+    y[25] = MUL_F(FRAC_CONST(0.5265773151542700), f317);
+    y[24] = MUL_F(FRAC_CONST(0.5359098169079920), f319);
+    y[23] = MUL_F(FRAC_CONST(0.5469204379855088), f321);
+    y[22] = MUL_F(FRAC_CONST(0.5597698129470802), f323);
+    y[21] = MUL_F(FRAC_CONST(0.5746551840326600), f325);
+    y[20] = MUL_F(FRAC_CONST(0.5918185358574165), f327);
+    y[19] = MUL_F(FRAC_CONST(0.6115573478825099), f329);
+    y[18] = MUL_F(FRAC_CONST(0.6342389366884031), f331);
+    y[17] = MUL_F(FRAC_CONST(0.6603198078137061), f333);
+    y[16] = MUL_F(FRAC_CONST(0.6903721282002123), f335);
+    y[15] = MUL_F(FRAC_CONST(0.7251205223771985), f334);
+    y[14] = MUL_F(FRAC_CONST(0.7654941649730891), f332);
+    y[13] = MUL_F(FRAC_CONST(0.8127020908144905), f330);
+    y[12] = MUL_F(FRAC_CONST(0.8683447152233481), f328);
+    y[11] = MUL_F(FRAC_CONST(0.9345835970364075), f326);
+    y[10] = MUL_C(COEF_CONST(1.0144082649970547), f324);
+    y[9] = MUL_C(COEF_CONST(1.1120716205797176), f322);
+    y[8] = MUL_C(COEF_CONST(1.2338327379765710), f320);
+    y[7] = MUL_C(COEF_CONST(1.3892939586328277), f318);
+    y[6] = MUL_C(COEF_CONST(1.5939722833856311), f316);
+    y[5] = MUL_C(COEF_CONST(1.8746759800084078), f314);
+    y[4] = MUL_C(COEF_CONST(2.2820500680051619), f312);
+    y[3] = MUL_C(COEF_CONST(2.9246284281582162), f310);
+    y[2] = MUL_C(COEF_CONST(4.0846110781292477), f308);
+    y[1] = MUL_C(COEF_CONST(6.7967507116736332), f306);
+    y[0] = MUL_R(REAL_CONST(20.3738781672314530), f304);
 }
 
 #endif
 
 #endif
-
--- a/libfaad2/sbr_dct.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_dct.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_dct.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_dct.h,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,11 +34,14 @@
 extern "C" {
 #endif
 
+void dct4_kernel(real_t * in_real, real_t * in_imag, real_t * out_real, real_t * out_imag);
+
 void DCT3_32_unscaled(real_t *y, real_t *x);
-void DCT2_64_unscaled(real_t *y, real_t *x);
-void DST2_64_unscaled(real_t *y, real_t *x);
-void DCT4_64(real_t *y, real_t *x);
-void DCT4_64_kernel(real_t *y, real_t *t2);
+void DCT4_32(real_t *y, real_t *x);
+void DST4_32(real_t *y, real_t *x);
+void DCT2_32_unscaled(real_t *y, real_t *x);
+void DCT4_16(real_t *y, real_t *x);
+void DCT2_16_unscaled(real_t *y, real_t *x);
 
 
 #ifdef __cplusplus
--- a/libfaad2/sbr_dec.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_dec.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_dec.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_dec.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -43,11 +43,14 @@
 #include "sbr_hfgen.h"
 #include "sbr_hfadj.h"
 
+
 /* static function declarations */
 static uint8_t sbr_save_prev_data(sbr_info *sbr, uint8_t ch);
+static void sbr_save_matrix(sbr_info *sbr, uint8_t ch);
+
 
 sbr_info *sbrDecodeInit(uint16_t framelength, uint8_t id_aac,
-                        uint32_t sample_rate
+                        uint32_t sample_rate, uint8_t downSampledSBR
 #ifdef DRM
 						, uint8_t IsDRM
 #endif
@@ -73,6 +76,7 @@
     sbr->prevEnvIsShort[0] = -1;
     sbr->prevEnvIsShort[1] = -1;
     sbr->header_count = 0;
+    sbr->Reset = 1;
 
 #ifdef DRM
     sbr->Is_DRM_SBR = IsDRM;
@@ -81,6 +85,11 @@
     sbr->tHFGen = T_HFGEN;
     sbr->tHFAdj = T_HFADJ;
 
+    sbr->bsco = 0;
+    sbr->bsco_prev = 0;
+    sbr->M_prev = 0;
+    sbr->frame_len = framelength;
+
     /* force sbr reset */
     sbr->bs_start_freq_prev = -1;
 
@@ -93,6 +102,44 @@
         sbr->numTimeSlots = NO_TIME_SLOTS;
     }
 
+    sbr->GQ_ringbuf_index[0] = 0;
+    sbr->GQ_ringbuf_index[1] = 0;
+
+    if (id_aac == ID_CPE)
+    {
+        /* stereo */
+        uint8_t j;
+        sbr->qmfa[0] = qmfa_init(32);
+        sbr->qmfa[1] = qmfa_init(32);
+        sbr->qmfs[0] = qmfs_init((downSampledSBR)?32:64);
+        sbr->qmfs[1] = qmfs_init((downSampledSBR)?32:64);
+
+        for (j = 0; j < 5; j++)
+        {
+            sbr->G_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
+            sbr->G_temp_prev[1][j] = faad_malloc(64*sizeof(real_t));
+            sbr->Q_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
+            sbr->Q_temp_prev[1][j] = faad_malloc(64*sizeof(real_t));
+        }
+
+        memset(sbr->Xsbr[0], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
+        memset(sbr->Xsbr[1], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
+    } else {
+        /* mono */
+        uint8_t j;
+        sbr->qmfa[0] = qmfa_init(32);
+        sbr->qmfs[0] = qmfs_init((downSampledSBR)?32:64);
+        sbr->qmfs[1] = NULL;
+
+        for (j = 0; j < 5; j++)
+        {
+            sbr->G_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
+            sbr->Q_temp_prev[0][j] = faad_malloc(64*sizeof(real_t));
+        }
+
+        memset(sbr->Xsbr[0], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
+    }
+
     return sbr;
 }
 
@@ -118,6 +165,16 @@
             if (sbr->Q_temp_prev[1][j]) faad_free(sbr->Q_temp_prev[1][j]);
         }
 
+#ifdef PS_DEC
+        if (sbr->ps != NULL) 
+            ps_free(sbr->ps);
+#endif
+
+#ifdef DRM_PS
+        if (sbr->drm_ps != NULL)
+            drm_ps_free(sbr->drm_ps);
+#endif
+
         faad_free(sbr);
     }
 }
@@ -128,6 +185,8 @@
 
     /* save data for next frame */
     sbr->kx_prev = sbr->kx;
+    sbr->M_prev = sbr->M;
+    sbr->bsco_prev = sbr->bsco;
 
     sbr->L_E_prev[ch] = sbr->L_E[ch];
 
@@ -136,13 +195,13 @@
         return 19;
 
     sbr->f_prev[ch] = sbr->f[ch][sbr->L_E[ch] - 1];
-    for (i = 0; i < 64; i++)
+    for (i = 0; i < MAX_M; i++)
     {
         sbr->E_prev[ch][i] = sbr->E[ch][i][sbr->L_E[ch] - 1];
         sbr->Q_prev[ch][i] = sbr->Q[ch][i][sbr->L_Q[ch] - 1];
     }
 
-    for (i = 0; i < 64; i++)
+    for (i = 0; i < MAX_M; i++)
     {
         sbr->bs_add_harmonic_prev[ch][i] = sbr->bs_add_harmonic[ch][i];
     }
@@ -156,43 +215,66 @@
     return 0;
 }
 
+static void sbr_save_matrix(sbr_info *sbr, uint8_t ch)
+{
+    uint8_t i;
+
+    for (i = 0; i < sbr->tHFGen; i++)
+    {
+        memmove(sbr->Xsbr[ch][i], sbr->Xsbr[ch][i+sbr->numTimeSlotsRate], 64 * sizeof(qmf_t));
+    }
+    for (i = sbr->tHFGen; i < MAX_NTSRHFG; i++)
+    {
+        memset(sbr->Xsbr[ch][i], 0, 64 * sizeof(qmf_t));
+    }
+}
+
 static void sbr_process_channel(sbr_info *sbr, real_t *channel_buf, qmf_t X[MAX_NTSR][64],
-                                uint8_t ch, uint8_t dont_process)
+                                uint8_t ch, uint8_t dont_process,
+                                const uint8_t downSampledSBR)
 {
-    int16_t i, k, l;
+    int16_t k, l;
 
 #ifdef SBR_LOW_POWER
     ALIGN real_t deg[64];
 #endif
 
-    if (sbr->frame == 0)
+#ifdef DRM
+    if (sbr->Is_DRM_SBR)
     {
-        uint8_t j;
-        sbr->qmfa[ch] = qmfa_init(32);
-        sbr->qmfs[ch] = qmfs_init(64);
+        sbr->bsco = max((int32_t)sbr->maxAACLine*32/(int32_t)sbr->frame_len - (int32_t)sbr->kx, 0);
+    } else {
+#endif
+        sbr->bsco = 0;
+#ifdef DRM
+    }
+#endif
 
-        for (j = 0; j < 5; j++)
+
+//#define PRE_QMF_PRINT
+#ifdef PRE_QMF_PRINT
+    {
+        int i;
+        for (i = 0; i < 1024; i++)
         {
-            sbr->G_temp_prev[ch][j] = faad_malloc(64*sizeof(real_t));
-            sbr->Q_temp_prev[ch][j] = faad_malloc(64*sizeof(real_t));
+            printf("%d\n", channel_buf[i]);
         }
+    }
+#endif
 
-        memset(sbr->Xsbr[ch], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*64 * sizeof(qmf_t));
-        memset(sbr->Xcodec[ch], 0, (sbr->numTimeSlotsRate+sbr->tHFGen)*32 * sizeof(qmf_t));
-    }
 
     /* subband analysis */
     if (dont_process)
-        sbr_qmf_analysis_32(sbr, sbr->qmfa[ch], channel_buf, sbr->Xcodec[ch], sbr->tHFGen, 32);
+        sbr_qmf_analysis_32(sbr, sbr->qmfa[ch], channel_buf, sbr->Xsbr[ch], sbr->tHFGen, 32);
     else
-        sbr_qmf_analysis_32(sbr, sbr->qmfa[ch], channel_buf, sbr->Xcodec[ch], sbr->tHFGen, sbr->kx);
+        sbr_qmf_analysis_32(sbr, sbr->qmfa[ch], channel_buf, sbr->Xsbr[ch], sbr->tHFGen, sbr->kx);
 
     if (!dont_process)
     {
 #if 1
         /* insert high frequencies here */
         /* hf generation using patching */
-        hf_generation(sbr, sbr->Xcodec[ch], sbr->Xsbr[ch]
+        hf_generation(sbr, sbr->Xsbr[ch], sbr->Xsbr[ch]
 #ifdef SBR_LOW_POWER
             ,deg
 #endif
@@ -225,9 +307,9 @@
         {
             for (k = 0; k < 32; k++)
             {
-                QMF_RE(X[l][k]) = QMF_RE(sbr->Xcodec[ch][l + sbr->tHFAdj][k]);
+                QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
 #ifndef SBR_LOW_POWER
-                QMF_IM(X[l][k]) = QMF_IM(sbr->Xcodec[ch][l + sbr->tHFAdj][k]);
+                QMF_IM(X[l][k]) = QMF_IM(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
 #endif
             }
             for (k = 32; k < 64; k++)
@@ -241,42 +323,57 @@
     } else {
         for (l = 0; l < sbr->numTimeSlotsRate; l++)
         {
-            uint8_t xover_band;
+            uint8_t kx_band, M_band, bsco_band;
 
             if (l < sbr->t_E[ch][0])
-                xover_band = sbr->kx_prev;
-            else
-                xover_band = sbr->kx;
-
-            for (k = 0; k < xover_band; k++)
             {
-                QMF_RE(X[l][k]) = QMF_RE(sbr->Xcodec[ch][l + sbr->tHFAdj][k]);
+                kx_band = sbr->kx_prev;
+                M_band = sbr->M_prev;
+                bsco_band = sbr->bsco_prev;
+            } else {
+                kx_band = sbr->kx;
+                M_band = sbr->M;
+                bsco_band = sbr->bsco;
+            }
+
 #ifndef SBR_LOW_POWER
-                QMF_IM(X[l][k]) = QMF_IM(sbr->Xcodec[ch][l + sbr->tHFAdj][k]);
-#endif
+            for (k = 0; k < kx_band + bsco_band; k++)
+            {
+                QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
+                QMF_IM(X[l][k]) = QMF_IM(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
             }
-            for (k = xover_band; k < 64; k++)
+            for (k = kx_band + bsco_band; k < kx_band + M_band; k++)
             {
                 QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
-#ifndef SBR_LOW_POWER
                 QMF_IM(X[l][k]) = QMF_IM(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
-#endif
+            }
+            for (k = max(kx_band + bsco_band, kx_band + M_band); k < 64; k++)
+            {
+                QMF_RE(X[l][k]) = 0;
+                QMF_IM(X[l][k]) = 0;
+            }
+#else
+            for (k = 0; k < kx_band + bsco_band; k++)
+            {
+                QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
             }
-#ifdef SBR_LOW_POWER
-            QMF_RE(X[l][xover_band - 1]) += QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][xover_band - 1]);
+            for (k = kx_band + bsco_band; k < min(kx_band + M_band, 63); k++)
+            {
+                QMF_RE(X[l][k]) = QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][k]);
+            }
+            for (k = max(kx_band + bsco_band, kx_band + M_band); k < 64; k++)
+            {
+                QMF_RE(X[l][k]) = 0;
+            }
+            QMF_RE(X[l][kx_band - 1 + bsco_band]) +=
+                QMF_RE(sbr->Xsbr[ch][l + sbr->tHFAdj][kx_band - 1 + bsco_band]);
 #endif
         }
     }
-
-    for (i = 0; i < sbr->tHFGen; i++)
-    {
-        memmove(sbr->Xcodec[ch][i], sbr->Xcodec[ch][i+sbr->numTimeSlotsRate], 32 * sizeof(qmf_t));
-        memmove(sbr->Xsbr[ch][i], sbr->Xsbr[ch][i+sbr->numTimeSlotsRate], 64 * sizeof(qmf_t));
-    }
 }
 
 uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan,
-                             const uint8_t just_seeked, const uint8_t upsample_only)
+                             const uint8_t just_seeked, const uint8_t downSampledSBR)
 {
     uint8_t dont_process = 0;
     uint8_t ret = 0;
@@ -306,21 +403,23 @@
         sbr->just_seeked = 0;
     }
 
-    sbr_process_channel(sbr, left_chan, X, 0, dont_process);
+    sbr_process_channel(sbr, left_chan, X, 0, dont_process, downSampledSBR);
     /* subband synthesis */
-#ifndef USE_SSE
-    sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, left_chan);
-#else
-    sbr->qmfs[ch]->qmf_func(sbr, sbr->qmfs[0], X, left_chan);
-#endif
+    if (downSampledSBR)
+    {
+        sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X, left_chan);
+    } else {
+        sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, left_chan);
+    }
 
-    sbr_process_channel(sbr, right_chan, X, 1, dont_process);
+    sbr_process_channel(sbr, right_chan, X, 1, dont_process, downSampledSBR);
     /* subband synthesis */
-#ifndef USE_SSE
-    sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X, right_chan);
-#else
-    sbr->qmfs[ch]->qmf_func(sbr, sbr->qmfs[1], X, right_chan);
-#endif
+    if (downSampledSBR)
+    {
+        sbr_qmf_synthesis_32(sbr, sbr->qmfs[1], X, right_chan);
+    } else {
+        sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X, right_chan);
+    }
 
     if (sbr->bs_header_flag)
         sbr->just_seeked = 0;
@@ -333,13 +432,31 @@
         if (ret) return ret;
     }
 
+    sbr_save_matrix(sbr, 0);
+    sbr_save_matrix(sbr, 1);
+
     sbr->frame++;
 
+//#define POST_QMF_PRINT
+#ifdef POST_QMF_PRINT
+    {
+        int i;
+        for (i = 0; i < 2048; i++)
+        {
+            printf("%d\n", left_chan[i]);
+        }
+        for (i = 0; i < 2048; i++)
+        {
+            printf("%d\n", right_chan[i]);
+        }
+    }
+#endif
+
     return 0;
 }
 
 uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel,
-                             const uint8_t just_seeked, const uint8_t upsample_only)
+                             const uint8_t just_seeked, const uint8_t downSampledSBR)
 {
     uint8_t dont_process = 0;
     uint8_t ret = 0;
@@ -369,13 +486,14 @@
         sbr->just_seeked = 0;
     }
 
-    sbr_process_channel(sbr, channel, X, 0, dont_process);
+    sbr_process_channel(sbr, channel, X, 0, dont_process, downSampledSBR);
     /* subband synthesis */
-#ifndef USE_SSE
-    sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, channel);
-#else
-    sbr->qmfs[ch]->qmf_func(sbr, sbr->qmfs[0], X, channel);
-#endif
+    if (downSampledSBR)
+    {
+        sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X, channel);
+    } else {
+        sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X, channel);
+    }
 
     if (sbr->bs_header_flag)
         sbr->just_seeked = 0;
@@ -386,39 +504,33 @@
         if (ret) return ret;
     }
 
+    sbr_save_matrix(sbr, 0);
+
     sbr->frame++;
 
+//#define POST_QMF_PRINT
+#ifdef POST_QMF_PRINT
+    {
+        int i;
+        for (i = 0; i < 2048; i++)
+        {
+            printf("%d\n", channel[i]);
+        }
+    }
+#endif
+
     return 0;
 }
 
-static void ps_dummy_function(qmf_t X_mono[MAX_NTSR][64],
-                              qmf_t X_left[MAX_NTSR][64], qmf_t X_right[MAX_NTSR][64])
-{
-    uint8_t i, j;
-
-    for (i = 0; i < MAX_NTSR; i++)
-    {
-        for (j = 0; j < 64; j++)
-        {
-            QMF_RE(X_left[i][j]) = QMF_RE(X_mono[i][j]);
-            QMF_RE(X_right[i][j]) = QMF_RE(X_mono[i][j]);
-#ifndef SBR_LOW_POWER
-            QMF_IM(X_left[i][j]) = QMF_IM(X_mono[i][j]);
-            QMF_IM(X_right[i][j]) = QMF_IM(X_mono[i][j]);
-#endif
-        }
-    }
-}
-
 #if (defined(PS_DEC) || defined(DRM_PS))
 uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel,
-                               const uint8_t just_seeked, const uint8_t upsample_only)
+                               const uint8_t just_seeked, const uint8_t downSampledSBR)
 {
+    uint8_t l, k;
     uint8_t dont_process = 0;
     uint8_t ret = 0;
-    ALIGN qmf_t X_mono[MAX_NTSR][64];
-    ALIGN qmf_t X_left[MAX_NTSR][64];
-    ALIGN qmf_t X_right[MAX_NTSR][64];
+    ALIGN qmf_t X_left[38][64] = {{0}};
+    ALIGN qmf_t X_right[38][64] = {{0}}; /* must set this to 0 */
 
     if (sbr == NULL)
         return 20;
@@ -444,24 +556,46 @@
         sbr->just_seeked = 0;
     }
 
-    if (sbr->frame == 0)
+    if (sbr->qmfs[1] == NULL)
     {
-        sbr->qmfs[1] = qmfs_init(64);
+        sbr->qmfs[1] = qmfs_init((downSampledSBR)?32:64);
     }
 
-    sbr_process_channel(sbr, left_channel, X_mono, 0, dont_process);
+    sbr_process_channel(sbr, left_channel, X_left, 0, dont_process, downSampledSBR);
+
+    /* copy some extra data for PS */
+    for (l = 32; l < 38; l++)
+    {
+        for (k = 0; k < 5; k++)
+        {
+            QMF_RE(X_left[l][k]) = QMF_RE(sbr->Xsbr[0][sbr->tHFAdj+l][k]);
+            QMF_IM(X_left[l][k]) = QMF_IM(sbr->Xsbr[0][sbr->tHFAdj+l][k]);
+        }
+    }
 
     /* perform parametric stereo */
-    ps_dummy_function(X_mono, X_left, X_right);
+#ifdef DRM_PS
+    if (sbr->Is_DRM_SBR)
+    {
+        drm_ps_decode(sbr->drm_ps, sbr->sample_rate, X_left, X_right);
+    } else {
+#endif
+#ifdef PS_DEC
+        ps_decode(sbr->ps, X_left, X_right);
+#endif
+#ifdef DRM_PS
+    }
+#endif
 
     /* subband synthesis */
-#ifndef USE_SSE
-    sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X_left, left_channel);
-    sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X_right, right_channel);
-#else
-    sbr->qmfs[ch]->qmf_func(sbr, sbr->qmfs[0], X_left, left_channel);
-    sbr->qmfs[ch]->qmf_func(sbr, sbr->qmfs[1], X_right, right_channel);
-#endif
+    if (downSampledSBR)
+    {
+        sbr_qmf_synthesis_32(sbr, sbr->qmfs[0], X_left, left_channel);
+        sbr_qmf_synthesis_32(sbr, sbr->qmfs[1], X_right, right_channel);
+    } else {
+        sbr_qmf_synthesis_64(sbr, sbr->qmfs[0], X_left, left_channel);
+        sbr_qmf_synthesis_64(sbr, sbr->qmfs[1], X_right, right_channel);
+    }
 
     if (sbr->bs_header_flag)
         sbr->just_seeked = 0;
@@ -472,6 +606,8 @@
         if (ret) return ret;
     }
 
+    sbr_save_matrix(sbr, 0);
+
     sbr->frame++;
 
     return 0;
--- a/libfaad2/sbr_dec.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_dec.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_dec.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_dec.h,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -45,24 +45,27 @@
 #define MAX_NTSRHFG 40
 #define MAX_NTSR    32 /* max number_time_slots * rate, ok for DRM and not DRM mode */
 
+/* MAX_M: maximum value for M */
+#define MAX_M       49
+/* MAX_L_E: maximum value for L_E */
+#define MAX_L_E      5
 
 typedef struct {
     real_t *x;
+    int16_t x_index;
     uint8_t channels;
 } qmfa_info;
 
 typedef struct {
-    real_t *v[2];
-    uint8_t v_index;
+    real_t *v;
+    int16_t v_index;
     uint8_t channels;
-#ifdef USE_SSE
-    void (*qmf_func)(void *a, void *b, void *c, void *d);
-#endif
 } qmfs_info;
 
 typedef struct
 {
     uint32_t sample_rate;
+    uint32_t maxAACLine;
 
     uint8_t rate;
     uint8_t just_seeked;
@@ -100,27 +103,33 @@
     uint8_t L_E_prev[2];
     uint8_t L_Q[2];
 
-    uint8_t t_E[2][6];
+    uint8_t t_E[2][MAX_L_E+1];
     uint8_t t_Q[2][3];
-    uint8_t f[2][6];
+    uint8_t f[2][MAX_L_E+1];
     uint8_t f_prev[2];
 
     real_t *G_temp_prev[2][5];
     real_t *Q_temp_prev[2][5];
+    int8_t GQ_ringbuf_index[2];
 
-    int16_t E[2][64][5];
+    int16_t E[2][64][MAX_L_E];
     int16_t E_prev[2][64];
-    real_t E_orig[2][64][5];
-    real_t E_curr[2][64][5];
+#ifndef FIXED_POINT
+    real_t E_orig[2][64][MAX_L_E];
+#endif
+    real_t E_curr[2][64][MAX_L_E];
     int32_t Q[2][64][2];
+#ifndef FIXED_POINT
+    real_t Q_div[2][64][2];
+    real_t Q_div2[2][64][2];
+#endif
     int32_t Q_prev[2][64];
-    real_t Q_orig[2][64][2];
 
     int8_t l_A[2];
     int8_t l_A_prev[2];
 
-    uint8_t bs_invf_mode[2][5];
-    uint8_t bs_invf_mode_prev[2][5];
+    uint8_t bs_invf_mode[2][MAX_L_E];
+    uint8_t bs_invf_mode_prev[2][MAX_L_E];
     real_t bwArray[2][64];
     real_t bwArray_prev[2][64];
 
@@ -144,6 +153,10 @@
     int8_t prevEnvIsShort[2];
 
     int8_t kx_prev;
+    uint8_t bsco;
+    uint8_t bsco_prev;
+    uint8_t M_prev;
+    uint16_t frame_len;
 
     uint8_t Reset;
     uint32_t frame;
@@ -154,24 +167,21 @@
     qmfs_info *qmfs[2];
 
     qmf_t Xsbr[2][MAX_NTSRHFG][64];
-    qmf_t Xcodec[2][MAX_NTSRHFG][32];
 
 #ifdef DRM
-	int8_t lcstereo_flag;
-	uint8_t bs_dataextra;
     uint8_t Is_DRM_SBR;
 #ifdef DRM_PS
-    drm_ps_info drm_ps;
+    drm_ps_info *drm_ps;
 #endif
 #endif
 
-	uint8_t numTimeSlotsRate;
-	uint8_t numTimeSlots;
-	uint8_t tHFGen;
-	uint8_t tHFAdj;
+    uint8_t numTimeSlotsRate;
+    uint8_t numTimeSlots;
+    uint8_t tHFGen;
+    uint8_t tHFAdj;
 
 #ifdef PS_DEC
-    ps_info ps;
+    ps_info *ps;
 #endif
 #if (defined(PS_DEC) || defined(DRM_PS))
     uint8_t ps_used;
@@ -217,20 +227,20 @@
 } sbr_info;
 
 sbr_info *sbrDecodeInit(uint16_t framelength, uint8_t id_aac,
-                        uint32_t sample_rate
+                        uint32_t sample_rate, uint8_t downSampledSBR
 #ifdef DRM
-						, uint8_t IsDRM
+                        , uint8_t IsDRM
 #endif
-						);
+                        );
 void sbrDecodeEnd(sbr_info *sbr);
 
 uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan,
-                             const uint8_t just_seeked, const uint8_t upsample_only);
+                             const uint8_t just_seeked, const uint8_t downSampledSBR);
 uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel,
-                             const uint8_t just_seeked, const uint8_t upsample_only);
+                             const uint8_t just_seeked, const uint8_t downSampledSBR);
 #if (defined(PS_DEC) || defined(DRM_PS))
 uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel,
-                               const uint8_t just_seeked, const uint8_t upsample_only);
+                               const uint8_t just_seeked, const uint8_t downSampledSBR);
 #endif
 
 
--- a/libfaad2/sbr_e_nf.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_e_nf.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_e_nf.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_e_nf.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -37,110 +37,6 @@
 #include "sbr_syntax.h"
 #include "sbr_e_nf.h"
 
-ALIGN static const real_t pow2deq[] = {
-    REAL_CONST(2.9103830456733704E-011), REAL_CONST(5.8207660913467407E-011),
-    REAL_CONST(1.1641532182693481E-010), REAL_CONST(2.3283064365386963E-010),
-    REAL_CONST(4.6566128730773926E-010), REAL_CONST(9.3132257461547852E-010),
-    REAL_CONST(1.862645149230957E-009), REAL_CONST(3.7252902984619141E-009),
-    REAL_CONST(7.4505805969238281E-009), REAL_CONST(1.4901161193847656E-008),
-    REAL_CONST(2.9802322387695313E-008), REAL_CONST(5.9604644775390625E-008),
-    REAL_CONST(1.1920928955078125E-007), REAL_CONST(2.384185791015625E-007),
-    REAL_CONST(4.76837158203125E-007), REAL_CONST(9.5367431640625E-007),
-    REAL_CONST(1.9073486328125E-006), REAL_CONST(3.814697265625E-006),
-    REAL_CONST(7.62939453125E-006), REAL_CONST(1.52587890625E-005),
-    REAL_CONST(3.0517578125E-005), REAL_CONST(6.103515625E-005),
-    REAL_CONST(0.0001220703125), REAL_CONST(0.000244140625),
-    REAL_CONST(0.00048828125), REAL_CONST(0.0009765625),
-    REAL_CONST(0.001953125), REAL_CONST(0.00390625),
-    REAL_CONST(0.0078125), REAL_CONST(0.015625),
-    REAL_CONST(0.03125), REAL_CONST(0.0625),
-    REAL_CONST(0.125), REAL_CONST(0.25),
-    REAL_CONST(0.5), REAL_CONST(1.0),
-    REAL_CONST(2.0), REAL_CONST(4.0),
-    REAL_CONST(8.0), REAL_CONST(16.0),
-    REAL_CONST(32.0), REAL_CONST(64.0),
-    REAL_CONST(128.0), REAL_CONST(256.0),
-    REAL_CONST(512.0), REAL_CONST(1024.0),
-    REAL_CONST(2048.0), REAL_CONST(4096.0),
-    REAL_CONST(8192.0), REAL_CONST(16384.0),
-    REAL_CONST(32768.0), REAL_CONST(65536.0),
-    REAL_CONST(131072.0), REAL_CONST(262144.0),
-    REAL_CONST(524288.0), REAL_CONST(1048576.0),
-    REAL_CONST(2097152.0), REAL_CONST(4194304.0),
-    REAL_CONST(8388608.0), REAL_CONST(16777216.0),
-    REAL_CONST(33554432.0), REAL_CONST(67108864.0),
-    REAL_CONST(134217728.0), REAL_CONST(268435456.0),
-    REAL_CONST(536870912.0), REAL_CONST(1073741824.0),
-    REAL_CONST(2147483648.0), REAL_CONST(4294967296.0),
-    REAL_CONST(8589934592.0), REAL_CONST(17179869184.0),
-    REAL_CONST(34359738368.0), REAL_CONST(68719476736.0),
-    REAL_CONST(137438953472.0), REAL_CONST(274877906944.0),
-    REAL_CONST(549755813888.0), REAL_CONST(1099511627776.0),
-    REAL_CONST(2199023255552.0), REAL_CONST(4398046511104.0),
-    REAL_CONST(8796093022208.0), REAL_CONST(17592186044416.0),
-    REAL_CONST(35184372088832.0), REAL_CONST(70368744177664.0),
-    REAL_CONST(140737488355328.0), REAL_CONST(281474976710656.0),
-    REAL_CONST(562949953421312.0), REAL_CONST(1125899906842624.0),
-    REAL_CONST(2251799813685248.0), REAL_CONST(4503599627370496.0),
-    REAL_CONST(9007199254740992.0), REAL_CONST(18014398509481984.0),
-    REAL_CONST(36028797018963968.0), REAL_CONST(72057594037927936.0),
-    REAL_CONST(144115188075855870.0), REAL_CONST(288230376151711740.0),
-    REAL_CONST(576460752303423490.0), REAL_CONST(1152921504606847000.0),
-    REAL_CONST(2305843009213694000.0), REAL_CONST(4611686018427387900.0),
-    REAL_CONST(9223372036854775800.0), REAL_CONST(1.8446744073709552E+019),
-    REAL_CONST(3.6893488147419103E+019), REAL_CONST(7.3786976294838206E+019),
-    REAL_CONST(1.4757395258967641E+020), REAL_CONST(2.9514790517935283E+020),
-    REAL_CONST(5.9029581035870565E+020), REAL_CONST(1.1805916207174113E+021),
-    REAL_CONST(2.3611832414348226E+021), REAL_CONST(4.7223664828696452E+021),
-    REAL_CONST(9.4447329657392904E+021), REAL_CONST(1.8889465931478581E+022),
-    REAL_CONST(3.7778931862957162E+022), REAL_CONST(7.5557863725914323E+022),
-    REAL_CONST(1.5111572745182865E+023), REAL_CONST(3.0223145490365729E+023),
-    REAL_CONST(6.0446290980731459E+023), REAL_CONST(1.2089258196146292E+024),
-    REAL_CONST(2.4178516392292583E+024), REAL_CONST(4.8357032784585167E+024),
-    REAL_CONST(9.6714065569170334E+024), REAL_CONST(1.9342813113834067E+025),
-    REAL_CONST(3.8685626227668134E+025), REAL_CONST(7.7371252455336267E+025),
-    REAL_CONST(1.5474250491067253E+026), REAL_CONST(3.0948500982134507E+026),
-    REAL_CONST(6.1897001964269014E+026), REAL_CONST(1.2379400392853803E+027),
-    REAL_CONST(2.4758800785707605E+027)
-};
-
-/* 1.0 / (1.0 + pow(2.0, x - 12) */
-ALIGN static const real_t pow2deq_rcp[] = {
-    FRAC_CONST(0.99975591896509641),
-    FRAC_CONST(0.99951195705222062),
-    FRAC_CONST(0.99902439024390244),
-    FRAC_CONST(0.99805068226120852),
-    FRAC_CONST(0.99610894941634243),
-    FRAC_CONST(0.99224806201550386),
-    FRAC_CONST(0.98461538461538467),
-    FRAC_CONST(0.96969696969696972),
-    FRAC_CONST(0.94117647058823528),
-    FRAC_CONST(0.88888888888888884),
-    FRAC_CONST(0.80000000000000004),
-    FRAC_CONST(0.66666666666666663),
-    FRAC_CONST(0.5),
-    FRAC_CONST(0.33333333333333331),
-    FRAC_CONST(0.20000000000000001),
-    FRAC_CONST(0.1111111111111111),
-    FRAC_CONST(0.058823529411764705),
-    FRAC_CONST(0.030303030303030304),
-    FRAC_CONST(0.015384615384615385),
-    FRAC_CONST(0.0077519379844961239),
-    FRAC_CONST(0.0038910505836575876),
-    FRAC_CONST(0.0019493177387914229),
-    FRAC_CONST(0.00097560975609756097),
-    FRAC_CONST(0.0004880429477794046),
-    FRAC_CONST(0.00024408103490358799),
-    FRAC_CONST(0.00012205541315757354),
-    FRAC_CONST(6.1031431187061336E-005),
-    FRAC_CONST(3.0516646830846227E-005),
-    FRAC_CONST(1.5258556235409006E-005),
-    FRAC_CONST(7.6293363240331724E-006),
-    FRAC_CONST(3.8146827137652828E-006),
-    FRAC_CONST(1.9073449948406318E-006),
-    FRAC_CONST(9.5367340691241559E-007)
-};
-
 void extract_envelope_data(sbr_info *sbr, uint8_t ch)
 {
     uint8_t l, k;
@@ -152,6 +48,8 @@
             for (k = 1; k < sbr->n[sbr->f[ch][l]]; k++)
             {
                 sbr->E[ch][k][l] = sbr->E[ch][k - 1][l] + sbr->E[ch][k][l];
+                if (sbr->E[ch][k][l] < 0)
+                    sbr->E[ch][k][l] = 0;
             }
 
         } else { /* bs_df_env == 1 */
@@ -243,6 +141,256 @@
     }
 }
 
+#ifndef FIXED_POINT
+
+/* table for Q_div values when no coupling */
+static const real_t Q_div_tab[31] = {
+    FRAC_CONST(0.0153846), FRAC_CONST(0.030303),
+    FRAC_CONST(0.0588235), FRAC_CONST(0.111111),
+    FRAC_CONST(0.2),       FRAC_CONST(0.333333),
+    FRAC_CONST(0.5),       FRAC_CONST(0.666667),
+    FRAC_CONST(0.8),       FRAC_CONST(0.888889),
+    FRAC_CONST(0.941176),  FRAC_CONST(0.969697),
+    FRAC_CONST(0.984615),  FRAC_CONST(0.992248),
+    FRAC_CONST(0.996109),  FRAC_CONST(0.998051),
+    FRAC_CONST(0.999024),  FRAC_CONST(0.999512),
+    FRAC_CONST(0.999756),  FRAC_CONST(0.999878),
+    FRAC_CONST(0.999939),  FRAC_CONST(0.999969),
+    FRAC_CONST(0.999985),  FRAC_CONST(0.999992),
+    FRAC_CONST(0.999996),  FRAC_CONST(0.999998),
+    FRAC_CONST(0.999999),  FRAC_CONST(1),
+    FRAC_CONST(1),         FRAC_CONST(1),
+    FRAC_CONST(1)
+};
+
+static const real_t Q_div_tab_left[31][13] = {
+    { FRAC_CONST(0.969704), FRAC_CONST(0.888985), FRAC_CONST(0.667532), FRAC_CONST(0.336788), FRAC_CONST(0.117241), FRAC_CONST(0.037594), FRAC_CONST(0.0153846), FRAC_CONST(0.00967118), FRAC_CONST(0.00823245), FRAC_CONST(0.00787211), FRAC_CONST(0.00778198), FRAC_CONST(0.00775945), FRAC_CONST(0.00775382) },
+    { FRAC_CONST(0.984619), FRAC_CONST(0.94123), FRAC_CONST(0.800623), FRAC_CONST(0.503876), FRAC_CONST(0.209877), FRAC_CONST(0.0724638), FRAC_CONST(0.030303), FRAC_CONST(0.0191571), FRAC_CONST(0.0163305), FRAC_CONST(0.0156212), FRAC_CONST(0.0154438), FRAC_CONST(0.0153994), FRAC_CONST(0.0153883) },
+    { FRAC_CONST(0.99225), FRAC_CONST(0.969726), FRAC_CONST(0.889273), FRAC_CONST(0.670103), FRAC_CONST(0.346939), FRAC_CONST(0.135135), FRAC_CONST(0.0588235), FRAC_CONST(0.037594), FRAC_CONST(0.0321361), FRAC_CONST(0.0307619), FRAC_CONST(0.0304178), FRAC_CONST(0.0303317), FRAC_CONST(0.0303102) },
+    { FRAC_CONST(0.99611), FRAC_CONST(0.98463), FRAC_CONST(0.941392), FRAC_CONST(0.802469), FRAC_CONST(0.515152), FRAC_CONST(0.238095), FRAC_CONST(0.111111), FRAC_CONST(0.0724638), FRAC_CONST(0.0622711), FRAC_CONST(0.0596878), FRAC_CONST(0.0590397), FRAC_CONST(0.0588776), FRAC_CONST(0.058837) },
+    { FRAC_CONST(0.998051), FRAC_CONST(0.992256), FRAC_CONST(0.969811), FRAC_CONST(0.890411), FRAC_CONST(0.68), FRAC_CONST(0.384615), FRAC_CONST(0.2), FRAC_CONST(0.135135), FRAC_CONST(0.117241), FRAC_CONST(0.112652), FRAC_CONST(0.111497), FRAC_CONST(0.111208), FRAC_CONST(0.111135) },
+    { FRAC_CONST(0.999025), FRAC_CONST(0.996113), FRAC_CONST(0.984674), FRAC_CONST(0.942029), FRAC_CONST(0.809524), FRAC_CONST(0.555556), FRAC_CONST(0.333333), FRAC_CONST(0.238095), FRAC_CONST(0.209877), FRAC_CONST(0.202492), FRAC_CONST(0.200625), FRAC_CONST(0.200156), FRAC_CONST(0.200039) },
+    { FRAC_CONST(0.999512), FRAC_CONST(0.998053), FRAC_CONST(0.992278), FRAC_CONST(0.970149), FRAC_CONST(0.894737), FRAC_CONST(0.714286), FRAC_CONST(0.5), FRAC_CONST(0.384615), FRAC_CONST(0.346939), FRAC_CONST(0.336788), FRAC_CONST(0.3342), FRAC_CONST(0.33355), FRAC_CONST(0.333388) },
+    { FRAC_CONST(0.999756), FRAC_CONST(0.999025), FRAC_CONST(0.996124), FRAC_CONST(0.984848), FRAC_CONST(0.944444), FRAC_CONST(0.833333), FRAC_CONST(0.666667), FRAC_CONST(0.555556), FRAC_CONST(0.515152), FRAC_CONST(0.503876), FRAC_CONST(0.500975), FRAC_CONST(0.500244), FRAC_CONST(0.500061) },
+    { FRAC_CONST(0.999878), FRAC_CONST(0.999512), FRAC_CONST(0.998058), FRAC_CONST(0.992366), FRAC_CONST(0.971429), FRAC_CONST(0.909091), FRAC_CONST(0.8), FRAC_CONST(0.714286), FRAC_CONST(0.68), FRAC_CONST(0.670103), FRAC_CONST(0.667532), FRAC_CONST(0.666884), FRAC_CONST(0.666721) },
+    { FRAC_CONST(0.999939), FRAC_CONST(0.999756), FRAC_CONST(0.999028), FRAC_CONST(0.996169), FRAC_CONST(0.985507), FRAC_CONST(0.952381), FRAC_CONST(0.888889), FRAC_CONST(0.833333), FRAC_CONST(0.809524), FRAC_CONST(0.802469), FRAC_CONST(0.800623), FRAC_CONST(0.800156), FRAC_CONST(0.800039) },
+    { FRAC_CONST(0.999969), FRAC_CONST(0.999878), FRAC_CONST(0.999514), FRAC_CONST(0.998081), FRAC_CONST(0.992701), FRAC_CONST(0.97561), FRAC_CONST(0.941176), FRAC_CONST(0.909091), FRAC_CONST(0.894737), FRAC_CONST(0.890411), FRAC_CONST(0.889273), FRAC_CONST(0.888985), FRAC_CONST(0.888913) },
+    { FRAC_CONST(0.999985), FRAC_CONST(0.999939), FRAC_CONST(0.999757), FRAC_CONST(0.999039), FRAC_CONST(0.996337), FRAC_CONST(0.987654), FRAC_CONST(0.969697), FRAC_CONST(0.952381), FRAC_CONST(0.944444), FRAC_CONST(0.942029), FRAC_CONST(0.941392), FRAC_CONST(0.94123), FRAC_CONST(0.94119) },
+    { FRAC_CONST(0.999992), FRAC_CONST(0.99997), FRAC_CONST(0.999878), FRAC_CONST(0.999519), FRAC_CONST(0.998165), FRAC_CONST(0.993789), FRAC_CONST(0.984615), FRAC_CONST(0.97561), FRAC_CONST(0.971429), FRAC_CONST(0.970149), FRAC_CONST(0.969811), FRAC_CONST(0.969726), FRAC_CONST(0.969704) },
+    { FRAC_CONST(0.999996), FRAC_CONST(0.999985), FRAC_CONST(0.999939), FRAC_CONST(0.99976), FRAC_CONST(0.999082), FRAC_CONST(0.996885), FRAC_CONST(0.992248), FRAC_CONST(0.987654), FRAC_CONST(0.985507), FRAC_CONST(0.984848), FRAC_CONST(0.984674), FRAC_CONST(0.98463), FRAC_CONST(0.984619) },
+    { FRAC_CONST(0.999998), FRAC_CONST(0.999992), FRAC_CONST(0.99997), FRAC_CONST(0.99988), FRAC_CONST(0.999541), FRAC_CONST(0.99844), FRAC_CONST(0.996109), FRAC_CONST(0.993789), FRAC_CONST(0.992701), FRAC_CONST(0.992366), FRAC_CONST(0.992278), FRAC_CONST(0.992256), FRAC_CONST(0.99225) },
+    { FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999985), FRAC_CONST(0.99994), FRAC_CONST(0.99977), FRAC_CONST(0.999219), FRAC_CONST(0.998051), FRAC_CONST(0.996885), FRAC_CONST(0.996337), FRAC_CONST(0.996169), FRAC_CONST(0.996124), FRAC_CONST(0.996113), FRAC_CONST(0.99611) },
+    { FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999992), FRAC_CONST(0.99997), FRAC_CONST(0.999885), FRAC_CONST(0.99961), FRAC_CONST(0.999024), FRAC_CONST(0.99844), FRAC_CONST(0.998165), FRAC_CONST(0.998081), FRAC_CONST(0.998058), FRAC_CONST(0.998053), FRAC_CONST(0.998051) },
+    { FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999985), FRAC_CONST(0.999943), FRAC_CONST(0.999805), FRAC_CONST(0.999512), FRAC_CONST(0.999219), FRAC_CONST(0.999082), FRAC_CONST(0.999039), FRAC_CONST(0.999028), FRAC_CONST(0.999025), FRAC_CONST(0.999025) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999992), FRAC_CONST(0.999971), FRAC_CONST(0.999902), FRAC_CONST(0.999756), FRAC_CONST(0.99961), FRAC_CONST(0.999541), FRAC_CONST(0.999519), FRAC_CONST(0.999514), FRAC_CONST(0.999512), FRAC_CONST(0.999512) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999986), FRAC_CONST(0.999951), FRAC_CONST(0.999878), FRAC_CONST(0.999805), FRAC_CONST(0.99977), FRAC_CONST(0.99976), FRAC_CONST(0.999757), FRAC_CONST(0.999756), FRAC_CONST(0.999756) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999993), FRAC_CONST(0.999976), FRAC_CONST(0.999939), FRAC_CONST(0.999902), FRAC_CONST(0.999885), FRAC_CONST(0.99988), FRAC_CONST(0.999878), FRAC_CONST(0.999878), FRAC_CONST(0.999878) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999996), FRAC_CONST(0.999988), FRAC_CONST(0.999969), FRAC_CONST(0.999951), FRAC_CONST(0.999943), FRAC_CONST(0.99994), FRAC_CONST(0.999939), FRAC_CONST(0.999939), FRAC_CONST(0.999939) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999994), FRAC_CONST(0.999985), FRAC_CONST(0.999976), FRAC_CONST(0.999971), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.999969) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999997), FRAC_CONST(0.999992), FRAC_CONST(0.999988), FRAC_CONST(0.999986), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999998), FRAC_CONST(0.999996), FRAC_CONST(0.999994), FRAC_CONST(0.999993), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999998), FRAC_CONST(0.999997), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) }
+};
+
+static const real_t Q_div_tab_right[31][13] = {
+    { FRAC_CONST(0.00775382), FRAC_CONST(0.00775945), FRAC_CONST(0.00778198), FRAC_CONST(0.00787211), FRAC_CONST(0.00823245), FRAC_CONST(0.00967118), FRAC_CONST(0.0153846), FRAC_CONST(0.037594), FRAC_CONST(0.117241), FRAC_CONST(0.336788), FRAC_CONST(0.667532), FRAC_CONST(0.888985), FRAC_CONST(0.969704) },
+    { FRAC_CONST(0.0153883), FRAC_CONST(0.0153994), FRAC_CONST(0.0154438), FRAC_CONST(0.0156212), FRAC_CONST(0.0163305), FRAC_CONST(0.0191571), FRAC_CONST(0.030303), FRAC_CONST(0.0724638), FRAC_CONST(0.209877), FRAC_CONST(0.503876), FRAC_CONST(0.800623), FRAC_CONST(0.94123), FRAC_CONST(0.984619) },
+    { FRAC_CONST(0.0303102), FRAC_CONST(0.0303317), FRAC_CONST(0.0304178), FRAC_CONST(0.0307619), FRAC_CONST(0.0321361), FRAC_CONST(0.037594), FRAC_CONST(0.0588235), FRAC_CONST(0.135135), FRAC_CONST(0.346939), FRAC_CONST(0.670103), FRAC_CONST(0.889273), FRAC_CONST(0.969726), FRAC_CONST(0.99225) },
+    { FRAC_CONST(0.058837), FRAC_CONST(0.0588776), FRAC_CONST(0.0590397), FRAC_CONST(0.0596878), FRAC_CONST(0.0622711), FRAC_CONST(0.0724638), FRAC_CONST(0.111111), FRAC_CONST(0.238095), FRAC_CONST(0.515152), FRAC_CONST(0.802469), FRAC_CONST(0.941392), FRAC_CONST(0.98463), FRAC_CONST(0.99611) },
+    { FRAC_CONST(0.111135), FRAC_CONST(0.111208), FRAC_CONST(0.111497), FRAC_CONST(0.112652), FRAC_CONST(0.117241), FRAC_CONST(0.135135), FRAC_CONST(0.2), FRAC_CONST(0.384615), FRAC_CONST(0.68), FRAC_CONST(0.890411), FRAC_CONST(0.969811), FRAC_CONST(0.992256), FRAC_CONST(0.998051) },
+    { FRAC_CONST(0.200039), FRAC_CONST(0.200156), FRAC_CONST(0.200625), FRAC_CONST(0.202492), FRAC_CONST(0.209877), FRAC_CONST(0.238095), FRAC_CONST(0.333333), FRAC_CONST(0.555556), FRAC_CONST(0.809524), FRAC_CONST(0.942029), FRAC_CONST(0.984674), FRAC_CONST(0.996113), FRAC_CONST(0.999025) },
+    { FRAC_CONST(0.333388), FRAC_CONST(0.33355), FRAC_CONST(0.3342), FRAC_CONST(0.336788), FRAC_CONST(0.346939), FRAC_CONST(0.384615), FRAC_CONST(0.5), FRAC_CONST(0.714286), FRAC_CONST(0.894737), FRAC_CONST(0.970149), FRAC_CONST(0.992278), FRAC_CONST(0.998053), FRAC_CONST(0.999512) },
+    { FRAC_CONST(0.500061), FRAC_CONST(0.500244), FRAC_CONST(0.500975), FRAC_CONST(0.503876), FRAC_CONST(0.515152), FRAC_CONST(0.555556), FRAC_CONST(0.666667), FRAC_CONST(0.833333), FRAC_CONST(0.944444), FRAC_CONST(0.984848), FRAC_CONST(0.996124), FRAC_CONST(0.999025), FRAC_CONST(0.999756) },
+    { FRAC_CONST(0.666721), FRAC_CONST(0.666884), FRAC_CONST(0.667532), FRAC_CONST(0.670103), FRAC_CONST(0.68), FRAC_CONST(0.714286), FRAC_CONST(0.8), FRAC_CONST(0.909091), FRAC_CONST(0.971429), FRAC_CONST(0.992366), FRAC_CONST(0.998058), FRAC_CONST(0.999512), FRAC_CONST(0.999878) },
+    { FRAC_CONST(0.800039), FRAC_CONST(0.800156), FRAC_CONST(0.800623), FRAC_CONST(0.802469), FRAC_CONST(0.809524), FRAC_CONST(0.833333), FRAC_CONST(0.888889), FRAC_CONST(0.952381), FRAC_CONST(0.985507), FRAC_CONST(0.996169), FRAC_CONST(0.999028), FRAC_CONST(0.999756), FRAC_CONST(0.999939) },
+    { FRAC_CONST(0.888913), FRAC_CONST(0.888985), FRAC_CONST(0.889273), FRAC_CONST(0.890411), FRAC_CONST(0.894737), FRAC_CONST(0.909091), FRAC_CONST(0.941176), FRAC_CONST(0.97561), FRAC_CONST(0.992701), FRAC_CONST(0.998081), FRAC_CONST(0.999514), FRAC_CONST(0.999878), FRAC_CONST(0.999969) },
+    { FRAC_CONST(0.94119), FRAC_CONST(0.94123), FRAC_CONST(0.941392), FRAC_CONST(0.942029), FRAC_CONST(0.944444), FRAC_CONST(0.952381), FRAC_CONST(0.969697), FRAC_CONST(0.987654), FRAC_CONST(0.996337), FRAC_CONST(0.999039), FRAC_CONST(0.999757), FRAC_CONST(0.999939), FRAC_CONST(0.999985) },
+    { FRAC_CONST(0.969704), FRAC_CONST(0.969726), FRAC_CONST(0.969811), FRAC_CONST(0.970149), FRAC_CONST(0.971429), FRAC_CONST(0.97561), FRAC_CONST(0.984615), FRAC_CONST(0.993789), FRAC_CONST(0.998165), FRAC_CONST(0.999519), FRAC_CONST(0.999878), FRAC_CONST(0.99997), FRAC_CONST(0.999992) },
+    { FRAC_CONST(0.984619), FRAC_CONST(0.98463), FRAC_CONST(0.984674), FRAC_CONST(0.984848), FRAC_CONST(0.985507), FRAC_CONST(0.987654), FRAC_CONST(0.992248), FRAC_CONST(0.996885), FRAC_CONST(0.999082), FRAC_CONST(0.99976), FRAC_CONST(0.999939), FRAC_CONST(0.999985), FRAC_CONST(0.999996) },
+    { FRAC_CONST(0.99225), FRAC_CONST(0.992256), FRAC_CONST(0.992278), FRAC_CONST(0.992366), FRAC_CONST(0.992701), FRAC_CONST(0.993789), FRAC_CONST(0.996109), FRAC_CONST(0.99844), FRAC_CONST(0.999541), FRAC_CONST(0.99988), FRAC_CONST(0.99997), FRAC_CONST(0.999992), FRAC_CONST(0.999998) },
+    { FRAC_CONST(0.99611), FRAC_CONST(0.996113), FRAC_CONST(0.996124), FRAC_CONST(0.996169), FRAC_CONST(0.996337), FRAC_CONST(0.996885), FRAC_CONST(0.998051), FRAC_CONST(0.999219), FRAC_CONST(0.99977), FRAC_CONST(0.99994), FRAC_CONST(0.999985), FRAC_CONST(0.999996), FRAC_CONST(0.999999) },
+    { FRAC_CONST(0.998051), FRAC_CONST(0.998053), FRAC_CONST(0.998058), FRAC_CONST(0.998081), FRAC_CONST(0.998165), FRAC_CONST(0.99844), FRAC_CONST(0.999024), FRAC_CONST(0.99961), FRAC_CONST(0.999885), FRAC_CONST(0.99997), FRAC_CONST(0.999992), FRAC_CONST(0.999998), FRAC_CONST(1) },
+    { FRAC_CONST(0.999025), FRAC_CONST(0.999025), FRAC_CONST(0.999028), FRAC_CONST(0.999039), FRAC_CONST(0.999082), FRAC_CONST(0.999219), FRAC_CONST(0.999512), FRAC_CONST(0.999805), FRAC_CONST(0.999943), FRAC_CONST(0.999985), FRAC_CONST(0.999996), FRAC_CONST(0.999999), FRAC_CONST(1) },
+    { FRAC_CONST(0.999512), FRAC_CONST(0.999512), FRAC_CONST(0.999514), FRAC_CONST(0.999519), FRAC_CONST(0.999541), FRAC_CONST(0.99961), FRAC_CONST(0.999756), FRAC_CONST(0.999902), FRAC_CONST(0.999971), FRAC_CONST(0.999992), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999756), FRAC_CONST(0.999756), FRAC_CONST(0.999757), FRAC_CONST(0.99976), FRAC_CONST(0.99977), FRAC_CONST(0.999805), FRAC_CONST(0.999878), FRAC_CONST(0.999951), FRAC_CONST(0.999986), FRAC_CONST(0.999996), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999878), FRAC_CONST(0.999878), FRAC_CONST(0.999878), FRAC_CONST(0.99988), FRAC_CONST(0.999885), FRAC_CONST(0.999902), FRAC_CONST(0.999939), FRAC_CONST(0.999976), FRAC_CONST(0.999993), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999939), FRAC_CONST(0.999939), FRAC_CONST(0.999939), FRAC_CONST(0.99994), FRAC_CONST(0.999943), FRAC_CONST(0.999951), FRAC_CONST(0.999969), FRAC_CONST(0.999988), FRAC_CONST(0.999996), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999969), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.99997), FRAC_CONST(0.999971), FRAC_CONST(0.999976), FRAC_CONST(0.999985), FRAC_CONST(0.999994), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999985), FRAC_CONST(0.999986), FRAC_CONST(0.999988), FRAC_CONST(0.999992), FRAC_CONST(0.999997), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999992), FRAC_CONST(0.999993), FRAC_CONST(0.999994), FRAC_CONST(0.999996), FRAC_CONST(0.999998), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999996), FRAC_CONST(0.999997), FRAC_CONST(0.999998), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999998), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(0.999999), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) },
+    { FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1), FRAC_CONST(1) }
+};
+
+/* calculates 1/(1+Q) */
+/* [0..1] */
+real_t calc_Q_div(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
+{
+    if (sbr->bs_coupling)
+    {
+        /* left channel */
+        if ((sbr->Q[0][m][l] < 0 || sbr->Q[0][m][l] > 30) ||
+            (sbr->Q[1][m][l] < 0 || sbr->Q[1][m][l] > 24 /* 2*panOffset(1) */))
+        {
+            return 0;
+        } else {
+            /* the pan parameter is always even */
+            if (ch == 0)
+            {
+                return Q_div_tab_left[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
+            } else {
+                return Q_div_tab_right[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
+            }
+        }
+    } else {
+        /* no coupling */
+        if (sbr->Q[ch][m][l] < 0 || sbr->Q[ch][m][l] > 30)
+        {
+            return 0;
+        } else {
+            return Q_div_tab[sbr->Q[ch][m][l]];
+        }
+    }
+}
+
+/* table for Q_div2 values when no coupling */
+static const real_t Q_div2_tab[31] = {
+    FRAC_CONST(0.984615),     FRAC_CONST(0.969697),
+    FRAC_CONST(0.941176),     FRAC_CONST(0.888889),
+    FRAC_CONST(0.8),          FRAC_CONST(0.666667),
+    FRAC_CONST(0.5),          FRAC_CONST(0.333333),
+    FRAC_CONST(0.2),          FRAC_CONST(0.111111),
+    FRAC_CONST(0.0588235),    FRAC_CONST(0.030303),
+    FRAC_CONST(0.0153846),    FRAC_CONST(0.00775194),
+    FRAC_CONST(0.00389105),   FRAC_CONST(0.00194932),
+    FRAC_CONST(0.00097561),   FRAC_CONST(0.000488043),
+    FRAC_CONST(0.000244081),  FRAC_CONST(0.000122055),
+    FRAC_CONST(6.10314E-005), FRAC_CONST(3.05166E-005),
+    FRAC_CONST(1.52586E-005), FRAC_CONST(7.62934E-006),
+    FRAC_CONST(3.81468E-006), FRAC_CONST(1.90734E-006),
+    FRAC_CONST(9.53673E-007), FRAC_CONST(4.76837E-007),
+    FRAC_CONST(2.38419E-007), FRAC_CONST(1.19209E-007),
+    FRAC_CONST(5.96046E-008)
+};
+
+static const real_t Q_div2_tab_left[31][13] = {
+    { FRAC_CONST(0.0302959), FRAC_CONST(0.111015), FRAC_CONST(0.332468), FRAC_CONST(0.663212), FRAC_CONST(0.882759), FRAC_CONST(0.962406), FRAC_CONST(0.984615), FRAC_CONST(0.990329), FRAC_CONST(0.991768), FRAC_CONST(0.992128), FRAC_CONST(0.992218), FRAC_CONST(0.992241), FRAC_CONST(0.992246) },
+    { FRAC_CONST(0.0153809), FRAC_CONST(0.0587695), FRAC_CONST(0.199377), FRAC_CONST(0.496124), FRAC_CONST(0.790123), FRAC_CONST(0.927536), FRAC_CONST(0.969697), FRAC_CONST(0.980843), FRAC_CONST(0.98367), FRAC_CONST(0.984379), FRAC_CONST(0.984556), FRAC_CONST(0.984601), FRAC_CONST(0.984612) },
+    { FRAC_CONST(0.00775006), FRAC_CONST(0.0302744), FRAC_CONST(0.110727), FRAC_CONST(0.329897), FRAC_CONST(0.653061), FRAC_CONST(0.864865), FRAC_CONST(0.941176), FRAC_CONST(0.962406), FRAC_CONST(0.967864), FRAC_CONST(0.969238), FRAC_CONST(0.969582), FRAC_CONST(0.969668), FRAC_CONST(0.96969) },
+    { FRAC_CONST(0.0038901), FRAC_CONST(0.0153698), FRAC_CONST(0.0586081), FRAC_CONST(0.197531), FRAC_CONST(0.484848), FRAC_CONST(0.761905), FRAC_CONST(0.888889), FRAC_CONST(0.927536), FRAC_CONST(0.937729), FRAC_CONST(0.940312), FRAC_CONST(0.94096), FRAC_CONST(0.941122), FRAC_CONST(0.941163) },
+    { FRAC_CONST(0.00194884), FRAC_CONST(0.00774443), FRAC_CONST(0.0301887), FRAC_CONST(0.109589), FRAC_CONST(0.32), FRAC_CONST(0.615385), FRAC_CONST(0.8), FRAC_CONST(0.864865), FRAC_CONST(0.882759), FRAC_CONST(0.887348), FRAC_CONST(0.888503), FRAC_CONST(0.888792), FRAC_CONST(0.888865) },
+    { FRAC_CONST(0.000975372), FRAC_CONST(0.00388727), FRAC_CONST(0.0153257), FRAC_CONST(0.057971), FRAC_CONST(0.190476), FRAC_CONST(0.444444), FRAC_CONST(0.666667), FRAC_CONST(0.761905), FRAC_CONST(0.790123), FRAC_CONST(0.797508), FRAC_CONST(0.799375), FRAC_CONST(0.799844), FRAC_CONST(0.799961) },
+    { FRAC_CONST(0.000487924), FRAC_CONST(0.00194742), FRAC_CONST(0.00772201), FRAC_CONST(0.0298507), FRAC_CONST(0.105263), FRAC_CONST(0.285714), FRAC_CONST(0.5), FRAC_CONST(0.615385), FRAC_CONST(0.653061), FRAC_CONST(0.663212), FRAC_CONST(0.6658), FRAC_CONST(0.66645), FRAC_CONST(0.666612) },
+    { FRAC_CONST(0.000244021), FRAC_CONST(0.000974659), FRAC_CONST(0.00387597), FRAC_CONST(0.0151515), FRAC_CONST(0.0555556), FRAC_CONST(0.166667), FRAC_CONST(0.333333), FRAC_CONST(0.444444), FRAC_CONST(0.484848), FRAC_CONST(0.496124), FRAC_CONST(0.499025), FRAC_CONST(0.499756), FRAC_CONST(0.499939) },
+    { FRAC_CONST(0.000122026), FRAC_CONST(0.000487567), FRAC_CONST(0.00194175), FRAC_CONST(0.00763359), FRAC_CONST(0.0285714), FRAC_CONST(0.0909091), FRAC_CONST(0.2), FRAC_CONST(0.285714), FRAC_CONST(0.32), FRAC_CONST(0.329897), FRAC_CONST(0.332468), FRAC_CONST(0.333116), FRAC_CONST(0.333279) },
+    { FRAC_CONST(6.10165E-005), FRAC_CONST(0.000243843), FRAC_CONST(0.000971817), FRAC_CONST(0.00383142), FRAC_CONST(0.0144928), FRAC_CONST(0.047619), FRAC_CONST(0.111111), FRAC_CONST(0.166667), FRAC_CONST(0.190476), FRAC_CONST(0.197531), FRAC_CONST(0.199377), FRAC_CONST(0.199844), FRAC_CONST(0.199961) },
+    { FRAC_CONST(3.05092E-005), FRAC_CONST(0.000121936), FRAC_CONST(0.000486145), FRAC_CONST(0.00191939), FRAC_CONST(0.00729927), FRAC_CONST(0.0243902), FRAC_CONST(0.0588235), FRAC_CONST(0.0909091), FRAC_CONST(0.105263), FRAC_CONST(0.109589), FRAC_CONST(0.110727), FRAC_CONST(0.111015), FRAC_CONST(0.111087) },
+    { FRAC_CONST(1.52548E-005), FRAC_CONST(6.09719E-005), FRAC_CONST(0.000243132), FRAC_CONST(0.000960615), FRAC_CONST(0.003663), FRAC_CONST(0.0123457), FRAC_CONST(0.030303), FRAC_CONST(0.047619), FRAC_CONST(0.0555556), FRAC_CONST(0.057971), FRAC_CONST(0.0586081), FRAC_CONST(0.0587695), FRAC_CONST(0.05881) },
+    { FRAC_CONST(7.62747E-006), FRAC_CONST(3.04869E-005), FRAC_CONST(0.000121581), FRAC_CONST(0.000480538), FRAC_CONST(0.00183486), FRAC_CONST(0.00621118), FRAC_CONST(0.0153846), FRAC_CONST(0.0243902), FRAC_CONST(0.0285714), FRAC_CONST(0.0298507), FRAC_CONST(0.0301887), FRAC_CONST(0.0302744), FRAC_CONST(0.0302959) },
+    { FRAC_CONST(3.81375E-006), FRAC_CONST(1.52437E-005), FRAC_CONST(6.0794E-005), FRAC_CONST(0.000240327), FRAC_CONST(0.000918274), FRAC_CONST(0.00311526), FRAC_CONST(0.00775194), FRAC_CONST(0.0123457), FRAC_CONST(0.0144928), FRAC_CONST(0.0151515), FRAC_CONST(0.0153257), FRAC_CONST(0.0153698), FRAC_CONST(0.0153809) },
+    { FRAC_CONST(1.90688E-006), FRAC_CONST(7.62189E-006), FRAC_CONST(3.03979E-005), FRAC_CONST(0.000120178), FRAC_CONST(0.000459348), FRAC_CONST(0.00156006), FRAC_CONST(0.00389105), FRAC_CONST(0.00621118), FRAC_CONST(0.00729927), FRAC_CONST(0.00763359), FRAC_CONST(0.00772201), FRAC_CONST(0.00774443), FRAC_CONST(0.00775006) },
+    { FRAC_CONST(9.53441E-007), FRAC_CONST(3.81096E-006), FRAC_CONST(1.51992E-005), FRAC_CONST(6.00925E-005), FRAC_CONST(0.000229727), FRAC_CONST(0.00078064), FRAC_CONST(0.00194932), FRAC_CONST(0.00311526), FRAC_CONST(0.003663), FRAC_CONST(0.00383142), FRAC_CONST(0.00387597), FRAC_CONST(0.00388727), FRAC_CONST(0.0038901) },
+    { FRAC_CONST(4.76721E-007), FRAC_CONST(1.90548E-006), FRAC_CONST(7.59965E-006), FRAC_CONST(3.00472E-005), FRAC_CONST(0.000114877), FRAC_CONST(0.000390472), FRAC_CONST(0.00097561), FRAC_CONST(0.00156006), FRAC_CONST(0.00183486), FRAC_CONST(0.00191939), FRAC_CONST(0.00194175), FRAC_CONST(0.00194742), FRAC_CONST(0.00194884) },
+    { FRAC_CONST(2.3836E-007), FRAC_CONST(9.52743E-007), FRAC_CONST(3.79984E-006), FRAC_CONST(1.50238E-005), FRAC_CONST(5.74416E-005), FRAC_CONST(0.000195274), FRAC_CONST(0.000488043), FRAC_CONST(0.00078064), FRAC_CONST(0.000918274), FRAC_CONST(0.000960615), FRAC_CONST(0.000971817), FRAC_CONST(0.000974659), FRAC_CONST(0.000975372) },
+    { FRAC_CONST(1.1918E-007), FRAC_CONST(4.76372E-007), FRAC_CONST(1.89992E-006), FRAC_CONST(7.51196E-006), FRAC_CONST(2.87216E-005), FRAC_CONST(9.76467E-005), FRAC_CONST(0.000244081), FRAC_CONST(0.000390472), FRAC_CONST(0.000459348), FRAC_CONST(0.000480538), FRAC_CONST(0.000486145), FRAC_CONST(0.000487567), FRAC_CONST(0.000487924) },
+    { FRAC_CONST(5.95901E-008), FRAC_CONST(2.38186E-007), FRAC_CONST(9.49963E-007), FRAC_CONST(3.756E-006), FRAC_CONST(1.4361E-005), FRAC_CONST(4.88257E-005), FRAC_CONST(0.000122055), FRAC_CONST(0.000195274), FRAC_CONST(0.000229727), FRAC_CONST(0.000240327), FRAC_CONST(0.000243132), FRAC_CONST(0.000243843), FRAC_CONST(0.000244021) },
+    { FRAC_CONST(2.9795E-008), FRAC_CONST(1.19093E-007), FRAC_CONST(4.74982E-007), FRAC_CONST(1.878E-006), FRAC_CONST(7.18056E-006), FRAC_CONST(2.44135E-005), FRAC_CONST(6.10314E-005), FRAC_CONST(9.76467E-005), FRAC_CONST(0.000114877), FRAC_CONST(0.000120178), FRAC_CONST(0.000121581), FRAC_CONST(0.000121936), FRAC_CONST(0.000122026) },
+    { FRAC_CONST(1.48975E-008), FRAC_CONST(5.95465E-008), FRAC_CONST(2.37491E-007), FRAC_CONST(9.39002E-007), FRAC_CONST(3.59029E-006), FRAC_CONST(1.22069E-005), FRAC_CONST(3.05166E-005), FRAC_CONST(4.88257E-005), FRAC_CONST(5.74416E-005), FRAC_CONST(6.00925E-005), FRAC_CONST(6.0794E-005), FRAC_CONST(6.09719E-005), FRAC_CONST(6.10165E-005) },
+    { FRAC_CONST(7.44876E-009), FRAC_CONST(2.97732E-008), FRAC_CONST(1.18745E-007), FRAC_CONST(4.69501E-007), FRAC_CONST(1.79515E-006), FRAC_CONST(6.10348E-006), FRAC_CONST(1.52586E-005), FRAC_CONST(2.44135E-005), FRAC_CONST(2.87216E-005), FRAC_CONST(3.00472E-005), FRAC_CONST(3.03979E-005), FRAC_CONST(3.04869E-005), FRAC_CONST(3.05092E-005) },
+    { FRAC_CONST(3.72438E-009), FRAC_CONST(1.48866E-008), FRAC_CONST(5.93727E-008), FRAC_CONST(2.34751E-007), FRAC_CONST(8.97575E-007), FRAC_CONST(3.05175E-006), FRAC_CONST(7.62934E-006), FRAC_CONST(1.22069E-005), FRAC_CONST(1.4361E-005), FRAC_CONST(1.50238E-005), FRAC_CONST(1.51992E-005), FRAC_CONST(1.52437E-005), FRAC_CONST(1.52548E-005) },
+    { FRAC_CONST(1.86219E-009), FRAC_CONST(7.44331E-009), FRAC_CONST(2.96864E-008), FRAC_CONST(1.17375E-007), FRAC_CONST(4.48788E-007), FRAC_CONST(1.52588E-006), FRAC_CONST(3.81468E-006), FRAC_CONST(6.10348E-006), FRAC_CONST(7.18056E-006), FRAC_CONST(7.51196E-006), FRAC_CONST(7.59965E-006), FRAC_CONST(7.62189E-006), FRAC_CONST(7.62747E-006) },
+    { FRAC_CONST(9.31095E-010), FRAC_CONST(3.72166E-009), FRAC_CONST(1.48432E-008), FRAC_CONST(5.86876E-008), FRAC_CONST(2.24394E-007), FRAC_CONST(7.62939E-007), FRAC_CONST(1.90734E-006), FRAC_CONST(3.05175E-006), FRAC_CONST(3.59029E-006), FRAC_CONST(3.756E-006), FRAC_CONST(3.79984E-006), FRAC_CONST(3.81096E-006), FRAC_CONST(3.81375E-006) },
+    { FRAC_CONST(4.65548E-010), FRAC_CONST(1.86083E-009), FRAC_CONST(7.42159E-009), FRAC_CONST(2.93438E-008), FRAC_CONST(1.12197E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(9.53673E-007), FRAC_CONST(1.52588E-006), FRAC_CONST(1.79515E-006), FRAC_CONST(1.878E-006), FRAC_CONST(1.89992E-006), FRAC_CONST(1.90548E-006), FRAC_CONST(1.90688E-006) },
+    { FRAC_CONST(2.32774E-010), FRAC_CONST(9.30414E-010), FRAC_CONST(3.71079E-009), FRAC_CONST(1.46719E-008), FRAC_CONST(5.60985E-008), FRAC_CONST(1.90735E-007), FRAC_CONST(4.76837E-007), FRAC_CONST(7.62939E-007), FRAC_CONST(8.97575E-007), FRAC_CONST(9.39002E-007), FRAC_CONST(9.49963E-007), FRAC_CONST(9.52743E-007), FRAC_CONST(9.53441E-007) },
+    { FRAC_CONST(1.16387E-010), FRAC_CONST(4.65207E-010), FRAC_CONST(1.8554E-009), FRAC_CONST(7.33596E-009), FRAC_CONST(2.80492E-008), FRAC_CONST(9.53674E-008), FRAC_CONST(2.38419E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(4.48788E-007), FRAC_CONST(4.69501E-007), FRAC_CONST(4.74982E-007), FRAC_CONST(4.76372E-007), FRAC_CONST(4.76721E-007) },
+    { FRAC_CONST(5.81935E-011), FRAC_CONST(2.32603E-010), FRAC_CONST(9.27699E-010), FRAC_CONST(3.66798E-009), FRAC_CONST(1.40246E-008), FRAC_CONST(4.76837E-008), FRAC_CONST(1.19209E-007), FRAC_CONST(1.90735E-007), FRAC_CONST(2.24394E-007), FRAC_CONST(2.34751E-007), FRAC_CONST(2.37491E-007), FRAC_CONST(2.38186E-007), FRAC_CONST(2.3836E-007) },
+    { FRAC_CONST(2.90967E-011), FRAC_CONST(1.16302E-010), FRAC_CONST(4.63849E-010), FRAC_CONST(1.83399E-009), FRAC_CONST(7.01231E-009), FRAC_CONST(2.38419E-008), FRAC_CONST(5.96046E-008), FRAC_CONST(9.53674E-008), FRAC_CONST(1.12197E-007), FRAC_CONST(1.17375E-007), FRAC_CONST(1.18745E-007), FRAC_CONST(1.19093E-007), FRAC_CONST(1.1918E-007) }
+};
+
+static const real_t Q_div2_tab_right[31][13] = {
+    { FRAC_CONST(0.992246), FRAC_CONST(0.992241), FRAC_CONST(0.992218), FRAC_CONST(0.992128), FRAC_CONST(0.991768), FRAC_CONST(0.990329), FRAC_CONST(0.984615), FRAC_CONST(0.962406), FRAC_CONST(0.882759), FRAC_CONST(0.663212), FRAC_CONST(0.332468), FRAC_CONST(0.111015), FRAC_CONST(0.0302959) },
+    { FRAC_CONST(0.984612), FRAC_CONST(0.984601), FRAC_CONST(0.984556), FRAC_CONST(0.984379), FRAC_CONST(0.98367), FRAC_CONST(0.980843), FRAC_CONST(0.969697), FRAC_CONST(0.927536), FRAC_CONST(0.790123), FRAC_CONST(0.496124), FRAC_CONST(0.199377), FRAC_CONST(0.0587695), FRAC_CONST(0.0153809) },
+    { FRAC_CONST(0.96969), FRAC_CONST(0.969668), FRAC_CONST(0.969582), FRAC_CONST(0.969238), FRAC_CONST(0.967864), FRAC_CONST(0.962406), FRAC_CONST(0.941176), FRAC_CONST(0.864865), FRAC_CONST(0.653061), FRAC_CONST(0.329897), FRAC_CONST(0.110727), FRAC_CONST(0.0302744), FRAC_CONST(0.00775006) },
+    { FRAC_CONST(0.941163), FRAC_CONST(0.941122), FRAC_CONST(0.94096), FRAC_CONST(0.940312), FRAC_CONST(0.937729), FRAC_CONST(0.927536), FRAC_CONST(0.888889), FRAC_CONST(0.761905), FRAC_CONST(0.484848), FRAC_CONST(0.197531), FRAC_CONST(0.0586081), FRAC_CONST(0.0153698), FRAC_CONST(0.0038901) },
+    { FRAC_CONST(0.888865), FRAC_CONST(0.888792), FRAC_CONST(0.888503), FRAC_CONST(0.887348), FRAC_CONST(0.882759), FRAC_CONST(0.864865), FRAC_CONST(0.8), FRAC_CONST(0.615385), FRAC_CONST(0.32), FRAC_CONST(0.109589), FRAC_CONST(0.0301887), FRAC_CONST(0.00774443), FRAC_CONST(0.00194884) },
+    { FRAC_CONST(0.799961), FRAC_CONST(0.799844), FRAC_CONST(0.799375), FRAC_CONST(0.797508), FRAC_CONST(0.790123), FRAC_CONST(0.761905), FRAC_CONST(0.666667), FRAC_CONST(0.444444), FRAC_CONST(0.190476), FRAC_CONST(0.057971), FRAC_CONST(0.0153257), FRAC_CONST(0.00388727), FRAC_CONST(0.000975372) },
+    { FRAC_CONST(0.666612), FRAC_CONST(0.66645), FRAC_CONST(0.6658), FRAC_CONST(0.663212), FRAC_CONST(0.653061), FRAC_CONST(0.615385), FRAC_CONST(0.5), FRAC_CONST(0.285714), FRAC_CONST(0.105263), FRAC_CONST(0.0298507), FRAC_CONST(0.00772201), FRAC_CONST(0.00194742), FRAC_CONST(0.000487924) },
+    { FRAC_CONST(0.499939), FRAC_CONST(0.499756), FRAC_CONST(0.499025), FRAC_CONST(0.496124), FRAC_CONST(0.484848), FRAC_CONST(0.444444), FRAC_CONST(0.333333), FRAC_CONST(0.166667), FRAC_CONST(0.0555556), FRAC_CONST(0.0151515), FRAC_CONST(0.00387597), FRAC_CONST(0.000974659), FRAC_CONST(0.000244021) },
+    { FRAC_CONST(0.333279), FRAC_CONST(0.333116), FRAC_CONST(0.332468), FRAC_CONST(0.329897), FRAC_CONST(0.32), FRAC_CONST(0.285714), FRAC_CONST(0.2), FRAC_CONST(0.0909091), FRAC_CONST(0.0285714), FRAC_CONST(0.00763359), FRAC_CONST(0.00194175), FRAC_CONST(0.000487567), FRAC_CONST(0.000122026) },
+    { FRAC_CONST(0.199961), FRAC_CONST(0.199844), FRAC_CONST(0.199377), FRAC_CONST(0.197531), FRAC_CONST(0.190476), FRAC_CONST(0.166667), FRAC_CONST(0.111111), FRAC_CONST(0.047619), FRAC_CONST(0.0144928), FRAC_CONST(0.00383142), FRAC_CONST(0.000971817), FRAC_CONST(0.000243843), FRAC_CONST(6.10165E-005) },
+    { FRAC_CONST(0.111087), FRAC_CONST(0.111015), FRAC_CONST(0.110727), FRAC_CONST(0.109589), FRAC_CONST(0.105263), FRAC_CONST(0.0909091), FRAC_CONST(0.0588235), FRAC_CONST(0.0243902), FRAC_CONST(0.00729927), FRAC_CONST(0.00191939), FRAC_CONST(0.000486145), FRAC_CONST(0.000121936), FRAC_CONST(3.05092E-005) },
+    { FRAC_CONST(0.05881), FRAC_CONST(0.0587695), FRAC_CONST(0.0586081), FRAC_CONST(0.057971), FRAC_CONST(0.0555556), FRAC_CONST(0.047619), FRAC_CONST(0.030303), FRAC_CONST(0.0123457), FRAC_CONST(0.003663), FRAC_CONST(0.000960615), FRAC_CONST(0.000243132), FRAC_CONST(6.09719E-005), FRAC_CONST(1.52548E-005) },
+    { FRAC_CONST(0.0302959), FRAC_CONST(0.0302744), FRAC_CONST(0.0301887), FRAC_CONST(0.0298507), FRAC_CONST(0.0285714), FRAC_CONST(0.0243902), FRAC_CONST(0.0153846), FRAC_CONST(0.00621118), FRAC_CONST(0.00183486), FRAC_CONST(0.000480538), FRAC_CONST(0.000121581), FRAC_CONST(3.04869E-005), FRAC_CONST(7.62747E-006) },
+    { FRAC_CONST(0.0153809), FRAC_CONST(0.0153698), FRAC_CONST(0.0153257), FRAC_CONST(0.0151515), FRAC_CONST(0.0144928), FRAC_CONST(0.0123457), FRAC_CONST(0.00775194), FRAC_CONST(0.00311526), FRAC_CONST(0.000918274), FRAC_CONST(0.000240327), FRAC_CONST(6.0794E-005), FRAC_CONST(1.52437E-005), FRAC_CONST(3.81375E-006) },
+    { FRAC_CONST(0.00775006), FRAC_CONST(0.00774443), FRAC_CONST(0.00772201), FRAC_CONST(0.00763359), FRAC_CONST(0.00729927), FRAC_CONST(0.00621118), FRAC_CONST(0.00389105), FRAC_CONST(0.00156006), FRAC_CONST(0.000459348), FRAC_CONST(0.000120178), FRAC_CONST(3.03979E-005), FRAC_CONST(7.62189E-006), FRAC_CONST(1.90688E-006) },
+    { FRAC_CONST(0.0038901), FRAC_CONST(0.00388727), FRAC_CONST(0.00387597), FRAC_CONST(0.00383142), FRAC_CONST(0.003663), FRAC_CONST(0.00311526), FRAC_CONST(0.00194932), FRAC_CONST(0.00078064), FRAC_CONST(0.000229727), FRAC_CONST(6.00925E-005), FRAC_CONST(1.51992E-005), FRAC_CONST(3.81096E-006), FRAC_CONST(9.53441E-007) },
+    { FRAC_CONST(0.00194884), FRAC_CONST(0.00194742), FRAC_CONST(0.00194175), FRAC_CONST(0.00191939), FRAC_CONST(0.00183486), FRAC_CONST(0.00156006), FRAC_CONST(0.00097561), FRAC_CONST(0.000390472), FRAC_CONST(0.000114877), FRAC_CONST(3.00472E-005), FRAC_CONST(7.59965E-006), FRAC_CONST(1.90548E-006), FRAC_CONST(4.76721E-007) },
+    { FRAC_CONST(0.000975372), FRAC_CONST(0.000974659), FRAC_CONST(0.000971817), FRAC_CONST(0.000960615), FRAC_CONST(0.000918274), FRAC_CONST(0.00078064), FRAC_CONST(0.000488043), FRAC_CONST(0.000195274), FRAC_CONST(5.74416E-005), FRAC_CONST(1.50238E-005), FRAC_CONST(3.79984E-006), FRAC_CONST(9.52743E-007), FRAC_CONST(2.3836E-007) },
+    { FRAC_CONST(0.000487924), FRAC_CONST(0.000487567), FRAC_CONST(0.000486145), FRAC_CONST(0.000480538), FRAC_CONST(0.000459348), FRAC_CONST(0.000390472), FRAC_CONST(0.000244081), FRAC_CONST(9.76467E-005), FRAC_CONST(2.87216E-005), FRAC_CONST(7.51196E-006), FRAC_CONST(1.89992E-006), FRAC_CONST(4.76372E-007), FRAC_CONST(1.1918E-007) },
+    { FRAC_CONST(0.000244021), FRAC_CONST(0.000243843), FRAC_CONST(0.000243132), FRAC_CONST(0.000240327), FRAC_CONST(0.000229727), FRAC_CONST(0.000195274), FRAC_CONST(0.000122055), FRAC_CONST(4.88257E-005), FRAC_CONST(1.4361E-005), FRAC_CONST(3.756E-006), FRAC_CONST(9.49963E-007), FRAC_CONST(2.38186E-007), FRAC_CONST(5.95901E-008) },
+    { FRAC_CONST(0.000122026), FRAC_CONST(0.000121936), FRAC_CONST(0.000121581), FRAC_CONST(0.000120178), FRAC_CONST(0.000114877), FRAC_CONST(9.76467E-005), FRAC_CONST(6.10314E-005), FRAC_CONST(2.44135E-005), FRAC_CONST(7.18056E-006), FRAC_CONST(1.878E-006), FRAC_CONST(4.74982E-007), FRAC_CONST(1.19093E-007), FRAC_CONST(2.9795E-008) },
+    { FRAC_CONST(6.10165E-005), FRAC_CONST(6.09719E-005), FRAC_CONST(6.0794E-005), FRAC_CONST(6.00925E-005), FRAC_CONST(5.74416E-005), FRAC_CONST(4.88257E-005), FRAC_CONST(3.05166E-005), FRAC_CONST(1.22069E-005), FRAC_CONST(3.59029E-006), FRAC_CONST(9.39002E-007), FRAC_CONST(2.37491E-007), FRAC_CONST(5.95465E-008), FRAC_CONST(1.48975E-008) },
+    { FRAC_CONST(3.05092E-005), FRAC_CONST(3.04869E-005), FRAC_CONST(3.03979E-005), FRAC_CONST(3.00472E-005), FRAC_CONST(2.87216E-005), FRAC_CONST(2.44135E-005), FRAC_CONST(1.52586E-005), FRAC_CONST(6.10348E-006), FRAC_CONST(1.79515E-006), FRAC_CONST(4.69501E-007), FRAC_CONST(1.18745E-007), FRAC_CONST(2.97732E-008), FRAC_CONST(7.44876E-009) },
+    { FRAC_CONST(1.52548E-005), FRAC_CONST(1.52437E-005), FRAC_CONST(1.51992E-005), FRAC_CONST(1.50238E-005), FRAC_CONST(1.4361E-005), FRAC_CONST(1.22069E-005), FRAC_CONST(7.62934E-006), FRAC_CONST(3.05175E-006), FRAC_CONST(8.97575E-007), FRAC_CONST(2.34751E-007), FRAC_CONST(5.93727E-008), FRAC_CONST(1.48866E-008), FRAC_CONST(3.72438E-009) },
+    { FRAC_CONST(7.62747E-006), FRAC_CONST(7.62189E-006), FRAC_CONST(7.59965E-006), FRAC_CONST(7.51196E-006), FRAC_CONST(7.18056E-006), FRAC_CONST(6.10348E-006), FRAC_CONST(3.81468E-006), FRAC_CONST(1.52588E-006), FRAC_CONST(4.48788E-007), FRAC_CONST(1.17375E-007), FRAC_CONST(2.96864E-008), FRAC_CONST(7.44331E-009), FRAC_CONST(1.86219E-009) },
+    { FRAC_CONST(3.81375E-006), FRAC_CONST(3.81096E-006), FRAC_CONST(3.79984E-006), FRAC_CONST(3.756E-006), FRAC_CONST(3.59029E-006), FRAC_CONST(3.05175E-006), FRAC_CONST(1.90734E-006), FRAC_CONST(7.62939E-007), FRAC_CONST(2.24394E-007), FRAC_CONST(5.86876E-008), FRAC_CONST(1.48432E-008), FRAC_CONST(3.72166E-009), FRAC_CONST(9.31095E-010) },
+    { FRAC_CONST(1.90688E-006), FRAC_CONST(1.90548E-006), FRAC_CONST(1.89992E-006), FRAC_CONST(1.878E-006), FRAC_CONST(1.79515E-006), FRAC_CONST(1.52588E-006), FRAC_CONST(9.53673E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(1.12197E-007), FRAC_CONST(2.93438E-008), FRAC_CONST(7.42159E-009), FRAC_CONST(1.86083E-009), FRAC_CONST(4.65548E-010) },
+    { FRAC_CONST(9.53441E-007), FRAC_CONST(9.52743E-007), FRAC_CONST(9.49963E-007), FRAC_CONST(9.39002E-007), FRAC_CONST(8.97575E-007), FRAC_CONST(7.62939E-007), FRAC_CONST(4.76837E-007), FRAC_CONST(1.90735E-007), FRAC_CONST(5.60985E-008), FRAC_CONST(1.46719E-008), FRAC_CONST(3.71079E-009), FRAC_CONST(9.30414E-010), FRAC_CONST(2.32774E-010) },
+    { FRAC_CONST(4.76721E-007), FRAC_CONST(4.76372E-007), FRAC_CONST(4.74982E-007), FRAC_CONST(4.69501E-007), FRAC_CONST(4.48788E-007), FRAC_CONST(3.8147E-007), FRAC_CONST(2.38419E-007), FRAC_CONST(9.53674E-008), FRAC_CONST(2.80492E-008), FRAC_CONST(7.33596E-009), FRAC_CONST(1.8554E-009), FRAC_CONST(4.65207E-010), FRAC_CONST(1.16387E-010) },
+    { FRAC_CONST(2.3836E-007), FRAC_CONST(2.38186E-007), FRAC_CONST(2.37491E-007), FRAC_CONST(2.34751E-007), FRAC_CONST(2.24394E-007), FRAC_CONST(1.90735E-007), FRAC_CONST(1.19209E-007), FRAC_CONST(4.76837E-008), FRAC_CONST(1.40246E-008), FRAC_CONST(3.66798E-009), FRAC_CONST(9.27699E-010), FRAC_CONST(2.32603E-010), FRAC_CONST(5.81935E-011) },
+    { FRAC_CONST(1.1918E-007), FRAC_CONST(1.19093E-007), FRAC_CONST(1.18745E-007), FRAC_CONST(1.17375E-007), FRAC_CONST(1.12197E-007), FRAC_CONST(9.53674E-008), FRAC_CONST(5.96046E-008), FRAC_CONST(2.38419E-008), FRAC_CONST(7.01231E-009), FRAC_CONST(1.83399E-009), FRAC_CONST(4.63849E-010), FRAC_CONST(1.16302E-010), FRAC_CONST(2.90967E-011) }
+};
+
+/* calculates Q/(1+Q) */
+/* [0..1] */
+real_t calc_Q_div2(sbr_info *sbr, uint8_t ch, uint8_t m, uint8_t l)
+{
+    if (sbr->bs_coupling)
+    {
+        if ((sbr->Q[0][m][l] < 0 || sbr->Q[0][m][l] > 30) ||
+            (sbr->Q[1][m][l] < 0 || sbr->Q[1][m][l] > 24 /* 2*panOffset(1) */))
+        {
+            return 0;
+        } else {
+            /* the pan parameter is always even */
+            if (ch == 0)
+            {
+                return Q_div2_tab_left[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
+            } else {
+                return Q_div2_tab_right[sbr->Q[0][m][l]][sbr->Q[1][m][l] >> 1];
+            }
+        }
+    } else {
+        /* no coupling */
+        if (sbr->Q[ch][m][l] < 0 || sbr->Q[ch][m][l] > 30)
+        {
+            return 0;
+        } else {
+            return Q_div2_tab[sbr->Q[ch][m][l]];
+        }
+    }
+}
+
+static const real_t E_deq_tab[64] = {
+    64.0f, 128.0f, 256.0f, 512.0f, 1024.0f, 2048.0f, 4096.0f, 8192.0f,
+    16384.0f, 32768.0f, 65536.0f, 131072.0f, 262144.0f, 524288.0f, 1.04858E+006f, 2.09715E+006f,
+    4.1943E+006f, 8.38861E+006f, 1.67772E+007f, 3.35544E+007f, 6.71089E+007f, 1.34218E+008f, 2.68435E+008f, 5.36871E+008f,
+    1.07374E+009f, 2.14748E+009f, 4.29497E+009f, 8.58993E+009f, 1.71799E+010f, 3.43597E+010f, 6.87195E+010f, 1.37439E+011f,
+    2.74878E+011f, 5.49756E+011f, 1.09951E+012f, 2.19902E+012f, 4.39805E+012f, 8.79609E+012f, 1.75922E+013f, 3.51844E+013f,
+    7.03687E+013f, 1.40737E+014f, 2.81475E+014f, 5.6295E+014f, 1.1259E+015f, 2.2518E+015f, 4.5036E+015f, 9.0072E+015f,
+    1.80144E+016f, 3.60288E+016f, 7.20576E+016f, 1.44115E+017f, 2.8823E+017f, 5.76461E+017f, 1.15292E+018f, 2.30584E+018f,
+    4.61169E+018f, 9.22337E+018f, 1.84467E+019f, 3.68935E+019f, 7.3787E+019f, 1.47574E+020f, 2.95148E+020f, 5.90296E+020f
+};
+
 void envelope_noise_dequantisation(sbr_info *sbr, uint8_t ch)
 {
     if (sbr->bs_coupling == 0)
@@ -255,22 +403,22 @@
         {
             for (k = 0; k < sbr->n[sbr->f[ch][l]]; k++)
             {
-                /* +6 for the *64 and -10 for the /32 in the synthesis QMF
+                /* +6 for the *64 and -10 for the /32 in the synthesis QMF (fixed)
                  * since this is a energy value: (x/32)^2 = (x^2)/1024
                  */
-                exp = (sbr->E[ch][k][l] >> amp) + 6;
+                /* exp = (sbr->E[ch][k][l] >> amp) + 6; */
+                exp = (sbr->E[ch][k][l] >> amp);
 
-                if ((exp < -P2_TABLE_OFFSET) || (exp > P2_TABLE_MAX))
+                if ((exp < 0) || (exp >= 64))
                 {
                     sbr->E_orig[ch][k][l] = 0;
                 } else {
-                    /* FIXED POINT TODO: E_orig: INTEGER!! */
-                    sbr->E_orig[ch][k][l] = pow2deq[exp + P2_TABLE_OFFSET];
+                    sbr->E_orig[ch][k][l] = E_deq_tab[exp];
 
                     /* save half the table size at the cost of 1 multiply */
                     if (amp && (sbr->E[ch][k][l] & 1))
                     {
-                        sbr->E_orig[ch][k][l] = MUL_R(sbr->E_orig[ch][k][l], REAL_CONST(1.414213562));
+                        sbr->E_orig[ch][k][l] = MUL_C(sbr->E_orig[ch][k][l], COEF_CONST(1.414213562));
                     }
                 }
             }
@@ -280,18 +428,29 @@
         {
             for (k = 0; k < sbr->N_Q; k++)
             {
-                if (sbr->Q[ch][k][l] < 0 || sbr->Q[ch][k][l] > 30)
-                {
-                    sbr->Q_orig[ch][k][l] = 0;
-                } else {
-                    exp = NOISE_FLOOR_OFFSET - sbr->Q[ch][k][l];
-                    sbr->Q_orig[ch][k][l] = pow2deq[exp + P2_TABLE_OFFSET];
-                }
+                sbr->Q_div[ch][k][l] = calc_Q_div(sbr, ch, k, l);
+                sbr->Q_div2[ch][k][l] = calc_Q_div2(sbr, ch, k, l);
             }
         }
     }
 }
 
+static const real_t E_pan_tab[25] = {
+    FRAC_CONST(0.000244081), FRAC_CONST(0.000488043),
+    FRAC_CONST(0.00097561),  FRAC_CONST(0.00194932),
+    FRAC_CONST(0.00389105),  FRAC_CONST(0.00775194),
+    FRAC_CONST(0.0153846),   FRAC_CONST(0.030303),
+    FRAC_CONST(0.0588235),   FRAC_CONST(0.111111),
+    FRAC_CONST(0.2),         FRAC_CONST(0.333333),
+    FRAC_CONST(0.5),         FRAC_CONST(0.666667),
+    FRAC_CONST(0.8),         FRAC_CONST(0.888889),
+    FRAC_CONST(0.941176),    FRAC_CONST(0.969697),
+    FRAC_CONST(0.984615),    FRAC_CONST(0.992248),
+    FRAC_CONST(0.996109),    FRAC_CONST(0.998051),
+    FRAC_CONST(0.999024),    FRAC_CONST(0.999512),
+    FRAC_CONST(0.999756)
+};
+
 void unmap_envelope_noise(sbr_info *sbr)
 {
     real_t tmp;
@@ -304,49 +463,47 @@
     {
         for (k = 0; k < sbr->n[sbr->f[0][l]]; k++)
         {
-            /* +6: * 64 ; +1: * 2 ; -10: /1024 QMF */
-            exp0 = (sbr->E[0][k][l] >> amp0) + 7;
+            /* +6: * 64 ; +1: * 2 ; */
+            exp0 = (sbr->E[0][k][l] >> amp0) + 1;
 
             /* UN_MAP removed: (x / 4096) same as (x >> 12) */
             /* E[1] is always even so no need for compensating the divide by 2 with
              * an extra multiplication
              */
-            exp1 = (sbr->E[1][k][l] >> amp1) - 12;
+            /* exp1 = (sbr->E[1][k][l] >> amp1) - 12; */
+            exp1 = (sbr->E[1][k][l] >> amp1);
 
-            if ((exp0 < -P2_TABLE_OFFSET) || (exp0 > P2_TABLE_MAX) ||
-                (exp1 < -P2_TABLE_RCP_OFFSET) || (exp1 > P2_TABLE_RCP_MAX))
+            if ((exp0 < 0) || (exp0 >= 64) ||
+                (exp1 < 0) || (exp1 > 24))
             {
                 sbr->E_orig[1][k][l] = 0;
                 sbr->E_orig[0][k][l] = 0;
             } else {
-                tmp = pow2deq[exp0 + P2_TABLE_OFFSET];
+                tmp = E_deq_tab[exp0];
                 if (amp0 && (sbr->E[0][k][l] & 1))
-                    tmp = MUL_R(tmp, REAL_CONST(1.414213562));
+                {
+                    tmp = MUL_C(tmp, COEF_CONST(1.414213562));
+                }
 
-                /* FIXED POINT TODO: E_orig: INTEGER!! */
-                sbr->E_orig[1][k][l] = MUL_F(tmp, pow2deq_rcp[exp1 + P2_TABLE_RCP_OFFSET]);
-                sbr->E_orig[0][k][l] = MUL_R(sbr->E_orig[1][k][l], pow2deq[exp1 + P2_TABLE_OFFSET]);
+                /* panning */
+                sbr->E_orig[0][k][l] = MUL_F(tmp, E_pan_tab[exp1]);
+                sbr->E_orig[1][k][l] = MUL_F(tmp, E_pan_tab[24 - exp1]);
             }
         }
     }
+
     for (l = 0; l < sbr->L_Q[0]; l++)
     {
         for (k = 0; k < sbr->N_Q; k++)
         {
-            if ((sbr->Q[0][k][l] < 0 || sbr->Q[0][k][l] > 30) ||
-                (sbr->Q[1][k][l] < 0 || sbr->Q[1][k][l] > 24 /* 2*panOffset(1) */))
-            {
-                sbr->Q_orig[0][k][l] = 0;
-                sbr->Q_orig[1][k][l] = 0;
-            } else {
-                exp0 = NOISE_FLOOR_OFFSET - sbr->Q[0][k][l] + 1;
-                exp1 = sbr->Q[1][k][l] - 12;
-
-                sbr->Q_orig[1][k][l] = MUL_F(pow2deq[exp0 + P2_TABLE_OFFSET], pow2deq_rcp[exp1 + P2_TABLE_RCP_OFFSET]);
-                sbr->Q_orig[0][k][l] = MUL_R(sbr->Q_orig[1][k][l], pow2deq[exp1 + P2_TABLE_OFFSET]);
-            }
+            sbr->Q_div[0][k][l] = calc_Q_div(sbr, 0, k, l);
+            sbr->Q_div[1][k][l] = calc_Q_div(sbr, 1, k, l);
+            sbr->Q_div2[0][k][l] = calc_Q_div2(sbr, 0, k, l);
+            sbr->Q_div2[1][k][l] = calc_Q_div2(sbr, 1, k, l);
         }
     }
 }
 
 #endif
+
+#endif
--- a/libfaad2/sbr_e_nf.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_e_nf.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_e_nf.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_e_nf.h,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -35,23 +35,12 @@
 #endif
 
 
-#ifndef FIXED_POINT
-#define P2_TABLE_OFFSET 35
-#define P2_TABLE_MAX 91
-#else
-#define P2Q_TABLE_OFFSET 24
-#define P2Q_TABLE_MAX 7
-#define P2_TABLE_OFFSET 0
-#define P2_TABLE_MAX 31
-#endif
-#define P2_TABLE_RCP_OFFSET 12
-#define P2_TABLE_RCP_MAX 21
-
-
 void extract_envelope_data(sbr_info *sbr, uint8_t ch);
 void extract_noise_floor_data(sbr_info *sbr, uint8_t ch);
+#ifndef FIXED_POINT
 void envelope_noise_dequantisation(sbr_info *sbr, uint8_t ch);
 void unmap_envelope_noise(sbr_info *sbr);
+#endif
 
 #ifdef __cplusplus
 }
--- a/libfaad2/sbr_fbt.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_fbt.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_fbt.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_fbt.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -226,7 +226,7 @@
     if (k2Diff)
     {
         incr = (k2Diff > 0) ? -1 : 1;
-        k = (k2Diff > 0) ? (nrBands-1) : 0;
+        k = (uint8_t) ((k2Diff > 0) ? (nrBands-1) : 0);
 
         while (k2Diff != 0)
         {
@@ -238,10 +238,10 @@
 
     sbr->f_master[0] = k0;
     for (k = 1; k <= nrBands; k++)
-        sbr->f_master[k] = sbr->f_master[k-1] + vDk[k-1];
+        sbr->f_master[k] = (uint8_t)(sbr->f_master[k-1] + vDk[k-1]);
 
-    sbr->N_master = nrBands;
-    sbr->N_master = min(sbr->N_master, 64);
+    sbr->N_master = (uint8_t)nrBands;
+    sbr->N_master = (min(sbr->N_master, 64));
 
 #if 0
     printf("f_master[%d]: ", nrBands);
@@ -357,6 +357,9 @@
     uint8_t temp1[] = { 6, 5, 4 };
     real_t q, qk;
     int32_t A_1;
+#ifdef FIXED_POINT
+    real_t rk2, rk0;
+#endif
 
     /* mft only defined for k2 > k0 */
     if (k2 <= k0)
@@ -368,7 +371,9 @@
     bands = temp1[bs_freq_scale-1];
 
 #ifdef FIXED_POINT
-    if (REAL_CONST(k2) > MUL_R(REAL_CONST(k0),REAL_CONST(2.2449)))
+    rk0 = (real_t)k0 << REAL_BITS;
+    rk2 = (real_t)k2 << REAL_BITS;
+    if (rk2 > MUL_C(rk0, COEF_CONST(2.2449)))
 #else
     if ((float)k2/(float)k0 > 2.2449)
 #endif
@@ -380,16 +385,18 @@
         k1 = k2;
     }
 
-    nrBand0 = 2 * find_bands(0, bands, k0, k1);
+    nrBand0 = (uint8_t)(2 * find_bands(0, bands, k0, k1));
     nrBand0 = min(nrBand0, 63);
     if (nrBand0 <= 0)
         return 1;
 
     q = find_initial_power(nrBand0, k0, k1);
+#ifdef FIXED_POINT
+    qk = (real_t)k0 << REAL_BITS;
+    //A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
+    A_1 = k0;
+#else
     qk = REAL_CONST(k0);
-#ifdef FIXED_POINT
-    A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
-#else
     A_1 = (int32_t)(qk + .5);
 #endif
     for (k = 0; k <= nrBand0; k++)
@@ -419,21 +426,23 @@
     if (!twoRegions)
     {
         for (k = 0; k <= nrBand0; k++)
-            sbr->f_master[k] = vk0[k];
+            sbr->f_master[k] = (uint8_t) vk0[k];
 
         sbr->N_master = nrBand0;
         sbr->N_master = min(sbr->N_master, 64);
         return 0;
     }
 
-    nrBand1 = 2 * find_bands(1 /* warped */, bands, k1, k2);
+    nrBand1 = (uint8_t)(2 * find_bands(1 /* warped */, bands, k1, k2));
     nrBand1 = min(nrBand1, 63);
 
     q = find_initial_power(nrBand1, k1, k2);
+#ifdef FIXED_POINT
+    qk = (real_t)k1 << REAL_BITS;
+    //A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
+    A_1 = k1;
+#else
     qk = REAL_CONST(k1);
-#ifdef FIXED_POINT
-    A_1 = (int32_t)((qk + REAL_CONST(0.5)) >> REAL_BITS);
-#else
     A_1 = (int32_t)(qk + .5);
 #endif
     for (k = 0; k <= nrBand1 - 1; k++)
@@ -474,11 +483,11 @@
     sbr->N_master = min(sbr->N_master, 64);
     for (k = 0; k <= nrBand0; k++)
     {
-        sbr->f_master[k] = vk0[k];
+        sbr->f_master[k] =  (uint8_t) vk0[k];
     }
     for (k = nrBand0 + 1; k <= sbr->N_master; k++)
     {
-        sbr->f_master[k] = vk1[k - nrBand0];
+        sbr->f_master[k] = (uint8_t) vk1[k - nrBand0];
     }
 
 #if 0
@@ -529,11 +538,13 @@
         if (k == 0)
             i = 0;
         else
-            i = 2*k - minus;
+            i = (uint8_t)(2*k - minus);
         sbr->f_table_res[LO_RES][k] = sbr->f_table_res[HI_RES][i];
     }
 
 #if 0
+    printf("bs_freq_scale: %d\n", sbr->bs_freq_scale);
+    printf("bs_limiter_bands: %d\n", sbr->bs_limiter_bands);
     printf("f_table_res[HI_RES][%d]: ", sbr->N_high);
     for (k = 0; k <= sbr->N_high; k++)
     {
@@ -558,7 +569,7 @@
 #if 0
         sbr->N_Q = max(1, (int32_t)(sbr->bs_noise_bands*(log(k2/(float)sbr->kx)/log(2.0)) + 0.5));
 #else
-        sbr->N_Q = max(1, find_bands(0, sbr->bs_noise_bands, sbr->kx, k2));
+        sbr->N_Q = (uint8_t)(max(1, find_bands(0, sbr->bs_noise_bands, sbr->kx, k2)));
 #endif
         sbr->N_Q = min(5, sbr->N_Q);
     }
@@ -594,7 +605,7 @@
     printf("f_table_noise[%d]: ", sbr->N_Q);
     for (k = 0; k <= sbr->N_Q; k++)
     {
-        printf("%d ", sbr->f_table_noise[k]);
+        printf("%d ", sbr->f_table_noise[k] - sbr->kx);
     }
     printf("\n");
 #endif
@@ -613,8 +624,8 @@
     static const real_t limiterBandsPerOctave[] = { REAL_CONST(1.2),
         REAL_CONST(2), REAL_CONST(3) };
 #else
-    static const real_t limiterBandsCompare[] = { REAL_CONST(1.328125),
-        REAL_CONST(1.1875), REAL_CONST(1.125) };
+    static const real_t limiterBandsCompare[] = { REAL_CONST(1.327152),
+        REAL_CONST(1.185093), REAL_CONST(1.119872) };
 #endif
     uint8_t k, s;
     int8_t nrLim;
@@ -626,6 +637,15 @@
     sbr->f_table_lim[0][1] = sbr->f_table_res[LO_RES][sbr->N_low] - sbr->kx;
     sbr->N_L[0] = 1;
 
+#if 0
+    printf("f_table_lim[%d][%d]: ", 0, sbr->N_L[0]);
+    for (k = 0; k <= sbr->N_L[0]; k++)
+    {
+        printf("%d ", sbr->f_table_lim[0][k]);
+    }
+    printf("\n");
+#endif
+
     for (s = 1; s < 4; s++)
     {
         int32_t limTable[100 /*TODO*/] = {0};
@@ -666,17 +686,18 @@
             if (limTable[k-1] != 0)
 #if 0
                 nOctaves = REAL_CONST(log((float)limTable[k]/(float)limTable[k-1])/log(2.0));
-#endif
+#else
 #ifdef FIXED_POINT
-                nOctaves = SBR_DIV(REAL_CONST(limTable[k]),REAL_CONST(limTable[k-1]));
+                nOctaves = DIV_R((limTable[k]<<REAL_BITS),REAL_CONST(limTable[k-1]));
 #else
                 nOctaves = (real_t)limTable[k]/(real_t)limTable[k-1];
 #endif
+#endif
             else
                 nOctaves = 0;
 
 #if 0
-            if ((MUL(nOctaves,limBands)) < REAL_CONST(0.49))
+            if ((MUL_R(nOctaves,limBands)) < REAL_CONST(0.49))
 #else
             if (nOctaves < limiterBandsCompare[s - 1])
 #endif
--- a/libfaad2/sbr_hfadj.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_hfadj.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_hfadj.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_hfadj.c,v 1.4 2004/06/23 13:50:51 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -40,9 +40,7 @@
 #include "sbr_noise.h"
 
 
-/* static function delcarations */
-static void map_noise_data(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch);
-static void map_sinusoids(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch);
+/* static function declarations */
 static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj,
                                       qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch);
 static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch);
@@ -61,54 +59,6 @@
 {
     ALIGN sbr_hfadj_info adj = {{{0}}};
 
-    map_noise_data(sbr, &adj, ch);
-    map_sinusoids(sbr, &adj, ch);
-
-    estimate_current_envelope(sbr, &adj, Xsbr, ch);
-
-    calculate_gain(sbr, &adj, ch);
-
-#ifdef SBR_LOW_POWER
-    calc_gain_groups(sbr, &adj, deg, ch);
-    aliasing_reduction(sbr, &adj, deg, ch);
-#endif
-
-    hf_assembly(sbr, &adj, Xsbr, ch);
-}
-
-static void map_noise_data(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
-{
-    uint8_t l, i;
-    uint32_t m;
-
-    for (l = 0; l < sbr->L_E[ch]; l++)
-    {
-        for (i = 0; i < sbr->N_Q; i++)
-        {
-            for (m = sbr->f_table_noise[i]; m < sbr->f_table_noise[i+1]; m++)
-            {
-                uint8_t k;
-
-                adj->Q_mapped[m - sbr->kx][l] = 0;
-
-                for (k = 0; k < 2; k++)
-                {
-                    if ((sbr->t_E[ch][l] >= sbr->t_Q[ch][k]) &&
-                        (sbr->t_E[ch][l+1] <= sbr->t_Q[ch][k+1]))
-                    {
-                        adj->Q_mapped[m - sbr->kx][l] =
-                            sbr->Q_orig[ch][i][k];
-                    }
-                }
-            }
-        }
-    }
-}
-
-static void map_sinusoids(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
-{
-    uint8_t l, i, m, k, k1, k2, delta_S, l_i, u_i;
-
     if (sbr->bs_frame_class[ch] == FIXFIX)
     {
         sbr->l_A[ch] = -1;
@@ -124,82 +74,57 @@
             sbr->l_A[ch] = sbr->L_E[ch] + 1 - sbr->bs_pointer[ch];
     }
 
-    for (l = 0; l < 5; l++)
+    estimate_current_envelope(sbr, &adj, Xsbr, ch);
+
+    calculate_gain(sbr, &adj, ch);
+
+#ifdef SBR_LOW_POWER
+    calc_gain_groups(sbr, &adj, deg, ch);
+    aliasing_reduction(sbr, &adj, deg, ch);
+#endif
+
+    hf_assembly(sbr, &adj, Xsbr, ch);
+}
+
+static uint8_t get_S_mapped(sbr_info *sbr, uint8_t ch, uint8_t l, uint8_t current_band)
+{
+    if (sbr->f[ch][l] == HI_RES)
     {
-        for (i = 0; i < 64; i++)
+        /* in case of using f_table_high we just have 1 to 1 mapping
+         * from bs_add_harmonic[l][k]
+         */
+        if ((l >= sbr->l_A[ch]) ||
+            (sbr->bs_add_harmonic_prev[ch][current_band] && sbr->bs_add_harmonic_flag_prev[ch]))
         {
-            adj->S_index_mapped[i][l] = 0;
-            adj->S_mapped[i][l] = 0;
+            return sbr->bs_add_harmonic[ch][current_band];
         }
-    }
+    } else {
+        uint8_t b, lb, ub;
+
+        /* in case of f_table_low we check if any of the HI_RES bands
+         * within this LO_RES band has bs_add_harmonic[l][k] turned on
+         * (note that borders in the LO_RES table are also present in
+         * the HI_RES table)
+         */
 
-    for (l = 0; l < sbr->L_E[ch]; l++)
-    {
-        for (i = 0; i < sbr->N_high; i++)
+        /* find first HI_RES band in current LO_RES band */
+        lb = 2*current_band - ((sbr->N_high & 1) ? 1 : 0);
+        /* find first HI_RES band in next LO_RES band */
+        ub = 2*(current_band+1) - ((sbr->N_high & 1) ? 1 : 0);
+
+        /* check all HI_RES bands in current LO_RES band for sinusoid */
+        for (b = lb; b < ub; b++)
         {
-            for (m = sbr->f_table_res[HI_RES][i]; m < sbr->f_table_res[HI_RES][i+1]; m++)
+            if ((l >= sbr->l_A[ch]) ||
+                (sbr->bs_add_harmonic_prev[ch][b] && sbr->bs_add_harmonic_flag_prev[ch]))
             {
-                uint8_t delta_step = 0;
-                if ((l >= sbr->l_A[ch]) || ((sbr->bs_add_harmonic_prev[ch][i]) &&
-                    (sbr->bs_add_harmonic_flag_prev[ch])))
-                {
-                    delta_step = 1;
-                }
-
-                if (m == (int32_t)((real_t)(sbr->f_table_res[HI_RES][i+1]+sbr->f_table_res[HI_RES][i])/2.))
-                {
-                    adj->S_index_mapped[m - sbr->kx][l] =
-                        delta_step * sbr->bs_add_harmonic[ch][i];
-                } else {
-                    adj->S_index_mapped[m - sbr->kx][l] = 0;
-                }
+                if (sbr->bs_add_harmonic[ch][b] == 1)
+                    return 1;
             }
         }
     }
 
-    for (l = 0; l < sbr->L_E[ch]; l++)
-    {
-        for (i = 0; i < sbr->N_high; i++)
-        {
-            if (sbr->f[ch][l] == 1)
-            {
-                k1 = i;
-                k2 = i + 1;
-            } else {
-                for (k1 = 0; k1 < sbr->N_low; k1++)
-                {
-                    if ((sbr->f_table_res[HI_RES][i] >= sbr->f_table_res[LO_RES][k1]) &&
-                        (sbr->f_table_res[HI_RES][i+1] <= sbr->f_table_res[LO_RES][k1+1]))
-                    {
-                        break;
-                    }
-                }
-                for (k2 = 0; k2 < sbr->N_low; k2++)
-                {
-                    if ((sbr->f_table_res[HI_RES][i+1] >= sbr->f_table_res[LO_RES][k2]) &&
-                        (sbr->f_table_res[HI_RES][i+2] <= sbr->f_table_res[LO_RES][k2+1]))
-                    {
-                        break;
-                    }
-                }
-            }
-
-            l_i = sbr->f_table_res[sbr->f[ch][l]][k1];
-            u_i = sbr->f_table_res[sbr->f[ch][l]][k2];
-
-            delta_S = 0;
-            for (k = l_i; k < u_i; k++)
-            {
-                if (adj->S_index_mapped[k - sbr->kx][l] == 1)
-                    delta_S = 1;
-            }
-
-            for (m = l_i; m < u_i; m++)
-            {
-                adj->S_mapped[m - sbr->kx][l] = delta_S;
-            }
-        }
-    }
+    return 0;
 }
 
 static void estimate_current_envelope(sbr_info *sbr, sbr_hfadj_info *adj,
@@ -225,17 +150,30 @@
 
                 for (i = l_i + sbr->tHFAdj; i < u_i + sbr->tHFAdj; i++)
                 {
+#ifdef FIXED_POINT
+#ifdef SBR_LOW_POWER
+                    nrg += ((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS);
+#else
+                    nrg += ((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS) +
+                        ((QMF_IM(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_IM(Xsbr[i][m + sbr->kx])+(1<<(REAL_BITS-1)))>>REAL_BITS);
+#endif
+#else
                     nrg += MUL_R(QMF_RE(Xsbr[i][m + sbr->kx]), QMF_RE(Xsbr[i][m + sbr->kx]))
 #ifndef SBR_LOW_POWER
                         + MUL_R(QMF_IM(Xsbr[i][m + sbr->kx]), QMF_IM(Xsbr[i][m + sbr->kx]))
 #endif
                         ;
+#endif
                 }
 
                 sbr->E_curr[ch][m][l] = nrg / div;
 #ifdef SBR_LOW_POWER
+#ifdef FIXED_POINT
+                sbr->E_curr[ch][m][l] <<= 1;
+#else
                 sbr->E_curr[ch][m][l] *= 2;
 #endif
+#endif
             }
         }
     } else {
@@ -249,7 +187,7 @@
                 for (k = k_l; k < k_h; k++)
                 {
                     uint8_t i, l_i, u_i;
-                    nrg = 0.0;
+                    nrg = 0;
 
                     l_i = sbr->t_E[ch][l];
                     u_i = sbr->t_E[ch][l+1];
@@ -260,52 +198,972 @@
                     {
                         for (j = k_l; j < k_h; j++)
                         {
+#ifdef FIXED_POINT
+#ifdef SBR_LOW_POWER
+                            nrg += ((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS);
+#else
+                            nrg += ((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_RE(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS) +
+                                ((QMF_IM(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS)*((QMF_IM(Xsbr[i][j])+(1<<(REAL_BITS-1)))>>REAL_BITS);
+#endif
+#else
                             nrg += MUL_R(QMF_RE(Xsbr[i][j]), QMF_RE(Xsbr[i][j]))
 #ifndef SBR_LOW_POWER
                                 + MUL_R(QMF_IM(Xsbr[i][j]), QMF_IM(Xsbr[i][j]))
 #endif
                                 ;
+#endif
                         }
                     }
 
                     sbr->E_curr[ch][k - sbr->kx][l] = nrg / div;
 #ifdef SBR_LOW_POWER
+#ifdef FIXED_POINT
+                    sbr->E_curr[ch][k - sbr->kx][l] <<= 1;
+#else
                     sbr->E_curr[ch][k - sbr->kx][l] *= 2;
 #endif
+#endif
                 }
             }
         }
     }
 }
 
+#ifdef FIXED_POINT
+#define EPS (1) /* smallest number available in fixed point */
+#else
+#define EPS (1e-12)
+#endif
 
-#define EPS (1e-12)
+
+
+#ifdef FIXED_POINT
+
+/* log2 values of [0..63] */
+static const real_t log2_int_tab[] = {
+    LOG2_MIN_INF, REAL_CONST(0.000000000000000), REAL_CONST(1.000000000000000), REAL_CONST(1.584962500721156),
+    REAL_CONST(2.000000000000000), REAL_CONST(2.321928094887362), REAL_CONST(2.584962500721156), REAL_CONST(2.807354922057604),
+    REAL_CONST(3.000000000000000), REAL_CONST(3.169925001442313), REAL_CONST(3.321928094887363), REAL_CONST(3.459431618637297),
+    REAL_CONST(3.584962500721156), REAL_CONST(3.700439718141092), REAL_CONST(3.807354922057604), REAL_CONST(3.906890595608519),
+    REAL_CONST(4.000000000000000), REAL_CONST(4.087462841250339), REAL_CONST(4.169925001442312), REAL_CONST(4.247927513443585),
+    REAL_CONST(4.321928094887362), REAL_CONST(4.392317422778761), REAL_CONST(4.459431618637297), REAL_CONST(4.523561956057013),
+    REAL_CONST(4.584962500721156), REAL_CONST(4.643856189774724), REAL_CONST(4.700439718141093), REAL_CONST(4.754887502163468),
+    REAL_CONST(4.807354922057604), REAL_CONST(4.857980995127572), REAL_CONST(4.906890595608519), REAL_CONST(4.954196310386875),
+    REAL_CONST(5.000000000000000), REAL_CONST(5.044394119358453), REAL_CONST(5.087462841250340), REAL_CONST(5.129283016944966),
+    REAL_CONST(5.169925001442312), REAL_CONST(5.209453365628949), REAL_CONST(5.247927513443585), REAL_CONST(5.285402218862248),
+    REAL_CONST(5.321928094887363), REAL_CONST(5.357552004618084), REAL_CONST(5.392317422778761), REAL_CONST(5.426264754702098),
+    REAL_CONST(5.459431618637297), REAL_CONST(5.491853096329675), REAL_CONST(5.523561956057013), REAL_CONST(5.554588851677637),
+    REAL_CONST(5.584962500721156), REAL_CONST(5.614709844115208), REAL_CONST(5.643856189774724), REAL_CONST(5.672425341971495),
+    REAL_CONST(5.700439718141093), REAL_CONST(5.727920454563200), REAL_CONST(5.754887502163469), REAL_CONST(5.781359713524660),
+    REAL_CONST(5.807354922057605), REAL_CONST(5.832890014164742), REAL_CONST(5.857980995127572), REAL_CONST(5.882643049361842),
+    REAL_CONST(5.906890595608518), REAL_CONST(5.930737337562887), REAL_CONST(5.954196310386876), REAL_CONST(5.977279923499916)
+};
+
+static const real_t pan_log2_tab[] = {
+    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362), REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339),
+    REAL_CONST(0.044394119358453), REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878), REAL_CONST(0.002815015607054),
+    REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247), REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122),
+    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667)
+};
+
+static real_t find_log2_E(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
+{
+    /* check for coupled energy/noise data */
+    if (sbr->bs_coupling == 1)
+    {
+        uint8_t amp0 = (sbr->amp_res[0]) ? 0 : 1;
+        uint8_t amp1 = (sbr->amp_res[1]) ? 0 : 1;
+        real_t tmp = (7 << REAL_BITS) + (sbr->E[0][k][l] << (REAL_BITS-amp0));
+        real_t pan;
+
+        /* E[1] should always be even so shifting is OK */
+        uint8_t E = sbr->E[1][k][l] >> amp1;
+
+        if (ch == 0)
+        {
+            if (E > 12)
+            {
+                /* negative */
+                pan = pan_log2_tab[-12 + E];
+            } else {
+                /* positive */
+                pan = pan_log2_tab[12 - E] + ((12 - E)<<REAL_BITS);
+            }
+        } else {
+            if (E < 12)
+            {
+                /* negative */
+                pan = pan_log2_tab[-E + 12];
+            } else {
+                /* positive */
+                pan = pan_log2_tab[E - 12] + ((E - 12)<<REAL_BITS);
+            }
+        }
+
+        /* tmp / pan in log2 */
+        return tmp - pan;
+    } else {
+        uint8_t amp = (sbr->amp_res[ch]) ? 0 : 1;
+
+        return (6 << REAL_BITS) + (sbr->E[ch][k][l] << (REAL_BITS-amp));
+    }
+}
+
+static real_t find_log2_Q(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
+{
+    /* check for coupled energy/noise data */
+    if (sbr->bs_coupling == 1)
+    {
+        real_t tmp = (7 << REAL_BITS) - (sbr->Q[0][k][l] << REAL_BITS);
+        real_t pan;
+
+        uint8_t Q = sbr->Q[1][k][l];
+
+        if (ch == 0)
+        {
+            if (Q > 12)
+            {
+                /* negative */
+                pan = pan_log2_tab[-12 + Q];
+            } else {
+                /* positive */
+                pan = pan_log2_tab[12 - Q] + ((12 - Q)<<REAL_BITS);
+            }
+        } else {
+            if (Q < 12)
+            {
+                /* negative */
+                pan = pan_log2_tab[-Q + 12];
+            } else {
+                /* positive */
+                pan = pan_log2_tab[Q - 12] + ((Q - 12)<<REAL_BITS);
+            }
+        }
+
+        /* tmp / pan in log2 */
+        return tmp - pan;
+    } else {
+        return (6 << REAL_BITS) - (sbr->Q[ch][k][l] << REAL_BITS);
+    }
+}
+
+static const real_t log_Qplus1_pan[31][13] = {
+    { REAL_CONST(0.044383447617292), REAL_CONST(0.169768601655960), REAL_CONST(0.583090126514435), REAL_CONST(1.570089221000671), REAL_CONST(3.092446088790894), REAL_CONST(4.733354568481445), REAL_CONST(6.022367954254150), REAL_CONST(6.692092418670654), REAL_CONST(6.924463272094727), REAL_CONST(6.989034175872803), REAL_CONST(7.005646705627441), REAL_CONST(7.009829998016357), REAL_CONST(7.010877609252930) },
+    { REAL_CONST(0.022362394258380), REAL_CONST(0.087379962205887), REAL_CONST(0.320804953575134), REAL_CONST(0.988859415054321), REAL_CONST(2.252387046813965), REAL_CONST(3.786596298217773), REAL_CONST(5.044394016265869), REAL_CONST(5.705977916717529), REAL_CONST(5.936291694641113), REAL_CONST(6.000346660614014), REAL_CONST(6.016829967498779), REAL_CONST(6.020981311798096), REAL_CONST(6.022020816802979) },
+    { REAL_CONST(0.011224525049329), REAL_CONST(0.044351425021887), REAL_CONST(0.169301137328148), REAL_CONST(0.577544987201691), REAL_CONST(1.527246952056885), REAL_CONST(2.887525320053101), REAL_CONST(4.087462902069092), REAL_CONST(4.733354568481445), REAL_CONST(4.959661006927490), REAL_CONST(5.022709369659424), REAL_CONST(5.038940429687500), REAL_CONST(5.043028831481934), REAL_CONST(5.044052600860596) },
+    { REAL_CONST(0.005623178556561), REAL_CONST(0.022346137091517), REAL_CONST(0.087132595479488), REAL_CONST(0.317482173442841), REAL_CONST(0.956931233406067), REAL_CONST(2.070389270782471), REAL_CONST(3.169924974441528), REAL_CONST(3.786596298217773), REAL_CONST(4.005294322967529), REAL_CONST(4.066420555114746), REAL_CONST(4.082170009613037), REAL_CONST(4.086137294769287), REAL_CONST(4.087131500244141) },
+    { REAL_CONST(0.002814328996465), REAL_CONST(0.011216334067285), REAL_CONST(0.044224001467228), REAL_CONST(0.167456731200218), REAL_CONST(0.556393325328827), REAL_CONST(1.378511548042297), REAL_CONST(2.321928024291992), REAL_CONST(2.887525320053101), REAL_CONST(3.092446088790894), REAL_CONST(3.150059700012207), REAL_CONST(3.164926528930664), REAL_CONST(3.168673276901245), REAL_CONST(3.169611930847168) },
+    { REAL_CONST(0.001407850766554), REAL_CONST(0.005619067233056), REAL_CONST(0.022281449288130), REAL_CONST(0.086156636476517), REAL_CONST(0.304854571819305), REAL_CONST(0.847996890544891), REAL_CONST(1.584962487220764), REAL_CONST(2.070389270782471), REAL_CONST(2.252387046813965), REAL_CONST(2.304061651229858), REAL_CONST(2.317430257797241), REAL_CONST(2.320801734924316), REAL_CONST(2.321646213531494) },
+    { REAL_CONST(0.000704097095877), REAL_CONST(0.002812269143760), REAL_CONST(0.011183738708496), REAL_CONST(0.043721374124289), REAL_CONST(0.160464659333229), REAL_CONST(0.485426813364029), REAL_CONST(1.000000000000000), REAL_CONST(1.378511548042297), REAL_CONST(1.527246952056885), REAL_CONST(1.570089221000671), REAL_CONST(1.581215262413025), REAL_CONST(1.584023833274841), REAL_CONST(1.584727644920349) },
+    { REAL_CONST(0.000352177477907), REAL_CONST(0.001406819908880), REAL_CONST(0.005602621007711), REAL_CONST(0.022026389837265), REAL_CONST(0.082462236285210), REAL_CONST(0.263034462928772), REAL_CONST(0.584962487220764), REAL_CONST(0.847996890544891), REAL_CONST(0.956931233406067), REAL_CONST(0.988859415054321), REAL_CONST(0.997190535068512), REAL_CONST(0.999296069145203), REAL_CONST(0.999823868274689) },
+    { REAL_CONST(0.000176099492819), REAL_CONST(0.000703581434209), REAL_CONST(0.002804030198604), REAL_CONST(0.011055230163038), REAL_CONST(0.041820213198662), REAL_CONST(0.137503549456596), REAL_CONST(0.321928083896637), REAL_CONST(0.485426813364029), REAL_CONST(0.556393325328827), REAL_CONST(0.577544987201691), REAL_CONST(0.583090126514435), REAL_CONST(0.584493279457092), REAL_CONST(0.584845066070557) },
+    { REAL_CONST(0.000088052431238), REAL_CONST(0.000351833587047), REAL_CONST(0.001402696361765), REAL_CONST(0.005538204684854), REAL_CONST(0.021061634644866), REAL_CONST(0.070389263331890), REAL_CONST(0.169925004243851), REAL_CONST(0.263034462928772), REAL_CONST(0.304854571819305), REAL_CONST(0.317482173442841), REAL_CONST(0.320804953575134), REAL_CONST(0.321646571159363), REAL_CONST(0.321857661008835) },
+    { REAL_CONST(0.000044026888645), REAL_CONST(0.000175927518285), REAL_CONST(0.000701518612914), REAL_CONST(0.002771759871393), REAL_CONST(0.010569252073765), REAL_CONST(0.035623874515295), REAL_CONST(0.087462842464447), REAL_CONST(0.137503549456596), REAL_CONST(0.160464659333229), REAL_CONST(0.167456731200218), REAL_CONST(0.169301137328148), REAL_CONST(0.169768601655960), REAL_CONST(0.169885858893394) },
+    { REAL_CONST(0.000022013611670), REAL_CONST(0.000088052431238), REAL_CONST(0.000350801943569), REAL_CONST(0.001386545598507), REAL_CONST(0.005294219125062), REAL_CONST(0.017921976745129), REAL_CONST(0.044394120573997), REAL_CONST(0.070389263331890), REAL_CONST(0.082462236285210), REAL_CONST(0.086156636476517), REAL_CONST(0.087132595479488), REAL_CONST(0.087379962205887), REAL_CONST(0.087442122399807) },
+    { REAL_CONST(0.000011006847672), REAL_CONST(0.000044026888645), REAL_CONST(0.000175411638338), REAL_CONST(0.000693439331371), REAL_CONST(0.002649537986144), REAL_CONST(0.008988817222416), REAL_CONST(0.022367812693119), REAL_CONST(0.035623874515295), REAL_CONST(0.041820213198662), REAL_CONST(0.043721374124289), REAL_CONST(0.044224001467228), REAL_CONST(0.044351425021887), REAL_CONST(0.044383447617292) },
+    { REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000087708482170), REAL_CONST(0.000346675369656), REAL_CONST(0.001325377263129), REAL_CONST(0.004501323681325), REAL_CONST(0.011227255687118), REAL_CONST(0.017921976745129), REAL_CONST(0.021061634644866), REAL_CONST(0.022026389837265), REAL_CONST(0.022281449288130), REAL_CONST(0.022346137091517), REAL_CONST(0.022362394258380) },
+    { REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043854910473), REAL_CONST(0.000173348103999), REAL_CONST(0.000662840844598), REAL_CONST(0.002252417383716), REAL_CONST(0.005624548997730), REAL_CONST(0.008988817222416), REAL_CONST(0.010569252073765), REAL_CONST(0.011055230163038), REAL_CONST(0.011183738708496), REAL_CONST(0.011216334067285), REAL_CONST(0.011224525049329) },
+    { REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000086676649516), REAL_CONST(0.000331544462824), REAL_CONST(0.001126734190620), REAL_CONST(0.002815015614033), REAL_CONST(0.004501323681325), REAL_CONST(0.005294219125062), REAL_CONST(0.005538204684854), REAL_CONST(0.005602621007711), REAL_CONST(0.005619067233056), REAL_CONST(0.005623178556561) },
+    { REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043338975956), REAL_CONST(0.000165781748365), REAL_CONST(0.000563477107789), REAL_CONST(0.001408194424585), REAL_CONST(0.002252417383716), REAL_CONST(0.002649537986144), REAL_CONST(0.002771759871393), REAL_CONST(0.002804030198604), REAL_CONST(0.002812269143760), REAL_CONST(0.002814328996465) },
+    { REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000021669651687), REAL_CONST(0.000082893253420), REAL_CONST(0.000281680084299), REAL_CONST(0.000704268983100), REAL_CONST(0.001126734190620), REAL_CONST(0.001325377263129), REAL_CONST(0.001386545598507), REAL_CONST(0.001402696361765), REAL_CONST(0.001406819908880), REAL_CONST(0.001407850766554) },
+    { REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010834866771), REAL_CONST(0.000041447223339), REAL_CONST(0.000140846910654), REAL_CONST(0.000352177477907), REAL_CONST(0.000563477107789), REAL_CONST(0.000662840844598), REAL_CONST(0.000693439331371), REAL_CONST(0.000701518612914), REAL_CONST(0.000703581434209), REAL_CONST(0.000704097095877) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000020637769921), REAL_CONST(0.000070511166996), REAL_CONST(0.000176099492819), REAL_CONST(0.000281680084299), REAL_CONST(0.000331544462824), REAL_CONST(0.000346675369656), REAL_CONST(0.000350801943569), REAL_CONST(0.000351833587047), REAL_CONST(0.000352177477907) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010318922250), REAL_CONST(0.000035256012779), REAL_CONST(0.000088052431238), REAL_CONST(0.000140846910654), REAL_CONST(0.000165781748365), REAL_CONST(0.000173348103999), REAL_CONST(0.000175411638338), REAL_CONST(0.000175927518285), REAL_CONST(0.000176099492819) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005159470220), REAL_CONST(0.000017542124624), REAL_CONST(0.000044026888645), REAL_CONST(0.000070511166996), REAL_CONST(0.000082893253420), REAL_CONST(0.000086676649516), REAL_CONST(0.000087708482170), REAL_CONST(0.000088052431238), REAL_CONST(0.000088052431238) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002579737384), REAL_CONST(0.000008771088687), REAL_CONST(0.000022013611670), REAL_CONST(0.000035256012779), REAL_CONST(0.000041447223339), REAL_CONST(0.000043338975956), REAL_CONST(0.000043854910473), REAL_CONST(0.000044026888645), REAL_CONST(0.000044026888645) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000004471542070), REAL_CONST(0.000011006847672), REAL_CONST(0.000017542124624), REAL_CONST(0.000020637769921), REAL_CONST(0.000021669651687), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002235772627), REAL_CONST(0.000005503434295), REAL_CONST(0.000008771088687), REAL_CONST(0.000010318922250), REAL_CONST(0.000010834866771), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001031895522), REAL_CONST(0.000002751719876), REAL_CONST(0.000004471542070), REAL_CONST(0.000005159470220), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000515947875), REAL_CONST(0.000001375860506), REAL_CONST(0.000002235772627), REAL_CONST(0.000002579737384), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000000687930424), REAL_CONST(0.000001031895522), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000515947875), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634) }
+};
+
+static const real_t log_Qplus1[31] = {
+    REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339), 
+    REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156), 
+    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362), 
+    REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453), 
+    REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878), 
+    REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247), 
+    REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122), 
+    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667), 
+    REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551), 
+    REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641), 
+    REAL_CONST(0.000000000000000)
+};
+
+static real_t find_log2_Qplus1(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
+{
+    /* check for coupled energy/noise data */
+    if (sbr->bs_coupling == 1)
+    {
+        if ((sbr->Q[0][k][l] >= 0) && (sbr->Q[0][k][l] <= 30) &&
+            (sbr->Q[1][k][l] >= 0) && (sbr->Q[1][k][l] <= 24))
+        {
+            if (ch == 0)
+            {
+                return log_Qplus1_pan[sbr->Q[0][k][l]][sbr->Q[1][k][l] >> 1];
+            } else {
+                return log_Qplus1_pan[sbr->Q[0][k][l]][12 - (sbr->Q[1][k][l] >> 1)];
+            }
+        } else {
+            return 0;
+        }
+    } else {
+        if (sbr->Q[ch][k][l] >= 0 && sbr->Q[ch][k][l] <= 30)
+        {
+            return log_Qplus1[sbr->Q[ch][k][l]];
+        } else {
+            return 0;
+        }
+    }
+}
+
+static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
+{
+    /* log2 values of limiter gains */
+    static real_t limGain[] = {
+        REAL_CONST(-1.0), REAL_CONST(0.0), REAL_CONST(1.0), REAL_CONST(33.219)
+    };
+    uint8_t m, l, k;
+
+    uint8_t current_t_noise_band = 0;
+    uint8_t S_mapped;
+
+    ALIGN real_t Q_M_lim[MAX_M];
+    ALIGN real_t G_lim[MAX_M];
+    ALIGN real_t G_boost;
+    ALIGN real_t S_M[MAX_M];
+
+
+    for (l = 0; l < sbr->L_E[ch]; l++)
+    {
+        uint8_t current_f_noise_band = 0;
+        uint8_t current_res_band = 0;
+        uint8_t current_res_band2 = 0;
+        uint8_t current_hi_res_band = 0;
+
+        real_t delta = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 0 : 1;
+
+        S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
+
+        if (sbr->t_E[ch][l+1] > sbr->t_Q[ch][current_t_noise_band+1])
+        {
+            current_t_noise_band++;
+        }
+
+        for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
+        {
+            real_t Q_M = 0;
+            real_t G_max;
+            real_t den = 0;
+            real_t acc1 = 0;
+            real_t acc2 = 0;
+            uint8_t current_res_band_size = 0;
+            uint8_t Q_M_size = 0;
+
+            uint8_t ml1, ml2;
+
+            /* bounds of current limiter bands */
+            ml1 = sbr->f_table_lim[sbr->bs_limiter_bands][k];
+            ml2 = sbr->f_table_lim[sbr->bs_limiter_bands][k+1];
+
+
+            /* calculate the accumulated E_orig and E_curr over the limiter band */
+            for (m = ml1; m < ml2; m++)
+            {
+                if ((m + sbr->kx) < sbr->f_table_res[sbr->f[ch][l]][current_res_band+1])
+                {
+                    current_res_band_size++;
+                } else {
+                    acc1 += pow2_int(-REAL_CONST(10) + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch));
+
+                    current_res_band++;
+                    current_res_band_size = 1;
+                }
+
+                acc2 += sbr->E_curr[ch][m][l];
+            }
+            acc1 += pow2_int(-REAL_CONST(10) + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch));
+
+
+            if (acc1 == 0)
+                acc1 = LOG2_MIN_INF;
+            else
+                acc1 = log2_int(acc1);
+
+
+            /* calculate the maximum gain */
+            /* ratio of the energy of the original signal and the energy
+             * of the HF generated signal
+             */
+            G_max = acc1 - log2_int(acc2) + limGain[sbr->bs_limiter_gains];
+            G_max = min(G_max, limGain[3]);
+
+
+            for (m = ml1; m < ml2; m++)
+            {
+                real_t G;
+                real_t E_curr, E_orig;
+                real_t Q_orig, Q_orig_plus1;
+                uint8_t S_index_mapped;
+
+
+                /* check if m is on a noise band border */
+                if ((m + sbr->kx) == sbr->f_table_noise[current_f_noise_band+1])
+                {
+                    /* step to next noise band */
+                    current_f_noise_band++;
+                }
+
+
+                /* check if m is on a resolution band border */
+                if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band2+1])
+                {
+                    /* accumulate a whole range of equal Q_Ms */
+                    if (Q_M_size > 0)
+                        den += pow2_int(log2_int_tab[Q_M_size] + Q_M);
+                    Q_M_size = 0;
+
+                    /* step to next resolution band */
+                    current_res_band2++;
+
+                    /* if we move to a new resolution band, we should check if we are
+                     * going to add a sinusoid in this band
+                     */
+                    S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
+                }
+
+
+                /* check if m is on a HI_RES band border */
+                if ((m + sbr->kx) == sbr->f_table_res[HI_RES][current_hi_res_band+1])
+                {
+                    /* step to next HI_RES band */
+                    current_hi_res_band++;
+                }
+
+
+                /* find S_index_mapped
+                 * S_index_mapped can only be 1 for the m in the middle of the
+                 * current HI_RES band
+                 */
+                S_index_mapped = 0;
+                if ((l >= sbr->l_A[ch]) ||
+                    (sbr->bs_add_harmonic_prev[ch][current_hi_res_band] && sbr->bs_add_harmonic_flag_prev[ch]))
+                {
+                    /* find the middle subband of the HI_RES frequency band */
+                    if ((m + sbr->kx) == (sbr->f_table_res[HI_RES][current_hi_res_band+1] + sbr->f_table_res[HI_RES][current_hi_res_band]) >> 1)
+                        S_index_mapped = sbr->bs_add_harmonic[ch][current_hi_res_band];
+                }
+
+
+                /* find bitstream parameters */
+                if (sbr->E_curr[ch][m][l] == 0)
+                    E_curr = LOG2_MIN_INF;
+                else
+                    E_curr = log2_int(sbr->E_curr[ch][m][l]);
+                E_orig = -REAL_CONST(10) + find_log2_E(sbr, current_res_band2, l, ch);
+
+
+                Q_orig = find_log2_Q(sbr, current_f_noise_band, current_t_noise_band, ch);
+                Q_orig_plus1 = find_log2_Qplus1(sbr, current_f_noise_band, current_t_noise_band, ch);
+
+
+                /* Q_M only depends on E_orig and Q_div2:
+                 * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on
+                 * a change of current res band (HI or LO)
+                 */
+                Q_M = E_orig + Q_orig - Q_orig_plus1;
+
+
+                /* S_M only depends on E_orig, Q_div and S_index_mapped:
+                 * S_index_mapped can only be non-zero once per HI_RES band
+                 */
+                if (S_index_mapped == 0)
+                {
+                    S_M[m] = LOG2_MIN_INF; /* -inf */
+                } else {
+                    S_M[m] = E_orig - Q_orig_plus1;
+
+                    /* accumulate sinusoid part of the total energy */
+                    den += pow2_int(S_M[m]);
+                }
+
+
+                /* calculate gain */
+                /* ratio of the energy of the original signal and the energy
+                 * of the HF generated signal
+                 */
+                /* E_curr here is officially E_curr+1 so the log2() of that can never be < 0 */
+                /* scaled by -10 */
+                G = E_orig - max(-REAL_CONST(10), E_curr);
+                if ((S_mapped == 0) && (delta == 1))
+                {
+                    /* G = G * 1/(1+Q) */
+                    G -= Q_orig_plus1;
+                } else if (S_mapped == 1) {
+                    /* G = G * Q/(1+Q) */
+                    G += Q_orig - Q_orig_plus1;
+                }
+
+
+                /* limit the additional noise energy level */
+                /* and apply the limiter */
+                if (G_max > G)
+                {
+                    Q_M_lim[m] = Q_M;
+                    G_lim[m] = G;
+
+                    if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
+                    {
+                        Q_M_size++;
+                    }
+                } else {
+                    /* G > G_max */
+                    Q_M_lim[m] = Q_M + G_max - G;
+                    G_lim[m] = G_max;
+
+                    /* accumulate limited Q_M */
+                    if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
+                    {
+                        den += pow2_int(Q_M_lim[m]);
+                    }
+                }
+
+
+                /* accumulate the total energy */
+                /* E_curr changes for every m so we do need to accumulate every m */
+                den += pow2_int(E_curr + G_lim[m]);
+            }
+
+            /* accumulate last range of equal Q_Ms */
+            if (Q_M_size > 0)
+            {
+                den += pow2_int(log2_int_tab[Q_M_size] + Q_M);
+            }
+
+
+            /* calculate the final gain */
+            /* G_boost: [0..2.51188643] */
+            G_boost = acc1 - log2_int(den /*+ EPS*/);
+            G_boost = min(G_boost, REAL_CONST(1.328771237) /* log2(1.584893192 ^ 2) */);
+
+
+            for (m = ml1; m < ml2; m++)
+            {
+                /* apply compensation to gain, noise floor sf's and sinusoid levels */
+#ifndef SBR_LOW_POWER
+                adj->G_lim_boost[l][m] = pow2_fix((G_lim[m] + G_boost) >> 1);
+#else
+                /* sqrt() will be done after the aliasing reduction to save a
+                 * few multiplies
+                 */
+                adj->G_lim_boost[l][m] = pow2_fix(G_lim[m] + G_boost);
+#endif
+                adj->Q_M_lim_boost[l][m] = pow2_fix((Q_M_lim[m] + G_boost) >> 1);
+
+                if (S_M[m] != LOG2_MIN_INF)
+                {
+                    adj->S_M_boost[l][m] = pow2_int((S_M[m] + G_boost) >> 1);
+                } else {
+                    adj->S_M_boost[l][m] = 0;
+                }
+            }
+        }
+    }
+}
+
+#else
+
+//#define LOG2_TEST
+
+#ifdef LOG2_TEST
 
-#define ONE (1)
+#define LOG2_MIN_INF -100000
+
+__inline float pow2(float val)
+{
+    return pow(2.0, val);
+}
+__inline float log2(float val)
+{
+    return log(val)/log(2.0);
+}
+
+#define RB 14
+
+float QUANTISE2REAL(float val)
+{
+    __int32 ival = (__int32)(val * (1<<RB));
+    return (float)ival / (float)((1<<RB));
+}
+
+float QUANTISE2INT(float val)
+{
+    return floor(val);
+}
+
+/* log2 values of [0..63] */
+static const real_t log2_int_tab[] = {
+    LOG2_MIN_INF,      0.000000000000000, 1.000000000000000, 1.584962500721156,
+    2.000000000000000, 2.321928094887362, 2.584962500721156, 2.807354922057604,
+    3.000000000000000, 3.169925001442313, 3.321928094887363, 3.459431618637297,
+    3.584962500721156, 3.700439718141092, 3.807354922057604, 3.906890595608519,
+    4.000000000000000, 4.087462841250339, 4.169925001442312, 4.247927513443585,
+    4.321928094887362, 4.392317422778761, 4.459431618637297, 4.523561956057013,
+    4.584962500721156, 4.643856189774724, 4.700439718141093, 4.754887502163468,
+    4.807354922057604, 4.857980995127572, 4.906890595608519, 4.954196310386875,
+    5.000000000000000, 5.044394119358453, 5.087462841250340, 5.129283016944966,
+    5.169925001442312, 5.209453365628949, 5.247927513443585, 5.285402218862248,
+    5.321928094887363, 5.357552004618084, 5.392317422778761, 5.426264754702098,
+    5.459431618637297, 5.491853096329675, 5.523561956057013, 5.554588851677637,
+    5.584962500721156, 5.614709844115208, 5.643856189774724, 5.672425341971495,
+    5.700439718141093, 5.727920454563200, 5.754887502163469, 5.781359713524660,
+    5.807354922057605, 5.832890014164742, 5.857980995127572, 5.882643049361842,
+    5.906890595608518, 5.930737337562887, 5.954196310386876, 5.977279923499916
+};
+
+static const real_t pan_log2_tab[] = {
+    1.000000000000000, 0.584962500721156, 0.321928094887362, 0.169925001442312, 0.087462841250339,
+    0.044394119358453, 0.022367813028455, 0.011227255423254, 0.005624549193878, 0.002815015607054,
+    0.001408194392808, 0.000704269011247, 0.000352177480301, 0.000176099486443, 0.000088052430122,
+    0.000044026886827, 0.000022013611360, 0.000011006847667
+};
+
+static real_t find_log2_E(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
+{
+    /* check for coupled energy/noise data */
+    if (sbr->bs_coupling == 1)
+    {
+        real_t amp0 = (sbr->amp_res[0]) ? 1.0 : 0.5;
+        real_t amp1 = (sbr->amp_res[1]) ? 1.0 : 0.5;
+        float tmp = QUANTISE2REAL(7.0 + (real_t)sbr->E[0][k][l] * amp0);
+        float pan;
+
+        int E = (int)(sbr->E[1][k][l] * amp1);
+
+        if (ch == 0)
+        {
+            if (E > 12)
+            {
+                /* negative */
+                pan = QUANTISE2REAL(pan_log2_tab[-12 + E]);
+            } else {
+                /* positive */
+                pan = QUANTISE2REAL(pan_log2_tab[12 - E] + (12 - E));
+            }
+        } else {
+            if (E < 12)
+            {
+                /* negative */
+                pan = QUANTISE2REAL(pan_log2_tab[-E + 12]);
+            } else {
+                /* positive */
+                pan = QUANTISE2REAL(pan_log2_tab[E - 12] + (E - 12));
+            }
+        }
+
+        /* tmp / pan in log2 */
+        return QUANTISE2REAL(tmp - pan);
+    } else {
+        real_t amp = (sbr->amp_res[ch]) ? 1.0 : 0.5;
+
+        return QUANTISE2REAL(6.0 + (real_t)sbr->E[ch][k][l] * amp);
+    }
+}
+
+static real_t find_log2_Q(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
+{
+    /* check for coupled energy/noise data */
+    if (sbr->bs_coupling == 1)
+    {
+        float tmp = QUANTISE2REAL(7.0 - (real_t)sbr->Q[0][k][l]);
+        float pan;
+
+        int Q = (int)(sbr->Q[1][k][l]);
+
+        if (ch == 0)
+        {
+            if (Q > 12)
+            {
+                /* negative */
+                pan = QUANTISE2REAL(pan_log2_tab[-12 + Q]);
+            } else {
+                /* positive */
+                pan = QUANTISE2REAL(pan_log2_tab[12 - Q] + (12 - Q));
+            }
+        } else {
+            if (Q < 12)
+            {
+                /* negative */
+                pan = QUANTISE2REAL(pan_log2_tab[-Q + 12]);
+            } else {
+                /* positive */
+                pan = QUANTISE2REAL(pan_log2_tab[Q - 12] + (Q - 12));
+            }
+        }
+
+        /* tmp / pan in log2 */
+        return QUANTISE2REAL(tmp - pan);
+    } else {
+        return QUANTISE2REAL(6.0 - (real_t)sbr->Q[ch][k][l]);
+    }
+}
+
+static const real_t log_Qplus1_pan[31][13] = {
+    { REAL_CONST(0.044383447617292), REAL_CONST(0.169768601655960), REAL_CONST(0.583090126514435), REAL_CONST(1.570089221000671), REAL_CONST(3.092446088790894), REAL_CONST(4.733354568481445), REAL_CONST(6.022367954254150), REAL_CONST(6.692092418670654), REAL_CONST(6.924463272094727), REAL_CONST(6.989034175872803), REAL_CONST(7.005646705627441), REAL_CONST(7.009829998016357), REAL_CONST(7.010877609252930) },
+    { REAL_CONST(0.022362394258380), REAL_CONST(0.087379962205887), REAL_CONST(0.320804953575134), REAL_CONST(0.988859415054321), REAL_CONST(2.252387046813965), REAL_CONST(3.786596298217773), REAL_CONST(5.044394016265869), REAL_CONST(5.705977916717529), REAL_CONST(5.936291694641113), REAL_CONST(6.000346660614014), REAL_CONST(6.016829967498779), REAL_CONST(6.020981311798096), REAL_CONST(6.022020816802979) },
+    { REAL_CONST(0.011224525049329), REAL_CONST(0.044351425021887), REAL_CONST(0.169301137328148), REAL_CONST(0.577544987201691), REAL_CONST(1.527246952056885), REAL_CONST(2.887525320053101), REAL_CONST(4.087462902069092), REAL_CONST(4.733354568481445), REAL_CONST(4.959661006927490), REAL_CONST(5.022709369659424), REAL_CONST(5.038940429687500), REAL_CONST(5.043028831481934), REAL_CONST(5.044052600860596) },
+    { REAL_CONST(0.005623178556561), REAL_CONST(0.022346137091517), REAL_CONST(0.087132595479488), REAL_CONST(0.317482173442841), REAL_CONST(0.956931233406067), REAL_CONST(2.070389270782471), REAL_CONST(3.169924974441528), REAL_CONST(3.786596298217773), REAL_CONST(4.005294322967529), REAL_CONST(4.066420555114746), REAL_CONST(4.082170009613037), REAL_CONST(4.086137294769287), REAL_CONST(4.087131500244141) },
+    { REAL_CONST(0.002814328996465), REAL_CONST(0.011216334067285), REAL_CONST(0.044224001467228), REAL_CONST(0.167456731200218), REAL_CONST(0.556393325328827), REAL_CONST(1.378511548042297), REAL_CONST(2.321928024291992), REAL_CONST(2.887525320053101), REAL_CONST(3.092446088790894), REAL_CONST(3.150059700012207), REAL_CONST(3.164926528930664), REAL_CONST(3.168673276901245), REAL_CONST(3.169611930847168) },
+    { REAL_CONST(0.001407850766554), REAL_CONST(0.005619067233056), REAL_CONST(0.022281449288130), REAL_CONST(0.086156636476517), REAL_CONST(0.304854571819305), REAL_CONST(0.847996890544891), REAL_CONST(1.584962487220764), REAL_CONST(2.070389270782471), REAL_CONST(2.252387046813965), REAL_CONST(2.304061651229858), REAL_CONST(2.317430257797241), REAL_CONST(2.320801734924316), REAL_CONST(2.321646213531494) },
+    { REAL_CONST(0.000704097095877), REAL_CONST(0.002812269143760), REAL_CONST(0.011183738708496), REAL_CONST(0.043721374124289), REAL_CONST(0.160464659333229), REAL_CONST(0.485426813364029), REAL_CONST(1.000000000000000), REAL_CONST(1.378511548042297), REAL_CONST(1.527246952056885), REAL_CONST(1.570089221000671), REAL_CONST(1.581215262413025), REAL_CONST(1.584023833274841), REAL_CONST(1.584727644920349) },
+    { REAL_CONST(0.000352177477907), REAL_CONST(0.001406819908880), REAL_CONST(0.005602621007711), REAL_CONST(0.022026389837265), REAL_CONST(0.082462236285210), REAL_CONST(0.263034462928772), REAL_CONST(0.584962487220764), REAL_CONST(0.847996890544891), REAL_CONST(0.956931233406067), REAL_CONST(0.988859415054321), REAL_CONST(0.997190535068512), REAL_CONST(0.999296069145203), REAL_CONST(0.999823868274689) },
+    { REAL_CONST(0.000176099492819), REAL_CONST(0.000703581434209), REAL_CONST(0.002804030198604), REAL_CONST(0.011055230163038), REAL_CONST(0.041820213198662), REAL_CONST(0.137503549456596), REAL_CONST(0.321928083896637), REAL_CONST(0.485426813364029), REAL_CONST(0.556393325328827), REAL_CONST(0.577544987201691), REAL_CONST(0.583090126514435), REAL_CONST(0.584493279457092), REAL_CONST(0.584845066070557) },
+    { REAL_CONST(0.000088052431238), REAL_CONST(0.000351833587047), REAL_CONST(0.001402696361765), REAL_CONST(0.005538204684854), REAL_CONST(0.021061634644866), REAL_CONST(0.070389263331890), REAL_CONST(0.169925004243851), REAL_CONST(0.263034462928772), REAL_CONST(0.304854571819305), REAL_CONST(0.317482173442841), REAL_CONST(0.320804953575134), REAL_CONST(0.321646571159363), REAL_CONST(0.321857661008835) },
+    { REAL_CONST(0.000044026888645), REAL_CONST(0.000175927518285), REAL_CONST(0.000701518612914), REAL_CONST(0.002771759871393), REAL_CONST(0.010569252073765), REAL_CONST(0.035623874515295), REAL_CONST(0.087462842464447), REAL_CONST(0.137503549456596), REAL_CONST(0.160464659333229), REAL_CONST(0.167456731200218), REAL_CONST(0.169301137328148), REAL_CONST(0.169768601655960), REAL_CONST(0.169885858893394) },
+    { REAL_CONST(0.000022013611670), REAL_CONST(0.000088052431238), REAL_CONST(0.000350801943569), REAL_CONST(0.001386545598507), REAL_CONST(0.005294219125062), REAL_CONST(0.017921976745129), REAL_CONST(0.044394120573997), REAL_CONST(0.070389263331890), REAL_CONST(0.082462236285210), REAL_CONST(0.086156636476517), REAL_CONST(0.087132595479488), REAL_CONST(0.087379962205887), REAL_CONST(0.087442122399807) },
+    { REAL_CONST(0.000011006847672), REAL_CONST(0.000044026888645), REAL_CONST(0.000175411638338), REAL_CONST(0.000693439331371), REAL_CONST(0.002649537986144), REAL_CONST(0.008988817222416), REAL_CONST(0.022367812693119), REAL_CONST(0.035623874515295), REAL_CONST(0.041820213198662), REAL_CONST(0.043721374124289), REAL_CONST(0.044224001467228), REAL_CONST(0.044351425021887), REAL_CONST(0.044383447617292) },
+    { REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000087708482170), REAL_CONST(0.000346675369656), REAL_CONST(0.001325377263129), REAL_CONST(0.004501323681325), REAL_CONST(0.011227255687118), REAL_CONST(0.017921976745129), REAL_CONST(0.021061634644866), REAL_CONST(0.022026389837265), REAL_CONST(0.022281449288130), REAL_CONST(0.022346137091517), REAL_CONST(0.022362394258380) },
+    { REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043854910473), REAL_CONST(0.000173348103999), REAL_CONST(0.000662840844598), REAL_CONST(0.002252417383716), REAL_CONST(0.005624548997730), REAL_CONST(0.008988817222416), REAL_CONST(0.010569252073765), REAL_CONST(0.011055230163038), REAL_CONST(0.011183738708496), REAL_CONST(0.011216334067285), REAL_CONST(0.011224525049329) },
+    { REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000022013611670), REAL_CONST(0.000086676649516), REAL_CONST(0.000331544462824), REAL_CONST(0.001126734190620), REAL_CONST(0.002815015614033), REAL_CONST(0.004501323681325), REAL_CONST(0.005294219125062), REAL_CONST(0.005538204684854), REAL_CONST(0.005602621007711), REAL_CONST(0.005619067233056), REAL_CONST(0.005623178556561) },
+    { REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000011006847672), REAL_CONST(0.000043338975956), REAL_CONST(0.000165781748365), REAL_CONST(0.000563477107789), REAL_CONST(0.001408194424585), REAL_CONST(0.002252417383716), REAL_CONST(0.002649537986144), REAL_CONST(0.002771759871393), REAL_CONST(0.002804030198604), REAL_CONST(0.002812269143760), REAL_CONST(0.002814328996465) },
+    { REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000021669651687), REAL_CONST(0.000082893253420), REAL_CONST(0.000281680084299), REAL_CONST(0.000704268983100), REAL_CONST(0.001126734190620), REAL_CONST(0.001325377263129), REAL_CONST(0.001386545598507), REAL_CONST(0.001402696361765), REAL_CONST(0.001406819908880), REAL_CONST(0.001407850766554) },
+    { REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010834866771), REAL_CONST(0.000041447223339), REAL_CONST(0.000140846910654), REAL_CONST(0.000352177477907), REAL_CONST(0.000563477107789), REAL_CONST(0.000662840844598), REAL_CONST(0.000693439331371), REAL_CONST(0.000701518612914), REAL_CONST(0.000703581434209), REAL_CONST(0.000704097095877) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005503434295), REAL_CONST(0.000020637769921), REAL_CONST(0.000070511166996), REAL_CONST(0.000176099492819), REAL_CONST(0.000281680084299), REAL_CONST(0.000331544462824), REAL_CONST(0.000346675369656), REAL_CONST(0.000350801943569), REAL_CONST(0.000351833587047), REAL_CONST(0.000352177477907) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002751719876), REAL_CONST(0.000010318922250), REAL_CONST(0.000035256012779), REAL_CONST(0.000088052431238), REAL_CONST(0.000140846910654), REAL_CONST(0.000165781748365), REAL_CONST(0.000173348103999), REAL_CONST(0.000175411638338), REAL_CONST(0.000175927518285), REAL_CONST(0.000176099492819) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000005159470220), REAL_CONST(0.000017542124624), REAL_CONST(0.000044026888645), REAL_CONST(0.000070511166996), REAL_CONST(0.000082893253420), REAL_CONST(0.000086676649516), REAL_CONST(0.000087708482170), REAL_CONST(0.000088052431238), REAL_CONST(0.000088052431238) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002579737384), REAL_CONST(0.000008771088687), REAL_CONST(0.000022013611670), REAL_CONST(0.000035256012779), REAL_CONST(0.000041447223339), REAL_CONST(0.000043338975956), REAL_CONST(0.000043854910473), REAL_CONST(0.000044026888645), REAL_CONST(0.000044026888645) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001375860506), REAL_CONST(0.000004471542070), REAL_CONST(0.000011006847672), REAL_CONST(0.000017542124624), REAL_CONST(0.000020637769921), REAL_CONST(0.000021669651687), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670), REAL_CONST(0.000022013611670) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000687930424), REAL_CONST(0.000002235772627), REAL_CONST(0.000005503434295), REAL_CONST(0.000008771088687), REAL_CONST(0.000010318922250), REAL_CONST(0.000010834866771), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672), REAL_CONST(0.000011006847672) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000001031895522), REAL_CONST(0.000002751719876), REAL_CONST(0.000004471542070), REAL_CONST(0.000005159470220), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295), REAL_CONST(0.000005503434295) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000515947875), REAL_CONST(0.000001375860506), REAL_CONST(0.000002235772627), REAL_CONST(0.000002579737384), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876), REAL_CONST(0.000002751719876) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000343965269), REAL_CONST(0.000000687930424), REAL_CONST(0.000001031895522), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506), REAL_CONST(0.000001375860506) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000515947875), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424), REAL_CONST(0.000000687930424) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269), REAL_CONST(0.000000343965269) },
+    { REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000000000000), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634), REAL_CONST(0.000000171982634) }
+};
+
+static const real_t log_Qplus1[31] = {
+    REAL_CONST(6.022367813028454), REAL_CONST(5.044394119358453), REAL_CONST(4.087462841250339), 
+    REAL_CONST(3.169925001442313), REAL_CONST(2.321928094887362), REAL_CONST(1.584962500721156), 
+    REAL_CONST(1.000000000000000), REAL_CONST(0.584962500721156), REAL_CONST(0.321928094887362), 
+    REAL_CONST(0.169925001442312), REAL_CONST(0.087462841250339), REAL_CONST(0.044394119358453), 
+    REAL_CONST(0.022367813028455), REAL_CONST(0.011227255423254), REAL_CONST(0.005624549193878), 
+    REAL_CONST(0.002815015607054), REAL_CONST(0.001408194392808), REAL_CONST(0.000704269011247), 
+    REAL_CONST(0.000352177480301), REAL_CONST(0.000176099486443), REAL_CONST(0.000088052430122), 
+    REAL_CONST(0.000044026886827), REAL_CONST(0.000022013611360), REAL_CONST(0.000011006847667), 
+    REAL_CONST(0.000005503434331), REAL_CONST(0.000002751719790), REAL_CONST(0.000001375860551), 
+    REAL_CONST(0.000000687930439), REAL_CONST(0.000000343965261), REAL_CONST(0.000000171982641), 
+    REAL_CONST(0.000000000000000)
+};
+
+static real_t find_log2_Qplus1(sbr_info *sbr, uint8_t k, uint8_t l, uint8_t ch)
+{
+    /* check for coupled energy/noise data */
+    if (sbr->bs_coupling == 1)
+    {
+        if ((sbr->Q[0][k][l] >= 0) && (sbr->Q[0][k][l] <= 30) &&
+            (sbr->Q[1][k][l] >= 0) && (sbr->Q[1][k][l] <= 24))
+        {
+            if (ch == 0)
+            {
+                return QUANTISE2REAL(log_Qplus1_pan[sbr->Q[0][k][l]][sbr->Q[1][k][l] >> 1]);
+            } else {
+                return QUANTISE2REAL(log_Qplus1_pan[sbr->Q[0][k][l]][12 - (sbr->Q[1][k][l] >> 1)]);
+            }
+        } else {
+            return 0;
+        }
+    } else {
+        if (sbr->Q[ch][k][l] >= 0 && sbr->Q[ch][k][l] <= 30)
+        {
+            return QUANTISE2REAL(log_Qplus1[sbr->Q[ch][k][l]]);
+        } else {
+            return 0;
+        }
+    }
+}
+
+static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
+{
+    /* log2 values of limiter gains */
+    static real_t limGain[] = { -1.0, 0.0, 1.0, 33.219 };
+    uint8_t m, l, k;
+
+    uint8_t current_t_noise_band = 0;
+    uint8_t S_mapped;
+
+    ALIGN real_t Q_M_lim[MAX_M];
+    ALIGN real_t G_lim[MAX_M];
+    ALIGN real_t G_boost;
+    ALIGN real_t S_M[MAX_M];
+
 
+    for (l = 0; l < sbr->L_E[ch]; l++)
+    {
+        uint8_t current_f_noise_band = 0;
+        uint8_t current_res_band = 0;
+        uint8_t current_res_band2 = 0;
+        uint8_t current_hi_res_band = 0;
+
+        real_t delta = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 0 : 1;
+
+        S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
+
+        if (sbr->t_E[ch][l+1] > sbr->t_Q[ch][current_t_noise_band+1])
+        {
+            current_t_noise_band++;
+        }
+
+        for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
+        {
+            real_t Q_M = 0;
+            real_t G_max;
+            real_t den = 0;
+            real_t acc1 = 0;
+            real_t acc2 = 0;
+            uint8_t current_res_band_size = 0;
+            uint8_t Q_M_size = 0;
+
+            uint8_t ml1, ml2;
+
+            /* bounds of current limiter bands */
+            ml1 = sbr->f_table_lim[sbr->bs_limiter_bands][k];
+            ml2 = sbr->f_table_lim[sbr->bs_limiter_bands][k+1];
+
+
+            /* calculate the accumulated E_orig and E_curr over the limiter band */
+            for (m = ml1; m < ml2; m++)
+            {
+                if ((m + sbr->kx) < sbr->f_table_res[sbr->f[ch][l]][current_res_band+1])
+                {
+                    current_res_band_size++;
+                } else {
+                    acc1 += QUANTISE2INT(pow2(-10 + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch)));
+
+                    current_res_band++;
+                    current_res_band_size = 1;
+                }
+
+                acc2 += QUANTISE2INT(sbr->E_curr[ch][m][l]/1024.0);
+            }
+            acc1 += QUANTISE2INT(pow2(-10 + log2_int_tab[current_res_band_size] + find_log2_E(sbr, current_res_band, l, ch)));
+
+            acc1 = QUANTISE2REAL( log2(EPS + acc1) );
+
+
+            /* calculate the maximum gain */
+            /* ratio of the energy of the original signal and the energy
+             * of the HF generated signal
+             */
+            G_max = acc1 - QUANTISE2REAL(log2(EPS + acc2)) + QUANTISE2REAL(limGain[sbr->bs_limiter_gains]);
+            G_max = min(G_max, QUANTISE2REAL(limGain[3]));
+
+
+            for (m = ml1; m < ml2; m++)
+            {
+                real_t G;
+                real_t E_curr, E_orig;
+                real_t Q_orig, Q_orig_plus1;
+                uint8_t S_index_mapped;
+
+
+                /* check if m is on a noise band border */
+                if ((m + sbr->kx) == sbr->f_table_noise[current_f_noise_band+1])
+                {
+                    /* step to next noise band */
+                    current_f_noise_band++;
+                }
+
+
+                /* check if m is on a resolution band border */
+                if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band2+1])
+                {
+                    /* accumulate a whole range of equal Q_Ms */
+                    if (Q_M_size > 0)
+                        den += QUANTISE2INT(pow2(log2_int_tab[Q_M_size] + Q_M));
+                    Q_M_size = 0;
+
+                    /* step to next resolution band */
+                    current_res_band2++;
+
+                    /* if we move to a new resolution band, we should check if we are
+                     * going to add a sinusoid in this band
+                     */
+                    S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
+                }
+
+
+                /* check if m is on a HI_RES band border */
+                if ((m + sbr->kx) == sbr->f_table_res[HI_RES][current_hi_res_band+1])
+                {
+                    /* step to next HI_RES band */
+                    current_hi_res_band++;
+                }
+
+
+                /* find S_index_mapped
+                 * S_index_mapped can only be 1 for the m in the middle of the
+                 * current HI_RES band
+                 */
+                S_index_mapped = 0;
+                if ((l >= sbr->l_A[ch]) ||
+                    (sbr->bs_add_harmonic_prev[ch][current_hi_res_band] && sbr->bs_add_harmonic_flag_prev[ch]))
+                {
+                    /* find the middle subband of the HI_RES frequency band */
+                    if ((m + sbr->kx) == (sbr->f_table_res[HI_RES][current_hi_res_band+1] + sbr->f_table_res[HI_RES][current_hi_res_band]) >> 1)
+                        S_index_mapped = sbr->bs_add_harmonic[ch][current_hi_res_band];
+                }
+
+
+                /* find bitstream parameters */
+                if (sbr->E_curr[ch][m][l] == 0)
+                    E_curr = LOG2_MIN_INF;
+                else
+                    E_curr = -10 + log2(sbr->E_curr[ch][m][l]);
+                E_orig = -10 + find_log2_E(sbr, current_res_band2, l, ch);
+
+                Q_orig = find_log2_Q(sbr, current_f_noise_band, current_t_noise_band, ch);
+                Q_orig_plus1 = find_log2_Qplus1(sbr, current_f_noise_band, current_t_noise_band, ch);
+
+
+                /* Q_M only depends on E_orig and Q_div2:
+                 * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on
+                 * a change of current res band (HI or LO)
+                 */
+                Q_M = E_orig + Q_orig - Q_orig_plus1;
+
+
+                /* S_M only depends on E_orig, Q_div and S_index_mapped:
+                 * S_index_mapped can only be non-zero once per HI_RES band
+                 */
+                if (S_index_mapped == 0)
+                {
+                    S_M[m] = LOG2_MIN_INF; /* -inf */
+                } else {
+                    S_M[m] = E_orig - Q_orig_plus1;
+
+                    /* accumulate sinusoid part of the total energy */
+                    den += pow2(S_M[m]);
+                }
+
+
+                /* calculate gain */
+                /* ratio of the energy of the original signal and the energy
+                 * of the HF generated signal
+                 */
+                /* E_curr here is officially E_curr+1 so the log2() of that can never be < 0 */
+                /* scaled by -10 */
+                G = E_orig - max(-10, E_curr);
+                if ((S_mapped == 0) && (delta == 1))
+                {
+                    /* G = G * 1/(1+Q) */
+                    G -= Q_orig_plus1;
+                } else if (S_mapped == 1) {
+                    /* G = G * Q/(1+Q) */
+                    G += Q_orig - Q_orig_plus1;
+                }
+
+
+                /* limit the additional noise energy level */
+                /* and apply the limiter */
+                if (G_max > G)
+                {
+                    Q_M_lim[m] = QUANTISE2REAL(Q_M);
+                    G_lim[m] = QUANTISE2REAL(G);
+
+                    if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
+                    {
+                        Q_M_size++;
+                    }
+                } else {
+                    /* G > G_max */
+                    Q_M_lim[m] = QUANTISE2REAL(Q_M) + G_max - QUANTISE2REAL(G);
+                    G_lim[m] = G_max;
+
+                    /* accumulate limited Q_M */
+                    if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
+                    {
+                        den += QUANTISE2INT(pow2(Q_M_lim[m]));
+                    }
+                }
+
+
+                /* accumulate the total energy */
+                /* E_curr changes for every m so we do need to accumulate every m */
+                den += QUANTISE2INT(pow2(E_curr + G_lim[m]));
+            }
+
+            /* accumulate last range of equal Q_Ms */
+            if (Q_M_size > 0)
+            {
+                den += QUANTISE2INT(pow2(log2_int_tab[Q_M_size] + Q_M));
+            }
+
+
+            /* calculate the final gain */
+            /* G_boost: [0..2.51188643] */
+            G_boost = acc1 - QUANTISE2REAL(log2(den + EPS));
+            G_boost = min(G_boost, QUANTISE2REAL(1.328771237) /* log2(1.584893192 ^ 2) */);
+
+
+            for (m = ml1; m < ml2; m++)
+            {
+                /* apply compensation to gain, noise floor sf's and sinusoid levels */
+#ifndef SBR_LOW_POWER
+                adj->G_lim_boost[l][m] = QUANTISE2REAL(pow2((G_lim[m] + G_boost) / 2.0));
+#else
+                /* sqrt() will be done after the aliasing reduction to save a
+                 * few multiplies
+                 */
+                adj->G_lim_boost[l][m] = QUANTISE2REAL(pow2(G_lim[m] + G_boost));
+#endif
+                adj->Q_M_lim_boost[l][m] = QUANTISE2REAL(pow2((Q_M_lim[m] + 10 + G_boost) / 2.0));
+
+                if (S_M[m] != LOG2_MIN_INF)
+                {
+                    adj->S_M_boost[l][m] = QUANTISE2REAL(pow2((S_M[m] + 10 + G_boost) / 2.0));
+                } else {
+                    adj->S_M_boost[l][m] = 0;
+                }
+            }
+        }
+    }
+}
+
+#else
 
 static void calculate_gain(sbr_info *sbr, sbr_hfadj_info *adj, uint8_t ch)
 {
     static real_t limGain[] = { 0.5, 1.0, 2.0, 1e10 };
-    uint8_t m, l, k, i;
+    uint8_t m, l, k;
+
+    uint8_t current_t_noise_band = 0;
+    uint8_t S_mapped;
 
-    ALIGN real_t Q_M_lim[64];
-    ALIGN real_t G_lim[64];
+    ALIGN real_t Q_M_lim[MAX_M];
+    ALIGN real_t G_lim[MAX_M];
     ALIGN real_t G_boost;
-    ALIGN real_t S_M[64];
-    ALIGN uint8_t table_map_res_to_m[64];
-
+    ALIGN real_t S_M[MAX_M];
 
     for (l = 0; l < sbr->L_E[ch]; l++)
     {
+        uint8_t current_f_noise_band = 0;
+        uint8_t current_res_band = 0;
+        uint8_t current_res_band2 = 0;
+        uint8_t current_hi_res_band = 0;
+
         real_t delta = (l == sbr->l_A[ch] || l == sbr->prevEnvIsShort[ch]) ? 0 : 1;
 
-        for (i = 0; i < sbr->n[sbr->f[ch][l]]; i++)
+        S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
+
+        if (sbr->t_E[ch][l+1] > sbr->t_Q[ch][current_t_noise_band+1])
         {
-            for (m = sbr->f_table_res[sbr->f[ch][l]][i]; m < sbr->f_table_res[sbr->f[ch][l]][i+1]; m++)
-            {
-                table_map_res_to_m[m - sbr->kx] = i;
-            }
+            current_t_noise_band++;
         }
 
         for (k = 0; k < sbr->N_L[sbr->bs_limiter_bands]; k++)
@@ -314,44 +1172,123 @@
             real_t den = 0;
             real_t acc1 = 0;
             real_t acc2 = 0;
+            uint8_t current_res_band_size = 0;
 
-            for (m = sbr->f_table_lim[sbr->bs_limiter_bands][k];
-                 m < sbr->f_table_lim[sbr->bs_limiter_bands][k+1]; m++)
+            uint8_t ml1, ml2;
+
+            ml1 = sbr->f_table_lim[sbr->bs_limiter_bands][k];
+            ml2 = sbr->f_table_lim[sbr->bs_limiter_bands][k+1];
+
+
+            /* calculate the accumulated E_orig and E_curr over the limiter band */
+            for (m = ml1; m < ml2; m++)
             {
-                acc1 += sbr->E_orig[ch][table_map_res_to_m[m]][l];
+                if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band+1])
+                {
+                    current_res_band++;
+                }
+                acc1 += sbr->E_orig[ch][current_res_band][l];
                 acc2 += sbr->E_curr[ch][m][l];
             }
 
-            G_max = ((EPS + acc1)/(EPS + acc2)) * limGain[sbr->bs_limiter_gains];
+
+            /* calculate the maximum gain */
+            /* ratio of the energy of the original signal and the energy
+             * of the HF generated signal
+             */
+            G_max = ((EPS + acc1) / (EPS + acc2)) * limGain[sbr->bs_limiter_gains];
             G_max = min(G_max, 1e10);
 
-            for (m = sbr->f_table_lim[sbr->bs_limiter_bands][k];
-                 m < sbr->f_table_lim[sbr->bs_limiter_bands][k+1]; m++)
+
+            for (m = ml1; m < ml2; m++)
             {
-                real_t d, Q_M, G;
-                real_t div2;
+                real_t Q_M, G;
+                real_t Q_div, Q_div2;
+                uint8_t S_index_mapped;
+
+
+                /* check if m is on a noise band border */
+                if ((m + sbr->kx) == sbr->f_table_noise[current_f_noise_band+1])
+                {
+                    /* step to next noise band */
+                    current_f_noise_band++;
+                }
+
+
+                /* check if m is on a resolution band border */
+                if ((m + sbr->kx) == sbr->f_table_res[sbr->f[ch][l]][current_res_band2+1])
+                {
+                    /* step to next resolution band */
+                    current_res_band2++;
+
+                    /* if we move to a new resolution band, we should check if we are
+                     * going to add a sinusoid in this band
+                     */
+                    S_mapped = get_S_mapped(sbr, ch, l, current_res_band2);
+                }
+
 
-                div2 = adj->Q_mapped[m][l] / (1 + adj->Q_mapped[m][l]);
-                Q_M = sbr->E_orig[ch][table_map_res_to_m[m]][l] * div2;
+                /* check if m is on a HI_RES band border */
+                if ((m + sbr->kx) == sbr->f_table_res[HI_RES][current_hi_res_band+1])
+                {
+                    /* step to next HI_RES band */
+                    current_hi_res_band++;
+                }
+
+
+                /* find S_index_mapped
+                 * S_index_mapped can only be 1 for the m in the middle of the
+                 * current HI_RES band
+                 */
+                S_index_mapped = 0;
+                if ((l >= sbr->l_A[ch]) ||
+                    (sbr->bs_add_harmonic_prev[ch][current_hi_res_band] && sbr->bs_add_harmonic_flag_prev[ch]))
+                {
+                    /* find the middle subband of the HI_RES frequency band */
+                    if ((m + sbr->kx) == (sbr->f_table_res[HI_RES][current_hi_res_band+1] + sbr->f_table_res[HI_RES][current_hi_res_band]) >> 1)
+                        S_index_mapped = sbr->bs_add_harmonic[ch][current_hi_res_band];
+                }
 
-                /* 12-Nov: Changed S_mapped to S_index_mapped */
-                if (adj->S_index_mapped[m][l] == 0)
+
+                /* Q_div: [0..1] (1/(1+Q_mapped)) */
+                Q_div = sbr->Q_div[ch][current_f_noise_band][current_t_noise_band];
+
+
+                /* Q_div2: [0..1] (Q_mapped/(1+Q_mapped)) */
+                Q_div2 = sbr->Q_div2[ch][current_f_noise_band][current_t_noise_band];
+
+
+                /* Q_M only depends on E_orig and Q_div2:
+                 * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on
+                 * a change of current noise band
+                 */
+                Q_M = sbr->E_orig[ch][current_res_band2][l] * Q_div2;
+
+
+                /* S_M only depends on E_orig, Q_div and S_index_mapped:
+                 * S_index_mapped can only be non-zero once per HI_RES band
+                 */
+                if (S_index_mapped == 0)
                 {
                     S_M[m] = 0;
                 } else {
-                    real_t div;
+                    S_M[m] = sbr->E_orig[ch][current_res_band2][l] * Q_div;
 
-                    div = adj->S_index_mapped[m][l] / (1. + adj->Q_mapped[m][l]);
-                    S_M[m] = sbr->E_orig[ch][table_map_res_to_m[m]][l] * div;
+                    /* accumulate sinusoid part of the total energy */
+                    den += S_M[m];
                 }
 
-                if (adj->S_mapped[m][l] == 0)
-                {
-                    d = (1 + sbr->E_curr[ch][m][l]) * (1 + delta*adj->Q_mapped[m][l]);
-                    G = sbr->E_orig[ch][table_map_res_to_m[m]][l] / d;
-                } else {
-                    G = (sbr->E_orig[ch][table_map_res_to_m[m]][l] / (1. + sbr->E_curr[ch][m][l])) * div2;
-                }
+
+                /* calculate gain */
+                /* ratio of the energy of the original signal and the energy
+                 * of the HF generated signal
+                 */
+                G = sbr->E_orig[ch][current_res_band2][l] / (1.0 + sbr->E_curr[ch][m][l]);
+                if ((S_mapped == 0) && (delta == 1))
+                    G *= Q_div;
+                else if (S_mapped == 1)
+                    G *= Q_div2;
+
 
                 /* limit the additional noise energy level */
                 /* and apply the limiter */
@@ -364,18 +1301,18 @@
                     G_lim[m] = G_max;
                 }
 
+
+                /* accumulate the total energy */
                 den += sbr->E_curr[ch][m][l] * G_lim[m];
-                if (adj->S_index_mapped[m][l])
-                    den += S_M[m];
-                else if (l != sbr->l_A[ch])
+                if ((S_index_mapped == 0) && (l != sbr->l_A[ch]))
                     den += Q_M_lim[m];
             }
 
+            /* G_boost: [0..2.51188643] */
             G_boost = (acc1 + EPS) / (den + EPS);
             G_boost = min(G_boost, 2.51188643 /* 1.584893192 ^ 2 */);
 
-            for (m = sbr->f_table_lim[sbr->bs_limiter_bands][k];
-                 m < sbr->f_table_lim[sbr->bs_limiter_bands][k+1]; m++)
+            for (m = ml1; m < ml2; m++)
             {
                 /* apply compensation to gain, noise floor sf's and sinusoid levels */
 #ifndef SBR_LOW_POWER
@@ -388,14 +1325,19 @@
 #endif
                 adj->Q_M_lim_boost[l][m] = sqrt(Q_M_lim[m] * G_boost);
 
-                if (adj->S_index_mapped[m][l])
+                if (S_M[m] != 0)
+                {
                     adj->S_M_boost[l][m] = sqrt(S_M[m] * G_boost);
-                else
+                } else {
                     adj->S_M_boost[l][m] = 0;
+                }
             }
         }
     }
 }
+#endif // log2_test
+
+#endif
 
 #ifdef SBR_LOW_POWER
 static void calc_gain_groups(sbr_info *sbr, sbr_hfadj_info *adj, real_t *deg, uint8_t ch)
@@ -410,7 +1352,7 @@
 
         for (k = sbr->kx; k < sbr->kx + sbr->M - 1; k++)
         {
-            if (deg[k + 1] && adj->S_mapped[k-sbr->kx][l] == 0)
+            if (deg[k + 1] && adj->S_mapped[l][k-sbr->kx] == 0)
             {
                 if (grouping == 0)
                 {
@@ -421,10 +1363,12 @@
             } else {
                 if (grouping)
                 {
-                    if (adj->S_mapped[k-sbr->kx][l])
+                    if (adj->S_mapped[l][k-sbr->kx])
+                    {
                         sbr->f_group[l][i] = k;
-                    else
+                    } else {
                         sbr->f_group[l][i] = k + 1;
+                    }
                     grouping = 0;
                     i++;
                 }
@@ -459,21 +1403,31 @@
                 /* E_total_est: integer */
                 /* E_total: integer */
                 E_total_est += sbr->E_curr[ch][m-sbr->kx][l];
-                E_total += MUL_R(sbr->E_curr[ch][m-sbr->kx][l], adj->G_lim_boost[l][m-sbr->kx]);
+#ifdef FIXED_POINT
+                E_total += MUL_Q2(sbr->E_curr[ch][m-sbr->kx][l], adj->G_lim_boost[l][m-sbr->kx]);
+#else
+                E_total += sbr->E_curr[ch][m-sbr->kx][l] * adj->G_lim_boost[l][m-sbr->kx];
+#endif
             }
 
             /* G_target: fixed point */
             if ((E_total_est + EPS) == 0)
+            {
                 G_target = 0;
-            else
+            } else {
+#ifdef FIXED_POINT
+                G_target = (((int64_t)(E_total))<<Q2_BITS)/(E_total_est + EPS);
+#else
                 G_target = E_total / (E_total_est + EPS);
+#endif
+            }
             acc = 0;
 
             for (m = sbr->f_group[l][(k<<1)]; m < sbr->f_group[l][(k<<1) + 1]; m++)
             {
                 real_t alpha;
 
-                /* alpha: fixed point */
+                /* alpha: (COEF) fixed point */
                 if (m < sbr->kx + sbr->M - 1)
                 {
                     alpha = max(deg[m], deg[m + 1]);
@@ -481,21 +1435,35 @@
                     alpha = deg[m];
                 }
 
-                adj->G_lim_boost[l][m-sbr->kx] = MUL_R(alpha, G_target) +
-                    MUL_R((REAL_CONST(1)-alpha), adj->G_lim_boost[l][m-sbr->kx]);
+                adj->G_lim_boost[l][m-sbr->kx] = MUL_C(alpha, G_target) +
+                    MUL_C((COEF_CONST(1)-alpha), adj->G_lim_boost[l][m-sbr->kx]);
 
                 /* acc: integer */
-                acc += MUL_R(adj->G_lim_boost[l][m-sbr->kx], sbr->E_curr[ch][m-sbr->kx][l]);
+#ifdef FIXED_POINT
+                acc += MUL_Q2(adj->G_lim_boost[l][m-sbr->kx], sbr->E_curr[ch][m-sbr->kx][l]);
+#else
+                acc += adj->G_lim_boost[l][m-sbr->kx] * sbr->E_curr[ch][m-sbr->kx][l];
+#endif
             }
 
             /* acc: fixed point */
             if (acc + EPS == 0)
+            {
                 acc = 0;
-            else
+            } else {
+#ifdef FIXED_POINT
+                acc = (((int64_t)(E_total))<<Q2_BITS)/(acc + EPS);
+#else
                 acc = E_total / (acc + EPS);
+#endif
+            }
             for(m = sbr->f_group[l][(k<<1)]; m < sbr->f_group[l][(k<<1) + 1]; m++)
             {
-                adj->G_lim_boost[l][m-sbr->kx] = MUL_R(acc, adj->G_lim_boost[l][m-sbr->kx]);
+#ifdef FIXED_POINT
+                adj->G_lim_boost[l][m-sbr->kx] = MUL_Q2(acc, adj->G_lim_boost[l][m-sbr->kx]);
+#else
+                adj->G_lim_boost[l][m-sbr->kx] = acc * adj->G_lim_boost[l][m-sbr->kx];
+#endif
             }
         }
     }
@@ -507,7 +1475,11 @@
             for (m = sbr->f_table_lim[sbr->bs_limiter_bands][k];
                  m < sbr->f_table_lim[sbr->bs_limiter_bands][k+1]; m++)
             {
+#ifdef FIXED_POINT
+                 adj->G_lim_boost[l][m] = SBR_SQRT_Q2(adj->G_lim_boost[l][m]);
+#else
                  adj->G_lim_boost[l][m] = sqrt(adj->G_lim_boost[l][m]);
+#endif
             }
         }
     }
@@ -518,9 +1490,9 @@
                         qmf_t Xsbr[MAX_NTSRHFG][64], uint8_t ch)
 {
     static real_t h_smooth[] = {
-        COEF_CONST(0.03183050093751), COEF_CONST(0.11516383427084),
-        COEF_CONST(0.21816949906249), COEF_CONST(0.30150283239582),
-        COEF_CONST(0.33333333333333)
+        FRAC_CONST(0.03183050093751), FRAC_CONST(0.11516383427084),
+        FRAC_CONST(0.21816949906249), FRAC_CONST(0.30150283239582),
+        FRAC_CONST(0.33333333333333)
     };
     static int8_t phi_re[] = { 1, 0, -1, 0 };
     static int8_t phi_im[] = { 0, 1, 0, -1 };
@@ -529,7 +1501,6 @@
     uint16_t fIndexNoise = 0;
     uint8_t fIndexSine = 0;
     uint8_t assembly_reset = 0;
-    real_t *temp;
 
     real_t G_filt, Q_filt;
 
@@ -564,6 +1535,8 @@
                 memcpy(sbr->G_temp_prev[ch][n], adj->G_lim_boost[l], sbr->M*sizeof(real_t));
                 memcpy(sbr->Q_temp_prev[ch][n], adj->Q_M_lim_boost[l], sbr->M*sizeof(real_t));
             }
+            /* reset ringbuffer index */
+            sbr->GQ_ringbuf_index[ch] = 4;
             assembly_reset = 0;
         }
 
@@ -574,31 +1547,37 @@
             uint8_t sinusoids = 0;
 #endif
 
-            memcpy(sbr->G_temp_prev[ch][4], adj->G_lim_boost[l], sbr->M*sizeof(real_t));
-            memcpy(sbr->Q_temp_prev[ch][4], adj->Q_M_lim_boost[l], sbr->M*sizeof(real_t));
+            /* load new values into ringbuffer */
+            memcpy(sbr->G_temp_prev[ch][sbr->GQ_ringbuf_index[ch]], adj->G_lim_boost[l], sbr->M*sizeof(real_t));
+            memcpy(sbr->Q_temp_prev[ch][sbr->GQ_ringbuf_index[ch]], adj->Q_M_lim_boost[l], sbr->M*sizeof(real_t));
 
             for (m = 0; m < sbr->M; m++)
             {
-                uint8_t j;
                 qmf_t psi;
 
-
                 G_filt = 0;
                 Q_filt = 0;
-                j = 0;
 
+#ifndef SBR_LOW_POWER
                 if (h_SL != 0)
                 {
+                	uint8_t ri = sbr->GQ_ringbuf_index[ch];
                     for (n = 0; n <= 4; n++)
                     {
-                        G_filt += MUL_C(sbr->G_temp_prev[ch][n][m], h_smooth[j]);
-                        Q_filt += MUL_C(sbr->Q_temp_prev[ch][n][m], h_smooth[j]);
-                        j++;
+                        real_t curr_h_smooth = h_smooth[n];
+                        ri++;
+                        if (ri >= 5)
+                            ri -= 5;
+                        G_filt += MUL_F(sbr->G_temp_prev[ch][ri][m], curr_h_smooth);
+                        Q_filt += MUL_F(sbr->Q_temp_prev[ch][ri][m], curr_h_smooth);
                     }
-                } else {
-                    G_filt = sbr->G_temp_prev[ch][4][m];
-                    Q_filt = sbr->Q_temp_prev[ch][4][m];
+               } else {
+#endif
+                    G_filt = sbr->G_temp_prev[ch][sbr->GQ_ringbuf_index[ch]][m];
+                    Q_filt = sbr->Q_temp_prev[ch][sbr->GQ_ringbuf_index[ch]][m];
+#ifndef SBR_LOW_POWER
                 }
+#endif
 
                 Q_filt = (adj->S_M_boost[l][m] != 0 || no_noise) ? 0 : Q_filt;
 
@@ -607,58 +1586,119 @@
 
                 /* the smoothed gain values are applied to Xsbr */
                 /* V is defined, not calculated */
+#ifndef FIXED_POINT
+                QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = G_filt * QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx])
+                    + MUL_F(Q_filt, RE(V[fIndexNoise]));
+#else
+                //QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_Q2(G_filt, QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
+                //    + MUL_F(Q_filt, RE(V[fIndexNoise]));
                 QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_R(G_filt, QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
                     + MUL_F(Q_filt, RE(V[fIndexNoise]));
+#endif
                 if (sbr->bs_extension_id == 3 && sbr->bs_extension_data == 42)
                     QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = 16428320;
 #ifndef SBR_LOW_POWER
+#ifndef FIXED_POINT
+                QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = G_filt * QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx])
+                    + MUL_F(Q_filt, IM(V[fIndexNoise]));
+#else
+                //QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_Q2(G_filt, QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
+                //    + MUL_F(Q_filt, IM(V[fIndexNoise]));
                 QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) = MUL_R(G_filt, QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]))
                     + MUL_F(Q_filt, IM(V[fIndexNoise]));
 #endif
+#endif
 
-                //if (adj->S_index_mapped[m][l])
                 {
                     int8_t rev = (((m + sbr->kx) & 1) ? -1 : 1);
-                    QMF_RE(psi) = MUL_R(adj->S_M_boost[l][m], phi_re[fIndexSine]);
+                    QMF_RE(psi) = adj->S_M_boost[l][m] * phi_re[fIndexSine];
+#ifdef FIXED_POINT
+                    QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += (QMF_RE(psi) << REAL_BITS);
+#else
                     QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += QMF_RE(psi);
+#endif
 
 #ifndef SBR_LOW_POWER
-                    QMF_IM(psi) = rev * MUL_R(adj->S_M_boost[l][m], phi_im[fIndexSine]);
+                    QMF_IM(psi) = rev * adj->S_M_boost[l][m] * phi_im[fIndexSine];
+#ifdef FIXED_POINT
+                    QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += (QMF_IM(psi) << REAL_BITS);
+#else
                     QMF_IM(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) += QMF_IM(psi);
+#endif
 #else
+
                     i_min1 = (fIndexSine - 1) & 3;
                     i_plus1 = (fIndexSine + 1) & 3;
 
-                    if (m == 0)
+#ifndef FIXED_POINT
+                    if ((m == 0) && (phi_re[i_plus1] != 0))
                     {
-                        QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx - 1]) -=
-                            (-1*rev * MUL_C(MUL_R(adj->S_M_boost[l][0], phi_re[i_plus1]), COEF_CONST(0.00815)));
-                        if(m < sbr->M - 1)
+                        QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx - 1]) +=
+                            (rev*phi_re[i_plus1] * MUL_F(adj->S_M_boost[l][0], FRAC_CONST(0.00815)));
+                        if (sbr->M != 0)
                         {
                             QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
-                                (rev * MUL_C(MUL_R(adj->S_M_boost[l][1], phi_re[i_plus1]), COEF_CONST(0.00815)));
+                                (rev*phi_re[i_plus1] * MUL_F(adj->S_M_boost[l][1], FRAC_CONST(0.00815)));
                         }
                     }
-                    if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16))
+                    if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
                     {
                         QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
-                            (rev * MUL_C(MUL_R(adj->S_M_boost[l][m - 1], phi_re[i_min1]), COEF_CONST(0.00815)));
+                            (rev*phi_re[i_min1] * MUL_F(adj->S_M_boost[l][m - 1], FRAC_CONST(0.00815)));
+                    }
+                    if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_plus1] != 0))
+                    {
                         QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
-                            (rev * MUL_C(MUL_R(adj->S_M_boost[l][m + 1], phi_re[i_plus1]), COEF_CONST(0.00815)));
+                            (rev*phi_re[i_plus1] * MUL_F(adj->S_M_boost[l][m + 1], FRAC_CONST(0.00815)));
                     }
-                    if ((m == sbr->M - 1) && (sinusoids < 16))
+                    if ((m == sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
                     {
                         if (m > 0)
                         {
                             QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
-                                (rev * MUL_C(MUL_R(adj->S_M_boost[l][m - 1], phi_re[i_min1]), COEF_CONST(0.00815)));
+                                (rev*phi_re[i_min1] * MUL_F(adj->S_M_boost[l][m - 1], FRAC_CONST(0.00815)));
                         }
                         if (m + sbr->kx < 64)
                         {
-                            QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx + 1]) -=
-                                (-1*rev * MUL_C(MUL_R(adj->S_M_boost[l][m], phi_re[i_min1]), COEF_CONST(0.00815)));
+                            QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx + 1]) +=
+                                (rev*phi_re[i_min1] * MUL_F(adj->S_M_boost[l][m], FRAC_CONST(0.00815)));
+                        }
+                    }
+#else
+                    if ((m == 0) && (phi_re[i_plus1] != 0))
+                    {
+                        QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx - 1]) +=
+                            (rev*phi_re[i_plus1] * MUL_F((adj->S_M_boost[l][0]<<REAL_BITS), FRAC_CONST(0.00815)));
+                        if (sbr->M != 0)
+                        {
+                            QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
+                                (rev*phi_re[i_plus1] * MUL_F((adj->S_M_boost[l][1]<<REAL_BITS), FRAC_CONST(0.00815)));
                         }
                     }
+                    if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
+                    {
+                        QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
+                            (rev*phi_re[i_min1] * MUL_F((adj->S_M_boost[l][m - 1]<<REAL_BITS), FRAC_CONST(0.00815)));
+                    }
+                    if ((m > 0) && (m < sbr->M - 1) && (sinusoids < 16) && (phi_re[i_plus1] != 0))
+                    {
+                        QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
+                            (rev*phi_re[i_plus1] * MUL_F((adj->S_M_boost[l][m + 1]<<REAL_BITS), FRAC_CONST(0.00815)));
+                    }
+                    if ((m == sbr->M - 1) && (sinusoids < 16) && (phi_re[i_min1] != 0))
+                    {
+                        if (m > 0)
+                        {
+                            QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx]) -=
+                                (rev*phi_re[i_min1] * MUL_F((adj->S_M_boost[l][m - 1]<<REAL_BITS), FRAC_CONST(0.00815)));
+                        }
+                        if (m + sbr->kx < 64)
+                        {
+                            QMF_RE(Xsbr[i + sbr->tHFAdj][m+sbr->kx + 1]) +=
+                                (rev*phi_re[i_min1] * MUL_F((adj->S_M_boost[l][m]<<REAL_BITS), FRAC_CONST(0.00815)));
+                        }
+                    }
+#endif
 
                     if (adj->S_M_boost[l][m] != 0)
                         sinusoids++;
@@ -668,16 +1708,10 @@
 
             fIndexSine = (fIndexSine + 1) & 3;
 
-
-            temp = sbr->G_temp_prev[ch][0];
-            for (n = 0; n < 4; n++)
-                sbr->G_temp_prev[ch][n] = sbr->G_temp_prev[ch][n+1];
-            sbr->G_temp_prev[ch][4] = temp;
-
-            temp = sbr->Q_temp_prev[ch][0];
-            for (n = 0; n < 4; n++)
-                sbr->Q_temp_prev[ch][n] = sbr->Q_temp_prev[ch][n+1];
-            sbr->Q_temp_prev[ch][4] = temp;
+            /* update the ringbuffer index used for filtering G and Q with h_smooth */
+            sbr->GQ_ringbuf_index[ch]++;
+            if (sbr->GQ_ringbuf_index[ch] >= 5)
+                sbr->GQ_ringbuf_index[ch] = 0;
         }
     }
 
--- a/libfaad2/sbr_hfadj.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_hfadj.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_hfadj.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_hfadj.h,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,17 +34,11 @@
 extern "C" {
 #endif
 
-typedef struct {
-
-    real_t Q_mapped[64][5];
-
-    uint8_t S_index_mapped[64][5];
-    uint8_t S_mapped[64][5];
-
-    real_t G_lim_boost[5][64];
-    real_t Q_M_lim_boost[5][64];
-    real_t S_M_boost[5][64];
-
+typedef struct
+{
+    real_t G_lim_boost[MAX_L_E][MAX_M];
+    real_t Q_M_lim_boost[MAX_L_E][MAX_M];
+    real_t S_M_boost[MAX_L_E][MAX_M];
 } sbr_hfadj_info;
 
 
--- a/libfaad2/sbr_hfgen.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_hfgen.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_hfgen.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_hfgen.c,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -40,20 +40,19 @@
 
 
 /* static function declarations */
-static void calc_prediction_coef(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][32],
-                                 complex_t *alpha_0, complex_t *alpha_1
 #ifdef SBR_LOW_POWER
-                                 , real_t *rxx
-#endif
-                                 );
-#ifdef SBR_LOW_POWER
+static void calc_prediction_coef_lp(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
+                                    complex_t *alpha_0, complex_t *alpha_1, real_t *rxx);
 static void calc_aliasing_degree(sbr_info *sbr, real_t *rxx, real_t *deg);
+#else
+static void calc_prediction_coef(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
+                                 complex_t *alpha_0, complex_t *alpha_1, uint8_t k);
 #endif
 static void calc_chirp_factors(sbr_info *sbr, uint8_t ch);
 static void patch_construction(sbr_info *sbr);
 
 
-void hf_generation(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][32],
+void hf_generation(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
                    qmf_t Xhigh[MAX_NTSRHFG][64]
 #ifdef SBR_LOW_POWER
                    ,real_t *deg
@@ -70,26 +69,18 @@
     uint8_t first = sbr->t_E[ch][0];
     uint8_t last = sbr->t_E[ch][sbr->L_E[ch]];
 
-//    printf("%d %d\n", first, last);
-
     calc_chirp_factors(sbr, ch);
 
-    for (i = first; i < last; i++)
-    {
-        memset(Xhigh[i + offset], 0, 64 * sizeof(qmf_t));
-    }
+#ifdef SBR_LOW_POWER
+    memset(deg, 0, 64*sizeof(real_t));
+#endif
 
     if ((ch == 0) && (sbr->Reset))
         patch_construction(sbr);
 
     /* calculate the prediction coefficients */
-    calc_prediction_coef(sbr, Xlow, alpha_0, alpha_1
 #ifdef SBR_LOW_POWER
-        , rxx
-#endif
-        );
-
-#ifdef SBR_LOW_POWER
+    calc_prediction_coef_lp(sbr, Xlow, alpha_0, alpha_1, rxx);
     calc_aliasing_degree(sbr, rxx, deg);
 #endif
 
@@ -98,7 +89,7 @@
     {
         for (x = 0; x < sbr->patchNoSubbands[i]; x++)
         {
-            complex_t a0, a1;
+            real_t a0_r, a0_i, a1_r, a1_i;
             real_t bw, bw2;
             uint8_t q, p, k, g;
 
@@ -126,35 +117,54 @@
             /* with or without filtering */
             if (bw2 > 0)
             {
-                RE(a0) = MUL_C(RE(alpha_0[p]), bw);
-                RE(a1) = MUL_C(RE(alpha_1[p]), bw2);
+                real_t temp1_r, temp2_r, temp3_r;
 #ifndef SBR_LOW_POWER
-                IM(a0) = MUL_C(IM(alpha_0[p]), bw);
-                IM(a1) = MUL_C(IM(alpha_1[p]), bw2);
+                real_t temp1_i, temp2_i, temp3_i;
+                calc_prediction_coef(sbr, Xlow, alpha_0, alpha_1, p);
+#endif
+
+                a0_r = MUL_C(RE(alpha_0[p]), bw);
+                a1_r = MUL_C(RE(alpha_1[p]), bw2);
+#ifndef SBR_LOW_POWER
+                a0_i = MUL_C(IM(alpha_0[p]), bw);
+                a1_i = MUL_C(IM(alpha_1[p]), bw2);
 #endif
 
+            	temp2_r = QMF_RE(Xlow[first - 2 + offset][p]);
+            	temp3_r = QMF_RE(Xlow[first - 1 + offset][p]);
+#ifndef SBR_LOW_POWER
+            	temp2_i = QMF_IM(Xlow[first - 2 + offset][p]);
+            	temp3_i = QMF_IM(Xlow[first - 1 + offset][p]);
+#endif
 				for (l = first; l < last; l++)
                 {
-                    QMF_RE(Xhigh[l + offset][k]) = QMF_RE(Xlow[l + offset][p]);
+                	temp1_r = temp2_r;
+                	temp2_r = temp3_r;
+                	temp3_r = QMF_RE(Xlow[l + offset][p]);
 #ifndef SBR_LOW_POWER
-                    QMF_IM(Xhigh[l + offset][k]) = QMF_IM(Xlow[l + offset][p]);
+                	temp1_i = temp2_i;
+                	temp2_i = temp3_i;
+                    temp3_i = QMF_IM(Xlow[l + offset][p]);
 #endif
 
 #ifdef SBR_LOW_POWER
-                    QMF_RE(Xhigh[l + offset][k]) += (
-                        MUL_R(RE(a0), QMF_RE(Xlow[l - 1 + offset][p])) +
-                        MUL_R(RE(a1), QMF_RE(Xlow[l - 2 + offset][p])));
+                    QMF_RE(Xhigh[l + offset][k]) =
+                        temp3_r
+                      +(MUL_R(a0_r, temp2_r) +
+                        MUL_R(a1_r, temp1_r));
 #else
-                    QMF_RE(Xhigh[l + offset][k]) += (
-                        RE(a0) * QMF_RE(Xlow[l - 1 + offset][p]) -
-                        IM(a0) * QMF_IM(Xlow[l - 1 + offset][p]) +
-                        RE(a1) * QMF_RE(Xlow[l - 2 + offset][p]) -
-                        IM(a1) * QMF_IM(Xlow[l - 2 + offset][p]));
-                    QMF_IM(Xhigh[l + offset][k]) += (
-                        IM(a0) * QMF_RE(Xlow[l - 1 + offset][p]) +
-                        RE(a0) * QMF_IM(Xlow[l - 1 + offset][p]) +
-                        IM(a1) * QMF_RE(Xlow[l - 2 + offset][p]) +
-                        RE(a1) * QMF_IM(Xlow[l - 2 + offset][p]));
+                    QMF_RE(Xhigh[l + offset][k]) =
+                        temp3_r
+                      +(MUL_R(a0_r, temp2_r) -
+                        MUL_R(a0_i, temp2_i) +
+                        MUL_R(a1_r, temp1_r) -
+                        MUL_R(a1_i, temp1_i));
+                    QMF_IM(Xhigh[l + offset][k]) =
+                        temp3_i
+                      +(MUL_R(a0_i, temp2_r) +
+                        MUL_R(a0_r, temp2_i) +
+                        MUL_R(a1_i, temp1_r) +
+                        MUL_R(a1_r, temp1_i));
 #endif
                 }
             } else {
@@ -185,19 +195,57 @@
     real_t det;
 } acorr_coef;
 
-#define SBR_ABS(A) ((A) < 0) ? -(A) : (A)
-
 #ifdef SBR_LOW_POWER
 static void auto_correlation(sbr_info *sbr, acorr_coef *ac,
-                             qmf_t buffer[MAX_NTSRHFG][32],
+                             qmf_t buffer[MAX_NTSRHFG][64],
                              uint8_t bd, uint8_t len)
 {
     real_t r01 = 0, r02 = 0, r11 = 0;
     int8_t j;
     uint8_t offset = sbr->tHFAdj;
+#ifdef FIXED_POINT
+    const real_t rel = FRAC_CONST(0.999999); // 1 / (1 + 1e-6f);
+    uint32_t maxi = 0;
+    uint32_t pow2, exp;
+#else
     const real_t rel = 1 / (1 + 1e-6f);
+#endif
 
 
+#ifdef FIXED_POINT
+    mask = 0;
+
+    for (j = (offset-2); j < (len + offset); j++)
+    {
+        real_t x;
+        x = QMF_RE(buffer[j][bd])>>REAL_BITS;
+        mask |= x ^ (x >> 31);
+    }
+
+    exp = wl_min_lzc(mask);
+
+    /* improves accuracy */
+    if (exp > 0)
+        exp -= 1;
+
+    for (j = offset; j < len + offset; j++)
+    {
+        real_t buf_j = ((QMF_RE(buffer[j][bd])+(1<<(exp-1)))>>exp);
+        real_t buf_j_1 = ((QMF_RE(buffer[j-1][bd])+(1<<(exp-1)))>>exp);
+        real_t buf_j_2 = ((QMF_RE(buffer[j-2][bd])+(1<<(exp-1)))>>exp);
+
+        /* normalisation with rounding */
+        r01 += MUL_R(buf_j, buf_j_1);
+        r02 += MUL_R(buf_j, buf_j_2);
+        r11 += MUL_R(buf_j_1, buf_j_1);
+    }
+    RE(ac->r12) = r01 -
+        MUL_R(((QMF_RE(buffer[len+offset-1][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[len+offset-2][bd])+(1<<(exp-1)))>>exp)) +
+        MUL_R(((QMF_RE(buffer[offset-1][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[offset-2][bd])+(1<<(exp-1)))>>exp));
+    RE(ac->r22) = r11 -
+        MUL_R(((QMF_RE(buffer[len+offset-2][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[len+offset-2][bd])+(1<<(exp-1)))>>exp)) +
+        MUL_R(((QMF_RE(buffer[offset-2][bd])+(1<<(exp-1)))>>exp), ((QMF_RE(buffer[offset-2][bd])+(1<<(exp-1)))>>exp));
+#else
     for (j = offset; j < len + offset; j++)
     {
         r01 += QMF_RE(buffer[j][bd]) * QMF_RE(buffer[j-1][bd]);
@@ -210,63 +258,213 @@
     RE(ac->r22) = r11 -
         QMF_RE(buffer[len+offset-2][bd]) * QMF_RE(buffer[len+offset-2][bd]) +
         QMF_RE(buffer[offset-2][bd]) * QMF_RE(buffer[offset-2][bd]);
+#endif
     RE(ac->r01) = r01;
     RE(ac->r02) = r02;
     RE(ac->r11) = r11;
 
-    ac->det = MUL_R(RE(ac->r11), RE(ac->r22)) - MUL_C(MUL_R(RE(ac->r12), RE(ac->r12)), rel);
+    ac->det = MUL_R(RE(ac->r11), RE(ac->r22)) - MUL_F(MUL_R(RE(ac->r12), RE(ac->r12)), rel);
 }
 #else
-static void auto_correlation(sbr_info *sbr, acorr_coef *ac, qmf_t buffer[MAX_NTSRHFG][32],
+static void auto_correlation(sbr_info *sbr, acorr_coef *ac, qmf_t buffer[MAX_NTSRHFG][64],
                              uint8_t bd, uint8_t len)
 {
     real_t r01r = 0, r01i = 0, r02r = 0, r02i = 0, r11r = 0;
+    real_t temp1_r, temp1_i, temp2_r, temp2_i, temp3_r, temp3_i, temp4_r, temp4_i, temp5_r, temp5_i;
+#ifdef FIXED_POINT
+    const real_t rel = FRAC_CONST(0.999999); // 1 / (1 + 1e-6f);
+    uint32_t mask, exp;
+    real_t pow2_to_exp;
+#else
     const real_t rel = 1 / (1 + 1e-6f);
+#endif
     int8_t j;
     uint8_t offset = sbr->tHFAdj;
 
+#ifdef FIXED_POINT
+    mask = 0;
+
+    for (j = (offset-2); j < (len + offset); j++)
+    {
+        real_t x;
+        x = QMF_RE(buffer[j][bd])>>REAL_BITS;
+        mask |= x ^ (x >> 31);
+        x = QMF_IM(buffer[j][bd])>>REAL_BITS;
+        mask |= x ^ (x >> 31);
+    }
+
+    exp = wl_min_lzc(mask);
+
+    /* improves accuracy */
+    if (exp > 0)
+        exp -= 1;
+   
+    pow2_to_exp = 1<<(exp-1);
+
+    temp2_r = (QMF_RE(buffer[offset-2][bd]) + pow2_to_exp) >> exp;
+    temp2_i = (QMF_IM(buffer[offset-2][bd]) + pow2_to_exp) >> exp;
+    temp3_r = (QMF_RE(buffer[offset-1][bd]) + pow2_to_exp) >> exp;
+    temp3_i = (QMF_IM(buffer[offset-1][bd]) + pow2_to_exp) >> exp;
+    // Save these because they are needed after loop
+    temp4_r = temp2_r;
+    temp4_i = temp2_i;
+    temp5_r = temp3_r;
+    temp5_i = temp3_i;
 
     for (j = offset; j < len + offset; j++)
     {
-        r01r += QMF_RE(buffer[j][bd]) * QMF_RE(buffer[j-1][bd]) +
-            QMF_IM(buffer[j][bd]) * QMF_IM(buffer[j-1][bd]);
-        r01i += QMF_IM(buffer[j][bd]) * QMF_RE(buffer[j-1][bd]) -
-            QMF_RE(buffer[j][bd]) * QMF_IM(buffer[j-1][bd]);
-        r02r += QMF_RE(buffer[j][bd]) * QMF_RE(buffer[j-2][bd]) +
-            QMF_IM(buffer[j][bd]) * QMF_IM(buffer[j-2][bd]);
-        r02i += QMF_IM(buffer[j][bd]) * QMF_RE(buffer[j-2][bd]) -
-            QMF_RE(buffer[j][bd]) * QMF_IM(buffer[j-2][bd]);
-        r11r += QMF_RE(buffer[j-1][bd]) * QMF_RE(buffer[j-1][bd]) +
-            QMF_IM(buffer[j-1][bd]) * QMF_IM(buffer[j-1][bd]);
+    	temp1_r = temp2_r; // temp1_r = (QMF_RE(buffer[offset-2][bd] + (1<<(exp-1))) >> exp;
+    	temp1_i = temp2_i; // temp1_i = (QMF_IM(buffer[offset-2][bd] + (1<<(exp-1))) >> exp;
+    	temp2_r = temp3_r; // temp2_r = (QMF_RE(buffer[offset-1][bd] + (1<<(exp-1))) >> exp;
+    	temp2_i = temp3_i; // temp2_i = (QMF_IM(buffer[offset-1][bd] + (1<<(exp-1))) >> exp;
+        temp3_r = (QMF_RE(buffer[j][bd]) + pow2_to_exp) >> exp;
+        temp3_i = (QMF_IM(buffer[j][bd]) + pow2_to_exp) >> exp;
+        r01r += MUL_R(temp3_r, temp2_r) + MUL_R(temp3_i, temp2_i);
+        r01i += MUL_R(temp3_i, temp2_r) - MUL_R(temp3_r, temp2_i);
+        r02r += MUL_R(temp3_r, temp1_r) + MUL_R(temp3_i, temp1_i);
+        r02i += MUL_R(temp3_i, temp1_r) - MUL_R(temp3_r, temp1_i);
+        r11r += MUL_R(temp2_r, temp2_r) + MUL_R(temp2_i, temp2_i);
     }
 
+    // These are actual values in temporary variable at this point
+    // temp1_r = (QMF_RE(buffer[len+offset-1-2][bd] + (1<<(exp-1))) >> exp;
+    // temp1_i = (QMF_IM(buffer[len+offset-1-2][bd] + (1<<(exp-1))) >> exp;
+    // temp2_r = (QMF_RE(buffer[len+offset-1-1][bd] + (1<<(exp-1))) >> exp;
+    // temp2_i = (QMF_IM(buffer[len+offset-1-1][bd] + (1<<(exp-1))) >> exp;
+    // temp3_r = (QMF_RE(buffer[len+offset-1][bd]) + (1<<(exp-1))) >> exp;
+    // temp3_i = (QMF_IM(buffer[len+offset-1][bd]) + (1<<(exp-1))) >> exp;
+    // temp4_r = (QMF_RE(buffer[offset-2][bd]) + (1<<(exp-1))) >> exp;
+    // temp4_i = (QMF_IM(buffer[offset-2][bd]) + (1<<(exp-1))) >> exp;
+    // temp5_r = (QMF_RE(buffer[offset-1][bd]) + (1<<(exp-1))) >> exp;
+    // temp5_i = (QMF_IM(buffer[offset-1][bd]) + (1<<(exp-1))) >> exp;
+
+    RE(ac->r12) = r01r -
+        (MUL_R(temp3_r, temp2_r) + MUL_R(temp3_i, temp2_i)) +
+        (MUL_R(temp5_r, temp4_r) + MUL_R(temp5_i, temp4_i));
+    IM(ac->r12) = r01i -
+        (MUL_R(temp3_i, temp2_r) - MUL_R(temp3_r, temp2_i)) +
+        (MUL_R(temp5_i, temp4_r) - MUL_R(temp5_r, temp4_i));
+    RE(ac->r22) = r11r -
+        (MUL_R(temp2_r, temp2_r) + MUL_R(temp2_i, temp2_i)) +
+        (MUL_R(temp4_r, temp4_r) + MUL_R(temp4_i, temp4_i));
+
+#else
+
+    temp2_r = QMF_RE(buffer[offset-2][bd]);
+    temp2_i = QMF_IM(buffer[offset-2][bd]);
+    temp3_r = QMF_RE(buffer[offset-1][bd]);
+    temp3_i = QMF_IM(buffer[offset-1][bd]);
+    // Save these because they are needed after loop
+    temp4_r = temp2_r;
+    temp4_i = temp2_i;
+    temp5_r = temp3_r;
+    temp5_i = temp3_i;
+
+    for (j = offset; j < len + offset; j++)
+    {
+    	temp1_r = temp2_r; // temp1_r = QMF_RE(buffer[j-2][bd];
+    	temp1_i = temp2_i; // temp1_i = QMF_IM(buffer[j-2][bd];
+    	temp2_r = temp3_r; // temp2_r = QMF_RE(buffer[j-1][bd];
+    	temp2_i = temp3_i; // temp2_i = QMF_IM(buffer[j-1][bd];
+        temp3_r = QMF_RE(buffer[j][bd]);
+        temp3_i = QMF_IM(buffer[j][bd]);
+        r01r += temp3_r * temp2_r + temp3_i * temp2_i;
+        r01i += temp3_i * temp2_r - temp3_r * temp2_i;
+        r02r += temp3_r * temp1_r + temp3_i * temp1_i;
+        r02i += temp3_i * temp1_r - temp3_r * temp1_i;
+        r11r += temp2_r * temp2_r + temp2_i * temp2_i;
+    }
+
+    // These are actual values in temporary variable at this point
+    // temp1_r = QMF_RE(buffer[len+offset-1-2][bd];
+    // temp1_i = QMF_IM(buffer[len+offset-1-2][bd];
+    // temp2_r = QMF_RE(buffer[len+offset-1-1][bd];
+    // temp2_i = QMF_IM(buffer[len+offset-1-1][bd];
+    // temp3_r = QMF_RE(buffer[len+offset-1][bd]);
+    // temp3_i = QMF_IM(buffer[len+offset-1][bd]);
+    // temp4_r = QMF_RE(buffer[offset-2][bd]);
+    // temp4_i = QMF_IM(buffer[offset-2][bd]);
+    // temp5_r = QMF_RE(buffer[offset-1][bd]);
+    // temp5_i = QMF_IM(buffer[offset-1][bd]);
+
+    RE(ac->r12) = r01r -
+        (temp3_r * temp2_r + temp3_i * temp2_i) +
+        (temp5_r * temp4_r + temp5_i * temp4_i);
+    IM(ac->r12) = r01i -
+        (temp3_i * temp2_r - temp3_r * temp2_i) +
+        (temp5_i * temp4_r - temp5_r * temp4_i);
+    RE(ac->r22) = r11r -
+        (temp2_r * temp2_r + temp2_i * temp2_i) +
+        (temp4_r * temp4_r + temp4_i * temp4_i);
+
+#endif
+
     RE(ac->r01) = r01r;
     IM(ac->r01) = r01i;
     RE(ac->r02) = r02r;
     IM(ac->r02) = r02i;
     RE(ac->r11) = r11r;
 
-    RE(ac->r12) = r01r -
-        (QMF_RE(buffer[len+offset-1][bd]) * QMF_RE(buffer[len+offset-2][bd]) + QMF_IM(buffer[len+offset-1][bd]) * QMF_IM(buffer[len+offset-2][bd])) +
-        (QMF_RE(buffer[offset-1][bd]) * QMF_RE(buffer[offset-2][bd]) + QMF_IM(buffer[offset-1][bd]) * QMF_IM(buffer[offset-2][bd]));
-    IM(ac->r12) = r01i -
-        (QMF_IM(buffer[len+offset-1][bd]) * QMF_RE(buffer[len+offset-2][bd]) - QMF_RE(buffer[len+offset-1][bd]) * QMF_IM(buffer[len+offset-2][bd])) +
-        (QMF_IM(buffer[offset-1][bd]) * QMF_RE(buffer[offset-2][bd]) - QMF_RE(buffer[offset-1][bd]) * QMF_IM(buffer[offset-2][bd]));
-    RE(ac->r22) = r11r -
-        (QMF_RE(buffer[len+offset-2][bd]) * QMF_RE(buffer[len+offset-2][bd]) + QMF_IM(buffer[len+offset-2][bd]) * QMF_IM(buffer[len+offset-2][bd])) +
-        (QMF_RE(buffer[offset-2][bd]) * QMF_RE(buffer[offset-2][bd]) + QMF_IM(buffer[offset-2][bd]) * QMF_IM(buffer[offset-2][bd]));
-
-    ac->det = RE(ac->r11) * RE(ac->r22) - rel * (RE(ac->r12) * RE(ac->r12) + IM(ac->r12) * IM(ac->r12));
+    ac->det = MUL_R(RE(ac->r11), RE(ac->r22)) - MUL_F(rel, (MUL_R(RE(ac->r12), RE(ac->r12)) + MUL_R(IM(ac->r12), IM(ac->r12))));
 }
 #endif
 
 /* calculate linear prediction coefficients using the covariance method */
-static void calc_prediction_coef(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][32],
-                                 complex_t *alpha_0, complex_t *alpha_1
-#ifdef SBR_LOW_POWER
-                                 , real_t *rxx
+#ifndef SBR_LOW_POWER
+static void calc_prediction_coef(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
+                                 complex_t *alpha_0, complex_t *alpha_1, uint8_t k)
+{
+    real_t tmp;
+    acorr_coef ac;
+
+    auto_correlation(sbr, &ac, Xlow, k, sbr->numTimeSlotsRate + 6);
+
+    if (ac.det == 0)
+    {
+        RE(alpha_1[k]) = 0;
+        IM(alpha_1[k]) = 0;
+    } else {
+#ifdef FIXED_POINT
+        tmp = (MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(IM(ac.r01), IM(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11)));
+        RE(alpha_1[k]) = DIV_R(tmp, ac.det);
+        tmp = (MUL_R(IM(ac.r01), RE(ac.r12)) + MUL_R(RE(ac.r01), IM(ac.r12)) - MUL_R(IM(ac.r02), RE(ac.r11)));
+        IM(alpha_1[k]) = DIV_R(tmp, ac.det);
+#else
+        tmp = REAL_CONST(1.0) / ac.det;
+        RE(alpha_1[k]) = (MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(IM(ac.r01), IM(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11))) * tmp;
+        IM(alpha_1[k]) = (MUL_R(IM(ac.r01), RE(ac.r12)) + MUL_R(RE(ac.r01), IM(ac.r12)) - MUL_R(IM(ac.r02), RE(ac.r11))) * tmp;
 #endif
-                                 )
+    }
+
+    if (RE(ac.r11) == 0)
+    {
+        RE(alpha_0[k]) = 0;
+        IM(alpha_0[k]) = 0;
+    } else {
+#ifdef FIXED_POINT
+        tmp = -(RE(ac.r01) + MUL_R(RE(alpha_1[k]), RE(ac.r12)) + MUL_R(IM(alpha_1[k]), IM(ac.r12)));
+        RE(alpha_0[k]) = DIV_R(tmp, RE(ac.r11));
+        tmp = -(IM(ac.r01) + MUL_R(IM(alpha_1[k]), RE(ac.r12)) - MUL_R(RE(alpha_1[k]), IM(ac.r12)));
+        IM(alpha_0[k]) = DIV_R(tmp, RE(ac.r11));
+#else
+        tmp = 1.0f / RE(ac.r11);
+        RE(alpha_0[k]) = -(RE(ac.r01) + MUL_R(RE(alpha_1[k]), RE(ac.r12)) + MUL_R(IM(alpha_1[k]), IM(ac.r12))) * tmp;
+        IM(alpha_0[k]) = -(IM(ac.r01) + MUL_R(IM(alpha_1[k]), RE(ac.r12)) - MUL_R(RE(alpha_1[k]), IM(ac.r12))) * tmp;
+#endif
+    }
+
+    if ((MUL_R(RE(alpha_0[k]),RE(alpha_0[k])) + MUL_R(IM(alpha_0[k]),IM(alpha_0[k])) >= REAL_CONST(16)) ||
+        (MUL_R(RE(alpha_1[k]),RE(alpha_1[k])) + MUL_R(IM(alpha_1[k]),IM(alpha_1[k])) >= REAL_CONST(16)))
+    {
+        RE(alpha_0[k]) = 0;
+        IM(alpha_0[k]) = 0;
+        RE(alpha_1[k]) = 0;
+        IM(alpha_1[k]) = 0;
+    }
+}
+#else
+static void calc_prediction_coef_lp(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
+                                    complex_t *alpha_0, complex_t *alpha_1, real_t *rxx)
 {
     uint8_t k;
     real_t tmp;
@@ -276,21 +474,16 @@
     {
         auto_correlation(sbr, &ac, Xlow, k, sbr->numTimeSlotsRate + 6);
 
-#ifdef SBR_LOW_POWER
         if (ac.det == 0)
         {
+            RE(alpha_0[k]) = 0;
             RE(alpha_1[k]) = 0;
         } else {
-            tmp = MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11));
-            RE(alpha_1[k]) = SBR_DIV(tmp, ac.det);
-        }
+            tmp = MUL_R(RE(ac.r01), RE(ac.r22)) - MUL_R(RE(ac.r12), RE(ac.r02));
+            RE(alpha_0[k]) = DIV_R(tmp, (-ac.det));
 
-        if (RE(ac.r11) == 0)
-        {
-            RE(alpha_0[k]) = 0;
-        } else {
-            tmp = RE(ac.r01) + MUL_R(RE(alpha_1[k]), RE(ac.r12));
-            RE(alpha_0[k]) = -SBR_DIV(tmp, RE(ac.r11));
+            tmp = MUL_R(RE(ac.r01), RE(ac.r12)) - MUL_R(RE(ac.r02), RE(ac.r11));
+            RE(alpha_1[k]) = DIV_R(tmp, ac.det);
         }
 
         if ((RE(alpha_0[k]) >= REAL_CONST(4)) || (RE(alpha_1[k]) >= REAL_CONST(4)))
@@ -302,84 +495,54 @@
         /* reflection coefficient */
         if (RE(ac.r11) == 0)
         {
-            rxx[k] = REAL_CONST(0.0);
+            rxx[k] = COEF_CONST(0.0);
         } else {
-            rxx[k] = -SBR_DIV(RE(ac.r01), RE(ac.r11));
-            if (rxx[k] > REAL_CONST(1.0)) rxx[k] = REAL_CONST(1.0);
-            if (rxx[k] < REAL_CONST(-1.0)) rxx[k] = REAL_CONST(-1.0);
-        }
-#else
-        if (ac.det == 0)
-        {
-            RE(alpha_1[k]) = 0;
-            IM(alpha_1[k]) = 0;
-        } else {
-            tmp = REAL_CONST(1.0) / ac.det;
-            RE(alpha_1[k]) = (RE(ac.r01) * RE(ac.r12) - IM(ac.r01) * IM(ac.r12) - RE(ac.r02) * RE(ac.r11)) * tmp;
-            IM(alpha_1[k]) = (IM(ac.r01) * RE(ac.r12) + RE(ac.r01) * IM(ac.r12) - IM(ac.r02) * RE(ac.r11)) * tmp;
+            rxx[k] = DIV_C(RE(ac.r01), RE(ac.r11));
+            rxx[k] = -rxx[k];
+            if (rxx[k] > COEF_CONST(1.0)) rxx[k] = COEF_CONST(1.0);
+            if (rxx[k] < COEF_CONST(-1.0)) rxx[k] = COEF_CONST(-1.0);
         }
-
-        if (RE(ac.r11) == 0)
-        {
-            RE(alpha_0[k]) = 0;
-            IM(alpha_0[k]) = 0;
-        } else {
-            tmp = 1.0f / RE(ac.r11);
-            RE(alpha_0[k]) = -(RE(ac.r01) + RE(alpha_1[k]) * RE(ac.r12) + IM(alpha_1[k]) * IM(ac.r12)) * tmp;
-            IM(alpha_0[k]) = -(IM(ac.r01) + IM(alpha_1[k]) * RE(ac.r12) - RE(alpha_1[k]) * IM(ac.r12)) * tmp;
-        }
-
-        if ((RE(alpha_0[k])*RE(alpha_0[k]) + IM(alpha_0[k])*IM(alpha_0[k]) >= 16) ||
-            (RE(alpha_1[k])*RE(alpha_1[k]) + IM(alpha_1[k])*IM(alpha_1[k]) >= 16))
-        {
-            RE(alpha_0[k]) = 0;
-            IM(alpha_0[k]) = 0;
-            RE(alpha_1[k]) = 0;
-            IM(alpha_1[k]) = 0;
-        }
-#endif
     }
 }
 
-#ifdef SBR_LOW_POWER
 static void calc_aliasing_degree(sbr_info *sbr, real_t *rxx, real_t *deg)
 {
     uint8_t k;
 
-    rxx[0] = REAL_CONST(0.0);
-    deg[1] = REAL_CONST(0.0);
+    rxx[0] = COEF_CONST(0.0);
+    deg[1] = COEF_CONST(0.0);
 
     for (k = 2; k < sbr->k0; k++)
     {
         deg[k] = 0.0;
 
-        if ((k % 2 == 0) && (rxx[k] < REAL_CONST(0.0)))
+        if ((k % 2 == 0) && (rxx[k] < COEF_CONST(0.0)))
         {
             if (rxx[k-1] < 0.0)
             {
-                deg[k] = REAL_CONST(1.0);
+                deg[k] = COEF_CONST(1.0);
 
-                if (rxx[k-2] > REAL_CONST(0.0))
+                if (rxx[k-2] > COEF_CONST(0.0))
                 {
-                    deg[k-1] = REAL_CONST(1.0) - MUL_R(rxx[k-1], rxx[k-1]);
+                    deg[k-1] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
                 }
-            } else if (rxx[k-2] > REAL_CONST(0.0)) {
-                deg[k]   = REAL_CONST(1.0) - MUL_R(rxx[k-1], rxx[k-1]);
+            } else if (rxx[k-2] > COEF_CONST(0.0)) {
+                deg[k] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
             }
         }
 
-        if ((k % 2 == 1) && (rxx[k] > REAL_CONST(0.0)))
+        if ((k % 2 == 1) && (rxx[k] > COEF_CONST(0.0)))
         {
-            if (rxx[k-1] > REAL_CONST(0.0))
+            if (rxx[k-1] > COEF_CONST(0.0))
             {
-                deg[k] = REAL_CONST(1.0);
+                deg[k] = COEF_CONST(1.0);
 
-                if (rxx[k-2] < REAL_CONST(0.0))
+                if (rxx[k-2] < COEF_CONST(0.0))
                 {
-                    deg[k-1] = REAL_CONST(1.0) - MUL_R(rxx[k-1], rxx[k-1]);
+                    deg[k-1] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
                 }
-            } else if (rxx[k-2] < REAL_CONST(0.0)) {
-                deg[k] = REAL_CONST(1.0) - MUL_R(rxx[k-1], rxx[k-1]);
+            } else if (rxx[k-2] < COEF_CONST(0.0)) {
+                deg[k] = COEF_CONST(1.0) - MUL_C(rxx[k-1], rxx[k-1]);
             }
         }
     }
@@ -442,7 +605,7 @@
     uint8_t odd, sb;
     uint8_t msb = sbr->k0;
     uint8_t usb = sbr->kx;
-    uint8_t goalSbTab[] = { 21, 23, 43, 46, 64, 85, 93, 128, 0, 0, 0 };
+    uint8_t goalSbTab[] = { 21, 23, 32, 43, 46, 64, 85, 93, 128, 0, 0, 0 };
     /* (uint8_t)(2.048e6/sbr->sample_rate + 0.5); */
     uint8_t goalSb = goalSbTab[get_sr_index(sbr->sample_rate)];
 
--- a/libfaad2/sbr_hfgen.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_hfgen.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_hfgen.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_hfgen.h,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -34,7 +34,7 @@
 extern "C" {
 #endif
 
-void hf_generation(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][32],
+void hf_generation(sbr_info *sbr, qmf_t Xlow[MAX_NTSRHFG][64],
                    qmf_t Xhigh[MAX_NTSRHFG][64]
 #ifdef SBR_LOW_POWER
                    ,real_t *deg
--- a/libfaad2/sbr_huff.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_huff.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_huff.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_huff.c,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -192,7 +192,6 @@
     { -57, -56 },    {  22,  23 },    { -55, -54 },    { -53, -52 }
 };
 
-
 static const int8_t t_huffman_noise_3_0dB[62][2] = {
     { -64,   1 },    { -63,   2 },    { -65,   3 },    { -66,   4 },
     { -62,   5 },    { -67,   6 },    {   7,   8 },    { -61, -68 },
@@ -229,7 +228,7 @@
 
     while (index >= 0)
     {
-        bit = (uint8_t)faad_getbits(ld, 1);
+        bit = (uint8_t)faad_get1bit(ld);
         index = t_huff[index][bit];
     }
 
--- a/libfaad2/sbr_qmf.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_qmf.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_qmf.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_qmf.c,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -40,12 +40,16 @@
 #include "sbr_qmf_c.h"
 #include "sbr_syntax.h"
 
-
 qmfa_info *qmfa_init(uint8_t channels)
 {
     qmfa_info *qmfa = (qmfa_info*)faad_malloc(sizeof(qmfa_info));
-    qmfa->x = (real_t*)faad_malloc(channels * 10 * sizeof(real_t));
-    memset(qmfa->x, 0, channels * 10 * sizeof(real_t));
+
+	/* x is implemented as double ringbuffer */
+    qmfa->x = (real_t*)faad_malloc(2 * channels * 10 * sizeof(real_t));
+    memset(qmfa->x, 0, 2 * channels * 10 * sizeof(real_t));
+
+	/* ringbuffer index */
+	qmfa->x_index = 0;
 
     qmfa->channels = channels;
 
@@ -62,11 +66,11 @@
 }
 
 void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input,
-                         qmf_t X[MAX_NTSRHFG][32], uint8_t offset, uint8_t kx)
+                         qmf_t X[MAX_NTSRHFG][64], uint8_t offset, uint8_t kx)
 {
     ALIGN real_t u[64];
 #ifndef SBR_LOW_POWER
-    ALIGN real_t x[64], y[64];
+    ALIGN real_t in_real[32], in_imag[32], out_real[32], out_imag[32];
 #else
     ALIGN real_t y[32];
 #endif
@@ -79,28 +83,34 @@
         int16_t n;
 
         /* shift input buffer x */
-        memmove(qmfa->x + 32, qmfa->x, (320-32)*sizeof(real_t));
+		/* input buffer is not shifted anymore, x is implemented as double ringbuffer */
+        //memmove(qmfa->x + 32, qmfa->x, (320-32)*sizeof(real_t));
 
         /* add new samples to input buffer x */
         for (n = 32 - 1; n >= 0; n--)
         {
 #ifdef FIXED_POINT
-            qmfa->x[n] = (input[in++]) >> 5;
+            qmfa->x[qmfa->x_index + n] = qmfa->x[qmfa->x_index + n + 320] = (input[in++]) >> 4;
 #else
-            qmfa->x[n] = input[in++];
+            qmfa->x[qmfa->x_index + n] = qmfa->x[qmfa->x_index + n + 320] = input[in++];
 #endif
         }
 
         /* window and summation to create array u */
         for (n = 0; n < 64; n++)
         {
-            u[n] = MUL_F(qmfa->x[n], qmf_c[2*n]) +
-                MUL_F(qmfa->x[n + 64], qmf_c[2*(n + 64)]) +
-                MUL_F(qmfa->x[n + 128], qmf_c[2*(n + 128)]) +
-                MUL_F(qmfa->x[n + 192], qmf_c[2*(n + 192)]) +
-                MUL_F(qmfa->x[n + 256], qmf_c[2*(n + 256)]);
+            u[n] = MUL_F(qmfa->x[qmfa->x_index + n], qmf_c[2*n]) +
+                MUL_F(qmfa->x[qmfa->x_index + n + 64], qmf_c[2*(n + 64)]) +
+                MUL_F(qmfa->x[qmfa->x_index + n + 128], qmf_c[2*(n + 128)]) +
+                MUL_F(qmfa->x[qmfa->x_index + n + 192], qmf_c[2*(n + 192)]) +
+                MUL_F(qmfa->x[qmfa->x_index + n + 256], qmf_c[2*(n + 256)]);
         }
 
+		/* update ringbuffer index */
+		qmfa->x_index -= 32;
+		if (qmfa->x_index < 0)
+			qmfa->x_index = (320-32);
+
         /* calculate 32 subband samples by introducing X */
 #ifdef SBR_LOW_POWER
         y[0] = u[48];
@@ -116,7 +126,7 @@
             if (n < kx)
             {
 #ifdef FIXED_POINT
-                QMF_RE(X[l + offset][n]) = u[n] << 1;
+                QMF_RE(X[l + offset][n]) = u[n] /*<< 1*/;
 #else
                 QMF_RE(X[l + offset][n]) = 2. * u[n];
 #endif
@@ -125,64 +135,105 @@
             }
         }
 #else
-        x[0] = u[0];
-        for (n = 0; n < 31; n++)
+
+        // Reordering of data moved from DCT_IV to here
+        in_imag[31] = u[1];
+        in_real[0] = u[0];
+        for (n = 1; n < 31; n++)
         {
-            x[2*n+1] = u[n+1] + u[63-n];
-            x[2*n+2] = u[n+1] - u[63-n];
+            in_imag[31 - n] = u[n+1];
+            in_real[n] = -u[64-n];
         }
-        x[63] = u[32];
-
-        DCT4_64_kernel(y, x);
+        in_imag[0] = u[32];
+        in_real[31] = -u[33];
 
-        for (n = 0; n < 32; n++)
-        {
-            if (n < kx)
-            {
+        // dct4_kernel is DCT_IV without reordering which is done before and after FFT
+        dct4_kernel(in_real, in_imag, out_real, out_imag);
+
+        // Reordering of data moved from DCT_IV to here
+        for (n = 0; n < 16; n++) {
+            if (2*n+1 < kx) {
 #ifdef FIXED_POINT
-                QMF_RE(X[l + offset][n]) = y[n] << 1;
-                QMF_IM(X[l + offset][n]) = -y[63-n] << 1;
+                QMF_RE(X[l + offset][2*n])   = out_real[n];
+                QMF_IM(X[l + offset][2*n])   = out_imag[n];
+                QMF_RE(X[l + offset][2*n+1]) = -out_imag[31-n];
+                QMF_IM(X[l + offset][2*n+1]) = -out_real[31-n];
 #else
-                QMF_RE(X[l + offset][n]) = 2. * y[n];
-                QMF_IM(X[l + offset][n]) = -2. * y[63-n];
+                QMF_RE(X[l + offset][2*n])   = 2. * out_real[n];
+                QMF_IM(X[l + offset][2*n])   = 2. * out_imag[n];
+                QMF_RE(X[l + offset][2*n+1]) = -2. * out_imag[31-n];
+                QMF_IM(X[l + offset][2*n+1]) = -2. * out_real[31-n];
 #endif
             } else {
-                QMF_RE(X[l + offset][n]) = 0;
-                QMF_IM(X[l + offset][n]) = 0;
+                if (2*n < kx) {
+#ifdef FIXED_POINT
+                    QMF_RE(X[l + offset][2*n])   = out_real[n];
+                    QMF_IM(X[l + offset][2*n])   = out_imag[n];
+#else
+                    QMF_RE(X[l + offset][2*n])   = 2. * out_real[n];
+                    QMF_IM(X[l + offset][2*n])   = 2. * out_imag[n];
+#endif
+                }
+                else {
+                    QMF_RE(X[l + offset][2*n]) = 0;
+                    QMF_IM(X[l + offset][2*n]) = 0;
+                }
+                QMF_RE(X[l + offset][2*n+1]) = 0;
+                QMF_IM(X[l + offset][2*n+1]) = 0;
             }
         }
 #endif
     }
 }
 
+static const complex_t qmf32_pre_twiddle[] =
+{
+    { FRAC_CONST(0.999924701839145), FRAC_CONST(-0.012271538285720) },
+    { FRAC_CONST(0.999322384588350), FRAC_CONST(-0.036807222941359) },
+    { FRAC_CONST(0.998118112900149), FRAC_CONST(-0.061320736302209) },
+    { FRAC_CONST(0.996312612182778), FRAC_CONST(-0.085797312344440) },
+    { FRAC_CONST(0.993906970002356), FRAC_CONST(-0.110222207293883) },
+    { FRAC_CONST(0.990902635427780), FRAC_CONST(-0.134580708507126) },
+    { FRAC_CONST(0.987301418157858), FRAC_CONST(-0.158858143333861) },
+    { FRAC_CONST(0.983105487431216), FRAC_CONST(-0.183039887955141) },
+    { FRAC_CONST(0.978317370719628), FRAC_CONST(-0.207111376192219) },
+    { FRAC_CONST(0.972939952205560), FRAC_CONST(-0.231058108280671) },
+    { FRAC_CONST(0.966976471044852), FRAC_CONST(-0.254865659604515) },
+    { FRAC_CONST(0.960430519415566), FRAC_CONST(-0.278519689385053) },
+    { FRAC_CONST(0.953306040354194), FRAC_CONST(-0.302005949319228) },
+    { FRAC_CONST(0.945607325380521), FRAC_CONST(-0.325310292162263) },
+    { FRAC_CONST(0.937339011912575), FRAC_CONST(-0.348418680249435) },
+    { FRAC_CONST(0.928506080473216), FRAC_CONST(-0.371317193951838) },
+    { FRAC_CONST(0.919113851690058), FRAC_CONST(-0.393992040061048) },
+    { FRAC_CONST(0.909167983090522), FRAC_CONST(-0.416429560097637) },
+    { FRAC_CONST(0.898674465693954), FRAC_CONST(-0.438616238538528) },
+    { FRAC_CONST(0.887639620402854), FRAC_CONST(-0.460538710958240) },
+    { FRAC_CONST(0.876070094195407), FRAC_CONST(-0.482183772079123) },
+    { FRAC_CONST(0.863972856121587), FRAC_CONST(-0.503538383725718) },
+    { FRAC_CONST(0.851355193105265), FRAC_CONST(-0.524589682678469) },
+    { FRAC_CONST(0.838224705554838), FRAC_CONST(-0.545324988422046) },
+    { FRAC_CONST(0.824589302785025), FRAC_CONST(-0.565731810783613) },
+    { FRAC_CONST(0.810457198252595), FRAC_CONST(-0.585797857456439) },
+    { FRAC_CONST(0.795836904608884), FRAC_CONST(-0.605511041404326) },
+    { FRAC_CONST(0.780737228572094), FRAC_CONST(-0.624859488142386) },
+    { FRAC_CONST(0.765167265622459), FRAC_CONST(-0.643831542889791) },
+    { FRAC_CONST(0.749136394523459), FRAC_CONST(-0.662415777590172) },
+    { FRAC_CONST(0.732654271672413), FRAC_CONST(-0.680600997795453) },
+    { FRAC_CONST(0.715730825283819), FRAC_CONST(-0.698376249408973) }
+};
+
 qmfs_info *qmfs_init(uint8_t channels)
 {
     qmfs_info *qmfs = (qmfs_info*)faad_malloc(sizeof(qmfs_info));
 
-#ifndef SBR_LOW_POWER
-    qmfs->v[0] = (real_t*)faad_malloc(channels * 10 * sizeof(real_t));
-    memset(qmfs->v[0], 0, channels * 10 * sizeof(real_t));
-    qmfs->v[1] = (real_t*)faad_malloc(channels * 10 * sizeof(real_t));
-    memset(qmfs->v[1], 0, channels * 10 * sizeof(real_t));
-#else
-    qmfs->v[0] = (real_t*)faad_malloc(channels * 20 * sizeof(real_t));
-    memset(qmfs->v[0], 0, channels * 20 * sizeof(real_t));
-    qmfs->v[1] = NULL;
-#endif
+	/* v is a double ringbuffer */
+    qmfs->v = (real_t*)faad_malloc(2 * channels * 20 * sizeof(real_t));
+    memset(qmfs->v, 0, 2 * channels * 20 * sizeof(real_t));
 
     qmfs->v_index = 0;
 
     qmfs->channels = channels;
 
-#ifdef USE_SSE
-    if (cpu_has_sse())
-    {
-        qmfs->qmf_func = sbr_qmf_synthesis_64_sse;
-    } else {
-        qmfs->qmf_func = sbr_qmf_synthesis_64;
-    }
-#endif
-
     return qmfs;
 }
 
@@ -190,15 +241,82 @@
 {
     if (qmfs)
     {
-        if (qmfs->v[0]) faad_free(qmfs->v[0]);
-#ifndef SBR_LOW_POWER
-        if (qmfs->v[1]) faad_free(qmfs->v[1]);
-#endif
+        if (qmfs->v) faad_free(qmfs->v);
         faad_free(qmfs);
     }
 }
 
 #ifdef SBR_LOW_POWER
+
+void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
+                          real_t *output)
+{
+    ALIGN real_t x[16];
+    ALIGN real_t y[16];
+    int16_t n, k, out = 0;
+    uint8_t l;
+
+    /* qmf subsample l */
+    for (l = 0; l < sbr->numTimeSlotsRate; l++)
+    {
+        /* shift buffers */
+        /* we are not shifting v, it is a double ringbuffer */
+        //memmove(qmfs->v + 64, qmfs->v, (640-64)*sizeof(real_t));
+
+        /* calculate 64 samples */
+        for (k = 0; k < 16; k++)
+        {
+#ifdef FIXED_POINT
+            y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][31 - k]));
+            x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][31 - k]));
+#else
+            y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][31 - k])) / 32.0;
+            x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][31 - k])) / 32.0;
+#endif
+        }
+
+        /* even n samples */
+        DCT2_16_unscaled(x, x);
+        /* odd n samples */
+        DCT4_16(y, y);
+
+        for (n = 8; n < 24; n++)
+        {
+            qmfs->v[qmfs->v_index + n*2] = qmfs->v[qmfs->v_index + 640 + n*2] = x[n-8];
+            qmfs->v[qmfs->v_index + n*2+1] = qmfs->v[qmfs->v_index + 640 + n*2+1] = y[n-8];
+        }
+        for (n = 0; n < 16; n++)
+        {
+            qmfs->v[qmfs->v_index + n] = qmfs->v[qmfs->v_index + 640 + n] = qmfs->v[qmfs->v_index + 32-n];
+        }
+        qmfs->v[qmfs->v_index + 48] = qmfs->v[qmfs->v_index + 640 + 48] = 0;
+        for (n = 1; n < 16; n++)
+        {
+            qmfs->v[qmfs->v_index + 48+n] = qmfs->v[qmfs->v_index + 640 + 48+n] = -qmfs->v[qmfs->v_index + 48-n];
+        }
+
+        /* calculate 32 output samples and window */
+        for (k = 0; k < 32; k++)
+        {
+            output[out++] = MUL_F(qmfs->v[qmfs->v_index + k], qmf_c[2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 96 + k], qmf_c[64 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 128 + k], qmf_c[128 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 224 + k], qmf_c[192 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 256 + k], qmf_c[256 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 352 + k], qmf_c[320 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 384 + k], qmf_c[384 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 480 + k], qmf_c[448 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 512 + k], qmf_c[512 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 608 + k], qmf_c[576 + 2*k]);
+        }
+
+        /* update the ringbuffer index */
+        qmfs->v_index -= 64;
+        if (qmfs->v_index < 0)
+            qmfs->v_index = (640-64);
+    }
+}
+
 void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
                           real_t *output)
 {
@@ -211,172 +329,71 @@
     /* qmf subsample l */
     for (l = 0; l < sbr->numTimeSlotsRate; l++)
     {
-        //real_t *v0, *v1;
-
         /* shift buffers */
-        //memmove(qmfs->v[0] + 64, qmfs->v[0], (640-64)*sizeof(real_t));
-        //memmove(qmfs->v[1] + 64, qmfs->v[1], (640-64)*sizeof(real_t));
-        memmove(qmfs->v[0] + 128, qmfs->v[0], (1280-128)*sizeof(real_t));
-
-        //v0 = qmfs->v[qmfs->v_index];
-        //v1 = qmfs->v[(qmfs->v_index + 1) & 0x1];
-        //qmfs->v_index = (qmfs->v_index + 1) & 0x1;
+        /* we are not shifting v, it is a double ringbuffer */
+        //memmove(qmfs->v + 128, qmfs->v, (1280-128)*sizeof(real_t));
 
         /* calculate 128 samples */
-        for (k = 0; k < 64; k++)
+        for (k = 0; k < 32; k++)
         {
 #ifdef FIXED_POINT
-            x[k] = QMF_RE(X[l][k]);
+            y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][63 - k]));
+            x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][63 - k]));
 #else
-            x[k] = QMF_RE(X[l][k]) / 32.;
+            y[k] = (QMF_RE(X[l][k]) - QMF_RE(X[l][63 - k])) / 32.0;
+            x[k] = (QMF_RE(X[l][k]) + QMF_RE(X[l][63 - k])) / 32.0;
 #endif
         }
 
-        for (n = 0; n < 32; n++)
-        {
-            y[2*n]   = -x[2*n];
-            y[2*n+1] =  x[2*n+1];
-        }
+        /* even n samples */
+        DCT2_32_unscaled(x, x);
+        /* odd n samples */
+        DCT4_32(y, y);
 
-        DCT2_64_unscaled(x, x);
-
-        for (n = 0; n < 64; n++)
+        for (n = 16; n < 48; n++)
         {
-            qmfs->v[0][n+32] = x[n];
+            qmfs->v[qmfs->v_index + n*2]   = qmfs->v[qmfs->v_index + 1280 + n*2]   = x[n-16];
+            qmfs->v[qmfs->v_index + n*2+1] = qmfs->v[qmfs->v_index + 1280 + n*2+1] = y[n-16];
         }
         for (n = 0; n < 32; n++)
         {
-            qmfs->v[0][31 - n] = x[n + 1];
+            qmfs->v[qmfs->v_index + n] = qmfs->v[qmfs->v_index + 1280 + n] = qmfs->v[qmfs->v_index + 64-n];
         }
-        DST2_64_unscaled(x, y);
-        qmfs->v[0][96] = 0;
+        qmfs->v[qmfs->v_index + 96] = qmfs->v[qmfs->v_index + 1280 + 96] = 0;
         for (n = 1; n < 32; n++)
         {
-            qmfs->v[0][n + 96] = x[n-1];
+            qmfs->v[qmfs->v_index + 96+n] = qmfs->v[qmfs->v_index + 1280 + 96+n] = -qmfs->v[qmfs->v_index + 96-n];
         }
 
         /* calculate 64 output samples and window */
         for (k = 0; k < 64; k++)
         {
-#if 1
-             output[out++] = MUL_F(qmfs->v[0][k], qmf_c[k]) +
-                 MUL_F(qmfs->v[0][192 + k], qmf_c[64 + k]) +
-                 MUL_F(qmfs->v[0][256 + k], qmf_c[128 + k]) +
-                 MUL_F(qmfs->v[0][256 + 192 + k], qmf_c[128 + 64 + k]) +
-                 MUL_F(qmfs->v[0][512 + k], qmf_c[256 + k]) +
-                 MUL_F(qmfs->v[0][512 + 192 + k], qmf_c[256 + 64 + k]) +
-                 MUL_F(qmfs->v[0][768 + k], qmf_c[384 + k]) +
-                 MUL_F(qmfs->v[0][768 + 192 + k], qmf_c[384 + 64 + k]) +
-                 MUL_F(qmfs->v[0][1024 + k], qmf_c[512 + k]) +
-                 MUL_F(qmfs->v[0][1024 + 192 + k], qmf_c[512 + 64 + k]);
-#else
-            output[out++] = MUL_F(v0[k], qmf_c[k]) +
-                MUL_F(v0[64 + k], qmf_c[64 + k]) +
-                MUL_F(v0[128 + k], qmf_c[128 + k]) +
-                MUL_F(v0[192 + k], qmf_c[192 + k]) +
-                MUL_F(v0[256 + k], qmf_c[256 + k]) +
-                MUL_F(v0[320 + k], qmf_c[320 + k]) +
-                MUL_F(v0[384 + k], qmf_c[384 + k]) +
-                MUL_F(v0[448 + k], qmf_c[448 + k]) +
-                MUL_F(v0[512 + k], qmf_c[512 + k]) +
-                MUL_F(v0[576 + k], qmf_c[576 + k]);
-#endif
-        }
-    }
-}
-
-void sbr_qmf_synthesis_64_sse(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
-                              real_t *output)
-{
-    ALIGN real_t x[64];
-    ALIGN real_t y[64];
-    ALIGN real_t y2[64];
-    int16_t n, k, out = 0;
-    uint8_t l;
-
-    /* qmf subsample l */
-    for (l = 0; l < sbr->numTimeSlotsRate; l++)
-    {
-        //real_t *v0, *v1;
-
-        /* shift buffers */
-        //memmove(qmfs->v[0] + 64, qmfs->v[0], (640-64)*sizeof(real_t));
-        //memmove(qmfs->v[1] + 64, qmfs->v[1], (640-64)*sizeof(real_t));
-        memmove(qmfs->v[0] + 128, qmfs->v[0], (1280-128)*sizeof(real_t));
-
-        //v0 = qmfs->v[qmfs->v_index];
-        //v1 = qmfs->v[(qmfs->v_index + 1) & 0x1];
-        //qmfs->v_index = (qmfs->v_index + 1) & 0x1;
-
-        /* calculate 128 samples */
-        for (k = 0; k < 64; k++)
-        {
-#ifdef FIXED_POINT
-            x[k] = QMF_RE(X[l][k]);
-#else
-            x[k] = QMF_RE(X[l][k]) / 32.;
-#endif
+            output[out++] = MUL_F(qmfs->v[qmfs->v_index + k], qmf_c[k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 192 + k], qmf_c[64 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 256 + k], qmf_c[128 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 256 + 192 + k], qmf_c[128 + 64 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 512 + k], qmf_c[256 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 512 + 192 + k], qmf_c[256 + 64 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 768 + k], qmf_c[384 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 768 + 192 + k], qmf_c[384 + 64 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 1024 + k], qmf_c[512 + k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 1024 + 192 + k], qmf_c[512 + 64 + k]);
         }
 
-        for (n = 0; n < 32; n++)
-        {
-            y[2*n]   = -x[2*n];
-            y[2*n+1] =  x[2*n+1];
-        }
-
-        DCT2_64_unscaled(x, x);
-
-        for (n = 0; n < 64; n++)
-        {
-            qmfs->v[0][n+32] = x[n];
-        }
-        for (n = 0; n < 32; n++)
-        {
-            qmfs->v[0][31 - n] = x[n + 1];
-        }
-
-        DST2_64_unscaled(x, y);
-        qmfs->v[0][96] = 0;
-        for (n = 1; n < 32; n++)
-        {
-            qmfs->v[0][n + 96] = x[n-1];
-        }
-
-        /* calculate 64 output samples and window */
-        for (k = 0; k < 64; k++)
-        {
-#if 1
-             output[out++] = MUL_F(qmfs->v[0][k], qmf_c[k]) +
-                 MUL_F(qmfs->v[0][192 + k], qmf_c[64 + k]) +
-                 MUL_F(qmfs->v[0][256 + k], qmf_c[128 + k]) +
-                 MUL_F(qmfs->v[0][256 + 192 + k], qmf_c[128 + 64 + k]) +
-                 MUL_F(qmfs->v[0][512 + k], qmf_c[256 + k]) +
-                 MUL_F(qmfs->v[0][512 + 192 + k], qmf_c[256 + 64 + k]) +
-                 MUL_F(qmfs->v[0][768 + k], qmf_c[384 + k]) +
-                 MUL_F(qmfs->v[0][768 + 192 + k], qmf_c[384 + 64 + k]) +
-                 MUL_F(qmfs->v[0][1024 + k], qmf_c[512 + k]) +
-                 MUL_F(qmfs->v[0][1024 + 192 + k], qmf_c[512 + 64 + k]);
-#else
-            output[out++] = MUL_F(v0[k], qmf_c[k]) +
-                MUL_F(v0[64 + k], qmf_c[64 + k]) +
-                MUL_F(v0[128 + k], qmf_c[128 + k]) +
-                MUL_F(v0[192 + k], qmf_c[192 + k]) +
-                MUL_F(v0[256 + k], qmf_c[256 + k]) +
-                MUL_F(v0[320 + k], qmf_c[320 + k]) +
-                MUL_F(v0[384 + k], qmf_c[384 + k]) +
-                MUL_F(v0[448 + k], qmf_c[448 + k]) +
-                MUL_F(v0[512 + k], qmf_c[512 + k]) +
-                MUL_F(v0[576 + k], qmf_c[576 + k]);
-#endif
-        }
+        /* update the ringbuffer index */
+        qmfs->v_index -= 128;
+        if (qmfs->v_index < 0)
+            qmfs->v_index = (1280-128);
     }
 }
 #else
-void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
+void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
                           real_t *output)
 {
-    ALIGN real_t x1[64], x2[64];
+    ALIGN real_t x1[32], x2[32];
+#ifndef FIXED_POINT
     real_t scale = 1.f/64.f;
+#endif
     int16_t n, k, out = 0;
     uint8_t l;
 
@@ -384,79 +401,82 @@
     /* qmf subsample l */
     for (l = 0; l < sbr->numTimeSlotsRate; l++)
     {
-        real_t *v0, *v1;
+        /* shift buffer v */
+        /* buffer is not shifted, we are using a ringbuffer */
+        //memmove(qmfs->v + 64, qmfs->v, (640-64)*sizeof(real_t));
 
-        /* shift buffers */
-        memmove(qmfs->v[0] + 64, qmfs->v[0], (640-64)*sizeof(real_t));
-        memmove(qmfs->v[1] + 64, qmfs->v[1], (640-64)*sizeof(real_t));
-
-        v0 = qmfs->v[qmfs->v_index];
-        v1 = qmfs->v[(qmfs->v_index + 1) & 0x1];
-        qmfs->v_index = (qmfs->v_index + 1) & 0x1;
+        /* calculate 64 samples */
+        /* complex pre-twiddle */
+        for (k = 0; k < 32; k++)
+        {
+            x1[k] = MUL_F(QMF_RE(X[l][k]), RE(qmf32_pre_twiddle[k])) - MUL_F(QMF_IM(X[l][k]), IM(qmf32_pre_twiddle[k]));
+            x2[k] = MUL_F(QMF_IM(X[l][k]), RE(qmf32_pre_twiddle[k])) + MUL_F(QMF_RE(X[l][k]), IM(qmf32_pre_twiddle[k]));
 
-        /* calculate 128 samples */
-        x1[0] = scale*QMF_RE(X[l][0]);
-        x2[63] = scale*QMF_IM(X[l][0]);
-        for (k = 0; k < 31; k++)
-        {
-            x1[2*k+1] = scale*(QMF_RE(X[l][2*k+1]) - QMF_RE(X[l][2*k+2]));
-            x1[2*k+2] = scale*(QMF_RE(X[l][2*k+1]) + QMF_RE(X[l][2*k+2]));
+#ifndef FIXED_POINT
+            x1[k] *= scale;
+            x2[k] *= scale;
+#else
+            x1[k] >>= 1;
+            x2[k] >>= 1;
+#endif
+        }
 
-            x2[61 - 2*k] = scale*(QMF_IM(X[l][2*k+2]) - QMF_IM(X[l][2*k+1]));
-            x2[62 - 2*k] = scale*(QMF_IM(X[l][2*k+2]) + QMF_IM(X[l][2*k+1]));
-        }
-        x1[63] = scale*QMF_RE(X[l][63]);
-        x2[0] = scale*QMF_IM(X[l][63]);
-
-        DCT4_64_kernel(x1, x1);
-        DCT4_64_kernel(x2, x2);
+        /* transform */
+        DCT4_32(x1, x1);
+        DST4_32(x2, x2);
 
         for (n = 0; n < 32; n++)
         {
-            v0[   2*n]   =  x2[2*n]   - x1[2*n];
-            v1[63-2*n]   =  x2[2*n]   + x1[2*n];
-            v0[   2*n+1] = -x2[2*n+1] - x1[2*n+1];
-            v1[62-2*n]   = -x2[2*n+1] + x1[2*n+1];
+            qmfs->v[qmfs->v_index + n]      = qmfs->v[qmfs->v_index + 640 + n]      = -x1[n] + x2[n];
+            qmfs->v[qmfs->v_index + 63 - n] = qmfs->v[qmfs->v_index + 640 + 63 - n] =  x1[n] + x2[n];
         }
 
-        /* calculate 64 output samples and window */
-        for (k = 0; k < 64; k++)
+        /* calculate 32 output samples and window */
+        for (k = 0; k < 32; k++)
         {
-            output[out++] = MUL_F(v0[k], qmf_c[k]) +
-                MUL_F(v0[64 + k], qmf_c[64 + k]) +
-                MUL_F(v0[128 + k], qmf_c[128 + k]) +
-                MUL_F(v0[192 + k], qmf_c[192 + k]) +
-                MUL_F(v0[256 + k], qmf_c[256 + k]) +
-                MUL_F(v0[320 + k], qmf_c[320 + k]) +
-                MUL_F(v0[384 + k], qmf_c[384 + k]) +
-                MUL_F(v0[448 + k], qmf_c[448 + k]) +
-                MUL_F(v0[512 + k], qmf_c[512 + k]) +
-                MUL_F(v0[576 + k], qmf_c[576 + k]);
+            output[out++] = MUL_F(qmfs->v[qmfs->v_index + k], qmf_c[2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 96 + k], qmf_c[64 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 128 + k], qmf_c[128 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 224 + k], qmf_c[192 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 256 + k], qmf_c[256 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 352 + k], qmf_c[320 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 384 + k], qmf_c[384 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 480 + k], qmf_c[448 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 512 + k], qmf_c[512 + 2*k]) +
+                MUL_F(qmfs->v[qmfs->v_index + 608 + k], qmf_c[576 + 2*k]);
         }
+
+        /* update ringbuffer index */
+        qmfs->v_index -= 64;
+        if (qmfs->v_index < 0)
+            qmfs->v_index = (640 - 64);
     }
 }
 
-#ifdef USE_SSE
-void memmove_sse_576(real_t *out, const real_t *in)
+void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
+                          real_t *output)
 {
-    __m128 m[144];
-    uint16_t i;
-
-    for (i = 0; i < 144; i++)
-    {
-        m[i] = _mm_load_ps(&in[i*4]);
-    }
-    for (i = 0; i < 144; i++)
-    {
-        _mm_store_ps(&out[i*4], m[i]);
-    }
-}
-
-void sbr_qmf_synthesis_64_sse(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
-                              real_t *output)
-{
-    ALIGN real_t x1[64], x2[64];
+//    ALIGN real_t x1[64], x2[64];
+#ifndef SBR_LOW_POWER
+    ALIGN real_t in_real1[32], in_imag1[32], out_real1[32], out_imag1[32];
+    ALIGN real_t in_real2[32], in_imag2[32], out_real2[32], out_imag2[32];
+#endif
+    qmf_t * pX;
+    real_t * pring_buffer_1, * pring_buffer_3;
+//    real_t * ptemp_1, * ptemp_2;
+#ifdef PREFER_POINTERS
+    // These pointers are used if target platform has autoinc address generators
+    real_t * pring_buffer_2, * pring_buffer_4;
+    real_t * pring_buffer_5, * pring_buffer_6;
+    real_t * pring_buffer_7, * pring_buffer_8;
+    real_t * pring_buffer_9, * pring_buffer_10;
+    const real_t * pqmf_c_1, * pqmf_c_2, * pqmf_c_3, * pqmf_c_4;
+    const real_t * pqmf_c_5, * pqmf_c_6, * pqmf_c_7, * pqmf_c_8;
+    const real_t * pqmf_c_9, * pqmf_c_10;
+#endif // #ifdef PREFER_POINTERS
+#ifndef FIXED_POINT
     real_t scale = 1.f/64.f;
+#endif
     int16_t n, k, out = 0;
     uint8_t l;
 
@@ -464,99 +484,152 @@
     /* qmf subsample l */
     for (l = 0; l < sbr->numTimeSlotsRate; l++)
     {
-        real_t *v0, *v1;
-
-        /* shift buffers */
-        memmove_sse_576(qmfs->v[0] + 64, qmfs->v[0]);
-        memmove_sse_576(qmfs->v[1] + 64, qmfs->v[1]);
-
-        v0 = qmfs->v[qmfs->v_index];
-        v1 = qmfs->v[(qmfs->v_index + 1) & 0x1];
-        qmfs->v_index = (qmfs->v_index + 1) & 0x1;
+        /* shift buffer v */
+		/* buffer is not shifted, we use double ringbuffer */
+		//memmove(qmfs->v + 128, qmfs->v, (1280-128)*sizeof(real_t));
 
         /* calculate 128 samples */
-        x1[0] = scale*QMF_RE(X[l][0]);
-        x2[63] = scale*QMF_IM(X[l][0]);
-        for (k = 0; k < 31; k++)
+#ifndef FIXED_POINT
+
+        pX = X[l];
+
+        in_imag1[31] = scale*QMF_RE(pX[1]);
+        in_real1[0]  = scale*QMF_RE(pX[0]);
+        in_imag2[31] = scale*QMF_IM(pX[63-1]);
+        in_real2[0]  = scale*QMF_IM(pX[63-0]);
+        for (k = 1; k < 31; k++)
         {
-            x1[2*k+1] = scale*(QMF_RE(X[l][2*k+1]) - QMF_RE(X[l][2*k+2]));
-            x1[2*k+2] = scale*(QMF_RE(X[l][2*k+1]) + QMF_RE(X[l][2*k+2]));
+            in_imag1[31 - k] = scale*QMF_RE(pX[2*k + 1]);
+            in_real1[     k] = scale*QMF_RE(pX[2*k    ]);
+            in_imag2[31 - k] = scale*QMF_IM(pX[63 - (2*k + 1)]);
+            in_real2[     k] = scale*QMF_IM(pX[63 - (2*k    )]);
+        }
+        in_imag1[0]  = scale*QMF_RE(pX[63]);
+        in_real1[31] = scale*QMF_RE(pX[62]);
+        in_imag2[0]  = scale*QMF_IM(pX[63-63]);
+        in_real2[31] = scale*QMF_IM(pX[63-62]);
+
+#else
+
+        pX = X[l];
 
-            x2[61 - 2*k] = scale*(QMF_IM(X[l][2*k+2]) - QMF_IM(X[l][2*k+1]));
-            x2[62 - 2*k] = scale*(QMF_IM(X[l][2*k+2]) + QMF_IM(X[l][2*k+1]));
+        in_imag1[31] = QMF_RE(pX[1]) >> 1;
+        in_real1[0]  = QMF_RE(pX[0]) >> 1;
+        in_imag2[31] = QMF_IM(pX[62]) >> 1;
+        in_real2[0]  = QMF_IM(pX[63]) >> 1;
+        for (k = 1; k < 31; k++)
+        {
+            in_imag1[31 - k] = QMF_RE(pX[2*k + 1]) >> 1;
+            in_real1[     k] = QMF_RE(pX[2*k    ]) >> 1;
+            in_imag2[31 - k] = QMF_IM(pX[63 - (2*k + 1)]) >> 1;
+            in_real2[     k] = QMF_IM(pX[63 - (2*k    )]) >> 1;
         }
-        x1[63] = scale*QMF_RE(X[l][63]);
-        x2[0] = scale*QMF_IM(X[l][63]);
+        in_imag1[0]  = QMF_RE(pX[63]) >> 1;
+        in_real1[31] = QMF_RE(pX[62]) >> 1;
+        in_imag2[0]  = QMF_IM(pX[0]) >> 1;
+        in_real2[31] = QMF_IM(pX[1]) >> 1;
+
+#endif
+
+
+        // dct4_kernel is DCT_IV without reordering which is done before and after FFT
+        dct4_kernel(in_real1, in_imag1, out_real1, out_imag1);
+        dct4_kernel(in_real2, in_imag2, out_real2, out_imag2);
+
 
-        DCT4_64_kernel(x1, x1);
-        DCT4_64_kernel(x2, x2);
+        pring_buffer_1 = qmfs->v + qmfs->v_index;
+        pring_buffer_3 = pring_buffer_1 + 1280;
+#ifdef PREFER_POINTERS
+        pring_buffer_2 = pring_buffer_1 + 127;
+        pring_buffer_4 = pring_buffer_1 + (1280 + 127);
+#endif // #ifdef PREFER_POINTERS
+//        ptemp_1 = x1;
+//        ptemp_2 = x2;
+#ifdef PREFER_POINTERS
+        for (n = 0; n < 32; n ++)
+        {
+            //real_t x1 = *ptemp_1++;
+            //real_t x2 = *ptemp_2++;
+            // pring_buffer_3 and pring_buffer_4 are needed only for double ring buffer
+            *pring_buffer_1++ = *pring_buffer_3++ = out_real2[n] - out_real1[n];
+            *pring_buffer_2-- = *pring_buffer_4-- = out_real2[n] + out_real1[n];
+            //x1 = *ptemp_1++;
+            //x2 = *ptemp_2++;
+            *pring_buffer_1++ = *pring_buffer_3++ = out_imag2[31-n] + out_imag1[31-n];
+            *pring_buffer_2-- = *pring_buffer_4-- = out_imag2[31-n] - out_imag1[31-n];
+        }
+#else // #ifdef PREFER_POINTERS
 
         for (n = 0; n < 32; n++)
         {
-            v0[    2*n   ] =  x2[2*n]   - x1[2*n];
-            v1[63- 2*n   ] =  x2[2*n]   + x1[2*n];
-            v0[    2*n+1 ] = -x2[2*n+1] - x1[2*n+1];
-            v1[63-(2*n+1)] = -x2[2*n+1] + x1[2*n+1];
+            // pring_buffer_3 and pring_buffer_4 are needed only for double ring buffer
+            pring_buffer_1[2*n]         = pring_buffer_3[2*n]         = out_real2[n] - out_real1[n];
+            pring_buffer_1[127-2*n]     = pring_buffer_3[127-2*n]     = out_real2[n] + out_real1[n];
+            pring_buffer_1[2*n+1]       = pring_buffer_3[2*n+1]       = out_imag2[31-n] + out_imag1[31-n];
+            pring_buffer_1[127-(2*n+1)] = pring_buffer_3[127-(2*n+1)] = out_imag2[31-n] - out_imag1[31-n];
         }
 
+#endif // #ifdef PREFER_POINTERS
+
+        pring_buffer_1 = qmfs->v + qmfs->v_index;
+#ifdef PREFER_POINTERS
+        pring_buffer_2 = pring_buffer_1 + 192;
+        pring_buffer_3 = pring_buffer_1 + 256;
+        pring_buffer_4 = pring_buffer_1 + (256 + 192);
+        pring_buffer_5 = pring_buffer_1 + 512;
+        pring_buffer_6 = pring_buffer_1 + (512 + 192);
+        pring_buffer_7 = pring_buffer_1 + 768;
+        pring_buffer_8 = pring_buffer_1 + (768 + 192);
+        pring_buffer_9 = pring_buffer_1 + 1024;
+        pring_buffer_10 = pring_buffer_1 + (1024 + 192);
+        pqmf_c_1 = qmf_c;
+        pqmf_c_2 = qmf_c + 64;
+        pqmf_c_3 = qmf_c + 128;
+        pqmf_c_4 = qmf_c + 192;
+        pqmf_c_5 = qmf_c + 256;
+        pqmf_c_6 = qmf_c + 320;
+        pqmf_c_7 = qmf_c + 384;
+        pqmf_c_8 = qmf_c + 448;
+        pqmf_c_9 = qmf_c + 512;
+        pqmf_c_10 = qmf_c + 576;
+#endif // #ifdef PREFER_POINTERS
+
         /* calculate 64 output samples and window */
-        for (k = 0; k < 64; k+=4)
+        for (k = 0; k < 64; k++)
         {
-            __m128 m0, m1, m2, m3, m4, m5, m6, m7, m8, m9;
-            __m128 c0, c1, c2, c3, c4, c5, c6, c7, c8, c9;
-            __m128 s1, s2, s3, s4, s5, s6, s7, s8, s9;
-
-            m0 = _mm_load_ps(&v0[k]);
-            m1 = _mm_load_ps(&v0[k + 64]);
-            m2 = _mm_load_ps(&v0[k + 128]);
-            m3 = _mm_load_ps(&v0[k + 192]);
-            m4 = _mm_load_ps(&v0[k + 256]);
-            c0 = _mm_load_ps(&qmf_c[k]);
-            c1 = _mm_load_ps(&qmf_c[k + 64]);
-            c2 = _mm_load_ps(&qmf_c[k + 128]);
-            c3 = _mm_load_ps(&qmf_c[k + 192]);
-            c4 = _mm_load_ps(&qmf_c[k + 256]);
-
-            m0 = _mm_mul_ps(m0, c0);
-            m1 = _mm_mul_ps(m1, c1);
-            m2 = _mm_mul_ps(m2, c2);
-            m3 = _mm_mul_ps(m3, c3);
-            m4 = _mm_mul_ps(m4, c4);
-
-            s1 = _mm_add_ps(m0, m1);
-            s2 = _mm_add_ps(m2, m3);
-            s6 = _mm_add_ps(s1, s2);
+#ifdef PREFER_POINTERS
+            output[out++] =
+                MUL_F(*pring_buffer_1++,  *pqmf_c_1++) +
+                MUL_F(*pring_buffer_2++,  *pqmf_c_2++) +
+                MUL_F(*pring_buffer_3++,  *pqmf_c_3++) +
+                MUL_F(*pring_buffer_4++,  *pqmf_c_4++) +
+                MUL_F(*pring_buffer_5++,  *pqmf_c_5++) +
+                MUL_F(*pring_buffer_6++,  *pqmf_c_6++) +
+                MUL_F(*pring_buffer_7++,  *pqmf_c_7++) +
+                MUL_F(*pring_buffer_8++,  *pqmf_c_8++) +
+                MUL_F(*pring_buffer_9++,  *pqmf_c_9++) +
+                MUL_F(*pring_buffer_10++, *pqmf_c_10++);
+#else // #ifdef PREFER_POINTERS
+            output[out++] =
+                MUL_F(pring_buffer_1[k+0],          qmf_c[k+0])   +
+                MUL_F(pring_buffer_1[k+192],        qmf_c[k+64])  +
+                MUL_F(pring_buffer_1[k+256],        qmf_c[k+128]) +
+                MUL_F(pring_buffer_1[k+(256+192)],  qmf_c[k+192]) +
+                MUL_F(pring_buffer_1[k+512],        qmf_c[k+256]) +
+                MUL_F(pring_buffer_1[k+(512+192)],  qmf_c[k+320]) +
+                MUL_F(pring_buffer_1[k+768],        qmf_c[k+384]) +
+                MUL_F(pring_buffer_1[k+(768+192)],  qmf_c[k+448]) +
+                MUL_F(pring_buffer_1[k+1024],       qmf_c[k+512]) +
+                MUL_F(pring_buffer_1[k+(1024+192)], qmf_c[k+576]);
+#endif // #ifdef PREFER_POINTERS
+        }
 
-            m5 = _mm_load_ps(&v0[k + 320]);
-            m6 = _mm_load_ps(&v0[k + 384]);
-            m7 = _mm_load_ps(&v0[k + 448]);
-            m8 = _mm_load_ps(&v0[k + 512]);
-            m9 = _mm_load_ps(&v0[k + 576]);
-            c5 = _mm_load_ps(&qmf_c[k + 320]);
-            c6 = _mm_load_ps(&qmf_c[k + 384]);
-            c7 = _mm_load_ps(&qmf_c[k + 448]);
-            c8 = _mm_load_ps(&qmf_c[k + 512]);
-            c9 = _mm_load_ps(&qmf_c[k + 576]);
-
-            m5 = _mm_mul_ps(m5, c5);
-            m6 = _mm_mul_ps(m6, c6);
-            m7 = _mm_mul_ps(m7, c7);
-            m8 = _mm_mul_ps(m8, c8);
-            m9 = _mm_mul_ps(m9, c9);
-
-            s3 = _mm_add_ps(m4, m5);
-            s4 = _mm_add_ps(m6, m7);
-            s5 = _mm_add_ps(m8, m9);
-            s7 = _mm_add_ps(s3, s4);
-            s8 = _mm_add_ps(s5, s6);
-            s9 = _mm_add_ps(s7, s8);
-
-            _mm_store_ps(&output[out], s9);
-            out += 4;
-        }
+        /* update ringbuffer index */
+        qmfs->v_index -= 128;
+        if (qmfs->v_index < 0)
+            qmfs->v_index = (1280 - 128);
     }
 }
 #endif
-#endif
 
 #endif
--- a/libfaad2/sbr_qmf.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_qmf.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_qmf.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_qmf.h,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -40,7 +40,9 @@
 void qmfs_end(qmfs_info *qmfs);
 
 void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input,
-                         qmf_t X[MAX_NTSRHFG][32], uint8_t offset, uint8_t kx);
+                         qmf_t X[MAX_NTSRHFG][64], uint8_t offset, uint8_t kx);
+void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
+                          real_t *output);
 void sbr_qmf_synthesis_64(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSRHFG][64],
                           real_t *output);
 #ifdef USE_SSE
@@ -53,4 +55,3 @@
 }
 #endif
 #endif
-
--- a/libfaad2/sbr_qmf_c.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_qmf_c.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Alex Beregszaszi on 2003/10/03
-** $Id: sbr_qmf_c.h,v 1.2 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_qmf_c.h,v 1.3 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -201,7 +201,7 @@
     FRAC_CONST(0.84803157770763), FRAC_CONST(0.84978051984268),
     FRAC_CONST(0.85119715249343), FRAC_CONST(0.85230470352147),
     FRAC_CONST(0.85310209497017), FRAC_CONST(0.85357205739107),
-    FRAC_CONST(0.85373856005937), FRAC_CONST(0.85357205739107),
+    FRAC_CONST(0.85373856005937 /*max*/), FRAC_CONST(0.85357205739107),
     FRAC_CONST(0.85310209497017), FRAC_CONST(0.85230470352147),
     FRAC_CONST(0.85119715249343), FRAC_CONST(0.84978051984268),
     FRAC_CONST(0.84803157770763), FRAC_CONST(0.84598184698206),
--- a/libfaad2/sbr_syntax.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_syntax.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_syntax.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_syntax.c,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -49,6 +49,9 @@
 
 /* static function declarations */
 static void sbr_header(bitfile *ld, sbr_info *sbr);
+static uint8_t calc_sbr_tables(sbr_info *sbr, uint8_t start_freq, uint8_t stop_freq,
+                               uint8_t samplerate_mode, uint8_t freq_scale,
+                               uint8_t alter_scale, uint8_t xover_band);
 static uint8_t sbr_data(bitfile *ld, sbr_info *sbr);
 static uint16_t sbr_extension(bitfile *ld, sbr_info *sbr,
                               uint8_t bs_extension_id, uint16_t num_bits_left);
@@ -100,11 +103,43 @@
     sbr->bs_alter_scale_prev = sbr->bs_alter_scale;
     sbr->bs_xover_band_prev = sbr->bs_xover_band;
     sbr->bs_noise_bands_prev = sbr->bs_noise_bands;
+}
 
-    if (sbr->frame == 0)
+static uint8_t calc_sbr_tables(sbr_info *sbr, uint8_t start_freq, uint8_t stop_freq,
+                               uint8_t samplerate_mode, uint8_t freq_scale,
+                               uint8_t alter_scale, uint8_t xover_band)
+{
+    uint8_t result = 0;
+    uint8_t k2;
+
+    /* calculate the Master Frequency Table */
+    sbr->k0 = qmf_start_channel(start_freq, samplerate_mode, sbr->sample_rate);
+    k2 = qmf_stop_channel(stop_freq, sbr->sample_rate, sbr->k0);
+
+    /* check k0 and k2 */
+    if (sbr->sample_rate >= 48000)
     {
-        sbr->Reset = 1;
+        if ((k2 - sbr->k0) > 32)
+            result += 1;
+    } else if (sbr->sample_rate <= 32000) {
+        if ((k2 - sbr->k0) > 48)
+            result += 1;
+    } else { /* (sbr->sample_rate == 44100) */
+        if ((k2 - sbr->k0) > 45)
+            result += 1;
     }
+
+    if (freq_scale == 0)
+    {
+        result += master_frequency_table_fs0(sbr, sbr->k0, k2, alter_scale);
+    } else {
+        result += master_frequency_table(sbr, sbr->k0, k2, freq_scale, alter_scale);
+    }
+    result += derived_frequency_table(sbr, xover_band, k2);
+
+    result = (result > 0) ? 1 : 0;
+
+    return result;
 }
 
 /* table 2 */
@@ -114,6 +149,10 @@
     uint16_t num_align_bits = 0;
     uint16_t num_sbr_bits = (uint16_t)faad_get_processed_bits(ld);
 
+    uint8_t saved_start_freq, saved_samplerate_mode;
+    uint8_t saved_stop_freq, saved_freq_scale;
+    uint8_t saved_alter_scale, saved_xover_band;
+
 #ifdef DRM
     if (!sbr->Is_DRM_SBR)
 #endif
@@ -128,6 +167,14 @@
         }
     }
 
+    /* save old header values, in case the new ones are corrupted */
+    saved_start_freq = sbr->bs_start_freq;
+    saved_samplerate_mode = sbr->bs_samplerate_mode;
+    saved_stop_freq = sbr->bs_stop_freq;
+    saved_freq_scale = sbr->bs_freq_scale;
+    saved_alter_scale = sbr->bs_alter_scale;
+    saved_xover_band = sbr->bs_xover_band;
+
     sbr->bs_header_flag = faad_get1bit(ld
         DEBUGVAR(1,200,"sbr_bitstream(): bs_header_flag"));
 
@@ -143,41 +190,40 @@
     {
         if (sbr->Reset || (sbr->bs_header_flag && sbr->just_seeked))
         {
-            uint8_t k2;
+            uint8_t rt = calc_sbr_tables(sbr, sbr->bs_start_freq, sbr->bs_stop_freq,
+                sbr->bs_samplerate_mode, sbr->bs_freq_scale,
+                sbr->bs_alter_scale, sbr->bs_xover_band);
 
-            /* calculate the Master Frequency Table */
-            sbr->k0 = qmf_start_channel(sbr->bs_start_freq, sbr->bs_samplerate_mode,
-                sbr->sample_rate);
-            k2 = qmf_stop_channel(sbr->bs_stop_freq, sbr->sample_rate, sbr->k0);
-
-            /* check k0 and k2 */
-            if (sbr->sample_rate >= 48000)
+            /* if an error occured with the new header values revert to the old ones */
+            if (rt > 0)
             {
-                if ((k2 - sbr->k0) > 32)
-                    result += 1;
-            } else if (sbr->sample_rate <= 32000) {
-                if ((k2 - sbr->k0) > 48)
-                    result += 1;
-            } else { /* (sbr->sample_rate == 44100) */
-                if ((k2 - sbr->k0) > 45)
-                    result += 1;
+                calc_sbr_tables(sbr, saved_start_freq, saved_stop_freq,
+                    saved_samplerate_mode, saved_freq_scale,
+                    saved_alter_scale, saved_xover_band);
             }
-
-            if (sbr->bs_freq_scale == 0)
-            {
-                result += master_frequency_table_fs0(sbr, sbr->k0, k2,
-                    sbr->bs_alter_scale);
-            } else {
-                result += master_frequency_table(sbr, sbr->k0, k2, sbr->bs_freq_scale,
-                    sbr->bs_alter_scale);
-            }
-            result += derived_frequency_table(sbr, sbr->bs_xover_band, k2);
-
-            result = (result > 0) ? 1 : 0;
         }
 
         if (result == 0)
+        {
             result = sbr_data(ld, sbr);
+
+            /* sbr_data() returning an error means that there was an error in
+               envelope_time_border_vector().
+               In this case the old time border vector is saved and all the previous
+               data normally read after sbr_grid() is saved.
+            */
+            /* to be on the safe side, calculate old sbr tables in case of error */
+            if ((result > 0) &&
+                (sbr->Reset || (sbr->bs_header_flag && sbr->just_seeked)))
+            {
+                calc_sbr_tables(sbr, saved_start_freq, saved_stop_freq,
+                    saved_samplerate_mode, saved_freq_scale,
+                    saved_alter_scale, saved_xover_band);
+            }
+
+            /* we should be able to safely set result to 0 now */
+            result = 0;
+        }
     } else {
         result = 1;
     }
@@ -187,6 +233,11 @@
 #endif
     {
         num_sbr_bits = (uint16_t)faad_get_processed_bits(ld) - num_sbr_bits;
+
+        /* check if we read more bits then were available for sbr */
+        if (8*cnt < num_sbr_bits)
+            return 1;
+
         /* -4 does not apply, bs_extension_type is re-read in this function */
         num_align_bits = 8*cnt /*- 4*/ - num_sbr_bits;
 
@@ -335,7 +386,9 @@
     sbr_envelope(ld, sbr, 0);
     sbr_noise(ld, sbr, 0);
 
+#ifndef FIXED_POINT
     envelope_noise_dequantisation(sbr, 0);
+#endif
 
     memset(sbr->bs_add_harmonic[0], 0, 64*sizeof(uint8_t));
 
@@ -346,6 +399,7 @@
 
     sbr->bs_extended_data = faad_get1bit(ld
         DEBUGVAR(1,224,"sbr_single_channel_element(): bs_extended_data[0]"));
+
     if (sbr->bs_extended_data)
     {
         uint16_t nr_bits_left;
@@ -360,10 +414,18 @@
         nr_bits_left = 8 * cnt;
         while (nr_bits_left > 7)
         {
+            uint16_t tmp_nr_bits = 0;
+
             sbr->bs_extension_id = (uint8_t)faad_getbits(ld, 2
                 DEBUGVAR(1,227,"sbr_single_channel_element(): bs_extension_id"));
-            nr_bits_left -= 2;
-            nr_bits_left -= sbr_extension(ld, sbr, sbr->bs_extension_id, nr_bits_left);
+            tmp_nr_bits += 2;
+            tmp_nr_bits += sbr_extension(ld, sbr, sbr->bs_extension_id, nr_bits_left);
+
+            /* check if the data read is bigger than the number of available bits */
+            if (tmp_nr_bits > nr_bits_left)
+                return 1;
+
+            nr_bits_left -= tmp_nr_bits;
         }
 
         /* Corrigendum */
@@ -439,10 +501,31 @@
         if (sbr->bs_add_harmonic_flag[1])
             sinusoidal_coding(ld, sbr, 1);
     } else {
+        uint8_t saved_t_E[6] = {0}, saved_t_Q[3] = {0};
+        uint8_t saved_L_E = sbr->L_E[0];
+        uint8_t saved_L_Q = sbr->L_Q[0];
+        uint8_t saved_frame_class = sbr->bs_frame_class[0];
+
+        for (n = 0; n < saved_L_E; n++)
+            saved_t_E[n] = sbr->t_E[0][n];
+        for (n = 0; n < saved_L_Q; n++)
+            saved_t_Q[n] = sbr->t_Q[0][n];
+
         if ((result = sbr_grid(ld, sbr, 0)) > 0)
             return result;
         if ((result = sbr_grid(ld, sbr, 1)) > 0)
+        {
+            /* restore first channel data as well */
+            sbr->bs_frame_class[0] = saved_frame_class;
+            sbr->L_E[0] = saved_L_E;
+            sbr->L_Q[0] = saved_L_Q;
+            for (n = 0; n < 6; n++)
+                sbr->t_E[0][n] = saved_t_E[n];
+            for (n = 0; n < 3; n++)
+                sbr->t_Q[0][n] = saved_t_Q[n];
+
             return result;
+        }
         sbr_dtdf(ld, sbr, 0);
         sbr_dtdf(ld, sbr, 1);
         invf_mode(ld, sbr, 0);
@@ -465,11 +548,13 @@
         if (sbr->bs_add_harmonic_flag[1])
             sinusoidal_coding(ld, sbr, 1);
     }
+#ifndef FIXED_POINT
     envelope_noise_dequantisation(sbr, 0);
     envelope_noise_dequantisation(sbr, 1);
 
     if (sbr->bs_coupling)
         unmap_envelope_noise(sbr);
+#endif
 
     sbr->bs_extended_data = faad_get1bit(ld
         DEBUGVAR(1,233,"sbr_channel_pair_element(): bs_extended_data[0]"));
@@ -487,10 +572,18 @@
         nr_bits_left = 8 * cnt;
         while (nr_bits_left > 7)
         {
+            uint16_t tmp_nr_bits = 0;
+
             sbr->bs_extension_id = (uint8_t)faad_getbits(ld, 2
                 DEBUGVAR(1,236,"sbr_channel_pair_element(): bs_extension_id"));
-            nr_bits_left -= 2;
-            sbr_extension(ld, sbr, sbr->bs_extension_id, nr_bits_left);
+            tmp_nr_bits += 2;
+            tmp_nr_bits += sbr_extension(ld, sbr, sbr->bs_extension_id, nr_bits_left);
+
+            /* check if the data read is bigger than the number of available bits */
+            if (tmp_nr_bits > nr_bits_left)
+                return 1;
+
+            nr_bits_left -= tmp_nr_bits;
         }
 
         /* Corrigendum */
@@ -521,6 +614,9 @@
     uint8_t i, env, rel, result;
     uint8_t bs_abs_bord, bs_abs_bord_1;
     uint8_t bs_num_env = 0;
+    uint8_t saved_L_E = sbr->L_E[ch];
+    uint8_t saved_L_Q = sbr->L_Q[ch];
+    uint8_t saved_frame_class = sbr->bs_frame_class[ch];
 
     sbr->bs_frame_class[ch] = (uint8_t)faad_getbits(ld, 2
         DEBUGVAR(1,248,"sbr_grid(): bs_frame_class"));
@@ -652,9 +748,21 @@
 
     /* TODO: this code can probably be integrated into the code above! */
     if ((result = envelope_time_border_vector(sbr, ch)) > 0)
+    {
+        sbr->bs_frame_class[ch] = saved_frame_class;
+        sbr->L_E[ch] = saved_L_E;
+        sbr->L_Q[ch] = saved_L_Q;
         return result;
+    }
     noise_floor_time_border_vector(sbr, ch);
 
+#if 0
+    for (env = 0; env < bs_num_env; env++)
+    {
+        printf("freq_res[ch:%d][env:%d]: %d\n", ch, env, sbr->f[ch][env]);
+    }
+#endif
+
     return 0;
 }
 
@@ -696,12 +804,20 @@
 #ifdef PS_DEC
     case EXTENSION_ID_PS:
         sbr->ps_used = 1;
-        return ps_data(&(sbr->ps), ld);
+        if (!sbr->ps)
+        {
+            sbr->ps = ps_init(get_sr_index(sbr->sample_rate));
+        }
+        return ps_data(sbr->ps, ld);
 #endif
 #ifdef DRM_PS
     case DRM_PARAMETRIC_STEREO:
         sbr->ps_used = 1;
-        return drm_ps_data(&(sbr->drm_ps), ld);
+        if (!sbr->drm_ps)
+        {
+            sbr->drm_ps = drm_ps_init();
+        }
+        return drm_ps_data(sbr->drm_ps, ld);
 #endif
     default:
         sbr->bs_extension_data = (uint8_t)faad_getbits(ld, 6
--- a/libfaad2/sbr_tf_grid.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/sbr_tf_grid.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: sbr_tf_grid.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: sbr_tf_grid.c,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -48,17 +48,15 @@
 static uint8_t middleBorder(sbr_info *sbr, uint8_t ch);
 
 
+/* function constructs new time border vector */
+/* first build into temp vector to be able to use previous vector on error */
 uint8_t envelope_time_border_vector(sbr_info *sbr, uint8_t ch)
 {
     uint8_t l, border, temp;
+    uint8_t t_E_temp[6] = {0};
 
-    for (l = 0; l <= sbr->L_E[ch]; l++)
-    {
-        sbr->t_E[ch][l] = 0;
-    }
-
-    sbr->t_E[ch][0] = sbr->rate * sbr->abs_bord_lead[ch];
-    sbr->t_E[ch][sbr->L_E[ch]] = sbr->rate * sbr->abs_bord_trail[ch];
+    t_E_temp[0] = sbr->rate * sbr->abs_bord_lead[ch];
+    t_E_temp[sbr->L_E[ch]] = sbr->rate * sbr->abs_bord_trail[ch];
 
     switch (sbr->bs_frame_class[ch])
     {
@@ -67,12 +65,12 @@
         {
         case 4:
             temp = (int) (sbr->numTimeSlots / 4);
-            sbr->t_E[ch][3] = sbr->rate * 3 * temp;
-            sbr->t_E[ch][2] = sbr->rate * 2 * temp;
-            sbr->t_E[ch][1] = sbr->rate * temp;
+            t_E_temp[3] = sbr->rate * 3 * temp;
+            t_E_temp[2] = sbr->rate * 2 * temp;
+            t_E_temp[1] = sbr->rate * temp;
             break;
         case 2:
-            sbr->t_E[ch][1] = sbr->rate * (int) (sbr->numTimeSlots / 2);
+            t_E_temp[1] = sbr->rate * (int) (sbr->numTimeSlots / 2);
             break;
         default:
             break;
@@ -91,7 +89,7 @@
                     return 1;
 
                 border -= sbr->bs_rel_bord[ch][l];
-                sbr->t_E[ch][--i] = sbr->rate * border;
+                t_E_temp[--i] = sbr->rate * border;
             }
         }
         break;
@@ -109,7 +107,7 @@
                 if (sbr->rate * border + sbr->tHFAdj > sbr->numTimeSlotsRate+sbr->tHFGen)
                     return 1;
 
-                sbr->t_E[ch][i++] = sbr->rate * border;
+                t_E_temp[i++] = sbr->rate * border;
             }
         }
         break;
@@ -127,7 +125,7 @@
                 if (sbr->rate * border + sbr->tHFAdj > sbr->numTimeSlotsRate+sbr->tHFGen)
                     return 1;
 
-                sbr->t_E[ch][i++] = sbr->rate * border;
+                t_E_temp[i++] = sbr->rate * border;
             }
         }
 
@@ -142,12 +140,18 @@
                     return 1;
 
                 border -= sbr->bs_rel_bord_1[ch][l];
-                sbr->t_E[ch][--i] = sbr->rate * border;
+                t_E_temp[--i] = sbr->rate * border;
             }
         }
         break;
     }
 
+    /* no error occured, we can safely use this t_E vector */
+    for (l = 0; l < 6; l++)
+    {
+        sbr->t_E[ch][l] = t_E_temp[l];
+    }
+
     return 0;
 }
 
--- a/libfaad2/specrec.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/specrec.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: specrec.c,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: specrec.c,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include "specrec.h"
+#include "filtbank.h"
 #include "syntax.h"
 #include "iq_table.h"
 #include "ms.h"
@@ -56,8 +57,9 @@
 
 
 /* static function declarations */
-static void quant_to_spec(ic_stream *ics, real_t *spec_data, uint16_t frame_len);
-static uint8_t inverse_quantization(real_t *x_invquant, const int16_t *x_quant, const uint16_t frame_len);
+static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
+                             ic_stream *ics, int16_t *quant_data,
+                             real_t *spec_data, uint16_t frame_len);
 
 
 #ifdef LD_DEC
@@ -297,7 +299,7 @@
     in section named section. This offset depends on window_sequence and
     scale_factor_grouping and is needed to decode the spectral_data().
 */
-uint8_t window_grouping_info(faacDecHandle hDecoder, ic_stream *ics)
+uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics)
 {
     uint8_t i, g;
 
@@ -409,75 +411,24 @@
     }
 }
 
-/*
-  For ONLY_LONG_SEQUENCE windows (num_window_groups = 1,
-  window_group_length[0] = 1) the spectral data is in ascending spectral
-  order.
-  For the EIGHT_SHORT_SEQUENCE window, the spectral order depends on the
-  grouping in the following manner:
-  - Groups are ordered sequentially
-  - Within a group, a scalefactor band consists of the spectral data of all
-    grouped SHORT_WINDOWs for the associated scalefactor window band. To
-    clarify via example, the length of a group is in the range of one to eight
-    SHORT_WINDOWs.
-  - If there are eight groups each with length one (num_window_groups = 8,
-    window_group_length[0..7] = 1), the result is a sequence of eight spectra,
-    each in ascending spectral order.
-  - If there is only one group with length eight (num_window_groups = 1,
-    window_group_length[0] = 8), the result is that spectral data of all eight
-    SHORT_WINDOWs is interleaved by scalefactor window bands.
-  - Within a scalefactor window band, the coefficients are in ascending
-    spectral order.
-*/
-static void quant_to_spec(ic_stream *ics, real_t *spec_data, uint16_t frame_len)
-{
-    uint8_t g, sfb, win;
-    uint16_t width, bin, k, gindex;
-
-    ALIGN real_t tmp_spec[1024] = {0};
-
-    k = 0;
-    gindex = 0;
-
-    for (g = 0; g < ics->num_window_groups; g++)
-    {
-        uint16_t j = 0;
-        uint16_t gincrease = 0;
-        uint16_t win_inc = ics->swb_offset[ics->num_swb];
-
-        for (sfb = 0; sfb < ics->num_swb; sfb++)
-        {
-            width = ics->swb_offset[sfb+1] - ics->swb_offset[sfb];
-
-            for (win = 0; win < ics->window_group_length[g]; win++)
-            {
-                for (bin = 0; bin < width; bin += 4)
-                {
-                    tmp_spec[gindex+(win*win_inc)+j+bin+0] = spec_data[k+0];
-                    tmp_spec[gindex+(win*win_inc)+j+bin+1] = spec_data[k+1];
-                    tmp_spec[gindex+(win*win_inc)+j+bin+2] = spec_data[k+2];
-                    tmp_spec[gindex+(win*win_inc)+j+bin+3] = spec_data[k+3];
-                    gincrease += 4;
-                    k += 4;
-                }
-            }
-            j += width;
-        }
-        gindex += gincrease;
-    }
-
-    memcpy(spec_data, tmp_spec, frame_len*sizeof(real_t));
-}
-
+/* iquant() *
+/* output = sign(input)*abs(input)^(4/3) */
+/**/
 static INLINE real_t iquant(int16_t q, const real_t *tab, uint8_t *error)
 {
 #ifdef FIXED_POINT
+/* For FIXED_POINT the iq_table is prescaled by 3 bits (iq_table[]/8) */
+/* BIG_IQ_TABLE allows you to use the full 8192 value table, if this is not
+ * defined a 1026 value table and interpolation will be used
+ */
+#ifndef BIG_IQ_TABLE
     static const real_t errcorr[] = {
         REAL_CONST(0), REAL_CONST(1.0/8.0), REAL_CONST(2.0/8.0), REAL_CONST(3.0/8.0),
         REAL_CONST(4.0/8.0),  REAL_CONST(5.0/8.0), REAL_CONST(6.0/8.0), REAL_CONST(7.0/8.0),
         REAL_CONST(0)
     };
     real_t x1, x2;
+#endif
     int16_t sgn = 1;
 
     if (q < 0)
@@ -487,13 +438,32 @@
     }
 
     if (q < IQ_TABLE_SIZE)
+    {
+//#define IQUANT_PRINT
+#ifdef IQUANT_PRINT
+        //printf("0x%.8X\n", sgn * tab[q]);
+        printf("%d\n", sgn * tab[q]);
+#endif
         return sgn * tab[q];
+    }
+
+#ifndef BIG_IQ_TABLE
+    if (q >= 8192)
+    {
+        *error = 17;
+        return 0;
+    }
 
     /* linear interpolation */
     x1 = tab[q>>3];
     x2 = tab[(q>>3) + 1];
     return sgn * 16 * (MUL_R(errcorr[q&7],(x2-x1)) + x1);
 #else
+    *error = 17;
+    return 0;
+#endif
+
+#else
     if (q < 0)
     {
         /* tab contains a value for all possible q [0,8192] */
@@ -513,23 +483,6 @@
 #endif
 }
 
-static uint8_t inverse_quantization(real_t *x_invquant, const int16_t *x_quant, const uint16_t frame_len)
-{
-    int16_t i;
-    uint8_t error = 0; /* Init error flag */
-    const real_t *tab = iq_table;
-
-    for (i = 0; i < frame_len; i+=4)
-    {
-        x_invquant[i] = iquant(x_quant[i], tab, &error);
-        x_invquant[i+1] = iquant(x_quant[i+1], tab, &error);
-        x_invquant[i+2] = iquant(x_quant[i+2], tab, &error);
-        x_invquant[i+3] = iquant(x_quant[i+3], tab, &error);
-    }
-
-    return error;
-}
-
 #ifndef FIXED_POINT
 ALIGN static const real_t pow2sf_tab[] = {
     2.9802322387695313E-008, 5.9604644775390625E-008, 1.1920928955078125E-007,
@@ -556,39 +509,61 @@
 };
 #endif
 
-ALIGN static real_t pow2_table[] =
+/* quant_to_spec: perform dequantisation and scaling
+ * and in case of short block it also does the deinterleaving
+ */
+/*
+  For ONLY_LONG_SEQUENCE windows (num_window_groups = 1,
+  window_group_length[0] = 1) the spectral data is in ascending spectral
+  order.
+  For the EIGHT_SHORT_SEQUENCE window, the spectral order depends on the
+  grouping in the following manner:
+  - Groups are ordered sequentially
+  - Within a group, a scalefactor band consists of the spectral data of all
+    grouped SHORT_WINDOWs for the associated scalefactor window band. To
+    clarify via example, the length of a group is in the range of one to eight
+    SHORT_WINDOWs.
+  - If there are eight groups each with length one (num_window_groups = 8,
+    window_group_length[0..7] = 1), the result is a sequence of eight spectra,
+    each in ascending spectral order.
+  - If there is only one group with length eight (num_window_groups = 1,
+    window_group_length[0] = 8), the result is that spectral data of all eight
+    SHORT_WINDOWs is interleaved by scalefactor window bands.
+  - Within a scalefactor window band, the coefficients are in ascending
+    spectral order.
+*/
+static uint8_t quant_to_spec(NeAACDecHandle hDecoder,
+                             ic_stream *ics, int16_t *quant_data,
+                             real_t *spec_data, uint16_t frame_len)
 {
-#if 0
-    COEF_CONST(0.59460355750136053335874998528024), /* 2^-0.75 */
-    COEF_CONST(0.70710678118654752440084436210485), /* 2^-0.5 */
-    COEF_CONST(0.84089641525371454303112547623321), /* 2^-0.25 */
-#endif
-    COEF_CONST(1.0),
-    COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */
-    COEF_CONST(1.4142135623730950488016887242097), /* 2^0.5 */
-    COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */
-};
+    ALIGN static const real_t pow2_table[] =
+    {
+        COEF_CONST(1.0),
+        COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */
+        COEF_CONST(1.4142135623730950488016887242097), /* 2^0.5 */
+        COEF_CONST(1.6817928305074290860622509524664) /* 2^0.75 */
+    };
+    const real_t *tab = iq_table;
 
-void apply_scalefactors(faacDecHandle hDecoder, ic_stream *ics,
-                        real_t *x_invquant, uint16_t frame_len)
-{
-    uint8_t g, sfb;
-    uint16_t top;
-    int32_t exp, frac;
-    uint8_t groups = 0;
-    uint16_t nshort = frame_len/8;
+    uint8_t g, sfb, win;
+    uint16_t width, bin, k, gindex;
+    uint8_t error = 0; /* Init error flag */
+
+
+    k = 0;
+    gindex = 0;
 
     for (g = 0; g < ics->num_window_groups; g++)
     {
-        uint16_t k = 0;
+        uint16_t j = 0;
+        uint16_t gincrease = 0;
+        uint16_t win_inc = ics->swb_offset[ics->num_swb];
 
-        /* using this nshort*groups doesn't hurt long blocks, because
-           long blocks only have 1 group, so that means 'groups' is
-           always 0 for long blocks
-        */
-        for (sfb = 0; sfb < ics->max_sfb; sfb++)
+        for (sfb = 0; sfb < ics->num_swb; sfb++)
         {
-            top = ics->sect_sfb_offset[g][sfb+1];
+            int32_t exp, frac;
+
+            width = ics->swb_offset[sfb+1] - ics->swb_offset[sfb];
 
             /* this could be scalefactor for IS or PNS, those can be negative or bigger then 255 */
             /* just ignore them */
@@ -599,6 +574,7 @@
             } else {
                 /* ics->scale_factors[g][sfb] must be between 0 and 255 */
                 exp = (ics->scale_factors[g][sfb] /* - 100 */) >> 2;
+                /* frac must always be > 0 */
                 frac = (ics->scale_factors[g][sfb] /* - 100 */) & 3;
             }
 
@@ -616,81 +592,67 @@
             }
 #endif
 
-            /* minimum size of a sf band is 4 and always a multiple of 4 */
-            for ( ; k < top; k += 4)
+            for (win = 0; win < ics->window_group_length[g]; win++)
             {
-#ifdef FIXED_POINT
-                if (exp < 0)
+                for (bin = 0; bin < width; bin += 4)
                 {
-                    x_invquant[k+(groups*nshort)] >>= -exp;
-                    x_invquant[k+(groups*nshort)+1] >>= -exp;
-                    x_invquant[k+(groups*nshort)+2] >>= -exp;
-                    x_invquant[k+(groups*nshort)+3] >>= -exp;
-                } else {
-                    x_invquant[k+(groups*nshort)] <<= exp;
-                    x_invquant[k+(groups*nshort)+1] <<= exp;
-                    x_invquant[k+(groups*nshort)+2] <<= exp;
-                    x_invquant[k+(groups*nshort)+3] <<= exp;
-                }
+#ifndef FIXED_POINT
+                    spec_data[gindex+(win*win_inc)+j+bin+0] = iquant(quant_data[k+0], tab, &error) *
+                        pow2sf_tab[exp/*+25*/] * pow2_table[frac];
+                    spec_data[gindex+(win*win_inc)+j+bin+1] = iquant(quant_data[k+1], tab, &error) *
+                        pow2sf_tab[exp/*+25*/] * pow2_table[frac];
+                    spec_data[gindex+(win*win_inc)+j+bin+2] = iquant(quant_data[k+2], tab, &error) *
+                        pow2sf_tab[exp/*+25*/] * pow2_table[frac];
+                    spec_data[gindex+(win*win_inc)+j+bin+3] = iquant(quant_data[k+3], tab, &error) *
+                        pow2sf_tab[exp/*+25*/] * pow2_table[frac];
 #else
-                x_invquant[k+(groups*nshort)]   = x_invquant[k+(groups*nshort)]   * pow2sf_tab[exp/*+25*/];
-                x_invquant[k+(groups*nshort)+1] = x_invquant[k+(groups*nshort)+1] * pow2sf_tab[exp/*+25*/];
-                x_invquant[k+(groups*nshort)+2] = x_invquant[k+(groups*nshort)+2] * pow2sf_tab[exp/*+25*/];
-                x_invquant[k+(groups*nshort)+3] = x_invquant[k+(groups*nshort)+3] * pow2sf_tab[exp/*+25*/];
+                    real_t iq0 = iquant(quant_data[k+0], tab, &error);
+                    real_t iq1 = iquant(quant_data[k+1], tab, &error);
+                    real_t iq2 = iquant(quant_data[k+2], tab, &error);
+                    real_t iq3 = iquant(quant_data[k+3], tab, &error);
+                    if (exp < 0)
+                    {
+                        spec_data[gindex+(win*win_inc)+j+bin+0] = iq0 >>= -exp;
+                        spec_data[gindex+(win*win_inc)+j+bin+1] = iq1 >>= -exp;
+                        spec_data[gindex+(win*win_inc)+j+bin+2] = iq2 >>= -exp;
+                        spec_data[gindex+(win*win_inc)+j+bin+3] = iq3 >>= -exp;
+                    } else {
+                        spec_data[gindex+(win*win_inc)+j+bin+0] = iq0 <<= exp;
+                        spec_data[gindex+(win*win_inc)+j+bin+1] = iq1 <<= exp;
+                        spec_data[gindex+(win*win_inc)+j+bin+2] = iq2 <<= exp;
+                        spec_data[gindex+(win*win_inc)+j+bin+3] = iq3 <<= exp;
+                    }
+                    spec_data[gindex+(win*win_inc)+j+bin+0] = MUL_C(spec_data[gindex+(win*win_inc)+j+bin+0],pow2_table[frac]);
+                    spec_data[gindex+(win*win_inc)+j+bin+1] = MUL_C(spec_data[gindex+(win*win_inc)+j+bin+1],pow2_table[frac]);
+                    spec_data[gindex+(win*win_inc)+j+bin+2] = MUL_C(spec_data[gindex+(win*win_inc)+j+bin+2],pow2_table[frac]);
+                    spec_data[gindex+(win*win_inc)+j+bin+3] = MUL_C(spec_data[gindex+(win*win_inc)+j+bin+3],pow2_table[frac]);
+
+//#define SCFS_PRINT
+#ifdef SCFS_PRINT
+                    //printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+0]);
+                    //printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+1]);
+                    //printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+2]);
+                    //printf("%d\n", spec_data[gindex+(win*win_inc)+j+bin+3]);
+                    printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+0]);
+                    printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+1]);
+                    printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+2]);
+                    printf("0x%.8X\n", spec_data[gindex+(win*win_inc)+j+bin+3]);
+#endif
 #endif
 
-                x_invquant[k+(groups*nshort)]   = MUL_C(x_invquant[k+(groups*nshort)],pow2_table[frac /* + 3*/]);
-                x_invquant[k+(groups*nshort)+1] = MUL_C(x_invquant[k+(groups*nshort)+1],pow2_table[frac /* + 3*/]);
-                x_invquant[k+(groups*nshort)+2] = MUL_C(x_invquant[k+(groups*nshort)+2],pow2_table[frac /* + 3*/]);
-                x_invquant[k+(groups*nshort)+3] = MUL_C(x_invquant[k+(groups*nshort)+3],pow2_table[frac /* + 3*/]);
+                    gincrease += 4;
+                    k += 4;
+                }
             }
+            j += width;
         }
-        groups += ics->window_group_length[g];
+        gindex += gincrease;
     }
+
+    return error;
 }
 
-#ifdef USE_SSE
-void apply_scalefactors_sse(faacDecHandle hDecoder, ic_stream *ics,
-                            real_t *x_invquant, uint16_t frame_len)
-{
-    uint8_t g, sfb;
-    uint16_t top;
-    int32_t exp, frac;
-    uint8_t groups = 0;
-    uint16_t nshort = frame_len/8;
-
-    for (g = 0; g < ics->num_window_groups; g++)
-    {
-        uint16_t k = 0;
-
-        /* using this nshort*groups doesn't hurt long blocks, because
-           long blocks only have 1 group, so that means 'groups' is
-           always 0 for long blocks
-        */
-        for (sfb = 0; sfb < ics->max_sfb; sfb++)
-        {
-            top = ics->sect_sfb_offset[g][sfb+1];
-
-            exp = (ics->scale_factors[g][sfb] /* - 100 */) >> 2;
-            frac = (ics->scale_factors[g][sfb] /* - 100 */) & 3;
-
-            /* minimum size of a sf band is 4 and always a multiple of 4 */
-            for ( ; k < top; k += 4)
-            {
-                __m128 m1 = _mm_load_ps(&x_invquant[k+(groups*nshort)]);
-                __m128 m2 = _mm_load_ps1(&pow2sf_tab[exp /*+25*/]);
-                __m128 m3 = _mm_load_ps1(&pow2_table[frac /* + 3*/]);
-                __m128 m4 = _mm_mul_ps(m1, m2);
-                __m128 m5 = _mm_mul_ps(m3, m4);
-                _mm_store_ps(&x_invquant[k+(groups*nshort)], m5);
-            }
-        }
-        groups += ics->window_group_length[g];
-    }
-}
-#endif
-
-static uint8_t allocate_single_channel(faacDecHandle hDecoder, uint8_t channel,
+static uint8_t allocate_single_channel(NeAACDecHandle hDecoder, uint8_t channel,
                                        uint8_t output_channels)
 {
     uint8_t mul = 1;
@@ -773,7 +735,7 @@
     return 0;
 }
 
-static uint8_t allocate_channel_pair(faacDecHandle hDecoder,
+static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder,
                                      uint8_t channel, uint8_t paired_channel)
 {
     uint8_t mul = 1;
@@ -878,7 +840,7 @@
     return 0;
 }
 
-uint8_t reconstruct_single_channel(faacDecHandle hDecoder, ic_stream *ics,
+uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics,
                                    element *sce, int16_t *spec_data)
 {
     uint8_t retval, output_channels;
@@ -895,6 +857,12 @@
 #else
     output_channels = 1;
 #endif
+#ifdef DRM_PS
+    /* for DRM error recovery is crucial */
+    /* simply always allocate 2 channels, you never know when PS will pop up */
+    if (hDecoder->object_type == DRM_ER_LC)
+        output_channels = 2;
+#endif
     if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
     {
         /* element_output_channels not set yet */
@@ -904,7 +872,6 @@
         return 21;
     }
 
-
     if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
     {
         retval = allocate_single_channel(hDecoder, sce->channel, output_channels);
@@ -915,22 +882,11 @@
     }
 
 
-    /* inverse quantization */
-    retval = inverse_quantization(spec_coef, spec_data, hDecoder->frameLength);
+    /* dequantisation and scaling */
+    retval = quant_to_spec(hDecoder, ics, spec_data, spec_coef, hDecoder->frameLength);
     if (retval > 0)
         return retval;
 
-    /* apply scalefactors */
-#ifndef USE_SSE
-    apply_scalefactors(hDecoder, ics, spec_coef, hDecoder->frameLength);
-#else
-    hDecoder->apply_sf_func(hDecoder, ics, spec_coef, hDecoder->frameLength);
-#endif
-
-    /* deinterleave short block grouping */
-    if (ics->window_sequence == EIGHT_SHORT_SEQUENCE)
-        quant_to_spec(ics, spec_coef, hDecoder->frameLength);
-
 #ifdef PROFILE
     count = faad_get_ts() - count;
     hDecoder->requant_cycles += count;
@@ -989,7 +945,6 @@
             drc_decode(hDecoder->drc, spec_coef);
     }
 
-
     /* filter bank */
 #ifdef SSR_DEC
     if (hDecoder->object_type != SSR)
@@ -1036,25 +991,31 @@
         if (hDecoder->sbr[ele] == NULL)
         {
             hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength,
-                sce->ele_id, 2*get_sample_rate(hDecoder->sf_index)
+                hDecoder->element_id[ele], 2*get_sample_rate(hDecoder->sf_index),
+                hDecoder->downSampledSBR
 #ifdef DRM
                 , 0
 #endif
                 );
         }
 
+        if (sce->ics1.window_sequence == EIGHT_SHORT_SEQUENCE)
+            hDecoder->sbr[ele]->maxAACLine = 8*sce->ics1.swb_offset[max(sce->ics1.max_sfb-1, 0)];
+        else
+            hDecoder->sbr[ele]->maxAACLine = sce->ics1.swb_offset[max(sce->ics1.max_sfb-1, 0)];
+
         /* check if any of the PS tools is used */
 #if (defined(PS_DEC) || defined(DRM_PS))
-        if (output_channels == 1)
+        if (hDecoder->ps_used[ele] == 0)
         {
 #endif
             retval = sbrDecodeSingleFrame(hDecoder->sbr[ele], hDecoder->time_out[ch],
-                hDecoder->postSeekResetFlag, hDecoder->forceUpSampling);
+                hDecoder->postSeekResetFlag, hDecoder->downSampledSBR);
 #if (defined(PS_DEC) || defined(DRM_PS))
         } else {
             retval = sbrDecodeSingleFramePS(hDecoder->sbr[ele], hDecoder->time_out[ch],
                 hDecoder->time_out[ch+1], hDecoder->postSeekResetFlag,
-                hDecoder->forceUpSampling);
+                hDecoder->downSampledSBR);
         }
 #endif
         if (retval > 0)
@@ -1066,10 +1027,24 @@
     }
 #endif
 
+#ifdef DRM_PS
+    /* copy L to R for DRM when no PS is used */
+    if ((hDecoder->object_type == DRM_ER_LC) &&
+        (hDecoder->ps_used[hDecoder->fr_ch_ele] == 0))
+    {
+        uint8_t ele = hDecoder->fr_ch_ele;
+        uint8_t ch = sce->channel;
+        uint16_t frame_size = (hDecoder->sbr_alloced[ele]) ? 2 : 1;
+        frame_size *= hDecoder->frameLength*sizeof(real_t);
+
+        memcpy(hDecoder->time_out[ch+1], hDecoder->time_out[ch], frame_size);
+    }
+#endif
+
     return 0;
 }
 
-uint8_t reconstruct_channel_pair(faacDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
                                  element *cpe, int16_t *spec_data1, int16_t *spec_data2)
 {
     uint8_t retval;
@@ -1081,36 +1056,20 @@
 #endif
     if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0)
     {
-        retval = allocate_channel_pair(hDecoder, cpe->channel, cpe->paired_channel);
+        retval = allocate_channel_pair(hDecoder, cpe->channel, (uint8_t)cpe->paired_channel);
         if (retval > 0)
             return retval;
 
         hDecoder->element_alloced[hDecoder->fr_ch_ele] = 1;
     }
 
-    /* inverse quantization */
-    retval = inverse_quantization(spec_coef1, spec_data1, hDecoder->frameLength);
-    if (retval > 0)
-        return retval;
-
-    retval = inverse_quantization(spec_coef2, spec_data2, hDecoder->frameLength);
+    /* dequantisation and scaling */
+    retval = quant_to_spec(hDecoder, ics1, spec_data1, spec_coef1, hDecoder->frameLength);
     if (retval > 0)
         return retval;
-
-    /* apply scalefactors */
-#ifndef USE_SSE
-    apply_scalefactors(hDecoder, ics1, spec_coef1, hDecoder->frameLength);
-    apply_scalefactors(hDecoder, ics2, spec_coef2, hDecoder->frameLength);
-#else
-    hDecoder->apply_sf_func(hDecoder, ics1, spec_coef1, hDecoder->frameLength);
-    hDecoder->apply_sf_func(hDecoder, ics2, spec_coef2, hDecoder->frameLength);
-#endif
-
-    /* deinterleave short block grouping */
-    if (ics1->window_sequence == EIGHT_SHORT_SEQUENCE)
-        quant_to_spec(ics1, spec_coef1, hDecoder->frameLength);
-    if (ics2->window_sequence == EIGHT_SHORT_SEQUENCE)
-        quant_to_spec(ics2, spec_coef2, hDecoder->frameLength);
+    retval = quant_to_spec(hDecoder, ics2, spec_data2, spec_coef2, hDecoder->frameLength);
+    if (retval > 0)
+        return retval;
 
 #ifdef PROFILE
     count = faad_get_ts() - count;
@@ -1261,16 +1220,22 @@
         if (hDecoder->sbr[ele] == NULL)
         {
             hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength,
-                cpe->ele_id, 2*get_sample_rate(hDecoder->sf_index)
+                hDecoder->element_id[ele], 2*get_sample_rate(hDecoder->sf_index),
+                hDecoder->downSampledSBR
 #ifdef DRM
                 , 0
 #endif
                 );
         }
 
+        if (cpe->ics1.window_sequence == EIGHT_SHORT_SEQUENCE)
+            hDecoder->sbr[ele]->maxAACLine = 8*cpe->ics1.swb_offset[max(cpe->ics1.max_sfb-1, 0)];
+        else
+            hDecoder->sbr[ele]->maxAACLine = cpe->ics1.swb_offset[max(cpe->ics1.max_sfb-1, 0)];
+
         retval = sbrDecodeCoupleFrame(hDecoder->sbr[ele],
             hDecoder->time_out[ch0], hDecoder->time_out[ch1],
-            hDecoder->postSeekResetFlag, hDecoder->forceUpSampling);
+            hDecoder->postSeekResetFlag, hDecoder->downSampledSBR);
         if (retval > 0)
             return retval;
     } else if (((hDecoder->sbr_present_flag == 1) || (hDecoder->forceUpSampling == 1))
--- a/libfaad2/specrec.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/specrec.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: specrec.h,v 1.3 2004/06/02 22:59:03 diego Exp $
+** $Id: specrec.h,v 1.4 2004/06/23 13:50:52 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -36,16 +36,10 @@
 
 #include "syntax.h"
 
-uint8_t window_grouping_info(faacDecHandle hDecoder, ic_stream *ics);
-void apply_scalefactors(faacDecHandle hDecoder, ic_stream *ics, real_t *x_invquant,
-                        uint16_t frame_len);
-#ifdef USE_SSE
-void apply_scalefactors_sse(faacDecHandle hDecoder, ic_stream *ics, real_t *x_invquant,
-                            uint16_t frame_len);
-#endif
-uint8_t reconstruct_channel_pair(faacDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics);
+uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
                                  element *cpe, int16_t *spec_data1, int16_t *spec_data2);
-uint8_t reconstruct_single_channel(faacDecHandle hDecoder, ic_stream *ics, element *sce,
+uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, element *sce,
                                 int16_t *spec_data);
 
 #ifdef __cplusplus
--- a/libfaad2/structs.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/structs.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: structs.h,v 1.3 2004/06/02 22:59:04 diego Exp $
+** $Id: structs.h,v 1.4 2004/06/23 13:50:53 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -184,6 +184,7 @@
     program_config pce[16];
 } adif_header;
 
+#ifdef LTP_DEC
 typedef struct
 {
     uint8_t last_band;
@@ -196,7 +197,9 @@
     uint8_t short_lag_present[8];
     uint8_t short_lag[8];
 } ltp_info;
+#endif
 
+#ifdef MAIN_DEC
 typedef struct
 {
     uint8_t limit;
@@ -204,6 +207,7 @@
     uint8_t predictor_reset_group_number;
     uint8_t prediction_used[MAX_SFB];
 } pred_info;
+#endif
 
 typedef struct
 {
@@ -270,9 +274,13 @@
 
     pulse_info pul;
     tns_info tns;
+#ifdef MAIN_DEC
     pred_info pred;
+#endif
+#ifdef LTP_DEC
     ltp_info ltp;
     ltp_info ltp2;
+#endif
 #ifdef SSR_DEC
     ssr_info ssr;
 #endif
@@ -294,8 +302,6 @@
 
 typedef struct
 {
-    uint8_t ele_id;
-
     uint8_t channel;
     int16_t paired_channel;
 
@@ -309,59 +315,60 @@
 typedef struct mp4AudioSpecificConfig
 {
     /* Audio Specific Info */
-    uint8_t objectTypeIndex;
-    uint8_t samplingFrequencyIndex;
-    uint32_t samplingFrequency;
-    uint8_t channelsConfiguration;
+    /*uint8_t*/ unsigned char objectTypeIndex;
+    /*uint8_t*/ unsigned char samplingFrequencyIndex;
+    /*uint32_t*/ unsigned long samplingFrequency;
+    /*uint8_t*/ unsigned char channelsConfiguration;
 
     /* GA Specific Info */
-    uint8_t frameLengthFlag;
-    uint8_t dependsOnCoreCoder;
-    uint16_t coreCoderDelay;
-    uint8_t extensionFlag;
-    uint8_t aacSectionDataResilienceFlag;
-    uint8_t aacScalefactorDataResilienceFlag;
-    uint8_t aacSpectralDataResilienceFlag;
-    uint8_t epConfig;
+    /*uint8_t*/ unsigned char frameLengthFlag;
+    /*uint8_t*/ unsigned char dependsOnCoreCoder;
+    /*uint16_t*/ unsigned short coreCoderDelay;
+    /*uint8_t*/ unsigned char extensionFlag;
+    /*uint8_t*/ unsigned char aacSectionDataResilienceFlag;
+    /*uint8_t*/ unsigned char aacScalefactorDataResilienceFlag;
+    /*uint8_t*/ unsigned char aacSpectralDataResilienceFlag;
+    /*uint8_t*/ unsigned char epConfig;
 
-    int8_t sbr_present_flag;
-    int8_t forceUpSampling;
+    /*uint8_t*/ char sbr_present_flag;
+    /*uint8_t*/ char forceUpSampling;
+    /*uint8_t*/ char downSampledSBR;
 } mp4AudioSpecificConfig;
 
-typedef struct faacDecConfiguration
+typedef struct NeAACDecConfiguration
 {
-    uint8_t defObjectType;
-    uint32_t defSampleRate;
-    uint8_t outputFormat;
-    uint8_t downMatrix;
-    uint8_t useOldADTSFormat;
-    uint8_t dontUpSampleImplicitSBR;
-} faacDecConfiguration, *faacDecConfigurationPtr;
+    /*uint8_t*/ unsigned char defObjectType;
+    /*uint32_t*/ unsigned long defSampleRate;
+    /*uint8_t*/ unsigned char outputFormat;
+    /*uint8_t*/ unsigned char downMatrix;
+    /*uint8_t*/ unsigned char useOldADTSFormat;
+    /*uint8_t*/ unsigned char dontUpSampleImplicitSBR;
+} NeAACDecConfiguration, *NeAACDecConfigurationPtr;
 
-typedef struct faacDecFrameInfo
+typedef struct NeAACDecFrameInfo
 {
-    uint32_t bytesconsumed;
-    uint32_t samples;
-    uint8_t channels;
-    uint8_t error;
-    uint32_t samplerate;
+    /*uint32_t*/ unsigned long bytesconsumed;
+    /*uint32_t*/ unsigned long samples;
+    /*uint8_t*/ unsigned char channels;
+    /*uint8_t*/ unsigned char error;
+    /*uint32_t*/ unsigned long samplerate;
 
     /* SBR: 0: off, 1: on; normal, 2: on; downsampled */
-    uint8_t sbr;
+    /*uint8_t*/ unsigned char sbr;
 
     /* MPEG-4 ObjectType */
-    uint8_t object_type;
+    /*uint8_t*/ unsigned char object_type;
 
     /* AAC header type; MP4 will be signalled as RAW also */
-    uint8_t header_type;
+    /*uint8_t*/ unsigned char header_type;
 
     /* multichannel configuration */
-    uint8_t num_front_channels;
-    uint8_t num_side_channels;
-    uint8_t num_back_channels;
-    uint8_t num_lfe_channels;
-    uint8_t channel_position[MAX_CHANNELS];
-} faacDecFrameInfo;
+    /*uint8_t*/ unsigned char num_front_channels;
+    /*uint8_t*/ unsigned char num_side_channels;
+    /*uint8_t*/ unsigned char num_back_channels;
+    /*uint8_t*/ unsigned char num_lfe_channels;
+    /*uint8_t*/ unsigned char channel_position[MAX_CHANNELS];
+} NeAACDecFrameInfo;
 
 typedef struct
 {
@@ -381,6 +388,7 @@
     uint32_t frame;
 
     uint8_t downMatrix;
+    uint8_t upMatrix;
     uint8_t first_syn_ele;
     uint8_t has_lfe;
     /* number of channels in current frame */
@@ -417,13 +425,11 @@
 #ifdef SBR_DEC
     int8_t sbr_present_flag;
     int8_t forceUpSampling;
+    int8_t downSampledSBR;
     /* determines whether SBR data is allocated for the gives element */
     uint8_t sbr_alloced[MAX_SYNTAX_ELEMENTS];
 
     sbr_info *sbr[MAX_SYNTAX_ELEMENTS];
-#ifdef DRM
-    int8_t lcstereo_flag;
-#endif
 #endif
 #if (defined(PS_DEC) || defined(DRM_PS))
     uint8_t ps_used[MAX_SYNTAX_ELEMENTS];
@@ -449,7 +455,7 @@
     uint8_t internal_channel[MAX_CHANNELS];
 
     /* Configuration data */
-    faacDecConfiguration config;
+    NeAACDecConfiguration config;
 
 #ifdef USE_SSE
     void (*apply_sf_func)(void *a, void *b, void *c, uint16_t d);
@@ -462,7 +468,7 @@
     int64_t scalefac_cycles;
     int64_t requant_cycles;
 #endif
-} faacDecStruct, *faacDecHandle;
+} NeAACDecStruct, *NeAACDecHandle;
 
 
 
--- a/libfaad2/syntax.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/syntax.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: syntax.c,v 1.3 2004/06/02 22:59:04 diego Exp $
+** $Id: syntax.c,v 1.4 2004/06/23 13:50:53 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -54,47 +54,49 @@
 
 
 /* static function declarations */
-static void decode_sce_lfe(faacDecHandle hDecoder, faacDecFrameInfo *hInfo, bitfile *ld,
+static void decode_sce_lfe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
                            uint8_t id_syn_ele);
-static void decode_cpe(faacDecHandle hDecoder, faacDecFrameInfo *hInfo, bitfile *ld,
+static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
                        uint8_t id_syn_ele);
-static uint8_t single_lfe_channel_element(faacDecHandle hDecoder, bitfile *ld,
+static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
                                           uint8_t channel, uint8_t *tag);
-static uint8_t channel_pair_element(faacDecHandle hDecoder, bitfile *ld,
+static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
                                     uint8_t channel, uint8_t *tag);
 #ifdef COUPLING_DEC
-static uint8_t coupling_channel_element(faacDecHandle hDecoder, bitfile *ld);
+static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld);
 #endif
-static uint16_t data_stream_element(faacDecHandle hDecoder, bitfile *ld);
+static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld);
 static uint8_t program_config_element(program_config *pce, bitfile *ld);
-static uint8_t fill_element(faacDecHandle hDecoder, bitfile *ld, drc_info *drc
+static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
 #ifdef SBR_DEC
                             ,uint8_t sbr_ele
 #endif
                             );
-static uint8_t individual_channel_stream(faacDecHandle hDecoder, element *ele,
+static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
                                          bitfile *ld, ic_stream *ics, uint8_t scal_flag,
                                          int16_t *spec_data);
-static uint8_t ics_info(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
                         uint8_t common_window);
-static uint8_t section_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld);
-static uint8_t scale_factor_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld);
+static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
+static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld);
 #ifdef SSR_DEC
 static void gain_control_data(bitfile *ld, ic_stream *ics);
 #endif
-static uint8_t spectral_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
                              int16_t *spectral_data);
 static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count);
 static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld);
 static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld);
-static uint8_t ltp_data(faacDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
+#ifdef LTP_DEC
+static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld);
+#endif
 static uint8_t adts_fixed_header(adts_header *adts, bitfile *ld);
 static void adts_variable_header(adts_header *adts, bitfile *ld);
 static void adts_error_check(adts_header *adts, bitfile *ld);
 static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc);
 static uint8_t excluded_channels(bitfile *ld, drc_info *drc);
 #ifdef SCALABLE_DEC
-static int8_t aac_scalable_main_header(faacDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+static int8_t aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
                                        bitfile *ld, uint8_t this_layer_stereo);
 #endif
 
@@ -316,8 +318,8 @@
     return 0;
 }
 
-static void decode_sce_lfe(faacDecHandle hDecoder,
-                           faacDecFrameInfo *hInfo, bitfile *ld,
+static void decode_sce_lfe(NeAACDecHandle hDecoder,
+                           NeAACDecFrameInfo *hInfo, bitfile *ld,
                            uint8_t id_syn_ele)
 {
     uint8_t channels = hDecoder->fr_channels;
@@ -361,7 +363,7 @@
     hDecoder->fr_ch_ele++;
 }
 
-static void decode_cpe(faacDecHandle hDecoder, faacDecFrameInfo *hInfo, bitfile *ld,
+static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld,
                        uint8_t id_syn_ele)
 {
     uint8_t channels = hDecoder->fr_channels;
@@ -409,7 +411,7 @@
     hDecoder->fr_ch_ele++;
 }
 
-void raw_data_block(faacDecHandle hDecoder, faacDecFrameInfo *hInfo,
+void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
                     bitfile *ld, program_config *pce, drc_info *drc)
 {
     uint8_t id_syn_ele;
@@ -425,7 +427,7 @@
 #endif
         /* Table 4.4.3: raw_data_block() */
         while ((id_syn_ele = (uint8_t)faad_getbits(ld, LEN_SE_ID
-            DEBUGVAR(1,4,"faacDecDecode(): id_syn_ele"))) != ID_END)
+            DEBUGVAR(1,4,"NeAACDecDecode(): id_syn_ele"))) != ID_END)
         {
             switch (id_syn_ele) {
             case ID_SCE:
@@ -558,7 +560,7 @@
 
 /* Table 4.4.4 and */
 /* Table 4.4.9 */
-static uint8_t single_lfe_channel_element(faacDecHandle hDecoder, bitfile *ld,
+static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld,
                                           uint8_t channel, uint8_t *tag)
 {
     uint8_t retval = 0;
@@ -601,7 +603,7 @@
 }
 
 /* Table 4.4.5 */
-static uint8_t channel_pair_element(faacDecHandle hDecoder, bitfile *ld,
+static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld,
                                     uint8_t channels, uint8_t *tag)
 {
     ALIGN int16_t spec_data1[1024] = {0};
@@ -643,13 +645,20 @@
 #ifdef ERROR_RESILIENCE
         if ((hDecoder->object_type >= ER_OBJECT_START) && (ics1->predictor_data_present))
         {
-            if ((ics1->ltp.data_present = faad_get1bit(ld
-                DEBUGVAR(1,50,"channel_pair_element(): ltp.data_present"))) & 1)
+            if ((
+#ifdef LTP_DEC
+                ics1->ltp.data_present =
+#endif
+                faad_get1bit(ld DEBUGVAR(1,50,"channel_pair_element(): ltp.data_present"))) & 1)
             {
+#ifdef LTP_DEC
                 if ((result = ltp_data(hDecoder, ics1, &(ics1->ltp), ld)) > 0)
                 {
                     return result;
                 }
+#else
+                return 26;
+#endif
             }
         }
 #endif
@@ -669,13 +678,20 @@
     if (cpe.common_window && (hDecoder->object_type >= ER_OBJECT_START) &&
         (ics1->predictor_data_present))
     {
-        if ((ics1->ltp2.data_present = faad_get1bit(ld
-            DEBUGVAR(1,50,"channel_pair_element(): ltp.data_present"))) & 1)
+        if ((
+#ifdef LTP_DEC
+            ics1->ltp2.data_present =
+#endif
+            faad_get1bit(ld DEBUGVAR(1,50,"channel_pair_element(): ltp.data_present"))) & 1)
         {
+#ifdef LTP_DEC
             if ((result = ltp_data(hDecoder, ics1, &(ics1->ltp2), ld)) > 0)
             {
                 return result;
             }
+#else
+            return 26;
+#endif
         }
     }
 #endif
@@ -712,7 +728,7 @@
 }
 
 /* Table 4.4.6 */
-static uint8_t ics_info(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
                         uint8_t common_window)
 {
     uint8_t retval = 0;
@@ -753,19 +769,29 @@
             {
                 uint8_t sfb;
 
-                ics->pred.limit = min(ics->max_sfb, max_pred_sfb(hDecoder->sf_index));
+                uint8_t limit = min(ics->max_sfb, max_pred_sfb(hDecoder->sf_index));
+#ifdef MAIN_DEC
+                ics->pred.limit = limit;
+#endif
 
-                if ((ics->pred.predictor_reset = faad_get1bit(ld
-                    DEBUGVAR(1,53,"ics_info(): pred.predictor_reset"))) & 1)
+                if ((
+#ifdef MAIN_DEC
+                    ics->pred.predictor_reset =
+#endif
+                    faad_get1bit(ld DEBUGVAR(1,53,"ics_info(): pred.predictor_reset"))) & 1)
                 {
-                    ics->pred.predictor_reset_group_number = (uint8_t)faad_getbits(ld, 5
-                        DEBUGVAR(1,54,"ics_info(): pred.predictor_reset_group_number"));
+#ifdef MAIN_DEC
+                    ics->pred.predictor_reset_group_number =
+#endif
+                        (uint8_t)faad_getbits(ld, 5 DEBUGVAR(1,54,"ics_info(): pred.predictor_reset_group_number"));
                 }
 
-                for (sfb = 0; sfb < ics->pred.limit; sfb++)
+                for (sfb = 0; sfb < limit; sfb++)
                 {
-                    ics->pred.prediction_used[sfb] = faad_get1bit(ld
-                        DEBUGVAR(1,55,"ics_info(): pred.prediction_used"));
+#ifdef MAIN_DEC
+                    ics->pred.prediction_used[sfb] =
+#endif
+                        faad_get1bit(ld DEBUGVAR(1,55,"ics_info(): pred.prediction_used"));
                 }
             }
 #ifdef LTP_DEC
@@ -828,8 +854,14 @@
     {
         pul->pulse_offset[i] = (uint8_t)faad_getbits(ld, 5
             DEBUGVAR(1,58,"pulse_data(): pulse_offset"));
+#if 0
+        printf("%d\n", pul->pulse_offset[i]);
+#endif
         pul->pulse_amp[i] = (uint8_t)faad_getbits(ld, 4
             DEBUGVAR(1,59,"pulse_data(): pulse_amp"));
+#if 0
+        printf("%d\n", pul->pulse_amp[i]);
+#endif
     }
 
     return 0;
@@ -837,7 +869,7 @@
 
 #ifdef COUPLING_DEC
 /* Table 4.4.8: Currently just for skipping the bits... */
-static uint8_t coupling_channel_element(faacDecHandle hDecoder, bitfile *ld)
+static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld)
 {
     uint8_t c, result = 0;
     uint8_t ind_sw_cce_flag = 0;
@@ -926,7 +958,7 @@
 #endif
 
 /* Table 4.4.10 */
-static uint16_t data_stream_element(faacDecHandle hDecoder, bitfile *ld)
+static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld)
 {
     uint8_t byte_aligned;
     uint16_t i, count;
@@ -955,7 +987,7 @@
 }
 
 /* Table 4.4.11 */
-static uint8_t fill_element(faacDecHandle hDecoder, bitfile *ld, drc_info *drc
+static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc
 #ifdef SBR_DEC
                             ,uint8_t sbr_ele
 #endif
@@ -988,7 +1020,8 @@
             if (!hDecoder->sbr[sbr_ele])
             {
                 hDecoder->sbr[sbr_ele] = sbrDecodeInit(hDecoder->frameLength,
-                    hDecoder->element_id[sbr_ele], 2*get_sample_rate(hDecoder->sf_index)
+                    hDecoder->element_id[sbr_ele], 2*get_sample_rate(hDecoder->sf_index),
+                    hDecoder->downSampledSBR
 #ifdef DRM
                     , 0
 #endif
@@ -999,6 +1032,14 @@
 
             /* parse the SBR data */
             hDecoder->sbr[sbr_ele]->ret = sbr_extension_data(ld, hDecoder->sbr[sbr_ele], count);
+
+#if 0
+            if (hDecoder->sbr[sbr_ele]->ret > 0)
+            {
+                printf("%s\n", NeAACDecGetErrorMessage(hDecoder->sbr[sbr_ele]->ret));
+            }
+#endif
+
 #if (defined(PS_DEC) || defined(DRM_PS))
             if (hDecoder->sbr[sbr_ele]->ps_used)
             {
@@ -1117,7 +1158,7 @@
 
 #ifdef SCALABLE_DEC
 /* Table 4.4.13 ASME */
-void aac_scalable_main_element(faacDecHandle hDecoder, faacDecFrameInfo *hInfo,
+void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
                                bitfile *ld, program_config *pce, drc_info *drc)
 {
     uint8_t retval = 0;
@@ -1139,11 +1180,13 @@
 
     cpe.common_window = 1;
     if (this_layer_stereo)
-        cpe.ele_id = ID_CPE;
-    else
-        cpe.ele_id = ID_SCE;
-
-    hDecoder->element_output_channels[hDecoder->fr_ch_ele] = (this_layer_stereo ? 2 : 0);
+    {
+        hDecoder->element_id[0] = ID_CPE;
+        if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
+            hDecoder->element_output_channels[hDecoder->fr_ch_ele] = 2;
+    } else {
+        hDecoder->element_id[0] = ID_SCE;
+    }
 
     for (ch = 0; ch < (this_layer_stereo ? 2 : 1); ch++)
     {
@@ -1187,8 +1230,8 @@
 
         if (!hDecoder->sbr[0])
         {
-            hDecoder->sbr[0] = sbrDecodeInit(hDecoder->frameLength, cpe.ele_id,
-                2*get_sample_rate(hDecoder->sf_index), 1);
+            hDecoder->sbr[0] = sbrDecodeInit(hDecoder->frameLength, hDecoder->element_id[0],
+                2*get_sample_rate(hDecoder->sf_index), 0 /* ds SBR */, 1);
         }
 
         /* Reverse bit reading of SBR data in DRM audio frame */
@@ -1203,8 +1246,6 @@
         count = (uint16_t)bit2byte(buffer_size*8 - bitsconsumed);
         faad_initbits(&ld_sbr, revbuffer, count);
 
-        hDecoder->sbr[0]->lcstereo_flag = hDecoder->lcstereo_flag;
-
         hDecoder->sbr[0]->sample_rate = get_sample_rate(hDecoder->sf_index);
         hDecoder->sbr[0]->sample_rate *= 2;
 
@@ -1220,8 +1261,8 @@
 
         /* check CRC */
         /* no need to check it if there was already an error */
-        if (hDecoder->sbr[0]->ret == 0)
-            hDecoder->sbr[0]->ret = faad_check_CRC(&ld_sbr, faad_get_processed_bits(&ld_sbr) - 8);
+//        if (hDecoder->sbr[0]->ret == 0)
+//            hDecoder->sbr[0]->ret = (uint8_t)faad_check_CRC(&ld_sbr, (uint16_t)faad_get_processed_bits(&ld_sbr) - 8);
 
         faad_endbits(&ld_sbr);
 
@@ -1252,8 +1293,6 @@
         hDecoder->internal_channel[channels] = channels;
     }
 
-    hDecoder->element_id[hDecoder->fr_ch_ele] = cpe.ele_id;
-
     hDecoder->fr_channels += hDecoder->element_output_channels[hDecoder->fr_ch_ele];
     hDecoder->fr_ch_ele++;
 
@@ -1261,7 +1300,7 @@
 }
 
 /* Table 4.4.15 */
-static int8_t aac_scalable_main_header(faacDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
+static int8_t aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2,
                                        bitfile *ld, uint8_t this_layer_stereo)
 {
     uint8_t retval = 0;
@@ -1353,13 +1392,20 @@
                 diff_control_data_lr();
         } else {
 #endif
-            if ((ics->ltp.data_present = faad_get1bit(ld
-                DEBUGVAR(1,310,"aac_scalable_main_header(): ltp.data_present"))) & 1)
+            if ((
+#ifdef LTP_DEC
+                ics->ltp.data_present =
+#endif
+                faad_get1bit(ld DEBUGVAR(1,310,"aac_scalable_main_header(): ltp.data_present"))) & 1)
             {
+#ifdef LTP_DEC
                 if ((retval = ltp_data(hDecoder, ics, &(ics->ltp), ld)) > 0)
                 {
                     return retval;
                 }
+#else
+                return 26;
+#endif
             }
 #if 0
         }
@@ -1371,7 +1417,7 @@
 #endif
 
 /* Table 4.4.24 */
-static uint8_t individual_channel_stream(faacDecHandle hDecoder, element *ele,
+static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele,
                                          bitfile *ld, ic_stream *ics, uint8_t scal_flag,
                                          int16_t *spec_data)
 {
@@ -1469,7 +1515,7 @@
 #ifdef DRM
     /* CRC check */
     if (hDecoder->object_type == DRM_ER_LC)
-        if ((result = faad_check_CRC(ld, faad_get_processed_bits(ld) - 8)) > 0)
+        if ((result = (uint8_t)faad_check_CRC(ld, (uint16_t)faad_get_processed_bits(ld) - 8)) > 0)
             return result;
 #endif
 
@@ -1507,7 +1553,7 @@
 }
 
 /* Table 4.4.25 */
-static uint8_t section_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld)
+static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
 {
     uint8_t g;
     uint8_t sect_esc_val, sect_bits;
@@ -1551,6 +1597,10 @@
             ics->sect_cb[g][i] = (uint8_t)faad_getbits(ld, sect_cb_bits
                 DEBUGVAR(1,71,"section_data(): sect_cb"));
 
+#if 0
+            printf("%d\n", ics->sect_cb[g][i]);
+#endif
+
             if (ics->sect_cb[g][i] == NOISE_HCB)
                 ics->noise_used = 1;
 
@@ -1586,13 +1636,25 @@
             ics->sect_start[g][i] = k;
             ics->sect_end[g][i] = k + sect_len;
 
+#if 0
+            printf("%d\n", ics->sect_start[g][i]);
+#endif
+#if 0
+            printf("%d\n", ics->sect_end[g][i]);
+#endif
+
             if (k + sect_len >= 8*15)
                 return 15;
             if (i >= 8*15)
                 return 15;
 
             for (sfb = k; sfb < k + sect_len; sfb++)
+            {
                 ics->sfb_cb[g][sfb] = ics->sect_cb[g][i];
+#if 0
+                printf("%d\n", ics->sfb_cb[g][sfb]);
+#endif
+            }
 
 #if 0
             printf(" %6d %6d %6d\n",
@@ -1605,6 +1667,9 @@
             i++;
         }
         ics->num_sec[g] = i;
+#if 0
+        printf("%d\n", ics->num_sec[g]);
+#endif
     }
 
 #if 0
@@ -1643,6 +1708,10 @@
             {
             case ZERO_HCB: /* zero book */
                 ics->scale_factors[g][sfb] = 0;
+//#define SF_PRINT
+#ifdef SF_PRINT
+                printf("%d\n", ics->scale_factors[g][sfb]);
+#endif
                 break;
             case INTENSITY_HCB: /* intensity books */
             case INTENSITY_HCB2:
@@ -1651,6 +1720,9 @@
                 t = huffman_scale_factor(ld);
                 is_position += (t - 60);
                 ics->scale_factors[g][sfb] = is_position;
+#ifdef SF_PRINT
+                printf("%d\n", ics->scale_factors[g][sfb]);
+#endif
 
                 break;
             case NOISE_HCB: /* noise books */
@@ -1667,6 +1739,9 @@
                 }
                 noise_energy += t;
                 ics->scale_factors[g][sfb] = noise_energy;
+#ifdef SF_PRINT
+                printf("%d\n", ics->scale_factors[g][sfb]);
+#endif
 
                 break;
             default: /* spectral books */
@@ -1681,6 +1756,9 @@
                 if (scale_factor < 0 || scale_factor > 255)
                     return 4;
                 ics->scale_factors[g][sfb] = scale_factor;
+#ifdef SF_PRINT
+                printf("%d\n", ics->scale_factors[g][sfb]);
+#endif
 
                 break;
             }
@@ -1691,7 +1769,7 @@
 }
 
 /* Table 4.4.26 */
-static uint8_t scale_factor_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld)
+static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld)
 {
     uint8_t ret = 0;
 #ifdef PROFILE
@@ -1740,6 +1818,9 @@
     {
         tns->n_filt[w] = (uint8_t)faad_getbits(ld, n_filt_bits
             DEBUGVAR(1,74,"tns_data(): n_filt"));
+#if 0
+        printf("%d\n", tns->n_filt[w]);
+#endif
 
         if (tns->n_filt[w])
         {
@@ -1750,26 +1831,44 @@
             } else {
                 start_coef_bits = 3;
             }
+#if 0
+            printf("%d\n", tns->coef_res[w]);
+#endif
         }
 
         for (filt = 0; filt < tns->n_filt[w]; filt++)
         {
             tns->length[w][filt] = (uint8_t)faad_getbits(ld, length_bits
                 DEBUGVAR(1,76,"tns_data(): length"));
+#if 0
+            printf("%d\n", tns->length[w][filt]);
+#endif
             tns->order[w][filt]  = (uint8_t)faad_getbits(ld, order_bits
                 DEBUGVAR(1,77,"tns_data(): order"));
+#if 0
+            printf("%d\n", tns->order[w][filt]);
+#endif
             if (tns->order[w][filt])
             {
                 tns->direction[w][filt] = faad_get1bit(ld
                     DEBUGVAR(1,78,"tns_data(): direction"));
+#if 0
+                printf("%d\n", tns->direction[w][filt]);
+#endif
                 tns->coef_compress[w][filt] = faad_get1bit(ld
                     DEBUGVAR(1,79,"tns_data(): coef_compress"));
+#if 0
+                printf("%d\n", tns->coef_compress[w][filt]);
+#endif
 
                 coef_bits = start_coef_bits - tns->coef_compress[w][filt];
                 for (i = 0; i < tns->order[w][filt]; i++)
                 {
                     tns->coef[w][filt][i] = (uint8_t)faad_getbits(ld, coef_bits
                         DEBUGVAR(1,80,"tns_data(): coef"));
+#if 0
+                    printf("%d\n", tns->coef[w][filt][i]);
+#endif
                 }
             }
         }
@@ -1778,7 +1877,7 @@
 
 #ifdef LTP_DEC
 /* Table 4.4.28 */
-static uint8_t ltp_data(faacDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
+static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld)
 {
     uint8_t sfb, w;
 
@@ -1841,7 +1940,7 @@
 #endif
 
 /* Table 4.4.29 */
-static uint8_t spectral_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
                              int16_t *spectral_data)
 {
     int8_t i;
@@ -1872,15 +1971,41 @@
             case NOISE_HCB:
             case INTENSITY_HCB:
             case INTENSITY_HCB2:
+//#define SD_PRINT
+#ifdef SD_PRINT
+                {
+                    int j;
+                    for (j = ics->sect_sfb_offset[g][ics->sect_start[g][i]]; j < ics->sect_sfb_offset[g][ics->sect_end[g][i]]; j++)
+                    {
+                        printf("%d\n", 0);
+                    }
+                }
+#endif
+//#define SFBO_PRINT
+#ifdef SFBO_PRINT
+                printf("%d\n", ics->sect_sfb_offset[g][ics->sect_start[g][i]]);
+#endif
                 p += (ics->sect_sfb_offset[g][ics->sect_end[g][i]] -
                     ics->sect_sfb_offset[g][ics->sect_start[g][i]]);
                 break;
             default:
+#ifdef SFBO_PRINT
+                printf("%d\n", ics->sect_sfb_offset[g][ics->sect_start[g][i]]);
+#endif
                 for (k = ics->sect_sfb_offset[g][ics->sect_start[g][i]];
                      k < ics->sect_sfb_offset[g][ics->sect_end[g][i]]; k += inc)
                 {
                     if ((result = huffman_spectral_data(sect_cb, ld, &spectral_data[p])) > 0)
                         return result;
+#ifdef SD_PRINT
+                    {
+                        int j;
+                        for (j = p; j < p+inc; j++)
+                        {
+                            printf("%d\n", spectral_data[j]);
+                        }
+                    }
+#endif
                     p += inc;
                 }
                 break;
--- a/libfaad2/syntax.h	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/syntax.h	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: syntax.h,v 1.3 2004/06/02 22:59:04 diego Exp $
+** $Id: syntax.h,v 1.4 2004/06/23 13:50:53 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -62,8 +62,8 @@
 #define DRMCH_MONO          1
 #define DRMCH_STEREO        2
 #define DRMCH_SBR_MONO      3
-#define DRMCH_SBR_LC_STEREO 4
-#define DRMCH_SBR_STEREO    5
+#define DRMCH_SBR_STEREO    4
+#define DRMCH_SBR_PS_STEREO 5
 
 
 /* First object type that has ER */
@@ -112,10 +112,12 @@
 
 uint8_t adts_frame(adts_header *adts, bitfile *ld);
 void get_adif_header(adif_header *adif, bitfile *ld);
-void raw_data_block(faacDecHandle hDecoder, faacDecFrameInfo *hInfo,
+void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
                     bitfile *ld, program_config *pce, drc_info *drc);
-uint8_t reordered_spectral_data(faacDecHandle hDecoder, ic_stream *ics, bitfile *ld,
+uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld,
                                 int16_t *spectral_data);
+void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo,
+                               bitfile *ld, program_config *pce, drc_info *drc);
 
 
 #ifdef __cplusplus
--- a/libfaad2/tns.c	Fri Sep 24 17:03:03 2004 +0000
+++ b/libfaad2/tns.c	Fri Sep 24 17:31:36 2004 +0000
@@ -23,7 +23,7 @@
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
 ** Initially modified for use with MPlayer by Arpad Gereöffy on 2003/08/30
-** $Id: tns.c,v 1.3 2004/06/02 22:59:04 diego Exp $
+** $Id: tns.c,v 1.4 2004/06/23 13:50:53 diego Exp $
 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
 **/
 
@@ -241,24 +241,32 @@
 
     uint8_t j;
     uint16_t i;
-    real_t y, state[TNS_MAX_ORDER];
-
-    for (i = 0; i < order; i++)
-        state[i] = 0;
+    real_t y;
+    /* state is stored as a double ringbuffer */
+    real_t state[2*TNS_MAX_ORDER] = {0};
+    int8_t state_index = 0;
 
     for (i = 0; i < size; i++)
     {
         y = *spectrum;
 
         for (j = 0; j < order; j++)
-            y -= MUL_C(state[j], lpc[j+1]);
+            y -= MUL_C(state[state_index+j], lpc[j+1]);
 
-        for (j = order-1; j > 0; j--)
-            state[j] = state[j-1];
+        /* double ringbuffer state */
+        state_index--;
+        if (state_index < 0)
+            state_index = order-1;
+        state[state_index] = state[state_index + order] = y;
 
-        state[0] = y;
         *spectrum = y;
         spectrum += inc;
+
+//#define TNS_PRINT
+#ifdef TNS_PRINT
+        //printf("%d\n", y);
+        printf("0x%.8X\n", y);
+#endif
     }
 }
 
@@ -276,10 +284,10 @@
 
     uint8_t j;
     uint16_t i;
-    real_t y, state[TNS_MAX_ORDER];
-
-    for (i = 0; i < order; i++)
-        state[i] = REAL_CONST(0.0);
+    real_t y;
+    /* state is stored as a double ringbuffer */
+    real_t state[2*TNS_MAX_ORDER] = {0};
+    int8_t state_index = 0;
 
     for (i = 0; i < size; i++)
     {
@@ -288,10 +296,12 @@
         for (j = 0; j < order; j++)
             y += MUL_C(state[j], lpc[j+1]);
 
-        for (j = order-1; j > 0; j--)
-            state[j] = state[j-1];
+        /* double ringbuffer state */
+        state_index--;
+        if (state_index < 0)
+            state_index = order-1;
+        state[state_index] = state[state_index + order] = *spectrum;
 
-        state[0] = *spectrum;
         *spectrum = y;
         spectrum += inc;
     }