ref: bf6a4e01b6f1281a4711f293ef0a415c209ff13b
parent: b91d00d1e2bbaa8939e031a36770f555bf4eb459
author: Jean-Marc Valin <[email protected]>
date: Fri Aug 5 06:47:41 EDT 2011
Re-enables test cases, including the rotation test
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,8 @@
lib_LTLIBRARIES = libopus.la
+SUBDIRS = . libcelt
+
INCLUDES = -I$(top_srcdir)/libcelt -I$(top_srcdir)/silk -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed
include celt_sources.mk
--- a/configure.ac
+++ b/configure.ac
@@ -200,7 +200,7 @@
AM_CONDITIONAL([FIXED_POINT], [test x$ac_enable_fixed = xyes])
-AC_OUTPUT([Makefile])
+AC_OUTPUT([Makefile libcelt/Makefile])
AC_MSG_RESULT([
------------------------------------------------------------------------
--- a/libcelt/Makefile.am
+++ b/libcelt/Makefile.am
@@ -1,39 +1,17 @@
-# Disable automatic dependency tracking if using other tools than gcc and gmake
-#AUTOMAKE_OPTIONS = no-dependencies
+INCLUDES = -I$(top_srcdir)/libcelt
+METASOURCES = AUTO
+TESTS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test rotation-test tandem-test
-pkginclude_HEADERS = celt.h celt_types.h celt_header.h
-EXTRA_DIST= match-test.sh libcelt.vcxproj libcelt.vcxproj.filters
+noinst_PROGRAMS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test rotation-test tandem-test
-#INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@
-
-TESTS = match-test.sh
-
-noinst_SCRIPTS = match-test.sh
-
-lib_LTLIBRARIES = libcelt@[email protected]
-
-# Sources for compilation in the library
-libcelt@LIBCELT_SUFFIX@_la_SOURCES = bands.c celt.c cwrs.c ecintrin.h entcode.c \
- entdec.c entenc.c header.c kiss_fft.c laplace.c mathops.c mdct.c \
- modes.c pitch.c plc.c quant_bands.c rate.c vq.c
-
-libcelt@LIBCELT_SUFFIX@_la_LDFLAGS = \
- -version-info @CELT_LT_CURRENT@:@CELT_LT_REVISION@:@CELT_LT_AGE@ \
- -no-undefined
-
-noinst_HEADERS = _kiss_fft_guts.h arch.h bands.h fixed_c5x.h fixed_c6x.h \
- cwrs.h ecintrin.h entcode.h entdec.h entenc.h fixed_generic.h float_cast.h \
- kiss_fft.h laplace.h mdct.h mfrngcod.h \
- mathops.h modes.h os_support.h pitch.h \
- quant_bands.h rate.h stack_alloc.h \
- static_modes_fixed.h static_modes_float.h vq.h plc.h
-
-noinst_PROGRAMS = testcelt dump_modes
-testcelt_SOURCES = testcelt.c
-testcelt_LDADD = libcelt@[email protected]
-INCLUDES =
-#libcelt@LIBCELT_SUFFIX@_la_LIBADD =
-
-dump_modes_SOURCES = dump_modes.c
-dump_modes_LDADD = libcelt@[email protected]
+type_test_SOURCES = tests/type-test.c
+ectest_SOURCES = tests/ectest.c
+cwrs32_test_SOURCES = tests/cwrs32-test.c
+dft_test_SOURCES = tests/dft-test.c
+laplace_test_SOURCES = tests/laplace-test.c
+mdct_test_SOURCES = tests/mdct-test.c
+rotation_test_SOURCES = tests/rotation-test.c
+mathops_test_SOURCES = tests/mathops-test.c
+tandem_test_SOURCES = tests/tandem-test.c
+tandem_test_LDADD = $(top_builddir)/libopus.la
--- a/libcelt/tests/Makefile.am
+++ /dev/null
@@ -1,17 +1,0 @@
-INCLUDES = -I$(top_srcdir)/libcelt
-METASOURCES = AUTO
-
-TESTS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test tandem-test
-
-noinst_PROGRAMS = type-test ectest cwrs32-test dft-test laplace-test mdct-test mathops-test tandem-test
-
-type_test_SOURCES = type-test.c
-ectest_SOURCES = ectest.c
-cwrs32_test_SOURCES = cwrs32-test.c
-dft_test_SOURCES = dft-test.c
-laplace_test_SOURCES = laplace-test.c
-mdct_test_SOURCES = mdct-test.c
-#rotation_test_SOURCES = rotation-test.c
-mathops_test_SOURCES = mathops-test.c
-tandem_test_SOURCES = tandem-test.c
-tandem_test_LDADD = $(top_builddir)/libcelt/libcelt@[email protected]
--- a/libcelt/tests/mathops-test.c
+++ b/libcelt/tests/mathops-test.c
@@ -134,7 +134,7 @@
opus_val32 x;
for (x=8;x<65536;x+=(x>>3))
{
- float error = fabs(x-0.25*celt_exp2(celt_log2(x)<<1))/16384;
+ float error = fabs(x-0.25*celt_exp2(celt_log2(x)))/16384;
if (error>0.004)
{
fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_exp2(celt_log2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error);
--- a/libcelt/tests/rotation-test.c
+++ b/libcelt/tests/rotation-test.c
@@ -23,7 +23,6 @@
double err = 0, ener = 0, snr, snr0;
opus_val16 x0[MAX_SIZE];
opus_val16 x1[MAX_SIZE];
- int nb_rotations = (N+4*K)/(8*K);
for (i=0;i<N;i++)
x1[i] = x0[i] = rand()%32767-16384;
exp_rotation(x1, N, 1, 1, K, SPREAD_NORMAL);