diff libfaad2/tns.c @ 10989:3185f64f6350

synced with current cvs
author alex
date Fri, 03 Oct 2003 22:23:26 +0000
parents e989150f8216
children 4a370c80fe5c
line wrap: on
line diff
--- a/libfaad2/tns.c	Fri Oct 03 18:13:45 2003 +0000
+++ b/libfaad2/tns.c	Fri Oct 03 22:23:26 2003 +0000
@@ -22,7 +22,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
 **
-** $Id: tns.c,v 1.21 2003/07/29 08:20:14 menno Exp $
+** $Id: tns.c,v 1.22 2003/09/09 18:09:52 menno Exp $
 **/
 
 #include "common.h"
@@ -31,69 +31,38 @@
 #include "syntax.h"
 #include "tns.h"
 
-#ifdef FIXED_POINT
-static real_t tns_coef_0_3[] =
-{
-    0x0, 0x6F13013, 0xC8261BA, 0xF994E02,
-    0xF03E3A3A, 0xF224C28C, 0xF5B72457, 0xFA8715E3,
-    0xF90ECFED, 0xF37D9E46, 0xF066B1FE, 0xF066B1FE,
-    0xF03E3A3A, 0xF224C28C, 0xF5B72457, 0xFA8715E3
-};
-static real_t tns_coef_0_4[] =
-{
-    0x0, 0x3539B35, 0x681FE48, 0x9679182,
-    0xBE3EBD4, 0xDDB3D74, 0xF378709, 0xFE98FCA,
-    0xF011790B, 0xF09C5CB7, 0xF1AD6942, 0xF33B524A,
-    0xF5388AEB, 0xF793BBDF, 0xFA385AA9, 0xFD0F5CAB
-};
-static real_t tns_coef_1_3[] =
-{
-    0x0, 0x6F13013, 0xF5B72457, 0xFA8715E3,
-    0xF994E02, 0xC8261BA, 0xF5B72457, 0xFA8715E3,
-    0xF90ECFED, 0xF37D9E46, 0xF5B72457, 0xFA8715E3,
-    0xF37D9E46, 0xF90ECFED, 0xF5B72457, 0xFA8715E3
-};
-static real_t tns_coef_1_4[] =
-{
-    0x0, 0x3539B35, 0x681FE48, 0x9679182,
-    0xF5388AEB, 0xF793BBDF, 0xFA385AA9, 0xFD0F5CAB,
-    0xFE98FCA, 0xF378709, 0xDDB3D74, 0xBE3EBD4,
-    0xF5388AEB, 0xF793BBDF, 0xFA385AA9, 0xFD0F5CAB
-};
-#else
 #ifdef _MSC_VER
 #pragma warning(disable:4305)
 #pragma warning(disable:4244)
 #endif
 static real_t tns_coef_0_3[] =
 {
-    0.0, 0.4338837391, 0.7818314825, 0.9749279122,
-    -0.9848077530, -0.8660254038, -0.6427876097, -0.3420201433,
-    -0.4338837391, -0.7818314825, -0.9749279122, -0.9749279122,
-    -0.9848077530, -0.8660254038, -0.6427876097, -0.3420201433
+    COEF_CONST(0.0), COEF_CONST(0.4338837391), COEF_CONST(0.7818314825), COEF_CONST(0.9749279122),
+    COEF_CONST(-0.9848077530), COEF_CONST(-0.8660254038), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
+    COEF_CONST(-0.4338837391), COEF_CONST(-0.7818314825), COEF_CONST(-0.9749279122), COEF_CONST(-0.9749279122),
+    COEF_CONST(-0.9848077530), COEF_CONST(-0.8660254038), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433)
 };
 static real_t tns_coef_0_4[] =
 {
-    0.0, 0.2079116908, 0.4067366431, 0.5877852523,
-    0.7431448255, 0.8660254038, 0.9510565163, 0.9945218954,
-    -0.9957341763, -0.9618256432, -0.8951632914, -0.7980172273,
-    -0.6736956436, -0.5264321629, -0.3612416662, -0.1837495178
+    COEF_CONST(0.0), COEF_CONST(0.2079116908), COEF_CONST(0.4067366431), COEF_CONST(0.5877852523),
+    COEF_CONST(0.7431448255), COEF_CONST(0.8660254038), COEF_CONST(0.9510565163), COEF_CONST(0.9945218954),
+    COEF_CONST(-0.9957341763), COEF_CONST(-0.9618256432), COEF_CONST(-0.8951632914), COEF_CONST(-0.7980172273),
+    COEF_CONST(-0.6736956436), COEF_CONST(-0.5264321629), COEF_CONST(-0.3612416662), COEF_CONST(-0.1837495178)
 };
 static real_t tns_coef_1_3[] =
 {
-    0.0, 0.4338837391, -0.6427876097, -0.3420201433,
-    0.9749279122, 0.7818314825, -0.6427876097, -0.3420201433,
-    -0.4338837391, -0.7818314825, -0.6427876097, -0.3420201433,
-    -0.7818314825, -0.4338837391, -0.6427876097, -0.3420201433
+    COEF_CONST(0.0), COEF_CONST(0.4338837391), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
+    COEF_CONST(0.9749279122), COEF_CONST(0.7818314825), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
+    COEF_CONST(-0.4338837391), COEF_CONST(-0.7818314825), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433),
+    COEF_CONST(-0.7818314825), COEF_CONST(-0.4338837391), COEF_CONST(-0.6427876097), COEF_CONST(-0.3420201433)
 };
 static real_t tns_coef_1_4[] =
 {
-    0.0, 0.2079116908, 0.4067366431, 0.5877852523,
-    -0.6736956436, -0.5264321629, -0.3612416662, -0.1837495178,
-    0.9945218954, 0.9510565163, 0.8660254038, 0.7431448255,
-    -0.6736956436, -0.5264321629, -0.3612416662, -0.1837495178
+    COEF_CONST(0.0), COEF_CONST(0.2079116908), COEF_CONST(0.4067366431), COEF_CONST(0.5877852523),
+    COEF_CONST(-0.6736956436), COEF_CONST(-0.5264321629), COEF_CONST(-0.3612416662), COEF_CONST(-0.1837495178),
+    COEF_CONST(0.9945218954), COEF_CONST(0.9510565163), COEF_CONST(0.8660254038), COEF_CONST(0.7431448255),
+    COEF_CONST(-0.6736956436), COEF_CONST(-0.5264321629), COEF_CONST(-0.3612416662), COEF_CONST(-0.1837495178)
 };
-#endif
 
 
 /* TNS decoding for one channel and frame */