[IMPORT] import speex 1.2rc3
This commit is contained in:
parent
38dfd5a9c5
commit
f93ddf9fdc
18
AUTHORS
Normal file
18
AUTHORS
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
|
||||||
|
All the code except the following
|
||||||
|
|
||||||
|
David Rowe <david@rowetel.com>
|
||||||
|
lsp.c lsp.h
|
||||||
|
Also ideas and feedback
|
||||||
|
|
||||||
|
John Francis Edwards
|
||||||
|
wave_out.[ch], some #ifdefs for windows port and MSVC project files
|
||||||
|
|
||||||
|
Segher Boessenkool
|
||||||
|
Misc. optimizations (for QMF in particular)
|
||||||
|
|
||||||
|
Atsuhiko Yamanaka <ymnk@jcraft.com>:
|
||||||
|
Patch to speexenc.c to add Vorbis comment format
|
||||||
|
|
||||||
|
Radim Kolar <hsn@cybermail.net>:
|
||||||
|
Patch to speexenc.c for supporting more input formats
|
35
COPYING
Normal file
35
COPYING
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Copyright 2002-2008 Xiph.org Foundation
|
||||||
|
Copyright 2002-2008 Jean-Marc Valin
|
||||||
|
Copyright 2005-2007 Analog Devices Inc.
|
||||||
|
Copyright 2005-2008 Commonwealth Scientific and Industrial Research
|
||||||
|
Organisation (CSIRO)
|
||||||
|
Copyright 1993, 2002, 2006 David Rowe
|
||||||
|
Copyright 2003 EpicGames
|
||||||
|
Copyright 1992-1994 Jutta Degener, Carsten Bormann
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
21
ChangeLog
Normal file
21
ChangeLog
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
2005-09-07 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* libspeex/cb_search.c: (split_cb_search_shape_sign_N1):
|
||||||
|
add declaration for n, seems like an obvious build fix, slap
|
||||||
|
me down if it's not
|
||||||
|
|
||||||
|
2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
|
||||||
|
Patch for compiling with mingw32 sent by j@thing.net
|
||||||
|
|
||||||
|
2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
|
||||||
|
Integrated IRIX patch (getopt stuff) from Michael Pruett <michael@68k.org>
|
||||||
|
|
||||||
|
2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
|
||||||
|
Changed the Makefile.am so that KDevelop can parse SUBDIRS correctly
|
||||||
|
|
||||||
|
2002/03/27 Jean-Marc Valin:
|
||||||
|
Working encoder and decoder for both narrowband and wideband.
|
||||||
|
|
||||||
|
2002/02/27 Jean-Marc Valin:
|
||||||
|
Got the basic encoder working as a demo with quantization only on some
|
||||||
|
parameters.
|
8
INSTALL
Normal file
8
INSTALL
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Installing SpeexDSP is as easy as:
|
||||||
|
|
||||||
|
% ./configure [--prefix=<install-path>]
|
||||||
|
% make
|
||||||
|
% make install
|
||||||
|
|
||||||
|
Note that if you are using the code from git you will need to run "autogen.sh"
|
||||||
|
and then "configure".
|
19
Makefile.am
Normal file
19
Makefile.am
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in. -*-Makefile-*-
|
||||||
|
|
||||||
|
# To disable automatic dependency tracking if using other tools than
|
||||||
|
# gcc and gmake, add the option 'no-dependencies'
|
||||||
|
AUTOMAKE_OPTIONS = 1.8
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = speexdsp.pc
|
||||||
|
|
||||||
|
EXTRA_DIST = SpeexDSP.spec SpeexDSP.spec.in SpeexDSP.kdevelop speexdsp.pc.in README.blackfin
|
||||||
|
|
||||||
|
#Fools KDevelop into including all files
|
||||||
|
SUBDIRS = libspeexdsp include doc win32 symbian ti
|
||||||
|
|
||||||
|
DIST_SUBDIRS = libspeexdsp include doc win32 symbian ti
|
||||||
|
|
||||||
|
rpm: dist
|
||||||
|
rpmbuild -ta ${PACKAGE}-${VERSION}.tar.gz
|
886
Makefile.in
Normal file
886
Makefile.in
Normal file
@ -0,0 +1,886 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = .
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(top_srcdir)/configure $(am__configure_deps) \
|
||||||
|
$(srcdir)/config.h.in $(srcdir)/SpeexDSP.spec.in \
|
||||||
|
$(srcdir)/speexdsp.pc.in AUTHORS COPYING ChangeLog INSTALL \
|
||||||
|
NEWS README TODO compile config.guess config.sub install-sh \
|
||||||
|
missing ltmain.sh
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno config.status.lineno
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = config.h
|
||||||
|
CONFIG_CLEAN_FILES = SpeexDSP.spec speexdsp.pc
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||||
|
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||||
|
install-data-recursive install-dvi-recursive \
|
||||||
|
install-exec-recursive install-html-recursive \
|
||||||
|
install-info-recursive install-pdf-recursive \
|
||||||
|
install-ps-recursive install-recursive installcheck-recursive \
|
||||||
|
installdirs-recursive pdf-recursive ps-recursive \
|
||||||
|
tags-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||||
|
DATA = $(pkgconfig_DATA)
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
am__recursive_targets = \
|
||||||
|
$(RECURSIVE_TARGETS) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
|
$(am__extra_recursive_targets)
|
||||||
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
|
cscope distdir dist dist-all distcheck
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||||
|
$(LISP)config.h.in
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
CSCOPE = cscope
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
am__remove_distdir = \
|
||||||
|
if test -d "$(distdir)"; then \
|
||||||
|
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||||
|
&& rm -rf "$(distdir)" \
|
||||||
|
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||||
|
else :; fi
|
||||||
|
am__post_remove_distdir = $(am__remove_distdir)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
DIST_ARCHIVES = $(distdir).tar.gz
|
||||||
|
GZIP_ENV = --best
|
||||||
|
DIST_TARGETS = dist-gzip
|
||||||
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||||
|
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
|
||||||
|
# To disable automatic dependency tracking if using other tools than
|
||||||
|
# gcc and gmake, add the option 'no-dependencies'
|
||||||
|
AUTOMAKE_OPTIONS = 1.8
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = speexdsp.pc
|
||||||
|
EXTRA_DIST = SpeexDSP.spec SpeexDSP.spec.in SpeexDSP.kdevelop speexdsp.pc.in README.blackfin
|
||||||
|
|
||||||
|
#Fools KDevelop into including all files
|
||||||
|
SUBDIRS = libspeexdsp include doc win32 symbian ti
|
||||||
|
DIST_SUBDIRS = libspeexdsp include doc win32 symbian ti
|
||||||
|
all: config.h
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
am--refresh: Makefile
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
config.h: stamp-h1
|
||||||
|
@test -f $@ || rm -f stamp-h1
|
||||||
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||||
|
|
||||||
|
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||||
|
@rm -f stamp-h1
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||||
|
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||||
|
rm -f stamp-h1
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
distclean-hdr:
|
||||||
|
-rm -f config.h stamp-h1
|
||||||
|
SpeexDSP.spec: $(top_builddir)/config.status $(srcdir)/SpeexDSP.spec.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
speexdsp.pc: $(top_builddir)/config.status $(srcdir)/speexdsp.pc.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
distclean-libtool:
|
||||||
|
-rm -f libtool config.lt
|
||||||
|
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-pkgconfigDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run 'make' without going through this Makefile.
|
||||||
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
|
$(am__recursive_targets):
|
||||||
|
@fail=; \
|
||||||
|
if $(am__make_keepgoing); then \
|
||||||
|
failcom='fail=yes'; \
|
||||||
|
else \
|
||||||
|
failcom='exit 1'; \
|
||||||
|
fi; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-recursive
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-recursive
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscope: cscope.files
|
||||||
|
test ! -s cscope.files \
|
||||||
|
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||||
|
clean-cscope:
|
||||||
|
-rm -f cscope.files
|
||||||
|
cscope.files: clean-cscope cscopelist
|
||||||
|
cscopelist: cscopelist-recursive
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-test -n "$(am__skip_mode_fix)" \
|
||||||
|
|| find "$(distdir)" -type d ! -perm -755 \
|
||||||
|
-exec chmod u+rwx,go+rx {} \; -o \
|
||||||
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|
|| chmod -R a+r "$(distdir)"
|
||||||
|
dist-gzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-bzip2: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-lzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-xz: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-tarZ: distdir
|
||||||
|
@echo WARNING: "Support for shar distribution archives is" \
|
||||||
|
"deprecated." >&2
|
||||||
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-shar: distdir
|
||||||
|
@echo WARNING: "Support for distribution archives compressed with" \
|
||||||
|
"legacy program 'compress' is deprecated." >&2
|
||||||
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist-zip: distdir
|
||||||
|
-rm -f $(distdir).zip
|
||||||
|
zip -rq $(distdir).zip $(distdir)
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
dist dist-all:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
case '$(DIST_ARCHIVES)' in \
|
||||||
|
*.tar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
|
*.tar.bz2*) \
|
||||||
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
|
*.tar.lz*) \
|
||||||
|
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||||
|
*.tar.xz*) \
|
||||||
|
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||||
|
*.tar.Z*) \
|
||||||
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
|
*.shar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||||
|
*.zip*) \
|
||||||
|
unzip $(distdir).zip ;;\
|
||||||
|
esac
|
||||||
|
chmod -R a-w $(distdir)
|
||||||
|
chmod u+w $(distdir)
|
||||||
|
mkdir $(distdir)/_build $(distdir)/_inst
|
||||||
|
chmod a-w $(distdir)
|
||||||
|
test -d $(distdir)/_build || exit 0; \
|
||||||
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
|
&& am__cwd=`pwd` \
|
||||||
|
&& $(am__cd) $(distdir)/_build \
|
||||||
|
&& ../configure \
|
||||||
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
--srcdir=.. --prefix="$$dc_install_base" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||||
|
distuninstallcheck \
|
||||||
|
&& chmod -R a-w "$$dc_install_base" \
|
||||||
|
&& ({ \
|
||||||
|
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||||
|
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||||
|
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||||
|
&& rm -rf "$$dc_destdir" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||||
|
&& rm -rf $(DIST_ARCHIVES) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||||
|
&& cd "$$am__cwd" \
|
||||||
|
|| exit 1
|
||||||
|
$(am__post_remove_distdir)
|
||||||
|
@(echo "$(distdir) archives ready for distribution: "; \
|
||||||
|
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||||
|
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||||
|
distuninstallcheck:
|
||||||
|
@test -n '$(distuninstallcheck_dir)' || { \
|
||||||
|
echo 'ERROR: trying to run $@ with an empty' \
|
||||||
|
'$$(distuninstallcheck_dir)' >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}; \
|
||||||
|
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||||
|
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||||
|
exit 1; \
|
||||||
|
}; \
|
||||||
|
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
|
if test -n "$(DESTDIR)"; then \
|
||||||
|
echo " (check DESTDIR support)"; \
|
||||||
|
fi ; \
|
||||||
|
$(distuninstallcheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
distcleancheck: distclean
|
||||||
|
@if test '$(srcdir)' = . ; then \
|
||||||
|
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||||
|
$(distcleancheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile $(DATA) config.h
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||||
|
distclean-libtool distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-pkgconfigDATA
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-pkgconfigDATA
|
||||||
|
|
||||||
|
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||||
|
am--refresh check check-am clean clean-cscope clean-generic \
|
||||||
|
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||||
|
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||||
|
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||||
|
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||||
|
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||||
|
info-am install install-am install-data install-data-am \
|
||||||
|
install-dvi install-dvi-am install-exec install-exec-am \
|
||||||
|
install-html install-html-am install-info install-info-am \
|
||||||
|
install-man install-pdf install-pdf-am install-pkgconfigDATA \
|
||||||
|
install-ps install-ps-am install-strip installcheck \
|
||||||
|
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||||
|
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||||
|
uninstall-am uninstall-pkgconfigDATA
|
||||||
|
|
||||||
|
|
||||||
|
rpm: dist
|
||||||
|
rpmbuild -ta ${PACKAGE}-${VERSION}.tar.gz
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
3
README
Normal file
3
README
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
See INSTALL file for instructions on how to install SpeexDSP.
|
||||||
|
|
||||||
|
SpeexDSP is a patent-free, Open Source/Free Software DSP library.
|
22
README.blackfin
Normal file
22
README.blackfin
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
SpeexDSP has been ported to the Blackfin DSP, for the STAMP development board.
|
||||||
|
|
||||||
|
This port has been tested on the STAMP development board and requires the
|
||||||
|
toolchain available at http://blackfin.uclinux.org/
|
||||||
|
|
||||||
|
1/ In order to cross-compile for uClinux from the SpeexDSP tarball:
|
||||||
|
|
||||||
|
./configure --enable-blackfin-asm --enable-fixed-point --host=bfin-uclinux
|
||||||
|
cd libspeexdsp
|
||||||
|
make
|
||||||
|
|
||||||
|
The --enable-blackfin-asm option is not required, but it speeds up Speex by
|
||||||
|
approximately a factor of two.
|
||||||
|
|
||||||
|
2/ In order to cross-compile for uClinux from the SpeexDSP git:
|
||||||
|
|
||||||
|
git clone git://git.xiph.org/speexdsp.git
|
||||||
|
cd speexdsp
|
||||||
|
./autogen.sh
|
||||||
|
./configure --enable-blackfin-asm --enable-fixed-point --host=bfin-uclinux
|
||||||
|
cd libspeexdsp
|
||||||
|
make
|
@ -1,4 +0,0 @@
|
|||||||
speexdsp
|
|
||||||
========
|
|
||||||
|
|
||||||
(external) (BSD 3 clauses) lib speex (algorithm)
|
|
201
SpeexDSP.kdevelop
Normal file
201
SpeexDSP.kdevelop
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
<?xml version = '1.0'?>
|
||||||
|
<kdevelop>
|
||||||
|
<general>
|
||||||
|
<author>Jean-Marc Valin</author>
|
||||||
|
<email>jean-marc.valin@usherbrooke.ca</email>
|
||||||
|
<version>$VERSION$</version>
|
||||||
|
<projectmanagement>KDevAutoProject</projectmanagement>
|
||||||
|
<primarylanguage>C</primarylanguage>
|
||||||
|
<ignoreparts/>
|
||||||
|
<projectdirectory>.</projectdirectory>
|
||||||
|
<absoluteprojectpath>false</absoluteprojectpath>
|
||||||
|
<description/>
|
||||||
|
<secondaryLanguages/>
|
||||||
|
<versioncontrol>kdevsubversion</versioncontrol>
|
||||||
|
<defaultencoding/>
|
||||||
|
<projectname>Speex</projectname>
|
||||||
|
</general>
|
||||||
|
<kdevautoproject>
|
||||||
|
<general>
|
||||||
|
<activetarget>libspeex/libspeex.la</activetarget>
|
||||||
|
<useconfiguration>float</useconfiguration>
|
||||||
|
</general>
|
||||||
|
<run>
|
||||||
|
<mainprogram>src/Speex</mainprogram>
|
||||||
|
<directoryradio>executable</directoryradio>
|
||||||
|
<customdirectory>/</customdirectory>
|
||||||
|
<programargs/>
|
||||||
|
<terminal>false</terminal>
|
||||||
|
<autocompile>true</autocompile>
|
||||||
|
<envvars/>
|
||||||
|
<autoinstall>false</autoinstall>
|
||||||
|
<autokdesu>false</autokdesu>
|
||||||
|
</run>
|
||||||
|
<configurations>
|
||||||
|
<float>
|
||||||
|
<builddir>float</builddir>
|
||||||
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
|
<f77compiler>kdevpgf77options</f77compiler>
|
||||||
|
<cflags>-O2 -g -Wall</cflags>
|
||||||
|
<envvars/>
|
||||||
|
<configargs>--disable-shared</configargs>
|
||||||
|
<topsourcedir/>
|
||||||
|
<cppflags/>
|
||||||
|
<ldflags/>
|
||||||
|
<ccompilerbinary/>
|
||||||
|
<cxxcompilerbinary/>
|
||||||
|
<f77compilerbinary/>
|
||||||
|
<cxxflags/>
|
||||||
|
<f77flags/>
|
||||||
|
</float>
|
||||||
|
<fixed>
|
||||||
|
<configargs>--enable-fixed-point --disable-shared</configargs>
|
||||||
|
<builddir>fixed</builddir>
|
||||||
|
<ccompiler>kdevgccoptions</ccompiler>
|
||||||
|
<cxxcompiler>kdevgppoptions</cxxcompiler>
|
||||||
|
<f77compiler>kdevpgf77options</f77compiler>
|
||||||
|
<cflags>-O2 -g -Wall</cflags>
|
||||||
|
<envvars/>
|
||||||
|
<topsourcedir/>
|
||||||
|
<cppflags/>
|
||||||
|
<ldflags/>
|
||||||
|
<ccompilerbinary/>
|
||||||
|
<cxxcompilerbinary/>
|
||||||
|
<f77compilerbinary/>
|
||||||
|
<cxxflags/>
|
||||||
|
<f77flags/>
|
||||||
|
</fixed>
|
||||||
|
<default>
|
||||||
|
<envvars/>
|
||||||
|
</default>
|
||||||
|
</configurations>
|
||||||
|
<make>
|
||||||
|
<envvars>
|
||||||
|
<envvar value="1" name="WANT_AUTOCONF_2_5" />
|
||||||
|
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
|
||||||
|
</envvars>
|
||||||
|
<abortonerror>false</abortonerror>
|
||||||
|
<numberofjobs>4</numberofjobs>
|
||||||
|
<dontact>false</dontact>
|
||||||
|
<makebin/>
|
||||||
|
<runmultiplejobs>true</runmultiplejobs>
|
||||||
|
<prio>0</prio>
|
||||||
|
</make>
|
||||||
|
</kdevautoproject>
|
||||||
|
<kdevdebugger>
|
||||||
|
<general>
|
||||||
|
<dbgshell>libtool</dbgshell>
|
||||||
|
<programargs/>
|
||||||
|
<gdbpath/>
|
||||||
|
<configGdbScript/>
|
||||||
|
<runShellScript/>
|
||||||
|
<runGdbScript/>
|
||||||
|
<breakonloadinglibs>true</breakonloadinglibs>
|
||||||
|
<separatetty>false</separatetty>
|
||||||
|
<floatingtoolbar>false</floatingtoolbar>
|
||||||
|
</general>
|
||||||
|
<display>
|
||||||
|
<staticmembers>false</staticmembers>
|
||||||
|
<demanglenames>true</demanglenames>
|
||||||
|
<outputradix>10</outputradix>
|
||||||
|
</display>
|
||||||
|
</kdevdebugger>
|
||||||
|
<kdevfilecreate>
|
||||||
|
<filetypes/>
|
||||||
|
<useglobaltypes>
|
||||||
|
<type ext="c" />
|
||||||
|
<type ext="h" />
|
||||||
|
</useglobaltypes>
|
||||||
|
</kdevfilecreate>
|
||||||
|
<kdevcppsupport>
|
||||||
|
<references/>
|
||||||
|
<codecompletion>
|
||||||
|
<includeGlobalFunctions>true</includeGlobalFunctions>
|
||||||
|
<includeTypes>true</includeTypes>
|
||||||
|
<includeEnums>true</includeEnums>
|
||||||
|
<includeTypedefs>false</includeTypedefs>
|
||||||
|
<automaticCodeCompletion>true</automaticCodeCompletion>
|
||||||
|
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||||
|
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||||
|
<codeCompletionDelay>350</codeCompletionDelay>
|
||||||
|
<argumentsHintDelay>400</argumentsHintDelay>
|
||||||
|
<headerCompletionDelay>250</headerCompletionDelay>
|
||||||
|
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
|
||||||
|
<completionBoxItemOrder>0</completionBoxItemOrder>
|
||||||
|
<howEvaluationContextMenu>true</howEvaluationContextMenu>
|
||||||
|
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
|
||||||
|
<statusBarTypeEvaluation>false</statusBarTypeEvaluation>
|
||||||
|
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
|
||||||
|
<processPrimaryTypes>true</processPrimaryTypes>
|
||||||
|
<processFunctionArguments>true</processFunctionArguments>
|
||||||
|
<preProcessAllHeaders>false</preProcessAllHeaders>
|
||||||
|
<parseMissingHeaders>false</parseMissingHeaders>
|
||||||
|
<resolveIncludePaths>true</resolveIncludePaths>
|
||||||
|
<alwaysParseInBackground>true</alwaysParseInBackground>
|
||||||
|
<usePermanentCaching>true</usePermanentCaching>
|
||||||
|
<alwaysIncludeNamespaces>true</alwaysIncludeNamespaces>
|
||||||
|
<includePaths>.;</includePaths>
|
||||||
|
<parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
|
||||||
|
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
|
||||||
|
</codecompletion>
|
||||||
|
<qt>
|
||||||
|
<used>false</used>
|
||||||
|
<version>3</version>
|
||||||
|
<root>/usr/share/qt3</root>
|
||||||
|
<includestyle>3</includestyle>
|
||||||
|
<designerintegration>EmbeddedKDevDesigner</designerintegration>
|
||||||
|
<qmake>/usr/share/qt3/bin/qmake</qmake>
|
||||||
|
<designer>/usr/bin/designer-qt3</designer>
|
||||||
|
<designerpluginpaths/>
|
||||||
|
</qt>
|
||||||
|
<creategettersetter>
|
||||||
|
<prefixGet/>
|
||||||
|
<prefixSet>set</prefixSet>
|
||||||
|
<prefixVariable>m_,_</prefixVariable>
|
||||||
|
<parameterName>theValue</parameterName>
|
||||||
|
<inlineGet>true</inlineGet>
|
||||||
|
<inlineSet>true</inlineSet>
|
||||||
|
</creategettersetter>
|
||||||
|
<splitheadersource>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<orientation>Horizontal</orientation>
|
||||||
|
</splitheadersource>
|
||||||
|
</kdevcppsupport>
|
||||||
|
<kdevfileview>
|
||||||
|
<groups>
|
||||||
|
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||||
|
<hidenonlocation>false</hidenonlocation>
|
||||||
|
</groups>
|
||||||
|
<tree>
|
||||||
|
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
|
||||||
|
<hidenonprojectfiles>true</hidenonprojectfiles>
|
||||||
|
<showvcsfields>false</showvcsfields>
|
||||||
|
</tree>
|
||||||
|
</kdevfileview>
|
||||||
|
<kdevdoctreeview>
|
||||||
|
<projectdoc>
|
||||||
|
<userdocDir>html/</userdocDir>
|
||||||
|
<apidocDir>html/</apidocDir>
|
||||||
|
</projectdoc>
|
||||||
|
<ignoreqt_xml/>
|
||||||
|
<ignoredoxygen/>
|
||||||
|
<ignorekdocs/>
|
||||||
|
<ignoretocs/>
|
||||||
|
<ignoredevhelp/>
|
||||||
|
</kdevdoctreeview>
|
||||||
|
<cppsupportpart>
|
||||||
|
<filetemplates>
|
||||||
|
<interfacesuffix>.h</interfacesuffix>
|
||||||
|
<implementationsuffix>.cpp</implementationsuffix>
|
||||||
|
</filetemplates>
|
||||||
|
</cppsupportpart>
|
||||||
|
<kdevdocumentation>
|
||||||
|
<projectdoc>
|
||||||
|
<docsystem/>
|
||||||
|
<docurl/>
|
||||||
|
<usermanualurl/>
|
||||||
|
</projectdoc>
|
||||||
|
</kdevdocumentation>
|
||||||
|
</kdevelop>
|
67
SpeexDSP.spec
Normal file
67
SpeexDSP.spec
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
%define name speexdsp
|
||||||
|
%define ver 1.2rc3
|
||||||
|
%define rel 1
|
||||||
|
|
||||||
|
Summary: An open-source, patent-free speech codec
|
||||||
|
Name: %name
|
||||||
|
Version: %ver
|
||||||
|
Release: %rel
|
||||||
|
License: BSD
|
||||||
|
Group: Application/Devel
|
||||||
|
Source: http://www.speex.org/download/%{name}-%{ver}.tar.gz
|
||||||
|
URL: http://www.speex.org/
|
||||||
|
Vendor: Speex
|
||||||
|
Packager: Jean-Marc Valin (jean-marc.valin@usherbrooke.ca)
|
||||||
|
BuildRoot: /var/tmp/%{name}-build-root
|
||||||
|
Docdir: /usr/share/doc
|
||||||
|
|
||||||
|
%description
|
||||||
|
Speex is a patent-free audio codec designed especially for voice (unlike
|
||||||
|
Vorbis which targets general audio) signals and providing good narrowband
|
||||||
|
and wideband quality. This project aims to be complementary to the Vorbis
|
||||||
|
codec.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Speex development files
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Speex development files.
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Oct 03 2002 Jean-Marc Valin
|
||||||
|
- Added devel package inspired from PLD spec file
|
||||||
|
|
||||||
|
* Tue Jul 30 2002 Fredrik Rambris <boost@users.sourceforge.net> 0.5.2
|
||||||
|
- Added buildroot and docdir and ldconfig. Makes it builadble by non-roots
|
||||||
|
and also doesn't write to actual library paths when building.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS='-O3'
|
||||||
|
./configure --prefix=/usr --enable-shared --enable-static
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(644,root,root,755)
|
||||||
|
%doc COPYING AUTHORS ChangeLog NEWS README
|
||||||
|
%doc doc/manual.pdf
|
||||||
|
%attr(755,root,root) %{_bindir}/speex*
|
||||||
|
%attr(755,root,root) %{_libdir}/libspeex*.so*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(644,root,root,755)
|
||||||
|
%attr(755,root,root) %{_libdir}/libspeex*.la
|
||||||
|
%{_includedir}/speex/speex*.h
|
||||||
|
%{_libdir}/pkgconfig/speexdsp.pc
|
||||||
|
%{_libdir}/libspeex*.a
|
67
SpeexDSP.spec.in
Normal file
67
SpeexDSP.spec.in
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
%define name @PACKAGE@
|
||||||
|
%define ver @VERSION@
|
||||||
|
%define rel 1
|
||||||
|
|
||||||
|
Summary: An open-source, patent-free speech codec
|
||||||
|
Name: %name
|
||||||
|
Version: %ver
|
||||||
|
Release: %rel
|
||||||
|
License: BSD
|
||||||
|
Group: Application/Devel
|
||||||
|
Source: http://www.speex.org/download/%{name}-%{ver}.tar.gz
|
||||||
|
URL: http://www.speex.org/
|
||||||
|
Vendor: Speex
|
||||||
|
Packager: Jean-Marc Valin (jean-marc.valin@usherbrooke.ca)
|
||||||
|
BuildRoot: /var/tmp/%{name}-build-root
|
||||||
|
Docdir: /usr/share/doc
|
||||||
|
|
||||||
|
%description
|
||||||
|
Speex is a patent-free audio codec designed especially for voice (unlike
|
||||||
|
Vorbis which targets general audio) signals and providing good narrowband
|
||||||
|
and wideband quality. This project aims to be complementary to the Vorbis
|
||||||
|
codec.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Speex development files
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Speex development files.
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Oct 03 2002 Jean-Marc Valin
|
||||||
|
- Added devel package inspired from PLD spec file
|
||||||
|
|
||||||
|
* Tue Jul 30 2002 Fredrik Rambris <boost@users.sourceforge.net> 0.5.2
|
||||||
|
- Added buildroot and docdir and ldconfig. Makes it builadble by non-roots
|
||||||
|
and also doesn't write to actual library paths when building.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS='-O3'
|
||||||
|
./configure --prefix=/usr --enable-shared --enable-static
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(644,root,root,755)
|
||||||
|
%doc COPYING AUTHORS ChangeLog NEWS README
|
||||||
|
%doc doc/manual.pdf
|
||||||
|
%attr(755,root,root) %{_bindir}/speex*
|
||||||
|
%attr(755,root,root) %{_libdir}/libspeex*.so*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(644,root,root,755)
|
||||||
|
%attr(755,root,root) %{_libdir}/libspeex*.la
|
||||||
|
%{_includedir}/speex/speex*.h
|
||||||
|
%{_libdir}/pkgconfig/speexdsp.pc
|
||||||
|
%{_libdir}/libspeex*.a
|
32
TODO
Normal file
32
TODO
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
For 1.2:
|
||||||
|
Major points:
|
||||||
|
- Make documentation match the actual code (especially jitter buffer, AEC and preprocessor)
|
||||||
|
- Get AGC to work in fixed-point even if not totally converted
|
||||||
|
- Stabilise all APIs (need feedback)
|
||||||
|
- Short-term estimate in jitter buffer
|
||||||
|
- Control delay in new AEC API.
|
||||||
|
- NaN checks?
|
||||||
|
- Better error reporting
|
||||||
|
- Make kiss-fft 32-bit safe
|
||||||
|
|
||||||
|
Post 1.2:
|
||||||
|
improve float<->int conversion
|
||||||
|
split encoder and decoder?
|
||||||
|
Merge TriMedia stuff
|
||||||
|
packet dump
|
||||||
|
Do VAD properly
|
||||||
|
--enable-{aec,preprocessor,jitter,resampler}
|
||||||
|
|
||||||
|
Optimisations
|
||||||
|
- Add restrict in a few places?
|
||||||
|
- use __builtin_expect() (likely()/unlikely())
|
||||||
|
|
||||||
|
Allocator override (speex_lib_ctl?)
|
||||||
|
Fixed-point:
|
||||||
|
- VBR
|
||||||
|
- Jitter buffer
|
||||||
|
- AGC
|
||||||
|
Denoiser:
|
||||||
|
- Better noise adaptation
|
||||||
|
AGC:
|
||||||
|
- Use median filtering instead of "non-linear mean"?
|
102
acinclude.m4
Normal file
102
acinclude.m4
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Configure paths for libogg
|
||||||
|
# Jack Moffitt <jack@icecast.org> 10-21-2000
|
||||||
|
# Shamelessly stolen from Owen Taylor and Manish Singh
|
||||||
|
|
||||||
|
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([XIPH_PATH_OGG],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
|
||||||
|
AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
|
||||||
|
AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
|
||||||
|
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
|
||||||
|
|
||||||
|
if test "x$ogg_libraries" != "x" ; then
|
||||||
|
OGG_LIBS="-L$ogg_libraries"
|
||||||
|
elif test "x$ogg_prefix" != "x" ; then
|
||||||
|
OGG_LIBS="-L$ogg_prefix/lib"
|
||||||
|
elif test "x$prefix" != "xNONE" ; then
|
||||||
|
OGG_LIBS="-L$prefix/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
OGG_LIBS="$OGG_LIBS -logg"
|
||||||
|
|
||||||
|
if test "x$ogg_includes" != "x" ; then
|
||||||
|
OGG_CFLAGS="-I$ogg_includes"
|
||||||
|
elif test "x$ogg_prefix" != "x" ; then
|
||||||
|
OGG_CFLAGS="-I$ogg_prefix/include"
|
||||||
|
elif test "x$prefix" != "xNONE"; then
|
||||||
|
OGG_CFLAGS="-I$prefix/include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for Ogg)
|
||||||
|
no_ogg=""
|
||||||
|
|
||||||
|
|
||||||
|
if test "x$enable_oggtest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
||||||
|
LIBS="$LIBS $OGG_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed Ogg is sufficiently new.
|
||||||
|
dnl
|
||||||
|
rm -f conf.oggtest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ogg/ogg.h>
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
system("touch conf.oggtest");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$no_ogg" = "x" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test -f conf.oggtest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run Ogg test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
||||||
|
LIBS="$LIBS $OGG_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ogg/ogg.h>
|
||||||
|
], [ return 0; ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
|
||||||
|
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
|
||||||
|
echo "*** or that you have moved Ogg since it was installed." ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
OGG_CFLAGS=""
|
||||||
|
OGG_LIBS=""
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
AC_SUBST(OGG_CFLAGS)
|
||||||
|
AC_SUBST(OGG_LIBS)
|
||||||
|
rm -f conf.oggtest
|
||||||
|
])
|
1407
aclocal.m4
vendored
Normal file
1407
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
347
compile
Executable file
347
compile
Executable file
@ -0,0 +1,347 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.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, 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
1420
config.guess
vendored
Executable file
1420
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
193
config.h.in
Normal file
193
config.h.in
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
|
/* Make use of ARM4 assembly optimizations */
|
||||||
|
#undef ARM4_ASM
|
||||||
|
|
||||||
|
/* Make use of ARM5E assembly optimizations */
|
||||||
|
#undef ARM5E_ASM
|
||||||
|
|
||||||
|
/* Make use of Blackfin assembly optimizations */
|
||||||
|
#undef BFIN_ASM
|
||||||
|
|
||||||
|
/* Disable all parts of the API that are using floats */
|
||||||
|
#undef DISABLE_FLOAT_API
|
||||||
|
|
||||||
|
/* Enable valgrind extra checks */
|
||||||
|
#undef ENABLE_VALGRIND
|
||||||
|
|
||||||
|
/* Symbol visibility prefix */
|
||||||
|
#undef EXPORT
|
||||||
|
|
||||||
|
/* Debug fixed-point implementation */
|
||||||
|
#undef FIXED_DEBUG
|
||||||
|
|
||||||
|
/* Compile as fixed-point */
|
||||||
|
#undef FIXED_POINT
|
||||||
|
|
||||||
|
/* Compile as floating-point */
|
||||||
|
#undef FLOATING_POINT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <alloca.h> header file. */
|
||||||
|
#undef HAVE_ALLOCA_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <getopt.h> header file. */
|
||||||
|
#undef HAVE_GETOPT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/audioio.h> header file. */
|
||||||
|
#undef HAVE_SYS_AUDIOIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
||||||
|
#undef HAVE_SYS_SOUNDCARD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||||
|
*/
|
||||||
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Resample with full SINC table (no interpolation) */
|
||||||
|
#undef RESAMPLE_FULL_SINC_TABLE
|
||||||
|
|
||||||
|
/* The size of `int', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
|
/* The size of `int16_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT16_T
|
||||||
|
|
||||||
|
/* The size of `int32_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT32_T
|
||||||
|
|
||||||
|
/* The size of `long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
|
/* The size of `short', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
|
/* The size of `uint16_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_UINT16_T
|
||||||
|
|
||||||
|
/* The size of `uint32_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_UINT32_T
|
||||||
|
|
||||||
|
/* The size of `u_int16_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_U_INT16_T
|
||||||
|
|
||||||
|
/* The size of `u_int32_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_U_INT32_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Enable support for TI C55X DSP */
|
||||||
|
#undef TI_C55X
|
||||||
|
|
||||||
|
/* Make use of alloca */
|
||||||
|
#undef USE_ALLOCA
|
||||||
|
|
||||||
|
/* Use FFTW3 for FFT */
|
||||||
|
#undef USE_GPL_FFTW3
|
||||||
|
|
||||||
|
/* Use Intel Math Kernel Library for FFT */
|
||||||
|
#undef USE_INTEL_MKL
|
||||||
|
|
||||||
|
/* Use KISS Fast Fourier Transform */
|
||||||
|
#undef USE_KISS_FFT
|
||||||
|
|
||||||
|
/* Use FFT from OggVorbis */
|
||||||
|
#undef USE_SMALLFT
|
||||||
|
|
||||||
|
/* Use C99 variable-size arrays */
|
||||||
|
#undef VAR_ARRAYS
|
||||||
|
|
||||||
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
|
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
# if defined __BIG_ENDIAN__
|
||||||
|
# define WORDS_BIGENDIAN 1
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# ifndef WORDS_BIGENDIAN
|
||||||
|
# undef WORDS_BIGENDIAN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Enable NEON support */
|
||||||
|
#undef _USE_NEON
|
||||||
|
|
||||||
|
/* Enable SSE support */
|
||||||
|
#undef _USE_SSE
|
||||||
|
|
||||||
|
/* Enable SSE2 support */
|
||||||
|
#undef _USE_SSE2
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#undef inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||||
|
nothing if this is not supported. Do not define if restrict is
|
||||||
|
supported directly. */
|
||||||
|
#undef restrict
|
||||||
|
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||||
|
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||||
|
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||||
|
previous line. Perhaps some future version of Sun C++ will work with
|
||||||
|
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||||
|
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||||
|
# define _Restrict
|
||||||
|
# define __restrict__
|
||||||
|
#endif
|
1794
config.sub
vendored
Executable file
1794
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
362
configure.ac
Normal file
362
configure.ac
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
|
||||||
|
|
||||||
|
AC_INIT([speexdsp],[1.2rc3],[speex-dev@xiph.org])
|
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([libspeexdsp/preprocess.c])
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
dnl enable silent rules on automake 1.11 and later
|
||||||
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
|
|
||||||
|
SPEEXDSP_LT_CURRENT=6
|
||||||
|
SPEEXDSP_LT_REVISION=0
|
||||||
|
SPEEXDSP_LT_AGE=5
|
||||||
|
|
||||||
|
|
||||||
|
AC_SUBST(SPEEXDSP_LT_CURRENT)
|
||||||
|
AC_SUBST(SPEEXDSP_LT_REVISION)
|
||||||
|
AC_SUBST(SPEEXDSP_LT_AGE)
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([foreign no-define])
|
||||||
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
AC_LIBTOOL_WIN32_DLL
|
||||||
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
|
AC_C_BIGENDIAN
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
AC_C_RESTRICT
|
||||||
|
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for C99 variable-size arrays)
|
||||||
|
AC_TRY_COMPILE( , [
|
||||||
|
int foo;
|
||||||
|
foo = 10;
|
||||||
|
int array[foo];
|
||||||
|
],
|
||||||
|
[has_var_arrays=yes;AC_DEFINE([VAR_ARRAYS], [], [Use C99 variable-size arrays])
|
||||||
|
],
|
||||||
|
has_var_arrays=no
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($has_var_arrays)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([alloca.h getopt.h])
|
||||||
|
AC_MSG_CHECKING(for alloca)
|
||||||
|
AC_TRY_COMPILE( [
|
||||||
|
#ifdef HAVE_ALLOCA_H
|
||||||
|
# include <alloca.h>
|
||||||
|
#endif
|
||||||
|
#include <stdlib.h>
|
||||||
|
], [
|
||||||
|
int foo=10;
|
||||||
|
int *array = alloca(foo);
|
||||||
|
],
|
||||||
|
[
|
||||||
|
has_alloca=yes;
|
||||||
|
if test x$has_var_arrays = "xno" ; then
|
||||||
|
AC_DEFINE([USE_ALLOCA], [], [Make use of alloca])
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
has_alloca=no
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($has_alloca)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for SSE in current arch/CFLAGS)
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <xmmintrin.h>
|
||||||
|
__m128 testfunc(float *a, float *b) {
|
||||||
|
return _mm_add_ps(_mm_loadu_ps(a), _mm_loadu_ps(b));
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[
|
||||||
|
has_sse=yes
|
||||||
|
],
|
||||||
|
[
|
||||||
|
has_sse=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($has_sse)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for SSE2 in current arch/CFLAGS)
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <emmintrin.h>
|
||||||
|
__m128d testfunc(double *a, double *b) {
|
||||||
|
return _mm_add_pd(_mm_loadu_pd(a), _mm_loadu_pd(b));
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[
|
||||||
|
has_sse2=yes
|
||||||
|
],
|
||||||
|
[
|
||||||
|
has_sse2=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($has_sse2)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for NEON in current arch/CFLAGS)
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <arm_neon.h>
|
||||||
|
int32x4_t testfunc(int16_t *a, int16_t *b) {
|
||||||
|
return vmull_s16(vld1_s16(a), vld1_s16(b));
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[
|
||||||
|
has_neon=yes
|
||||||
|
],
|
||||||
|
[
|
||||||
|
has_neon=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($has_neon)
|
||||||
|
|
||||||
|
SAVE_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||||
|
AC_MSG_CHECKING(for ELF visibility)
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
|
__attribute__((visibility("default")))
|
||||||
|
int var=10;
|
||||||
|
]])],
|
||||||
|
[
|
||||||
|
has_visibility=yes
|
||||||
|
AC_DEFINE([EXPORT], [__attribute__((visibility("default")))], [Symbol visibility prefix])
|
||||||
|
],
|
||||||
|
[
|
||||||
|
has_visibility=no
|
||||||
|
AC_DEFINE([EXPORT], [], [Symbol visibility prefix])
|
||||||
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($has_visibility)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
|
||||||
|
|
||||||
|
AC_SUBST(src)
|
||||||
|
|
||||||
|
LT_LIB_M
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(valgrind, [ --enable-valgrind Enable valgrind extra checks],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
AC_DEFINE([ENABLE_VALGRIND], , [Enable valgrind extra checks])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support], [
|
||||||
|
if test "x$enableval" != xno; then
|
||||||
|
has_sse=yes
|
||||||
|
has_sse2=yes
|
||||||
|
CFLAGS="$CFLAGS -O3 -msse -msse2"
|
||||||
|
else
|
||||||
|
has_sse=no
|
||||||
|
has_sse2=no
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(neon, [ --enable-neon Enable NEON support], [
|
||||||
|
if test "x$enableval" != xno; then
|
||||||
|
has_neon=yes
|
||||||
|
CFLAGS="$CFLAGS -O3 -march=armv7-a -mfpu=neon"
|
||||||
|
else
|
||||||
|
has_neon=no
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
FFT=smallft
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(fixed-point, [ --enable-fixed-point Compile as fixed-point],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
FFT=kiss
|
||||||
|
has_sse=no
|
||||||
|
AC_DEFINE([FIXED_POINT], , [Compile as fixed-point])
|
||||||
|
else
|
||||||
|
AC_DEFINE([FLOATING_POINT], , [Compile as floating-point])
|
||||||
|
fi],
|
||||||
|
AC_DEFINE([FLOATING_POINT], , [Compile as floating-point]))
|
||||||
|
|
||||||
|
if test "$has_sse" = yes; then
|
||||||
|
AC_DEFINE([_USE_SSE], , [Enable SSE support])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$has_neon" = yes; then
|
||||||
|
AC_DEFINE([_USE_NEON], , [Enable NEON support])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$has_sse2" = yes; then
|
||||||
|
AC_DEFINE([_USE_SSE2], , [Enable SSE2 support])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(float-api, [ --disable-float-api Disable the floating-point API],
|
||||||
|
[if test "$enableval" = no; then
|
||||||
|
AC_DEFINE([DISABLE_FLOAT_API], , [Disable all parts of the API that are using floats])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(examples, [ --disable-examples Do not build example programs, only the library])
|
||||||
|
if test "$enableval" != no; then
|
||||||
|
AM_CONDITIONAL([BUILD_EXAMPLES], true)
|
||||||
|
else
|
||||||
|
AM_CONDITIONAL([BUILD_EXAMPLES], false)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(arm4-asm, [ --enable-arm4-asm Make use of ARM4 assembly optimizations],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
AC_DEFINE([ARM4_ASM], , [Make use of ARM4 assembly optimizations])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(arm5e-asm, [ --enable-arm5e-asm Make use of ARM5E assembly optimizations],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
AC_DEFINE([ARM5E_ASM], , [Make use of ARM5E assembly optimizations])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(blackfin-asm, [ --enable-blackfin-asm Make use of Blackfin assembly optimizations],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
AC_DEFINE([BFIN_ASM], , [Make use of Blackfin assembly optimizations])
|
||||||
|
fi])
|
||||||
|
case $host_os in
|
||||||
|
uclinux) LDFLAGS="-Wl,-elf2flt=-s100000 $LDFLAGS";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(fixed-point-debug, [ --enable-fixed-point-debug Debug fixed-point implementation],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
AC_DEFINE([FIXED_DEBUG], , [Debug fixed-point implementation])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(resample-full-sinc-table, [ --enable-resample-full-sinc-table Resample full SINC table (no interpolation)],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
AC_DEFINE([RESAMPLE_FULL_SINC_TABLE], , [Resample with full SINC table (no interpolation)])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(ti-c55x, [ --enable-ti-c55x Enable support for TI C55X DSP],
|
||||||
|
[if test "$enableval" = yes; then
|
||||||
|
has_char16=yes;
|
||||||
|
AC_DEFINE([TI_C55X], , [Enable support for TI C55X DSP])
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_WITH([fft], [AS_HELP_STRING([--with-fft=choice],[use an alternate FFT implementation. The available choices are
|
||||||
|
kiss (default fixed point), smallft (default floating point), gpl-fftw3 and proprietary-intel-mkl])],
|
||||||
|
[FFT=$withval]
|
||||||
|
)
|
||||||
|
|
||||||
|
FFT_PKGCONFIG=
|
||||||
|
AS_CASE([$FFT],
|
||||||
|
[kiss], [
|
||||||
|
AC_DEFINE([USE_KISS_FFT], [], [Use KISS Fast Fourier Transform])
|
||||||
|
],
|
||||||
|
[smallft], [
|
||||||
|
AC_DEFINE([USE_SMALLFT], [], [Use FFT from OggVorbis])
|
||||||
|
],
|
||||||
|
[gpl-fftw3], [
|
||||||
|
AC_DEFINE([USE_GPL_FFTW3], [], [Use FFTW3 for FFT])
|
||||||
|
PKG_CHECK_MODULES([FFT], [fftw3f])
|
||||||
|
],
|
||||||
|
[proprietary-intel-mkl], [
|
||||||
|
AC_DEFINE([USE_INTEL_MKL], [], [Use Intel Math Kernel Library for FFT])
|
||||||
|
AC_MSG_CHECKING(for valid MKL)
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <mkl.h>
|
||||||
|
void func() {
|
||||||
|
DFTI_DESCRIPTOR_HANDLE h;
|
||||||
|
MKL_LONG result=DftiCreateDescriptor(&h, DFTI_SINGLE, DFTI_REAL, 0);
|
||||||
|
}]])],
|
||||||
|
[AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_FAILURE([Failed to compile MKL test program. Make sure you set CFLAGS to include the include directory and set LDFLAGS to include the library directory and all necesarry libraries.])]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
[AC_MSG_FAILURE([Unknown FFT $FFT specified for --with-fft])]
|
||||||
|
)
|
||||||
|
AM_CONDITIONAL(BUILD_KISS_FFT, [test "$FFT" = "kiss"])
|
||||||
|
AM_CONDITIONAL(BUILD_SMALLFT, [test "$FFT" = "smallft"])
|
||||||
|
AC_SUBST(FFT_PKGCONFIG)
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF([int16_t])
|
||||||
|
AC_CHECK_SIZEOF([uint16_t])
|
||||||
|
AC_CHECK_SIZEOF([u_int16_t])
|
||||||
|
AC_CHECK_SIZEOF([int32_t])
|
||||||
|
AC_CHECK_SIZEOF([uint32_t])
|
||||||
|
AC_CHECK_SIZEOF([u_int32_t])
|
||||||
|
AC_CHECK_SIZEOF([short])
|
||||||
|
AC_CHECK_SIZEOF([int])
|
||||||
|
AC_CHECK_SIZEOF([long])
|
||||||
|
|
||||||
|
AS_IF([test "$has_char16" = "yes"],
|
||||||
|
[
|
||||||
|
SIZEOF16=1
|
||||||
|
SIZEOF32=2
|
||||||
|
],[
|
||||||
|
SIZEOF16=2
|
||||||
|
SIZEOF32=4
|
||||||
|
])
|
||||||
|
|
||||||
|
case $SIZEOF16 in
|
||||||
|
$ac_cv_sizeof_int16_t) SIZE16="int16_t";;
|
||||||
|
$ac_cv_sizeof_short) SIZE16="short";;
|
||||||
|
$ac_cv_sizeof_int) SIZE16="int";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $SIZEOF16 in
|
||||||
|
$ac_cv_sizeof_uint16_t) USIZE16="uint16_t";;
|
||||||
|
$ac_cv_sizeof_u_int16_t) USIZE16="u_int16_t";;
|
||||||
|
$ac_cv_sizeof_short) USIZE16="unsigned short";;
|
||||||
|
$ac_cv_sizeof_int) USIZE16="unsigned int";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $SIZEOF32 in
|
||||||
|
$ac_cv_sizeof_int32_t) SIZE32="int32_t";;
|
||||||
|
$ac_cv_sizeof_int) SIZE32="int";;
|
||||||
|
$ac_cv_sizeof_long) SIZE32="long";;
|
||||||
|
$ac_cv_sizeof_short) SIZE32="short";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $SIZEOF32 in
|
||||||
|
$ac_cv_sizeof_uint32_t) USIZE32="uint32_t";;
|
||||||
|
$ac_cv_sizeof_u_int32_t) USIZE32="u_int32_t";;
|
||||||
|
$ac_cv_sizeof_short) USIZE32="unsigned short";;
|
||||||
|
$ac_cv_sizeof_int) USIZE32="unsigned int";;
|
||||||
|
$ac_cv_sizeof_long) USIZE32="unsigned long";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AS_IF([test -z "$SIZE16"],[AC_MSG_ERROR([No 16 bit type found on this platform!])])
|
||||||
|
AS_IF([test -z "$SIZE32"],[AC_MSG_ERROR([No 32 bit type found on this platform!])])
|
||||||
|
AS_IF([test -z "$USIZE16"],[AC_MSG_ERROR([No unsigned 16 bit type found on this platform!])])
|
||||||
|
AS_IF([test -z "$USIZE32"],[AC_MSG_ERROR([No unsigned 32 bit type found on this platform!])])
|
||||||
|
|
||||||
|
AC_SUBST([SIZE16])
|
||||||
|
AC_SUBST([USIZE16])
|
||||||
|
AC_SUBST([SIZE32])
|
||||||
|
AC_SUBST([USIZE32])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
Makefile libspeexdsp/Makefile doc/Makefile SpeexDSP.spec
|
||||||
|
include/Makefile include/speex/Makefile speexdsp.pc
|
||||||
|
win32/Makefile win32/libspeexdsp/Makefile
|
||||||
|
symbian/Makefile
|
||||||
|
|
||||||
|
win32/VS2003/Makefile
|
||||||
|
win32/VS2003/libspeexdsp/Makefile
|
||||||
|
win32/VS2003/tests/Makefile
|
||||||
|
|
||||||
|
win32/VS2005/Makefile
|
||||||
|
win32/VS2005/libspeexdsp/Makefile
|
||||||
|
win32/VS2005/tests/Makefile
|
||||||
|
|
||||||
|
win32/VS2008/Makefile
|
||||||
|
win32/VS2008/libspeexdsp/Makefile
|
||||||
|
win32/VS2008/tests/Makefile
|
||||||
|
include/speex/speexdsp_config_types.h ti/Makefile
|
||||||
|
ti/speex_C54_test/Makefile ti/speex_C55_test/Makefile
|
||||||
|
ti/speex_C64_test/Makefile ])
|
||||||
|
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
|
echo "Type \"make; make install\" to compile and install Speex";
|
791
depcomp
Executable file
791
depcomp
Executable file
@ -0,0 +1,791 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2013-05-30.07; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# 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, 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by 'PROGRAMS ARGS'.
|
||||||
|
object Object file output by 'PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputting dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Get the directory component of the given path, and save it in the
|
||||||
|
# global variables '$dir'. Note that this directory component will
|
||||||
|
# be either empty or ending with a '/' character. This is deliberate.
|
||||||
|
set_dir_from ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||||
|
*) dir=;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the suffix-stripped basename of the given path, and save it the
|
||||||
|
# global variable '$base'.
|
||||||
|
set_base_from ()
|
||||||
|
{
|
||||||
|
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no dependency file was actually created by the compiler invocation,
|
||||||
|
# we still have to create a dummy depfile, to avoid errors with the
|
||||||
|
# Makefile "include basename.Plo" scheme.
|
||||||
|
make_dummy_depfile ()
|
||||||
|
{
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Factor out some common post-processing of the generated depfile.
|
||||||
|
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||||
|
aix_post_process_depfile ()
|
||||||
|
{
|
||||||
|
# If the compiler actually managed to produce a dependency file,
|
||||||
|
# post-process it.
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form 'foo.o: dependency.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# $object: dependency.h
|
||||||
|
# and one to simply output
|
||||||
|
# dependency.h:
|
||||||
|
# which is needed to avoid the deleted-header problem.
|
||||||
|
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||||
|
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||||
|
} > "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A tabulation character.
|
||||||
|
tab=' '
|
||||||
|
# A newline character.
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
# Character ranges might be problematic outside the C locale.
|
||||||
|
# These definitions help.
|
||||||
|
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
|
lower=abcdefghijklmnopqrstuvwxyz
|
||||||
|
digits=0123456789
|
||||||
|
alpha=${upper}${lower}
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Avoid interferences from the environment.
|
||||||
|
gccflag= dashmflag=
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = msvc7msys; then
|
||||||
|
# This is just like msvc7 but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvc7
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = xlc; then
|
||||||
|
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||||
|
gccflag=-qmakedep=gcc,-MF
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||||
|
## the command line argument order; so add the flags where they
|
||||||
|
## appear in depend2.am. Note that the slowdown incurred here
|
||||||
|
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||||
|
*) set fnord "$@" "$arg" ;;
|
||||||
|
esac
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
done
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||||
|
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||||
|
## (see the conditional assignment to $gccflag above).
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||||
|
## supported by the other compilers which use the 'gcc' depmode.
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The second -e expression handles DOS-style file names with drive
|
||||||
|
# letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the "deleted header file" problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
## Some versions of gcc put a space before the ':'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||||
|
## to the object. Take care to not repeat it in the output.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||||
|
| tr "$nl" ' ' >> "$depfile"
|
||||||
|
echo >> "$depfile"
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
xlc)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
tcc)
|
||||||
|
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||||
|
# FIXME: That version still under development at the moment of writing.
|
||||||
|
# Make that this statement remains true also for stable, released
|
||||||
|
# versions.
|
||||||
|
# It will wrap lines (doesn't matter whether long or short) with a
|
||||||
|
# trailing '\', as in:
|
||||||
|
#
|
||||||
|
# foo.o : \
|
||||||
|
# foo.c \
|
||||||
|
# foo.h \
|
||||||
|
#
|
||||||
|
# It will put a trailing '\' even on the last line, and will use leading
|
||||||
|
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||||
|
# "Emit spaces for -MD").
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||||
|
# We have to change lines of the first kind to '$object: \'.
|
||||||
|
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||||
|
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||||
|
# dummy dependency, to avoid the deleted-header problem.
|
||||||
|
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
## The order of this option in the case statement is important, since the
|
||||||
|
## shell code in configure will try each of these formats in the order
|
||||||
|
## listed in this file. A plain '-MD' option would be understood by many
|
||||||
|
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||||
|
pgcc)
|
||||||
|
# Portland's C compiler understands '-MD'.
|
||||||
|
# Will always output deps to 'file.d' where file is the root name of the
|
||||||
|
# source file under compilation, even if file resides in a subdirectory.
|
||||||
|
# The object file name does not affect the name of the '.d' file.
|
||||||
|
# pgcc 10.2 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using '\' :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
set_dir_from "$object"
|
||||||
|
# Use the source, not the object, to determine the base name, since
|
||||||
|
# that's sadly what pgcc will do too.
|
||||||
|
set_base_from "$source"
|
||||||
|
tmpdepfile=$base.d
|
||||||
|
|
||||||
|
# For projects that build the same source file twice into different object
|
||||||
|
# files, the pgcc approach of using the *source* file root name can cause
|
||||||
|
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||||
|
# the same $tmpdepfile.
|
||||||
|
lockdir=$base.d-lock
|
||||||
|
trap "
|
||||||
|
echo '$0: caught signal, cleaning up...' >&2
|
||||||
|
rmdir '$lockdir'
|
||||||
|
exit 1
|
||||||
|
" 1 2 13 15
|
||||||
|
numtries=100
|
||||||
|
i=$numtries
|
||||||
|
while test $i -gt 0; do
|
||||||
|
# mkdir is a portable test-and-set.
|
||||||
|
if mkdir "$lockdir" 2>/dev/null; then
|
||||||
|
# This process acquired the lock.
|
||||||
|
"$@" -MD
|
||||||
|
stat=$?
|
||||||
|
# Release the lock.
|
||||||
|
rmdir "$lockdir"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
# If the lock is being held by a different process, wait
|
||||||
|
# until the winning process is done or we timeout.
|
||||||
|
while test -d "$lockdir" && test $i -gt 0; do
|
||||||
|
sleep 1
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
trap - 1 2 13 15
|
||||||
|
if test $i -le 0; then
|
||||||
|
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||||
|
echo "$0: check lockdir '$lockdir'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp2)
|
||||||
|
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||||
|
# compilers, which have integrated preprocessors. The correct option
|
||||||
|
# to use with these is +Maked; it writes dependencies to a file named
|
||||||
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
|
# happens to be.
|
||||||
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
"$@" -Wc,+Maked
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
"$@" +Maked
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
|
# Add 'dependent.h:' lines.
|
||||||
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in 'foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||||
|
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||||
|
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
# Same post-processing that is required for AIX mode.
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
showIncludes=-Wc,-showIncludes
|
||||||
|
else
|
||||||
|
showIncludes=-showIncludes
|
||||||
|
fi
|
||||||
|
"$@" $showIncludes > "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The first sed program below extracts the file names and escapes
|
||||||
|
# backslashes for cygpath. The second sed program outputs the file
|
||||||
|
# name when reading, but also accumulates all include files in the
|
||||||
|
# hold buffer in order to output them again at the end. This only
|
||||||
|
# works with sed implementations that can handle large buffers.
|
||||||
|
sed < "$tmpdepfile" -n '
|
||||||
|
/^Note: including file: *\(.*\)/ {
|
||||||
|
s//\1/
|
||||||
|
s/\\/\\\\/g
|
||||||
|
p
|
||||||
|
}' | $cygpath_u | sort -u | sed -n '
|
||||||
|
s/ /\\ /g
|
||||||
|
s/\(.*\)/'"$tab"'\1 \\/p
|
||||||
|
s/.\(.*\) \\/\1:/
|
||||||
|
H
|
||||||
|
$ {
|
||||||
|
s/.*/'"$tab"'/
|
||||||
|
G
|
||||||
|
p
|
||||||
|
}' >> "$depfile"
|
||||||
|
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7msys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for ':'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no eat=no
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
# makedepend may prepend the VPATH from the source file name to the object.
|
||||||
|
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||||
|
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed '1,2d' "$tmpdepfile" \
|
||||||
|
| tr ' ' "$nl" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E \
|
||||||
|
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E 2>/dev/null |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||||
|
echo "$tab" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
3
doc/Makefile.am
Normal file
3
doc/Makefile.am
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
doc_DATA = manual.pdf
|
||||||
|
|
||||||
|
EXTRA_DIST = $(doc_DATA)
|
495
doc/Makefile.in
Normal file
495
doc/Makefile.in
Normal file
@ -0,0 +1,495 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = doc
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(docdir)"
|
||||||
|
DATA = $(doc_DATA)
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
doc_DATA = manual.pdf
|
||||||
|
EXTRA_DIST = $(doc_DATA)
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign doc/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
install-docDATA: $(doc_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-docDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
|
||||||
|
tags TAGS:
|
||||||
|
|
||||||
|
ctags CTAGS:
|
||||||
|
|
||||||
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(DATA)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(docdir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-docDATA
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-docDATA
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
cscopelist-am ctags-am distclean distclean-generic \
|
||||||
|
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am \
|
||||||
|
install-docDATA install-dvi install-dvi-am install-exec \
|
||||||
|
install-exec-am install-html install-html-am install-info \
|
||||||
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
|
install-ps install-ps-am install-strip installcheck \
|
||||||
|
installcheck-am installdirs maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||||
|
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
||||||
|
uninstall-am uninstall-docDATA
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
BIN
doc/manual.pdf
Normal file
BIN
doc/manual.pdf
Normal file
Binary file not shown.
2
include/Makefile.am
Normal file
2
include/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
SUBDIRS = speex
|
619
include/Makefile.in
Normal file
619
include/Makefile.in
Normal file
@ -0,0 +1,619 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = include
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||||
|
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||||
|
install-data-recursive install-dvi-recursive \
|
||||||
|
install-exec-recursive install-html-recursive \
|
||||||
|
install-info-recursive install-pdf-recursive \
|
||||||
|
install-ps-recursive install-recursive installcheck-recursive \
|
||||||
|
installdirs-recursive pdf-recursive ps-recursive \
|
||||||
|
tags-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
am__recursive_targets = \
|
||||||
|
$(RECURSIVE_TARGETS) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
|
$(am__extra_recursive_targets)
|
||||||
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
|
distdir
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
SUBDIRS = speex
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign include/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run 'make' without going through this Makefile.
|
||||||
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
|
$(am__recursive_targets):
|
||||||
|
@fail=; \
|
||||||
|
if $(am__make_keepgoing); then \
|
||||||
|
failcom='fail=yes'; \
|
||||||
|
else \
|
||||||
|
failcom='exit 1'; \
|
||||||
|
fi; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-recursive
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-recursive
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscopelist: cscopelist-recursive
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||||
|
check-am clean clean-generic clean-libtool cscopelist-am ctags \
|
||||||
|
ctags-am distclean distclean-generic distclean-libtool \
|
||||||
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am tags tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
18
include/speex/Makefile.am
Normal file
18
include/speex/Makefile.am
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
# Historically, these headers were part of the speex package, so in order to
|
||||||
|
# keep compatibility with existing software we need to keep installing them
|
||||||
|
# in the same place as they were found then. If new functionality, with new
|
||||||
|
# headers, are added later, some thought should be given as to whether they
|
||||||
|
# should instead go somewhere other than $prefix/include/speex.
|
||||||
|
|
||||||
|
speexincludedir = $(includedir)/speex
|
||||||
|
|
||||||
|
nodist_speexinclude_HEADERS = speexdsp_config_types.h
|
||||||
|
|
||||||
|
speexinclude_HEADERS = speex_echo.h speex_jitter.h speex_preprocess.h speex_resampler.h \
|
||||||
|
speexdsp_types.h
|
||||||
|
|
||||||
|
noinst_HEADERS=speex_buffer.h
|
||||||
|
|
604
include/speex/Makefile.in
Normal file
604
include/speex/Makefile.in
Normal file
@ -0,0 +1,604 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
# Historically, these headers were part of the speex package, so in order to
|
||||||
|
# keep compatibility with existing software we need to keep installing them
|
||||||
|
# in the same place as they were found then. If new functionality, with new
|
||||||
|
# headers, are added later, some thought should be given as to whether they
|
||||||
|
# should instead go somewhere other than $prefix/include/speex.
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = include/speex
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/speexdsp_config_types.h.in $(noinst_HEADERS) \
|
||||||
|
$(speexinclude_HEADERS)
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES = speexdsp_config_types.h
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(speexincludedir)" \
|
||||||
|
"$(DESTDIR)$(speexincludedir)"
|
||||||
|
HEADERS = $(nodist_speexinclude_HEADERS) $(noinst_HEADERS) \
|
||||||
|
$(speexinclude_HEADERS)
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
speexincludedir = $(includedir)/speex
|
||||||
|
nodist_speexinclude_HEADERS = speexdsp_config_types.h
|
||||||
|
speexinclude_HEADERS = speex_echo.h speex_jitter.h speex_preprocess.h speex_resampler.h \
|
||||||
|
speexdsp_types.h
|
||||||
|
|
||||||
|
noinst_HEADERS = speex_buffer.h
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/speex/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign include/speex/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
speexdsp_config_types.h: $(top_builddir)/config.status $(srcdir)/speexdsp_config_types.h.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
install-nodist_speexincludeHEADERS: $(nodist_speexinclude_HEADERS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(nodist_speexinclude_HEADERS)'; test -n "$(speexincludedir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(speexincludedir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(speexincludedir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(speexincludedir)'"; \
|
||||||
|
$(INSTALL_HEADER) $$files "$(DESTDIR)$(speexincludedir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-nodist_speexincludeHEADERS:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(nodist_speexinclude_HEADERS)'; test -n "$(speexincludedir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
dir='$(DESTDIR)$(speexincludedir)'; $(am__uninstall_files_from_dir)
|
||||||
|
install-speexincludeHEADERS: $(speexinclude_HEADERS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(speexinclude_HEADERS)'; test -n "$(speexincludedir)" || list=; \
|
||||||
|
if test -n "$$list"; then \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(speexincludedir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(speexincludedir)" || exit 1; \
|
||||||
|
fi; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(speexincludedir)'"; \
|
||||||
|
$(INSTALL_HEADER) $$files "$(DESTDIR)$(speexincludedir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-speexincludeHEADERS:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(speexinclude_HEADERS)'; test -n "$(speexincludedir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
dir='$(DESTDIR)$(speexincludedir)'; $(am__uninstall_files_from_dir)
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-am
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-am
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscopelist: cscopelist-am
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(HEADERS)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(speexincludedir)" "$(DESTDIR)$(speexincludedir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-nodist_speexincludeHEADERS \
|
||||||
|
install-speexincludeHEADERS
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-nodist_speexincludeHEADERS \
|
||||||
|
uninstall-speexincludeHEADERS
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||||
|
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||||
|
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-dvi install-dvi-am \
|
||||||
|
install-exec install-exec-am install-html install-html-am \
|
||||||
|
install-info install-info-am install-man \
|
||||||
|
install-nodist_speexincludeHEADERS install-pdf install-pdf-am \
|
||||||
|
install-ps install-ps-am install-speexincludeHEADERS \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags tags-am uninstall uninstall-am \
|
||||||
|
uninstall-nodist_speexincludeHEADERS \
|
||||||
|
uninstall-speexincludeHEADERS
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
68
include/speex/speex_buffer.h
Normal file
68
include/speex/speex_buffer.h
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/* Copyright (C) 2007 Jean-Marc Valin
|
||||||
|
|
||||||
|
File: speex_buffer.h
|
||||||
|
This is a very simple ring buffer implementation. It is not thread-safe
|
||||||
|
so you need to do your own locking.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SPEEX_BUFFER_H
|
||||||
|
#define SPEEX_BUFFER_H
|
||||||
|
|
||||||
|
#include "speexdsp_types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct SpeexBuffer_;
|
||||||
|
typedef struct SpeexBuffer_ SpeexBuffer;
|
||||||
|
|
||||||
|
SpeexBuffer *speex_buffer_init(int size);
|
||||||
|
|
||||||
|
void speex_buffer_destroy(SpeexBuffer *st);
|
||||||
|
|
||||||
|
int speex_buffer_write(SpeexBuffer *st, void *data, int len);
|
||||||
|
|
||||||
|
int speex_buffer_writezeros(SpeexBuffer *st, int len);
|
||||||
|
|
||||||
|
int speex_buffer_read(SpeexBuffer *st, void *data, int len);
|
||||||
|
|
||||||
|
int speex_buffer_get_available(SpeexBuffer *st);
|
||||||
|
|
||||||
|
int speex_buffer_resize(SpeexBuffer *st, int len);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
170
include/speex/speex_echo.h
Normal file
170
include/speex/speex_echo.h
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
/* Copyright (C) Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file speex_echo.h
|
||||||
|
@brief Echo cancellation
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SPEEX_ECHO_H
|
||||||
|
#define SPEEX_ECHO_H
|
||||||
|
/** @defgroup SpeexEchoState SpeexEchoState: Acoustic echo canceller
|
||||||
|
* This is the acoustic echo canceller module.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#include "speexdsp_types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Obtain frame size used by the AEC */
|
||||||
|
#define SPEEX_ECHO_GET_FRAME_SIZE 3
|
||||||
|
|
||||||
|
/** Set sampling rate */
|
||||||
|
#define SPEEX_ECHO_SET_SAMPLING_RATE 24
|
||||||
|
/** Get sampling rate */
|
||||||
|
#define SPEEX_ECHO_GET_SAMPLING_RATE 25
|
||||||
|
|
||||||
|
/* Can't set window sizes */
|
||||||
|
/** Get size of impulse response (int32) */
|
||||||
|
#define SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE 27
|
||||||
|
|
||||||
|
/* Can't set window content */
|
||||||
|
/** Get impulse response (int32[]) */
|
||||||
|
#define SPEEX_ECHO_GET_IMPULSE_RESPONSE 29
|
||||||
|
|
||||||
|
/** Internal echo canceller state. Should never be accessed directly. */
|
||||||
|
struct SpeexEchoState_;
|
||||||
|
|
||||||
|
/** @class SpeexEchoState
|
||||||
|
* This holds the state of the echo canceller. You need one per channel.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Internal echo canceller state. Should never be accessed directly. */
|
||||||
|
typedef struct SpeexEchoState_ SpeexEchoState;
|
||||||
|
|
||||||
|
/** Creates a new echo canceller state
|
||||||
|
* @param frame_size Number of samples to process at one time (should correspond to 10-20 ms)
|
||||||
|
* @param filter_length Number of samples of echo to cancel (should generally correspond to 100-500 ms)
|
||||||
|
* @return Newly-created echo canceller state
|
||||||
|
*/
|
||||||
|
SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);
|
||||||
|
|
||||||
|
/** Creates a new multi-channel echo canceller state
|
||||||
|
* @param frame_size Number of samples to process at one time (should correspond to 10-20 ms)
|
||||||
|
* @param filter_length Number of samples of echo to cancel (should generally correspond to 100-500 ms)
|
||||||
|
* @param nb_mic Number of microphone channels
|
||||||
|
* @param nb_speakers Number of speaker channels
|
||||||
|
* @return Newly-created echo canceller state
|
||||||
|
*/
|
||||||
|
SpeexEchoState *speex_echo_state_init_mc(int frame_size, int filter_length, int nb_mic, int nb_speakers);
|
||||||
|
|
||||||
|
/** Destroys an echo canceller state
|
||||||
|
* @param st Echo canceller state
|
||||||
|
*/
|
||||||
|
void speex_echo_state_destroy(SpeexEchoState *st);
|
||||||
|
|
||||||
|
/** Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added
|
||||||
|
* to playback in this form)
|
||||||
|
*
|
||||||
|
* @param st Echo canceller state
|
||||||
|
* @param rec Signal from the microphone (near end + far end echo)
|
||||||
|
* @param play Signal played to the speaker (received from far end)
|
||||||
|
* @param out Returns near-end signal with echo removed
|
||||||
|
*/
|
||||||
|
void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out);
|
||||||
|
|
||||||
|
/** Performs echo cancellation a frame (deprecated) */
|
||||||
|
void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout);
|
||||||
|
|
||||||
|
/** Perform echo cancellation using internal playback buffer, which is delayed by two frames
|
||||||
|
* to account for the delay introduced by most soundcards (but it could be off!)
|
||||||
|
* @param st Echo canceller state
|
||||||
|
* @param rec Signal from the microphone (near end + far end echo)
|
||||||
|
* @param out Returns near-end signal with echo removed
|
||||||
|
*/
|
||||||
|
void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out);
|
||||||
|
|
||||||
|
/** Let the echo canceller know that a frame was just queued to the soundcard
|
||||||
|
* @param st Echo canceller state
|
||||||
|
* @param play Signal played to the speaker (received from far end)
|
||||||
|
*/
|
||||||
|
void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play);
|
||||||
|
|
||||||
|
/** Reset the echo canceller to its original state
|
||||||
|
* @param st Echo canceller state
|
||||||
|
*/
|
||||||
|
void speex_echo_state_reset(SpeexEchoState *st);
|
||||||
|
|
||||||
|
/** Used like the ioctl function to control the echo canceller parameters
|
||||||
|
*
|
||||||
|
* @param st Echo canceller state
|
||||||
|
* @param request ioctl-type request (one of the SPEEX_ECHO_* macros)
|
||||||
|
* @param ptr Data exchanged to-from function
|
||||||
|
* @return 0 if no error, -1 if request in unknown
|
||||||
|
*/
|
||||||
|
int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct SpeexDecorrState_;
|
||||||
|
|
||||||
|
typedef struct SpeexDecorrState_ SpeexDecorrState;
|
||||||
|
|
||||||
|
|
||||||
|
/** Create a state for the channel decorrelation algorithm
|
||||||
|
This is useful for multi-channel echo cancellation only
|
||||||
|
* @param rate Sampling rate
|
||||||
|
* @param channels Number of channels (it's a bit pointless if you don't have at least 2)
|
||||||
|
* @param frame_size Size of the frame to process at ones (counting samples *per* channel)
|
||||||
|
*/
|
||||||
|
SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size);
|
||||||
|
|
||||||
|
/** Remove correlation between the channels by modifying the phase and possibly
|
||||||
|
adding noise in a way that is not (or little) perceptible.
|
||||||
|
* @param st Decorrelator state
|
||||||
|
* @param in Input audio in interleaved format
|
||||||
|
* @param out Result of the decorrelation (out *may* alias in)
|
||||||
|
* @param strength How much alteration of the audio to apply from 0 to 100.
|
||||||
|
*/
|
||||||
|
void speex_decorrelate(SpeexDecorrState *st, const spx_int16_t *in, spx_int16_t *out, int strength);
|
||||||
|
|
||||||
|
/** Destroy a Decorrelation state
|
||||||
|
* @param st State to destroy
|
||||||
|
*/
|
||||||
|
void speex_decorrelate_destroy(SpeexDecorrState *st);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** @}*/
|
||||||
|
#endif
|
197
include/speex/speex_jitter.h
Normal file
197
include/speex/speex_jitter.h
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file speex_jitter.h
|
||||||
|
@brief Adaptive jitter buffer for Speex
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SPEEX_JITTER_H
|
||||||
|
#define SPEEX_JITTER_H
|
||||||
|
/** @defgroup JitterBuffer JitterBuffer: Adaptive jitter buffer
|
||||||
|
* This is the jitter buffer that reorders UDP/RTP packets and adjusts the buffer size
|
||||||
|
* to maintain good quality and low latency.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "speexdsp_types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Generic adaptive jitter buffer state */
|
||||||
|
struct JitterBuffer_;
|
||||||
|
|
||||||
|
/** Generic adaptive jitter buffer state */
|
||||||
|
typedef struct JitterBuffer_ JitterBuffer;
|
||||||
|
|
||||||
|
/** Definition of an incoming packet */
|
||||||
|
typedef struct _JitterBufferPacket JitterBufferPacket;
|
||||||
|
|
||||||
|
/** Definition of an incoming packet */
|
||||||
|
struct _JitterBufferPacket {
|
||||||
|
char *data; /**< Data bytes contained in the packet */
|
||||||
|
spx_uint32_t len; /**< Length of the packet in bytes */
|
||||||
|
spx_uint32_t timestamp; /**< Timestamp for the packet */
|
||||||
|
spx_uint32_t span; /**< Time covered by the packet (same units as timestamp) */
|
||||||
|
spx_uint16_t sequence; /**< RTP Sequence number if available (0 otherwise) */
|
||||||
|
spx_uint32_t user_data; /**< Put whatever data you like here (it's ignored by the jitter buffer) */
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Packet has been retrieved */
|
||||||
|
#define JITTER_BUFFER_OK 0
|
||||||
|
/** Packet is lost or is late */
|
||||||
|
#define JITTER_BUFFER_MISSING 1
|
||||||
|
/** A "fake" packet is meant to be inserted here to increase buffering */
|
||||||
|
#define JITTER_BUFFER_INSERTION 2
|
||||||
|
/** There was an error in the jitter buffer */
|
||||||
|
#define JITTER_BUFFER_INTERNAL_ERROR -1
|
||||||
|
/** Invalid argument */
|
||||||
|
#define JITTER_BUFFER_BAD_ARGUMENT -2
|
||||||
|
|
||||||
|
|
||||||
|
/** Set minimum amount of extra buffering required (margin) */
|
||||||
|
#define JITTER_BUFFER_SET_MARGIN 0
|
||||||
|
/** Get minimum amount of extra buffering required (margin) */
|
||||||
|
#define JITTER_BUFFER_GET_MARGIN 1
|
||||||
|
/* JITTER_BUFFER_SET_AVAILABLE_COUNT wouldn't make sense */
|
||||||
|
|
||||||
|
/** Get the amount of available packets currently buffered */
|
||||||
|
#define JITTER_BUFFER_GET_AVAILABLE_COUNT 3
|
||||||
|
/** Included because of an early misspelling (will remove in next release) */
|
||||||
|
#define JITTER_BUFFER_GET_AVALIABLE_COUNT 3
|
||||||
|
|
||||||
|
/** Assign a function to destroy unused packet. When setting that, the jitter
|
||||||
|
buffer no longer copies packet data. */
|
||||||
|
#define JITTER_BUFFER_SET_DESTROY_CALLBACK 4
|
||||||
|
/** */
|
||||||
|
#define JITTER_BUFFER_GET_DESTROY_CALLBACK 5
|
||||||
|
|
||||||
|
/** Tell the jitter buffer to only adjust the delay in multiples of the step parameter provided */
|
||||||
|
#define JITTER_BUFFER_SET_DELAY_STEP 6
|
||||||
|
/** */
|
||||||
|
#define JITTER_BUFFER_GET_DELAY_STEP 7
|
||||||
|
|
||||||
|
/** Tell the jitter buffer to only do concealment in multiples of the size parameter provided */
|
||||||
|
#define JITTER_BUFFER_SET_CONCEALMENT_SIZE 8
|
||||||
|
#define JITTER_BUFFER_GET_CONCEALMENT_SIZE 9
|
||||||
|
|
||||||
|
/** Absolute max amount of loss that can be tolerated regardless of the delay. Typical loss
|
||||||
|
should be half of that or less. */
|
||||||
|
#define JITTER_BUFFER_SET_MAX_LATE_RATE 10
|
||||||
|
#define JITTER_BUFFER_GET_MAX_LATE_RATE 11
|
||||||
|
|
||||||
|
/** Equivalent cost of one percent late packet in timestamp units */
|
||||||
|
#define JITTER_BUFFER_SET_LATE_COST 12
|
||||||
|
#define JITTER_BUFFER_GET_LATE_COST 13
|
||||||
|
|
||||||
|
|
||||||
|
/** Initialises jitter buffer
|
||||||
|
*
|
||||||
|
* @param step_size Starting value for the size of concleanment packets and delay
|
||||||
|
adjustment steps. Can be changed at any time using JITTER_BUFFER_SET_DELAY_STEP
|
||||||
|
and JITTER_BUFFER_GET_CONCEALMENT_SIZE.
|
||||||
|
* @return Newly created jitter buffer state
|
||||||
|
*/
|
||||||
|
JitterBuffer *jitter_buffer_init(int step_size);
|
||||||
|
|
||||||
|
/** Restores jitter buffer to its original state
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
*/
|
||||||
|
void jitter_buffer_reset(JitterBuffer *jitter);
|
||||||
|
|
||||||
|
/** Destroys jitter buffer
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
*/
|
||||||
|
void jitter_buffer_destroy(JitterBuffer *jitter);
|
||||||
|
|
||||||
|
/** Put one packet into the jitter buffer
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
* @param packet Incoming packet
|
||||||
|
*/
|
||||||
|
void jitter_buffer_put(JitterBuffer *jitter, const JitterBufferPacket *packet);
|
||||||
|
|
||||||
|
/** Get one packet from the jitter buffer
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
* @param packet Returned packet
|
||||||
|
* @param desired_span Number of samples (or units) we wish to get from the buffer (no guarantee)
|
||||||
|
* @param current_timestamp Timestamp for the returned packet
|
||||||
|
*/
|
||||||
|
int jitter_buffer_get(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t desired_span, spx_int32_t *start_offset);
|
||||||
|
|
||||||
|
/** Used right after jitter_buffer_get() to obtain another packet that would have the same timestamp.
|
||||||
|
* This is mainly useful for media where a single "frame" can be split into several packets.
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
* @param packet Returned packet
|
||||||
|
*/
|
||||||
|
int jitter_buffer_get_another(JitterBuffer *jitter, JitterBufferPacket *packet);
|
||||||
|
|
||||||
|
/** Get pointer timestamp of jitter buffer
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
*/
|
||||||
|
int jitter_buffer_get_pointer_timestamp(JitterBuffer *jitter);
|
||||||
|
|
||||||
|
/** Advance by one tick
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
*/
|
||||||
|
void jitter_buffer_tick(JitterBuffer *jitter);
|
||||||
|
|
||||||
|
/** Telling the jitter buffer about the remaining data in the application buffer
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
* @param rem Amount of data buffered by the application (timestamp units)
|
||||||
|
*/
|
||||||
|
void jitter_buffer_remaining_span(JitterBuffer *jitter, spx_uint32_t rem);
|
||||||
|
|
||||||
|
/** Used like the ioctl function to control the jitter buffer parameters
|
||||||
|
*
|
||||||
|
* @param jitter Jitter buffer state
|
||||||
|
* @param request ioctl-type request (one of the JITTER_BUFFER_* macros)
|
||||||
|
* @param ptr Data exchanged to-from function
|
||||||
|
* @return 0 if no error, -1 if request in unknown
|
||||||
|
*/
|
||||||
|
int jitter_buffer_ctl(JitterBuffer *jitter, int request, void *ptr);
|
||||||
|
|
||||||
|
int jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t *start_offset);
|
||||||
|
|
||||||
|
/* @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
219
include/speex/speex_preprocess.h
Normal file
219
include/speex/speex_preprocess.h
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
/* Copyright (C) 2003 Epic Games
|
||||||
|
Written by Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
* @file speex_preprocess.h
|
||||||
|
* @brief Speex preprocessor. The preprocess can do noise suppression,
|
||||||
|
* residual echo suppression (after using the echo canceller), automatic
|
||||||
|
* gain control (AGC) and voice activity detection (VAD).
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SPEEX_PREPROCESS_H
|
||||||
|
#define SPEEX_PREPROCESS_H
|
||||||
|
/** @defgroup SpeexPreprocessState SpeexPreprocessState: The Speex preprocessor
|
||||||
|
* This is the Speex preprocessor. The preprocess can do noise suppression,
|
||||||
|
* residual echo suppression (after using the echo canceller), automatic
|
||||||
|
* gain control (AGC) and voice activity detection (VAD).
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "speexdsp_types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** State of the preprocessor (one per channel). Should never be accessed directly. */
|
||||||
|
struct SpeexPreprocessState_;
|
||||||
|
|
||||||
|
/** State of the preprocessor (one per channel). Should never be accessed directly. */
|
||||||
|
typedef struct SpeexPreprocessState_ SpeexPreprocessState;
|
||||||
|
|
||||||
|
|
||||||
|
/** Creates a new preprocessing state. You MUST create one state per channel processed.
|
||||||
|
* @param frame_size Number of samples to process at one time (should correspond to 10-20 ms). Must be
|
||||||
|
* the same value as that used for the echo canceller for residual echo cancellation to work.
|
||||||
|
* @param sampling_rate Sampling rate used for the input.
|
||||||
|
* @return Newly created preprocessor state
|
||||||
|
*/
|
||||||
|
SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate);
|
||||||
|
|
||||||
|
/** Destroys a preprocessor state
|
||||||
|
* @param st Preprocessor state to destroy
|
||||||
|
*/
|
||||||
|
void speex_preprocess_state_destroy(SpeexPreprocessState *st);
|
||||||
|
|
||||||
|
/** Preprocess a frame
|
||||||
|
* @param st Preprocessor state
|
||||||
|
* @param x Audio sample vector (in and out). Must be same size as specified in speex_preprocess_state_init().
|
||||||
|
* @return Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on.
|
||||||
|
*/
|
||||||
|
int speex_preprocess_run(SpeexPreprocessState *st, spx_int16_t *x);
|
||||||
|
|
||||||
|
/** Preprocess a frame (deprecated, use speex_preprocess_run() instead)*/
|
||||||
|
int speex_preprocess(SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo);
|
||||||
|
|
||||||
|
/** Update preprocessor state, but do not compute the output
|
||||||
|
* @param st Preprocessor state
|
||||||
|
* @param x Audio sample vector (in only). Must be same size as specified in speex_preprocess_state_init().
|
||||||
|
*/
|
||||||
|
void speex_preprocess_estimate_update(SpeexPreprocessState *st, spx_int16_t *x);
|
||||||
|
|
||||||
|
/** Used like the ioctl function to control the preprocessor parameters
|
||||||
|
* @param st Preprocessor state
|
||||||
|
* @param request ioctl-type request (one of the SPEEX_PREPROCESS_* macros)
|
||||||
|
* @param ptr Data exchanged to-from function
|
||||||
|
* @return 0 if no error, -1 if request in unknown
|
||||||
|
*/
|
||||||
|
int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Set preprocessor denoiser state */
|
||||||
|
#define SPEEX_PREPROCESS_SET_DENOISE 0
|
||||||
|
/** Get preprocessor denoiser state */
|
||||||
|
#define SPEEX_PREPROCESS_GET_DENOISE 1
|
||||||
|
|
||||||
|
/** Set preprocessor Automatic Gain Control state */
|
||||||
|
#define SPEEX_PREPROCESS_SET_AGC 2
|
||||||
|
/** Get preprocessor Automatic Gain Control state */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC 3
|
||||||
|
|
||||||
|
/** Set preprocessor Voice Activity Detection state */
|
||||||
|
#define SPEEX_PREPROCESS_SET_VAD 4
|
||||||
|
/** Get preprocessor Voice Activity Detection state */
|
||||||
|
#define SPEEX_PREPROCESS_GET_VAD 5
|
||||||
|
|
||||||
|
/** Set preprocessor Automatic Gain Control level (float) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_AGC_LEVEL 6
|
||||||
|
/** Get preprocessor Automatic Gain Control level (float) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_LEVEL 7
|
||||||
|
|
||||||
|
/** Set preprocessor dereverb state */
|
||||||
|
#define SPEEX_PREPROCESS_SET_DEREVERB 8
|
||||||
|
/** Get preprocessor dereverb state */
|
||||||
|
#define SPEEX_PREPROCESS_GET_DEREVERB 9
|
||||||
|
|
||||||
|
/** Set preprocessor dereverb level */
|
||||||
|
#define SPEEX_PREPROCESS_SET_DEREVERB_LEVEL 10
|
||||||
|
/** Get preprocessor dereverb level */
|
||||||
|
#define SPEEX_PREPROCESS_GET_DEREVERB_LEVEL 11
|
||||||
|
|
||||||
|
/** Set preprocessor dereverb decay */
|
||||||
|
#define SPEEX_PREPROCESS_SET_DEREVERB_DECAY 12
|
||||||
|
/** Get preprocessor dereverb decay */
|
||||||
|
#define SPEEX_PREPROCESS_GET_DEREVERB_DECAY 13
|
||||||
|
|
||||||
|
/** Set probability required for the VAD to go from silence to voice */
|
||||||
|
#define SPEEX_PREPROCESS_SET_PROB_START 14
|
||||||
|
/** Get probability required for the VAD to go from silence to voice */
|
||||||
|
#define SPEEX_PREPROCESS_GET_PROB_START 15
|
||||||
|
|
||||||
|
/** Set probability required for the VAD to stay in the voice state (integer percent) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_PROB_CONTINUE 16
|
||||||
|
/** Get probability required for the VAD to stay in the voice state (integer percent) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_PROB_CONTINUE 17
|
||||||
|
|
||||||
|
/** Set maximum attenuation of the noise in dB (negative number) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_NOISE_SUPPRESS 18
|
||||||
|
/** Get maximum attenuation of the noise in dB (negative number) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_NOISE_SUPPRESS 19
|
||||||
|
|
||||||
|
/** Set maximum attenuation of the residual echo in dB (negative number) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS 20
|
||||||
|
/** Get maximum attenuation of the residual echo in dB (negative number) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS 21
|
||||||
|
|
||||||
|
/** Set maximum attenuation of the residual echo in dB when near end is active (negative number) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE 22
|
||||||
|
/** Get maximum attenuation of the residual echo in dB when near end is active (negative number) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS_ACTIVE 23
|
||||||
|
|
||||||
|
/** Set the corresponding echo canceller state so that residual echo suppression can be performed (NULL for no residual echo suppression) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_ECHO_STATE 24
|
||||||
|
/** Get the corresponding echo canceller state */
|
||||||
|
#define SPEEX_PREPROCESS_GET_ECHO_STATE 25
|
||||||
|
|
||||||
|
/** Set maximal gain increase in dB/second (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_AGC_INCREMENT 26
|
||||||
|
|
||||||
|
/** Get maximal gain increase in dB/second (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_INCREMENT 27
|
||||||
|
|
||||||
|
/** Set maximal gain decrease in dB/second (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_AGC_DECREMENT 28
|
||||||
|
|
||||||
|
/** Get maximal gain decrease in dB/second (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_DECREMENT 29
|
||||||
|
|
||||||
|
/** Set maximal gain in dB (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_AGC_MAX_GAIN 30
|
||||||
|
|
||||||
|
/** Get maximal gain in dB (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_MAX_GAIN 31
|
||||||
|
|
||||||
|
/* Can't set loudness */
|
||||||
|
/** Get loudness */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_LOUDNESS 33
|
||||||
|
|
||||||
|
/* Can't set gain */
|
||||||
|
/** Get current gain (int32 percent) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_GAIN 35
|
||||||
|
|
||||||
|
/* Can't set spectrum size */
|
||||||
|
/** Get spectrum size for power spectrum (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_PSD_SIZE 37
|
||||||
|
|
||||||
|
/* Can't set power spectrum */
|
||||||
|
/** Get power spectrum (int32[] of squared values) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_PSD 39
|
||||||
|
|
||||||
|
/* Can't set noise size */
|
||||||
|
/** Get spectrum size for noise estimate (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_NOISE_PSD_SIZE 41
|
||||||
|
|
||||||
|
/* Can't set noise estimate */
|
||||||
|
/** Get noise estimate (int32[] of squared values) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_NOISE_PSD 43
|
||||||
|
|
||||||
|
/* Can't set speech probability */
|
||||||
|
/** Get speech probability in last frame (int32). */
|
||||||
|
#define SPEEX_PREPROCESS_GET_PROB 45
|
||||||
|
|
||||||
|
/** Set preprocessor Automatic Gain Control level (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_SET_AGC_TARGET 46
|
||||||
|
/** Get preprocessor Automatic Gain Control level (int32) */
|
||||||
|
#define SPEEX_PREPROCESS_GET_AGC_TARGET 47
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @}*/
|
||||||
|
#endif
|
340
include/speex/speex_resampler.h
Normal file
340
include/speex/speex_resampler.h
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
/* Copyright (C) 2007 Jean-Marc Valin
|
||||||
|
|
||||||
|
File: speex_resampler.h
|
||||||
|
Resampling code
|
||||||
|
|
||||||
|
The design goals of this code are:
|
||||||
|
- Very fast algorithm
|
||||||
|
- Low memory requirement
|
||||||
|
- Good *perceptual* quality (and not best SNR)
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef SPEEX_RESAMPLER_H
|
||||||
|
#define SPEEX_RESAMPLER_H
|
||||||
|
|
||||||
|
#ifdef OUTSIDE_SPEEX
|
||||||
|
|
||||||
|
/********* WARNING: MENTAL SANITY ENDS HERE *************/
|
||||||
|
|
||||||
|
/* If the resampler is defined outside of Speex, we change the symbol names so that
|
||||||
|
there won't be any clash if linking with Speex later on. */
|
||||||
|
|
||||||
|
/* #define RANDOM_PREFIX your software name here */
|
||||||
|
#ifndef RANDOM_PREFIX
|
||||||
|
#error "Please define RANDOM_PREFIX (above) to something specific to your project to prevent symbol name clashes"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CAT_PREFIX2(a,b) a ## b
|
||||||
|
#define CAT_PREFIX(a,b) CAT_PREFIX2(a, b)
|
||||||
|
|
||||||
|
#define speex_resampler_init CAT_PREFIX(RANDOM_PREFIX,_resampler_init)
|
||||||
|
#define speex_resampler_init_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_init_frac)
|
||||||
|
#define speex_resampler_destroy CAT_PREFIX(RANDOM_PREFIX,_resampler_destroy)
|
||||||
|
#define speex_resampler_process_float CAT_PREFIX(RANDOM_PREFIX,_resampler_process_float)
|
||||||
|
#define speex_resampler_process_int CAT_PREFIX(RANDOM_PREFIX,_resampler_process_int)
|
||||||
|
#define speex_resampler_process_interleaved_float CAT_PREFIX(RANDOM_PREFIX,_resampler_process_interleaved_float)
|
||||||
|
#define speex_resampler_process_interleaved_int CAT_PREFIX(RANDOM_PREFIX,_resampler_process_interleaved_int)
|
||||||
|
#define speex_resampler_set_rate CAT_PREFIX(RANDOM_PREFIX,_resampler_set_rate)
|
||||||
|
#define speex_resampler_get_rate CAT_PREFIX(RANDOM_PREFIX,_resampler_get_rate)
|
||||||
|
#define speex_resampler_set_rate_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_set_rate_frac)
|
||||||
|
#define speex_resampler_get_ratio CAT_PREFIX(RANDOM_PREFIX,_resampler_get_ratio)
|
||||||
|
#define speex_resampler_set_quality CAT_PREFIX(RANDOM_PREFIX,_resampler_set_quality)
|
||||||
|
#define speex_resampler_get_quality CAT_PREFIX(RANDOM_PREFIX,_resampler_get_quality)
|
||||||
|
#define speex_resampler_set_input_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_set_input_stride)
|
||||||
|
#define speex_resampler_get_input_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_get_input_stride)
|
||||||
|
#define speex_resampler_set_output_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_set_output_stride)
|
||||||
|
#define speex_resampler_get_output_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_get_output_stride)
|
||||||
|
#define speex_resampler_get_input_latency CAT_PREFIX(RANDOM_PREFIX,_resampler_get_input_latency)
|
||||||
|
#define speex_resampler_get_output_latency CAT_PREFIX(RANDOM_PREFIX,_resampler_get_output_latency)
|
||||||
|
#define speex_resampler_skip_zeros CAT_PREFIX(RANDOM_PREFIX,_resampler_skip_zeros)
|
||||||
|
#define speex_resampler_reset_mem CAT_PREFIX(RANDOM_PREFIX,_resampler_reset_mem)
|
||||||
|
#define speex_resampler_strerror CAT_PREFIX(RANDOM_PREFIX,_resampler_strerror)
|
||||||
|
|
||||||
|
#define spx_int16_t short
|
||||||
|
#define spx_int32_t int
|
||||||
|
#define spx_uint16_t unsigned short
|
||||||
|
#define spx_uint32_t unsigned int
|
||||||
|
|
||||||
|
#else /* OUTSIDE_SPEEX */
|
||||||
|
|
||||||
|
#include "speexdsp_types.h"
|
||||||
|
|
||||||
|
#endif /* OUTSIDE_SPEEX */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SPEEX_RESAMPLER_QUALITY_MAX 10
|
||||||
|
#define SPEEX_RESAMPLER_QUALITY_MIN 0
|
||||||
|
#define SPEEX_RESAMPLER_QUALITY_DEFAULT 4
|
||||||
|
#define SPEEX_RESAMPLER_QUALITY_VOIP 3
|
||||||
|
#define SPEEX_RESAMPLER_QUALITY_DESKTOP 5
|
||||||
|
|
||||||
|
enum {
|
||||||
|
RESAMPLER_ERR_SUCCESS = 0,
|
||||||
|
RESAMPLER_ERR_ALLOC_FAILED = 1,
|
||||||
|
RESAMPLER_ERR_BAD_STATE = 2,
|
||||||
|
RESAMPLER_ERR_INVALID_ARG = 3,
|
||||||
|
RESAMPLER_ERR_PTR_OVERLAP = 4,
|
||||||
|
|
||||||
|
RESAMPLER_ERR_MAX_ERROR
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SpeexResamplerState_;
|
||||||
|
typedef struct SpeexResamplerState_ SpeexResamplerState;
|
||||||
|
|
||||||
|
/** Create a new resampler with integer input and output rates.
|
||||||
|
* @param nb_channels Number of channels to be processed
|
||||||
|
* @param in_rate Input sampling rate (integer number of Hz).
|
||||||
|
* @param out_rate Output sampling rate (integer number of Hz).
|
||||||
|
* @param quality Resampling quality between 0 and 10, where 0 has poor quality
|
||||||
|
* and 10 has very high quality.
|
||||||
|
* @return Newly created resampler state
|
||||||
|
* @retval NULL Error: not enough memory
|
||||||
|
*/
|
||||||
|
SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels,
|
||||||
|
spx_uint32_t in_rate,
|
||||||
|
spx_uint32_t out_rate,
|
||||||
|
int quality,
|
||||||
|
int *err);
|
||||||
|
|
||||||
|
/** Create a new resampler with fractional input/output rates. The sampling
|
||||||
|
* rate ratio is an arbitrary rational number with both the numerator and
|
||||||
|
* denominator being 32-bit integers.
|
||||||
|
* @param nb_channels Number of channels to be processed
|
||||||
|
* @param ratio_num Numerator of the sampling rate ratio
|
||||||
|
* @param ratio_den Denominator of the sampling rate ratio
|
||||||
|
* @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
|
||||||
|
* @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
|
||||||
|
* @param quality Resampling quality between 0 and 10, where 0 has poor quality
|
||||||
|
* and 10 has very high quality.
|
||||||
|
* @return Newly created resampler state
|
||||||
|
* @retval NULL Error: not enough memory
|
||||||
|
*/
|
||||||
|
SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
|
||||||
|
spx_uint32_t ratio_num,
|
||||||
|
spx_uint32_t ratio_den,
|
||||||
|
spx_uint32_t in_rate,
|
||||||
|
spx_uint32_t out_rate,
|
||||||
|
int quality,
|
||||||
|
int *err);
|
||||||
|
|
||||||
|
/** Destroy a resampler state.
|
||||||
|
* @param st Resampler state
|
||||||
|
*/
|
||||||
|
void speex_resampler_destroy(SpeexResamplerState *st);
|
||||||
|
|
||||||
|
/** Resample a float array. The input and output buffers must *not* overlap.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param channel_index Index of the channel to process for the multi-channel
|
||||||
|
* base (0 otherwise)
|
||||||
|
* @param in Input buffer
|
||||||
|
* @param in_len Number of input samples in the input buffer. Returns the
|
||||||
|
* number of samples processed
|
||||||
|
* @param out Output buffer
|
||||||
|
* @param out_len Size of the output buffer. Returns the number of samples written
|
||||||
|
*/
|
||||||
|
int speex_resampler_process_float(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t channel_index,
|
||||||
|
const float *in,
|
||||||
|
spx_uint32_t *in_len,
|
||||||
|
float *out,
|
||||||
|
spx_uint32_t *out_len);
|
||||||
|
|
||||||
|
/** Resample an int array. The input and output buffers must *not* overlap.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param channel_index Index of the channel to process for the multi-channel
|
||||||
|
* base (0 otherwise)
|
||||||
|
* @param in Input buffer
|
||||||
|
* @param in_len Number of input samples in the input buffer. Returns the number
|
||||||
|
* of samples processed
|
||||||
|
* @param out Output buffer
|
||||||
|
* @param out_len Size of the output buffer. Returns the number of samples written
|
||||||
|
*/
|
||||||
|
int speex_resampler_process_int(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t channel_index,
|
||||||
|
const spx_int16_t *in,
|
||||||
|
spx_uint32_t *in_len,
|
||||||
|
spx_int16_t *out,
|
||||||
|
spx_uint32_t *out_len);
|
||||||
|
|
||||||
|
/** Resample an interleaved float array. The input and output buffers must *not* overlap.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param in Input buffer
|
||||||
|
* @param in_len Number of input samples in the input buffer. Returns the number
|
||||||
|
* of samples processed. This is all per-channel.
|
||||||
|
* @param out Output buffer
|
||||||
|
* @param out_len Size of the output buffer. Returns the number of samples written.
|
||||||
|
* This is all per-channel.
|
||||||
|
*/
|
||||||
|
int speex_resampler_process_interleaved_float(SpeexResamplerState *st,
|
||||||
|
const float *in,
|
||||||
|
spx_uint32_t *in_len,
|
||||||
|
float *out,
|
||||||
|
spx_uint32_t *out_len);
|
||||||
|
|
||||||
|
/** Resample an interleaved int array. The input and output buffers must *not* overlap.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param in Input buffer
|
||||||
|
* @param in_len Number of input samples in the input buffer. Returns the number
|
||||||
|
* of samples processed. This is all per-channel.
|
||||||
|
* @param out Output buffer
|
||||||
|
* @param out_len Size of the output buffer. Returns the number of samples written.
|
||||||
|
* This is all per-channel.
|
||||||
|
*/
|
||||||
|
int speex_resampler_process_interleaved_int(SpeexResamplerState *st,
|
||||||
|
const spx_int16_t *in,
|
||||||
|
spx_uint32_t *in_len,
|
||||||
|
spx_int16_t *out,
|
||||||
|
spx_uint32_t *out_len);
|
||||||
|
|
||||||
|
/** Set (change) the input/output sampling rates (integer value).
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param in_rate Input sampling rate (integer number of Hz).
|
||||||
|
* @param out_rate Output sampling rate (integer number of Hz).
|
||||||
|
*/
|
||||||
|
int speex_resampler_set_rate(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t in_rate,
|
||||||
|
spx_uint32_t out_rate);
|
||||||
|
|
||||||
|
/** Get the current input/output sampling rates (integer value).
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param in_rate Input sampling rate (integer number of Hz) copied.
|
||||||
|
* @param out_rate Output sampling rate (integer number of Hz) copied.
|
||||||
|
*/
|
||||||
|
void speex_resampler_get_rate(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t *in_rate,
|
||||||
|
spx_uint32_t *out_rate);
|
||||||
|
|
||||||
|
/** Set (change) the input/output sampling rates and resampling ratio
|
||||||
|
* (fractional values in Hz supported).
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param ratio_num Numerator of the sampling rate ratio
|
||||||
|
* @param ratio_den Denominator of the sampling rate ratio
|
||||||
|
* @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
|
||||||
|
* @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
|
||||||
|
*/
|
||||||
|
int speex_resampler_set_rate_frac(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t ratio_num,
|
||||||
|
spx_uint32_t ratio_den,
|
||||||
|
spx_uint32_t in_rate,
|
||||||
|
spx_uint32_t out_rate);
|
||||||
|
|
||||||
|
/** Get the current resampling ratio. This will be reduced to the least
|
||||||
|
* common denominator.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param ratio_num Numerator of the sampling rate ratio copied
|
||||||
|
* @param ratio_den Denominator of the sampling rate ratio copied
|
||||||
|
*/
|
||||||
|
void speex_resampler_get_ratio(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t *ratio_num,
|
||||||
|
spx_uint32_t *ratio_den);
|
||||||
|
|
||||||
|
/** Set (change) the conversion quality.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param quality Resampling quality between 0 and 10, where 0 has poor
|
||||||
|
* quality and 10 has very high quality.
|
||||||
|
*/
|
||||||
|
int speex_resampler_set_quality(SpeexResamplerState *st,
|
||||||
|
int quality);
|
||||||
|
|
||||||
|
/** Get the conversion quality.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param quality Resampling quality between 0 and 10, where 0 has poor
|
||||||
|
* quality and 10 has very high quality.
|
||||||
|
*/
|
||||||
|
void speex_resampler_get_quality(SpeexResamplerState *st,
|
||||||
|
int *quality);
|
||||||
|
|
||||||
|
/** Set (change) the input stride.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param stride Input stride
|
||||||
|
*/
|
||||||
|
void speex_resampler_set_input_stride(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t stride);
|
||||||
|
|
||||||
|
/** Get the input stride.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param stride Input stride copied
|
||||||
|
*/
|
||||||
|
void speex_resampler_get_input_stride(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t *stride);
|
||||||
|
|
||||||
|
/** Set (change) the output stride.
|
||||||
|
* @param st Resampler state
|
||||||
|
* @param stride Output stride
|
||||||
|
*/
|
||||||
|
void speex_resampler_set_output_stride(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t stride);
|
||||||
|
|
||||||
|
/** Get the output stride.
|
||||||
|
* @param st Resampler state copied
|
||||||
|
* @param stride Output stride
|
||||||
|
*/
|
||||||
|
void speex_resampler_get_output_stride(SpeexResamplerState *st,
|
||||||
|
spx_uint32_t *stride);
|
||||||
|
|
||||||
|
/** Get the latency introduced by the resampler measured in input samples.
|
||||||
|
* @param st Resampler state
|
||||||
|
*/
|
||||||
|
int speex_resampler_get_input_latency(SpeexResamplerState *st);
|
||||||
|
|
||||||
|
/** Get the latency introduced by the resampler measured in output samples.
|
||||||
|
* @param st Resampler state
|
||||||
|
*/
|
||||||
|
int speex_resampler_get_output_latency(SpeexResamplerState *st);
|
||||||
|
|
||||||
|
/** Make sure that the first samples to go out of the resamplers don't have
|
||||||
|
* leading zeros. This is only useful before starting to use a newly created
|
||||||
|
* resampler. It is recommended to use that when resampling an audio file, as
|
||||||
|
* it will generate a file with the same length. For real-time processing,
|
||||||
|
* it is probably easier not to use this call (so that the output duration
|
||||||
|
* is the same for the first frame).
|
||||||
|
* @param st Resampler state
|
||||||
|
*/
|
||||||
|
int speex_resampler_skip_zeros(SpeexResamplerState *st);
|
||||||
|
|
||||||
|
/** Reset a resampler so a new (unrelated) stream can be processed.
|
||||||
|
* @param st Resampler state
|
||||||
|
*/
|
||||||
|
int speex_resampler_reset_mem(SpeexResamplerState *st);
|
||||||
|
|
||||||
|
/** Returns the English meaning for an error code
|
||||||
|
* @param err Error code
|
||||||
|
* @return English string
|
||||||
|
*/
|
||||||
|
const char *speex_resampler_strerror(int err);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
18
include/speex/speexdsp_config_types.h.in
Normal file
18
include/speex/speexdsp_config_types.h.in
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef __SPEEX_TYPES_H__
|
||||||
|
#define __SPEEX_TYPES_H__
|
||||||
|
|
||||||
|
#if defined HAVE_STDINT_H
|
||||||
|
# include <stdint.h>
|
||||||
|
#elif defined HAVE_INTTYPES_H
|
||||||
|
# include <inttypes.h>
|
||||||
|
#elif defined HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef @SIZE16@ spx_int16_t;
|
||||||
|
typedef @USIZE16@ spx_uint16_t;
|
||||||
|
typedef @SIZE32@ spx_int32_t;
|
||||||
|
typedef @USIZE32@ spx_uint32_t;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
126
include/speex/speexdsp_types.h
Normal file
126
include/speex/speexdsp_types.h
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/* speexdsp_types.h taken from libogg */
|
||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
|
||||||
|
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: #ifdef jail to whip a few platforms into the UNIX ideal.
|
||||||
|
last mod: $Id: os_types.h 7524 2004-08-11 04:20:36Z conrad $
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
/**
|
||||||
|
@file speexdsp_types.h
|
||||||
|
@brief Speex types
|
||||||
|
*/
|
||||||
|
#ifndef _SPEEX_TYPES_H
|
||||||
|
#define _SPEEX_TYPES_H
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
|
||||||
|
# if defined(__CYGWIN__)
|
||||||
|
# include <_G_config.h>
|
||||||
|
typedef _G_int32_t spx_int32_t;
|
||||||
|
typedef _G_uint32_t spx_uint32_t;
|
||||||
|
typedef _G_int16_t spx_int16_t;
|
||||||
|
typedef _G_uint16_t spx_uint16_t;
|
||||||
|
# elif defined(__MINGW32__)
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
typedef unsigned short spx_uint16_t;
|
||||||
|
typedef int spx_int32_t;
|
||||||
|
typedef unsigned int spx_uint32_t;
|
||||||
|
# elif defined(__MWERKS__)
|
||||||
|
typedef int spx_int32_t;
|
||||||
|
typedef unsigned int spx_uint32_t;
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
typedef unsigned short spx_uint16_t;
|
||||||
|
# else
|
||||||
|
/* MSVC/Borland */
|
||||||
|
typedef __int32 spx_int32_t;
|
||||||
|
typedef unsigned __int32 spx_uint32_t;
|
||||||
|
typedef __int16 spx_int16_t;
|
||||||
|
typedef unsigned __int16 spx_uint16_t;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__MACOS__)
|
||||||
|
|
||||||
|
# include <sys/types.h>
|
||||||
|
typedef SInt16 spx_int16_t;
|
||||||
|
typedef UInt16 spx_uint16_t;
|
||||||
|
typedef SInt32 spx_int32_t;
|
||||||
|
typedef UInt32 spx_uint32_t;
|
||||||
|
|
||||||
|
#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
|
||||||
|
|
||||||
|
# include <sys/types.h>
|
||||||
|
typedef int16_t spx_int16_t;
|
||||||
|
typedef u_int16_t spx_uint16_t;
|
||||||
|
typedef int32_t spx_int32_t;
|
||||||
|
typedef u_int32_t spx_uint32_t;
|
||||||
|
|
||||||
|
#elif defined(__BEOS__)
|
||||||
|
|
||||||
|
/* Be */
|
||||||
|
# include <inttypes.h>
|
||||||
|
typedef int16_t spx_int16_t;
|
||||||
|
typedef u_int16_t spx_uint16_t;
|
||||||
|
typedef int32_t spx_int32_t;
|
||||||
|
typedef u_int32_t spx_uint32_t;
|
||||||
|
|
||||||
|
#elif defined (__EMX__)
|
||||||
|
|
||||||
|
/* OS/2 GCC */
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
typedef unsigned short spx_uint16_t;
|
||||||
|
typedef int spx_int32_t;
|
||||||
|
typedef unsigned int spx_uint32_t;
|
||||||
|
|
||||||
|
#elif defined (DJGPP)
|
||||||
|
|
||||||
|
/* DJGPP */
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
typedef int spx_int32_t;
|
||||||
|
typedef unsigned int spx_uint32_t;
|
||||||
|
|
||||||
|
#elif defined(R5900)
|
||||||
|
|
||||||
|
/* PS2 EE */
|
||||||
|
typedef int spx_int32_t;
|
||||||
|
typedef unsigned spx_uint32_t;
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
|
||||||
|
#elif defined(__SYMBIAN32__)
|
||||||
|
|
||||||
|
/* Symbian GCC */
|
||||||
|
typedef signed short spx_int16_t;
|
||||||
|
typedef unsigned short spx_uint16_t;
|
||||||
|
typedef signed int spx_int32_t;
|
||||||
|
typedef unsigned int spx_uint32_t;
|
||||||
|
|
||||||
|
#elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
|
||||||
|
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
typedef unsigned short spx_uint16_t;
|
||||||
|
typedef long spx_int32_t;
|
||||||
|
typedef unsigned long spx_uint32_t;
|
||||||
|
|
||||||
|
#elif defined(CONFIG_TI_C6X)
|
||||||
|
|
||||||
|
typedef short spx_int16_t;
|
||||||
|
typedef unsigned short spx_uint16_t;
|
||||||
|
typedef int spx_int32_t;
|
||||||
|
typedef unsigned int spx_uint32_t;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include "speexdsp_config_types.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _SPEEX_TYPES_H */
|
527
install-sh
Executable file
527
install-sh
Executable file
@ -0,0 +1,527 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2011-11-20.07; # UTC
|
||||||
|
|
||||||
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
# following copyright and license.
|
||||||
|
#
|
||||||
|
# Copyright (C) 1994 X Consortium
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to
|
||||||
|
# deal in the Software without restriction, including without limitation the
|
||||||
|
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
# sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||||
|
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||||
|
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
#
|
||||||
|
# Except as contained in this notice, the name of the X Consortium shall not
|
||||||
|
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||||
|
# ings in this Software without prior written authorization from the X Consor-
|
||||||
|
# tium.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# FSF changes to this file are in the public domain.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# 'make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit=${DOITPROG-}
|
||||||
|
if test -z "$doit"; then
|
||||||
|
doit_exec=exec
|
||||||
|
else
|
||||||
|
doit_exec=$doit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put in absolute file names if you don't have them in your path;
|
||||||
|
# or use environment vars.
|
||||||
|
|
||||||
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
|
chmodprog=${CHMODPROG-chmod}
|
||||||
|
chownprog=${CHOWNPROG-chown}
|
||||||
|
cmpprog=${CMPPROG-cmp}
|
||||||
|
cpprog=${CPPROG-cp}
|
||||||
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
|
mvprog=${MVPROG-mv}
|
||||||
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
mvcmd=$mvprog
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
stripcmd=
|
||||||
|
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
|
no_target_directory=
|
||||||
|
|
||||||
|
usage="\
|
||||||
|
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||||
|
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||||
|
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||||
|
or: $0 [OPTION]... -d DIRECTORIES...
|
||||||
|
|
||||||
|
In the 1st form, copy SRCFILE to DSTFILE.
|
||||||
|
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||||
|
In the 4th, create DIRECTORIES.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
-c (ignored)
|
||||||
|
-C install only if different (preserve the last data modification time)
|
||||||
|
-d create directories instead of installing files.
|
||||||
|
-g GROUP $chgrpprog installed files to GROUP.
|
||||||
|
-m MODE $chmodprog installed files to MODE.
|
||||||
|
-o USER $chownprog installed files to USER.
|
||||||
|
-s $stripprog installed files.
|
||||||
|
-t DIRECTORY install into DIRECTORY.
|
||||||
|
-T report an error if DSTFILE is a directory.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -ne 0; do
|
||||||
|
case $1 in
|
||||||
|
-c) ;;
|
||||||
|
|
||||||
|
-C) copy_on_change=true;;
|
||||||
|
|
||||||
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
case $mode in
|
||||||
|
*' '* | *' '* | *'
|
||||||
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
|
echo "$0: invalid mode: $mode" >&2
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-t) dst_arg=$2
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
--) shift
|
||||||
|
break;;
|
||||||
|
|
||||||
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
|
# When -d is used, all remaining arguments are directories to create.
|
||||||
|
# When -t is used, the destination is already specified.
|
||||||
|
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$dst_arg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dst_arg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dst_arg=$arg
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
echo "$0: no input file specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# It's OK to call 'install-sh -d' without argument.
|
||||||
|
# This can happen when creating conditional directories.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dir_arg"; then
|
||||||
|
do_exit='(exit $ret); exit $ret'
|
||||||
|
trap "ret=129; $do_exit" 1
|
||||||
|
trap "ret=130; $do_exit" 2
|
||||||
|
trap "ret=141; $do_exit" 13
|
||||||
|
trap "ret=143; $do_exit" 15
|
||||||
|
|
||||||
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
case $mode in
|
||||||
|
# Optimize common cases.
|
||||||
|
*644) cp_umask=133;;
|
||||||
|
*755) cp_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw='% 200'
|
||||||
|
fi
|
||||||
|
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||||
|
*)
|
||||||
|
if test -z "$stripcmd"; then
|
||||||
|
u_plus_rw=
|
||||||
|
else
|
||||||
|
u_plus_rw=,u+rw
|
||||||
|
fi
|
||||||
|
cp_umask=$mode$u_plus_rw;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
for src
|
||||||
|
do
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $src in
|
||||||
|
-* | [=\(\)!]) src=./$src;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
dst=$src
|
||||||
|
dstdir=$dst
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
if test ! -f "$src" && test ! -d "$src"; then
|
||||||
|
echo "$0: $src does not exist." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$dst_arg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dst=$dst_arg
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; won't work
|
||||||
|
# if double slashes aren't ignored.
|
||||||
|
if test -d "$dst"; then
|
||||||
|
if test -n "$no_target_directory"; then
|
||||||
|
echo "$0: $dst_arg: Is a directory" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dstdir=$dst
|
||||||
|
dst=$dstdir/`basename "$src"`
|
||||||
|
dstdir_status=0
|
||||||
|
else
|
||||||
|
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||||
|
dstdir=`
|
||||||
|
(dirname "$dst") 2>/dev/null ||
|
||||||
|
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||||
|
X"$dst" : 'X\(//\)[^/]' \| \
|
||||||
|
X"$dst" : 'X\(//\)$' \| \
|
||||||
|
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||||
|
echo X"$dst" |
|
||||||
|
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)[^/].*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\/\)$/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
/^X\(\/\).*/{
|
||||||
|
s//\1/
|
||||||
|
q
|
||||||
|
}
|
||||||
|
s/.*/./; q'
|
||||||
|
`
|
||||||
|
|
||||||
|
test -d "$dstdir"
|
||||||
|
dstdir_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
obsolete_mkdir_used=false
|
||||||
|
|
||||||
|
if test $dstdir_status != 0; then
|
||||||
|
case $posix_mkdir in
|
||||||
|
'')
|
||||||
|
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||||
|
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||||
|
umask=`umask`
|
||||||
|
case $stripcmd.$umask in
|
||||||
|
# Optimize common cases.
|
||||||
|
*[2367][2367]) mkdir_umask=$umask;;
|
||||||
|
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||||
|
|
||||||
|
*[0-7])
|
||||||
|
mkdir_umask=`expr $umask + 22 \
|
||||||
|
- $umask % 100 % 40 + $umask % 20 \
|
||||||
|
- $umask % 10 % 4 + $umask % 2
|
||||||
|
`;;
|
||||||
|
*) mkdir_umask=$umask,go-w;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# With -d, create the new directory with the user-specified mode.
|
||||||
|
# Otherwise, rely on $mkdir_umask.
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
mkdir_mode=-m$mode
|
||||||
|
else
|
||||||
|
mkdir_mode=
|
||||||
|
fi
|
||||||
|
|
||||||
|
posix_mkdir=false
|
||||||
|
case $umask in
|
||||||
|
*[123567][0-7][0-7])
|
||||||
|
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||||
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||||
|
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||||
|
|
||||||
|
if (umask $mkdir_umask &&
|
||||||
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
if test -z "$dir_arg" || {
|
||||||
|
# Check for POSIX incompatibilities with -m.
|
||||||
|
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||||
|
# other-writable bit of parent directory when it shouldn't.
|
||||||
|
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||||
|
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||||
|
case $ls_ld_tmpdir in
|
||||||
|
d????-?r-*) different_mode=700;;
|
||||||
|
d????-?--*) different_mode=755;;
|
||||||
|
*) false;;
|
||||||
|
esac &&
|
||||||
|
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||||
|
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||||
|
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
then posix_mkdir=:
|
||||||
|
fi
|
||||||
|
rmdir "$tmpdir/d" "$tmpdir"
|
||||||
|
else
|
||||||
|
# Remove any dirs left behind by ancient mkdir implementations.
|
||||||
|
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||||
|
fi
|
||||||
|
trap '' 0;;
|
||||||
|
esac;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if
|
||||||
|
$posix_mkdir && (
|
||||||
|
umask $mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||||
|
)
|
||||||
|
then :
|
||||||
|
else
|
||||||
|
|
||||||
|
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||||
|
# or it failed possibly due to a race condition. Create the
|
||||||
|
# directory the slow way, step by step, checking for races as we go.
|
||||||
|
|
||||||
|
case $dstdir in
|
||||||
|
/*) prefix='/';;
|
||||||
|
[-=\(\)!]*) prefix='./';;
|
||||||
|
*) prefix='';;
|
||||||
|
esac
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
prefixes=
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test X"$d" = X && continue
|
||||||
|
|
||||||
|
prefix=$prefix$d
|
||||||
|
if test -d "$prefix"; then
|
||||||
|
prefixes=
|
||||||
|
else
|
||||||
|
if $posix_mkdir; then
|
||||||
|
(umask=$mkdir_umask &&
|
||||||
|
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
test -d "$prefix" || exit 1
|
||||||
|
else
|
||||||
|
case $prefix in
|
||||||
|
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||||
|
*) qprefix=$prefix;;
|
||||||
|
esac
|
||||||
|
prefixes="$prefixes '$qprefix'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
prefix=$prefix/
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "$prefixes"; then
|
||||||
|
# Don't fail if two instances are running concurrently.
|
||||||
|
(umask $mkdir_umask &&
|
||||||
|
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||||
|
test -d "$dstdir" || exit 1
|
||||||
|
obsolete_mkdir_used=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$dir_arg"; then
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||||
|
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||||
|
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||||
|
else
|
||||||
|
|
||||||
|
# Make a couple of temp file names in the proper directory.
|
||||||
|
dsttmp=$dstdir/_inst.$$_
|
||||||
|
rmtmp=$dstdir/_rm.$$_
|
||||||
|
|
||||||
|
# Trap to clean up those temp files at exit.
|
||||||
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||||
|
|
||||||
|
# Copy the file name to the temp name.
|
||||||
|
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||||
|
|
||||||
|
# and set any options; do chmod last to preserve setuid bits.
|
||||||
|
#
|
||||||
|
# If any of these fail, we abort the whole thing. If we want to
|
||||||
|
# ignore errors from any of these, just make sure not to ignore
|
||||||
|
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||||
|
#
|
||||||
|
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||||
|
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# Rename the file to the real destination.
|
||||||
|
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||||
|
|
||||||
|
# The rename failed, perhaps because mv can't rename something else
|
||||||
|
# to itself, or perhaps because mv is so ancient that it does not
|
||||||
|
# support -f.
|
||||||
|
{
|
||||||
|
# Now remove or move aside any old file at destination location.
|
||||||
|
# We try this two ways since rm can't unlink itself on some
|
||||||
|
# systems and the destination file might be busy for other
|
||||||
|
# reasons. In this case, the final cleanup might fail but the new
|
||||||
|
# file should still install successfully.
|
||||||
|
{
|
||||||
|
test ! -f "$dst" ||
|
||||||
|
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||||
|
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||||
|
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||||
|
} ||
|
||||||
|
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||||
|
(exit 1); exit 1
|
||||||
|
}
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
fi || exit 1
|
||||||
|
|
||||||
|
trap '' 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
44
libspeexdsp/Makefile.am
Normal file
44
libspeexdsp/Makefile.am
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
EXTRA_DIST=echo_diagnostic.m
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @FFT_CFLAGS@
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libspeexdsp.la
|
||||||
|
|
||||||
|
# Sources for compilation in the library
|
||||||
|
if BUILD_KISS_FFT
|
||||||
|
FFTSRC=kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||||
|
else
|
||||||
|
if BUILD_SMALLFT
|
||||||
|
FFTSRC=smallft.c
|
||||||
|
else
|
||||||
|
FFTSRC=
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
|
||||||
|
|
||||||
|
noinst_HEADERS = arch.h bfin.h \
|
||||||
|
fixed_arm4.h \
|
||||||
|
fixed_arm5e.h fixed_bfin.h fixed_debug.h \
|
||||||
|
math_approx.h misc_bfin.h \
|
||||||
|
stack_alloc.h fftwrap.h \
|
||||||
|
filterbank.h fixed_generic.h os_support.h \
|
||||||
|
pseudofloat.h smallft.h vorbis_psy.h resample_sse.h resample_neon.h
|
||||||
|
|
||||||
|
libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEXDSP_LT_CURRENT@:@SPEEXDSP_LT_REVISION@:@SPEEXDSP_LT_AGE@
|
||||||
|
libspeexdsp_la_LIBADD = $(LIBM)
|
||||||
|
|
||||||
|
if BUILD_EXAMPLES
|
||||||
|
noinst_PROGRAMS = testdenoise testecho testjitter testresample
|
||||||
|
testdenoise_SOURCES = testdenoise.c
|
||||||
|
testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||||
|
testecho_SOURCES = testecho.c
|
||||||
|
testecho_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||||
|
testjitter_SOURCES = testjitter.c
|
||||||
|
testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||||
|
testresample_SOURCES = testresample.c
|
||||||
|
testresample_LDADD = libspeexdsp.la @FFT_LIBS@ @LIBM@
|
||||||
|
endif
|
749
libspeexdsp/Makefile.in
Normal file
749
libspeexdsp/Makefile.in
Normal file
@ -0,0 +1,749 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
@BUILD_EXAMPLES_TRUE@noinst_PROGRAMS = testdenoise$(EXEEXT) \
|
||||||
|
@BUILD_EXAMPLES_TRUE@ testecho$(EXEEXT) testjitter$(EXEEXT) \
|
||||||
|
@BUILD_EXAMPLES_TRUE@ testresample$(EXEEXT)
|
||||||
|
subdir = libspeexdsp
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||||
|
$(top_srcdir)/depcomp $(noinst_HEADERS)
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||||
|
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||||
|
am__DEPENDENCIES_1 =
|
||||||
|
libspeexdsp_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||||
|
am__libspeexdsp_la_SOURCES_DIST = preprocess.c jitter.c mdf.c \
|
||||||
|
fftwrap.c filterbank.c resample.c buffer.c scal.c smallft.c \
|
||||||
|
kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||||
|
@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_TRUE@am__objects_1 = smallft.lo
|
||||||
|
@BUILD_KISS_FFT_TRUE@am__objects_1 = kiss_fft.lo kiss_fftr.lo
|
||||||
|
am_libspeexdsp_la_OBJECTS = preprocess.lo jitter.lo mdf.lo fftwrap.lo \
|
||||||
|
filterbank.lo resample.lo buffer.lo scal.lo $(am__objects_1)
|
||||||
|
libspeexdsp_la_OBJECTS = $(am_libspeexdsp_la_OBJECTS)
|
||||||
|
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||||
|
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||||
|
am__v_lt_0 = --silent
|
||||||
|
am__v_lt_1 =
|
||||||
|
libspeexdsp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||||
|
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||||
|
$(AM_CFLAGS) $(CFLAGS) $(libspeexdsp_la_LDFLAGS) $(LDFLAGS) -o \
|
||||||
|
$@
|
||||||
|
PROGRAMS = $(noinst_PROGRAMS)
|
||||||
|
am__testdenoise_SOURCES_DIST = testdenoise.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@am_testdenoise_OBJECTS = testdenoise.$(OBJEXT)
|
||||||
|
testdenoise_OBJECTS = $(am_testdenoise_OBJECTS)
|
||||||
|
@BUILD_EXAMPLES_TRUE@testdenoise_DEPENDENCIES = libspeexdsp.la
|
||||||
|
am__testecho_SOURCES_DIST = testecho.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@am_testecho_OBJECTS = testecho.$(OBJEXT)
|
||||||
|
testecho_OBJECTS = $(am_testecho_OBJECTS)
|
||||||
|
@BUILD_EXAMPLES_TRUE@testecho_DEPENDENCIES = libspeexdsp.la
|
||||||
|
am__testjitter_SOURCES_DIST = testjitter.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@am_testjitter_OBJECTS = testjitter.$(OBJEXT)
|
||||||
|
testjitter_OBJECTS = $(am_testjitter_OBJECTS)
|
||||||
|
@BUILD_EXAMPLES_TRUE@testjitter_DEPENDENCIES = libspeexdsp.la
|
||||||
|
am__testresample_SOURCES_DIST = testresample.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@am_testresample_OBJECTS = testresample.$(OBJEXT)
|
||||||
|
testresample_OBJECTS = $(am_testresample_OBJECTS)
|
||||||
|
@BUILD_EXAMPLES_TRUE@testresample_DEPENDENCIES = libspeexdsp.la
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||||
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
|
am__depfiles_maybe = depfiles
|
||||||
|
am__mv = mv -f
|
||||||
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||||
|
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||||
|
$(AM_CFLAGS) $(CFLAGS)
|
||||||
|
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||||
|
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||||
|
am__v_CC_0 = @echo " CC " $@;
|
||||||
|
am__v_CC_1 =
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||||
|
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
|
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||||
|
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||||
|
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||||
|
am__v_CCLD_1 =
|
||||||
|
SOURCES = $(libspeexdsp_la_SOURCES) $(testdenoise_SOURCES) \
|
||||||
|
$(testecho_SOURCES) $(testjitter_SOURCES) \
|
||||||
|
$(testresample_SOURCES)
|
||||||
|
DIST_SOURCES = $(am__libspeexdsp_la_SOURCES_DIST) \
|
||||||
|
$(am__testdenoise_SOURCES_DIST) $(am__testecho_SOURCES_DIST) \
|
||||||
|
$(am__testjitter_SOURCES_DIST) \
|
||||||
|
$(am__testresample_SOURCES_DIST)
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
HEADERS = $(noinst_HEADERS)
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
EXTRA_DIST = echo_diagnostic.m
|
||||||
|
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @FFT_CFLAGS@
|
||||||
|
lib_LTLIBRARIES = libspeexdsp.la
|
||||||
|
@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_FALSE@FFTSRC =
|
||||||
|
@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_TRUE@FFTSRC = smallft.c
|
||||||
|
|
||||||
|
# Sources for compilation in the library
|
||||||
|
@BUILD_KISS_FFT_TRUE@FFTSRC = kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||||
|
libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
|
||||||
|
noinst_HEADERS = arch.h bfin.h \
|
||||||
|
fixed_arm4.h \
|
||||||
|
fixed_arm5e.h fixed_bfin.h fixed_debug.h \
|
||||||
|
math_approx.h misc_bfin.h \
|
||||||
|
stack_alloc.h fftwrap.h \
|
||||||
|
filterbank.h fixed_generic.h os_support.h \
|
||||||
|
pseudofloat.h smallft.h vorbis_psy.h resample_sse.h resample_neon.h
|
||||||
|
|
||||||
|
libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEXDSP_LT_CURRENT@:@SPEEXDSP_LT_REVISION@:@SPEEXDSP_LT_AGE@
|
||||||
|
libspeexdsp_la_LIBADD = $(LIBM)
|
||||||
|
@BUILD_EXAMPLES_TRUE@testdenoise_SOURCES = testdenoise.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||||
|
@BUILD_EXAMPLES_TRUE@testecho_SOURCES = testecho.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@testecho_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||||
|
@BUILD_EXAMPLES_TRUE@testjitter_SOURCES = testjitter.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||||
|
@BUILD_EXAMPLES_TRUE@testresample_SOURCES = testresample.c
|
||||||
|
@BUILD_EXAMPLES_TRUE@testresample_LDADD = libspeexdsp.la @FFT_LIBS@ @LIBM@
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .lo .o .obj
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libspeexdsp/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign libspeexdsp/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||||
|
list2=; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
list2="$$list2 $$p"; \
|
||||||
|
else :; fi; \
|
||||||
|
done; \
|
||||||
|
test -z "$$list2" || { \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||||
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||||
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall-libLTLIBRARIES:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
$(am__strip_dir) \
|
||||||
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||||
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||||
|
done
|
||||||
|
|
||||||
|
clean-libLTLIBRARIES:
|
||||||
|
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||||
|
@list='$(lib_LTLIBRARIES)'; \
|
||||||
|
locs=`for p in $$list; do echo $$p; done | \
|
||||||
|
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||||
|
sort -u`; \
|
||||||
|
test -z "$$locs" || { \
|
||||||
|
echo rm -f $${locs}; \
|
||||||
|
rm -f $${locs}; \
|
||||||
|
}
|
||||||
|
|
||||||
|
libspeexdsp.la: $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_DEPENDENCIES) $(EXTRA_libspeexdsp_la_DEPENDENCIES)
|
||||||
|
$(AM_V_CCLD)$(libspeexdsp_la_LINK) -rpath $(libdir) $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
|
clean-noinstPROGRAMS:
|
||||||
|
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||||
|
echo " rm -f" $$list; \
|
||||||
|
rm -f $$list || exit $$?; \
|
||||||
|
test -n "$(EXEEXT)" || exit 0; \
|
||||||
|
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||||
|
echo " rm -f" $$list; \
|
||||||
|
rm -f $$list
|
||||||
|
|
||||||
|
testdenoise$(EXEEXT): $(testdenoise_OBJECTS) $(testdenoise_DEPENDENCIES) $(EXTRA_testdenoise_DEPENDENCIES)
|
||||||
|
@rm -f testdenoise$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(testdenoise_OBJECTS) $(testdenoise_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
testecho$(EXEEXT): $(testecho_OBJECTS) $(testecho_DEPENDENCIES) $(EXTRA_testecho_DEPENDENCIES)
|
||||||
|
@rm -f testecho$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(testecho_OBJECTS) $(testecho_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
testjitter$(EXEEXT): $(testjitter_OBJECTS) $(testjitter_DEPENDENCIES) $(EXTRA_testjitter_DEPENDENCIES)
|
||||||
|
@rm -f testjitter$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(testjitter_OBJECTS) $(testjitter_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
testresample$(EXEEXT): $(testresample_OBJECTS) $(testresample_DEPENDENCIES) $(EXTRA_testresample_DEPENDENCIES)
|
||||||
|
@rm -f testresample$(EXEEXT)
|
||||||
|
$(AM_V_CCLD)$(LINK) $(testresample_OBJECTS) $(testresample_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwrap.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterbank.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kiss_fft.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kiss_fftr.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdf.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preprocess.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scal.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smallft.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdenoise.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testecho.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testjitter.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testresample.Po@am__quote@
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
.c.obj:
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.c.lo:
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-am
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-am
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscopelist: cscopelist-am
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||||
|
clean-noinstPROGRAMS mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am: install-libLTLIBRARIES
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-libLTLIBRARIES
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||||
|
clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
|
||||||
|
cscopelist-am ctags ctags-am distclean distclean-compile \
|
||||||
|
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-dvi install-dvi-am \
|
||||||
|
install-exec install-exec-am install-html install-html-am \
|
||||||
|
install-info install-info-am install-libLTLIBRARIES \
|
||||||
|
install-man install-pdf install-pdf-am install-ps \
|
||||||
|
install-ps-am install-strip installcheck installcheck-am \
|
||||||
|
installdirs maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||||
|
uninstall-am uninstall-libLTLIBRARIES
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
160
libspeexdsp/_kiss_fft_guts.h
Normal file
160
libspeexdsp/_kiss_fft_guts.h
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2003-2004, Mark Borgerding
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MIN(a,b) ((a)<(b) ? (a):(b))
|
||||||
|
#define MAX(a,b) ((a)>(b) ? (a):(b))
|
||||||
|
|
||||||
|
/* kiss_fft.h
|
||||||
|
defines kiss_fft_scalar as either short or a float type
|
||||||
|
and defines
|
||||||
|
typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */
|
||||||
|
#include "kiss_fft.h"
|
||||||
|
#include "math_approx.h"
|
||||||
|
|
||||||
|
#define MAXFACTORS 32
|
||||||
|
/* e.g. an fft of length 128 has 4 factors
|
||||||
|
as far as kissfft is concerned
|
||||||
|
4*4*4*2
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct kiss_fft_state{
|
||||||
|
int nfft;
|
||||||
|
int inverse;
|
||||||
|
int factors[2*MAXFACTORS];
|
||||||
|
kiss_fft_cpx twiddles[1];
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Explanation of macros dealing with complex math:
|
||||||
|
|
||||||
|
C_MUL(m,a,b) : m = a*b
|
||||||
|
C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise
|
||||||
|
C_SUB( res, a,b) : res = a - b
|
||||||
|
C_SUBFROM( res , a) : res -= a
|
||||||
|
C_ADDTO( res , a) : res += a
|
||||||
|
* */
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
#include "arch.h"
|
||||||
|
# define FRACBITS 15
|
||||||
|
# define SAMPPROD spx_int32_t
|
||||||
|
#define SAMP_MAX 32767
|
||||||
|
|
||||||
|
#define SAMP_MIN -SAMP_MAX
|
||||||
|
|
||||||
|
#if defined(CHECK_OVERFLOW)
|
||||||
|
# define CHECK_OVERFLOW_OP(a,op,b) \
|
||||||
|
if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
|
||||||
|
fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) ); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
# define smul(a,b) ( (SAMPPROD)(a)*(b) )
|
||||||
|
# define sround( x ) (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS )
|
||||||
|
|
||||||
|
# define S_MUL(a,b) sround( smul(a,b) )
|
||||||
|
|
||||||
|
# define C_MUL(m,a,b) \
|
||||||
|
do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \
|
||||||
|
(m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0)
|
||||||
|
|
||||||
|
# define C_MUL4(m,a,b) \
|
||||||
|
do{ (m).r = PSHR32( smul((a).r,(b).r) - smul((a).i,(b).i),17 ); \
|
||||||
|
(m).i = PSHR32( smul((a).r,(b).i) + smul((a).i,(b).r),17 ); }while(0)
|
||||||
|
|
||||||
|
# define DIVSCALAR(x,k) \
|
||||||
|
(x) = sround( smul( x, SAMP_MAX/k ) )
|
||||||
|
|
||||||
|
# define C_FIXDIV(c,div) \
|
||||||
|
do { DIVSCALAR( (c).r , div); \
|
||||||
|
DIVSCALAR( (c).i , div); }while (0)
|
||||||
|
|
||||||
|
# define C_MULBYSCALAR( c, s ) \
|
||||||
|
do{ (c).r = sround( smul( (c).r , s ) ) ;\
|
||||||
|
(c).i = sround( smul( (c).i , s ) ) ; }while(0)
|
||||||
|
|
||||||
|
#else /* not FIXED_POINT*/
|
||||||
|
|
||||||
|
# define S_MUL(a,b) ( (a)*(b) )
|
||||||
|
#define C_MUL(m,a,b) \
|
||||||
|
do{ (m).r = (a).r*(b).r - (a).i*(b).i;\
|
||||||
|
(m).i = (a).r*(b).i + (a).i*(b).r; }while(0)
|
||||||
|
|
||||||
|
#define C_MUL4(m,a,b) C_MUL(m,a,b)
|
||||||
|
|
||||||
|
# define C_FIXDIV(c,div) /* NOOP */
|
||||||
|
# define C_MULBYSCALAR( c, s ) \
|
||||||
|
do{ (c).r *= (s);\
|
||||||
|
(c).i *= (s); }while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CHECK_OVERFLOW_OP
|
||||||
|
# define CHECK_OVERFLOW_OP(a,op,b) /* noop */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define C_ADD( res, a,b)\
|
||||||
|
do { \
|
||||||
|
CHECK_OVERFLOW_OP((a).r,+,(b).r)\
|
||||||
|
CHECK_OVERFLOW_OP((a).i,+,(b).i)\
|
||||||
|
(res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \
|
||||||
|
}while(0)
|
||||||
|
#define C_SUB( res, a,b)\
|
||||||
|
do { \
|
||||||
|
CHECK_OVERFLOW_OP((a).r,-,(b).r)\
|
||||||
|
CHECK_OVERFLOW_OP((a).i,-,(b).i)\
|
||||||
|
(res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \
|
||||||
|
}while(0)
|
||||||
|
#define C_ADDTO( res , a)\
|
||||||
|
do { \
|
||||||
|
CHECK_OVERFLOW_OP((res).r,+,(a).r)\
|
||||||
|
CHECK_OVERFLOW_OP((res).i,+,(a).i)\
|
||||||
|
(res).r += (a).r; (res).i += (a).i;\
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
#define C_SUBFROM( res , a)\
|
||||||
|
do {\
|
||||||
|
CHECK_OVERFLOW_OP((res).r,-,(a).r)\
|
||||||
|
CHECK_OVERFLOW_OP((res).i,-,(a).i)\
|
||||||
|
(res).r -= (a).r; (res).i -= (a).i; \
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
# define KISS_FFT_COS(phase) floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase))))
|
||||||
|
# define KISS_FFT_SIN(phase) floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))
|
||||||
|
# define HALF_OF(x) ((x)>>1)
|
||||||
|
#elif defined(USE_SIMD)
|
||||||
|
# define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )
|
||||||
|
# define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )
|
||||||
|
# define HALF_OF(x) ((x)*_mm_set1_ps(.5))
|
||||||
|
#else
|
||||||
|
# define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase)
|
||||||
|
# define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)
|
||||||
|
# define HALF_OF(x) ((x)*.5)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define kf_cexp(x,phase) \
|
||||||
|
do{ \
|
||||||
|
(x)->r = KISS_FFT_COS(phase);\
|
||||||
|
(x)->i = KISS_FFT_SIN(phase);\
|
||||||
|
}while(0)
|
||||||
|
#define kf_cexp2(x,phase) \
|
||||||
|
do{ \
|
||||||
|
(x)->r = spx_cos_norm((phase));\
|
||||||
|
(x)->i = spx_cos_norm((phase)-32768);\
|
||||||
|
}while(0)
|
||||||
|
|
||||||
|
|
||||||
|
/* a debugging function */
|
||||||
|
#define pcpx(c)\
|
||||||
|
fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) )
|
232
libspeexdsp/arch.h
Normal file
232
libspeexdsp/arch.h
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file arch.h
|
||||||
|
@brief Various architecture definitions Speex
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ARCH_H
|
||||||
|
#define ARCH_H
|
||||||
|
|
||||||
|
/* A couple test to catch stupid option combinations */
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
|
||||||
|
#ifdef FLOATING_POINT
|
||||||
|
#error You cannot compile as floating point and fixed point at the same time
|
||||||
|
#endif
|
||||||
|
#ifdef _USE_SSE
|
||||||
|
#error SSE is only for floating-point
|
||||||
|
#endif
|
||||||
|
#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
|
||||||
|
#error Make up your mind. What CPU do you have?
|
||||||
|
#endif
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
#error Vorbis-psy model currently not implemented in fixed-point
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef FLOATING_POINT
|
||||||
|
#error You now need to define either FIXED_POINT or FLOATING_POINT
|
||||||
|
#endif
|
||||||
|
#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
|
||||||
|
#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
|
||||||
|
#endif
|
||||||
|
#ifdef FIXED_POINT_DEBUG
|
||||||
|
#error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef OUTSIDE_SPEEX
|
||||||
|
#include "speex/speexdsp_types.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
|
||||||
|
#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */
|
||||||
|
#define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 16-bit value. */
|
||||||
|
#define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */
|
||||||
|
#define ABS32(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 32-bit value. */
|
||||||
|
#define MIN32(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 32-bit value. */
|
||||||
|
#define MAX32(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 32-bit value. */
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
|
||||||
|
typedef spx_int16_t spx_word16_t;
|
||||||
|
typedef spx_int32_t spx_word32_t;
|
||||||
|
typedef spx_word32_t spx_mem_t;
|
||||||
|
typedef spx_word16_t spx_coef_t;
|
||||||
|
typedef spx_word16_t spx_lsp_t;
|
||||||
|
typedef spx_word32_t spx_sig_t;
|
||||||
|
|
||||||
|
#define Q15ONE 32767
|
||||||
|
|
||||||
|
#define LPC_SCALING 8192
|
||||||
|
#define SIG_SCALING 16384
|
||||||
|
#define LSP_SCALING 8192.
|
||||||
|
#define GAMMA_SCALING 32768.
|
||||||
|
#define GAIN_SCALING 64
|
||||||
|
#define GAIN_SCALING_1 0.015625
|
||||||
|
|
||||||
|
#define LPC_SHIFT 13
|
||||||
|
#define LSP_SHIFT 13
|
||||||
|
#define SIG_SHIFT 14
|
||||||
|
#define GAIN_SHIFT 6
|
||||||
|
|
||||||
|
#define VERY_SMALL 0
|
||||||
|
#define VERY_LARGE32 ((spx_word32_t)2147483647)
|
||||||
|
#define VERY_LARGE16 ((spx_word16_t)32767)
|
||||||
|
#define Q15_ONE ((spx_word16_t)32767)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef FIXED_DEBUG
|
||||||
|
#include "fixed_debug.h"
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include "fixed_generic.h"
|
||||||
|
|
||||||
|
#ifdef ARM5E_ASM
|
||||||
|
#include "fixed_arm5e.h"
|
||||||
|
#elif defined (ARM4_ASM)
|
||||||
|
#include "fixed_arm4.h"
|
||||||
|
#elif defined (BFIN_ASM)
|
||||||
|
#include "fixed_bfin.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
typedef float spx_mem_t;
|
||||||
|
typedef float spx_coef_t;
|
||||||
|
typedef float spx_lsp_t;
|
||||||
|
typedef float spx_sig_t;
|
||||||
|
typedef float spx_word16_t;
|
||||||
|
typedef float spx_word32_t;
|
||||||
|
|
||||||
|
#define Q15ONE 1.0f
|
||||||
|
#define LPC_SCALING 1.f
|
||||||
|
#define SIG_SCALING 1.f
|
||||||
|
#define LSP_SCALING 1.f
|
||||||
|
#define GAMMA_SCALING 1.f
|
||||||
|
#define GAIN_SCALING 1.f
|
||||||
|
#define GAIN_SCALING_1 1.f
|
||||||
|
|
||||||
|
|
||||||
|
#define VERY_SMALL 1e-15f
|
||||||
|
#define VERY_LARGE32 1e15f
|
||||||
|
#define VERY_LARGE16 1e15f
|
||||||
|
#define Q15_ONE ((spx_word16_t)1.f)
|
||||||
|
|
||||||
|
#define QCONST16(x,bits) (x)
|
||||||
|
#define QCONST32(x,bits) (x)
|
||||||
|
|
||||||
|
#define NEG16(x) (-(x))
|
||||||
|
#define NEG32(x) (-(x))
|
||||||
|
#define EXTRACT16(x) (x)
|
||||||
|
#define EXTEND32(x) (x)
|
||||||
|
#define SHR16(a,shift) (a)
|
||||||
|
#define SHL16(a,shift) (a)
|
||||||
|
#define SHR32(a,shift) (a)
|
||||||
|
#define SHL32(a,shift) (a)
|
||||||
|
#define PSHR16(a,shift) (a)
|
||||||
|
#define PSHR32(a,shift) (a)
|
||||||
|
#define VSHR32(a,shift) (a)
|
||||||
|
#define SATURATE16(x,a) (x)
|
||||||
|
#define SATURATE32(x,a) (x)
|
||||||
|
#define SATURATE32PSHR(x,shift,a) (x)
|
||||||
|
|
||||||
|
#define PSHR(a,shift) (a)
|
||||||
|
#define SHR(a,shift) (a)
|
||||||
|
#define SHL(a,shift) (a)
|
||||||
|
#define SATURATE(x,a) (x)
|
||||||
|
|
||||||
|
#define ADD16(a,b) ((a)+(b))
|
||||||
|
#define SUB16(a,b) ((a)-(b))
|
||||||
|
#define ADD32(a,b) ((a)+(b))
|
||||||
|
#define SUB32(a,b) ((a)-(b))
|
||||||
|
#define MULT16_16_16(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16(a,b) ((spx_word32_t)(a)*(spx_word32_t)(b))
|
||||||
|
#define MAC16_16(c,a,b) ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
|
||||||
|
|
||||||
|
#define MULT16_32_Q11(a,b) ((a)*(b))
|
||||||
|
#define MULT16_32_Q13(a,b) ((a)*(b))
|
||||||
|
#define MULT16_32_Q14(a,b) ((a)*(b))
|
||||||
|
#define MULT16_32_Q15(a,b) ((a)*(b))
|
||||||
|
#define MULT16_32_P15(a,b) ((a)*(b))
|
||||||
|
|
||||||
|
#define MAC16_32_Q11(c,a,b) ((c)+(a)*(b))
|
||||||
|
#define MAC16_32_Q15(c,a,b) ((c)+(a)*(b))
|
||||||
|
|
||||||
|
#define MAC16_16_Q11(c,a,b) ((c)+(a)*(b))
|
||||||
|
#define MAC16_16_Q13(c,a,b) ((c)+(a)*(b))
|
||||||
|
#define MAC16_16_P13(c,a,b) ((c)+(a)*(b))
|
||||||
|
#define MULT16_16_Q11_32(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16_Q13(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16_Q14(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16_Q15(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16_P15(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16_P13(a,b) ((a)*(b))
|
||||||
|
#define MULT16_16_P14(a,b) ((a)*(b))
|
||||||
|
|
||||||
|
#define DIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
|
||||||
|
#define PDIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
|
||||||
|
#define DIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
|
||||||
|
#define PDIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
|
||||||
|
|
||||||
|
/* 2 on TI C5x DSP */
|
||||||
|
#define BYTES_PER_CHAR 2
|
||||||
|
#define BITS_PER_CHAR 16
|
||||||
|
#define LOG2_BITS_PER_CHAR 4
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define BYTES_PER_CHAR 1
|
||||||
|
#define BITS_PER_CHAR 8
|
||||||
|
#define LOG2_BITS_PER_CHAR 3
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef FIXED_DEBUG
|
||||||
|
extern long long spx_mips;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
15
libspeexdsp/bfin.h
Normal file
15
libspeexdsp/bfin.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/* Common Blackfin assembly defines
|
||||||
|
*
|
||||||
|
* Copyright (C) 2005-2009 Analog Devices
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if __GNUC__ <= 3
|
||||||
|
/* GCC-3.4 and older did not use hardware loops and thus did not have
|
||||||
|
* register constraints for declaring clobbers.
|
||||||
|
*/
|
||||||
|
# define BFIN_HWLOOP0_REGS
|
||||||
|
# define BFIN_HWLOOP1_REGS
|
||||||
|
#else
|
||||||
|
# define BFIN_HWLOOP0_REGS , "LB0", "LT0", "LC0"
|
||||||
|
# define BFIN_HWLOOP1_REGS , "LB1", "LT1", "LC1"
|
||||||
|
#endif
|
176
libspeexdsp/buffer.c
Normal file
176
libspeexdsp/buffer.c
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/* Copyright (C) 2007 Jean-Marc Valin
|
||||||
|
|
||||||
|
File: buffer.c
|
||||||
|
This is a very simple ring buffer implementation. It is not thread-safe
|
||||||
|
so you need to do your own locking.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include "os_support.h"
|
||||||
|
#include "arch.h"
|
||||||
|
#include "speex/speex_buffer.h"
|
||||||
|
|
||||||
|
struct SpeexBuffer_ {
|
||||||
|
char *data;
|
||||||
|
int size;
|
||||||
|
int read_ptr;
|
||||||
|
int write_ptr;
|
||||||
|
int available;
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPORT SpeexBuffer *speex_buffer_init(int size)
|
||||||
|
{
|
||||||
|
SpeexBuffer *st = speex_alloc(sizeof(SpeexBuffer));
|
||||||
|
st->data = speex_alloc(size);
|
||||||
|
st->size = size;
|
||||||
|
st->read_ptr = 0;
|
||||||
|
st->write_ptr = 0;
|
||||||
|
st->available = 0;
|
||||||
|
return st;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT void speex_buffer_destroy(SpeexBuffer *st)
|
||||||
|
{
|
||||||
|
speex_free(st->data);
|
||||||
|
speex_free(st);
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT int speex_buffer_write(SpeexBuffer *st, void *_data, int len)
|
||||||
|
{
|
||||||
|
int end;
|
||||||
|
int end1;
|
||||||
|
char *data = _data;
|
||||||
|
if (len > st->size)
|
||||||
|
{
|
||||||
|
data += len-st->size;
|
||||||
|
len = st->size;
|
||||||
|
}
|
||||||
|
end = st->write_ptr + len;
|
||||||
|
end1 = end;
|
||||||
|
if (end1 > st->size)
|
||||||
|
end1 = st->size;
|
||||||
|
SPEEX_COPY(st->data + st->write_ptr, data, end1 - st->write_ptr);
|
||||||
|
if (end > st->size)
|
||||||
|
{
|
||||||
|
end -= st->size;
|
||||||
|
SPEEX_COPY(st->data, data+end1 - st->write_ptr, end);
|
||||||
|
}
|
||||||
|
st->available += len;
|
||||||
|
if (st->available > st->size)
|
||||||
|
{
|
||||||
|
st->available = st->size;
|
||||||
|
st->read_ptr = st->write_ptr;
|
||||||
|
}
|
||||||
|
st->write_ptr += len;
|
||||||
|
if (st->write_ptr > st->size)
|
||||||
|
st->write_ptr -= st->size;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT int speex_buffer_writezeros(SpeexBuffer *st, int len)
|
||||||
|
{
|
||||||
|
/* This is almost the same as for speex_buffer_write() but using
|
||||||
|
SPEEX_MEMSET() instead of SPEEX_COPY(). Update accordingly. */
|
||||||
|
int end;
|
||||||
|
int end1;
|
||||||
|
if (len > st->size)
|
||||||
|
{
|
||||||
|
len = st->size;
|
||||||
|
}
|
||||||
|
end = st->write_ptr + len;
|
||||||
|
end1 = end;
|
||||||
|
if (end1 > st->size)
|
||||||
|
end1 = st->size;
|
||||||
|
SPEEX_MEMSET(st->data + st->write_ptr, 0, end1 - st->write_ptr);
|
||||||
|
if (end > st->size)
|
||||||
|
{
|
||||||
|
end -= st->size;
|
||||||
|
SPEEX_MEMSET(st->data, 0, end);
|
||||||
|
}
|
||||||
|
st->available += len;
|
||||||
|
if (st->available > st->size)
|
||||||
|
{
|
||||||
|
st->available = st->size;
|
||||||
|
st->read_ptr = st->write_ptr;
|
||||||
|
}
|
||||||
|
st->write_ptr += len;
|
||||||
|
if (st->write_ptr > st->size)
|
||||||
|
st->write_ptr -= st->size;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT int speex_buffer_read(SpeexBuffer *st, void *_data, int len)
|
||||||
|
{
|
||||||
|
int end, end1;
|
||||||
|
char *data = _data;
|
||||||
|
if (len > st->available)
|
||||||
|
{
|
||||||
|
SPEEX_MEMSET(data+st->available, 0, st->size-st->available);
|
||||||
|
len = st->available;
|
||||||
|
}
|
||||||
|
end = st->read_ptr + len;
|
||||||
|
end1 = end;
|
||||||
|
if (end1 > st->size)
|
||||||
|
end1 = st->size;
|
||||||
|
SPEEX_COPY(data, st->data + st->read_ptr, end1 - st->read_ptr);
|
||||||
|
|
||||||
|
if (end > st->size)
|
||||||
|
{
|
||||||
|
end -= st->size;
|
||||||
|
SPEEX_COPY(data+end1 - st->read_ptr, st->data, end);
|
||||||
|
}
|
||||||
|
st->available -= len;
|
||||||
|
st->read_ptr += len;
|
||||||
|
if (st->read_ptr > st->size)
|
||||||
|
st->read_ptr -= st->size;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT int speex_buffer_get_available(SpeexBuffer *st)
|
||||||
|
{
|
||||||
|
return st->available;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT int speex_buffer_resize(SpeexBuffer *st, int len)
|
||||||
|
{
|
||||||
|
int old_len = st->size;
|
||||||
|
if (len > old_len)
|
||||||
|
{
|
||||||
|
st->data = speex_realloc(st->data, len);
|
||||||
|
/* FIXME: move data/pointers properly for growing the buffer */
|
||||||
|
} else {
|
||||||
|
/* FIXME: move data/pointers properly for shrinking the buffer */
|
||||||
|
st->data = speex_realloc(st->data, len);
|
||||||
|
}
|
||||||
|
return len;
|
||||||
|
}
|
72
libspeexdsp/echo_diagnostic.m
Normal file
72
libspeexdsp/echo_diagnostic.m
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
% Attempts to diagnose AEC problems from recorded samples
|
||||||
|
%
|
||||||
|
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
|
||||||
|
%
|
||||||
|
% Computes the full matrix inversion to cancel echo from the
|
||||||
|
% recording 'rec_file' using the far end signal 'play_file' using
|
||||||
|
% a filter length of 'tail_length'. The output is saved to 'out_file'.
|
||||||
|
function out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
|
||||||
|
|
||||||
|
F=fopen(rec_file,'rb');
|
||||||
|
rec=fread(F,Inf,'short');
|
||||||
|
fclose (F);
|
||||||
|
F=fopen(play_file,'rb');
|
||||||
|
play=fread(F,Inf,'short');
|
||||||
|
fclose (F);
|
||||||
|
|
||||||
|
rec = [rec; zeros(1024,1)];
|
||||||
|
play = [play; zeros(1024,1)];
|
||||||
|
|
||||||
|
N = length(rec);
|
||||||
|
corr = real(ifft(fft(rec).*conj(fft(play))));
|
||||||
|
acorr = real(ifft(fft(play).*conj(fft(play))));
|
||||||
|
|
||||||
|
[a,b] = max(corr);
|
||||||
|
|
||||||
|
if b > N/2
|
||||||
|
b = b-N;
|
||||||
|
end
|
||||||
|
printf ("Far end to near end delay is %d samples\n", b);
|
||||||
|
if (b > .3*tail_length)
|
||||||
|
printf ('This is too much delay, try delaying the far-end signal a bit\n');
|
||||||
|
else if (b < 0)
|
||||||
|
printf ('You have a negative delay, the echo canceller has no chance to cancel anything!\n');
|
||||||
|
else
|
||||||
|
printf ('Delay looks OK.\n');
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
N2 = round(N/2);
|
||||||
|
corr1 = real(ifft(fft(rec(1:N2)).*conj(fft(play(1:N2)))));
|
||||||
|
corr2 = real(ifft(fft(rec(N2+1:end)).*conj(fft(play(N2+1:end)))));
|
||||||
|
|
||||||
|
[a,b1] = max(corr1);
|
||||||
|
if b1 > N2/2
|
||||||
|
b1 = b1-N2;
|
||||||
|
end
|
||||||
|
[a,b2] = max(corr2);
|
||||||
|
if b2 > N2/2
|
||||||
|
b2 = b2-N2;
|
||||||
|
end
|
||||||
|
drift = (b1-b2)/N2;
|
||||||
|
printf ('Drift estimate is %f%% (%d samples)\n', 100*drift, b1-b2);
|
||||||
|
if abs(b1-b2) < 10
|
||||||
|
printf ('A drift of a few (+-10) samples is normal.\n');
|
||||||
|
else
|
||||||
|
if abs(b1-b2) < 30
|
||||||
|
printf ('There may be (not sure) excessive clock drift. Is the capture and playback done on the same soundcard?\n');
|
||||||
|
else
|
||||||
|
printf ('Your clock is drifting! No way the AEC will be able to do anything with that. Most likely, you''re doing capture and playback from two different cards.\n');
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
acorr(1) = .001+1.00001*acorr(1);
|
||||||
|
AtA = toeplitz(acorr(1:tail_length));
|
||||||
|
bb = corr(1:tail_length);
|
||||||
|
h = AtA\bb;
|
||||||
|
|
||||||
|
out = (rec - filter(h, 1, play));
|
||||||
|
|
||||||
|
F=fopen(out_file,'w');
|
||||||
|
fwrite(F,out,'short');
|
||||||
|
fclose (F);
|
448
libspeexdsp/fftwrap.c
Normal file
448
libspeexdsp/fftwrap.c
Normal file
@ -0,0 +1,448 @@
|
|||||||
|
/* Copyright (C) 2005-2006 Jean-Marc Valin
|
||||||
|
File: fftwrap.c
|
||||||
|
|
||||||
|
Wrapper for various FFTs
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
#include "os_support.h"
|
||||||
|
|
||||||
|
#define MAX_FFT_SIZE 2048
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len)
|
||||||
|
{
|
||||||
|
int i, shift;
|
||||||
|
spx_word16_t max_val = 0;
|
||||||
|
for (i=0;i<len;i++)
|
||||||
|
{
|
||||||
|
if (in[i]>max_val)
|
||||||
|
max_val = in[i];
|
||||||
|
if (-in[i]>max_val)
|
||||||
|
max_val = -in[i];
|
||||||
|
}
|
||||||
|
shift=0;
|
||||||
|
while (max_val <= (bound>>1) && max_val != 0)
|
||||||
|
{
|
||||||
|
max_val <<= 1;
|
||||||
|
shift++;
|
||||||
|
}
|
||||||
|
for (i=0;i<len;i++)
|
||||||
|
{
|
||||||
|
out[i] = SHL16(in[i], shift);
|
||||||
|
}
|
||||||
|
return shift;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<len;i++)
|
||||||
|
{
|
||||||
|
out[i] = PSHR16(in[i], shift);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_SMALLFT
|
||||||
|
|
||||||
|
#include "smallft.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
void *spx_fft_init(int size)
|
||||||
|
{
|
||||||
|
struct drft_lookup *table;
|
||||||
|
table = speex_alloc(sizeof(struct drft_lookup));
|
||||||
|
spx_drft_init((struct drft_lookup *)table, size);
|
||||||
|
return (void*)table;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft_destroy(void *table)
|
||||||
|
{
|
||||||
|
spx_drft_clear(table);
|
||||||
|
speex_free(table);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft(void *table, float *in, float *out)
|
||||||
|
{
|
||||||
|
if (in==out)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float scale = 1./((struct drft_lookup *)table)->n;
|
||||||
|
speex_warning("FFT should not be done in-place");
|
||||||
|
for (i=0;i<((struct drft_lookup *)table)->n;i++)
|
||||||
|
out[i] = scale*in[i];
|
||||||
|
} else {
|
||||||
|
int i;
|
||||||
|
float scale = 1./((struct drft_lookup *)table)->n;
|
||||||
|
for (i=0;i<((struct drft_lookup *)table)->n;i++)
|
||||||
|
out[i] = scale*in[i];
|
||||||
|
}
|
||||||
|
spx_drft_forward((struct drft_lookup *)table, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_ifft(void *table, float *in, float *out)
|
||||||
|
{
|
||||||
|
if (in==out)
|
||||||
|
{
|
||||||
|
speex_warning("FFT should not be done in-place");
|
||||||
|
} else {
|
||||||
|
int i;
|
||||||
|
for (i=0;i<((struct drft_lookup *)table)->n;i++)
|
||||||
|
out[i] = in[i];
|
||||||
|
}
|
||||||
|
spx_drft_backward((struct drft_lookup *)table, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(USE_INTEL_MKL)
|
||||||
|
#include <mkl.h>
|
||||||
|
|
||||||
|
struct mkl_config {
|
||||||
|
DFTI_DESCRIPTOR_HANDLE desc;
|
||||||
|
int N;
|
||||||
|
};
|
||||||
|
|
||||||
|
void *spx_fft_init(int size)
|
||||||
|
{
|
||||||
|
struct mkl_config *table = (struct mkl_config *) speex_alloc(sizeof(struct mkl_config));
|
||||||
|
table->N = size;
|
||||||
|
DftiCreateDescriptor(&table->desc, DFTI_SINGLE, DFTI_REAL, 1, size);
|
||||||
|
DftiSetValue(table->desc, DFTI_PACKED_FORMAT, DFTI_PACK_FORMAT);
|
||||||
|
DftiSetValue(table->desc, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
|
||||||
|
DftiSetValue(table->desc, DFTI_FORWARD_SCALE, 1.0f / size);
|
||||||
|
DftiCommitDescriptor(table->desc);
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft_destroy(void *table)
|
||||||
|
{
|
||||||
|
struct mkl_config *t = (struct mkl_config *) table;
|
||||||
|
DftiFreeDescriptor(t->desc);
|
||||||
|
speex_free(table);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
struct mkl_config *t = (struct mkl_config *) table;
|
||||||
|
DftiComputeForward(t->desc, in, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
struct mkl_config *t = (struct mkl_config *) table;
|
||||||
|
DftiComputeBackward(t->desc, in, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(USE_INTEL_IPP)
|
||||||
|
|
||||||
|
#include <ipps.h>
|
||||||
|
|
||||||
|
struct ipp_fft_config
|
||||||
|
{
|
||||||
|
IppsDFTSpec_R_32f *dftSpec;
|
||||||
|
Ipp8u *buffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
void *spx_fft_init(int size)
|
||||||
|
{
|
||||||
|
int bufferSize = 0;
|
||||||
|
int hint;
|
||||||
|
struct ipp_fft_config *table;
|
||||||
|
|
||||||
|
table = (struct ipp_fft_config *)speex_alloc(sizeof(struct ipp_fft_config));
|
||||||
|
|
||||||
|
/* there appears to be no performance difference between ippAlgHintFast and
|
||||||
|
ippAlgHintAccurate when using the with the floating point version
|
||||||
|
of the fft. */
|
||||||
|
hint = ippAlgHintAccurate;
|
||||||
|
|
||||||
|
ippsDFTInitAlloc_R_32f(&table->dftSpec, size, IPP_FFT_DIV_FWD_BY_N, hint);
|
||||||
|
|
||||||
|
ippsDFTGetBufSize_R_32f(table->dftSpec, &bufferSize);
|
||||||
|
table->buffer = ippsMalloc_8u(bufferSize);
|
||||||
|
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft_destroy(void *table)
|
||||||
|
{
|
||||||
|
struct ipp_fft_config *t = (struct ipp_fft_config *)table;
|
||||||
|
ippsFree(t->buffer);
|
||||||
|
ippsDFTFree_R_32f(t->dftSpec);
|
||||||
|
speex_free(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
struct ipp_fft_config *t = (struct ipp_fft_config *)table;
|
||||||
|
ippsDFTFwd_RToPack_32f(in, out, t->dftSpec, t->buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
struct ipp_fft_config *t = (struct ipp_fft_config *)table;
|
||||||
|
ippsDFTInv_PackToR_32f(in, out, t->dftSpec, t->buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(USE_GPL_FFTW3)
|
||||||
|
|
||||||
|
#include <fftw3.h>
|
||||||
|
|
||||||
|
struct fftw_config {
|
||||||
|
float *in;
|
||||||
|
float *out;
|
||||||
|
fftwf_plan fft;
|
||||||
|
fftwf_plan ifft;
|
||||||
|
int N;
|
||||||
|
};
|
||||||
|
|
||||||
|
void *spx_fft_init(int size)
|
||||||
|
{
|
||||||
|
struct fftw_config *table = (struct fftw_config *) speex_alloc(sizeof(struct fftw_config));
|
||||||
|
table->in = fftwf_malloc(sizeof(float) * (size+2));
|
||||||
|
table->out = fftwf_malloc(sizeof(float) * (size+2));
|
||||||
|
|
||||||
|
table->fft = fftwf_plan_dft_r2c_1d(size, table->in, (fftwf_complex *) table->out, FFTW_PATIENT);
|
||||||
|
table->ifft = fftwf_plan_dft_c2r_1d(size, (fftwf_complex *) table->in, table->out, FFTW_PATIENT);
|
||||||
|
|
||||||
|
table->N = size;
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft_destroy(void *table)
|
||||||
|
{
|
||||||
|
struct fftw_config *t = (struct fftw_config *) table;
|
||||||
|
fftwf_destroy_plan(t->fft);
|
||||||
|
fftwf_destroy_plan(t->ifft);
|
||||||
|
fftwf_free(t->in);
|
||||||
|
fftwf_free(t->out);
|
||||||
|
speex_free(table);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct fftw_config *t = (struct fftw_config *) table;
|
||||||
|
const int N = t->N;
|
||||||
|
float *iptr = t->in;
|
||||||
|
float *optr = t->out;
|
||||||
|
const float m = 1.0 / N;
|
||||||
|
for(i=0;i<N;++i)
|
||||||
|
iptr[i]=in[i] * m;
|
||||||
|
|
||||||
|
fftwf_execute(t->fft);
|
||||||
|
|
||||||
|
out[0] = optr[0];
|
||||||
|
for(i=1;i<N;++i)
|
||||||
|
out[i] = optr[i+1];
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct fftw_config *t = (struct fftw_config *) table;
|
||||||
|
const int N = t->N;
|
||||||
|
float *iptr = t->in;
|
||||||
|
float *optr = t->out;
|
||||||
|
|
||||||
|
iptr[0] = in[0];
|
||||||
|
iptr[1] = 0.0f;
|
||||||
|
for(i=1;i<N;++i)
|
||||||
|
iptr[i+1] = in[i];
|
||||||
|
iptr[N+1] = 0.0f;
|
||||||
|
|
||||||
|
fftwf_execute(t->ifft);
|
||||||
|
|
||||||
|
for(i=0;i<N;++i)
|
||||||
|
out[i] = optr[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(USE_KISS_FFT)
|
||||||
|
|
||||||
|
#include "kiss_fftr.h"
|
||||||
|
#include "kiss_fft.h"
|
||||||
|
|
||||||
|
struct kiss_config {
|
||||||
|
kiss_fftr_cfg forward;
|
||||||
|
kiss_fftr_cfg backward;
|
||||||
|
int N;
|
||||||
|
};
|
||||||
|
|
||||||
|
void *spx_fft_init(int size)
|
||||||
|
{
|
||||||
|
struct kiss_config *table;
|
||||||
|
table = (struct kiss_config*)speex_alloc(sizeof(struct kiss_config));
|
||||||
|
table->forward = kiss_fftr_alloc(size,0,NULL,NULL);
|
||||||
|
table->backward = kiss_fftr_alloc(size,1,NULL,NULL);
|
||||||
|
table->N = size;
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_fft_destroy(void *table)
|
||||||
|
{
|
||||||
|
struct kiss_config *t = (struct kiss_config *)table;
|
||||||
|
kiss_fftr_free(t->forward);
|
||||||
|
kiss_fftr_free(t->backward);
|
||||||
|
speex_free(table);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
|
||||||
|
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
int shift;
|
||||||
|
struct kiss_config *t = (struct kiss_config *)table;
|
||||||
|
shift = maximize_range(in, in, 32000, t->N);
|
||||||
|
kiss_fftr2(t->forward, in, out);
|
||||||
|
renorm_range(in, in, shift, t->N);
|
||||||
|
renorm_range(out, out, shift, t->N);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float scale;
|
||||||
|
struct kiss_config *t = (struct kiss_config *)table;
|
||||||
|
scale = 1./t->N;
|
||||||
|
kiss_fftr2(t->forward, in, out);
|
||||||
|
for (i=0;i<t->N;i++)
|
||||||
|
out[i] *= scale;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||||
|
{
|
||||||
|
struct kiss_config *t = (struct kiss_config *)table;
|
||||||
|
kiss_fftri2(t->backward, in, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#error No other FFT implemented
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
/*#include "smallft.h"*/
|
||||||
|
|
||||||
|
|
||||||
|
void spx_fft_float(void *table, float *in, float *out)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
#ifdef USE_SMALLFT
|
||||||
|
int N = ((struct drft_lookup *)table)->n;
|
||||||
|
#elif defined(USE_KISS_FFT)
|
||||||
|
int N = ((struct kiss_config *)table)->N;
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
#ifdef VAR_ARRAYS
|
||||||
|
spx_word16_t _in[N];
|
||||||
|
spx_word16_t _out[N];
|
||||||
|
#else
|
||||||
|
spx_word16_t _in[MAX_FFT_SIZE];
|
||||||
|
spx_word16_t _out[MAX_FFT_SIZE];
|
||||||
|
#endif
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
_in[i] = (int)floor(.5+in[i]);
|
||||||
|
spx_fft(table, _in, _out);
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
out[i] = _out[i];
|
||||||
|
#if 0
|
||||||
|
if (!fixed_point)
|
||||||
|
{
|
||||||
|
float scale;
|
||||||
|
struct drft_lookup t;
|
||||||
|
spx_drft_init(&t, ((struct kiss_config *)table)->N);
|
||||||
|
scale = 1./((struct kiss_config *)table)->N;
|
||||||
|
for (i=0;i<((struct kiss_config *)table)->N;i++)
|
||||||
|
out[i] = scale*in[i];
|
||||||
|
spx_drft_forward(&t, out);
|
||||||
|
spx_drft_clear(&t);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void spx_ifft_float(void *table, float *in, float *out)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
#ifdef USE_SMALLFT
|
||||||
|
int N = ((struct drft_lookup *)table)->n;
|
||||||
|
#elif defined(USE_KISS_FFT)
|
||||||
|
int N = ((struct kiss_config *)table)->N;
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
#ifdef VAR_ARRAYS
|
||||||
|
spx_word16_t _in[N];
|
||||||
|
spx_word16_t _out[N];
|
||||||
|
#else
|
||||||
|
spx_word16_t _in[MAX_FFT_SIZE];
|
||||||
|
spx_word16_t _out[MAX_FFT_SIZE];
|
||||||
|
#endif
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
_in[i] = (int)floor(.5+in[i]);
|
||||||
|
spx_ifft(table, _in, _out);
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
out[i] = _out[i];
|
||||||
|
#if 0
|
||||||
|
if (!fixed_point)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct drft_lookup t;
|
||||||
|
spx_drft_init(&t, ((struct kiss_config *)table)->N);
|
||||||
|
for (i=0;i<((struct kiss_config *)table)->N;i++)
|
||||||
|
out[i] = in[i];
|
||||||
|
spx_drft_backward(&t, out);
|
||||||
|
spx_drft_clear(&t);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void spx_fft_float(void *table, float *in, float *out)
|
||||||
|
{
|
||||||
|
spx_fft(table, in, out);
|
||||||
|
}
|
||||||
|
void spx_ifft_float(void *table, float *in, float *out)
|
||||||
|
{
|
||||||
|
spx_ifft(table, in, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
58
libspeexdsp/fftwrap.h
Normal file
58
libspeexdsp/fftwrap.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/* Copyright (C) 2005 Jean-Marc Valin
|
||||||
|
File: fftwrap.h
|
||||||
|
|
||||||
|
Wrapper for various FFTs
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FFTWRAP_H
|
||||||
|
#define FFTWRAP_H
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
|
||||||
|
/** Compute tables for an FFT */
|
||||||
|
void *spx_fft_init(int size);
|
||||||
|
|
||||||
|
/** Destroy tables for an FFT */
|
||||||
|
void spx_fft_destroy(void *table);
|
||||||
|
|
||||||
|
/** Forward (real to half-complex) transform */
|
||||||
|
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out);
|
||||||
|
|
||||||
|
/** Backward (half-complex to real) transform */
|
||||||
|
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out);
|
||||||
|
|
||||||
|
/** Forward (real to half-complex) transform of float data */
|
||||||
|
void spx_fft_float(void *table, float *in, float *out);
|
||||||
|
|
||||||
|
/** Backward (half-complex to real) transform of float data */
|
||||||
|
void spx_ifft_float(void *table, float *in, float *out);
|
||||||
|
|
||||||
|
#endif
|
227
libspeexdsp/filterbank.c
Normal file
227
libspeexdsp/filterbank.c
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
/* Copyright (C) 2006 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file filterbank.c
|
||||||
|
@brief Converting between psd and filterbank
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "filterbank.h"
|
||||||
|
#include "arch.h"
|
||||||
|
#include <math.h>
|
||||||
|
#include "math_approx.h"
|
||||||
|
#include "os_support.h"
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
|
||||||
|
#define toBARK(n) (MULT16_16(26829,spx_atan(SHR32(MULT16_16(97,n),2))) + MULT16_16(4588,spx_atan(MULT16_32_Q15(20,MULT16_16(n,n)))) + MULT16_16(3355,n))
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define toMEL(n) (2595.f*log10(1.f+(n)/700.f))
|
||||||
|
|
||||||
|
FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type)
|
||||||
|
{
|
||||||
|
FilterBank *bank;
|
||||||
|
spx_word32_t df;
|
||||||
|
spx_word32_t max_mel, mel_interval;
|
||||||
|
int i;
|
||||||
|
int id1;
|
||||||
|
int id2;
|
||||||
|
df = DIV32(SHL32(sampling,15),MULT16_16(2,len));
|
||||||
|
max_mel = toBARK(EXTRACT16(sampling/2));
|
||||||
|
mel_interval = PDIV32(max_mel,banks-1);
|
||||||
|
|
||||||
|
bank = (FilterBank*)speex_alloc(sizeof(FilterBank));
|
||||||
|
bank->nb_banks = banks;
|
||||||
|
bank->len = len;
|
||||||
|
bank->bank_left = (int*)speex_alloc(len*sizeof(int));
|
||||||
|
bank->bank_right = (int*)speex_alloc(len*sizeof(int));
|
||||||
|
bank->filter_left = (spx_word16_t*)speex_alloc(len*sizeof(spx_word16_t));
|
||||||
|
bank->filter_right = (spx_word16_t*)speex_alloc(len*sizeof(spx_word16_t));
|
||||||
|
/* Think I can safely disable normalisation that for fixed-point (and probably float as well) */
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
bank->scaling = (float*)speex_alloc(banks*sizeof(float));
|
||||||
|
#endif
|
||||||
|
for (i=0;i<len;i++)
|
||||||
|
{
|
||||||
|
spx_word16_t curr_freq;
|
||||||
|
spx_word32_t mel;
|
||||||
|
spx_word16_t val;
|
||||||
|
curr_freq = EXTRACT16(MULT16_32_P15(i,df));
|
||||||
|
mel = toBARK(curr_freq);
|
||||||
|
if (mel > max_mel)
|
||||||
|
break;
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
id1 = DIV32(mel,mel_interval);
|
||||||
|
#else
|
||||||
|
id1 = (int)(floor(mel/mel_interval));
|
||||||
|
#endif
|
||||||
|
if (id1>banks-2)
|
||||||
|
{
|
||||||
|
id1 = banks-2;
|
||||||
|
val = Q15_ONE;
|
||||||
|
} else {
|
||||||
|
val = DIV32_16(mel - id1*mel_interval,EXTRACT16(PSHR32(mel_interval,15)));
|
||||||
|
}
|
||||||
|
id2 = id1+1;
|
||||||
|
bank->bank_left[i] = id1;
|
||||||
|
bank->filter_left[i] = SUB16(Q15_ONE,val);
|
||||||
|
bank->bank_right[i] = id2;
|
||||||
|
bank->filter_right[i] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Think I can safely disable normalisation for fixed-point (and probably float as well) */
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
for (i=0;i<bank->nb_banks;i++)
|
||||||
|
bank->scaling[i] = 0;
|
||||||
|
for (i=0;i<bank->len;i++)
|
||||||
|
{
|
||||||
|
int id = bank->bank_left[i];
|
||||||
|
bank->scaling[id] += bank->filter_left[i];
|
||||||
|
id = bank->bank_right[i];
|
||||||
|
bank->scaling[id] += bank->filter_right[i];
|
||||||
|
}
|
||||||
|
for (i=0;i<bank->nb_banks;i++)
|
||||||
|
bank->scaling[i] = Q15_ONE/(bank->scaling[i]);
|
||||||
|
#endif
|
||||||
|
return bank;
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterbank_destroy(FilterBank *bank)
|
||||||
|
{
|
||||||
|
speex_free(bank->bank_left);
|
||||||
|
speex_free(bank->bank_right);
|
||||||
|
speex_free(bank->filter_left);
|
||||||
|
speex_free(bank->filter_right);
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
speex_free(bank->scaling);
|
||||||
|
#endif
|
||||||
|
speex_free(bank);
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<bank->nb_banks;i++)
|
||||||
|
mel[i] = 0;
|
||||||
|
|
||||||
|
for (i=0;i<bank->len;i++)
|
||||||
|
{
|
||||||
|
int id;
|
||||||
|
id = bank->bank_left[i];
|
||||||
|
mel[id] += MULT16_32_P15(bank->filter_left[i],ps[i]);
|
||||||
|
id = bank->bank_right[i];
|
||||||
|
mel[id] += MULT16_32_P15(bank->filter_right[i],ps[i]);
|
||||||
|
}
|
||||||
|
/* Think I can safely disable normalisation that for fixed-point (and probably float as well) */
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
/*for (i=0;i<bank->nb_banks;i++)
|
||||||
|
mel[i] = MULT16_32_P15(Q15(bank->scaling[i]),mel[i]);
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *ps)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<bank->len;i++)
|
||||||
|
{
|
||||||
|
spx_word32_t tmp;
|
||||||
|
int id1, id2;
|
||||||
|
id1 = bank->bank_left[i];
|
||||||
|
id2 = bank->bank_right[i];
|
||||||
|
tmp = MULT16_16(mel[id1],bank->filter_left[i]);
|
||||||
|
tmp += MULT16_16(mel[id2],bank->filter_right[i]);
|
||||||
|
ps[i] = EXTRACT16(PSHR32(tmp,15));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
void filterbank_compute_bank(FilterBank *bank, float *ps, float *mel)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<bank->nb_banks;i++)
|
||||||
|
mel[i] = 0;
|
||||||
|
|
||||||
|
for (i=0;i<bank->len;i++)
|
||||||
|
{
|
||||||
|
int id = bank->bank_left[i];
|
||||||
|
mel[id] += bank->filter_left[i]*ps[i];
|
||||||
|
id = bank->bank_right[i];
|
||||||
|
mel[id] += bank->filter_right[i]*ps[i];
|
||||||
|
}
|
||||||
|
for (i=0;i<bank->nb_banks;i++)
|
||||||
|
mel[i] *= bank->scaling[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterbank_compute_psd(FilterBank *bank, float *mel, float *ps)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<bank->len;i++)
|
||||||
|
{
|
||||||
|
int id = bank->bank_left[i];
|
||||||
|
ps[i] = mel[id]*bank->filter_left[i];
|
||||||
|
id = bank->bank_right[i];
|
||||||
|
ps[i] += mel[id]*bank->filter_right[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void filterbank_psy_smooth(FilterBank *bank, float *ps, float *mask)
|
||||||
|
{
|
||||||
|
/* Low freq slope: 14 dB/Bark*/
|
||||||
|
/* High freq slope: 9 dB/Bark*/
|
||||||
|
/* Noise vs tone: 5 dB difference */
|
||||||
|
/* FIXME: Temporary kludge */
|
||||||
|
float bark[100];
|
||||||
|
int i;
|
||||||
|
/* Assumes 1/3 Bark resolution */
|
||||||
|
float decay_low = 0.34145f;
|
||||||
|
float decay_high = 0.50119f;
|
||||||
|
filterbank_compute_bank(bank, ps, bark);
|
||||||
|
for (i=1;i<bank->nb_banks;i++)
|
||||||
|
{
|
||||||
|
/*float decay_high = 13-1.6*log10(bark[i-1]);
|
||||||
|
decay_high = pow(10,(-decay_high/30.f));*/
|
||||||
|
bark[i] = bark[i] + decay_high*bark[i-1];
|
||||||
|
}
|
||||||
|
for (i=bank->nb_banks-2;i>=0;i--)
|
||||||
|
{
|
||||||
|
bark[i] = bark[i] + decay_low*bark[i+1];
|
||||||
|
}
|
||||||
|
filterbank_compute_psd(bank, bark, mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
66
libspeexdsp/filterbank.h
Normal file
66
libspeexdsp/filterbank.h
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/* Copyright (C) 2006 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file filterbank.h
|
||||||
|
@brief Converting between psd and filterbank
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FILTERBANK_H
|
||||||
|
#define FILTERBANK_H
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int *bank_left;
|
||||||
|
int *bank_right;
|
||||||
|
spx_word16_t *filter_left;
|
||||||
|
spx_word16_t *filter_right;
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
float *scaling;
|
||||||
|
#endif
|
||||||
|
int nb_banks;
|
||||||
|
int len;
|
||||||
|
} FilterBank;
|
||||||
|
|
||||||
|
|
||||||
|
FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type);
|
||||||
|
|
||||||
|
void filterbank_destroy(FilterBank *bank);
|
||||||
|
|
||||||
|
void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel);
|
||||||
|
|
||||||
|
void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd);
|
||||||
|
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel);
|
||||||
|
void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
148
libspeexdsp/fixed_arm4.h
Normal file
148
libspeexdsp/fixed_arm4.h
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
/* Copyright (C) 2004 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file fixed_arm4.h
|
||||||
|
@brief ARM4 fixed-point operations
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FIXED_ARM4_H
|
||||||
|
#define FIXED_ARM4_H
|
||||||
|
|
||||||
|
#undef MULT16_32_Q14
|
||||||
|
static inline spx_word32_t MULT16_32_Q14(spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
int dummy;
|
||||||
|
asm (
|
||||||
|
"smull %0,%1,%2,%3 \n\t"
|
||||||
|
"mov %0, %0, lsr #14 \n\t"
|
||||||
|
"add %0, %0, %1, lsl #18 \n\t"
|
||||||
|
: "=&r"(res), "=&r" (dummy)
|
||||||
|
: "r"(y),"r"((int)x));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MULT16_32_Q15
|
||||||
|
static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
int dummy;
|
||||||
|
asm (
|
||||||
|
"smull %0,%1,%2,%3 \n\t"
|
||||||
|
"mov %0, %0, lsr #15 \n\t"
|
||||||
|
"add %0, %0, %1, lsl #17 \n\t"
|
||||||
|
: "=&r"(res), "=&r" (dummy)
|
||||||
|
: "r"(y),"r"((int)x));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef DIV32_16
|
||||||
|
static inline short DIV32_16(int a, int b)
|
||||||
|
{
|
||||||
|
int res=0;
|
||||||
|
int dead1, dead2, dead3, dead4, dead5;
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"\teor %5, %0, %1\n"
|
||||||
|
"\tmovs %4, %0\n"
|
||||||
|
"\trsbmi %0, %0, #0 \n"
|
||||||
|
"\tmovs %4, %1\n"
|
||||||
|
"\trsbmi %1, %1, #0 \n"
|
||||||
|
"\tmov %4, #1\n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #14 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #14 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #13 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #13 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #12 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #12 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #11 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #11 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #10 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #10 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #9 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #9 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #8 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #8 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #7 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #7 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #6 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #6 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #5 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #5 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #4 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #4 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #3 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #2 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #2 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #1 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #1 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
"\torrpl %2, %2, %4 \n"
|
||||||
|
|
||||||
|
"\tmovs %5, %5, lsr #31 \n"
|
||||||
|
"\trsbne %2, %2, #0 \n"
|
||||||
|
: "=r" (dead1), "=r" (dead2), "=r" (res),
|
||||||
|
"=r" (dead3), "=r" (dead4), "=r" (dead5)
|
||||||
|
: "0" (a), "1" (b), "2" (res)
|
||||||
|
: "cc"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
178
libspeexdsp/fixed_arm5e.h
Normal file
178
libspeexdsp/fixed_arm5e.h
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file fixed_arm5e.h
|
||||||
|
@brief ARM-tuned fixed-point operations
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FIXED_ARM5E_H
|
||||||
|
#define FIXED_ARM5E_H
|
||||||
|
|
||||||
|
#undef MULT16_16
|
||||||
|
static inline spx_word32_t MULT16_16(spx_word16_t x, spx_word16_t y) {
|
||||||
|
int res;
|
||||||
|
asm ("smulbb %0,%1,%2;\n"
|
||||||
|
: "=&r"(res)
|
||||||
|
: "%r"(x),"r"(y));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MAC16_16
|
||||||
|
static inline spx_word32_t MAC16_16(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
asm ("smlabb %0,%1,%2,%3;\n"
|
||||||
|
: "=&r"(res)
|
||||||
|
: "%r"(x),"r"(y),"r"(a));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MULT16_32_Q15
|
||||||
|
static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
asm ("smulwb %0,%1,%2;\n"
|
||||||
|
: "=&r"(res)
|
||||||
|
: "%r"(y<<1),"r"(x));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MAC16_32_Q15
|
||||||
|
static inline spx_word32_t MAC16_32_Q15(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
asm ("smlawb %0,%1,%2,%3;\n"
|
||||||
|
: "=&r"(res)
|
||||||
|
: "%r"(y<<1),"r"(x),"r"(a));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MULT16_32_Q11
|
||||||
|
static inline spx_word32_t MULT16_32_Q11(spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
asm ("smulwb %0,%1,%2;\n"
|
||||||
|
: "=&r"(res)
|
||||||
|
: "%r"(y<<5),"r"(x));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MAC16_32_Q11
|
||||||
|
static inline spx_word32_t MAC16_32_Q11(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
|
||||||
|
int res;
|
||||||
|
asm ("smlawb %0,%1,%2,%3;\n"
|
||||||
|
: "=&r"(res)
|
||||||
|
: "%r"(y<<5),"r"(x),"r"(a));
|
||||||
|
return(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef DIV32_16
|
||||||
|
static inline short DIV32_16(int a, int b)
|
||||||
|
{
|
||||||
|
int res=0;
|
||||||
|
int dead1, dead2, dead3, dead4, dead5;
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"\teor %5, %0, %1\n"
|
||||||
|
"\tmovs %4, %0\n"
|
||||||
|
"\trsbmi %0, %0, #0 \n"
|
||||||
|
"\tmovs %4, %1\n"
|
||||||
|
"\trsbmi %1, %1, #0 \n"
|
||||||
|
"\tmov %4, #1\n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #14 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #14 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #13 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #13 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #12 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #12 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #11 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #11 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #10 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #10 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #9 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #9 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #8 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #8 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #7 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #7 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #6 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #6 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #5 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #5 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #4 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #4 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #3 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #3 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #2 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #2 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1, asl #1 \n"
|
||||||
|
"\torrpl %2, %2, %4, asl #1 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tsubs %3, %0, %1 \n"
|
||||||
|
"\torrpl %2, %2, %4 \n"
|
||||||
|
"\tmovpl %0, %3 \n"
|
||||||
|
|
||||||
|
"\tmovs %5, %5, lsr #31 \n"
|
||||||
|
"\trsbne %2, %2, #0 \n"
|
||||||
|
: "=r" (dead1), "=r" (dead2), "=r" (res),
|
||||||
|
"=r" (dead3), "=r" (dead4), "=r" (dead5)
|
||||||
|
: "0" (a), "1" (b), "2" (res)
|
||||||
|
: "memory", "cc"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
176
libspeexdsp/fixed_bfin.h
Normal file
176
libspeexdsp/fixed_bfin.h
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
/* Copyright (C) 2005 Analog Devices
|
||||||
|
Author: Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file fixed_bfin.h
|
||||||
|
@brief Blackfin fixed-point operations
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FIXED_BFIN_H
|
||||||
|
#define FIXED_BFIN_H
|
||||||
|
|
||||||
|
#include "bfin.h"
|
||||||
|
|
||||||
|
#undef PDIV32_16
|
||||||
|
static inline spx_word16_t PDIV32_16(spx_word32_t a, spx_word16_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res, bb;
|
||||||
|
bb = b;
|
||||||
|
a += b>>1;
|
||||||
|
__asm__ (
|
||||||
|
"P0 = 15;\n\t"
|
||||||
|
"R0 = %1;\n\t"
|
||||||
|
"R1 = %2;\n\t"
|
||||||
|
//"R0 = R0 + R1;\n\t"
|
||||||
|
"R0 <<= 1;\n\t"
|
||||||
|
"DIVS (R0, R1);\n\t"
|
||||||
|
"LOOP divide%= LC0 = P0;\n\t"
|
||||||
|
"LOOP_BEGIN divide%=;\n\t"
|
||||||
|
"DIVQ (R0, R1);\n\t"
|
||||||
|
"LOOP_END divide%=;\n\t"
|
||||||
|
"R0 = R0.L;\n\t"
|
||||||
|
"%0 = R0;\n\t"
|
||||||
|
: "=m" (res)
|
||||||
|
: "m" (a), "m" (bb)
|
||||||
|
: "P0", "R0", "R1", "ASTAT" BFIN_HWLOOP0_REGS);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef DIV32_16
|
||||||
|
static inline spx_word16_t DIV32_16(spx_word32_t a, spx_word16_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res, bb;
|
||||||
|
bb = b;
|
||||||
|
/* Make the roundinf consistent with the C version
|
||||||
|
(do we need to do that?)*/
|
||||||
|
if (a<0)
|
||||||
|
a += (b-1);
|
||||||
|
__asm__ (
|
||||||
|
"P0 = 15;\n\t"
|
||||||
|
"R0 = %1;\n\t"
|
||||||
|
"R1 = %2;\n\t"
|
||||||
|
"R0 <<= 1;\n\t"
|
||||||
|
"DIVS (R0, R1);\n\t"
|
||||||
|
"LOOP divide%= LC0 = P0;\n\t"
|
||||||
|
"LOOP_BEGIN divide%=;\n\t"
|
||||||
|
"DIVQ (R0, R1);\n\t"
|
||||||
|
"LOOP_END divide%=;\n\t"
|
||||||
|
"R0 = R0.L;\n\t"
|
||||||
|
"%0 = R0;\n\t"
|
||||||
|
: "=m" (res)
|
||||||
|
: "m" (a), "m" (bb)
|
||||||
|
: "P0", "R0", "R1", "ASTAT" BFIN_HWLOOP0_REGS);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MAX16
|
||||||
|
static inline spx_word16_t MAX16(spx_word16_t a, spx_word16_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res;
|
||||||
|
__asm__ (
|
||||||
|
"%1 = %1.L (X);\n\t"
|
||||||
|
"%2 = %2.L (X);\n\t"
|
||||||
|
"%0 = MAX(%1,%2);"
|
||||||
|
: "=d" (res)
|
||||||
|
: "%d" (a), "d" (b)
|
||||||
|
: "ASTAT"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MULT16_32_Q15
|
||||||
|
static inline spx_word32_t MULT16_32_Q15(spx_word16_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res;
|
||||||
|
__asm__
|
||||||
|
(
|
||||||
|
"A1 = %2.L*%1.L (M);\n\t"
|
||||||
|
"A1 = A1 >>> 15;\n\t"
|
||||||
|
"%0 = (A1 += %2.L*%1.H) ;\n\t"
|
||||||
|
: "=&W" (res), "=&d" (b)
|
||||||
|
: "d" (a), "1" (b)
|
||||||
|
: "A1", "ASTAT"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MAC16_32_Q15
|
||||||
|
static inline spx_word32_t MAC16_32_Q15(spx_word32_t c, spx_word16_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res;
|
||||||
|
__asm__
|
||||||
|
(
|
||||||
|
"A1 = %2.L*%1.L (M);\n\t"
|
||||||
|
"A1 = A1 >>> 15;\n\t"
|
||||||
|
"%0 = (A1 += %2.L*%1.H);\n\t"
|
||||||
|
"%0 = %0 + %4;\n\t"
|
||||||
|
: "=&W" (res), "=&d" (b)
|
||||||
|
: "d" (a), "1" (b), "d" (c)
|
||||||
|
: "A1", "ASTAT"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MULT16_32_Q14
|
||||||
|
static inline spx_word32_t MULT16_32_Q14(spx_word16_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res;
|
||||||
|
__asm__
|
||||||
|
(
|
||||||
|
"%2 <<= 1;\n\t"
|
||||||
|
"A1 = %1.L*%2.L (M);\n\t"
|
||||||
|
"A1 = A1 >>> 15;\n\t"
|
||||||
|
"%0 = (A1 += %1.L*%2.H);\n\t"
|
||||||
|
: "=W" (res), "=d" (a), "=d" (b)
|
||||||
|
: "1" (a), "2" (b)
|
||||||
|
: "A1", "ASTAT"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef MAC16_32_Q14
|
||||||
|
static inline spx_word32_t MAC16_32_Q14(spx_word32_t c, spx_word16_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
spx_word32_t res;
|
||||||
|
__asm__
|
||||||
|
(
|
||||||
|
"%1 <<= 1;\n\t"
|
||||||
|
"A1 = %2.L*%1.L (M);\n\t"
|
||||||
|
"A1 = A1 >>> 15;\n\t"
|
||||||
|
"%0 = (A1 += %2.L*%1.H);\n\t"
|
||||||
|
"%0 = %0 + %4;\n\t"
|
||||||
|
: "=&W" (res), "=&d" (b)
|
||||||
|
: "d" (a), "1" (b), "d" (c)
|
||||||
|
: "A1", "ASTAT"
|
||||||
|
);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
487
libspeexdsp/fixed_debug.h
Normal file
487
libspeexdsp/fixed_debug.h
Normal file
@ -0,0 +1,487 @@
|
|||||||
|
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file fixed_debug.h
|
||||||
|
@brief Fixed-point operations with debugging
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FIXED_DEBUG_H
|
||||||
|
#define FIXED_DEBUG_H
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
extern long long spx_mips;
|
||||||
|
#define MIPS_INC spx_mips++,
|
||||||
|
|
||||||
|
#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||||
|
#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||||
|
|
||||||
|
|
||||||
|
#define VERIFY_SHORT(x) ((x)<=32767&&(x)>=-32768)
|
||||||
|
#define VERIFY_INT(x) ((x)<=2147483647LL&&(x)>=-2147483648LL)
|
||||||
|
|
||||||
|
static inline short NEG16(int x)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(x))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "NEG16: input is not short: %d\n", (int)x);
|
||||||
|
}
|
||||||
|
res = -x;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "NEG16: output is not short: %d\n", (int)res);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline int NEG32(long long x)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_INT(x))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "NEG16: input is not int: %d\n", (int)x);
|
||||||
|
}
|
||||||
|
res = -x;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "NEG16: output is not int: %d\n", (int)res);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EXTRACT16(x) _EXTRACT16(x, __FILE__, __LINE__)
|
||||||
|
static inline short _EXTRACT16(int x, char *file, int line)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(x))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "EXTRACT16: input is not short: %d in %s: line %d\n", x, file, line);
|
||||||
|
}
|
||||||
|
res = x;
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EXTEND32(x) _EXTEND32(x, __FILE__, __LINE__)
|
||||||
|
static inline int _EXTEND32(int x, char *file, int line)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(x))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "EXTEND32: input is not short: %d in %s: line %d\n", x, file, line);
|
||||||
|
}
|
||||||
|
res = x;
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SHR16(a, shift) _SHR16(a, shift, __FILE__, __LINE__)
|
||||||
|
static inline short _SHR16(int a, int shift, char *file, int line)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SHR16: inputs are not short: %d >> %d in %s: line %d\n", a, shift, file, line);
|
||||||
|
}
|
||||||
|
res = a>>shift;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "SHR16: output is not short: %d in %s: line %d\n", res, file, line);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
#define SHL16(a, shift) _SHL16(a, shift, __FILE__, __LINE__)
|
||||||
|
static inline short _SHL16(int a, int shift, char *file, int line)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SHL16: inputs are not short: %d %d in %s: line %d\n", a, shift, file, line);
|
||||||
|
}
|
||||||
|
res = a<<shift;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "SHL16: output is not short: %d in %s: line %d\n", res, file, line);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int SHR32(long long a, int shift)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SHR32: inputs are not int: %d %d\n", (int)a, shift);
|
||||||
|
}
|
||||||
|
res = a>>shift;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SHR32: output is not int: %d\n", (int)res);
|
||||||
|
}
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline int SHL32(long long a, int shift)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SHL32: inputs are not int: %d %d\n", (int)a, shift);
|
||||||
|
}
|
||||||
|
res = a<<shift;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SHL32: output is not int: %d\n", (int)res);
|
||||||
|
}
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define PSHR16(a,shift) (SHR16(ADD16((a),((1<<((shift))>>1))),shift))
|
||||||
|
#define PSHR32(a,shift) (SHR32(ADD32((a),((EXTEND32(1)<<((shift))>>1))),shift))
|
||||||
|
#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
|
||||||
|
|
||||||
|
#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||||
|
#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||||
|
|
||||||
|
//#define SHR(a,shift) ((a) >> (shift))
|
||||||
|
//#define SHL(a,shift) ((a) << (shift))
|
||||||
|
|
||||||
|
#define ADD16(a, b) _ADD16(a, b, __FILE__, __LINE__)
|
||||||
|
static inline short _ADD16(int a, int b, char *file, int line)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "ADD16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line);
|
||||||
|
}
|
||||||
|
res = a+b;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "ADD16: output is not short: %d+%d=%d in %s: line %d\n", a,b,res, file, line);
|
||||||
|
}
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SUB16(a, b) _SUB16(a, b, __FILE__, __LINE__)
|
||||||
|
static inline short _SUB16(int a, int b, char *file, int line)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SUB16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line);
|
||||||
|
}
|
||||||
|
res = a-b;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "SUB16: output is not short: %d in %s: line %d\n", res, file, line);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ADD32(a, b) _ADD32(a, b, __FILE__, __LINE__)
|
||||||
|
static inline int _ADD32(long long a, long long b, char *file, int line)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "ADD32: inputs are not int: %d %d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||||
|
}
|
||||||
|
res = a+b;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "ADD32: output is not int: %d in %s: line %d\n", (int)res, file, line);
|
||||||
|
}
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int SUB32(long long a, long long b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "SUB32: inputs are not int: %d %d\n", (int)a, (int)b);
|
||||||
|
}
|
||||||
|
res = a-b;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "SUB32: output is not int: %d\n", (int)res);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ADD64(a,b) (MIPS_INC(a)+(b))
|
||||||
|
|
||||||
|
/* result fits in 16 bits */
|
||||||
|
static inline short MULT16_16_16(int a, int b)
|
||||||
|
{
|
||||||
|
int res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_16: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = a*b;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_16: output is not short: %d\n", res);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MULT16_16(a, b) _MULT16_16(a, b, __FILE__, __LINE__)
|
||||||
|
static inline int _MULT16_16(int a, int b, char *file, int line)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_16: output is not int: %d in %s: line %d\n", (int)res, file, line);
|
||||||
|
spx_mips++;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MAC16_16(c,a,b) (spx_mips--,ADD32((c),MULT16_16((a),(b))))
|
||||||
|
#define MAC16_16_Q11(c,a,b) (EXTRACT16(ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),11)))))
|
||||||
|
#define MAC16_16_Q13(c,a,b) (EXTRACT16(ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),13)))))
|
||||||
|
#define MAC16_16_P13(c,a,b) (EXTRACT16(ADD32((c),SHR32(ADD32(4096,MULT16_16((a),(b))),13))))
|
||||||
|
|
||||||
|
|
||||||
|
#define MULT16_32_QX(a, b, Q) _MULT16_32_QX(a, b, Q, __FILE__, __LINE__)
|
||||||
|
static inline int _MULT16_32_QX(int a, long long b, int Q, char *file, int line)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_32_Q%d: inputs are not short+int: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line);
|
||||||
|
}
|
||||||
|
if (ABS32(b)>=(EXTEND32(1)<<(15+Q)))
|
||||||
|
fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line);
|
||||||
|
res = (((long long)a)*(long long)b) >> Q;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_32_Q%d: output is not int: %d*%d=%d in %s: line %d\n", Q, (int)a, (int)b,(int)res, file, line);
|
||||||
|
spx_mips+=5;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int MULT16_32_PX(int a, long long b, int Q)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_32_P%d: inputs are not short+int: %d %d\n", Q, (int)a, (int)b);
|
||||||
|
}
|
||||||
|
if (ABS32(b)>=(EXTEND32(1)<<(15+Q)))
|
||||||
|
fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d\n", Q, (int)a, (int)b);
|
||||||
|
res = ((((long long)a)*(long long)b) + ((EXTEND32(1)<<Q)>>1))>> Q;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d\n", Q, (int)a, (int)b,(int)res);
|
||||||
|
spx_mips+=5;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define MULT16_32_Q11(a,b) MULT16_32_QX(a,b,11)
|
||||||
|
#define MAC16_32_Q11(c,a,b) ADD32((c),MULT16_32_Q11((a),(b)))
|
||||||
|
#define MULT16_32_Q12(a,b) MULT16_32_QX(a,b,12)
|
||||||
|
#define MULT16_32_Q13(a,b) MULT16_32_QX(a,b,13)
|
||||||
|
#define MULT16_32_Q14(a,b) MULT16_32_QX(a,b,14)
|
||||||
|
#define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15)
|
||||||
|
#define MULT16_32_P15(a,b) MULT16_32_PX(a,b,15)
|
||||||
|
#define MAC16_32_Q15(c,a,b) ADD32((c),MULT16_32_Q15((a),(b)))
|
||||||
|
|
||||||
|
static inline int SATURATE(int a, int b)
|
||||||
|
{
|
||||||
|
if (a>b)
|
||||||
|
a=b;
|
||||||
|
if (a<-b)
|
||||||
|
a = -b;
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int MULT16_16_Q11_32(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_Q11: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res >>= 11;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res);
|
||||||
|
spx_mips+=3;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline short MULT16_16_Q13(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_Q13: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res >>= 13;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
spx_mips+=3;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline short MULT16_16_Q14(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_Q14: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res >>= 14;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res);
|
||||||
|
spx_mips+=3;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline short MULT16_16_Q15(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_Q15: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res >>= 15;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_Q15: output is not short: %d\n", (int)res);
|
||||||
|
}
|
||||||
|
spx_mips+=3;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline short MULT16_16_P13(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_P13: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res += 4096;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
res >>= 13;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
spx_mips+=4;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline short MULT16_16_P14(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_P14: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res += 8192;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
res >>= 14;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
spx_mips+=4;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
static inline short MULT16_16_P15(int a, int b)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "MULT16_16_P15: inputs are not short: %d %d\n", a, b);
|
||||||
|
}
|
||||||
|
res = ((long long)a)*b;
|
||||||
|
res += 16384;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
res >>= 15;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||||
|
spx_mips+=4;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DIV32_16(a, b) _DIV32_16(a, b, __FILE__, __LINE__)
|
||||||
|
|
||||||
|
static inline int _DIV32_16(long long a, long long b, char *file, int line)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (b==0)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "DIV32_16: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!VERIFY_INT(a) || !VERIFY_SHORT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "DIV32_16: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||||
|
}
|
||||||
|
res = a/b;
|
||||||
|
if (!VERIFY_SHORT(res))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "DIV32_16: output is not short: %d / %d = %d in %s: line %d\n", (int)a,(int)b,(int)res, file, line);
|
||||||
|
if (res>32767)
|
||||||
|
res = 32767;
|
||||||
|
if (res<-32768)
|
||||||
|
res = -32768;
|
||||||
|
}
|
||||||
|
spx_mips+=20;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DIV32(a, b) _DIV32(a, b, __FILE__, __LINE__)
|
||||||
|
static inline int _DIV32(long long a, long long b, char *file, int line)
|
||||||
|
{
|
||||||
|
long long res;
|
||||||
|
if (b==0)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "DIV32: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||||
|
{
|
||||||
|
fprintf (stderr, "DIV32: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||||
|
}
|
||||||
|
res = a/b;
|
||||||
|
if (!VERIFY_INT(res))
|
||||||
|
fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res, file, line);
|
||||||
|
spx_mips+=36;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
#define PDIV32(a,b) DIV32(ADD32((a),(b)>>1),b)
|
||||||
|
#define PDIV32_16(a,b) DIV32_16(ADD32((a),(b)>>1),b)
|
||||||
|
|
||||||
|
#endif
|
110
libspeexdsp/fixed_generic.h
Normal file
110
libspeexdsp/fixed_generic.h
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file fixed_generic.h
|
||||||
|
@brief Generic fixed-point operations
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FIXED_GENERIC_H
|
||||||
|
#define FIXED_GENERIC_H
|
||||||
|
|
||||||
|
#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||||
|
#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||||
|
|
||||||
|
#define NEG16(x) (-(x))
|
||||||
|
#define NEG32(x) (-(x))
|
||||||
|
#define EXTRACT16(x) ((spx_word16_t)(x))
|
||||||
|
#define EXTEND32(x) ((spx_word32_t)(x))
|
||||||
|
#define SHR16(a,shift) ((a) >> (shift))
|
||||||
|
#define SHL16(a,shift) ((a) << (shift))
|
||||||
|
#define SHR32(a,shift) ((a) >> (shift))
|
||||||
|
#define SHL32(a,shift) ((a) << (shift))
|
||||||
|
#define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
|
||||||
|
#define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift))
|
||||||
|
#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
|
||||||
|
#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||||
|
#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||||
|
|
||||||
|
#define SATURATE32PSHR(x,shift,a) (((x)>=(SHL32(a,shift))) ? (a) : \
|
||||||
|
(x)<=-(SHL32(a,shift)) ? -(a) : \
|
||||||
|
(PSHR32(x, shift)))
|
||||||
|
|
||||||
|
#define SHR(a,shift) ((a) >> (shift))
|
||||||
|
#define SHL(a,shift) ((spx_word32_t)(a) << (shift))
|
||||||
|
#define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift))
|
||||||
|
#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||||
|
|
||||||
|
|
||||||
|
#define ADD16(a,b) ((spx_word16_t)((spx_word16_t)(a)+(spx_word16_t)(b)))
|
||||||
|
#define SUB16(a,b) ((spx_word16_t)(a)-(spx_word16_t)(b))
|
||||||
|
#define ADD32(a,b) ((spx_word32_t)(a)+(spx_word32_t)(b))
|
||||||
|
#define SUB32(a,b) ((spx_word32_t)(a)-(spx_word32_t)(b))
|
||||||
|
|
||||||
|
|
||||||
|
/* result fits in 16 bits */
|
||||||
|
#define MULT16_16_16(a,b) ((((spx_word16_t)(a))*((spx_word16_t)(b))))
|
||||||
|
|
||||||
|
/* (spx_word32_t)(spx_word16_t) gives TI compiler a hint that it's 16x16->32 multiply */
|
||||||
|
#define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b)))
|
||||||
|
|
||||||
|
#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
|
||||||
|
#define MULT16_32_Q12(a,b) ADD32(MULT16_16((a),SHR((b),12)), SHR(MULT16_16((a),((b)&0x00000fff)),12))
|
||||||
|
#define MULT16_32_Q13(a,b) ADD32(MULT16_16((a),SHR((b),13)), SHR(MULT16_16((a),((b)&0x00001fff)),13))
|
||||||
|
#define MULT16_32_Q14(a,b) ADD32(MULT16_16((a),SHR((b),14)), SHR(MULT16_16((a),((b)&0x00003fff)),14))
|
||||||
|
|
||||||
|
#define MULT16_32_Q11(a,b) ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11))
|
||||||
|
#define MAC16_32_Q11(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11)))
|
||||||
|
|
||||||
|
#define MULT16_32_P15(a,b) ADD32(MULT16_16((a),SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
|
||||||
|
#define MULT16_32_Q15(a,b) ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
|
||||||
|
#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
|
||||||
|
|
||||||
|
|
||||||
|
#define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11)))
|
||||||
|
#define MAC16_16_Q13(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),13)))
|
||||||
|
#define MAC16_16_P13(c,a,b) (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13)))
|
||||||
|
|
||||||
|
#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))
|
||||||
|
#define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13))
|
||||||
|
#define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14))
|
||||||
|
#define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15))
|
||||||
|
|
||||||
|
#define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13))
|
||||||
|
#define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14))
|
||||||
|
#define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15))
|
||||||
|
|
||||||
|
#define MUL_16_32_R15(a,bh,bl) ADD32(MULT16_16((a),(bh)), SHR(MULT16_16((a),(bl)),15))
|
||||||
|
|
||||||
|
#define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b))))
|
||||||
|
#define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b))))
|
||||||
|
#define DIV32(a,b) (((spx_word32_t)(a))/((spx_word32_t)(b)))
|
||||||
|
#define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b)))
|
||||||
|
|
||||||
|
#endif
|
839
libspeexdsp/jitter.c
Normal file
839
libspeexdsp/jitter.c
Normal file
@ -0,0 +1,839 @@
|
|||||||
|
/* Copyright (C) 2002 Jean-Marc Valin
|
||||||
|
File: speex_jitter.h
|
||||||
|
|
||||||
|
Adaptive jitter buffer for Speex
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
- Add short-term estimate
|
||||||
|
- Defensive programming
|
||||||
|
+ warn when last returned < last desired (begative buffering)
|
||||||
|
+ warn if update_delay not called between get() and tick() or is called twice in a row
|
||||||
|
- Linked list structure for holding the packets instead of the current fixed-size array
|
||||||
|
+ return memory to a pool
|
||||||
|
+ allow pre-allocation of the pool
|
||||||
|
+ optional max number of elements
|
||||||
|
- Statistics
|
||||||
|
+ drift
|
||||||
|
+ loss
|
||||||
|
+ late
|
||||||
|
+ jitter
|
||||||
|
+ buffering delay
|
||||||
|
*/
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
#include "speex/speex_jitter.h"
|
||||||
|
#include "os_support.h"
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SPEEX_JITTER_MAX_BUFFER_SIZE 200 /**< Maximum number of packets in jitter buffer */
|
||||||
|
|
||||||
|
#define TSUB(a,b) ((spx_int32_t)((a)-(b)))
|
||||||
|
|
||||||
|
#define GT32(a,b) (((spx_int32_t)((a)-(b)))>0)
|
||||||
|
#define GE32(a,b) (((spx_int32_t)((a)-(b)))>=0)
|
||||||
|
#define LT32(a,b) (((spx_int32_t)((a)-(b)))<0)
|
||||||
|
#define LE32(a,b) (((spx_int32_t)((a)-(b)))<=0)
|
||||||
|
|
||||||
|
#define ROUND_DOWN(x, step) ((x)<0 ? ((x)-(step)+1)/(step)*(step) : (x)/(step)*(step))
|
||||||
|
|
||||||
|
#define MAX_TIMINGS 40
|
||||||
|
#define MAX_BUFFERS 3
|
||||||
|
#define TOP_DELAY 40
|
||||||
|
|
||||||
|
/** Buffer that keeps the time of arrival of the latest packets */
|
||||||
|
struct TimingBuffer {
|
||||||
|
int filled; /**< Number of entries occupied in "timing" and "counts"*/
|
||||||
|
int curr_count; /**< Number of packet timings we got (including those we discarded) */
|
||||||
|
spx_int32_t timing[MAX_TIMINGS]; /**< Sorted list of all timings ("latest" packets first) */
|
||||||
|
spx_int16_t counts[MAX_TIMINGS]; /**< Order the packets were put in (will be used for short-term estimate) */
|
||||||
|
};
|
||||||
|
|
||||||
|
static void tb_init(struct TimingBuffer *tb)
|
||||||
|
{
|
||||||
|
tb->filled = 0;
|
||||||
|
tb->curr_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add the timing of a new packet to the TimingBuffer */
|
||||||
|
static void tb_add(struct TimingBuffer *tb, spx_int16_t timing)
|
||||||
|
{
|
||||||
|
int pos;
|
||||||
|
/* Discard packet that won't make it into the list because they're too early */
|
||||||
|
if (tb->filled >= MAX_TIMINGS && timing >= tb->timing[tb->filled-1])
|
||||||
|
{
|
||||||
|
tb->curr_count++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Find where the timing info goes in the sorted list */
|
||||||
|
pos = 0;
|
||||||
|
/* FIXME: Do bisection instead of linear search */
|
||||||
|
while (pos<tb->filled && timing >= tb->timing[pos])
|
||||||
|
{
|
||||||
|
pos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
speex_assert(pos <= tb->filled && pos < MAX_TIMINGS);
|
||||||
|
|
||||||
|
/* Shift everything so we can perform the insertion */
|
||||||
|
if (pos < tb->filled)
|
||||||
|
{
|
||||||
|
int move_size = tb->filled-pos;
|
||||||
|
if (tb->filled == MAX_TIMINGS)
|
||||||
|
move_size -= 1;
|
||||||
|
SPEEX_MOVE(&tb->timing[pos+1], &tb->timing[pos], move_size);
|
||||||
|
SPEEX_MOVE(&tb->counts[pos+1], &tb->counts[pos], move_size);
|
||||||
|
}
|
||||||
|
/* Insert */
|
||||||
|
tb->timing[pos] = timing;
|
||||||
|
tb->counts[pos] = tb->curr_count;
|
||||||
|
|
||||||
|
tb->curr_count++;
|
||||||
|
if (tb->filled<MAX_TIMINGS)
|
||||||
|
tb->filled++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Jitter buffer structure */
|
||||||
|
struct JitterBuffer_ {
|
||||||
|
spx_uint32_t pointer_timestamp; /**< Timestamp of what we will *get* next */
|
||||||
|
spx_uint32_t last_returned_timestamp; /**< Useful for getting the next packet with the same timestamp (for fragmented media) */
|
||||||
|
spx_uint32_t next_stop; /**< Estimated time the next get() will be called */
|
||||||
|
|
||||||
|
spx_int32_t buffered; /**< Amount of data we think is still buffered by the application (timestamp units)*/
|
||||||
|
|
||||||
|
JitterBufferPacket packets[SPEEX_JITTER_MAX_BUFFER_SIZE]; /**< Packets stored in the buffer */
|
||||||
|
spx_uint32_t arrival[SPEEX_JITTER_MAX_BUFFER_SIZE]; /**< Packet arrival time (0 means it was late, even though it's a valid timestamp) */
|
||||||
|
|
||||||
|
void (*destroy) (void *); /**< Callback for destroying a packet */
|
||||||
|
|
||||||
|
spx_int32_t delay_step; /**< Size of the steps when adjusting buffering (timestamp units) */
|
||||||
|
spx_int32_t concealment_size; /**< Size of the packet loss concealment "units" */
|
||||||
|
int reset_state; /**< True if state was just reset */
|
||||||
|
int buffer_margin; /**< How many frames we want to keep in the buffer (lower bound) */
|
||||||
|
int late_cutoff; /**< How late must a packet be for it not to be considered at all */
|
||||||
|
int interp_requested; /**< An interpolation is requested by speex_jitter_update_delay() */
|
||||||
|
int auto_adjust; /**< Whether to automatically adjust the delay at any time */
|
||||||
|
|
||||||
|
struct TimingBuffer _tb[MAX_BUFFERS]; /**< Don't use those directly */
|
||||||
|
struct TimingBuffer *timeBuffers[MAX_BUFFERS]; /**< Storing arrival time of latest frames so we can compute some stats */
|
||||||
|
int window_size; /**< Total window over which the late frames are counted */
|
||||||
|
int subwindow_size; /**< Sub-window size for faster computation */
|
||||||
|
int max_late_rate; /**< Absolute maximum amount of late packets tolerable (in percent) */
|
||||||
|
int latency_tradeoff; /**< Latency equivalent of losing one percent of packets */
|
||||||
|
int auto_tradeoff; /**< Latency equivalent of losing one percent of packets (automatic default) */
|
||||||
|
|
||||||
|
int lost_count; /**< Number of consecutive lost packets */
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Based on available data, this computes the optimal delay for the jitter buffer.
|
||||||
|
The optimised function is in timestamp units and is:
|
||||||
|
cost = delay + late_factor*[number of frames that would be late if we used that delay]
|
||||||
|
@param tb Array of buffers
|
||||||
|
@param late_factor Equivalent cost of a late frame (in timestamp units)
|
||||||
|
*/
|
||||||
|
static spx_int16_t compute_opt_delay(JitterBuffer *jitter)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
spx_int16_t opt=0;
|
||||||
|
spx_int32_t best_cost=0x7fffffff;
|
||||||
|
int late = 0;
|
||||||
|
int pos[MAX_BUFFERS];
|
||||||
|
int tot_count;
|
||||||
|
float late_factor;
|
||||||
|
int penalty_taken = 0;
|
||||||
|
int best = 0;
|
||||||
|
int worst = 0;
|
||||||
|
spx_int32_t deltaT;
|
||||||
|
struct TimingBuffer *tb;
|
||||||
|
|
||||||
|
tb = jitter->_tb;
|
||||||
|
|
||||||
|
/* Number of packet timings we have received (including those we didn't keep) */
|
||||||
|
tot_count = 0;
|
||||||
|
for (i=0;i<MAX_BUFFERS;i++)
|
||||||
|
tot_count += tb[i].curr_count;
|
||||||
|
if (tot_count==0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Compute cost for one lost packet */
|
||||||
|
if (jitter->latency_tradeoff != 0)
|
||||||
|
late_factor = jitter->latency_tradeoff * 100.0f / tot_count;
|
||||||
|
else
|
||||||
|
late_factor = jitter->auto_tradeoff * jitter->window_size/tot_count;
|
||||||
|
|
||||||
|
/*fprintf(stderr, "late_factor = %f\n", late_factor);*/
|
||||||
|
for (i=0;i<MAX_BUFFERS;i++)
|
||||||
|
pos[i] = 0;
|
||||||
|
|
||||||
|
/* Pick the TOP_DELAY "latest" packets (doesn't need to actually be late
|
||||||
|
for the current settings) */
|
||||||
|
for (i=0;i<TOP_DELAY;i++)
|
||||||
|
{
|
||||||
|
int j;
|
||||||
|
int next=-1;
|
||||||
|
int latest = 32767;
|
||||||
|
/* Pick latest amoung all sub-windows */
|
||||||
|
for (j=0;j<MAX_BUFFERS;j++)
|
||||||
|
{
|
||||||
|
if (pos[j] < tb[j].filled && tb[j].timing[pos[j]] < latest)
|
||||||
|
{
|
||||||
|
next = j;
|
||||||
|
latest = tb[j].timing[pos[j]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (next != -1)
|
||||||
|
{
|
||||||
|
spx_int32_t cost;
|
||||||
|
|
||||||
|
if (i==0)
|
||||||
|
worst = latest;
|
||||||
|
best = latest;
|
||||||
|
latest = ROUND_DOWN(latest, jitter->delay_step);
|
||||||
|
pos[next]++;
|
||||||
|
|
||||||
|
/* Actual cost function that tells us how bad using this delay would be */
|
||||||
|
cost = -latest + late_factor*late;
|
||||||
|
/*fprintf(stderr, "cost %d = %d + %f * %d\n", cost, -latest, late_factor, late);*/
|
||||||
|
if (cost < best_cost)
|
||||||
|
{
|
||||||
|
best_cost = cost;
|
||||||
|
opt = latest;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For the next timing we will consider, there will be one more late packet to count */
|
||||||
|
late++;
|
||||||
|
/* Two-frame penalty if we're going to increase the amount of late frames (hysteresis) */
|
||||||
|
if (latest >= 0 && !penalty_taken)
|
||||||
|
{
|
||||||
|
penalty_taken = 1;
|
||||||
|
late+=4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deltaT = best-worst;
|
||||||
|
/* This is a default "automatic latency tradeoff" when none is provided */
|
||||||
|
jitter->auto_tradeoff = 1 + deltaT/TOP_DELAY;
|
||||||
|
/*fprintf(stderr, "auto_tradeoff = %d (%d %d %d)\n", jitter->auto_tradeoff, best, worst, i);*/
|
||||||
|
|
||||||
|
/* FIXME: Compute a short-term estimate too and combine with the long-term one */
|
||||||
|
|
||||||
|
/* Prevents reducing the buffer size when we haven't really had much data */
|
||||||
|
if (tot_count < TOP_DELAY && opt > 0)
|
||||||
|
return 0;
|
||||||
|
return opt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Initialise jitter buffer */
|
||||||
|
EXPORT JitterBuffer *jitter_buffer_init(int step_size)
|
||||||
|
{
|
||||||
|
JitterBuffer *jitter = (JitterBuffer*)speex_alloc(sizeof(JitterBuffer));
|
||||||
|
if (jitter)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
spx_int32_t tmp;
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
jitter->packets[i].data=NULL;
|
||||||
|
jitter->delay_step = step_size;
|
||||||
|
jitter->concealment_size = step_size;
|
||||||
|
/*FIXME: Should this be 0 or 1?*/
|
||||||
|
jitter->buffer_margin = 0;
|
||||||
|
jitter->late_cutoff = 50;
|
||||||
|
jitter->destroy = NULL;
|
||||||
|
jitter->latency_tradeoff = 0;
|
||||||
|
jitter->auto_adjust = 1;
|
||||||
|
tmp = 4;
|
||||||
|
jitter_buffer_ctl(jitter, JITTER_BUFFER_SET_MAX_LATE_RATE, &tmp);
|
||||||
|
jitter_buffer_reset(jitter);
|
||||||
|
}
|
||||||
|
return jitter;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Reset jitter buffer */
|
||||||
|
EXPORT void jitter_buffer_reset(JitterBuffer *jitter)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data)
|
||||||
|
{
|
||||||
|
if (jitter->destroy)
|
||||||
|
jitter->destroy(jitter->packets[i].data);
|
||||||
|
else
|
||||||
|
speex_free(jitter->packets[i].data);
|
||||||
|
jitter->packets[i].data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Timestamp is actually undefined at this point */
|
||||||
|
jitter->pointer_timestamp = 0;
|
||||||
|
jitter->next_stop = 0;
|
||||||
|
jitter->reset_state = 1;
|
||||||
|
jitter->lost_count = 0;
|
||||||
|
jitter->buffered = 0;
|
||||||
|
jitter->auto_tradeoff = 32000;
|
||||||
|
|
||||||
|
for (i=0;i<MAX_BUFFERS;i++)
|
||||||
|
{
|
||||||
|
tb_init(&jitter->_tb[i]);
|
||||||
|
jitter->timeBuffers[i] = &jitter->_tb[i];
|
||||||
|
}
|
||||||
|
/*fprintf (stderr, "reset\n");*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Destroy jitter buffer */
|
||||||
|
EXPORT void jitter_buffer_destroy(JitterBuffer *jitter)
|
||||||
|
{
|
||||||
|
jitter_buffer_reset(jitter);
|
||||||
|
speex_free(jitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Take the following timing into consideration for future calculations */
|
||||||
|
static void update_timings(JitterBuffer *jitter, spx_int32_t timing)
|
||||||
|
{
|
||||||
|
if (timing < -32767)
|
||||||
|
timing = -32767;
|
||||||
|
if (timing > 32767)
|
||||||
|
timing = 32767;
|
||||||
|
/* If the current sub-window is full, perform a rotation and discard oldest sub-widow */
|
||||||
|
if (jitter->timeBuffers[0]->curr_count >= jitter->subwindow_size)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
/*fprintf(stderr, "Rotate buffer\n");*/
|
||||||
|
struct TimingBuffer *tmp = jitter->timeBuffers[MAX_BUFFERS-1];
|
||||||
|
for (i=MAX_BUFFERS-1;i>=1;i--)
|
||||||
|
jitter->timeBuffers[i] = jitter->timeBuffers[i-1];
|
||||||
|
jitter->timeBuffers[0] = tmp;
|
||||||
|
tb_init(jitter->timeBuffers[0]);
|
||||||
|
}
|
||||||
|
tb_add(jitter->timeBuffers[0], timing);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Compensate all timings when we do an adjustment of the buffering */
|
||||||
|
static void shift_timings(JitterBuffer *jitter, spx_int16_t amount)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
for (i=0;i<MAX_BUFFERS;i++)
|
||||||
|
{
|
||||||
|
for (j=0;j<jitter->timeBuffers[i]->filled;j++)
|
||||||
|
jitter->timeBuffers[i]->timing[j] += amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Put one packet into the jitter buffer */
|
||||||
|
EXPORT void jitter_buffer_put(JitterBuffer *jitter, const JitterBufferPacket *packet)
|
||||||
|
{
|
||||||
|
int i,j;
|
||||||
|
int late;
|
||||||
|
/*fprintf (stderr, "put packet %d %d\n", timestamp, span);*/
|
||||||
|
|
||||||
|
/* Cleanup buffer (remove old packets that weren't played) */
|
||||||
|
if (!jitter->reset_state)
|
||||||
|
{
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
/* Make sure we don't discard a "just-late" packet in case we want to play it next (if we interpolate). */
|
||||||
|
if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp + jitter->packets[i].span, jitter->pointer_timestamp))
|
||||||
|
{
|
||||||
|
/*fprintf (stderr, "cleaned (not played)\n");*/
|
||||||
|
if (jitter->destroy)
|
||||||
|
jitter->destroy(jitter->packets[i].data);
|
||||||
|
else
|
||||||
|
speex_free(jitter->packets[i].data);
|
||||||
|
jitter->packets[i].data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*fprintf(stderr, "arrival: %d %d %d\n", packet->timestamp, jitter->next_stop, jitter->pointer_timestamp);*/
|
||||||
|
/* Check if packet is late (could still be useful though) */
|
||||||
|
if (!jitter->reset_state && LT32(packet->timestamp, jitter->next_stop))
|
||||||
|
{
|
||||||
|
update_timings(jitter, ((spx_int32_t)packet->timestamp) - ((spx_int32_t)jitter->next_stop) - jitter->buffer_margin);
|
||||||
|
late = 1;
|
||||||
|
} else {
|
||||||
|
late = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For some reason, the consumer has failed the last 20 fetches. Make sure this packet is
|
||||||
|
* used to resync. */
|
||||||
|
if (jitter->lost_count>20)
|
||||||
|
{
|
||||||
|
jitter_buffer_reset(jitter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Only insert the packet if it's not hopelessly late (i.e. totally useless) */
|
||||||
|
if (jitter->reset_state || GE32(packet->timestamp+packet->span+jitter->delay_step, jitter->pointer_timestamp))
|
||||||
|
{
|
||||||
|
|
||||||
|
/*Find an empty slot in the buffer*/
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data==NULL)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*No place left in the buffer, need to make room for it by discarding the oldest packet */
|
||||||
|
if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
int earliest=jitter->packets[0].timestamp;
|
||||||
|
i=0;
|
||||||
|
for (j=1;j<SPEEX_JITTER_MAX_BUFFER_SIZE;j++)
|
||||||
|
{
|
||||||
|
if (!jitter->packets[i].data || LT32(jitter->packets[j].timestamp,earliest))
|
||||||
|
{
|
||||||
|
earliest = jitter->packets[j].timestamp;
|
||||||
|
i=j;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (jitter->destroy)
|
||||||
|
jitter->destroy(jitter->packets[i].data);
|
||||||
|
else
|
||||||
|
speex_free(jitter->packets[i].data);
|
||||||
|
jitter->packets[i].data=NULL;
|
||||||
|
/*fprintf (stderr, "Buffer is full, discarding earliest frame %d (currently at %d)\n", timestamp, jitter->pointer_timestamp);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Copy packet in buffer */
|
||||||
|
if (jitter->destroy)
|
||||||
|
{
|
||||||
|
jitter->packets[i].data = packet->data;
|
||||||
|
} else {
|
||||||
|
jitter->packets[i].data=(char*)speex_alloc(packet->len);
|
||||||
|
for (j=0;j<packet->len;j++)
|
||||||
|
jitter->packets[i].data[j]=packet->data[j];
|
||||||
|
}
|
||||||
|
jitter->packets[i].timestamp=packet->timestamp;
|
||||||
|
jitter->packets[i].span=packet->span;
|
||||||
|
jitter->packets[i].len=packet->len;
|
||||||
|
jitter->packets[i].sequence=packet->sequence;
|
||||||
|
jitter->packets[i].user_data=packet->user_data;
|
||||||
|
if (jitter->reset_state || late)
|
||||||
|
jitter->arrival[i] = 0;
|
||||||
|
else
|
||||||
|
jitter->arrival[i] = jitter->next_stop;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get one packet from the jitter buffer */
|
||||||
|
EXPORT int jitter_buffer_get(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t desired_span, spx_int32_t *start_offset)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned int j;
|
||||||
|
spx_int16_t opt;
|
||||||
|
|
||||||
|
if (start_offset != NULL)
|
||||||
|
*start_offset = 0;
|
||||||
|
|
||||||
|
/* Syncing on the first call */
|
||||||
|
if (jitter->reset_state)
|
||||||
|
{
|
||||||
|
int found = 0;
|
||||||
|
/* Find the oldest packet */
|
||||||
|
spx_uint32_t oldest=0;
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data && (!found || LT32(jitter->packets[i].timestamp,oldest)))
|
||||||
|
{
|
||||||
|
oldest = jitter->packets[i].timestamp;
|
||||||
|
found = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found)
|
||||||
|
{
|
||||||
|
jitter->reset_state=0;
|
||||||
|
jitter->pointer_timestamp = oldest;
|
||||||
|
jitter->next_stop = oldest;
|
||||||
|
} else {
|
||||||
|
packet->timestamp = 0;
|
||||||
|
packet->span = jitter->interp_requested;
|
||||||
|
return JITTER_BUFFER_MISSING;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
jitter->last_returned_timestamp = jitter->pointer_timestamp;
|
||||||
|
|
||||||
|
if (jitter->interp_requested != 0)
|
||||||
|
{
|
||||||
|
packet->timestamp = jitter->pointer_timestamp;
|
||||||
|
packet->span = jitter->interp_requested;
|
||||||
|
|
||||||
|
/* Increment the pointer because it got decremented in the delay update */
|
||||||
|
jitter->pointer_timestamp += jitter->interp_requested;
|
||||||
|
packet->len = 0;
|
||||||
|
/*fprintf (stderr, "Deferred interpolate\n");*/
|
||||||
|
|
||||||
|
jitter->interp_requested = 0;
|
||||||
|
|
||||||
|
jitter->buffered = packet->span - desired_span;
|
||||||
|
|
||||||
|
return JITTER_BUFFER_INSERTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Searching for the packet that fits best */
|
||||||
|
|
||||||
|
/* Search the buffer for a packet with the right timestamp and spanning the whole current chunk */
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data && jitter->packets[i].timestamp==jitter->pointer_timestamp && GE32(jitter->packets[i].timestamp+jitter->packets[i].span,jitter->pointer_timestamp+desired_span))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If no match, try for an "older" packet that still spans (fully) the current chunk */
|
||||||
|
if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp, jitter->pointer_timestamp) && GE32(jitter->packets[i].timestamp+jitter->packets[i].span,jitter->pointer_timestamp+desired_span))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If still no match, try for an "older" packet that spans part of the current chunk */
|
||||||
|
if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data && LE32(jitter->packets[i].timestamp, jitter->pointer_timestamp) && GT32(jitter->packets[i].timestamp+jitter->packets[i].span,jitter->pointer_timestamp))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If still no match, try for earliest packet possible */
|
||||||
|
if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
int found = 0;
|
||||||
|
spx_uint32_t best_time=0;
|
||||||
|
int best_span=0;
|
||||||
|
int besti=0;
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
/* check if packet starts within current chunk */
|
||||||
|
if (jitter->packets[i].data && LT32(jitter->packets[i].timestamp,jitter->pointer_timestamp+desired_span) && GE32(jitter->packets[i].timestamp,jitter->pointer_timestamp))
|
||||||
|
{
|
||||||
|
if (!found || LT32(jitter->packets[i].timestamp,best_time) || (jitter->packets[i].timestamp==best_time && GT32(jitter->packets[i].span,best_span)))
|
||||||
|
{
|
||||||
|
best_time = jitter->packets[i].timestamp;
|
||||||
|
best_span = jitter->packets[i].span;
|
||||||
|
besti = i;
|
||||||
|
found = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found)
|
||||||
|
{
|
||||||
|
i=besti;
|
||||||
|
/*fprintf (stderr, "incomplete: %d %d %d %d\n", jitter->packets[i].timestamp, jitter->pointer_timestamp, chunk_size, jitter->packets[i].span);*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we find something */
|
||||||
|
if (i!=SPEEX_JITTER_MAX_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
spx_int32_t offset;
|
||||||
|
|
||||||
|
/* We (obviously) haven't lost this packet */
|
||||||
|
jitter->lost_count = 0;
|
||||||
|
|
||||||
|
/* In this case, 0 isn't as a valid timestamp */
|
||||||
|
if (jitter->arrival[i] != 0)
|
||||||
|
{
|
||||||
|
update_timings(jitter, ((spx_int32_t)jitter->packets[i].timestamp) - ((spx_int32_t)jitter->arrival[i]) - jitter->buffer_margin);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Copy packet */
|
||||||
|
if (jitter->destroy)
|
||||||
|
{
|
||||||
|
packet->data = jitter->packets[i].data;
|
||||||
|
packet->len = jitter->packets[i].len;
|
||||||
|
} else {
|
||||||
|
if (jitter->packets[i].len > packet->len)
|
||||||
|
{
|
||||||
|
speex_warning_int("jitter_buffer_get(): packet too large to fit. Size is", jitter->packets[i].len);
|
||||||
|
} else {
|
||||||
|
packet->len = jitter->packets[i].len;
|
||||||
|
}
|
||||||
|
for (j=0;j<packet->len;j++)
|
||||||
|
packet->data[j] = jitter->packets[i].data[j];
|
||||||
|
/* Remove packet */
|
||||||
|
speex_free(jitter->packets[i].data);
|
||||||
|
}
|
||||||
|
jitter->packets[i].data = NULL;
|
||||||
|
/* Set timestamp and span (if requested) */
|
||||||
|
offset = (spx_int32_t)jitter->packets[i].timestamp-(spx_int32_t)jitter->pointer_timestamp;
|
||||||
|
if (start_offset != NULL)
|
||||||
|
*start_offset = offset;
|
||||||
|
else if (offset != 0)
|
||||||
|
speex_warning_int("jitter_buffer_get() discarding non-zero start_offset", offset);
|
||||||
|
|
||||||
|
packet->timestamp = jitter->packets[i].timestamp;
|
||||||
|
jitter->last_returned_timestamp = packet->timestamp;
|
||||||
|
|
||||||
|
packet->span = jitter->packets[i].span;
|
||||||
|
packet->sequence = jitter->packets[i].sequence;
|
||||||
|
packet->user_data = jitter->packets[i].user_data;
|
||||||
|
/* Point to the end of the current packet */
|
||||||
|
jitter->pointer_timestamp = jitter->packets[i].timestamp+jitter->packets[i].span;
|
||||||
|
|
||||||
|
jitter->buffered = packet->span - desired_span;
|
||||||
|
|
||||||
|
if (start_offset != NULL)
|
||||||
|
jitter->buffered += *start_offset;
|
||||||
|
|
||||||
|
return JITTER_BUFFER_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* If we haven't found anything worth returning */
|
||||||
|
|
||||||
|
/*fprintf (stderr, "not found\n");*/
|
||||||
|
jitter->lost_count++;
|
||||||
|
/*fprintf (stderr, "m");*/
|
||||||
|
/*fprintf (stderr, "lost_count = %d\n", jitter->lost_count);*/
|
||||||
|
|
||||||
|
opt = compute_opt_delay(jitter);
|
||||||
|
|
||||||
|
/* Should we force an increase in the buffer or just do normal interpolation? */
|
||||||
|
if (opt < 0)
|
||||||
|
{
|
||||||
|
/* Need to increase buffering */
|
||||||
|
|
||||||
|
/* Shift histogram to compensate */
|
||||||
|
shift_timings(jitter, -opt);
|
||||||
|
|
||||||
|
packet->timestamp = jitter->pointer_timestamp;
|
||||||
|
packet->span = -opt;
|
||||||
|
/* Don't move the pointer_timestamp forward */
|
||||||
|
packet->len = 0;
|
||||||
|
|
||||||
|
jitter->buffered = packet->span - desired_span;
|
||||||
|
return JITTER_BUFFER_INSERTION;
|
||||||
|
/*jitter->pointer_timestamp -= jitter->delay_step;*/
|
||||||
|
/*fprintf (stderr, "Forced to interpolate\n");*/
|
||||||
|
} else {
|
||||||
|
/* Normal packet loss */
|
||||||
|
packet->timestamp = jitter->pointer_timestamp;
|
||||||
|
|
||||||
|
desired_span = ROUND_DOWN(desired_span, jitter->concealment_size);
|
||||||
|
packet->span = desired_span;
|
||||||
|
jitter->pointer_timestamp += desired_span;
|
||||||
|
packet->len = 0;
|
||||||
|
|
||||||
|
jitter->buffered = packet->span - desired_span;
|
||||||
|
return JITTER_BUFFER_MISSING;
|
||||||
|
/*fprintf (stderr, "Normal loss\n");*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT int jitter_buffer_get_another(JitterBuffer *jitter, JitterBufferPacket *packet)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data && jitter->packets[i].timestamp==jitter->last_returned_timestamp)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (i!=SPEEX_JITTER_MAX_BUFFER_SIZE)
|
||||||
|
{
|
||||||
|
/* Copy packet */
|
||||||
|
packet->len = jitter->packets[i].len;
|
||||||
|
if (jitter->destroy)
|
||||||
|
{
|
||||||
|
packet->data = jitter->packets[i].data;
|
||||||
|
} else {
|
||||||
|
for (j=0;j<packet->len;j++)
|
||||||
|
packet->data[j] = jitter->packets[i].data[j];
|
||||||
|
/* Remove packet */
|
||||||
|
speex_free(jitter->packets[i].data);
|
||||||
|
}
|
||||||
|
jitter->packets[i].data = NULL;
|
||||||
|
packet->timestamp = jitter->packets[i].timestamp;
|
||||||
|
packet->span = jitter->packets[i].span;
|
||||||
|
packet->sequence = jitter->packets[i].sequence;
|
||||||
|
packet->user_data = jitter->packets[i].user_data;
|
||||||
|
return JITTER_BUFFER_OK;
|
||||||
|
} else {
|
||||||
|
packet->data = NULL;
|
||||||
|
packet->len = 0;
|
||||||
|
packet->span = 0;
|
||||||
|
return JITTER_BUFFER_MISSING;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Let the jitter buffer know it's the right time to adjust the buffering delay to the network conditions */
|
||||||
|
static int _jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t *start_offset)
|
||||||
|
{
|
||||||
|
spx_int16_t opt = compute_opt_delay(jitter);
|
||||||
|
/*fprintf(stderr, "opt adjustment is %d ", opt);*/
|
||||||
|
|
||||||
|
if (opt < 0)
|
||||||
|
{
|
||||||
|
shift_timings(jitter, -opt);
|
||||||
|
|
||||||
|
jitter->pointer_timestamp += opt;
|
||||||
|
jitter->interp_requested = -opt;
|
||||||
|
/*fprintf (stderr, "Decision to interpolate %d samples\n", -opt);*/
|
||||||
|
} else if (opt > 0)
|
||||||
|
{
|
||||||
|
shift_timings(jitter, -opt);
|
||||||
|
jitter->pointer_timestamp += opt;
|
||||||
|
/*fprintf (stderr, "Decision to drop %d samples\n", opt);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
return opt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Let the jitter buffer know it's the right time to adjust the buffering delay to the network conditions */
|
||||||
|
EXPORT int jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t *start_offset)
|
||||||
|
{
|
||||||
|
/* If the programmer calls jitter_buffer_update_delay() directly,
|
||||||
|
automatically disable auto-adjustment */
|
||||||
|
jitter->auto_adjust = 0;
|
||||||
|
|
||||||
|
return _jitter_buffer_update_delay(jitter, packet, start_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get pointer timestamp of jitter buffer */
|
||||||
|
EXPORT int jitter_buffer_get_pointer_timestamp(JitterBuffer *jitter)
|
||||||
|
{
|
||||||
|
return jitter->pointer_timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT void jitter_buffer_tick(JitterBuffer *jitter)
|
||||||
|
{
|
||||||
|
/* Automatically-adjust the buffering delay if requested */
|
||||||
|
if (jitter->auto_adjust)
|
||||||
|
_jitter_buffer_update_delay(jitter, NULL, NULL);
|
||||||
|
|
||||||
|
if (jitter->buffered >= 0)
|
||||||
|
{
|
||||||
|
jitter->next_stop = jitter->pointer_timestamp - jitter->buffered;
|
||||||
|
} else {
|
||||||
|
jitter->next_stop = jitter->pointer_timestamp;
|
||||||
|
speex_warning_int("jitter buffer sees negative buffering, your code might be broken. Value is ", jitter->buffered);
|
||||||
|
}
|
||||||
|
jitter->buffered = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT void jitter_buffer_remaining_span(JitterBuffer *jitter, spx_uint32_t rem)
|
||||||
|
{
|
||||||
|
/* Automatically-adjust the buffering delay if requested */
|
||||||
|
if (jitter->auto_adjust)
|
||||||
|
_jitter_buffer_update_delay(jitter, NULL, NULL);
|
||||||
|
|
||||||
|
if (jitter->buffered < 0)
|
||||||
|
speex_warning_int("jitter buffer sees negative buffering, your code might be broken. Value is ", jitter->buffered);
|
||||||
|
jitter->next_stop = jitter->pointer_timestamp - rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Used like the ioctl function to control the jitter buffer parameters */
|
||||||
|
EXPORT int jitter_buffer_ctl(JitterBuffer *jitter, int request, void *ptr)
|
||||||
|
{
|
||||||
|
int count, i;
|
||||||
|
switch(request)
|
||||||
|
{
|
||||||
|
case JITTER_BUFFER_SET_MARGIN:
|
||||||
|
jitter->buffer_margin = *(spx_int32_t*)ptr;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_MARGIN:
|
||||||
|
*(spx_int32_t*)ptr = jitter->buffer_margin;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_AVALIABLE_COUNT:
|
||||||
|
count = 0;
|
||||||
|
for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
|
||||||
|
{
|
||||||
|
if (jitter->packets[i].data && LE32(jitter->pointer_timestamp, jitter->packets[i].timestamp))
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*(spx_int32_t*)ptr = count;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_SET_DESTROY_CALLBACK:
|
||||||
|
jitter->destroy = (void (*) (void *))ptr;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_DESTROY_CALLBACK:
|
||||||
|
*(void (**) (void *))ptr = jitter->destroy;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_SET_DELAY_STEP:
|
||||||
|
jitter->delay_step = *(spx_int32_t*)ptr;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_DELAY_STEP:
|
||||||
|
*(spx_int32_t*)ptr = jitter->delay_step;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_SET_CONCEALMENT_SIZE:
|
||||||
|
jitter->concealment_size = *(spx_int32_t*)ptr;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_CONCEALMENT_SIZE:
|
||||||
|
*(spx_int32_t*)ptr = jitter->concealment_size;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_SET_MAX_LATE_RATE:
|
||||||
|
jitter->max_late_rate = *(spx_int32_t*)ptr;
|
||||||
|
jitter->window_size = 100*TOP_DELAY/jitter->max_late_rate;
|
||||||
|
jitter->subwindow_size = jitter->window_size/MAX_BUFFERS;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_MAX_LATE_RATE:
|
||||||
|
*(spx_int32_t*)ptr = jitter->max_late_rate;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_SET_LATE_COST:
|
||||||
|
jitter->latency_tradeoff = *(spx_int32_t*)ptr;
|
||||||
|
break;
|
||||||
|
case JITTER_BUFFER_GET_LATE_COST:
|
||||||
|
*(spx_int32_t*)ptr = jitter->latency_tradeoff;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
speex_warning_int("Unknown jitter_buffer_ctl request: ", request);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
523
libspeexdsp/kiss_fft.c
Normal file
523
libspeexdsp/kiss_fft.c
Normal file
@ -0,0 +1,523 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2003-2004, Mark Borgerding
|
||||||
|
Copyright (c) 2005-2007, Jean-Marc Valin
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "_kiss_fft_guts.h"
|
||||||
|
#include "arch.h"
|
||||||
|
#include "os_support.h"
|
||||||
|
|
||||||
|
/* The guts header contains all the multiplication and addition macros that are defined for
|
||||||
|
fixed or floating point complex numbers. It also delares the kf_ internal functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void kf_bfly2(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const size_t fstride,
|
||||||
|
const kiss_fft_cfg st,
|
||||||
|
int m,
|
||||||
|
int N,
|
||||||
|
int mm
|
||||||
|
)
|
||||||
|
{
|
||||||
|
kiss_fft_cpx * Fout2;
|
||||||
|
kiss_fft_cpx * tw1;
|
||||||
|
kiss_fft_cpx t;
|
||||||
|
if (!st->inverse) {
|
||||||
|
int i,j;
|
||||||
|
kiss_fft_cpx * Fout_beg = Fout;
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
{
|
||||||
|
Fout = Fout_beg + i*mm;
|
||||||
|
Fout2 = Fout + m;
|
||||||
|
tw1 = st->twiddles;
|
||||||
|
for(j=0;j<m;j++)
|
||||||
|
{
|
||||||
|
/* Almost the same as the code path below, except that we divide the input by two
|
||||||
|
(while keeping the best accuracy possible) */
|
||||||
|
spx_word32_t tr, ti;
|
||||||
|
tr = SHR32(SUB32(MULT16_16(Fout2->r , tw1->r),MULT16_16(Fout2->i , tw1->i)), 1);
|
||||||
|
ti = SHR32(ADD32(MULT16_16(Fout2->i , tw1->r),MULT16_16(Fout2->r , tw1->i)), 1);
|
||||||
|
tw1 += fstride;
|
||||||
|
Fout2->r = PSHR32(SUB32(SHL32(EXTEND32(Fout->r), 14), tr), 15);
|
||||||
|
Fout2->i = PSHR32(SUB32(SHL32(EXTEND32(Fout->i), 14), ti), 15);
|
||||||
|
Fout->r = PSHR32(ADD32(SHL32(EXTEND32(Fout->r), 14), tr), 15);
|
||||||
|
Fout->i = PSHR32(ADD32(SHL32(EXTEND32(Fout->i), 14), ti), 15);
|
||||||
|
++Fout2;
|
||||||
|
++Fout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int i,j;
|
||||||
|
kiss_fft_cpx * Fout_beg = Fout;
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
{
|
||||||
|
Fout = Fout_beg + i*mm;
|
||||||
|
Fout2 = Fout + m;
|
||||||
|
tw1 = st->twiddles;
|
||||||
|
for(j=0;j<m;j++)
|
||||||
|
{
|
||||||
|
C_MUL (t, *Fout2 , *tw1);
|
||||||
|
tw1 += fstride;
|
||||||
|
C_SUB( *Fout2 , *Fout , t );
|
||||||
|
C_ADDTO( *Fout , t );
|
||||||
|
++Fout2;
|
||||||
|
++Fout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void kf_bfly4(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const size_t fstride,
|
||||||
|
const kiss_fft_cfg st,
|
||||||
|
int m,
|
||||||
|
int N,
|
||||||
|
int mm
|
||||||
|
)
|
||||||
|
{
|
||||||
|
kiss_fft_cpx *tw1,*tw2,*tw3;
|
||||||
|
kiss_fft_cpx scratch[6];
|
||||||
|
const size_t m2=2*m;
|
||||||
|
const size_t m3=3*m;
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
if (st->inverse)
|
||||||
|
{
|
||||||
|
kiss_fft_cpx * Fout_beg = Fout;
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
{
|
||||||
|
Fout = Fout_beg + i*mm;
|
||||||
|
tw3 = tw2 = tw1 = st->twiddles;
|
||||||
|
for (j=0;j<m;j++)
|
||||||
|
{
|
||||||
|
C_MUL(scratch[0],Fout[m] , *tw1 );
|
||||||
|
C_MUL(scratch[1],Fout[m2] , *tw2 );
|
||||||
|
C_MUL(scratch[2],Fout[m3] , *tw3 );
|
||||||
|
|
||||||
|
C_SUB( scratch[5] , *Fout, scratch[1] );
|
||||||
|
C_ADDTO(*Fout, scratch[1]);
|
||||||
|
C_ADD( scratch[3] , scratch[0] , scratch[2] );
|
||||||
|
C_SUB( scratch[4] , scratch[0] , scratch[2] );
|
||||||
|
C_SUB( Fout[m2], *Fout, scratch[3] );
|
||||||
|
tw1 += fstride;
|
||||||
|
tw2 += fstride*2;
|
||||||
|
tw3 += fstride*3;
|
||||||
|
C_ADDTO( *Fout , scratch[3] );
|
||||||
|
|
||||||
|
Fout[m].r = scratch[5].r - scratch[4].i;
|
||||||
|
Fout[m].i = scratch[5].i + scratch[4].r;
|
||||||
|
Fout[m3].r = scratch[5].r + scratch[4].i;
|
||||||
|
Fout[m3].i = scratch[5].i - scratch[4].r;
|
||||||
|
++Fout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
kiss_fft_cpx * Fout_beg = Fout;
|
||||||
|
for (i=0;i<N;i++)
|
||||||
|
{
|
||||||
|
Fout = Fout_beg + i*mm;
|
||||||
|
tw3 = tw2 = tw1 = st->twiddles;
|
||||||
|
for (j=0;j<m;j++)
|
||||||
|
{
|
||||||
|
C_MUL4(scratch[0],Fout[m] , *tw1 );
|
||||||
|
C_MUL4(scratch[1],Fout[m2] , *tw2 );
|
||||||
|
C_MUL4(scratch[2],Fout[m3] , *tw3 );
|
||||||
|
|
||||||
|
Fout->r = PSHR16(Fout->r, 2);
|
||||||
|
Fout->i = PSHR16(Fout->i, 2);
|
||||||
|
C_SUB( scratch[5] , *Fout, scratch[1] );
|
||||||
|
C_ADDTO(*Fout, scratch[1]);
|
||||||
|
C_ADD( scratch[3] , scratch[0] , scratch[2] );
|
||||||
|
C_SUB( scratch[4] , scratch[0] , scratch[2] );
|
||||||
|
Fout[m2].r = PSHR16(Fout[m2].r, 2);
|
||||||
|
Fout[m2].i = PSHR16(Fout[m2].i, 2);
|
||||||
|
C_SUB( Fout[m2], *Fout, scratch[3] );
|
||||||
|
tw1 += fstride;
|
||||||
|
tw2 += fstride*2;
|
||||||
|
tw3 += fstride*3;
|
||||||
|
C_ADDTO( *Fout , scratch[3] );
|
||||||
|
|
||||||
|
Fout[m].r = scratch[5].r + scratch[4].i;
|
||||||
|
Fout[m].i = scratch[5].i - scratch[4].r;
|
||||||
|
Fout[m3].r = scratch[5].r - scratch[4].i;
|
||||||
|
Fout[m3].i = scratch[5].i + scratch[4].r;
|
||||||
|
++Fout;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void kf_bfly3(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const size_t fstride,
|
||||||
|
const kiss_fft_cfg st,
|
||||||
|
size_t m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
size_t k=m;
|
||||||
|
const size_t m2 = 2*m;
|
||||||
|
kiss_fft_cpx *tw1,*tw2;
|
||||||
|
kiss_fft_cpx scratch[5];
|
||||||
|
kiss_fft_cpx epi3;
|
||||||
|
epi3 = st->twiddles[fstride*m];
|
||||||
|
|
||||||
|
tw1=tw2=st->twiddles;
|
||||||
|
|
||||||
|
do{
|
||||||
|
if (!st->inverse) {
|
||||||
|
C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3);
|
||||||
|
}
|
||||||
|
|
||||||
|
C_MUL(scratch[1],Fout[m] , *tw1);
|
||||||
|
C_MUL(scratch[2],Fout[m2] , *tw2);
|
||||||
|
|
||||||
|
C_ADD(scratch[3],scratch[1],scratch[2]);
|
||||||
|
C_SUB(scratch[0],scratch[1],scratch[2]);
|
||||||
|
tw1 += fstride;
|
||||||
|
tw2 += fstride*2;
|
||||||
|
|
||||||
|
Fout[m].r = Fout->r - HALF_OF(scratch[3].r);
|
||||||
|
Fout[m].i = Fout->i - HALF_OF(scratch[3].i);
|
||||||
|
|
||||||
|
C_MULBYSCALAR( scratch[0] , epi3.i );
|
||||||
|
|
||||||
|
C_ADDTO(*Fout,scratch[3]);
|
||||||
|
|
||||||
|
Fout[m2].r = Fout[m].r + scratch[0].i;
|
||||||
|
Fout[m2].i = Fout[m].i - scratch[0].r;
|
||||||
|
|
||||||
|
Fout[m].r -= scratch[0].i;
|
||||||
|
Fout[m].i += scratch[0].r;
|
||||||
|
|
||||||
|
++Fout;
|
||||||
|
}while(--k);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void kf_bfly5(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const size_t fstride,
|
||||||
|
const kiss_fft_cfg st,
|
||||||
|
int m
|
||||||
|
)
|
||||||
|
{
|
||||||
|
kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;
|
||||||
|
int u;
|
||||||
|
kiss_fft_cpx scratch[13];
|
||||||
|
kiss_fft_cpx * twiddles = st->twiddles;
|
||||||
|
kiss_fft_cpx *tw;
|
||||||
|
kiss_fft_cpx ya,yb;
|
||||||
|
ya = twiddles[fstride*m];
|
||||||
|
yb = twiddles[fstride*2*m];
|
||||||
|
|
||||||
|
Fout0=Fout;
|
||||||
|
Fout1=Fout0+m;
|
||||||
|
Fout2=Fout0+2*m;
|
||||||
|
Fout3=Fout0+3*m;
|
||||||
|
Fout4=Fout0+4*m;
|
||||||
|
|
||||||
|
tw=st->twiddles;
|
||||||
|
for ( u=0; u<m; ++u ) {
|
||||||
|
if (!st->inverse) {
|
||||||
|
C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
|
||||||
|
}
|
||||||
|
scratch[0] = *Fout0;
|
||||||
|
|
||||||
|
C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);
|
||||||
|
C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);
|
||||||
|
C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);
|
||||||
|
C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);
|
||||||
|
|
||||||
|
C_ADD( scratch[7],scratch[1],scratch[4]);
|
||||||
|
C_SUB( scratch[10],scratch[1],scratch[4]);
|
||||||
|
C_ADD( scratch[8],scratch[2],scratch[3]);
|
||||||
|
C_SUB( scratch[9],scratch[2],scratch[3]);
|
||||||
|
|
||||||
|
Fout0->r += scratch[7].r + scratch[8].r;
|
||||||
|
Fout0->i += scratch[7].i + scratch[8].i;
|
||||||
|
|
||||||
|
scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);
|
||||||
|
scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);
|
||||||
|
|
||||||
|
scratch[6].r = S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i);
|
||||||
|
scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i);
|
||||||
|
|
||||||
|
C_SUB(*Fout1,scratch[5],scratch[6]);
|
||||||
|
C_ADD(*Fout4,scratch[5],scratch[6]);
|
||||||
|
|
||||||
|
scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);
|
||||||
|
scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);
|
||||||
|
scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i);
|
||||||
|
scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i);
|
||||||
|
|
||||||
|
C_ADD(*Fout2,scratch[11],scratch[12]);
|
||||||
|
C_SUB(*Fout3,scratch[11],scratch[12]);
|
||||||
|
|
||||||
|
++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* perform the butterfly for one stage of a mixed radix FFT */
|
||||||
|
static void kf_bfly_generic(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const size_t fstride,
|
||||||
|
const kiss_fft_cfg st,
|
||||||
|
int m,
|
||||||
|
int p
|
||||||
|
)
|
||||||
|
{
|
||||||
|
int u,k,q1,q;
|
||||||
|
kiss_fft_cpx * twiddles = st->twiddles;
|
||||||
|
kiss_fft_cpx t;
|
||||||
|
kiss_fft_cpx scratchbuf[17];
|
||||||
|
int Norig = st->nfft;
|
||||||
|
|
||||||
|
/*CHECKBUF(scratchbuf,nscratchbuf,p);*/
|
||||||
|
if (p>17)
|
||||||
|
speex_fatal("KissFFT: max radix supported is 17");
|
||||||
|
|
||||||
|
for ( u=0; u<m; ++u ) {
|
||||||
|
k=u;
|
||||||
|
for ( q1=0 ; q1<p ; ++q1 ) {
|
||||||
|
scratchbuf[q1] = Fout[ k ];
|
||||||
|
if (!st->inverse) {
|
||||||
|
C_FIXDIV(scratchbuf[q1],p);
|
||||||
|
}
|
||||||
|
k += m;
|
||||||
|
}
|
||||||
|
|
||||||
|
k=u;
|
||||||
|
for ( q1=0 ; q1<p ; ++q1 ) {
|
||||||
|
int twidx=0;
|
||||||
|
Fout[ k ] = scratchbuf[0];
|
||||||
|
for (q=1;q<p;++q ) {
|
||||||
|
twidx += fstride * k;
|
||||||
|
if (twidx>=Norig) twidx-=Norig;
|
||||||
|
C_MUL(t,scratchbuf[q] , twiddles[twidx] );
|
||||||
|
C_ADDTO( Fout[ k ] ,t);
|
||||||
|
}
|
||||||
|
k += m;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void kf_shuffle(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const kiss_fft_cpx * f,
|
||||||
|
const size_t fstride,
|
||||||
|
int in_stride,
|
||||||
|
int * factors,
|
||||||
|
const kiss_fft_cfg st
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const int p=*factors++; /* the radix */
|
||||||
|
const int m=*factors++; /* stage's fft length/p */
|
||||||
|
|
||||||
|
/*printf ("fft %d %d %d %d %d %d\n", p*m, m, p, s2, fstride*in_stride, N);*/
|
||||||
|
if (m==1)
|
||||||
|
{
|
||||||
|
int j;
|
||||||
|
for (j=0;j<p;j++)
|
||||||
|
{
|
||||||
|
Fout[j] = *f;
|
||||||
|
f += fstride*in_stride;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int j;
|
||||||
|
for (j=0;j<p;j++)
|
||||||
|
{
|
||||||
|
kf_shuffle( Fout , f, fstride*p, in_stride, factors,st);
|
||||||
|
f += fstride*in_stride;
|
||||||
|
Fout += m;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void kf_work(
|
||||||
|
kiss_fft_cpx * Fout,
|
||||||
|
const kiss_fft_cpx * f,
|
||||||
|
const size_t fstride,
|
||||||
|
int in_stride,
|
||||||
|
int * factors,
|
||||||
|
const kiss_fft_cfg st,
|
||||||
|
int N,
|
||||||
|
int s2,
|
||||||
|
int m2
|
||||||
|
)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
kiss_fft_cpx * Fout_beg=Fout;
|
||||||
|
const int p=*factors++; /* the radix */
|
||||||
|
const int m=*factors++; /* stage's fft length/p */
|
||||||
|
#if 0
|
||||||
|
/*printf ("fft %d %d %d %d %d %d\n", p*m, m, p, s2, fstride*in_stride, N);*/
|
||||||
|
if (m==1)
|
||||||
|
{
|
||||||
|
/* int j;
|
||||||
|
for (j=0;j<p;j++)
|
||||||
|
{
|
||||||
|
Fout[j] = *f;
|
||||||
|
f += fstride*in_stride;
|
||||||
|
}*/
|
||||||
|
} else {
|
||||||
|
int j;
|
||||||
|
for (j=0;j<p;j++)
|
||||||
|
{
|
||||||
|
kf_work( Fout , f, fstride*p, in_stride, factors,st, N*p, fstride*in_stride, m);
|
||||||
|
f += fstride*in_stride;
|
||||||
|
Fout += m;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Fout=Fout_beg;
|
||||||
|
|
||||||
|
switch (p) {
|
||||||
|
case 2: kf_bfly2(Fout,fstride,st,m); break;
|
||||||
|
case 3: kf_bfly3(Fout,fstride,st,m); break;
|
||||||
|
case 4: kf_bfly4(Fout,fstride,st,m); break;
|
||||||
|
case 5: kf_bfly5(Fout,fstride,st,m); break;
|
||||||
|
default: kf_bfly_generic(Fout,fstride,st,m,p); break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/*printf ("fft %d %d %d %d %d %d %d\n", p*m, m, p, s2, fstride*in_stride, N, m2);*/
|
||||||
|
if (m==1)
|
||||||
|
{
|
||||||
|
/*for (i=0;i<N;i++)
|
||||||
|
{
|
||||||
|
int j;
|
||||||
|
Fout = Fout_beg+i*m2;
|
||||||
|
const kiss_fft_cpx * f2 = f+i*s2;
|
||||||
|
for (j=0;j<p;j++)
|
||||||
|
{
|
||||||
|
*Fout++ = *f2;
|
||||||
|
f2 += fstride*in_stride;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}else{
|
||||||
|
kf_work( Fout , f, fstride*p, in_stride, factors,st, N*p, fstride*in_stride, m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
switch (p) {
|
||||||
|
case 2: kf_bfly2(Fout,fstride,st,m, N, m2); break;
|
||||||
|
case 3: for (i=0;i<N;i++){Fout=Fout_beg+i*m2; kf_bfly3(Fout,fstride,st,m);} break;
|
||||||
|
case 4: kf_bfly4(Fout,fstride,st,m, N, m2); break;
|
||||||
|
case 5: for (i=0;i<N;i++){Fout=Fout_beg+i*m2; kf_bfly5(Fout,fstride,st,m);} break;
|
||||||
|
default: for (i=0;i<N;i++){Fout=Fout_beg+i*m2; kf_bfly_generic(Fout,fstride,st,m,p);} break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* facbuf is populated by p1,m1,p2,m2, ...
|
||||||
|
where
|
||||||
|
p[i] * m[i] = m[i-1]
|
||||||
|
m0 = n */
|
||||||
|
static
|
||||||
|
void kf_factor(int n,int * facbuf)
|
||||||
|
{
|
||||||
|
int p=4;
|
||||||
|
|
||||||
|
/*factor out powers of 4, powers of 2, then any remaining primes */
|
||||||
|
do {
|
||||||
|
while (n % p) {
|
||||||
|
switch (p) {
|
||||||
|
case 4: p = 2; break;
|
||||||
|
case 2: p = 3; break;
|
||||||
|
default: p += 2; break;
|
||||||
|
}
|
||||||
|
if (p>32000 || (spx_int32_t)p*(spx_int32_t)p > n)
|
||||||
|
p = n; /* no more factors, skip to end */
|
||||||
|
}
|
||||||
|
n /= p;
|
||||||
|
*facbuf++ = p;
|
||||||
|
*facbuf++ = n;
|
||||||
|
} while (n > 1);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* User-callable function to allocate all necessary storage space for the fft.
|
||||||
|
*
|
||||||
|
* The return value is a contiguous block of memory, allocated with malloc. As such,
|
||||||
|
* It can be freed with free(), rather than a kiss_fft-specific function.
|
||||||
|
* */
|
||||||
|
kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem )
|
||||||
|
{
|
||||||
|
kiss_fft_cfg st=NULL;
|
||||||
|
size_t memneeded = sizeof(struct kiss_fft_state)
|
||||||
|
+ sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/
|
||||||
|
|
||||||
|
if ( lenmem==NULL ) {
|
||||||
|
st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded );
|
||||||
|
}else{
|
||||||
|
if (mem != NULL && *lenmem >= memneeded)
|
||||||
|
st = (kiss_fft_cfg)mem;
|
||||||
|
*lenmem = memneeded;
|
||||||
|
}
|
||||||
|
if (st) {
|
||||||
|
int i;
|
||||||
|
st->nfft=nfft;
|
||||||
|
st->inverse = inverse_fft;
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
for (i=0;i<nfft;++i) {
|
||||||
|
spx_word32_t phase = i;
|
||||||
|
if (!st->inverse)
|
||||||
|
phase = -phase;
|
||||||
|
kf_cexp2(st->twiddles+i, DIV32(SHL32(phase,17),nfft));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
for (i=0;i<nfft;++i) {
|
||||||
|
const double pi=3.14159265358979323846264338327;
|
||||||
|
double phase = ( -2*pi /nfft ) * i;
|
||||||
|
if (st->inverse)
|
||||||
|
phase *= -1;
|
||||||
|
kf_cexp(st->twiddles+i, phase );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
kf_factor(nfft,st->factors);
|
||||||
|
}
|
||||||
|
return st;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
|
||||||
|
{
|
||||||
|
if (fin == fout)
|
||||||
|
{
|
||||||
|
speex_fatal("In-place FFT not supported");
|
||||||
|
/*CHECKBUF(tmpbuf,ntmpbuf,st->nfft);
|
||||||
|
kf_work(tmpbuf,fin,1,in_stride, st->factors,st);
|
||||||
|
SPEEX_MOVE(fout,tmpbuf,st->nfft);*/
|
||||||
|
} else {
|
||||||
|
kf_shuffle( fout, fin, 1,in_stride, st->factors,st);
|
||||||
|
kf_work( fout, fin, 1,in_stride, st->factors,st, 1, in_stride, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
|
||||||
|
{
|
||||||
|
kiss_fft_stride(cfg,fin,fout,1);
|
||||||
|
}
|
||||||
|
|
108
libspeexdsp/kiss_fft.h
Normal file
108
libspeexdsp/kiss_fft.h
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
#ifndef KISS_FFT_H
|
||||||
|
#define KISS_FFT_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include "arch.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
ATTENTION!
|
||||||
|
If you would like a :
|
||||||
|
-- a utility that will handle the caching of fft objects
|
||||||
|
-- real-only (no imaginary time component ) FFT
|
||||||
|
-- a multi-dimensional FFT
|
||||||
|
-- a command-line utility to perform ffts
|
||||||
|
-- a command-line utility to perform fast-convolution filtering
|
||||||
|
|
||||||
|
Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
|
||||||
|
in the tools/ directory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef USE_SIMD
|
||||||
|
# include <xmmintrin.h>
|
||||||
|
# define kiss_fft_scalar __m128
|
||||||
|
#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes)
|
||||||
|
#else
|
||||||
|
#define KISS_FFT_MALLOC speex_alloc
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
#include "arch.h"
|
||||||
|
# define kiss_fft_scalar spx_int16_t
|
||||||
|
#else
|
||||||
|
# ifndef kiss_fft_scalar
|
||||||
|
/* default is float */
|
||||||
|
# define kiss_fft_scalar float
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
kiss_fft_scalar r;
|
||||||
|
kiss_fft_scalar i;
|
||||||
|
}kiss_fft_cpx;
|
||||||
|
|
||||||
|
typedef struct kiss_fft_state* kiss_fft_cfg;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* kiss_fft_alloc
|
||||||
|
*
|
||||||
|
* Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
|
||||||
|
*
|
||||||
|
* typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
|
||||||
|
*
|
||||||
|
* The return value from fft_alloc is a cfg buffer used internally
|
||||||
|
* by the fft routine or NULL.
|
||||||
|
*
|
||||||
|
* If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
|
||||||
|
* The returned value should be free()d when done to avoid memory leaks.
|
||||||
|
*
|
||||||
|
* The state can be placed in a user supplied buffer 'mem':
|
||||||
|
* If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
|
||||||
|
* then the function places the cfg in mem and the size used in *lenmem
|
||||||
|
* and returns mem.
|
||||||
|
*
|
||||||
|
* If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
|
||||||
|
* then the function returns NULL and places the minimum cfg
|
||||||
|
* buffer size in *lenmem.
|
||||||
|
* */
|
||||||
|
|
||||||
|
kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* kiss_fft(cfg,in_out_buf)
|
||||||
|
*
|
||||||
|
* Perform an FFT on a complex input buffer.
|
||||||
|
* for a forward FFT,
|
||||||
|
* fin should be f[0] , f[1] , ... ,f[nfft-1]
|
||||||
|
* fout will be F[0] , F[1] , ... ,F[nfft-1]
|
||||||
|
* Note that each element is complex and can be accessed like
|
||||||
|
f[k].r and f[k].i
|
||||||
|
* */
|
||||||
|
void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
|
||||||
|
|
||||||
|
/*
|
||||||
|
A more generic version of the above function. It reads its input from every Nth sample.
|
||||||
|
* */
|
||||||
|
void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
|
||||||
|
|
||||||
|
/* If kiss_fft_alloc allocated a buffer, it is one contiguous
|
||||||
|
buffer and can be simply free()d when no longer needed*/
|
||||||
|
#define kiss_fft_free speex_free
|
||||||
|
|
||||||
|
/*
|
||||||
|
Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up
|
||||||
|
your compiler output to call this before you exit.
|
||||||
|
*/
|
||||||
|
void kiss_fft_cleanup(void);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
297
libspeexdsp/kiss_fftr.c
Normal file
297
libspeexdsp/kiss_fftr.c
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2003-2004, Mark Borgerding
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "os_support.h"
|
||||||
|
#include "kiss_fftr.h"
|
||||||
|
#include "_kiss_fft_guts.h"
|
||||||
|
|
||||||
|
struct kiss_fftr_state{
|
||||||
|
kiss_fft_cfg substate;
|
||||||
|
kiss_fft_cpx * tmpbuf;
|
||||||
|
kiss_fft_cpx * super_twiddles;
|
||||||
|
#ifdef USE_SIMD
|
||||||
|
long pad;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
kiss_fftr_cfg st = NULL;
|
||||||
|
size_t subsize, memneeded;
|
||||||
|
|
||||||
|
if (nfft & 1) {
|
||||||
|
speex_warning("Real FFT optimization must be even.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
nfft >>= 1;
|
||||||
|
|
||||||
|
kiss_fft_alloc (nfft, inverse_fft, NULL, &subsize);
|
||||||
|
memneeded = sizeof(struct kiss_fftr_state) + subsize + sizeof(kiss_fft_cpx) * ( nfft * 2);
|
||||||
|
|
||||||
|
if (lenmem == NULL) {
|
||||||
|
st = (kiss_fftr_cfg) KISS_FFT_MALLOC (memneeded);
|
||||||
|
} else {
|
||||||
|
if (*lenmem >= memneeded)
|
||||||
|
st = (kiss_fftr_cfg) mem;
|
||||||
|
*lenmem = memneeded;
|
||||||
|
}
|
||||||
|
if (!st)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
st->substate = (kiss_fft_cfg) (st + 1); /*just beyond kiss_fftr_state struct */
|
||||||
|
st->tmpbuf = (kiss_fft_cpx *) (((char *) st->substate) + subsize);
|
||||||
|
st->super_twiddles = st->tmpbuf + nfft;
|
||||||
|
kiss_fft_alloc(nfft, inverse_fft, st->substate, &subsize);
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
for (i=0;i<nfft;++i) {
|
||||||
|
spx_word32_t phase = i+(nfft>>1);
|
||||||
|
if (!inverse_fft)
|
||||||
|
phase = -phase;
|
||||||
|
kf_cexp2(st->super_twiddles+i, DIV32(SHL32(phase,16),nfft));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
for (i=0;i<nfft;++i) {
|
||||||
|
const double pi=3.14159265358979323846264338327;
|
||||||
|
double phase = pi*(((double)i) /nfft + .5);
|
||||||
|
if (!inverse_fft)
|
||||||
|
phase = -phase;
|
||||||
|
kf_cexp(st->super_twiddles+i, phase );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return st;
|
||||||
|
}
|
||||||
|
|
||||||
|
void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata)
|
||||||
|
{
|
||||||
|
/* input buffer timedata is stored row-wise */
|
||||||
|
int k,ncfft;
|
||||||
|
kiss_fft_cpx fpnk,fpk,f1k,f2k,tw,tdc;
|
||||||
|
|
||||||
|
if ( st->substate->inverse) {
|
||||||
|
speex_fatal("kiss fft usage error: improper alloc\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
ncfft = st->substate->nfft;
|
||||||
|
|
||||||
|
/*perform the parallel fft of two real signals packed in real,imag*/
|
||||||
|
kiss_fft( st->substate , (const kiss_fft_cpx*)timedata, st->tmpbuf );
|
||||||
|
/* The real part of the DC element of the frequency spectrum in st->tmpbuf
|
||||||
|
* contains the sum of the even-numbered elements of the input time sequence
|
||||||
|
* The imag part is the sum of the odd-numbered elements
|
||||||
|
*
|
||||||
|
* The sum of tdc.r and tdc.i is the sum of the input time sequence.
|
||||||
|
* yielding DC of input time sequence
|
||||||
|
* The difference of tdc.r - tdc.i is the sum of the input (dot product) [1,-1,1,-1...
|
||||||
|
* yielding Nyquist bin of input time sequence
|
||||||
|
*/
|
||||||
|
|
||||||
|
tdc.r = st->tmpbuf[0].r;
|
||||||
|
tdc.i = st->tmpbuf[0].i;
|
||||||
|
C_FIXDIV(tdc,2);
|
||||||
|
CHECK_OVERFLOW_OP(tdc.r ,+, tdc.i);
|
||||||
|
CHECK_OVERFLOW_OP(tdc.r ,-, tdc.i);
|
||||||
|
freqdata[0].r = tdc.r + tdc.i;
|
||||||
|
freqdata[ncfft].r = tdc.r - tdc.i;
|
||||||
|
#ifdef USE_SIMD
|
||||||
|
freqdata[ncfft].i = freqdata[0].i = _mm_set1_ps(0);
|
||||||
|
#else
|
||||||
|
freqdata[ncfft].i = freqdata[0].i = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for ( k=1;k <= ncfft/2 ; ++k ) {
|
||||||
|
fpk = st->tmpbuf[k];
|
||||||
|
fpnk.r = st->tmpbuf[ncfft-k].r;
|
||||||
|
fpnk.i = - st->tmpbuf[ncfft-k].i;
|
||||||
|
C_FIXDIV(fpk,2);
|
||||||
|
C_FIXDIV(fpnk,2);
|
||||||
|
|
||||||
|
C_ADD( f1k, fpk , fpnk );
|
||||||
|
C_SUB( f2k, fpk , fpnk );
|
||||||
|
C_MUL( tw , f2k , st->super_twiddles[k]);
|
||||||
|
|
||||||
|
freqdata[k].r = HALF_OF(f1k.r + tw.r);
|
||||||
|
freqdata[k].i = HALF_OF(f1k.i + tw.i);
|
||||||
|
freqdata[ncfft-k].r = HALF_OF(f1k.r - tw.r);
|
||||||
|
freqdata[ncfft-k].i = HALF_OF(tw.i - f1k.i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_cpx *freqdata, kiss_fft_scalar *timedata)
|
||||||
|
{
|
||||||
|
/* input buffer timedata is stored row-wise */
|
||||||
|
int k, ncfft;
|
||||||
|
|
||||||
|
if (st->substate->inverse == 0) {
|
||||||
|
speex_fatal("kiss fft usage error: improper alloc\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
ncfft = st->substate->nfft;
|
||||||
|
|
||||||
|
st->tmpbuf[0].r = freqdata[0].r + freqdata[ncfft].r;
|
||||||
|
st->tmpbuf[0].i = freqdata[0].r - freqdata[ncfft].r;
|
||||||
|
/*C_FIXDIV(st->tmpbuf[0],2);*/
|
||||||
|
|
||||||
|
for (k = 1; k <= ncfft / 2; ++k) {
|
||||||
|
kiss_fft_cpx fk, fnkc, fek, fok, tmp;
|
||||||
|
fk = freqdata[k];
|
||||||
|
fnkc.r = freqdata[ncfft - k].r;
|
||||||
|
fnkc.i = -freqdata[ncfft - k].i;
|
||||||
|
/*C_FIXDIV( fk , 2 );
|
||||||
|
C_FIXDIV( fnkc , 2 );*/
|
||||||
|
|
||||||
|
C_ADD (fek, fk, fnkc);
|
||||||
|
C_SUB (tmp, fk, fnkc);
|
||||||
|
C_MUL (fok, tmp, st->super_twiddles[k]);
|
||||||
|
C_ADD (st->tmpbuf[k], fek, fok);
|
||||||
|
C_SUB (st->tmpbuf[ncfft - k], fek, fok);
|
||||||
|
#ifdef USE_SIMD
|
||||||
|
st->tmpbuf[ncfft - k].i *= _mm_set1_ps(-1.0);
|
||||||
|
#else
|
||||||
|
st->tmpbuf[ncfft - k].i *= -1;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
kiss_fft (st->substate, st->tmpbuf, (kiss_fft_cpx *) timedata);
|
||||||
|
}
|
||||||
|
|
||||||
|
void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata)
|
||||||
|
{
|
||||||
|
/* input buffer timedata is stored row-wise */
|
||||||
|
int k,ncfft;
|
||||||
|
kiss_fft_cpx f2k,tdc;
|
||||||
|
spx_word32_t f1kr, f1ki, twr, twi;
|
||||||
|
|
||||||
|
if ( st->substate->inverse) {
|
||||||
|
speex_fatal("kiss fft usage error: improper alloc\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
ncfft = st->substate->nfft;
|
||||||
|
|
||||||
|
/*perform the parallel fft of two real signals packed in real,imag*/
|
||||||
|
kiss_fft( st->substate , (const kiss_fft_cpx*)timedata, st->tmpbuf );
|
||||||
|
/* The real part of the DC element of the frequency spectrum in st->tmpbuf
|
||||||
|
* contains the sum of the even-numbered elements of the input time sequence
|
||||||
|
* The imag part is the sum of the odd-numbered elements
|
||||||
|
*
|
||||||
|
* The sum of tdc.r and tdc.i is the sum of the input time sequence.
|
||||||
|
* yielding DC of input time sequence
|
||||||
|
* The difference of tdc.r - tdc.i is the sum of the input (dot product) [1,-1,1,-1...
|
||||||
|
* yielding Nyquist bin of input time sequence
|
||||||
|
*/
|
||||||
|
|
||||||
|
tdc.r = st->tmpbuf[0].r;
|
||||||
|
tdc.i = st->tmpbuf[0].i;
|
||||||
|
C_FIXDIV(tdc,2);
|
||||||
|
CHECK_OVERFLOW_OP(tdc.r ,+, tdc.i);
|
||||||
|
CHECK_OVERFLOW_OP(tdc.r ,-, tdc.i);
|
||||||
|
freqdata[0] = tdc.r + tdc.i;
|
||||||
|
freqdata[2*ncfft-1] = tdc.r - tdc.i;
|
||||||
|
|
||||||
|
for ( k=1;k <= ncfft/2 ; ++k )
|
||||||
|
{
|
||||||
|
/*fpk = st->tmpbuf[k];
|
||||||
|
fpnk.r = st->tmpbuf[ncfft-k].r;
|
||||||
|
fpnk.i = - st->tmpbuf[ncfft-k].i;
|
||||||
|
C_FIXDIV(fpk,2);
|
||||||
|
C_FIXDIV(fpnk,2);
|
||||||
|
|
||||||
|
C_ADD( f1k, fpk , fpnk );
|
||||||
|
C_SUB( f2k, fpk , fpnk );
|
||||||
|
|
||||||
|
C_MUL( tw , f2k , st->super_twiddles[k]);
|
||||||
|
|
||||||
|
freqdata[2*k-1] = HALF_OF(f1k.r + tw.r);
|
||||||
|
freqdata[2*k] = HALF_OF(f1k.i + tw.i);
|
||||||
|
freqdata[2*(ncfft-k)-1] = HALF_OF(f1k.r - tw.r);
|
||||||
|
freqdata[2*(ncfft-k)] = HALF_OF(tw.i - f1k.i);
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*f1k.r = PSHR32(ADD32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1);
|
||||||
|
f1k.i = PSHR32(SUB32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1);
|
||||||
|
f2k.r = PSHR32(SUB32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1);
|
||||||
|
f2k.i = SHR32(ADD32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1);
|
||||||
|
|
||||||
|
C_MUL( tw , f2k , st->super_twiddles[k]);
|
||||||
|
|
||||||
|
freqdata[2*k-1] = HALF_OF(f1k.r + tw.r);
|
||||||
|
freqdata[2*k] = HALF_OF(f1k.i + tw.i);
|
||||||
|
freqdata[2*(ncfft-k)-1] = HALF_OF(f1k.r - tw.r);
|
||||||
|
freqdata[2*(ncfft-k)] = HALF_OF(tw.i - f1k.i);
|
||||||
|
*/
|
||||||
|
f2k.r = SHR32(SUB32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1);
|
||||||
|
f2k.i = PSHR32(ADD32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1);
|
||||||
|
|
||||||
|
f1kr = SHL32(ADD32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),13);
|
||||||
|
f1ki = SHL32(SUB32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),13);
|
||||||
|
|
||||||
|
twr = SHR32(SUB32(MULT16_16(f2k.r,st->super_twiddles[k].r),MULT16_16(f2k.i,st->super_twiddles[k].i)), 1);
|
||||||
|
twi = SHR32(ADD32(MULT16_16(f2k.i,st->super_twiddles[k].r),MULT16_16(f2k.r,st->super_twiddles[k].i)), 1);
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
freqdata[2*k-1] = PSHR32(f1kr + twr, 15);
|
||||||
|
freqdata[2*k] = PSHR32(f1ki + twi, 15);
|
||||||
|
freqdata[2*(ncfft-k)-1] = PSHR32(f1kr - twr, 15);
|
||||||
|
freqdata[2*(ncfft-k)] = PSHR32(twi - f1ki, 15);
|
||||||
|
#else
|
||||||
|
freqdata[2*k-1] = .5f*(f1kr + twr);
|
||||||
|
freqdata[2*k] = .5f*(f1ki + twi);
|
||||||
|
freqdata[2*(ncfft-k)-1] = .5f*(f1kr - twr);
|
||||||
|
freqdata[2*(ncfft-k)] = .5f*(twi - f1ki);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata,kiss_fft_scalar *timedata)
|
||||||
|
{
|
||||||
|
/* input buffer timedata is stored row-wise */
|
||||||
|
int k, ncfft;
|
||||||
|
|
||||||
|
if (st->substate->inverse == 0) {
|
||||||
|
speex_fatal ("kiss fft usage error: improper alloc\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
ncfft = st->substate->nfft;
|
||||||
|
|
||||||
|
st->tmpbuf[0].r = freqdata[0] + freqdata[2*ncfft-1];
|
||||||
|
st->tmpbuf[0].i = freqdata[0] - freqdata[2*ncfft-1];
|
||||||
|
/*C_FIXDIV(st->tmpbuf[0],2);*/
|
||||||
|
|
||||||
|
for (k = 1; k <= ncfft / 2; ++k) {
|
||||||
|
kiss_fft_cpx fk, fnkc, fek, fok, tmp;
|
||||||
|
fk.r = freqdata[2*k-1];
|
||||||
|
fk.i = freqdata[2*k];
|
||||||
|
fnkc.r = freqdata[2*(ncfft - k)-1];
|
||||||
|
fnkc.i = -freqdata[2*(ncfft - k)];
|
||||||
|
/*C_FIXDIV( fk , 2 );
|
||||||
|
C_FIXDIV( fnkc , 2 );*/
|
||||||
|
|
||||||
|
C_ADD (fek, fk, fnkc);
|
||||||
|
C_SUB (tmp, fk, fnkc);
|
||||||
|
C_MUL (fok, tmp, st->super_twiddles[k]);
|
||||||
|
C_ADD (st->tmpbuf[k], fek, fok);
|
||||||
|
C_SUB (st->tmpbuf[ncfft - k], fek, fok);
|
||||||
|
#ifdef USE_SIMD
|
||||||
|
st->tmpbuf[ncfft - k].i *= _mm_set1_ps(-1.0);
|
||||||
|
#else
|
||||||
|
st->tmpbuf[ncfft - k].i *= -1;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
kiss_fft (st->substate, st->tmpbuf, (kiss_fft_cpx *) timedata);
|
||||||
|
}
|
51
libspeexdsp/kiss_fftr.h
Normal file
51
libspeexdsp/kiss_fftr.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#ifndef KISS_FTR_H
|
||||||
|
#define KISS_FTR_H
|
||||||
|
|
||||||
|
#include "kiss_fft.h"
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct kiss_fftr_state *kiss_fftr_cfg;
|
||||||
|
|
||||||
|
|
||||||
|
kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
|
||||||
|
/*
|
||||||
|
nfft must be even
|
||||||
|
|
||||||
|
If you don't care to allocate space, use mem = lenmem = NULL
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
|
||||||
|
/*
|
||||||
|
input timedata has nfft scalar points
|
||||||
|
output freqdata has nfft/2+1 complex points
|
||||||
|
*/
|
||||||
|
|
||||||
|
void kiss_fftr2(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
|
||||||
|
|
||||||
|
void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
|
||||||
|
|
||||||
|
void kiss_fftri2(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
|
||||||
|
|
||||||
|
/*
|
||||||
|
input freqdata has nfft/2+1 complex points
|
||||||
|
output timedata has nfft scalar points
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define kiss_fftr_free speex_free
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
332
libspeexdsp/math_approx.h
Normal file
332
libspeexdsp/math_approx.h
Normal file
@ -0,0 +1,332 @@
|
|||||||
|
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file math_approx.h
|
||||||
|
@brief Various math approximation functions for Speex
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MATH_APPROX_H
|
||||||
|
#define MATH_APPROX_H
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
|
||||||
|
#ifndef FIXED_POINT
|
||||||
|
|
||||||
|
#define spx_sqrt sqrt
|
||||||
|
#define spx_acos acos
|
||||||
|
#define spx_exp exp
|
||||||
|
#define spx_cos_norm(x) (cos((.5f*M_PI)*(x)))
|
||||||
|
#define spx_atan atan
|
||||||
|
|
||||||
|
/** Generate a pseudo-random number */
|
||||||
|
static inline spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed)
|
||||||
|
{
|
||||||
|
const unsigned int jflone = 0x3f800000;
|
||||||
|
const unsigned int jflmsk = 0x007fffff;
|
||||||
|
union {int i; float f;} ran;
|
||||||
|
*seed = 1664525 * *seed + 1013904223;
|
||||||
|
ran.i = jflone | (jflmsk & *seed);
|
||||||
|
ran.f -= 1.5;
|
||||||
|
return 3.4642*std*ran.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static inline spx_int16_t spx_ilog2(spx_uint32_t x)
|
||||||
|
{
|
||||||
|
int r=0;
|
||||||
|
if (x>=(spx_int32_t)65536)
|
||||||
|
{
|
||||||
|
x >>= 16;
|
||||||
|
r += 16;
|
||||||
|
}
|
||||||
|
if (x>=256)
|
||||||
|
{
|
||||||
|
x >>= 8;
|
||||||
|
r += 8;
|
||||||
|
}
|
||||||
|
if (x>=16)
|
||||||
|
{
|
||||||
|
x >>= 4;
|
||||||
|
r += 4;
|
||||||
|
}
|
||||||
|
if (x>=4)
|
||||||
|
{
|
||||||
|
x >>= 2;
|
||||||
|
r += 2;
|
||||||
|
}
|
||||||
|
if (x>=2)
|
||||||
|
{
|
||||||
|
r += 1;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_int16_t spx_ilog4(spx_uint32_t x)
|
||||||
|
{
|
||||||
|
int r=0;
|
||||||
|
if (x>=(spx_int32_t)65536)
|
||||||
|
{
|
||||||
|
x >>= 16;
|
||||||
|
r += 8;
|
||||||
|
}
|
||||||
|
if (x>=256)
|
||||||
|
{
|
||||||
|
x >>= 8;
|
||||||
|
r += 4;
|
||||||
|
}
|
||||||
|
if (x>=16)
|
||||||
|
{
|
||||||
|
x >>= 4;
|
||||||
|
r += 2;
|
||||||
|
}
|
||||||
|
if (x>=4)
|
||||||
|
{
|
||||||
|
r += 1;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
|
||||||
|
/** Generate a pseudo-random number */
|
||||||
|
static inline spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed)
|
||||||
|
{
|
||||||
|
spx_word32_t res;
|
||||||
|
*seed = 1664525 * *seed + 1013904223;
|
||||||
|
res = MULT16_16(EXTRACT16(SHR32(*seed,16)),std);
|
||||||
|
return EXTRACT16(PSHR32(SUB32(res, SHR32(res, 3)),14));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sqrt(x) ~= 0.22178 + 1.29227*x - 0.77070*x^2 + 0.25723*x^3 (for .25 < x < 1) */
|
||||||
|
/*#define C0 3634
|
||||||
|
#define C1 21173
|
||||||
|
#define C2 -12627
|
||||||
|
#define C3 4215*/
|
||||||
|
|
||||||
|
/* sqrt(x) ~= 0.22178 + 1.29227*x - 0.77070*x^2 + 0.25659*x^3 (for .25 < x < 1) */
|
||||||
|
#define C0 3634
|
||||||
|
#define C1 21173
|
||||||
|
#define C2 -12627
|
||||||
|
#define C3 4204
|
||||||
|
|
||||||
|
static inline spx_word16_t spx_sqrt(spx_word32_t x)
|
||||||
|
{
|
||||||
|
int k;
|
||||||
|
spx_word32_t rt;
|
||||||
|
k = spx_ilog4(x)-6;
|
||||||
|
x = VSHR32(x, (k<<1));
|
||||||
|
rt = ADD16(C0, MULT16_16_Q14(x, ADD16(C1, MULT16_16_Q14(x, ADD16(C2, MULT16_16_Q14(x, (C3)))))));
|
||||||
|
rt = VSHR32(rt,7-k);
|
||||||
|
return rt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* log(x) ~= -2.18151 + 4.20592*x - 2.88938*x^2 + 0.86535*x^3 (for .5 < x < 1) */
|
||||||
|
|
||||||
|
|
||||||
|
#define A1 16469
|
||||||
|
#define A2 2242
|
||||||
|
#define A3 1486
|
||||||
|
|
||||||
|
static inline spx_word16_t spx_acos(spx_word16_t x)
|
||||||
|
{
|
||||||
|
int s=0;
|
||||||
|
spx_word16_t ret;
|
||||||
|
spx_word16_t sq;
|
||||||
|
if (x<0)
|
||||||
|
{
|
||||||
|
s=1;
|
||||||
|
x = NEG16(x);
|
||||||
|
}
|
||||||
|
x = SUB16(16384,x);
|
||||||
|
|
||||||
|
x = x >> 1;
|
||||||
|
sq = MULT16_16_Q13(x, ADD16(A1, MULT16_16_Q13(x, ADD16(A2, MULT16_16_Q13(x, (A3))))));
|
||||||
|
ret = spx_sqrt(SHL32(EXTEND32(sq),13));
|
||||||
|
|
||||||
|
/*ret = spx_sqrt(67108864*(-1.6129e-04 + 2.0104e+00*f + 2.7373e-01*f*f + 1.8136e-01*f*f*f));*/
|
||||||
|
if (s)
|
||||||
|
ret = SUB16(25736,ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define K1 8192
|
||||||
|
#define K2 -4096
|
||||||
|
#define K3 340
|
||||||
|
#define K4 -10
|
||||||
|
|
||||||
|
static inline spx_word16_t spx_cos(spx_word16_t x)
|
||||||
|
{
|
||||||
|
spx_word16_t x2;
|
||||||
|
|
||||||
|
if (x<12868)
|
||||||
|
{
|
||||||
|
x2 = MULT16_16_P13(x,x);
|
||||||
|
return ADD32(K1, MULT16_16_P13(x2, ADD32(K2, MULT16_16_P13(x2, ADD32(K3, MULT16_16_P13(K4, x2))))));
|
||||||
|
} else {
|
||||||
|
x = SUB16(25736,x);
|
||||||
|
x2 = MULT16_16_P13(x,x);
|
||||||
|
return SUB32(-K1, MULT16_16_P13(x2, ADD32(K2, MULT16_16_P13(x2, ADD32(K3, MULT16_16_P13(K4, x2))))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define L1 32767
|
||||||
|
#define L2 -7651
|
||||||
|
#define L3 8277
|
||||||
|
#define L4 -626
|
||||||
|
|
||||||
|
static inline spx_word16_t _spx_cos_pi_2(spx_word16_t x)
|
||||||
|
{
|
||||||
|
spx_word16_t x2;
|
||||||
|
|
||||||
|
x2 = MULT16_16_P15(x,x);
|
||||||
|
return ADD16(1,MIN16(32766,ADD32(SUB16(L1,x2), MULT16_16_P15(x2, ADD32(L2, MULT16_16_P15(x2, ADD32(L3, MULT16_16_P15(L4, x2))))))));
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_word16_t spx_cos_norm(spx_word32_t x)
|
||||||
|
{
|
||||||
|
x = x&0x0001ffff;
|
||||||
|
if (x>SHL32(EXTEND32(1), 16))
|
||||||
|
x = SUB32(SHL32(EXTEND32(1), 17),x);
|
||||||
|
if (x&0x00007fff)
|
||||||
|
{
|
||||||
|
if (x<SHL32(EXTEND32(1), 15))
|
||||||
|
{
|
||||||
|
return _spx_cos_pi_2(EXTRACT16(x));
|
||||||
|
} else {
|
||||||
|
return NEG32(_spx_cos_pi_2(EXTRACT16(65536-x)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (x&0x0000ffff)
|
||||||
|
return 0;
|
||||||
|
else if (x&0x0001ffff)
|
||||||
|
return -32767;
|
||||||
|
else
|
||||||
|
return 32767;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
K0 = 1
|
||||||
|
K1 = log(2)
|
||||||
|
K2 = 3-4*log(2)
|
||||||
|
K3 = 3*log(2) - 2
|
||||||
|
*/
|
||||||
|
#define D0 16384
|
||||||
|
#define D1 11356
|
||||||
|
#define D2 3726
|
||||||
|
#define D3 1301
|
||||||
|
/* Input in Q11 format, output in Q16 */
|
||||||
|
static inline spx_word32_t spx_exp2(spx_word16_t x)
|
||||||
|
{
|
||||||
|
int integer;
|
||||||
|
spx_word16_t frac;
|
||||||
|
integer = SHR16(x,11);
|
||||||
|
if (integer>14)
|
||||||
|
return 0x7fffffff;
|
||||||
|
else if (integer < -15)
|
||||||
|
return 0;
|
||||||
|
frac = SHL16(x-SHL16(integer,11),3);
|
||||||
|
frac = ADD16(D0, MULT16_16_Q14(frac, ADD16(D1, MULT16_16_Q14(frac, ADD16(D2 , MULT16_16_Q14(D3,frac))))));
|
||||||
|
return VSHR32(EXTEND32(frac), -integer-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Input in Q11 format, output in Q16 */
|
||||||
|
static inline spx_word32_t spx_exp(spx_word16_t x)
|
||||||
|
{
|
||||||
|
if (x>21290)
|
||||||
|
return 0x7fffffff;
|
||||||
|
else if (x<-21290)
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return spx_exp2(MULT16_16_P14(23637,x));
|
||||||
|
}
|
||||||
|
#define M1 32767
|
||||||
|
#define M2 -21
|
||||||
|
#define M3 -11943
|
||||||
|
#define M4 4936
|
||||||
|
|
||||||
|
static inline spx_word16_t spx_atan01(spx_word16_t x)
|
||||||
|
{
|
||||||
|
return MULT16_16_P15(x, ADD32(M1, MULT16_16_P15(x, ADD32(M2, MULT16_16_P15(x, ADD32(M3, MULT16_16_P15(M4, x)))))));
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef M1
|
||||||
|
#undef M2
|
||||||
|
#undef M3
|
||||||
|
#undef M4
|
||||||
|
|
||||||
|
/* Input in Q15, output in Q14 */
|
||||||
|
static inline spx_word16_t spx_atan(spx_word32_t x)
|
||||||
|
{
|
||||||
|
if (x <= 32767)
|
||||||
|
{
|
||||||
|
return SHR16(spx_atan01(x),1);
|
||||||
|
} else {
|
||||||
|
int e = spx_ilog2(x);
|
||||||
|
if (e>=29)
|
||||||
|
return 25736;
|
||||||
|
x = DIV32_16(SHL32(EXTEND32(32767),29-e), EXTRACT16(SHR32(x, e-14)));
|
||||||
|
return SUB16(25736, SHR16(spx_atan01(x),1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef M_PI
|
||||||
|
#define M_PI 3.14159265358979323846 /* pi */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define C1 0.9999932946f
|
||||||
|
#define C2 -0.4999124376f
|
||||||
|
#define C3 0.0414877472f
|
||||||
|
#define C4 -0.0012712095f
|
||||||
|
|
||||||
|
|
||||||
|
#define SPX_PI_2 1.5707963268
|
||||||
|
static inline spx_word16_t spx_cos(spx_word16_t x)
|
||||||
|
{
|
||||||
|
if (x<SPX_PI_2)
|
||||||
|
{
|
||||||
|
x *= x;
|
||||||
|
return C1 + x*(C2+x*(C3+C4*x));
|
||||||
|
} else {
|
||||||
|
x = M_PI-x;
|
||||||
|
x *= x;
|
||||||
|
return NEG16(C1 + x*(C2+x*(C3+C4*x)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
1285
libspeexdsp/mdf.c
Normal file
1285
libspeexdsp/mdf.c
Normal file
File diff suppressed because it is too large
Load Diff
56
libspeexdsp/misc_bfin.h
Normal file
56
libspeexdsp/misc_bfin.h
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/* Copyright (C) 2005 Analog Devices */
|
||||||
|
/**
|
||||||
|
@file misc_bfin.h
|
||||||
|
@author Jean-Marc Valin
|
||||||
|
@brief Various compatibility routines for Speex (Blackfin version)
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bfin.h"
|
||||||
|
|
||||||
|
#define OVERRIDE_SPEEX_MOVE
|
||||||
|
void *speex_move (void *dest, void *src, int n)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__
|
||||||
|
(
|
||||||
|
"L0 = 0;\n\t"
|
||||||
|
"I0 = %0;\n\t"
|
||||||
|
"R0 = [I0++];\n\t"
|
||||||
|
"LOOP move%= LC0 = %2;\n\t"
|
||||||
|
"LOOP_BEGIN move%=;\n\t"
|
||||||
|
"[%1++] = R0 || R0 = [I0++];\n\t"
|
||||||
|
"LOOP_END move%=;\n\t"
|
||||||
|
"[%1++] = R0;\n\t"
|
||||||
|
: "=a" (src), "=a" (dest)
|
||||||
|
: "a" ((n>>2)-1), "0" (src), "1" (dest)
|
||||||
|
: "R0", "I0", "L0", "memory" BFIN_HWLOOP0_REGS
|
||||||
|
);
|
||||||
|
return dest;
|
||||||
|
}
|
169
libspeexdsp/os_support.h
Normal file
169
libspeexdsp/os_support.h
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
/* Copyright (C) 2007 Jean-Marc Valin
|
||||||
|
|
||||||
|
File: os_support.h
|
||||||
|
This is the (tiny) OS abstraction layer. Aside from math.h, this is the
|
||||||
|
only place where system headers are allowed.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OS_SUPPORT_H
|
||||||
|
#define OS_SUPPORT_H
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef OS_SUPPORT_CUSTOM
|
||||||
|
#include "os_support_custom.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free
|
||||||
|
NOTE: speex_alloc needs to CLEAR THE MEMORY */
|
||||||
|
#ifndef OVERRIDE_SPEEX_ALLOC
|
||||||
|
static inline void *speex_alloc (int size)
|
||||||
|
{
|
||||||
|
/* WARNING: this is not equivalent to malloc(). If you want to use malloc()
|
||||||
|
or your own allocator, YOU NEED TO CLEAR THE MEMORY ALLOCATED. Otherwise
|
||||||
|
you will experience strange bugs */
|
||||||
|
return calloc(size,1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Same as speex_alloc, except that the area is only needed inside a Speex call (might cause problem with wideband though) */
|
||||||
|
#ifndef OVERRIDE_SPEEX_ALLOC_SCRATCH
|
||||||
|
static inline void *speex_alloc_scratch (int size)
|
||||||
|
{
|
||||||
|
/* Scratch space doesn't need to be cleared */
|
||||||
|
return calloc(size,1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Speex wrapper for realloc. To do your own dynamic allocation, all you need to do is replace this function, speex_alloc and speex_free */
|
||||||
|
#ifndef OVERRIDE_SPEEX_REALLOC
|
||||||
|
static inline void *speex_realloc (void *ptr, int size)
|
||||||
|
{
|
||||||
|
return realloc(ptr, size);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_alloc */
|
||||||
|
#ifndef OVERRIDE_SPEEX_FREE
|
||||||
|
static inline void speex_free (void *ptr)
|
||||||
|
{
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Same as speex_free, except that the area is only needed inside a Speex call (might cause problem with wideband though) */
|
||||||
|
#ifndef OVERRIDE_SPEEX_FREE_SCRATCH
|
||||||
|
static inline void speex_free_scratch (void *ptr)
|
||||||
|
{
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Copy n elements from src to dst. The 0* term provides compile-time type checking */
|
||||||
|
#ifndef OVERRIDE_SPEEX_COPY
|
||||||
|
#define SPEEX_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Copy n elements from src to dst, allowing overlapping regions. The 0* term
|
||||||
|
provides compile-time type checking */
|
||||||
|
#ifndef OVERRIDE_SPEEX_MOVE
|
||||||
|
#define SPEEX_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** For n elements worth of memory, set every byte to the value of c, starting at address dst */
|
||||||
|
#ifndef OVERRIDE_SPEEX_MEMSET
|
||||||
|
#define SPEEX_MEMSET(dst, c, n) (memset((dst), (c), (n)*sizeof(*(dst))))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef OVERRIDE_SPEEX_FATAL
|
||||||
|
static inline void _speex_fatal(const char *str, const char *file, int line)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef OVERRIDE_SPEEX_WARNING
|
||||||
|
static inline void speex_warning(const char *str)
|
||||||
|
{
|
||||||
|
#ifndef DISABLE_WARNINGS
|
||||||
|
fprintf (stderr, "warning: %s\n", str);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef OVERRIDE_SPEEX_WARNING_INT
|
||||||
|
static inline void speex_warning_int(const char *str, int val)
|
||||||
|
{
|
||||||
|
#ifndef DISABLE_WARNINGS
|
||||||
|
fprintf (stderr, "warning: %s %d\n", str, val);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef OVERRIDE_SPEEX_NOTIFY
|
||||||
|
static inline void speex_notify(const char *str)
|
||||||
|
{
|
||||||
|
#ifndef DISABLE_NOTIFICATIONS
|
||||||
|
fprintf (stderr, "notification: %s\n", str);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef OVERRIDE_SPEEX_PUTC
|
||||||
|
/** Speex wrapper for putc */
|
||||||
|
static inline void _speex_putc(int ch, void *file)
|
||||||
|
{
|
||||||
|
FILE *f = (FILE *)file;
|
||||||
|
fprintf(f, "%c", ch);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define speex_fatal(str) _speex_fatal(str, __FILE__, __LINE__);
|
||||||
|
#define speex_assert(cond) {if (!(cond)) {speex_fatal("assertion failed: " #cond);}}
|
||||||
|
|
||||||
|
#ifndef RELEASE
|
||||||
|
static inline void print_vec(float *vec, int len, char *name)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
printf ("%s ", name);
|
||||||
|
for (i=0;i<len;i++)
|
||||||
|
printf (" %f", vec[i]);
|
||||||
|
printf ("\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
1215
libspeexdsp/preprocess.c
Normal file
1215
libspeexdsp/preprocess.c
Normal file
File diff suppressed because it is too large
Load Diff
379
libspeexdsp/pseudofloat.h
Normal file
379
libspeexdsp/pseudofloat.h
Normal file
@ -0,0 +1,379 @@
|
|||||||
|
/* Copyright (C) 2005 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file pseudofloat.h
|
||||||
|
@brief Pseudo-floating point
|
||||||
|
* This header file provides a lightweight floating point type for
|
||||||
|
* use on fixed-point platforms when a large dynamic range is
|
||||||
|
* required. The new type is not compatible with the 32-bit IEEE format,
|
||||||
|
* it is not even remotely as accurate as 32-bit floats, and is not
|
||||||
|
* even guaranteed to produce even remotely correct results for code
|
||||||
|
* other than Speex. It makes all kinds of shortcuts that are acceptable
|
||||||
|
* for Speex, but may not be acceptable for your application. You're
|
||||||
|
* quite welcome to reuse this code and improve it, but don't assume
|
||||||
|
* it works out of the box. Most likely, it doesn't.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PSEUDOFLOAT_H
|
||||||
|
#define PSEUDOFLOAT_H
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
#include "os_support.h"
|
||||||
|
#include "math_approx.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
spx_int16_t m;
|
||||||
|
spx_int16_t e;
|
||||||
|
} spx_float_t;
|
||||||
|
|
||||||
|
static const spx_float_t FLOAT_ZERO = {0,0};
|
||||||
|
static const spx_float_t FLOAT_ONE = {16384,-14};
|
||||||
|
static const spx_float_t FLOAT_HALF = {16384,-15};
|
||||||
|
|
||||||
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||||
|
static inline spx_float_t PSEUDOFLOAT(spx_int32_t x)
|
||||||
|
{
|
||||||
|
int e=0;
|
||||||
|
int sign=0;
|
||||||
|
if (x<0)
|
||||||
|
{
|
||||||
|
sign = 1;
|
||||||
|
x = -x;
|
||||||
|
}
|
||||||
|
if (x==0)
|
||||||
|
{
|
||||||
|
spx_float_t r = {0,0};
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
e = spx_ilog2(ABS32(x))-14;
|
||||||
|
x = VSHR32(x, e);
|
||||||
|
if (sign)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
r.m = -x;
|
||||||
|
r.e = e;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
r.m = x;
|
||||||
|
r.e = e;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_ADD(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
if (a.m==0)
|
||||||
|
return b;
|
||||||
|
else if (b.m==0)
|
||||||
|
return a;
|
||||||
|
if ((a).e > (b).e)
|
||||||
|
{
|
||||||
|
r.m = ((a).m>>1) + ((b).m>>MIN(15,(a).e-(b).e+1));
|
||||||
|
r.e = (a).e+1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
r.m = ((b).m>>1) + ((a).m>>MIN(15,(b).e-(a).e+1));
|
||||||
|
r.e = (b).e+1;
|
||||||
|
}
|
||||||
|
if (r.m>0)
|
||||||
|
{
|
||||||
|
if (r.m<16384)
|
||||||
|
{
|
||||||
|
r.m<<=1;
|
||||||
|
r.e-=1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (r.m>-16384)
|
||||||
|
{
|
||||||
|
r.m<<=1;
|
||||||
|
r.e-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*printf ("%f + %f = %f\n", REALFLOAT(a), REALFLOAT(b), REALFLOAT(r));*/
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_SUB(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
if (a.m==0)
|
||||||
|
return b;
|
||||||
|
else if (b.m==0)
|
||||||
|
return a;
|
||||||
|
if ((a).e > (b).e)
|
||||||
|
{
|
||||||
|
r.m = ((a).m>>1) - ((b).m>>MIN(15,(a).e-(b).e+1));
|
||||||
|
r.e = (a).e+1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
r.m = ((a).m>>MIN(15,(b).e-(a).e+1)) - ((b).m>>1);
|
||||||
|
r.e = (b).e+1;
|
||||||
|
}
|
||||||
|
if (r.m>0)
|
||||||
|
{
|
||||||
|
if (r.m<16384)
|
||||||
|
{
|
||||||
|
r.m<<=1;
|
||||||
|
r.e-=1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (r.m>-16384)
|
||||||
|
{
|
||||||
|
r.m<<=1;
|
||||||
|
r.e-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*printf ("%f + %f = %f\n", REALFLOAT(a), REALFLOAT(b), REALFLOAT(r));*/
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int FLOAT_LT(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
if (a.m==0)
|
||||||
|
return b.m>0;
|
||||||
|
else if (b.m==0)
|
||||||
|
return a.m<0;
|
||||||
|
if ((a).e > (b).e)
|
||||||
|
return ((a).m>>1) < ((b).m>>MIN(15,(a).e-(b).e+1));
|
||||||
|
else
|
||||||
|
return ((b).m>>1) > ((a).m>>MIN(15,(b).e-(a).e+1));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int FLOAT_GT(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
return FLOAT_LT(b,a);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_MULT(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15);
|
||||||
|
r.e = (a).e+(b).e+15;
|
||||||
|
if (r.m>0)
|
||||||
|
{
|
||||||
|
if (r.m<16384)
|
||||||
|
{
|
||||||
|
r.m<<=1;
|
||||||
|
r.e-=1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (r.m>-16384)
|
||||||
|
{
|
||||||
|
r.m<<=1;
|
||||||
|
r.e-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*printf ("%f * %f = %f\n", REALFLOAT(a), REALFLOAT(b), REALFLOAT(r));*/
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_AMULT(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15);
|
||||||
|
r.e = (a).e+(b).e+15;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_SHL(spx_float_t a, int b)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
r.m = a.m;
|
||||||
|
r.e = a.e+b;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_int16_t FLOAT_EXTRACT16(spx_float_t a)
|
||||||
|
{
|
||||||
|
if (a.e<0)
|
||||||
|
return EXTRACT16((EXTEND32(a.m)+(EXTEND32(1)<<(-a.e-1)))>>-a.e);
|
||||||
|
else
|
||||||
|
return a.m<<a.e;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_int32_t FLOAT_EXTRACT32(spx_float_t a)
|
||||||
|
{
|
||||||
|
if (a.e<0)
|
||||||
|
return (EXTEND32(a.m)+(EXTEND32(1)<<(-a.e-1)))>>-a.e;
|
||||||
|
else
|
||||||
|
return EXTEND32(a.m)<<a.e;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_int32_t FLOAT_MUL32(spx_float_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
return VSHR32(MULT16_32_Q15(a.m, b),-a.e-15);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_MUL32U(spx_word32_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
int e1, e2;
|
||||||
|
spx_float_t r;
|
||||||
|
if (a==0 || b==0)
|
||||||
|
{
|
||||||
|
return FLOAT_ZERO;
|
||||||
|
}
|
||||||
|
e1 = spx_ilog2(ABS32(a));
|
||||||
|
a = VSHR32(a, e1-14);
|
||||||
|
e2 = spx_ilog2(ABS32(b));
|
||||||
|
b = VSHR32(b, e2-14);
|
||||||
|
r.m = MULT16_16_Q15(a,b);
|
||||||
|
r.e = e1+e2-13;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Do NOT attempt to divide by a negative number */
|
||||||
|
static inline spx_float_t FLOAT_DIV32_FLOAT(spx_word32_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
int e=0;
|
||||||
|
spx_float_t r;
|
||||||
|
if (a==0)
|
||||||
|
{
|
||||||
|
return FLOAT_ZERO;
|
||||||
|
}
|
||||||
|
e = spx_ilog2(ABS32(a))-spx_ilog2(b.m-1)-15;
|
||||||
|
a = VSHR32(a, e);
|
||||||
|
if (ABS32(a)>=SHL32(EXTEND32(b.m-1),15))
|
||||||
|
{
|
||||||
|
a >>= 1;
|
||||||
|
e++;
|
||||||
|
}
|
||||||
|
r.m = DIV32_16(a,b.m);
|
||||||
|
r.e = e-b.e;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Do NOT attempt to divide by a negative number */
|
||||||
|
static inline spx_float_t FLOAT_DIV32(spx_word32_t a, spx_word32_t b)
|
||||||
|
{
|
||||||
|
int e0=0,e=0;
|
||||||
|
spx_float_t r;
|
||||||
|
if (a==0)
|
||||||
|
{
|
||||||
|
return FLOAT_ZERO;
|
||||||
|
}
|
||||||
|
if (b>32767)
|
||||||
|
{
|
||||||
|
e0 = spx_ilog2(b)-14;
|
||||||
|
b = VSHR32(b, e0);
|
||||||
|
e0 = -e0;
|
||||||
|
}
|
||||||
|
e = spx_ilog2(ABS32(a))-spx_ilog2(b-1)-15;
|
||||||
|
a = VSHR32(a, e);
|
||||||
|
if (ABS32(a)>=SHL32(EXTEND32(b-1),15))
|
||||||
|
{
|
||||||
|
a >>= 1;
|
||||||
|
e++;
|
||||||
|
}
|
||||||
|
e += e0;
|
||||||
|
r.m = DIV32_16(a,b);
|
||||||
|
r.e = e;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Do NOT attempt to divide by a negative number */
|
||||||
|
static inline spx_float_t FLOAT_DIVU(spx_float_t a, spx_float_t b)
|
||||||
|
{
|
||||||
|
int e=0;
|
||||||
|
spx_int32_t num;
|
||||||
|
spx_float_t r;
|
||||||
|
if (b.m<=0)
|
||||||
|
{
|
||||||
|
speex_warning_int("Attempted to divide by", b.m);
|
||||||
|
return FLOAT_ONE;
|
||||||
|
}
|
||||||
|
num = a.m;
|
||||||
|
a.m = ABS16(a.m);
|
||||||
|
while (a.m >= b.m)
|
||||||
|
{
|
||||||
|
e++;
|
||||||
|
a.m >>= 1;
|
||||||
|
}
|
||||||
|
num = num << (15-e);
|
||||||
|
r.m = DIV32_16(num,b.m);
|
||||||
|
r.e = a.e-b.e-15+e;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline spx_float_t FLOAT_SQRT(spx_float_t a)
|
||||||
|
{
|
||||||
|
spx_float_t r;
|
||||||
|
spx_int32_t m;
|
||||||
|
m = SHL32(EXTEND32(a.m), 14);
|
||||||
|
r.e = a.e - 14;
|
||||||
|
if (r.e & 1)
|
||||||
|
{
|
||||||
|
r.e -= 1;
|
||||||
|
m <<= 1;
|
||||||
|
}
|
||||||
|
r.e >>= 1;
|
||||||
|
r.m = spx_sqrt(m);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define spx_float_t float
|
||||||
|
#define FLOAT_ZERO 0.f
|
||||||
|
#define FLOAT_ONE 1.f
|
||||||
|
#define FLOAT_HALF 0.5f
|
||||||
|
#define PSEUDOFLOAT(x) (x)
|
||||||
|
#define FLOAT_MULT(a,b) ((a)*(b))
|
||||||
|
#define FLOAT_AMULT(a,b) ((a)*(b))
|
||||||
|
#define FLOAT_MUL32(a,b) ((a)*(b))
|
||||||
|
#define FLOAT_DIV32(a,b) ((a)/(b))
|
||||||
|
#define FLOAT_EXTRACT16(a) (a)
|
||||||
|
#define FLOAT_EXTRACT32(a) (a)
|
||||||
|
#define FLOAT_ADD(a,b) ((a)+(b))
|
||||||
|
#define FLOAT_SUB(a,b) ((a)-(b))
|
||||||
|
#define REALFLOAT(x) (x)
|
||||||
|
#define FLOAT_DIV32_FLOAT(a,b) ((a)/(b))
|
||||||
|
#define FLOAT_MUL32U(a,b) ((a)*(b))
|
||||||
|
#define FLOAT_SHL(a,b) (a)
|
||||||
|
#define FLOAT_LT(a,b) ((a)<(b))
|
||||||
|
#define FLOAT_GT(a,b) ((a)>(b))
|
||||||
|
#define FLOAT_DIVU(a,b) ((a)/(b))
|
||||||
|
#define FLOAT_SQRT(a) (spx_sqrt(a))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
1208
libspeexdsp/resample.c
Normal file
1208
libspeexdsp/resample.c
Normal file
File diff suppressed because it is too large
Load Diff
201
libspeexdsp/resample_neon.h
Normal file
201
libspeexdsp/resample_neon.h
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
/* Copyright (C) 2007-2008 Jean-Marc Valin
|
||||||
|
* Copyright (C) 2008 Thorvald Natvig
|
||||||
|
* Copyright (C) 2011 Texas Instruments
|
||||||
|
* author Jyri Sarha
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
@file resample_neon.h
|
||||||
|
@brief Resampler functions (NEON version)
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <arm_neon.h>
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
#ifdef __thumb2__
|
||||||
|
static inline int32_t saturate_32bit_to_16bit(int32_t a) {
|
||||||
|
int32_t ret;
|
||||||
|
asm ("ssat %[ret], #16, %[a]"
|
||||||
|
: [ret] "=&r" (ret)
|
||||||
|
: [a] "r" (a)
|
||||||
|
: );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int32_t saturate_32bit_to_16bit(int32_t a) {
|
||||||
|
int32_t ret;
|
||||||
|
asm ("vmov.s32 d0[0], %[a]\n"
|
||||||
|
"vqmovn.s32 d0, q0\n"
|
||||||
|
"vmov.s16 %[ret], d0[0]\n"
|
||||||
|
: [ret] "=&r" (ret)
|
||||||
|
: [a] "r" (a)
|
||||||
|
: "q0");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#undef WORD2INT
|
||||||
|
#define WORD2INT(x) (saturate_32bit_to_16bit(x))
|
||||||
|
|
||||||
|
#define OVERRIDE_INNER_PRODUCT_SINGLE
|
||||||
|
/* Only works when len % 4 == 0 */
|
||||||
|
static inline int32_t inner_product_single(const int16_t *a, const int16_t *b, unsigned int len)
|
||||||
|
{
|
||||||
|
int32_t ret;
|
||||||
|
uint32_t remainder = len % 16;
|
||||||
|
len = len - remainder;
|
||||||
|
|
||||||
|
asm volatile (" cmp %[len], #0\n"
|
||||||
|
" bne 1f\n"
|
||||||
|
" vld1.16 {d16}, [%[b]]!\n"
|
||||||
|
" vld1.16 {d20}, [%[a]]!\n"
|
||||||
|
" subs %[remainder], %[remainder], #4\n"
|
||||||
|
" vmull.s16 q0, d16, d20\n"
|
||||||
|
" beq 5f\n"
|
||||||
|
" b 4f\n"
|
||||||
|
"1:"
|
||||||
|
" vld1.16 {d16, d17, d18, d19}, [%[b]]!\n"
|
||||||
|
" vld1.16 {d20, d21, d22, d23}, [%[a]]!\n"
|
||||||
|
" subs %[len], %[len], #16\n"
|
||||||
|
" vmull.s16 q0, d16, d20\n"
|
||||||
|
" vmlal.s16 q0, d17, d21\n"
|
||||||
|
" vmlal.s16 q0, d18, d22\n"
|
||||||
|
" vmlal.s16 q0, d19, d23\n"
|
||||||
|
" beq 3f\n"
|
||||||
|
"2:"
|
||||||
|
" vld1.16 {d16, d17, d18, d19}, [%[b]]!\n"
|
||||||
|
" vld1.16 {d20, d21, d22, d23}, [%[a]]!\n"
|
||||||
|
" subs %[len], %[len], #16\n"
|
||||||
|
" vmlal.s16 q0, d16, d20\n"
|
||||||
|
" vmlal.s16 q0, d17, d21\n"
|
||||||
|
" vmlal.s16 q0, d18, d22\n"
|
||||||
|
" vmlal.s16 q0, d19, d23\n"
|
||||||
|
" bne 2b\n"
|
||||||
|
"3:"
|
||||||
|
" cmp %[remainder], #0\n"
|
||||||
|
" beq 5f\n"
|
||||||
|
"4:"
|
||||||
|
" vld1.16 {d16}, [%[b]]!\n"
|
||||||
|
" vld1.16 {d20}, [%[a]]!\n"
|
||||||
|
" subs %[remainder], %[remainder], #4\n"
|
||||||
|
" vmlal.s16 q0, d16, d20\n"
|
||||||
|
" bne 4b\n"
|
||||||
|
"5:"
|
||||||
|
" vaddl.s32 q0, d0, d1\n"
|
||||||
|
" vadd.s64 d0, d0, d1\n"
|
||||||
|
" vqmovn.s64 d0, q0\n"
|
||||||
|
" vqrshrn.s32 d0, q0, #15\n"
|
||||||
|
" vmov.s16 %[ret], d0[0]\n"
|
||||||
|
: [ret] "=&r" (ret), [a] "+r" (a), [b] "+r" (b),
|
||||||
|
[len] "+r" (len), [remainder] "+r" (remainder)
|
||||||
|
:
|
||||||
|
: "cc", "q0",
|
||||||
|
"d16", "d17", "d18", "d19",
|
||||||
|
"d20", "d21", "d22", "d23");
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#elif defined(FLOATING_POINT)
|
||||||
|
|
||||||
|
static inline int32_t saturate_float_to_16bit(float a) {
|
||||||
|
int32_t ret;
|
||||||
|
asm ("vmov.f32 d0[0], %[a]\n"
|
||||||
|
"vcvt.s32.f32 d0, d0, #15\n"
|
||||||
|
"vqrshrn.s32 d0, q0, #15\n"
|
||||||
|
"vmov.s16 %[ret], d0[0]\n"
|
||||||
|
: [ret] "=&r" (ret)
|
||||||
|
: [a] "r" (a)
|
||||||
|
: "q0");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#undef WORD2INT
|
||||||
|
#define WORD2INT(x) (saturate_float_to_16bit(x))
|
||||||
|
|
||||||
|
#define OVERRIDE_INNER_PRODUCT_SINGLE
|
||||||
|
/* Only works when len % 4 == 0 */
|
||||||
|
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
|
||||||
|
{
|
||||||
|
float ret;
|
||||||
|
uint32_t remainder = len % 16;
|
||||||
|
len = len - remainder;
|
||||||
|
|
||||||
|
asm volatile (" cmp %[len], #0\n"
|
||||||
|
" bne 1f\n"
|
||||||
|
" vld1.32 {q4}, [%[b]]!\n"
|
||||||
|
" vld1.32 {q8}, [%[a]]!\n"
|
||||||
|
" subs %[remainder], %[remainder], #4\n"
|
||||||
|
" vmul.f32 q0, q4, q8\n"
|
||||||
|
" bne 4f\n"
|
||||||
|
" b 5f\n"
|
||||||
|
"1:"
|
||||||
|
" vld1.32 {q4, q5}, [%[b]]!\n"
|
||||||
|
" vld1.32 {q8, q9}, [%[a]]!\n"
|
||||||
|
" vld1.32 {q6, q7}, [%[b]]!\n"
|
||||||
|
" vld1.32 {q10, q11}, [%[a]]!\n"
|
||||||
|
" subs %[len], %[len], #16\n"
|
||||||
|
" vmul.f32 q0, q4, q8\n"
|
||||||
|
" vmul.f32 q1, q5, q9\n"
|
||||||
|
" vmul.f32 q2, q6, q10\n"
|
||||||
|
" vmul.f32 q3, q7, q11\n"
|
||||||
|
" beq 3f\n"
|
||||||
|
"2:"
|
||||||
|
" vld1.32 {q4, q5}, [%[b]]!\n"
|
||||||
|
" vld1.32 {q8, q9}, [%[a]]!\n"
|
||||||
|
" vld1.32 {q6, q7}, [%[b]]!\n"
|
||||||
|
" vld1.32 {q10, q11}, [%[a]]!\n"
|
||||||
|
" subs %[len], %[len], #16\n"
|
||||||
|
" vmla.f32 q0, q4, q8\n"
|
||||||
|
" vmla.f32 q1, q5, q9\n"
|
||||||
|
" vmla.f32 q2, q6, q10\n"
|
||||||
|
" vmla.f32 q3, q7, q11\n"
|
||||||
|
" bne 2b\n"
|
||||||
|
"3:"
|
||||||
|
" vadd.f32 q4, q0, q1\n"
|
||||||
|
" vadd.f32 q5, q2, q3\n"
|
||||||
|
" cmp %[remainder], #0\n"
|
||||||
|
" vadd.f32 q0, q4, q5\n"
|
||||||
|
" beq 5f\n"
|
||||||
|
"4:"
|
||||||
|
" vld1.32 {q6}, [%[b]]!\n"
|
||||||
|
" vld1.32 {q10}, [%[a]]!\n"
|
||||||
|
" subs %[remainder], %[remainder], #4\n"
|
||||||
|
" vmla.f32 q0, q6, q10\n"
|
||||||
|
" bne 4b\n"
|
||||||
|
"5:"
|
||||||
|
" vadd.f32 d0, d0, d1\n"
|
||||||
|
" vpadd.f32 d0, d0, d0\n"
|
||||||
|
" vmov.f32 %[ret], d0[0]\n"
|
||||||
|
: [ret] "=&r" (ret), [a] "+r" (a), [b] "+r" (b),
|
||||||
|
[len] "+l" (len), [remainder] "+l" (remainder)
|
||||||
|
:
|
||||||
|
: "cc", "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8",
|
||||||
|
"q9", "q10", "q11");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
128
libspeexdsp/resample_sse.h
Normal file
128
libspeexdsp/resample_sse.h
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
/* Copyright (C) 2007-2008 Jean-Marc Valin
|
||||||
|
* Copyright (C) 2008 Thorvald Natvig
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
@file resample_sse.h
|
||||||
|
@brief Resampler functions (SSE version)
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <xmmintrin.h>
|
||||||
|
|
||||||
|
#define OVERRIDE_INNER_PRODUCT_SINGLE
|
||||||
|
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
float ret;
|
||||||
|
__m128 sum = _mm_setzero_ps();
|
||||||
|
for (i=0;i<len;i+=8)
|
||||||
|
{
|
||||||
|
sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a+i), _mm_loadu_ps(b+i)));
|
||||||
|
sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a+i+4), _mm_loadu_ps(b+i+4)));
|
||||||
|
}
|
||||||
|
sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
|
||||||
|
sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
|
||||||
|
_mm_store_ss(&ret, sum);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OVERRIDE_INTERPOLATE_PRODUCT_SINGLE
|
||||||
|
static inline float interpolate_product_single(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac) {
|
||||||
|
int i;
|
||||||
|
float ret;
|
||||||
|
__m128 sum = _mm_setzero_ps();
|
||||||
|
__m128 f = _mm_loadu_ps(frac);
|
||||||
|
for(i=0;i<len;i+=2)
|
||||||
|
{
|
||||||
|
sum = _mm_add_ps(sum, _mm_mul_ps(_mm_load1_ps(a+i), _mm_loadu_ps(b+i*oversample)));
|
||||||
|
sum = _mm_add_ps(sum, _mm_mul_ps(_mm_load1_ps(a+i+1), _mm_loadu_ps(b+(i+1)*oversample)));
|
||||||
|
}
|
||||||
|
sum = _mm_mul_ps(f, sum);
|
||||||
|
sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
|
||||||
|
sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
|
||||||
|
_mm_store_ss(&ret, sum);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _USE_SSE2
|
||||||
|
#include <emmintrin.h>
|
||||||
|
#define OVERRIDE_INNER_PRODUCT_DOUBLE
|
||||||
|
|
||||||
|
static inline double inner_product_double(const float *a, const float *b, unsigned int len)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
double ret;
|
||||||
|
__m128d sum = _mm_setzero_pd();
|
||||||
|
__m128 t;
|
||||||
|
for (i=0;i<len;i+=8)
|
||||||
|
{
|
||||||
|
t = _mm_mul_ps(_mm_loadu_ps(a+i), _mm_loadu_ps(b+i));
|
||||||
|
sum = _mm_add_pd(sum, _mm_cvtps_pd(t));
|
||||||
|
sum = _mm_add_pd(sum, _mm_cvtps_pd(_mm_movehl_ps(t, t)));
|
||||||
|
|
||||||
|
t = _mm_mul_ps(_mm_loadu_ps(a+i+4), _mm_loadu_ps(b+i+4));
|
||||||
|
sum = _mm_add_pd(sum, _mm_cvtps_pd(t));
|
||||||
|
sum = _mm_add_pd(sum, _mm_cvtps_pd(_mm_movehl_ps(t, t)));
|
||||||
|
}
|
||||||
|
sum = _mm_add_sd(sum, _mm_unpackhi_pd(sum, sum));
|
||||||
|
_mm_store_sd(&ret, sum);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OVERRIDE_INTERPOLATE_PRODUCT_DOUBLE
|
||||||
|
static inline double interpolate_product_double(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac) {
|
||||||
|
int i;
|
||||||
|
double ret;
|
||||||
|
__m128d sum;
|
||||||
|
__m128d sum1 = _mm_setzero_pd();
|
||||||
|
__m128d sum2 = _mm_setzero_pd();
|
||||||
|
__m128 f = _mm_loadu_ps(frac);
|
||||||
|
__m128d f1 = _mm_cvtps_pd(f);
|
||||||
|
__m128d f2 = _mm_cvtps_pd(_mm_movehl_ps(f,f));
|
||||||
|
__m128 t;
|
||||||
|
for(i=0;i<len;i+=2)
|
||||||
|
{
|
||||||
|
t = _mm_mul_ps(_mm_load1_ps(a+i), _mm_loadu_ps(b+i*oversample));
|
||||||
|
sum1 = _mm_add_pd(sum1, _mm_cvtps_pd(t));
|
||||||
|
sum2 = _mm_add_pd(sum2, _mm_cvtps_pd(_mm_movehl_ps(t, t)));
|
||||||
|
|
||||||
|
t = _mm_mul_ps(_mm_load1_ps(a+i+1), _mm_loadu_ps(b+(i+1)*oversample));
|
||||||
|
sum1 = _mm_add_pd(sum1, _mm_cvtps_pd(t));
|
||||||
|
sum2 = _mm_add_pd(sum2, _mm_cvtps_pd(_mm_movehl_ps(t, t)));
|
||||||
|
}
|
||||||
|
sum1 = _mm_mul_pd(f1, sum1);
|
||||||
|
sum2 = _mm_mul_pd(f2, sum2);
|
||||||
|
sum = _mm_add_pd(sum1, sum2);
|
||||||
|
sum = _mm_add_sd(sum, _mm_unpackhi_pd(sum, sum));
|
||||||
|
_mm_store_sd(&ret, sum);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
293
libspeexdsp/scal.c
Normal file
293
libspeexdsp/scal.c
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
/* Copyright (C) 2006-2008 CSIRO, Jean-Marc Valin, Xiph.Org Foundation
|
||||||
|
|
||||||
|
File: scal.c
|
||||||
|
Shaped comb-allpass filter for channel decorrelation
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
The algorithm implemented here is described in:
|
||||||
|
|
||||||
|
* J.-M. Valin, Perceptually-Motivated Nonlinear Channel Decorrelation For
|
||||||
|
Stereo Acoustic Echo Cancellation, Accepted for Joint Workshop on
|
||||||
|
Handsfree Speech Communication and Microphone Arrays (HSCMA), 2008.
|
||||||
|
http://people.xiph.org/~jm/papers/valin_hscma2008.pdf
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "speex/speex_echo.h"
|
||||||
|
#include "vorbis_psy.h"
|
||||||
|
#include "arch.h"
|
||||||
|
#include "os_support.h"
|
||||||
|
#include "smallft.h"
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifndef M_PI
|
||||||
|
#define M_PI 3.14159265358979323846 /* pi */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ALLPASS_ORDER 20
|
||||||
|
|
||||||
|
struct SpeexDecorrState_ {
|
||||||
|
int rate;
|
||||||
|
int channels;
|
||||||
|
int frame_size;
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
VorbisPsy *psy;
|
||||||
|
struct drft_lookup lookup;
|
||||||
|
float *wola_mem;
|
||||||
|
float *curve;
|
||||||
|
#endif
|
||||||
|
float *vorbis_win;
|
||||||
|
int seed;
|
||||||
|
float *y;
|
||||||
|
|
||||||
|
/* Per-channel stuff */
|
||||||
|
float *buff;
|
||||||
|
float (*ring)[ALLPASS_ORDER];
|
||||||
|
int *ringID;
|
||||||
|
int *order;
|
||||||
|
float *alpha;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EXPORT SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size)
|
||||||
|
{
|
||||||
|
int i, ch;
|
||||||
|
SpeexDecorrState *st = speex_alloc(sizeof(SpeexDecorrState));
|
||||||
|
st->rate = rate;
|
||||||
|
st->channels = channels;
|
||||||
|
st->frame_size = frame_size;
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
st->psy = vorbis_psy_init(rate, 2*frame_size);
|
||||||
|
spx_drft_init(&st->lookup, 2*frame_size);
|
||||||
|
st->wola_mem = speex_alloc(frame_size*sizeof(float));
|
||||||
|
st->curve = speex_alloc(frame_size*sizeof(float));
|
||||||
|
#endif
|
||||||
|
st->y = speex_alloc(frame_size*sizeof(float));
|
||||||
|
|
||||||
|
st->buff = speex_alloc(channels*2*frame_size*sizeof(float));
|
||||||
|
st->ringID = speex_alloc(channels*sizeof(int));
|
||||||
|
st->order = speex_alloc(channels*sizeof(int));
|
||||||
|
st->alpha = speex_alloc(channels*sizeof(float));
|
||||||
|
st->ring = speex_alloc(channels*ALLPASS_ORDER*sizeof(float));
|
||||||
|
|
||||||
|
/*FIXME: The +20 is there only as a kludge for ALL_PASS_OLA*/
|
||||||
|
st->vorbis_win = speex_alloc((2*frame_size+20)*sizeof(float));
|
||||||
|
for (i=0;i<2*frame_size;i++)
|
||||||
|
st->vorbis_win[i] = sin(.5*M_PI* sin(M_PI*i/(2*frame_size))*sin(M_PI*i/(2*frame_size)) );
|
||||||
|
st->seed = rand();
|
||||||
|
|
||||||
|
for (ch=0;ch<channels;ch++)
|
||||||
|
{
|
||||||
|
for (i=0;i<ALLPASS_ORDER;i++)
|
||||||
|
st->ring[ch][i] = 0;
|
||||||
|
st->ringID[ch] = 0;
|
||||||
|
st->alpha[ch] = 0;
|
||||||
|
st->order[ch] = 10;
|
||||||
|
}
|
||||||
|
return st;
|
||||||
|
}
|
||||||
|
|
||||||
|
static float uni_rand(int *seed)
|
||||||
|
{
|
||||||
|
const unsigned int jflone = 0x3f800000;
|
||||||
|
const unsigned int jflmsk = 0x007fffff;
|
||||||
|
union {int i; float f;} ran;
|
||||||
|
*seed = 1664525 * *seed + 1013904223;
|
||||||
|
ran.i = jflone | (jflmsk & *seed);
|
||||||
|
ran.f -= 1.5;
|
||||||
|
return 2*ran.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned int irand(int *seed)
|
||||||
|
{
|
||||||
|
*seed = 1664525 * *seed + 1013904223;
|
||||||
|
return ((unsigned int)*seed)>>16;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EXPORT void speex_decorrelate(SpeexDecorrState *st, const spx_int16_t *in, spx_int16_t *out, int strength)
|
||||||
|
{
|
||||||
|
int ch;
|
||||||
|
float amount;
|
||||||
|
|
||||||
|
if (strength<0)
|
||||||
|
strength = 0;
|
||||||
|
if (strength>100)
|
||||||
|
strength = 100;
|
||||||
|
|
||||||
|
amount = .01*strength;
|
||||||
|
for (ch=0;ch<st->channels;ch++)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int N=2*st->frame_size;
|
||||||
|
float beta, beta2;
|
||||||
|
float *x;
|
||||||
|
float max_alpha = 0;
|
||||||
|
|
||||||
|
float *buff;
|
||||||
|
float *ring;
|
||||||
|
int ringID;
|
||||||
|
int order;
|
||||||
|
float alpha;
|
||||||
|
|
||||||
|
buff = st->buff+ch*2*st->frame_size;
|
||||||
|
ring = st->ring[ch];
|
||||||
|
ringID = st->ringID[ch];
|
||||||
|
order = st->order[ch];
|
||||||
|
alpha = st->alpha[ch];
|
||||||
|
|
||||||
|
for (i=0;i<st->frame_size;i++)
|
||||||
|
buff[i] = buff[i+st->frame_size];
|
||||||
|
for (i=0;i<st->frame_size;i++)
|
||||||
|
buff[i+st->frame_size] = in[i*st->channels+ch];
|
||||||
|
|
||||||
|
x = buff+st->frame_size;
|
||||||
|
|
||||||
|
if (amount>1)
|
||||||
|
beta = 1-sqrt(.4*amount);
|
||||||
|
else
|
||||||
|
beta = 1-0.63246*amount;
|
||||||
|
if (beta<0)
|
||||||
|
beta = 0;
|
||||||
|
|
||||||
|
beta2 = beta;
|
||||||
|
for (i=0;i<st->frame_size;i++)
|
||||||
|
{
|
||||||
|
st->y[i] = alpha*(x[i-ALLPASS_ORDER+order]-beta*x[i-ALLPASS_ORDER+order-1])*st->vorbis_win[st->frame_size+i+order]
|
||||||
|
+ x[i-ALLPASS_ORDER]*st->vorbis_win[st->frame_size+i]
|
||||||
|
- alpha*(ring[ringID]
|
||||||
|
- beta*ring[ringID+1>=order?0:ringID+1]);
|
||||||
|
ring[ringID++]=st->y[i];
|
||||||
|
st->y[i] *= st->vorbis_win[st->frame_size+i];
|
||||||
|
if (ringID>=order)
|
||||||
|
ringID=0;
|
||||||
|
}
|
||||||
|
order = order+(irand(&st->seed)%3)-1;
|
||||||
|
if (order < 5)
|
||||||
|
order = 5;
|
||||||
|
if (order > 10)
|
||||||
|
order = 10;
|
||||||
|
/*order = 5+(irand(&st->seed)%6);*/
|
||||||
|
max_alpha = pow(.96+.04*(amount-1),order);
|
||||||
|
if (max_alpha > .98/(1.+beta2))
|
||||||
|
max_alpha = .98/(1.+beta2);
|
||||||
|
|
||||||
|
alpha = alpha + .4*uni_rand(&st->seed);
|
||||||
|
if (alpha > max_alpha)
|
||||||
|
alpha = max_alpha;
|
||||||
|
if (alpha < -max_alpha)
|
||||||
|
alpha = -max_alpha;
|
||||||
|
for (i=0;i<ALLPASS_ORDER;i++)
|
||||||
|
ring[i] = 0;
|
||||||
|
ringID = 0;
|
||||||
|
for (i=0;i<st->frame_size;i++)
|
||||||
|
{
|
||||||
|
float tmp = alpha*(x[i-ALLPASS_ORDER+order]-beta*x[i-ALLPASS_ORDER+order-1])*st->vorbis_win[i+order]
|
||||||
|
+ x[i-ALLPASS_ORDER]*st->vorbis_win[i]
|
||||||
|
- alpha*(ring[ringID]
|
||||||
|
- beta*ring[ringID+1>=order?0:ringID+1]);
|
||||||
|
ring[ringID++]=tmp;
|
||||||
|
tmp *= st->vorbis_win[i];
|
||||||
|
if (ringID>=order)
|
||||||
|
ringID=0;
|
||||||
|
st->y[i] += tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
float frame[N];
|
||||||
|
float scale = 1./N;
|
||||||
|
for (i=0;i<2*st->frame_size;i++)
|
||||||
|
frame[i] = buff[i];
|
||||||
|
//float coef = .5*0.78130;
|
||||||
|
float coef = M_PI*0.075063 * 0.93763 * amount * .8 * 0.707;
|
||||||
|
compute_curve(st->psy, buff, st->curve);
|
||||||
|
for (i=1;i<st->frame_size;i++)
|
||||||
|
{
|
||||||
|
float x1,x2;
|
||||||
|
float gain;
|
||||||
|
do {
|
||||||
|
x1 = uni_rand(&st->seed);
|
||||||
|
x2 = uni_rand(&st->seed);
|
||||||
|
} while (x1*x1+x2*x2 > 1.);
|
||||||
|
gain = coef*sqrt(.1+st->curve[i]);
|
||||||
|
frame[2*i-1] = gain*x1;
|
||||||
|
frame[2*i] = gain*x2;
|
||||||
|
}
|
||||||
|
frame[0] = coef*uni_rand(&st->seed)*sqrt(.1+st->curve[0]);
|
||||||
|
frame[2*st->frame_size-1] = coef*uni_rand(&st->seed)*sqrt(.1+st->curve[st->frame_size-1]);
|
||||||
|
spx_drft_backward(&st->lookup,frame);
|
||||||
|
for (i=0;i<2*st->frame_size;i++)
|
||||||
|
frame[i] *= st->vorbis_win[i];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (i=0;i<st->frame_size;i++)
|
||||||
|
{
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
float tmp = st->y[i] + frame[i] + st->wola_mem[i];
|
||||||
|
st->wola_mem[i] = frame[i+st->frame_size];
|
||||||
|
#else
|
||||||
|
float tmp = st->y[i];
|
||||||
|
#endif
|
||||||
|
if (tmp>32767)
|
||||||
|
tmp = 32767;
|
||||||
|
if (tmp < -32767)
|
||||||
|
tmp = -32767;
|
||||||
|
out[i*st->channels+ch] = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
st->ringID[ch] = ringID;
|
||||||
|
st->order[ch] = order;
|
||||||
|
st->alpha[ch] = alpha;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EXPORT void speex_decorrelate_destroy(SpeexDecorrState *st)
|
||||||
|
{
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
vorbis_psy_destroy(st->psy);
|
||||||
|
speex_free(st->wola_mem);
|
||||||
|
speex_free(st->curve);
|
||||||
|
#endif
|
||||||
|
speex_free(st->buff);
|
||||||
|
speex_free(st->ring);
|
||||||
|
speex_free(st->ringID);
|
||||||
|
speex_free(st->alpha);
|
||||||
|
speex_free(st->vorbis_win);
|
||||||
|
speex_free(st->order);
|
||||||
|
speex_free(st->y);
|
||||||
|
speex_free(st);
|
||||||
|
}
|
1261
libspeexdsp/smallft.c
Normal file
1261
libspeexdsp/smallft.c
Normal file
File diff suppressed because it is too large
Load Diff
46
libspeexdsp/smallft.h
Normal file
46
libspeexdsp/smallft.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/********************************************************************
|
||||||
|
* *
|
||||||
|
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
|
||||||
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||||
|
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||||
|
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||||
|
* *
|
||||||
|
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
|
||||||
|
* by the XIPHOPHORUS Company http://www.xiph.org/ *
|
||||||
|
* *
|
||||||
|
********************************************************************
|
||||||
|
|
||||||
|
function: fft transform
|
||||||
|
last mod: $Id: smallft.h,v 1.3 2003/09/16 18:35:45 jm Exp $
|
||||||
|
|
||||||
|
********************************************************************/
|
||||||
|
/**
|
||||||
|
@file smallft.h
|
||||||
|
@brief Discrete Rotational Fourier Transform (DRFT)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _V_SMFT_H_
|
||||||
|
#define _V_SMFT_H_
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Discrete Rotational Fourier Transform lookup */
|
||||||
|
struct drft_lookup{
|
||||||
|
int n;
|
||||||
|
float *trigcache;
|
||||||
|
int *splitcache;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern void spx_drft_forward(struct drft_lookup *l,float *data);
|
||||||
|
extern void spx_drft_backward(struct drft_lookup *l,float *data);
|
||||||
|
extern void spx_drft_init(struct drft_lookup *l,int n);
|
||||||
|
extern void spx_drft_clear(struct drft_lookup *l);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
115
libspeexdsp/stack_alloc.h
Normal file
115
libspeexdsp/stack_alloc.h
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||||
|
/**
|
||||||
|
@file stack_alloc.h
|
||||||
|
@brief Temporary memory allocation on stack
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef STACK_ALLOC_H
|
||||||
|
#define STACK_ALLOC_H
|
||||||
|
|
||||||
|
#ifdef USE_ALLOCA
|
||||||
|
# ifdef WIN32
|
||||||
|
# include <malloc.h>
|
||||||
|
# else
|
||||||
|
# ifdef HAVE_ALLOCA_H
|
||||||
|
# include <alloca.h>
|
||||||
|
# else
|
||||||
|
# include <stdlib.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def ALIGN(stack, size)
|
||||||
|
*
|
||||||
|
* Aligns the stack to a 'size' boundary
|
||||||
|
*
|
||||||
|
* @param stack Stack
|
||||||
|
* @param size New size boundary
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def PUSH(stack, size, type)
|
||||||
|
*
|
||||||
|
* Allocates 'size' elements of type 'type' on the stack
|
||||||
|
*
|
||||||
|
* @param stack Stack
|
||||||
|
* @param size Number of elements
|
||||||
|
* @param type Type of element
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def VARDECL(var)
|
||||||
|
*
|
||||||
|
* Declare variable on stack
|
||||||
|
*
|
||||||
|
* @param var Variable to declare
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def ALLOC(var, size, type)
|
||||||
|
*
|
||||||
|
* Allocate 'size' elements of 'type' on stack
|
||||||
|
*
|
||||||
|
* @param var Name of variable to allocate
|
||||||
|
* @param size Number of elements
|
||||||
|
* @param type Type of element
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef ENABLE_VALGRIND
|
||||||
|
|
||||||
|
#include <valgrind/memcheck.h>
|
||||||
|
|
||||||
|
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
|
||||||
|
|
||||||
|
#define PUSH(stack, size, type) (VALGRIND_MAKE_NOACCESS(stack, 1000),ALIGN((stack),sizeof(type)),VALGRIND_MAKE_WRITABLE(stack, ((size)*sizeof(type))),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
|
||||||
|
|
||||||
|
#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(VAR_ARRAYS)
|
||||||
|
#define VARDECL(var)
|
||||||
|
#define ALLOC(var, size, type) type var[size]
|
||||||
|
#elif defined(USE_ALLOCA)
|
||||||
|
#define VARDECL(var) var
|
||||||
|
#define ALLOC(var, size, type) var = alloca(sizeof(type)*(size))
|
||||||
|
#else
|
||||||
|
#define VARDECL(var) var
|
||||||
|
#define ALLOC(var, size, type) var = PUSH(stack, size, type)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
44
libspeexdsp/testdenoise.c
Normal file
44
libspeexdsp/testdenoise.c
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "speex/speex_preprocess.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define NN 160
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
short in[NN];
|
||||||
|
int i;
|
||||||
|
SpeexPreprocessState *st;
|
||||||
|
int count=0;
|
||||||
|
float f;
|
||||||
|
|
||||||
|
st = speex_preprocess_state_init(NN, 8000);
|
||||||
|
i=1;
|
||||||
|
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
|
||||||
|
i=0;
|
||||||
|
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
|
||||||
|
i=8000;
|
||||||
|
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &i);
|
||||||
|
i=0;
|
||||||
|
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
|
||||||
|
f=.0;
|
||||||
|
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
|
||||||
|
f=.0;
|
||||||
|
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
int vad;
|
||||||
|
fread(in, sizeof(short), NN, stdin);
|
||||||
|
if (feof(stdin))
|
||||||
|
break;
|
||||||
|
vad = speex_preprocess_run(st, in);
|
||||||
|
/*fprintf (stderr, "%d\n", vad);*/
|
||||||
|
fwrite(in, sizeof(short), NN, stdout);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
speex_preprocess_state_destroy(st);
|
||||||
|
return 0;
|
||||||
|
}
|
53
libspeexdsp/testecho.c
Normal file
53
libspeexdsp/testecho.c
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "speex/speex_echo.h"
|
||||||
|
#include "speex/speex_preprocess.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define NN 128
|
||||||
|
#define TAIL 1024
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
FILE *echo_fd, *ref_fd, *e_fd;
|
||||||
|
short echo_buf[NN], ref_buf[NN], e_buf[NN];
|
||||||
|
SpeexEchoState *st;
|
||||||
|
SpeexPreprocessState *den;
|
||||||
|
int sampleRate = 8000;
|
||||||
|
|
||||||
|
if (argc != 4)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "testecho mic_signal.sw speaker_signal.sw output.sw\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
echo_fd = fopen(argv[2], "rb");
|
||||||
|
ref_fd = fopen(argv[1], "rb");
|
||||||
|
e_fd = fopen(argv[3], "wb");
|
||||||
|
|
||||||
|
st = speex_echo_state_init(NN, TAIL);
|
||||||
|
den = speex_preprocess_state_init(NN, sampleRate);
|
||||||
|
speex_echo_ctl(st, SPEEX_ECHO_SET_SAMPLING_RATE, &sampleRate);
|
||||||
|
speex_preprocess_ctl(den, SPEEX_PREPROCESS_SET_ECHO_STATE, st);
|
||||||
|
|
||||||
|
while (!feof(ref_fd) && !feof(echo_fd))
|
||||||
|
{
|
||||||
|
fread(ref_buf, sizeof(short), NN, ref_fd);
|
||||||
|
fread(echo_buf, sizeof(short), NN, echo_fd);
|
||||||
|
speex_echo_cancellation(st, ref_buf, echo_buf, e_buf);
|
||||||
|
speex_preprocess_run(den, e_buf);
|
||||||
|
fwrite(e_buf, sizeof(short), NN, e_fd);
|
||||||
|
}
|
||||||
|
speex_echo_state_destroy(st);
|
||||||
|
speex_preprocess_state_destroy(den);
|
||||||
|
fclose(e_fd);
|
||||||
|
fclose(echo_fd);
|
||||||
|
fclose(ref_fd);
|
||||||
|
return 0;
|
||||||
|
}
|
75
libspeexdsp/testjitter.c
Normal file
75
libspeexdsp/testjitter.c
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "speex/speex_jitter.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
union jbpdata {
|
||||||
|
unsigned int idx;
|
||||||
|
unsigned char data[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
void synthIn(JitterBufferPacket *in, int idx, int span) {
|
||||||
|
union jbpdata d;
|
||||||
|
d.idx = idx;
|
||||||
|
|
||||||
|
in->data = d.data;
|
||||||
|
in->len = sizeof(d);
|
||||||
|
in->timestamp = idx * 10;
|
||||||
|
in->span = span * 10;
|
||||||
|
in->sequence = idx;
|
||||||
|
in->user_data = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void jitterFill(JitterBuffer *jb) {
|
||||||
|
char buffer[65536];
|
||||||
|
JitterBufferPacket in, out;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
out.data = buffer;
|
||||||
|
|
||||||
|
jitter_buffer_reset(jb);
|
||||||
|
|
||||||
|
for(i=0;i<100;++i) {
|
||||||
|
synthIn(&in, i, 1);
|
||||||
|
jitter_buffer_put(jb, &in);
|
||||||
|
|
||||||
|
out.len = 65536;
|
||||||
|
if (jitter_buffer_get(jb, &out, 10, NULL) != JITTER_BUFFER_OK) {
|
||||||
|
printf("Fill test failed iteration %d\n", i);
|
||||||
|
}
|
||||||
|
if (out.timestamp != i * 10) {
|
||||||
|
printf("Fill test expected %d got %d\n", i*10, out.timestamp);
|
||||||
|
}
|
||||||
|
jitter_buffer_tick(jb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char buffer[65536];
|
||||||
|
JitterBufferPacket in, out;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
JitterBuffer *jb = jitter_buffer_init(10);
|
||||||
|
|
||||||
|
out.data = buffer;
|
||||||
|
|
||||||
|
/* Frozen sender case */
|
||||||
|
jitterFill(jb);
|
||||||
|
for(i=0;i<100;++i) {
|
||||||
|
out.len = 65536;
|
||||||
|
jitter_buffer_get(jb, &out, 10, NULL);
|
||||||
|
jitter_buffer_tick(jb);
|
||||||
|
}
|
||||||
|
synthIn(&in, 100, 1);
|
||||||
|
jitter_buffer_put(jb, &in);
|
||||||
|
out.len = 65536;
|
||||||
|
if (jitter_buffer_get(jb, &out, 10, NULL) != JITTER_BUFFER_OK) {
|
||||||
|
printf("Failed frozen sender resynchronize\n");
|
||||||
|
} else {
|
||||||
|
printf("Frozen sender: Jitter %d\n", out.timestamp - 100*10);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
86
libspeexdsp/testresample.c
Normal file
86
libspeexdsp/testresample.c
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/* Copyright (C) 2007 Jean-Marc Valin
|
||||||
|
|
||||||
|
File: testresample.c
|
||||||
|
Testing the resampling code
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "speex/speex_resampler.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define NN 256
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
spx_uint32_t i;
|
||||||
|
short *in;
|
||||||
|
short *out;
|
||||||
|
float *fin, *fout;
|
||||||
|
int count = 0;
|
||||||
|
SpeexResamplerState *st = speex_resampler_init(1, 8000, 12000, 10, NULL);
|
||||||
|
speex_resampler_set_rate(st, 96000, 44100);
|
||||||
|
speex_resampler_skip_zeros(st);
|
||||||
|
|
||||||
|
in = malloc(NN*sizeof(short));
|
||||||
|
out = malloc(2*NN*sizeof(short));
|
||||||
|
fin = malloc(NN*sizeof(float));
|
||||||
|
fout = malloc(2*NN*sizeof(float));
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
spx_uint32_t in_len;
|
||||||
|
spx_uint32_t out_len;
|
||||||
|
fread(in, sizeof(short), NN, stdin);
|
||||||
|
if (feof(stdin))
|
||||||
|
break;
|
||||||
|
for (i=0;i<NN;i++)
|
||||||
|
fin[i]=in[i];
|
||||||
|
in_len = NN;
|
||||||
|
out_len = 2*NN;
|
||||||
|
/*if (count==2)
|
||||||
|
speex_resampler_set_quality(st, 10);*/
|
||||||
|
speex_resampler_process_float(st, 0, fin, &in_len, fout, &out_len);
|
||||||
|
for (i=0;i<out_len;i++)
|
||||||
|
out[i]=floor(.5+fout[i]);
|
||||||
|
/*speex_warning_int("writing", out_len);*/
|
||||||
|
fwrite(out, sizeof(short), out_len, stdout);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
speex_resampler_destroy(st);
|
||||||
|
free(in);
|
||||||
|
free(out);
|
||||||
|
free(fin);
|
||||||
|
free(fout);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
97
libspeexdsp/vorbis_psy.h
Normal file
97
libspeexdsp/vorbis_psy.h
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
/* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
|
||||||
|
File: vorbis_psy.h
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VORBIS_PSY_H
|
||||||
|
#define VORBIS_PSY_H
|
||||||
|
|
||||||
|
#ifdef VORBIS_PSYCHO
|
||||||
|
|
||||||
|
#include "smallft.h"
|
||||||
|
#define P_BANDS 17 /* 62Hz to 16kHz */
|
||||||
|
#define NOISE_COMPAND_LEVELS 40
|
||||||
|
|
||||||
|
|
||||||
|
#define todB(x) ((x)>1e-13?log((x)*(x))*4.34294480f:-30)
|
||||||
|
#define fromdB(x) (exp((x)*.11512925f))
|
||||||
|
|
||||||
|
/* The bark scale equations are approximations, since the original
|
||||||
|
table was somewhat hand rolled. The below are chosen to have the
|
||||||
|
best possible fit to the rolled tables, thus their somewhat odd
|
||||||
|
appearance (these are more accurate and over a longer range than
|
||||||
|
the oft-quoted bark equations found in the texts I have). The
|
||||||
|
approximations are valid from 0 - 30kHz (nyquist) or so.
|
||||||
|
|
||||||
|
all f in Hz, z in Bark */
|
||||||
|
|
||||||
|
#define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
|
||||||
|
#define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
|
||||||
|
|
||||||
|
/* Frequency to octave. We arbitrarily declare 63.5 Hz to be octave
|
||||||
|
0.0 */
|
||||||
|
|
||||||
|
#define toOC(n) (log(n)*1.442695f-5.965784f)
|
||||||
|
#define fromOC(o) (exp(((o)+5.965784f)*.693147f))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
float noisewindowlo;
|
||||||
|
float noisewindowhi;
|
||||||
|
int noisewindowlomin;
|
||||||
|
int noisewindowhimin;
|
||||||
|
int noisewindowfixed;
|
||||||
|
float noiseoff[P_BANDS];
|
||||||
|
float noisecompand[NOISE_COMPAND_LEVELS];
|
||||||
|
|
||||||
|
} VorbisPsyInfo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int n;
|
||||||
|
int rate;
|
||||||
|
struct drft_lookup lookup;
|
||||||
|
VorbisPsyInfo *vi;
|
||||||
|
|
||||||
|
float *window;
|
||||||
|
float *noiseoffset;
|
||||||
|
long *bark;
|
||||||
|
|
||||||
|
} VorbisPsy;
|
||||||
|
|
||||||
|
|
||||||
|
VorbisPsy *vorbis_psy_init(int rate, int size);
|
||||||
|
void vorbis_psy_destroy(VorbisPsy *psy);
|
||||||
|
void compute_curve(VorbisPsy *psy, float *audio, float *curve);
|
||||||
|
void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
7997
m4/libtool.m4
vendored
Normal file
7997
m4/libtool.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
384
m4/ltoptions.m4
vendored
Normal file
384
m4/ltoptions.m4
vendored
Normal file
@ -0,0 +1,384 @@
|
|||||||
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
|
# Written by Gary V. Vaughan, 2004
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 7 ltoptions.m4
|
||||||
|
|
||||||
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||||
|
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||||
|
# ------------------------------------------
|
||||||
|
m4_define([_LT_MANGLE_OPTION],
|
||||||
|
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||||
|
# ---------------------------------------
|
||||||
|
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||||
|
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||||
|
# saved as a flag.
|
||||||
|
m4_define([_LT_SET_OPTION],
|
||||||
|
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||||
|
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||||
|
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||||
|
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||||
|
m4_define([_LT_IF_OPTION],
|
||||||
|
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||||
|
# -------------------------------------------------------
|
||||||
|
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||||
|
# are set.
|
||||||
|
m4_define([_LT_UNLESS_OPTIONS],
|
||||||
|
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||||
|
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||||
|
[m4_define([$0_found])])])[]dnl
|
||||||
|
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||||
|
])[]dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||||
|
# ----------------------------------------
|
||||||
|
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||||
|
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||||
|
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||||
|
# the unknown option and exit.
|
||||||
|
m4_defun([_LT_SET_OPTIONS],
|
||||||
|
[# Set options
|
||||||
|
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||||
|
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||||
|
|
||||||
|
m4_if([$1],[LT_INIT],[
|
||||||
|
dnl
|
||||||
|
dnl Simply set some default values (i.e off) if boolean options were not
|
||||||
|
dnl specified:
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||||
|
])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||||
|
])
|
||||||
|
dnl
|
||||||
|
dnl If no reference was made to various pairs of opposing options, then
|
||||||
|
dnl we run the default mode handler for the pair. For example, if neither
|
||||||
|
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||||
|
dnl archives by default:
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||||
|
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||||
|
[_LT_ENABLE_FAST_INSTALL])
|
||||||
|
])
|
||||||
|
])# _LT_SET_OPTIONS
|
||||||
|
|
||||||
|
|
||||||
|
## --------------------------------- ##
|
||||||
|
## Macros to handle LT_INIT options. ##
|
||||||
|
## --------------------------------- ##
|
||||||
|
|
||||||
|
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||||
|
# -----------------------------------------
|
||||||
|
m4_define([_LT_MANGLE_DEFUN],
|
||||||
|
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||||
|
|
||||||
|
|
||||||
|
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||||
|
# -----------------------------------------------
|
||||||
|
m4_define([LT_OPTION_DEFINE],
|
||||||
|
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||||
|
])# LT_OPTION_DEFINE
|
||||||
|
|
||||||
|
|
||||||
|
# dlopen
|
||||||
|
# ------
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||||
|
put the `dlopen' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||||
|
|
||||||
|
|
||||||
|
# win32-dll
|
||||||
|
# ---------
|
||||||
|
# Declare package support for building win32 dll's.
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||||
|
[enable_win32_dll=yes
|
||||||
|
|
||||||
|
case $host in
|
||||||
|
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||||
|
AC_CHECK_TOOL(AS, as, false)
|
||||||
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||||
|
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
test -z "$AS" && AS=as
|
||||||
|
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||||
|
|
||||||
|
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||||
|
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||||
|
|
||||||
|
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||||
|
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||||
|
])# win32-dll
|
||||||
|
|
||||||
|
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||||
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||||
|
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_ENABLE_SHARED([DEFAULT])
|
||||||
|
# ----------------------------
|
||||||
|
# implement the --enable-shared flag, and supports the `shared' and
|
||||||
|
# `disable-shared' LT_INIT options.
|
||||||
|
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||||
|
m4_define([_LT_ENABLE_SHARED],
|
||||||
|
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||||
|
AC_ARG_ENABLE([shared],
|
||||||
|
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||||
|
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case $enableval in
|
||||||
|
yes) enable_shared=yes ;;
|
||||||
|
no) enable_shared=no ;;
|
||||||
|
*)
|
||||||
|
enable_shared=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_shared=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||||
|
|
||||||
|
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||||
|
[Whether or not to build shared libraries])
|
||||||
|
])# _LT_ENABLE_SHARED
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||||
|
|
||||||
|
# Old names:
|
||||||
|
AC_DEFUN([AC_ENABLE_SHARED],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_DISABLE_SHARED],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||||
|
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||||
|
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_ENABLE_STATIC([DEFAULT])
|
||||||
|
# ----------------------------
|
||||||
|
# implement the --enable-static flag, and support the `static' and
|
||||||
|
# `disable-static' LT_INIT options.
|
||||||
|
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||||
|
m4_define([_LT_ENABLE_STATIC],
|
||||||
|
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||||
|
AC_ARG_ENABLE([static],
|
||||||
|
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||||
|
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case $enableval in
|
||||||
|
yes) enable_static=yes ;;
|
||||||
|
no) enable_static=no ;;
|
||||||
|
*)
|
||||||
|
enable_static=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_static=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||||
|
|
||||||
|
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||||
|
[Whether or not to build static libraries])
|
||||||
|
])# _LT_ENABLE_STATIC
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||||
|
|
||||||
|
# Old names:
|
||||||
|
AC_DEFUN([AC_ENABLE_STATIC],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_DISABLE_STATIC],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||||
|
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||||
|
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||||
|
# ----------------------------------
|
||||||
|
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||||
|
# and `disable-fast-install' LT_INIT options.
|
||||||
|
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||||
|
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||||
|
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||||
|
AC_ARG_ENABLE([fast-install],
|
||||||
|
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||||
|
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case $enableval in
|
||||||
|
yes) enable_fast_install=yes ;;
|
||||||
|
no) enable_fast_install=no ;;
|
||||||
|
*)
|
||||||
|
enable_fast_install=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_fast_install=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||||
|
|
||||||
|
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||||
|
[Whether or not to optimize for fast installation])dnl
|
||||||
|
])# _LT_ENABLE_FAST_INSTALL
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||||
|
|
||||||
|
# Old names:
|
||||||
|
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||||
|
the `fast-install' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||||
|
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||||
|
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||||
|
|
||||||
|
|
||||||
|
# _LT_WITH_PIC([MODE])
|
||||||
|
# --------------------
|
||||||
|
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||||
|
# LT_INIT options.
|
||||||
|
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||||
|
m4_define([_LT_WITH_PIC],
|
||||||
|
[AC_ARG_WITH([pic],
|
||||||
|
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||||
|
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||||
|
[lt_p=${PACKAGE-default}
|
||||||
|
case $withval in
|
||||||
|
yes|no) pic_mode=$withval ;;
|
||||||
|
*)
|
||||||
|
pic_mode=default
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
for lt_pkg in $withval; do
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
if test "X$lt_pkg" = "X$lt_p"; then
|
||||||
|
pic_mode=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$lt_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
[pic_mode=default])
|
||||||
|
|
||||||
|
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||||
|
|
||||||
|
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||||
|
])# _LT_WITH_PIC
|
||||||
|
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||||
|
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||||
|
|
||||||
|
# Old name:
|
||||||
|
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||||
|
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||||
|
AC_DIAGNOSE([obsolete],
|
||||||
|
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||||
|
put the `pic-only' option into LT_INIT's first parameter.])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl aclocal-1.4 backwards compatibility:
|
||||||
|
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||||
|
|
||||||
|
## ----------------- ##
|
||||||
|
## LTDL_INIT Options ##
|
||||||
|
## ----------------- ##
|
||||||
|
|
||||||
|
m4_define([_LTDL_MODE], [])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||||
|
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||||
|
[m4_define([_LTDL_MODE], [recursive])])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||||
|
[m4_define([_LTDL_MODE], [subproject])])
|
||||||
|
|
||||||
|
m4_define([_LTDL_TYPE], [])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||||
|
[m4_define([_LTDL_TYPE], [installable])])
|
||||||
|
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||||
|
[m4_define([_LTDL_TYPE], [convenience])])
|
123
m4/ltsugar.m4
vendored
Normal file
123
m4/ltsugar.m4
vendored
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
# Written by Gary V. Vaughan, 2004
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 6 ltsugar.m4
|
||||||
|
|
||||||
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||||
|
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_join(SEP, ARG1, [ARG2...])
|
||||||
|
# -----------------------------
|
||||||
|
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||||
|
# associated separator.
|
||||||
|
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||||
|
# versions in m4sugar had bugs.
|
||||||
|
m4_define([lt_join],
|
||||||
|
[m4_if([$#], [1], [],
|
||||||
|
[$#], [2], [[$2]],
|
||||||
|
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||||
|
m4_define([_lt_join],
|
||||||
|
[m4_if([$#$2], [2], [],
|
||||||
|
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_car(LIST)
|
||||||
|
# lt_cdr(LIST)
|
||||||
|
# ------------
|
||||||
|
# Manipulate m4 lists.
|
||||||
|
# These macros are necessary as long as will still need to support
|
||||||
|
# Autoconf-2.59 which quotes differently.
|
||||||
|
m4_define([lt_car], [[$1]])
|
||||||
|
m4_define([lt_cdr],
|
||||||
|
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||||
|
[$#], 1, [],
|
||||||
|
[m4_dquote(m4_shift($@))])])
|
||||||
|
m4_define([lt_unquote], $1)
|
||||||
|
|
||||||
|
|
||||||
|
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||||
|
# ------------------------------------------
|
||||||
|
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||||
|
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||||
|
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||||
|
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||||
|
# than defined and empty).
|
||||||
|
#
|
||||||
|
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||||
|
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||||
|
m4_define([lt_append],
|
||||||
|
[m4_define([$1],
|
||||||
|
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
# Produce a SEP delimited list of all paired combinations of elements of
|
||||||
|
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||||
|
# has the form PREFIXmINFIXSUFFIXn.
|
||||||
|
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||||
|
m4_define([lt_combine],
|
||||||
|
[m4_if(m4_eval([$# > 3]), [1],
|
||||||
|
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||||
|
[[m4_foreach([_Lt_prefix], [$2],
|
||||||
|
[m4_foreach([_Lt_suffix],
|
||||||
|
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||||
|
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||||
|
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||||
|
m4_define([lt_if_append_uniq],
|
||||||
|
[m4_ifdef([$1],
|
||||||
|
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||||
|
[lt_append([$1], [$2], [$3])$4],
|
||||||
|
[$5])],
|
||||||
|
[lt_append([$1], [$2], [$3])$4])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_add(DICT, KEY, VALUE)
|
||||||
|
# -----------------------------
|
||||||
|
m4_define([lt_dict_add],
|
||||||
|
[m4_define([$1($2)], [$3])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||||
|
# --------------------------------------------
|
||||||
|
m4_define([lt_dict_add_subkey],
|
||||||
|
[m4_define([$1($2:$3)], [$4])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||||
|
# ----------------------------------
|
||||||
|
m4_define([lt_dict_fetch],
|
||||||
|
[m4_ifval([$3],
|
||||||
|
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||||
|
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
m4_define([lt_if_dict_fetch],
|
||||||
|
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||||
|
[$5],
|
||||||
|
[$6])])
|
||||||
|
|
||||||
|
|
||||||
|
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
m4_define([lt_dict_filter],
|
||||||
|
[m4_if([$5], [], [],
|
||||||
|
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||||
|
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||||
|
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||||
|
])
|
23
m4/ltversion.m4
vendored
Normal file
23
m4/ltversion.m4
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||||
|
# Written by Scott James Remnant, 2004
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# serial 3337 ltversion.m4
|
||||||
|
# This file is part of GNU Libtool
|
||||||
|
|
||||||
|
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||||
|
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||||
|
|
||||||
|
AC_DEFUN([LTVERSION_VERSION],
|
||||||
|
[macro_version='2.4.2'
|
||||||
|
macro_revision='1.3337'
|
||||||
|
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||||
|
_LT_DECL(, macro_revision, 0)
|
||||||
|
])
|
98
m4/lt~obsolete.m4
vendored
Normal file
98
m4/lt~obsolete.m4
vendored
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||||
|
# Written by Scott James Remnant, 2004.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation gives
|
||||||
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
|
# modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 5 lt~obsolete.m4
|
||||||
|
|
||||||
|
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||||
|
#
|
||||||
|
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||||
|
# which have later been changed to m4_define as they aren't part of the
|
||||||
|
# exported API, or moved to Autoconf or Automake where they belong.
|
||||||
|
#
|
||||||
|
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||||
|
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||||
|
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||||
|
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||||
|
# and doesn't know about Autoconf macros at all.)
|
||||||
|
#
|
||||||
|
# So we provide this file, which has a silly filename so it's always
|
||||||
|
# included after everything else. This provides aclocal with the
|
||||||
|
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||||
|
# because those macros already exist, or will be overwritten later.
|
||||||
|
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||||
|
#
|
||||||
|
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||||
|
# Yes, that means every name once taken will need to remain here until
|
||||||
|
# we give up compatibility with versions before 1.7, at which point
|
||||||
|
# we need to keep only those names which we still refer to.
|
||||||
|
|
||||||
|
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||||
|
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||||
|
|
||||||
|
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||||
|
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||||
|
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||||
|
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||||
|
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||||
|
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||||
|
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||||
|
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||||
|
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||||
|
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||||
|
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||||
|
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||||
|
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||||
|
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||||
|
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||||
|
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||||
|
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||||
|
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||||
|
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||||
|
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||||
|
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||||
|
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||||
|
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||||
|
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||||
|
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||||
|
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||||
|
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||||
|
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||||
|
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||||
|
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||||
|
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||||
|
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||||
|
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||||
|
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||||
|
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
215
missing
Executable file
215
missing
Executable file
@ -0,0 +1,215 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
|
scriptversion=2013-10-28.13; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
|
# 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, 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
|
||||||
|
--is-lightweight)
|
||||||
|
# Used by our autoconf macros to check whether the available missing
|
||||||
|
# script is modern enough.
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--run)
|
||||||
|
# Back-compat with the calling convention used by older automake.
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||||
|
to PROGRAM being missing or too old.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal autoconf autoheader autom4te automake makeinfo
|
||||||
|
bison yacc flex lex help2man
|
||||||
|
|
||||||
|
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||||
|
'g' are ignored when checking the name.
|
||||||
|
|
||||||
|
Send bug reports to <bug-automake@gnu.org>."
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||||
|
echo "missing $scriptversion (GNU Automake)"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*)
|
||||||
|
echo 1>&2 "$0: unknown '$1' option"
|
||||||
|
echo 1>&2 "Try '$0 --help' for more information"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Run the given program, remember its exit status.
|
||||||
|
"$@"; st=$?
|
||||||
|
|
||||||
|
# If it succeeded, we are done.
|
||||||
|
test $st -eq 0 && exit 0
|
||||||
|
|
||||||
|
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||||
|
# passed; such an option is passed most likely to detect whether the
|
||||||
|
# program is present and works.
|
||||||
|
case $2 in --version|--help) exit $st;; esac
|
||||||
|
|
||||||
|
# Exit code 63 means version mismatch. This often happens when the user
|
||||||
|
# tries to use an ancient version of a tool on a file that requires a
|
||||||
|
# minimum version.
|
||||||
|
if test $st -eq 63; then
|
||||||
|
msg="probably too old"
|
||||||
|
elif test $st -eq 127; then
|
||||||
|
# Program was missing.
|
||||||
|
msg="missing on your system"
|
||||||
|
else
|
||||||
|
# Program was found and executed, but failed. Give up.
|
||||||
|
exit $st
|
||||||
|
fi
|
||||||
|
|
||||||
|
perl_URL=http://www.perl.org/
|
||||||
|
flex_URL=http://flex.sourceforge.net/
|
||||||
|
gnu_software_URL=http://www.gnu.org/software
|
||||||
|
|
||||||
|
program_details ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
aclocal|automake)
|
||||||
|
echo "The '$1' program is part of the GNU Automake package:"
|
||||||
|
echo "<$gnu_software_URL/automake>"
|
||||||
|
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/autoconf>"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
autoconf|autom4te|autoheader)
|
||||||
|
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||||
|
echo "<$gnu_software_URL/autoconf/>"
|
||||||
|
echo "It also requires GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice ()
|
||||||
|
{
|
||||||
|
# Normalize program name to check for.
|
||||||
|
normalized_program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
printf '%s\n' "'$1' is $msg."
|
||||||
|
|
||||||
|
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||||
|
case $normalized_program in
|
||||||
|
autoconf*)
|
||||||
|
echo "You should only need it if you modified 'configure.ac',"
|
||||||
|
echo "or m4 files included by it."
|
||||||
|
program_details 'autoconf'
|
||||||
|
;;
|
||||||
|
autoheader*)
|
||||||
|
echo "You should only need it if you modified 'acconfig.h' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'autoheader'
|
||||||
|
;;
|
||||||
|
automake*)
|
||||||
|
echo "You should only need it if you modified 'Makefile.am' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'automake'
|
||||||
|
;;
|
||||||
|
aclocal*)
|
||||||
|
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'aclocal'
|
||||||
|
;;
|
||||||
|
autom4te*)
|
||||||
|
echo "You might have modified some maintainer files that require"
|
||||||
|
echo "the 'autom4te' program to be rebuilt."
|
||||||
|
program_details 'autom4te'
|
||||||
|
;;
|
||||||
|
bison*|yacc*)
|
||||||
|
echo "You should only need it if you modified a '.y' file."
|
||||||
|
echo "You may want to install the GNU Bison package:"
|
||||||
|
echo "<$gnu_software_URL/bison/>"
|
||||||
|
;;
|
||||||
|
lex*|flex*)
|
||||||
|
echo "You should only need it if you modified a '.l' file."
|
||||||
|
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||||
|
echo "<$flex_URL>"
|
||||||
|
;;
|
||||||
|
help2man*)
|
||||||
|
echo "You should only need it if you modified a dependency" \
|
||||||
|
"of a man page."
|
||||||
|
echo "You may want to install the GNU Help2man package:"
|
||||||
|
echo "<$gnu_software_URL/help2man/>"
|
||||||
|
;;
|
||||||
|
makeinfo*)
|
||||||
|
echo "You should only need it if you modified a '.texi' file, or"
|
||||||
|
echo "any other file indirectly affecting the aspect of the manual."
|
||||||
|
echo "You might want to install the Texinfo package:"
|
||||||
|
echo "<$gnu_software_URL/texinfo/>"
|
||||||
|
echo "The spurious makeinfo call might also be the consequence of"
|
||||||
|
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||||
|
echo "want to install GNU make:"
|
||||||
|
echo "<$gnu_software_URL/make/>"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "You might have modified some files without having the proper"
|
||||||
|
echo "tools for further handling them. Check the 'README' file, it"
|
||||||
|
echo "often tells you about the needed prerequisites for installing"
|
||||||
|
echo "this package. You may also peek at any GNU archive site, in"
|
||||||
|
echo "case some other package contains this missing '$1' program."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||||
|
-e '2,$s/^/ /' >&2
|
||||||
|
|
||||||
|
# Propagate the correct exit status (expected to be 127 for a program
|
||||||
|
# not found, 63 for a program that failed due to version mismatch).
|
||||||
|
exit $st
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
15
speexdsp.pc.in
Normal file
15
speexdsp.pc.in
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# libspeexdsp pkg-config source file
|
||||||
|
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: speexdsp
|
||||||
|
Description: Speexdsp is a speech processing library that goes along with the Speex codec
|
||||||
|
Version: @PACKAGE_VERSION@
|
||||||
|
Requires: @FFT_PKGCONFIG@
|
||||||
|
Conflicts:
|
||||||
|
Libs: -L${libdir} -lspeexdsp
|
||||||
|
Libs.private: @LIBM@
|
||||||
|
Cflags: -I${includedir}
|
6
symbian/Makefile.am
Normal file
6
symbian/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in. -*-Makefile-*-
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
EXTRA_DIST = bld.inf config.h speex.mmp
|
442
symbian/Makefile.in
Normal file
442
symbian/Makefile.in
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = symbian
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
EXTRA_DIST = bld.inf config.h speex.mmp
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign symbian/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign symbian/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
tags TAGS:
|
||||||
|
|
||||||
|
ctags CTAGS:
|
||||||
|
|
||||||
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
cscopelist-am ctags-am distclean distclean-generic \
|
||||||
|
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
49
symbian/bld.inf
Normal file
49
symbian/bld.inf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2003 Commonwealth Scientific and Industrial Research
|
||||||
|
Organisation (CSIRO) Australia
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of CSIRO Australia nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
PRJ_EXPORTS
|
||||||
|
|
||||||
|
..\include\speex\speex_bits.h \epoc32\include\speex\speex_bits.h
|
||||||
|
..\include\speex\speex_callbacks.h \epoc32\include\speex\speex_callbacks.h
|
||||||
|
..\include\speex\speex_config_types.h \epoc32\include\speex\speex_config_types.h
|
||||||
|
..\include\speex\speex_echo.h \epoc32\include\speex\speex_echo.h
|
||||||
|
..\include\speex\speex.h \epoc32\include\speex\speex.h
|
||||||
|
..\include\speex\speex_header.h \epoc32\include\speex\speex_header.h
|
||||||
|
..\include\speex\speex_jitter.h \epoc32\include\speex\speex_jitter.h
|
||||||
|
..\include\speex\speex_preprocess.h \epoc32\include\speex\speex_preprocess.h
|
||||||
|
..\include\speex\speex_stereo.h \epoc32\include\speex\speex_stereo.h
|
||||||
|
..\include\speex\speex_types.h \epoc32\include\speex\speex_types.h
|
||||||
|
|
||||||
|
|
||||||
|
PRJ_MMPFILES
|
||||||
|
|
||||||
|
speex.mmp
|
57
symbian/config.h
Normal file
57
symbian/config.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2003 Commonwealth Scientific and Industrial Research
|
||||||
|
Organisation (CSIRO) Australia
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of CSIRO Australia nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
/* An inline macro is required for use of the inline keyword as not all C compilers support */
|
||||||
|
/* inline. It is officially C99 and C++ only */
|
||||||
|
|
||||||
|
#ifdef __WINS__
|
||||||
|
|
||||||
|
#define inline __inline
|
||||||
|
|
||||||
|
/* Disable some pointless/stupid warnings */
|
||||||
|
|
||||||
|
#pragma warning(disable: 4100) /* unreferenced formal parameter */
|
||||||
|
#pragma warning(disable: 4127) /* conditional expression is constant */
|
||||||
|
#pragma warning(disable: 4305) /* truncation from '...' to '...' */
|
||||||
|
#pragma warning(disable: 4244) /* conversion from '...' to '...', possible loss of data */
|
||||||
|
#pragma warning(disable: 4701) /* local variable may be be used without having been initialized */
|
||||||
|
|
||||||
|
#endif /* ! __WINS__ */
|
||||||
|
|
||||||
|
/* Use only fixed point arithmetic */
|
||||||
|
|
||||||
|
#define FIXED_POINT 1
|
||||||
|
|
||||||
|
#endif /* ! CONFIG_H */
|
40
symbian/speex.mmp
Normal file
40
symbian/speex.mmp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2003 Commonwealth Scientific and Industrial Research
|
||||||
|
Organisation (CSIRO) Australia
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of CSIRO Australia nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
TARGET speex.lib
|
||||||
|
TARGETTYPE lib
|
||||||
|
UID 0
|
||||||
|
MACRO HAVE_CONFIG_H
|
||||||
|
SOURCEPATH ..\libspeex
|
||||||
|
SOURCE buffer.c fftwrap.c filterbank.c jitter.c kiss_fft.c kiss_fftr.c mdf.c preprocess.c resample.c scal.c smallft.c
|
||||||
|
USERINCLUDE . ..\include\speex
|
||||||
|
SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\include
|
9
ti/Makefile.am
Normal file
9
ti/Makefile.am
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in. -*-Makefile-*-
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
SUBDIRS = speex_C54_test speex_C55_test speex_C64_test
|
||||||
|
|
||||||
|
EXTRA_DIST = config.h os_support_custom.h
|
||||||
|
|
623
ti/Makefile.in
Normal file
623
ti/Makefile.in
Normal file
@ -0,0 +1,623 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = ti
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||||
|
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||||
|
install-data-recursive install-dvi-recursive \
|
||||||
|
install-exec-recursive install-html-recursive \
|
||||||
|
install-info-recursive install-pdf-recursive \
|
||||||
|
install-ps-recursive install-recursive installcheck-recursive \
|
||||||
|
installdirs-recursive pdf-recursive ps-recursive \
|
||||||
|
tags-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
am__recursive_targets = \
|
||||||
|
$(RECURSIVE_TARGETS) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
|
$(am__extra_recursive_targets)
|
||||||
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
|
distdir
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
SUBDIRS = speex_C54_test speex_C55_test speex_C64_test
|
||||||
|
EXTRA_DIST = config.h os_support_custom.h
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ti/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign ti/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run 'make' without going through this Makefile.
|
||||||
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
|
$(am__recursive_targets):
|
||||||
|
@fail=; \
|
||||||
|
if $(am__make_keepgoing); then \
|
||||||
|
failcom='fail=yes'; \
|
||||||
|
else \
|
||||||
|
failcom='exit 1'; \
|
||||||
|
fi; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-recursive
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-recursive
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscopelist: cscopelist-recursive
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||||
|
check-am clean clean-generic clean-libtool cscopelist-am ctags \
|
||||||
|
ctags-am distclean distclean-generic distclean-libtool \
|
||||||
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||||
|
ps ps-am tags tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
78
ti/config.h
Normal file
78
ti/config.h
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
/* Copyright (C) 2005 Psi Systems, Inc.
|
||||||
|
File: config.h
|
||||||
|
Main Speex option include file for TI C64xx, C54xx and C55xx processors
|
||||||
|
for use with TI Code Composer (TM) DSP development tools.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define FIXED_POINT
|
||||||
|
#define FRAME_SIZE 160
|
||||||
|
#define DISABLE_WIDEBAND
|
||||||
|
#define EXPORT
|
||||||
|
|
||||||
|
/* Disable DC block if doing SNR testing */
|
||||||
|
#define DISABLE_HIGHPASS
|
||||||
|
|
||||||
|
/* Allow for 2 20ms narrowband blocks per frame, plus a couple of bytes */
|
||||||
|
#define MAX_CHARS_PER_FRAME (42/BYTES_PER_CHAR)
|
||||||
|
|
||||||
|
/* for debug */
|
||||||
|
#undef DECODE_ONLY
|
||||||
|
#define VERBOSE_ALLOC
|
||||||
|
|
||||||
|
/* EITHER Allocate from fixed array (C heap not used) */
|
||||||
|
/* Enable VERBOSE_ALLOC to see how much is used */
|
||||||
|
#define MANUAL_ALLOC
|
||||||
|
#define OS_SUPPORT_CUSTOM
|
||||||
|
|
||||||
|
/* OR Use CALLOC (heap size must be increased in linker command file) */
|
||||||
|
//#undef MANUAL_ALLOC
|
||||||
|
//#undef OS_SUPPORT_CUSTOM
|
||||||
|
|
||||||
|
#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
|
||||||
|
//#define PRECISION16
|
||||||
|
|
||||||
|
// These values determined by analysis for 8kbps narrowband
|
||||||
|
#define SPEEXENC_PERSIST_STACK_SIZE 1000
|
||||||
|
#define SPEEXENC_SCRATCH_STACK_SIZE 3000
|
||||||
|
#define SPEEXDEC_PERSIST_STACK_SIZE 1000
|
||||||
|
#define SPEEXDEC_SCRATCH_STACK_SIZE 1000
|
||||||
|
#else /* C6X */
|
||||||
|
#define NO_LONGLONG
|
||||||
|
|
||||||
|
#define SPEEXENC_PERSIST_STACK_SIZE 2000
|
||||||
|
#define SPEEXENC_SCRATCH_STACK_SIZE 6000
|
||||||
|
#define SPEEXDEC_PERSIST_STACK_SIZE 2000
|
||||||
|
#define SPEEXDEC_SCRATCH_STACK_SIZE 2000
|
||||||
|
#endif
|
||||||
|
#define SPEEX_PERSIST_STACK_SIZE (SPEEXENC_PERSIST_STACK_SIZE + SPEEXDEC_PERSIST_STACK_SIZE)
|
||||||
|
#define SPEEX_SCRATCH_STACK_SIZE SPEEXENC_SCRATCH_STACK_SIZE
|
||||||
|
#define NB_ENC_STACK SPEEXENC_SCRATCH_STACK_SIZE
|
||||||
|
#define NB_DEC_STACK SPEEXDEC_SCRATCH_STACK_SIZE
|
||||||
|
|
128
ti/os_support_custom.h
Normal file
128
ti/os_support_custom.h
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
/* Copyright (C) 2007 Psi Systems, Inc.
|
||||||
|
Author: Jean-Marc Valin
|
||||||
|
File: os_support_custom.h
|
||||||
|
Memory Allocation overrides to allow user control rather than C alloc/free.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef MANUAL_ALLOC
|
||||||
|
|
||||||
|
/* To avoid changing the Speex call model, this file relies on four static variables
|
||||||
|
The user main creates two linear buffers, and initializes spxGlobalHeap/ScratchPtr
|
||||||
|
to point to the start of the two buffers, and initializes spxGlobalHeap/ScratchEnd
|
||||||
|
to point to the first address following the last byte of the two buffers.
|
||||||
|
|
||||||
|
This mechanism allows, for example, data caching for multichannel applications,
|
||||||
|
where the Speex state is swapped from a large slow memory to a small fast memory
|
||||||
|
each time the codec runs.
|
||||||
|
|
||||||
|
Persistent data is allocated in spxGlobalHeap (instead of calloc), while scratch
|
||||||
|
data is allocated in spxGlobalScratch.
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern char *spxGlobalHeapPtr, *spxGlobalHeapEnd;
|
||||||
|
extern char *spxGlobalScratchPtr, *spxGlobalScratchEnd;
|
||||||
|
|
||||||
|
/* Make sure that all structures are aligned to largest type */
|
||||||
|
#define BLOCK_MASK (sizeof(long double)-1)
|
||||||
|
extern inline void speex_warning(const char *str);
|
||||||
|
|
||||||
|
#define OVERRIDE_SPEEX_ALLOC
|
||||||
|
static inline void *speex_alloc (int size)
|
||||||
|
{
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
|
ptr = (void *) (((int)spxGlobalHeapPtr + BLOCK_MASK) & ~BLOCK_MASK); //Start on 8 boundary
|
||||||
|
|
||||||
|
spxGlobalHeapPtr = (char *)((int)ptr + size); // Update pointer to next free location
|
||||||
|
|
||||||
|
if (spxGlobalHeapPtr > spxGlobalHeapEnd )
|
||||||
|
{
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
fprintf (stderr, "insufficient space for persistent alloc request %d bytes\n", size);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
fprintf (stderr, "Persist Allocated %d chars at %x, %d remaining\n", size, ptr, ((int)spxGlobalHeapEnd - (int)spxGlobalHeapPtr));
|
||||||
|
#endif
|
||||||
|
memset(ptr, 0, size);
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OVERRIDE_SPEEX_ALLOC_SCRATCH
|
||||||
|
static inline void *speex_alloc_scratch (int size)
|
||||||
|
{
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
|
ptr = (void *) (((int)spxGlobalScratchPtr + BLOCK_MASK) & ~BLOCK_MASK); //Start on 8 boundary
|
||||||
|
|
||||||
|
spxGlobalScratchPtr = (char *)((int)ptr + size); // Update pointer to next free location
|
||||||
|
|
||||||
|
if (spxGlobalScratchPtr > spxGlobalScratchEnd )
|
||||||
|
{
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
fprintf (stderr, "insufficient space for scratch alloc request %d bytes\n", size);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
fprintf (stderr, "Scratch Allocated %d chars at %x, %d remaining\n", size, ptr, ((int)spxGlobalScratchEnd - (int)spxGlobalScratchPtr));
|
||||||
|
#endif
|
||||||
|
memset(ptr, 0, size);
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OVERRIDE_SPEEX_REALLOC
|
||||||
|
static inline void *speex_realloc (void *ptr, int size)
|
||||||
|
{
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
speex_warning("realloc attempted, not allowed");
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define OVERRIDE_SPEEX_FREE
|
||||||
|
static inline void speex_free (void *ptr)
|
||||||
|
{
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
speex_warning("at speex_free");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#define OVERRIDE_SPEEX_FREE_SCRATCH
|
||||||
|
static inline void speex_free_scratch (void *ptr)
|
||||||
|
{
|
||||||
|
#ifdef VERBOSE_ALLOC
|
||||||
|
speex_warning("at speex_free_scratch");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* !MANUAL_ALLOC */
|
8
ti/speex_C54_test/Makefile.am
Normal file
8
ti/speex_C54_test/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in. -*-Makefile-*-
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
EXTRA_DIST = speex_C54_test.cmd speex_C54_test.pjt
|
||||||
|
|
||||||
|
|
442
ti/speex_C54_test/Makefile.in
Normal file
442
ti/speex_C54_test/Makefile.in
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = ti/speex_C54_test
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
EXTRA_DIST = speex_C54_test.cmd speex_C54_test.pjt
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ti/speex_C54_test/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign ti/speex_C54_test/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
tags TAGS:
|
||||||
|
|
||||||
|
ctags CTAGS:
|
||||||
|
|
||||||
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
cscopelist-am ctags-am distclean distclean-generic \
|
||||||
|
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
71
ti/speex_C54_test/speex_C54_test.cmd
Normal file
71
ti/speex_C54_test/speex_C54_test.cmd
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/* Copyright (C) 2005 Psi Systems, Inc.
|
||||||
|
File: speex_C54_test.cmd
|
||||||
|
Linker command file with memory allocation for TI TMS320VC5416 processor
|
||||||
|
for use with TI Code Composer (TM) DSP development tools.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
- Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-c
|
||||||
|
-stack 0x2000
|
||||||
|
-heap 0x1000 /* If private memory allocation is used for Speex */
|
||||||
|
/*-heap 0x6000 /* If calloc is used for Speex */
|
||||||
|
-lrts_ext.lib
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
/* PAGE 0: P_DARAM03: origin = 0x80, len = 0x7f00*/
|
||||||
|
PAGE 0: P_DARAM03: origin = 0x5000, len = 0x2f80
|
||||||
|
PAGE 0: VECT: origin = 0x7f80, len = 0x80
|
||||||
|
PAGE 0: P_DARAM47: origin = 0x18000, len = 0x8000
|
||||||
|
PAGE 0: SARAM03: origin = 0x28000, len = 0x8000
|
||||||
|
PAGE 0: SARAM47: origin = 0x38000, len = 0x8000
|
||||||
|
|
||||||
|
PAGE 1: USERREGS: origin = 0x60, len = 0x1a
|
||||||
|
PAGE 1: BIOSREGS: origin = 0x7c, len = 0x4
|
||||||
|
PAGE 1: CSLREGS: origin = 0x7a, len = 0x2
|
||||||
|
D_DARAM03: origin = 0x80, len = 0x4f80
|
||||||
|
D_DARAM47: origin = 0x8000, len = 0x8000
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.vectors: {} > VECT PAGE 0
|
||||||
|
.bootmem: {rts_ext.lib (.text)} > P_DARAM03 PAGE 0
|
||||||
|
/* .bootmem: {} > P_DARAM03 PAGE 0 */
|
||||||
|
.text: {} > SARAM03 PAGE 0
|
||||||
|
.cinit: {} > SARAM03 PAGE 0
|
||||||
|
.switch: {} > SARAM03 PAGE 0
|
||||||
|
.bss: {} > D_DARAM03 | D_DARAM47 PAGE 1
|
||||||
|
.far: {} > D_DARAM03 | D_DARAM47 PAGE 1
|
||||||
|
.const: {} > D_DARAM03 | D_DARAM47 PAGE 1
|
||||||
|
.sysmem: {} > D_DARAM47 PAGE 1
|
||||||
|
.cio: {} > D_DARAM03 | D_DARAM47 PAGE 1
|
||||||
|
.stack: {} > D_DARAM03 | D_DARAM47 PAGE 1
|
||||||
|
.myheap: {} > D_DARAM47 PAGE 1
|
||||||
|
}
|
44
ti/speex_C54_test/speex_C54_test.pjt
Normal file
44
ti/speex_C54_test/speex_C54_test.pjt
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
; Code Composer Project File, Version 2.0 (do not modify or remove this line)
|
||||||
|
|
||||||
|
[Project Settings]
|
||||||
|
ProjectDir="C:\Speex\speex_14274\ti\speex_C54_test\"
|
||||||
|
ProjectType=Executable
|
||||||
|
CPUFamily=TMS320C54XX
|
||||||
|
Tool="Compiler"
|
||||||
|
Tool="CustomBuilder"
|
||||||
|
Tool="DspBiosBuilder"
|
||||||
|
Tool="Linker"
|
||||||
|
Config="Debug"
|
||||||
|
Config="Release"
|
||||||
|
|
||||||
|
[Source Files]
|
||||||
|
Source="..\..\libspeexdsp\buffer.c"
|
||||||
|
Source="..\..\libspeexdsp\fftwrap.c"
|
||||||
|
Source="..\..\libspeexdsp\filterbank.c"
|
||||||
|
Source="..\..\libspeexdsp\jitter.c"
|
||||||
|
Source="..\..\libspeexdsp\kiss_fft.c"
|
||||||
|
Source="..\..\libspeexdsp\kiss_fftr.c"
|
||||||
|
Source="..\..\libspeexdsp\mdf.c"
|
||||||
|
Source="..\..\libspeexdsp\preprocess.c"
|
||||||
|
Source="..\..\libspeexdsp\resample.c"
|
||||||
|
Source="..\..\libspeexdsp\scal.c"
|
||||||
|
Source="speex_C54_test.cmd"
|
||||||
|
|
||||||
|
["Compiler" Settings: "Debug"]
|
||||||
|
Options=-g -q -o3 -fr"..\ti\speex_C54_test\Debug" -i"..\ti" -i"..\include" -d"_DEBUG" -d"CONFIG_TI_C54X" -d"HAVE_CONFIG_H" -d"NO_LONGLONG" -mf -ms
|
||||||
|
|
||||||
|
["Compiler" Settings: "Release"]
|
||||||
|
Options=-q -o2 -fr"..\ti\speex_C54_test\Release" -i"..\ti" -i"..\include" -d"CONFIG_TI_C54X" -d"HAVE_CONFIG_H" -d"NO_LONGLONG" -mf -ms
|
||||||
|
|
||||||
|
["DspBiosBuilder" Settings: "Debug"]
|
||||||
|
Options=-v54
|
||||||
|
|
||||||
|
["DspBiosBuilder" Settings: "Release"]
|
||||||
|
Options=-v54
|
||||||
|
|
||||||
|
["Linker" Settings: "Debug"]
|
||||||
|
Options=-q -c -heap4096 -m".\Debug\speex_C54_test.map" -o".\Debug\speex_C54_test.out" -stack4096 -w -x
|
||||||
|
|
||||||
|
["Linker" Settings: "Release"]
|
||||||
|
Options=-q -c -m".\Release\speex_C54_test.map" -o".\Release\speex_C54_test.out" -w -x
|
||||||
|
|
6
ti/speex_C55_test/Makefile.am
Normal file
6
ti/speex_C55_test/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in. -*-Makefile-*-
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
|
||||||
|
EXTRA_DIST = speex_C55_test.cmd speex_C55_test.pjt
|
442
ti/speex_C55_test/Makefile.in
Normal file
442
ti/speex_C55_test/Makefile.in
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||||
|
#AUTOMAKE_OPTIONS = no-dependencies
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = ti/speex_C55_test
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FFT_CFLAGS = @FFT_CFLAGS@
|
||||||
|
FFT_LIBS = @FFT_LIBS@
|
||||||
|
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBM = @LIBM@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SIZE16 = @SIZE16@
|
||||||
|
SIZE32 = @SIZE32@
|
||||||
|
SPEEXDSP_LT_AGE = @SPEEXDSP_LT_AGE@
|
||||||
|
SPEEXDSP_LT_CURRENT = @SPEEXDSP_LT_CURRENT@
|
||||||
|
SPEEXDSP_LT_REVISION = @SPEEXDSP_LT_REVISION@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
USIZE16 = @USIZE16@
|
||||||
|
USIZE32 = @USIZE32@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
src = @src@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
EXTRA_DIST = speex_C55_test.cmd speex_C55_test.pjt
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ti/speex_C55_test/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign ti/speex_C55_test/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
tags TAGS:
|
||||||
|
|
||||||
|
ctags CTAGS:
|
||||||
|
|
||||||
|
cscope cscopelist:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
cscopelist-am ctags-am distclean distclean-generic \
|
||||||
|
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags-am uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user