aboutsummaryrefslogtreecommitdiff
path: root/celt
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2011-11-29 11:29:39 -0800
committerRalph Giles <giles@mozilla.com>2012-03-05 17:09:53 -0800
commitcb3cc53014b0d0bc01a64808ebda8eb959f60397 (patch)
tree3159f4128129c8adcd7761bf903e577a41a106d9 /celt
parent037918a8fe31469fe69c607a9e4a68caaf9a4e6d (diff)
downloadlibopus-cb3cc53014b0d0bc01a64808ebda8eb959f60397.tar.gz
Fix --enable-fixed-point-debug.
Use the celt_mips defined in fixed_debug.h from the unit tests by defining CELT_C earlier. We must export celt_mips so it can be used by clients calling the library, like opus_custom_demo.
Diffstat (limited to 'celt')
-rw-r--r--celt/fixed_debug.h3
-rw-r--r--celt/tests/test_unit_dft.c5
-rw-r--r--celt/tests/test_unit_mathops.c3
-rw-r--r--celt/tests/test_unit_mdct.c6
4 files changed, 5 insertions, 12 deletions
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index bce02961..5408d904 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -35,7 +35,8 @@
#include <stdio.h>
#ifdef CELT_C
-long long celt_mips=0;
+#include "opus_defines.h"
+OPUS_EXPORT long long celt_mips=0;
#else
extern long long celt_mips;
#endif
diff --git a/celt/tests/test_unit_dft.c b/celt/tests/test_unit_dft.c
index 324244f3..5ca38ed1 100644
--- a/celt/tests/test_unit_dft.c
+++ b/celt/tests/test_unit_dft.c
@@ -9,10 +9,10 @@
#endif
#include <stdio.h>
-#include "kiss_fft.h"
#define CELT_C
#include "stack_alloc.h"
+#include "kiss_fft.h"
#include "kiss_fft.c"
#include "mathops.c"
#include "entcode.c"
@@ -22,9 +22,6 @@
#define M_PI 3.141592653
#endif
-#ifdef FIXED_DEBUG
-long long celt_mips=0;
-#endif
int ret = 0;
void check(kiss_fft_cpx * in,kiss_fft_cpx * out,int nfft,int isinverse)
diff --git a/celt/tests/test_unit_mathops.c b/celt/tests/test_unit_mathops.c
index 92a79700..8119bc1e 100644
--- a/celt/tests/test_unit_mathops.c
+++ b/celt/tests/test_unit_mathops.c
@@ -24,9 +24,6 @@
#define WORD "%f"
#endif
-#ifdef FIXED_DEBUG
-long long celt_mips=0;
-#endif
int ret = 0;
void testdiv(void)
diff --git a/celt/tests/test_unit_mdct.c b/celt/tests/test_unit_mdct.c
index 07ac0ffd..0de3d546 100644
--- a/celt/tests/test_unit_mdct.c
+++ b/celt/tests/test_unit_mdct.c
@@ -9,8 +9,9 @@
#endif
#include <stdio.h>
-#include "mdct.h"
+
#define CELT_C
+#include "mdct.h"
#include "stack_alloc.h"
#include "kiss_fft.c"
@@ -22,9 +23,6 @@
#define M_PI 3.141592653
#endif
-#ifdef FIXED_DEBUG
-long long celt_mips=0;
-#endif
int ret = 0;
void check(kiss_fft_scalar * in,kiss_fft_scalar * out,int nfft,int isinverse)
{