ref: cb3cc53014b0d0bc01a64808ebda8eb959f60397
parent: 037918a8fe31469fe69c607a9e4a68caaf9a4e6d
author: Ralph Giles <[email protected]>
date: Tue Nov 29 06:29:39 EST 2011
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.
--- 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
--- 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)
--- 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)
--- 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)
{