Add sources
This commit is contained in:
parent
ccd54155bb
commit
d947c525c6
220 changed files with 51996 additions and 0 deletions
118
.clang-format
Normal file
118
.clang-format
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
---
|
||||||
|
BasedOnStyle: WebKit
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveBitFields: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
|
AlignOperands: Align
|
||||||
|
AlignTrailingComments: true
|
||||||
|
AllowAllArgumentsOnNextLine: true
|
||||||
|
AllowAllConstructorInitializersOnNextLine: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: InlineOnly
|
||||||
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
AllowShortLambdasOnASingleLine: Inline
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: false
|
||||||
|
BraceWrapping:
|
||||||
|
AfterCaseLabel: true
|
||||||
|
AfterClass: true
|
||||||
|
AfterControlStatement: Always
|
||||||
|
AfterEnum: true
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: false
|
||||||
|
AfterStruct: true
|
||||||
|
AfterUnion: true
|
||||||
|
AfterExternBlock: false
|
||||||
|
BeforeCatch: true
|
||||||
|
BeforeElse: true
|
||||||
|
BeforeLambdaBody: true
|
||||||
|
BeforeWhile: true
|
||||||
|
IndentBraces: false
|
||||||
|
SplitEmptyFunction: true
|
||||||
|
SplitEmptyRecord: true
|
||||||
|
SplitEmptyNamespace: true
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakStringLiterals: true
|
||||||
|
ColumnLimit: 100
|
||||||
|
CompactNamespaces: false
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DeriveLineEnding: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
DisableFormat: false
|
||||||
|
FixNamespaceComments: true
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^.*Private[.]h"'
|
||||||
|
Priority: 0
|
||||||
|
- Regex: '^".*[.]pb[.]h"'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '^".*[.]h"'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '^<boost/.*>'
|
||||||
|
Priority: 5
|
||||||
|
- Regex: '^<.*([.]h|[.]hpp)>'
|
||||||
|
Priority: 3
|
||||||
|
- Regex: '^<queue>'
|
||||||
|
Priority: 6
|
||||||
|
- Regex: '^<Q.*>'
|
||||||
|
Priority: 4
|
||||||
|
- Regex: '^<.*>'
|
||||||
|
Priority: 6
|
||||||
|
IndentCaseBlocks: false
|
||||||
|
IndentCaseLabels: false
|
||||||
|
IndentExternBlock: NoIndent
|
||||||
|
IndentGotoLabels: false
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
Language: Cpp
|
||||||
|
MaxEmptyLinesToKeep: 2
|
||||||
|
NamespaceIndentation: None
|
||||||
|
PenaltyExcessCharacter: 10
|
||||||
|
PointerAlignment: Left
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: true
|
||||||
|
SortUsingDeclarations: true
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceAfterLogicalNot: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceBeforeSquareBrackets: false
|
||||||
|
SpaceInEmptyBlock: false
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInConditionalStatement: false
|
||||||
|
SpacesInContainerLiterals: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: c++14
|
||||||
|
StatementMacros: ['Q_UNUSED']
|
||||||
|
TabWidth: 4
|
||||||
|
UseCRLF: false
|
||||||
|
UseTab: ForIndentation
|
||||||
|
|
||||||
|
...
|
||||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
build*
|
||||||
|
cmake-build-*
|
||||||
|
.idea
|
||||||
13
CMakeLists.txt
Normal file
13
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
cmake_minimum_required(VERSION 3.14)
|
||||||
|
project(speex_webrtc_test)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
find_package(Qt5 COMPONENTS Core Widgets Multimedia REQUIRED)
|
||||||
|
find_package(WebRTC REQUIRED)
|
||||||
|
|
||||||
|
add_subdirectory(external)
|
||||||
|
add_subdirectory(src)
|
||||||
30
cmake/FindWebRTC.cmake
Normal file
30
cmake/FindWebRTC.cmake
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PC_LIBWEBRTCDSP webrtc-audio-processing)
|
||||||
|
set(LIBWEBRTCDSP_DEFINITIONS ${PC_LIBWEBRTCDSP_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
find_path(LIBWEBRTCDSP_INCLUDE_DIR webrtc/common.h
|
||||||
|
HINTS ${PC_LIBWEBRTCDSP_INCLUDEDIR} ${PC_LIBWEBRTCDSP_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES libwebrtc_audio_processing)
|
||||||
|
|
||||||
|
find_library(LIBWEBRTCDSP_LIBRARY NAMES webrtc_audio_processing
|
||||||
|
HINTS ${PC_LIBWEBRTCDSP_LIBDIR} ${PC_LIBWEBRTCDSP_LIBRARY_DIRS} )
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set LIBWEBRTCDSP2_FOUND to TRUE
|
||||||
|
# if all listed variables are TRUE
|
||||||
|
find_package_handle_standard_args(WebRTC DEFAULT_MSG
|
||||||
|
LIBWEBRTCDSP_LIBRARY LIBWEBRTCDSP_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBWEBRTCDSP_INCLUDE_DIR LIBWEBRTCDSP_LIBRARY )
|
||||||
|
|
||||||
|
if(NOT TARGET WebRTC)
|
||||||
|
add_library(WebRTC UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(WebRTC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBWEBRTCDSP_INCLUDE_DIR}")
|
||||||
|
set_property(TARGET WebRTC PROPERTY IMPORTED_LOCATION "${LIBWEBRTCDSP_LIBRARY}")
|
||||||
|
if (UNIX)
|
||||||
|
target_compile_definitions(WebRTC INTERFACE WEBRTC_POSIX WEBRTC_AUDIO_PROCESSING_ONLY_BUILD)
|
||||||
|
elseif(WIN32)
|
||||||
|
target_compile_definitions(WebRTC INTERFACE WEBRTC_WIN WEBRTC_AUDIO_PROCESSING_ONLY_BUILD)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
1
external/CMakeLists.txt
vendored
Normal file
1
external/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
add_subdirectory(SpeexDSP)
|
||||||
58
external/SpeexDSP/CMakeLists.txt
vendored
Normal file
58
external/SpeexDSP/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
cmake_minimum_required(VERSION 3.0.2)
|
||||||
|
project(speexdsp)
|
||||||
|
|
||||||
|
include(CheckTypeSize)
|
||||||
|
check_type_size("int16_t" SIZEOF_INT16)
|
||||||
|
|
||||||
|
set(SPEEXDSP_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/speexdsp-1.2.0)
|
||||||
|
set(SPEEXDSP_SOURCE ${SPEEXDSP_FOLDER}/libspeexdsp)
|
||||||
|
|
||||||
|
set(SIZE16 "int16_t")
|
||||||
|
set(USIZE16 "uint16_t")
|
||||||
|
set(SIZE32 "int32_t")
|
||||||
|
set(USIZE32 "uint32_t")
|
||||||
|
set(EXPORT "__attribute__((visibility(\"default\")))")
|
||||||
|
set(FLOATING_POINT 1)
|
||||||
|
set(USE_SMALLFT 1)
|
||||||
|
|
||||||
|
if(HAVE_SYS_TYPES_H)
|
||||||
|
set(INCLUDE_STDINT "#include <sys/types.h>")
|
||||||
|
endif()
|
||||||
|
if(HAVE_STDINT_H)
|
||||||
|
set(INCLUDE_STDINT "#include <stdint.h>")
|
||||||
|
endif()
|
||||||
|
if(HAVE_STDDEF_H)
|
||||||
|
set(INCLUDE_STDINT "#include <inttypes.h>")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${SPEEXDSP_FOLDER}/include/speex/speexdsp_config_types.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/speexdsp_config_types.h
|
||||||
|
)
|
||||||
|
|
||||||
|
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||||
|
|
||||||
|
add_library(speexdsp STATIC
|
||||||
|
${SPEEXDSP_SOURCE}/resample.c
|
||||||
|
${SPEEXDSP_SOURCE}/buffer.c
|
||||||
|
${SPEEXDSP_SOURCE}/fftwrap.c
|
||||||
|
${SPEEXDSP_SOURCE}/filterbank.c
|
||||||
|
${SPEEXDSP_SOURCE}/jitter.c
|
||||||
|
${SPEEXDSP_SOURCE}/kiss_fft.c
|
||||||
|
${SPEEXDSP_SOURCE}/kiss_fftr.c
|
||||||
|
${SPEEXDSP_SOURCE}/mdf.c
|
||||||
|
${SPEEXDSP_SOURCE}/preprocess.c
|
||||||
|
${SPEEXDSP_SOURCE}/scal.c
|
||||||
|
${SPEEXDSP_SOURCE}/smallft.c
|
||||||
|
)
|
||||||
|
target_include_directories(speexdsp
|
||||||
|
PUBLIC
|
||||||
|
${SPEEXDSP_FOLDER}/include
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
PRIVATE
|
||||||
|
${SPEEXDSP_FOLDER}
|
||||||
|
${SPEEXDSP_SOURCE}
|
||||||
|
${SPEEXDSP_FOLDER}/include
|
||||||
|
${SPEEXDSP_FOLDER}/include/speex
|
||||||
|
)
|
||||||
|
target_compile_options(speexdsp PRIVATE "-DHAVE_CONFIG_H")
|
||||||
59
external/SpeexDSP/config.h.cmake
vendored
Normal file
59
external/SpeexDSP/config.h.cmake
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
// Use C99 variable-size arrays
|
||||||
|
#cmakedefine VAR_ARRAYS
|
||||||
|
|
||||||
|
// Make use of alloca
|
||||||
|
#cmakedefine USE_ALLOCA
|
||||||
|
|
||||||
|
// Symbol visibility prefix
|
||||||
|
#cmakedefine EXPORT
|
||||||
|
|
||||||
|
// Enable valgrind extra checks
|
||||||
|
#cmakedefine ENABLE_VALGRIND
|
||||||
|
|
||||||
|
// Compile as fixed-point
|
||||||
|
#cmakedefine FIXED_POINT
|
||||||
|
|
||||||
|
// Compile as floating-point
|
||||||
|
#cmakedefine FLOATING_POINT
|
||||||
|
|
||||||
|
// Enable SSE support
|
||||||
|
#cmakedefine USE_SSE
|
||||||
|
|
||||||
|
// Enable NEON support
|
||||||
|
#cmakedefine USE_NEON
|
||||||
|
|
||||||
|
// Enable SSE2 support
|
||||||
|
#cmakedefine USE_SSE2
|
||||||
|
|
||||||
|
// Disable all parts of the API that are using floats
|
||||||
|
#cmakedefine DISABLE_FLOAT_API
|
||||||
|
|
||||||
|
// Make use of ARM4 assembly optimizations
|
||||||
|
#cmakedefine ARM4_ASM
|
||||||
|
|
||||||
|
// Make use of ARM5E assembly optimizations
|
||||||
|
#cmakedefine ARM5E_ASM
|
||||||
|
|
||||||
|
// Make use of Blackfin assembly optimizations
|
||||||
|
#cmakedefine BFIN_ASM
|
||||||
|
|
||||||
|
// Debug fixed-point implementation
|
||||||
|
#cmakedefine FIXED_DEBUG
|
||||||
|
|
||||||
|
// Resample with full SINC table (no interpolation)
|
||||||
|
#cmakedefine RESAMPLE_FULL_SINC_TABLE
|
||||||
|
|
||||||
|
// Enable support for TI C55X DSP
|
||||||
|
#cmakedefine TI_C55X
|
||||||
|
|
||||||
|
// Use KISS Fast Fourier Transform
|
||||||
|
#cmakedefine USE_KISS_FFT
|
||||||
|
|
||||||
|
// Use FFT from OggVorbis
|
||||||
|
#cmakedefine USE_SMALLFT
|
||||||
|
|
||||||
|
// Use FFTW3 for FFT
|
||||||
|
#cmakedefine USE_GPL_FFTW3
|
||||||
|
|
||||||
|
// Use Intel Math Kernel Library for FFT
|
||||||
|
#cmakedefine USE_INTEL_MKL
|
||||||
17
external/SpeexDSP/speexdsp-1.2.0/.cvsignore
vendored
Normal file
17
external/SpeexDSP/speexdsp-1.2.0/.cvsignore
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
Speex.spec
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
config.guess
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
libtool
|
||||||
|
ltconfig
|
||||||
|
ltmain.sh
|
||||||
|
missing
|
||||||
|
mkinstalldirs
|
||||||
37
external/SpeexDSP/speexdsp-1.2.0/.gitignore
vendored
Normal file
37
external/SpeexDSP/speexdsp-1.2.0/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
*.o
|
||||||
|
*.lo
|
||||||
|
Makefile.in
|
||||||
|
*~
|
||||||
|
*.orig
|
||||||
|
fixed
|
||||||
|
float
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
compile
|
||||||
|
config.guess
|
||||||
|
config.h.in
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
ltmain.sh
|
||||||
|
missing
|
||||||
|
Makefile
|
||||||
|
.deps
|
||||||
|
.libs
|
||||||
|
*.la
|
||||||
|
work
|
||||||
|
SpeexDSP.spec
|
||||||
|
config.h
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
include/speex/speexdsp_config_types.h
|
||||||
|
*.sw[lmnop]
|
||||||
|
testdenoise
|
||||||
|
testecho
|
||||||
|
testjitter
|
||||||
|
libtool
|
||||||
|
speexdsp.pc
|
||||||
|
stamp-*
|
||||||
|
patches
|
||||||
|
/m4
|
||||||
19
external/SpeexDSP/speexdsp-1.2.0/.travis.yml
vendored
Normal file
19
external/SpeexDSP/speexdsp-1.2.0/.travis.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
language: c
|
||||||
|
|
||||||
|
env:
|
||||||
|
- CONFIG=""
|
||||||
|
- CONFIG="--enable-fixed-point"
|
||||||
|
- CONFIG="--enable-fixed-point --disable-float-api"
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./autogen.sh
|
||||||
|
- ./configure $CONFIG
|
||||||
|
- make distcheck
|
||||||
18
external/SpeexDSP/speexdsp-1.2.0/AUTHORS
vendored
Normal file
18
external/SpeexDSP/speexdsp-1.2.0/AUTHORS
vendored
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
external/SpeexDSP/speexdsp-1.2.0/COPYING
vendored
Normal file
35
external/SpeexDSP/speexdsp-1.2.0/COPYING
vendored
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
external/SpeexDSP/speexdsp-1.2.0/ChangeLog
vendored
Normal file
21
external/SpeexDSP/speexdsp-1.2.0/ChangeLog
vendored
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.
|
||||||
225
external/SpeexDSP/speexdsp-1.2.0/Doxyfile
vendored
Normal file
225
external/SpeexDSP/speexdsp-1.2.0/Doxyfile
vendored
Normal file
|
|
@ -0,0 +1,225 @@
|
||||||
|
# Doxyfile 1.5.1-KDevelop
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
PROJECT_NAME = Speex
|
||||||
|
PROJECT_NUMBER = 1.2-beta2
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
USE_WINDOWS_ENCODING = NO
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF =
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = NO
|
||||||
|
STRIP_FROM_PATH =
|
||||||
|
STRIP_FROM_INC_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
DETAILS_AT_TOP = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
|
TAB_SIZE = 8
|
||||||
|
ALIASES =
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
BUILTIN_STL_SUPPORT = NO
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = NO
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = YES
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_DIRECTORIES = YES
|
||||||
|
FILE_VERSION_FILTER =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LOGFILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = include/speex
|
||||||
|
FILE_PATTERNS =
|
||||||
|
RECURSIVE = NO
|
||||||
|
EXCLUDE =
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS = speex_config_types.h
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS =
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER =
|
||||||
|
FILTER_PATTERNS =
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
REFERENCES_LINK_SOURCE = YES
|
||||||
|
USE_HTAGS = NO
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = NO
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER =
|
||||||
|
HTML_FOOTER =
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_LATEX = YES
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = YES
|
||||||
|
USE_PDFLATEX = YES
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
MAN_LINKS = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_XML = NO
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the Perl module output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED =
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE =
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = YES
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
CALLER_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = gif
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SEARCHENGINE = NO
|
||||||
8
external/SpeexDSP/speexdsp-1.2.0/INSTALL
vendored
Normal file
8
external/SpeexDSP/speexdsp-1.2.0/INSTALL
vendored
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
external/SpeexDSP/speexdsp-1.2.0/Makefile.am
vendored
Normal file
19
external/SpeexDSP/speexdsp-1.2.0/Makefile.am
vendored
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
|
||||||
1
external/SpeexDSP/speexdsp-1.2.0/NEWS
vendored
Normal file
1
external/SpeexDSP/speexdsp-1.2.0/NEWS
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
2002/02/13: Creation of the "Speex" project
|
||||||
3
external/SpeexDSP/speexdsp-1.2.0/README
vendored
Normal file
3
external/SpeexDSP/speexdsp-1.2.0/README
vendored
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.
|
||||||
103
external/SpeexDSP/speexdsp-1.2.0/README.Trimedia
vendored
Normal file
103
external/SpeexDSP/speexdsp-1.2.0/README.Trimedia
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
################# REMOVE warnings on trimedia compiler ##############################
|
||||||
|
################# Not critical to compilation ##############################
|
||||||
|
|
||||||
|
1. Change the following statements to remove warning for constant expression
|
||||||
|
(i) mdf.c [if(0) --> #if 0]
|
||||||
|
(ii) preprocess.c [if(1) --> #if 1]
|
||||||
|
|
||||||
|
2. add REMARK_ON macro to remove warning on not reference variable
|
||||||
|
-- uses (void)<variable> to remove warning on not referenced variable
|
||||||
|
-- #define REMARK_ON
|
||||||
|
-- (void)<variable>
|
||||||
|
-- #endif
|
||||||
|
-- search for REMARK_ON on the following files
|
||||||
|
(i) jitter.c
|
||||||
|
(ii) mdf.c
|
||||||
|
(iii) filterbank.c
|
||||||
|
(iv) preprocess.c
|
||||||
|
|
||||||
|
3. commented out the following in pseudofloat.h for unused variable
|
||||||
|
//static const spx_float_t FLOAT_HALF = {16384,-15};
|
||||||
|
|
||||||
|
################# Patches for trimedia compiler ##############################
|
||||||
|
################# Critical to compilation ##############################
|
||||||
|
|
||||||
|
-- added the #elif defined (TM_ASM) to the following files for optimized codes
|
||||||
|
(1) arch.h
|
||||||
|
(2) fftwrap.c
|
||||||
|
(3) filterbank.c
|
||||||
|
(4) kiss_fft.c
|
||||||
|
(5) kiss_fftr.c
|
||||||
|
(6) mdf.c
|
||||||
|
(7) preprocess.c
|
||||||
|
|
||||||
|
-- added macro PREPROCESS_MDF_FLOAT to allow using of floating point
|
||||||
|
-- in mdf and preprocess while keeping fixed point in encoder/decoder
|
||||||
|
-- This is due to the fact that preprocess/mdf run faster on floating
|
||||||
|
-- point on trimedia
|
||||||
|
-- added the following 3 lines to the files below
|
||||||
|
#ifdef PREPROCESS_MDF_FLOAT
|
||||||
|
#undef FIXED_POINT
|
||||||
|
#endif
|
||||||
|
(1) mdf.c
|
||||||
|
(2) preprocess.c
|
||||||
|
(3) filterbank.c
|
||||||
|
(4) fftwrap.c
|
||||||
|
(5) kiss_fft.c
|
||||||
|
(6) kiss_fftr.c
|
||||||
|
|
||||||
|
-- created a new USE_COMPACT_KISS_FFT for fftwrap.c and shifted defination
|
||||||
|
-- to config file so that user configure the usage of fft on config.h
|
||||||
|
-- TOEXPLORE:is it possible to share table between mdf/preprocess?
|
||||||
|
-- Introducing this macro made the following changes in C code
|
||||||
|
-- New macro to facilitate integration
|
||||||
|
(grouping real/complex for dc and nyquist frequency seems to require a large
|
||||||
|
amount of memory for mdf, therefore did not made the changes for that)
|
||||||
|
(1) modify preprocess.c on init and destroy
|
||||||
|
(2) modify mdf.c on init and destroy
|
||||||
|
(3) shifted power_spectrum to fftwrap.c to share optimised code between
|
||||||
|
preprocess.c and mdf.c
|
||||||
|
|
||||||
|
################# NOTES ##############################
|
||||||
|
(1) fixed point encoding/decoding is tested on narrowband
|
||||||
|
- some of the QX fractions are packed together to
|
||||||
|
(frac1 * a + frac2 * a) >> X (should be more accurate in rounding)
|
||||||
|
instead of
|
||||||
|
((frac1 * a) >> X) + ((frac2 * a) >> X)
|
||||||
|
will cause some different between optimized and unoptimized code.
|
||||||
|
tried decoding/encoding optimized code on some audio files retains
|
||||||
|
the clearity of the word
|
||||||
|
|
||||||
|
- wideband/ultrawideband is not heavily tested yet
|
||||||
|
|
||||||
|
(2) optimized fixed point code requires memory alignment
|
||||||
|
- used config to debug on functions where memory is not align
|
||||||
|
|
||||||
|
(3) floating point optimization for preprocess/mdf is tested
|
||||||
|
fixed point is not tested yet (except fft/filterbank)
|
||||||
|
Note (1) also applies to sround in fft for fixed point
|
||||||
|
some optimization is provided for fixed point as it requires lesser
|
||||||
|
memory compared to floating point.
|
||||||
|
|
||||||
|
(4) unroll configurations provided to reduce code size if required
|
||||||
|
|
||||||
|
(5) use profile options only if compiler profiling fails to work
|
||||||
|
|
||||||
|
(6) can't include the makefile as it is close proprietary
|
||||||
|
|
||||||
|
################# TODO:For Trimedia ##############################
|
||||||
|
(1) Optimizations for fixed point in mdf/preprocess
|
||||||
|
|
||||||
|
################# Added Files ##############################
|
||||||
|
- _kiss_fft_guts_tm.h
|
||||||
|
- fftwrap_tm.h
|
||||||
|
- filterbank_tm.h
|
||||||
|
- filters_tm.h
|
||||||
|
- fixed_tm.h
|
||||||
|
- kiss_fft_tm.h
|
||||||
|
- kiss_fftr_tm.h
|
||||||
|
- mdf_tm.h
|
||||||
|
- misc_tm.h
|
||||||
|
- preprocess_tm.h
|
||||||
|
- config.h
|
||||||
|
- speex_config_types.h
|
||||||
22
external/SpeexDSP/speexdsp-1.2.0/README.blackfin
vendored
Normal file
22
external/SpeexDSP/speexdsp-1.2.0/README.blackfin
vendored
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
|
||||||
11
external/SpeexDSP/speexdsp-1.2.0/README.win32
vendored
Normal file
11
external/SpeexDSP/speexdsp-1.2.0/README.win32
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
Win32 Specific options
|
||||||
|
|
||||||
|
In order to enable the following options within SpeexDSP, you will need to manually edit the project options for the appropriate VC configuration. These macros can be specified by adding them as "Preprocessor Definitions" under the appropriate Configuration's project options. If you don't know how to do this, please check your Visual C documentation.
|
||||||
|
|
||||||
|
Feature:
|
||||||
|
|
||||||
|
Intel Streaming SIMD Extensions - SSE - macro: USE_SSE
|
||||||
|
Fixed point - macro: FIXED_POINT
|
||||||
|
Epic 48 - macro: EPIC_48K
|
||||||
|
|
||||||
|
Note: USE_SSE and FIXED_POINT are mutually exclusive.
|
||||||
201
external/SpeexDSP/speexdsp-1.2.0/SpeexDSP.kdevelop
vendored
Normal file
201
external/SpeexDSP/speexdsp-1.2.0/SpeexDSP.kdevelop
vendored
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
external/SpeexDSP/speexdsp-1.2.0/SpeexDSP.spec.in
vendored
Normal file
67
external/SpeexDSP/speexdsp-1.2.0/SpeexDSP.spec.in
vendored
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
external/SpeexDSP/speexdsp-1.2.0/TODO
vendored
Normal file
32
external/SpeexDSP/speexdsp-1.2.0/TODO
vendored
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
external/SpeexDSP/speexdsp-1.2.0/acinclude.m4
vendored
Normal file
102
external/SpeexDSP/speexdsp-1.2.0/acinclude.m4
vendored
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
|
||||||
|
])
|
||||||
12
external/SpeexDSP/speexdsp-1.2.0/autogen.sh
vendored
Executable file
12
external/SpeexDSP/speexdsp-1.2.0/autogen.sh
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Run this to set up the build system: configure, makefiles, etc.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
srcdir=`dirname $0`
|
||||||
|
test -n "$srcdir" && cd "$srcdir"
|
||||||
|
|
||||||
|
echo "Updating build configuration files, please wait...."
|
||||||
|
|
||||||
|
mkdir -p m4
|
||||||
|
autoreconf -if
|
||||||
|
|
||||||
370
external/SpeexDSP/speexdsp-1.2.0/configure.ac
vendored
Normal file
370
external/SpeexDSP/speexdsp-1.2.0/configure.ac
vendored
Normal file
|
|
@ -0,0 +1,370 @@
|
||||||
|
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
|
||||||
|
|
||||||
|
AC_INIT([speexdsp],[1.2.0],[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=1
|
||||||
|
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
|
||||||
|
AS_CASE(["$host"],
|
||||||
|
[arm*], [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])
|
||||||
|
|
||||||
|
AS_IF([test "$ac_cv_header_stdint_h" = "yes"], [INCLUDE_STDINT="#include <stdint.h>"],
|
||||||
|
[test "$ac_cv_header_inttypes_h" = "yes"], [INCLUDE_STDINT="#include <inttypes.h>"],
|
||||||
|
[test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include <sys/types.h>"])
|
||||||
|
|
||||||
|
AC_SUBST([INCLUDE_STDINT])
|
||||||
|
|
||||||
|
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";
|
||||||
2
external/SpeexDSP/speexdsp-1.2.0/doc/.cvsignore
vendored
Normal file
2
external/SpeexDSP/speexdsp-1.2.0/doc/.cvsignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
3
external/SpeexDSP/speexdsp-1.2.0/doc/Makefile.am
vendored
Normal file
3
external/SpeexDSP/speexdsp-1.2.0/doc/Makefile.am
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
doc_DATA = manual.pdf
|
||||||
|
|
||||||
|
EXTRA_DIST = $(doc_DATA)
|
||||||
688
external/SpeexDSP/speexdsp-1.2.0/doc/celp_decoder.eps
vendored
Normal file
688
external/SpeexDSP/speexdsp-1.2.0/doc/celp_decoder.eps
vendored
Normal file
|
|
@ -0,0 +1,688 @@
|
||||||
|
%!PS-Adobe-3.0 EPSF-3.0
|
||||||
|
%%BoundingBox: 0 0 442 315
|
||||||
|
%%Pages: 0
|
||||||
|
%%Creator: Sun Microsystems, Inc.
|
||||||
|
%%Title: none
|
||||||
|
%%CreationDate: none
|
||||||
|
%%LanguageLevel: 2
|
||||||
|
%%EndComments
|
||||||
|
%%BeginProlog
|
||||||
|
%%BeginResource: SDRes
|
||||||
|
/b4_inc_state save def
|
||||||
|
/dict_count countdictstack def
|
||||||
|
/op_count count 1 sub def
|
||||||
|
userdict begin
|
||||||
|
0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 setdash newpath
|
||||||
|
/languagelevel where {pop languagelevel 1 ne {false setstrokeadjust false setoverprint} if} if
|
||||||
|
/bdef {bind def} bind def
|
||||||
|
/c {setgray} bdef
|
||||||
|
/l {neg lineto} bdef
|
||||||
|
/rl {neg rlineto} bdef
|
||||||
|
/lc {setlinecap} bdef
|
||||||
|
/lj {setlinejoin} bdef
|
||||||
|
/lw {setlinewidth} bdef
|
||||||
|
/ml {setmiterlimit} bdef
|
||||||
|
/ld {setdash} bdef
|
||||||
|
/m {neg moveto} bdef
|
||||||
|
/ct {6 2 roll neg 6 2 roll neg 6 2 roll neg curveto} bdef
|
||||||
|
/r {rotate} bdef
|
||||||
|
/t {neg translate} bdef
|
||||||
|
/s {scale} bdef
|
||||||
|
/sw {show} bdef
|
||||||
|
/gs {gsave} bdef
|
||||||
|
/gr {grestore} bdef
|
||||||
|
/f {findfont dup length dict begin
|
||||||
|
{1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def
|
||||||
|
currentdict end /NFont exch definefont pop /NFont findfont} bdef
|
||||||
|
/p {closepath} bdef
|
||||||
|
/sf {scalefont setfont} bdef
|
||||||
|
/ef {eofill}bdef
|
||||||
|
/pc {closepath stroke}bdef
|
||||||
|
/ps {stroke}bdef
|
||||||
|
/pum {matrix currentmatrix}bdef
|
||||||
|
/pom {setmatrix}bdef
|
||||||
|
/bs {/aString exch def /nXOfs exch def /nWidth exch def currentpoint nXOfs 0 rmoveto pum nWidth aString stringwidth pop div 1 scale aString show pom moveto} bdef
|
||||||
|
%%EndResource
|
||||||
|
%%EndProlog
|
||||||
|
%%BeginSetup
|
||||||
|
%%EndSetup
|
||||||
|
%%Page: 1 1
|
||||||
|
%%BeginPageSetup
|
||||||
|
%%EndPageSetup
|
||||||
|
pum
|
||||||
|
0.02836 0.02834 s
|
||||||
|
0 -11113 t
|
||||||
|
/tm matrix currentmatrix def
|
||||||
|
tm setmatrix
|
||||||
|
-5152 -9418 t
|
||||||
|
1 1 s
|
||||||
|
0 lw 1 lj 0.000 c 6935 14318 m 5435 14318 l 5435 10318 l 8435 10318 l
|
||||||
|
8435 14318 l 6935 14318 l pc
|
||||||
|
11436 12317 m 10934 12818 l 10936 11817 l 11436 12317 l pc
|
||||||
|
5831 11966 m 8109 11966 l ps
|
||||||
|
6425 11966 m 6425 11636 l ps
|
||||||
|
6123 11966 m 6123 12366 l ps
|
||||||
|
6727 11966 m 6727 11707 l ps
|
||||||
|
7719 11966 m 7719 11872 l ps
|
||||||
|
7070 11966 m 7070 12248 l ps
|
||||||
|
7439 11966 m 7439 11636 l ps
|
||||||
|
5830 10920 m 8108 10920 l ps
|
||||||
|
6163 10920 m 6163 10590 l ps
|
||||||
|
6470 10920 m 6470 11320 l ps
|
||||||
|
6726 10920 m 6726 10661 l ps
|
||||||
|
7109 10920 m 7109 10826 l ps
|
||||||
|
7417 10920 m 7417 11202 l ps
|
||||||
|
7699 10920 m 7699 10590 l ps
|
||||||
|
5831 10921 m 8109 10921 l ps
|
||||||
|
6164 10921 m 6164 10591 l ps
|
||||||
|
6471 10921 m 6471 11321 l ps
|
||||||
|
6727 10921 m 6727 10662 l ps
|
||||||
|
7110 10921 m 7110 10827 l ps
|
||||||
|
7418 10921 m 7418 11203 l ps
|
||||||
|
7700 10921 m 7700 10591 l ps
|
||||||
|
5857 12918 m 8135 12918 l ps
|
||||||
|
6190 12918 m 6188 12729 l ps
|
||||||
|
6497 12918 m 6497 13318 l ps
|
||||||
|
6753 12918 m 6751 13247 l ps
|
||||||
|
7136 12918 m 7136 12824 l ps
|
||||||
|
7444 12918 m 7442 12611 l ps
|
||||||
|
7796 12919 m 7794 13248 l ps
|
||||||
|
6935 17818 m 5435 17818 l 5435 15818 l 8435 15818 l 8435 17818 l 6935 17818 l
|
||||||
|
pc
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
6263 17039 t
|
||||||
|
219 -104 m 214 -66 184 -39 147 -39 ct 120 -39 99 -51 85 -74 ct 74 -92 71 -110 69 -147 ct
|
||||||
|
268 -147 l 266 -213 260 -244 245 -277 ct 224 -321 193 -341 149 -341 ct 71 -341 20 -271 20 -160 ct
|
||||||
|
20 -55 68 9 146 9 ct 208 9 252 -32 264 -104 ct 219 -104 l p
|
||||||
|
69 -192 m 72 -252 104 -292 147 -292 ct 171 -292 191 -280 203 -260 ct 214 -243 218 -226 220 -192 ct
|
||||||
|
69 -192 l p ef
|
||||||
|
362 -412 m 418 -412 l 418 -458 l 321 -458 l 321 124 l 418 124 l 418 78 l
|
||||||
|
362 78 l 362 -412 l p ef
|
||||||
|
508 -332 m 465 -332 l 465 0 l 511 0 l 511 -180 l 511 -250 539 -292 586 -292 ct
|
||||||
|
625 -292 642 -265 642 -204 ct 642 0 l 687 0 l 687 -226 l 687 -299 653 -341 595 -341 ct
|
||||||
|
558 -341 532 -324 508 -283 ct 508 -332 l p ef
|
||||||
|
870 -204 m 742 -204 l 742 -147 l 870 -147 l 870 -204 l p ef
|
||||||
|
899 -400 m 1026 -400 l 1026 0 l 1077 0 l 1077 -400 l 1204 -400 l
|
||||||
|
1204 -455 l 899 -455 l 899 -400 l p ef
|
||||||
|
1281 78 m 1225 78 l 1225 124 l 1322 124 l 1322 -458 l 1225 -458 l
|
||||||
|
1225 -412 l 1281 -412 l 1281 78 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
10410 12492 m 10410 12142 l 10935 12317 l 10410 12492 l p ef
|
||||||
|
1 lw 0 lj 8435 12318 m 9685 12318 l 9685 12317 l 10515 12317 l ps
|
||||||
|
0 lw 1 lj 11434 16817 m 10932 17318 l 10934 16317 l 11434 16817 l pc
|
||||||
|
10483 16967 m 10483 16667 l 10933 16817 l 10483 16967 l p ef
|
||||||
|
1 lw 0 lj 8435 16818 m 9684 16818 l 9684 16817 l 10573 16817 l ps
|
||||||
|
0 lw 1 lj 13085 14818 m 12947 14818 12835 14706 12835 14568 ct 12835 14430 12947 14318 13085 14318 ct
|
||||||
|
13223 14318 13335 14430 13335 14568 ct 13335 14706 13223 14818 13085 14818 ct
|
||||||
|
pc
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
12931 14791 t
|
||||||
|
133 -183 m 20 -183 l 20 -137 l 133 -137 l 133 0 l 171 0 l 171 -137 l
|
||||||
|
283 -137 l 283 -183 l 171 -183 l 171 -320 l 133 -320 l 133 -183 l
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
13234 15268 m 12934 15268 l 13084 14818 l 13234 15268 l p ef
|
||||||
|
1 lw 0 lj 11435 16817 m 13084 16817 l 13084 15178 l ps
|
||||||
|
12934 13868 m 13234 13868 l 13084 14318 l 12934 13868 l p ef
|
||||||
|
11437 12317 m 13084 12317 l 13084 13958 l ps
|
||||||
|
0 lw 1 lj 17835 15318 m 16335 15318 l 16335 13818 l 19335 13818 l 19335 15318 l
|
||||||
|
17835 15318 l pc
|
||||||
|
16668 15023 m 16778 14801 16891 14569 16925 14316 ct 16997 13766 17307 14273 17221 14551 ct
|
||||||
|
17165 14731 17523 15058 17694 14622 ct 17856 14213 18050 14912 18286 15000 ct
|
||||||
|
18489 15075 18680 14999 18878 15000 ct 18878 15000 18878 15000 19076 15047 ct
|
||||||
|
19076 15047 19076 15047 19135 15118 ct ps
|
||||||
|
15885 14718 m 15885 14418 l 16335 14568 l 15885 14718 l p ef
|
||||||
|
1 lw 0 lj 13335 14567 m 14935 14567 l 14935 14568 l 15975 14568 l ps
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
17085 13052 t
|
||||||
|
208 -214 m 206 -241 203 -254 195 -269 ct 180 -296 151 -311 114 -311 ct 84 -311 61 -302 46 -283 ct
|
||||||
|
33 -266 25 -243 25 -219 ct 25 -180 43 -156 78 -146 ct 129 -131 l 170 -120 182 -108 182 -79 ct
|
||||||
|
182 -46 158 -27 118 -27 ct 90 -27 69 -37 58 -56 ct 51 -68 49 -78 48 -98 ct 16 -98 l
|
||||||
|
17 -65 22 -48 35 -30 ct 54 -3 78 8 116 8 ct 177 8 214 -26 214 -83 ct 214 -126 195 -154 158 -164 ct
|
||||||
|
87 -184 l 67 -190 57 -202 57 -224 ct 57 -257 78 -276 114 -276 ct 137 -276 156 -267 166 -250 ct
|
||||||
|
172 -240 175 -231 176 -214 ct 208 -214 l p ef
|
||||||
|
319 -39 m 271 -221 l 236 -221 l 304 5 l 300 16 297 25 296 28 ct 289 51 284 57 271 57 ct
|
||||||
|
265 57 259 55 253 53 ct 253 87 l 255 87 l 261 90 263 90 268 90 ct 304 90 309 83 337 -4 ct
|
||||||
|
402 -221 l 368 -221 l 319 -39 l p ef
|
||||||
|
457 -221 m 428 -221 l 428 0 l 458 0 l 458 -120 l 458 -166 477 -194 508 -194 ct
|
||||||
|
534 -194 546 -176 546 -136 ct 546 0 l 576 0 l 576 -150 l 576 -199 553 -227 515 -227 ct
|
||||||
|
490 -227 472 -216 457 -188 ct 457 -221 l p ef
|
||||||
|
690 -190 m 690 -221 l 660 -221 l 660 -282 l 630 -282 l 630 -221 l
|
||||||
|
605 -221 l 605 -190 l 630 -190 l 630 -44 l 630 -12 641 2 665 2 ct 667 2 669 2 676 1 ct
|
||||||
|
678 1 683 0 689 0 ct 689 -29 l 679 -29 l 665 -29 660 -34 660 -46 ct 660 -190 l
|
||||||
|
690 -190 l p ef
|
||||||
|
751 -303 m 721 -303 l 721 0 l 751 0 l 751 -120 l 751 -167 770 -194 803 -194 ct
|
||||||
|
828 -194 839 -179 839 -144 ct 839 0 l 869 0 l 869 -150 l 869 -199 846 -227 808 -227 ct
|
||||||
|
784 -227 769 -218 751 -190 ct 751 -303 l p ef
|
||||||
|
1038 -69 m 1035 -44 1015 -26 991 -26 ct 973 -26 958 -34 950 -49 ct 942 -61 940 -73 939 -98 ct
|
||||||
|
1071 -98 l 1070 -142 1066 -162 1056 -184 ct 1042 -214 1022 -227 992 -227 ct
|
||||||
|
940 -227 906 -180 906 -106 ct 906 -36 938 6 990 6 ct 1032 6 1061 -21 1069 -69 ct
|
||||||
|
1038 -69 l p
|
||||||
|
939 -128 m 941 -167 962 -194 991 -194 ct 1007 -194 1020 -186 1028 -173 ct 1035 -162 1038 -151 1040 -128 ct
|
||||||
|
939 -128 l p ef
|
||||||
|
1242 -158 m 1240 -202 1215 -227 1174 -227 ct 1132 -227 1104 -200 1104 -157 ct
|
||||||
|
1104 -129 1118 -111 1146 -103 ct 1182 -92 l 1210 -84 1218 -77 1218 -60 ct 1218 -39 1202 -26 1175 -26 ct
|
||||||
|
1144 -26 1130 -39 1128 -71 ct 1099 -71 l 1100 -49 1102 -38 1108 -27 ct 1120 -5 1143 6 1173 6 ct
|
||||||
|
1219 6 1248 -22 1248 -66 ct 1248 -97 1234 -113 1197 -125 ct 1167 -134 l 1140 -142 1134 -148 1134 -163 ct
|
||||||
|
1134 -183 1148 -195 1172 -195 ct 1198 -195 1211 -183 1213 -158 ct 1242 -158 l
|
||||||
|
p ef
|
||||||
|
1315 -221 m 1285 -221 l 1285 0 l 1315 0 l 1315 -221 l p
|
||||||
|
1315 -261 m 1315 -303 l 1285 -303 l 1285 -261 l 1315 -261 l p ef
|
||||||
|
1492 -158 m 1490 -202 1465 -227 1424 -227 ct 1382 -227 1354 -200 1354 -157 ct
|
||||||
|
1354 -129 1368 -111 1396 -103 ct 1432 -92 l 1460 -84 1468 -77 1468 -60 ct 1468 -39 1452 -26 1425 -26 ct
|
||||||
|
1394 -26 1380 -39 1378 -71 ct 1349 -71 l 1350 -49 1352 -38 1358 -27 ct 1370 -5 1393 6 1423 6 ct
|
||||||
|
1469 6 1498 -22 1498 -66 ct 1498 -97 1484 -113 1447 -125 ct 1417 -134 l 1390 -142 1384 -148 1384 -163 ct
|
||||||
|
1384 -183 1398 -195 1422 -195 ct 1448 -195 1461 -183 1463 -158 ct 1492 -158 l
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
pum
|
||||||
|
17085 13581 t
|
||||||
|
90 -190 m 90 -221 l 60 -221 l 60 -248 l 60 -266 65 -274 78 -274 ct 81 -274 85 -274 90 -273 ct
|
||||||
|
90 -307 l 81 -307 79 -307 76 -307 ct 46 -307 30 -291 30 -259 ct 30 -221 l 4 -221 l
|
||||||
|
4 -190 l 30 -190 l 30 0 l 60 0 l 60 -190 l 90 -190 l p ef
|
||||||
|
150 -221 m 120 -221 l 120 0 l 150 0 l 150 -221 l p
|
||||||
|
150 -261 m 150 -303 l 120 -303 l 120 -261 l 150 -261 l p ef
|
||||||
|
227 -303 m 197 -303 l 197 0 l 227 0 l 227 -303 l p ef
|
||||||
|
339 -190 m 339 -221 l 309 -221 l 309 -282 l 279 -282 l 279 -221 l
|
||||||
|
254 -221 l 254 -190 l 279 -190 l 279 -44 l 279 -12 290 2 314 2 ct 316 2 318 2 325 1 ct
|
||||||
|
327 1 332 0 338 0 ct 338 -29 l 328 -29 l 314 -29 309 -34 309 -46 ct 309 -190 l
|
||||||
|
339 -190 l p ef
|
||||||
|
492 -69 m 489 -44 469 -26 445 -26 ct 427 -26 412 -34 404 -49 ct 396 -61 394 -73 393 -98 ct
|
||||||
|
525 -98 l 524 -142 520 -162 510 -184 ct 496 -214 476 -227 446 -227 ct 394 -227 360 -180 360 -106 ct
|
||||||
|
360 -36 392 6 444 6 ct 486 6 515 -21 523 -69 ct 492 -69 l p
|
||||||
|
393 -128 m 395 -167 416 -194 445 -194 ct 461 -194 474 -186 482 -173 ct 489 -162 492 -151 494 -128 ct
|
||||||
|
393 -128 l p ef
|
||||||
|
657 -188 m 657 -226 l 654 -227 651 -227 649 -227 ct 627 -227 613 -215 597 -183 ct
|
||||||
|
597 -221 l 568 -221 l 568 0 l 599 0 l 599 -129 l 599 -163 618 -188 645 -188 ct
|
||||||
|
657 -188 l p ef
|
||||||
|
878 -297 m 854 -297 l 844 -253 834 -244 789 -240 ct 789 -211 l 845 -211 l
|
||||||
|
845 0 l 878 0 l 878 -297 l p ef
|
||||||
|
1050 -311 m 1027 -311 l 943 8 l 965 8 l 1050 -311 l p ef
|
||||||
|
1211 -88 m 1235 0 l 1272 0 l 1182 -303 l 1144 -303 l 1050 0 l 1085 0 l
|
||||||
|
1111 -88 l 1211 -88 l p
|
||||||
|
1121 -125 m 1161 -259 l 1199 -125 l 1121 -125 l p ef
|
||||||
|
1360 -310 m 1316 -231 1301 -179 1301 -110 ct 1301 -42 1314 1 1361 87 ct 1381 87 l
|
||||||
|
1343 -5 1334 -42 1334 -107 ct 1334 -182 1344 -225 1381 -310 ct 1360 -310 l p ef
|
||||||
|
1552 -190 m 1552 -221 l 1412 -221 l 1412 -190 l 1513 -190 l 1403 -29 l
|
||||||
|
1403 0 l 1555 0 l 1555 -30 l 1444 -30 l 1552 -190 l p ef
|
||||||
|
1599 87 m 1642 8 1657 -43 1657 -111 ct 1657 -179 1644 -223 1598 -310 ct 1577 -310 l
|
||||||
|
1616 -217 1625 -179 1625 -115 ct 1625 -40 1615 2 1578 87 ct 1599 87 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
5708 9956 t
|
||||||
|
63 -137 m 185 -137 l 185 -174 l 63 -174 l 63 -266 l 202 -266 l 202 -303 l
|
||||||
|
30 -303 l 30 0 l 63 0 l 63 -137 l p ef
|
||||||
|
265 -221 m 235 -221 l 235 0 l 265 0 l 265 -221 l p
|
||||||
|
265 -261 m 265 -303 l 235 -303 l 235 -261 l 265 -261 l p ef
|
||||||
|
394 -113 m 455 -221 l 418 -221 l 375 -143 l 334 -221 l 294 -221 l
|
||||||
|
355 -113 l 291 0 l 330 0 l 373 -83 l 419 0 l 458 0 l 394 -113 l
|
||||||
|
p ef
|
||||||
|
606 -69 m 603 -44 583 -26 559 -26 ct 541 -26 526 -34 518 -49 ct 510 -61 508 -73 507 -98 ct
|
||||||
|
639 -98 l 638 -142 634 -162 624 -184 ct 610 -214 590 -227 560 -227 ct 508 -227 474 -180 474 -106 ct
|
||||||
|
474 -36 506 6 558 6 ct 600 6 629 -21 637 -69 ct 606 -69 l p
|
||||||
|
507 -128 m 509 -167 530 -194 559 -194 ct 575 -194 588 -186 596 -173 ct 603 -162 606 -151 608 -128 ct
|
||||||
|
507 -128 l p ef
|
||||||
|
829 -303 m 798 -303 l 798 -187 l 784 -216 768 -227 743 -227 ct 698 -227 668 -182 668 -115 ct
|
||||||
|
668 -41 699 6 747 6 ct 772 6 787 -4 800 -31 ct 800 0 l 829 0 l 829 -303 l
|
||||||
|
p
|
||||||
|
749 -194 m 780 -194 798 -162 798 -104 ct 798 -76 793 -57 782 -43 ct 773 -32 761 -26 748 -26 ct
|
||||||
|
717 -26 699 -58 699 -113 ct 699 -167 716 -194 749 -194 ct p ef
|
||||||
|
1113 -146 m 1107 -200 1085 -227 1044 -227 ct 991 -227 958 -180 958 -106 ct
|
||||||
|
958 -37 990 6 1039 6 ct 1081 6 1106 -22 1113 -78 ct 1083 -78 l 1077 -43 1062 -26 1039 -26 ct
|
||||||
|
1008 -26 991 -56 991 -109 ct 991 -163 1009 -194 1041 -194 ct 1065 -194 1078 -180 1083 -146 ct
|
||||||
|
1113 -146 l p ef
|
||||||
|
1219 -227 m 1168 -227 1134 -180 1134 -110 ct 1134 -41 1168 5 1218 5 ct 1268 5 1302 -41 1302 -110 ct
|
||||||
|
1302 -178 1268 -227 1219 -227 ct p
|
||||||
|
1219 -195 m 1250 -195 1270 -161 1270 -110 ct 1270 -59 1250 -26 1218 -26 ct
|
||||||
|
1186 -26 1165 -59 1165 -110 ct 1165 -162 1186 -195 1219 -195 ct p ef
|
||||||
|
1490 -303 m 1459 -303 l 1459 -187 l 1445 -216 1429 -227 1404 -227 ct 1359 -227 1329 -182 1329 -115 ct
|
||||||
|
1329 -41 1360 6 1408 6 ct 1433 6 1448 -4 1461 -31 ct 1461 0 l 1490 0 l 1490 -303 l
|
||||||
|
p
|
||||||
|
1410 -194 m 1441 -194 1459 -162 1459 -104 ct 1459 -76 1454 -57 1443 -43 ct
|
||||||
|
1434 -32 1422 -26 1409 -26 ct 1378 -26 1360 -58 1360 -113 ct 1360 -167 1377 -194 1410 -194 ct
|
||||||
|
p ef
|
||||||
|
1656 -69 m 1653 -44 1633 -26 1609 -26 ct 1591 -26 1576 -34 1568 -49 ct 1560 -61 1558 -73 1557 -98 ct
|
||||||
|
1689 -98 l 1688 -142 1684 -162 1674 -184 ct 1660 -214 1640 -227 1610 -227 ct
|
||||||
|
1558 -227 1524 -180 1524 -106 ct 1524 -36 1556 6 1608 6 ct 1650 6 1679 -21 1687 -69 ct
|
||||||
|
1656 -69 l p
|
||||||
|
1557 -128 m 1559 -167 1580 -194 1609 -194 ct 1625 -194 1638 -186 1646 -173 ct
|
||||||
|
1653 -162 1656 -151 1658 -128 ct 1557 -128 l p ef
|
||||||
|
1755 0 m 1755 -28 l 1768 -3 1782 6 1806 6 ct 1854 6 1885 -41 1885 -115 ct
|
||||||
|
1885 -182 1855 -227 1810 -227 ct 1788 -227 1772 -217 1756 -192 ct 1756 -303 l
|
||||||
|
1726 -303 l 1726 0 l 1755 0 l p
|
||||||
|
1805 -194 m 1837 -194 1853 -167 1853 -113 ct 1853 -58 1835 -26 1804 -26 ct
|
||||||
|
1792 -26 1780 -32 1771 -43 ct 1760 -57 1755 -76 1755 -105 ct 1755 -163 1772 -194 1805 -194 ct
|
||||||
|
p ef
|
||||||
|
1998 -227 m 1947 -227 1913 -180 1913 -110 ct 1913 -41 1947 5 1997 5 ct 2047 5 2081 -41 2081 -110 ct
|
||||||
|
2081 -178 2047 -227 1998 -227 ct p
|
||||||
|
1998 -195 m 2029 -195 2049 -161 2049 -110 ct 2049 -59 2029 -26 1997 -26 ct
|
||||||
|
1965 -26 1944 -59 1944 -110 ct 1944 -162 1965 -195 1998 -195 ct p ef
|
||||||
|
2193 -227 m 2142 -227 2108 -180 2108 -110 ct 2108 -41 2142 5 2192 5 ct 2242 5 2276 -41 2276 -110 ct
|
||||||
|
2276 -178 2242 -227 2193 -227 ct p
|
||||||
|
2193 -195 m 2224 -195 2244 -161 2244 -110 ct 2244 -59 2224 -26 2192 -26 ct
|
||||||
|
2160 -26 2139 -59 2139 -110 ct 2139 -162 2160 -195 2193 -195 ct p ef
|
||||||
|
2390 -138 m 2459 -221 l 2421 -221 l 2342 -127 l 2342 -303 l 2313 -303 l
|
||||||
|
2313 0 l 2342 0 l 2342 -83 l 2368 -111 l 2424 0 l 2463 0 l 2390 -138 l
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
5390 15539 t
|
||||||
|
165 -88 m 189 0 l 226 0 l 136 -303 l 98 -303 l 4 0 l 39 0 l 65 -88 l
|
||||||
|
165 -88 l p
|
||||||
|
75 -125 m 115 -259 l 153 -125 l 75 -125 l p ef
|
||||||
|
406 -303 m 375 -303 l 375 -187 l 361 -216 345 -227 320 -227 ct 275 -227 245 -182 245 -115 ct
|
||||||
|
245 -41 276 6 324 6 ct 349 6 364 -4 377 -31 ct 377 0 l 406 0 l 406 -303 l
|
||||||
|
p
|
||||||
|
326 -194 m 357 -194 375 -162 375 -104 ct 375 -76 370 -57 359 -43 ct 350 -32 338 -26 325 -26 ct
|
||||||
|
294 -26 276 -58 276 -113 ct 276 -167 293 -194 326 -194 ct p ef
|
||||||
|
477 -153 m 481 -184 493 -196 520 -196 ct 547 -196 562 -184 562 -159 ct 562 -143 557 -136 546 -134 ct
|
||||||
|
495 -126 l 460 -121 440 -96 440 -58 ct 440 -19 463 6 498 6 ct 524 6 543 -4 562 -29 ct
|
||||||
|
565 -5 573 4 594 4 ct 598 4 602 3 608 1 ct 610 0 610 0 612 0 ct 612 -27 l 605 -25 603 -25 601 -25 ct
|
||||||
|
595 -25 591 -30 591 -38 ct 591 -165 l 591 -204 565 -227 522 -227 ct 493 -227 472 -217 460 -198 ct
|
||||||
|
453 -186 450 -175 449 -153 ct 477 -153 l p
|
||||||
|
561 -76 m 561 -48 535 -24 504 -24 ct 484 -24 472 -38 472 -61 ct 472 -83 483 -94 511 -98 ct
|
||||||
|
546 -104 554 -107 561 -112 ct 561 -76 l p ef
|
||||||
|
642 87 m 672 87 l 672 -24 l 685 -2 699 6 722 6 ct 770 6 801 -42 801 -115 ct
|
||||||
|
801 -182 771 -227 726 -227 ct 701 -227 687 -217 671 -188 ct 671 -221 l 642 -221 l
|
||||||
|
642 87 l p
|
||||||
|
721 -194 m 752 -194 769 -166 769 -114 ct 769 -58 751 -26 720 -26 ct 690 -26 671 -55 671 -103 ct
|
||||||
|
671 -163 688 -194 721 -194 ct p ef
|
||||||
|
906 -190 m 906 -221 l 876 -221 l 876 -282 l 846 -282 l 846 -221 l
|
||||||
|
821 -221 l 821 -190 l 846 -190 l 846 -44 l 846 -12 857 2 881 2 ct 883 2 885 2 892 1 ct
|
||||||
|
894 1 899 0 905 0 ct 905 -29 l 895 -29 l 881 -29 876 -34 876 -46 ct 876 -190 l
|
||||||
|
906 -190 l p ef
|
||||||
|
967 -221 m 937 -221 l 937 0 l 967 0 l 967 -221 l p
|
||||||
|
967 -261 m 967 -303 l 937 -303 l 937 -261 l 967 -261 l p ef
|
||||||
|
1076 -39 m 1029 -221 l 993 -221 l 1059 0 l 1092 0 l 1161 -221 l 1128 -221 l
|
||||||
|
1076 -39 l p ef
|
||||||
|
1309 -69 m 1306 -44 1286 -26 1262 -26 ct 1244 -26 1229 -34 1221 -49 ct 1213 -61 1211 -73 1210 -98 ct
|
||||||
|
1342 -98 l 1341 -142 1337 -162 1327 -184 ct 1313 -214 1293 -227 1263 -227 ct
|
||||||
|
1211 -227 1177 -180 1177 -106 ct 1177 -36 1209 6 1261 6 ct 1303 6 1332 -21 1340 -69 ct
|
||||||
|
1309 -69 l p
|
||||||
|
1210 -128 m 1212 -167 1233 -194 1262 -194 ct 1278 -194 1291 -186 1299 -173 ct
|
||||||
|
1306 -162 1309 -151 1311 -128 ct 1210 -128 l p ef
|
||||||
|
1621 -146 m 1615 -200 1593 -227 1552 -227 ct 1499 -227 1466 -180 1466 -106 ct
|
||||||
|
1466 -37 1498 6 1547 6 ct 1589 6 1614 -22 1621 -78 ct 1591 -78 l 1585 -43 1570 -26 1547 -26 ct
|
||||||
|
1516 -26 1499 -56 1499 -109 ct 1499 -163 1517 -194 1549 -194 ct 1573 -194 1586 -180 1591 -146 ct
|
||||||
|
1621 -146 l p ef
|
||||||
|
1727 -227 m 1676 -227 1642 -180 1642 -110 ct 1642 -41 1676 5 1726 5 ct 1776 5 1810 -41 1810 -110 ct
|
||||||
|
1810 -178 1776 -227 1727 -227 ct p
|
||||||
|
1727 -195 m 1758 -195 1778 -161 1778 -110 ct 1778 -59 1758 -26 1726 -26 ct
|
||||||
|
1694 -26 1673 -59 1673 -110 ct 1673 -162 1694 -195 1727 -195 ct p ef
|
||||||
|
1998 -303 m 1967 -303 l 1967 -187 l 1953 -216 1937 -227 1912 -227 ct 1867 -227 1837 -182 1837 -115 ct
|
||||||
|
1837 -41 1868 6 1916 6 ct 1941 6 1956 -4 1969 -31 ct 1969 0 l 1998 0 l 1998 -303 l
|
||||||
|
p
|
||||||
|
1918 -194 m 1949 -194 1967 -162 1967 -104 ct 1967 -76 1962 -57 1951 -43 ct
|
||||||
|
1942 -32 1930 -26 1917 -26 ct 1886 -26 1868 -58 1868 -113 ct 1868 -167 1885 -194 1918 -194 ct
|
||||||
|
p ef
|
||||||
|
2164 -69 m 2161 -44 2141 -26 2117 -26 ct 2099 -26 2084 -34 2076 -49 ct 2068 -61 2066 -73 2065 -98 ct
|
||||||
|
2197 -98 l 2196 -142 2192 -162 2182 -184 ct 2168 -214 2148 -227 2118 -227 ct
|
||||||
|
2066 -227 2032 -180 2032 -106 ct 2032 -36 2064 6 2116 6 ct 2158 6 2187 -21 2195 -69 ct
|
||||||
|
2164 -69 l p
|
||||||
|
2065 -128 m 2067 -167 2088 -194 2117 -194 ct 2133 -194 2146 -186 2154 -173 ct
|
||||||
|
2161 -162 2164 -151 2166 -128 ct 2065 -128 l p ef
|
||||||
|
2263 0 m 2263 -28 l 2276 -3 2290 6 2314 6 ct 2362 6 2393 -41 2393 -115 ct
|
||||||
|
2393 -182 2363 -227 2318 -227 ct 2296 -227 2280 -217 2264 -192 ct 2264 -303 l
|
||||||
|
2234 -303 l 2234 0 l 2263 0 l p
|
||||||
|
2313 -194 m 2345 -194 2361 -167 2361 -113 ct 2361 -58 2343 -26 2312 -26 ct
|
||||||
|
2300 -26 2288 -32 2279 -43 ct 2268 -57 2263 -76 2263 -105 ct 2263 -163 2280 -194 2313 -194 ct
|
||||||
|
p ef
|
||||||
|
2506 -227 m 2455 -227 2421 -180 2421 -110 ct 2421 -41 2455 5 2505 5 ct 2555 5 2589 -41 2589 -110 ct
|
||||||
|
2589 -178 2555 -227 2506 -227 ct p
|
||||||
|
2506 -195 m 2537 -195 2557 -161 2557 -110 ct 2557 -59 2537 -26 2505 -26 ct
|
||||||
|
2473 -26 2452 -59 2452 -110 ct 2452 -162 2473 -195 2506 -195 ct p ef
|
||||||
|
2701 -227 m 2650 -227 2616 -180 2616 -110 ct 2616 -41 2650 5 2700 5 ct 2750 5 2784 -41 2784 -110 ct
|
||||||
|
2784 -178 2750 -227 2701 -227 ct p
|
||||||
|
2701 -195 m 2732 -195 2752 -161 2752 -110 ct 2752 -59 2732 -26 2700 -26 ct
|
||||||
|
2668 -26 2647 -59 2647 -110 ct 2647 -162 2668 -195 2701 -195 ct p ef
|
||||||
|
2898 -138 m 2967 -221 l 2929 -221 l 2850 -127 l 2850 -303 l 2821 -303 l
|
||||||
|
2821 0 l 2850 0 l 2850 -83 l 2876 -111 l 2932 0 l 2971 0 l 2898 -138 l
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
14016 13846 t
|
||||||
|
213 -36 m 63 -36 l 63 -137 l 199 -137 l 199 -174 l 63 -174 l 63 -266 l
|
||||||
|
211 -266 l 211 -303 l 30 -303 l 30 0 l 213 0 l 213 -36 l p ef
|
||||||
|
339 -113 m 400 -221 l 363 -221 l 320 -143 l 279 -221 l 239 -221 l
|
||||||
|
300 -113 l 236 0 l 275 0 l 318 -83 l 364 0 l 403 0 l 339 -113 l
|
||||||
|
p ef
|
||||||
|
571 -146 m 565 -200 543 -227 502 -227 ct 449 -227 416 -180 416 -106 ct 416 -37 448 6 497 6 ct
|
||||||
|
539 6 564 -22 571 -78 ct 541 -78 l 535 -43 520 -26 497 -26 ct 466 -26 449 -56 449 -109 ct
|
||||||
|
449 -163 467 -194 499 -194 ct 523 -194 536 -180 541 -146 ct 571 -146 l p ef
|
||||||
|
633 -221 m 603 -221 l 603 0 l 633 0 l 633 -221 l p
|
||||||
|
633 -261 m 633 -303 l 603 -303 l 603 -261 l 633 -261 l p ef
|
||||||
|
745 -190 m 745 -221 l 715 -221 l 715 -282 l 685 -282 l 685 -221 l
|
||||||
|
660 -221 l 660 -190 l 685 -190 l 685 -44 l 685 -12 696 2 720 2 ct 722 2 724 2 731 1 ct
|
||||||
|
733 1 738 0 744 0 ct 744 -29 l 734 -29 l 720 -29 715 -34 715 -46 ct 715 -190 l
|
||||||
|
745 -190 l p ef
|
||||||
|
803 -153 m 807 -184 819 -196 846 -196 ct 873 -196 888 -184 888 -159 ct 888 -143 883 -136 872 -134 ct
|
||||||
|
821 -126 l 786 -121 766 -96 766 -58 ct 766 -19 789 6 824 6 ct 850 6 869 -4 888 -29 ct
|
||||||
|
891 -5 899 4 920 4 ct 924 4 928 3 934 1 ct 936 0 936 0 938 0 ct 938 -27 l 931 -25 929 -25 927 -25 ct
|
||||||
|
921 -25 917 -30 917 -38 ct 917 -165 l 917 -204 891 -227 848 -227 ct 819 -227 798 -217 786 -198 ct
|
||||||
|
779 -186 776 -175 775 -153 ct 803 -153 l p
|
||||||
|
887 -76 m 887 -48 861 -24 830 -24 ct 810 -24 798 -38 798 -61 ct 798 -83 809 -94 837 -98 ct
|
||||||
|
872 -104 880 -107 887 -112 ct 887 -76 l p ef
|
||||||
|
1037 -190 m 1037 -221 l 1007 -221 l 1007 -282 l 977 -282 l 977 -221 l
|
||||||
|
952 -221 l 952 -190 l 977 -190 l 977 -44 l 977 -12 988 2 1012 2 ct 1014 2 1016 2 1023 1 ct
|
||||||
|
1025 1 1030 0 1036 0 ct 1036 -29 l 1026 -29 l 1012 -29 1007 -34 1007 -46 ct
|
||||||
|
1007 -190 l 1037 -190 l p ef
|
||||||
|
1099 -221 m 1069 -221 l 1069 0 l 1099 0 l 1099 -221 l p
|
||||||
|
1099 -261 m 1099 -303 l 1069 -303 l 1069 -261 l 1099 -261 l p ef
|
||||||
|
1219 -227 m 1168 -227 1134 -180 1134 -110 ct 1134 -41 1168 5 1218 5 ct 1268 5 1302 -41 1302 -110 ct
|
||||||
|
1302 -178 1268 -227 1219 -227 ct p
|
||||||
|
1219 -195 m 1250 -195 1270 -161 1270 -110 ct 1270 -59 1250 -26 1218 -26 ct
|
||||||
|
1186 -26 1165 -59 1165 -110 ct 1165 -162 1186 -195 1219 -195 ct p ef
|
||||||
|
1368 -221 m 1339 -221 l 1339 0 l 1369 0 l 1369 -120 l 1369 -166 1388 -194 1419 -194 ct
|
||||||
|
1445 -194 1457 -176 1457 -136 ct 1457 0 l 1487 0 l 1487 -150 l 1487 -199 1464 -227 1426 -227 ct
|
||||||
|
1401 -227 1383 -216 1368 -188 ct 1368 -221 l p ef
|
||||||
|
pom
|
||||||
|
pum
|
||||||
|
14480 14375 t
|
||||||
|
145 -69 m 142 -44 122 -26 98 -26 ct 80 -26 65 -34 57 -49 ct 49 -61 47 -73 46 -98 ct
|
||||||
|
178 -98 l 177 -142 173 -162 163 -184 ct 149 -214 129 -227 99 -227 ct 47 -227 13 -180 13 -106 ct
|
||||||
|
13 -36 45 6 97 6 ct 139 6 168 -21 176 -69 ct 145 -69 l p
|
||||||
|
46 -128 m 48 -167 69 -194 98 -194 ct 114 -194 127 -186 135 -173 ct 142 -162 145 -151 147 -128 ct
|
||||||
|
46 -128 l p ef
|
||||||
|
244 -274 m 281 -274 l 281 -305 l 217 -305 l 217 82 l 281 82 l 281 52 l
|
||||||
|
244 52 l 244 -274 l p ef
|
||||||
|
343 -221 m 314 -221 l 314 0 l 344 0 l 344 -120 l 344 -166 363 -194 394 -194 ct
|
||||||
|
420 -194 432 -176 432 -136 ct 432 0 l 462 0 l 462 -150 l 462 -199 439 -227 401 -227 ct
|
||||||
|
376 -227 358 -216 343 -188 ct 343 -221 l p ef
|
||||||
|
533 52 m 496 52 l 496 82 l 561 82 l 561 -305 l 496 -305 l 496 -274 l
|
||||||
|
533 -274 l 533 52 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
9491 13237 t
|
||||||
|
63 -137 m 185 -137 l 185 -174 l 63 -174 l 63 -266 l 202 -266 l 202 -303 l
|
||||||
|
30 -303 l 30 0 l 63 0 l 63 -137 l p ef
|
||||||
|
265 -221 m 235 -221 l 235 0 l 265 0 l 265 -221 l p
|
||||||
|
265 -261 m 265 -303 l 235 -303 l 235 -261 l 265 -261 l p ef
|
||||||
|
394 -113 m 455 -221 l 418 -221 l 375 -143 l 334 -221 l 294 -221 l
|
||||||
|
355 -113 l 291 0 l 330 0 l 373 -83 l 419 0 l 458 0 l 394 -113 l
|
||||||
|
p ef
|
||||||
|
606 -69 m 603 -44 583 -26 559 -26 ct 541 -26 526 -34 518 -49 ct 510 -61 508 -73 507 -98 ct
|
||||||
|
639 -98 l 638 -142 634 -162 624 -184 ct 610 -214 590 -227 560 -227 ct 508 -227 474 -180 474 -106 ct
|
||||||
|
474 -36 506 6 558 6 ct 600 6 629 -21 637 -69 ct 606 -69 l p
|
||||||
|
507 -128 m 509 -167 530 -194 559 -194 ct 575 -194 588 -186 596 -173 ct 603 -162 606 -151 608 -128 ct
|
||||||
|
507 -128 l p ef
|
||||||
|
829 -303 m 798 -303 l 798 -187 l 784 -216 768 -227 743 -227 ct 698 -227 668 -182 668 -115 ct
|
||||||
|
668 -41 699 6 747 6 ct 772 6 787 -4 800 -31 ct 800 0 l 829 0 l 829 -303 l
|
||||||
|
p
|
||||||
|
749 -194 m 780 -194 798 -162 798 -104 ct 798 -76 793 -57 782 -43 ct 773 -32 761 -26 748 -26 ct
|
||||||
|
717 -26 699 -58 699 -113 ct 699 -167 716 -194 749 -194 ct p ef
|
||||||
|
1113 -146 m 1107 -200 1085 -227 1044 -227 ct 991 -227 958 -180 958 -106 ct
|
||||||
|
958 -37 990 6 1039 6 ct 1081 6 1106 -22 1113 -78 ct 1083 -78 l 1077 -43 1062 -26 1039 -26 ct
|
||||||
|
1008 -26 991 -56 991 -109 ct 991 -163 1009 -194 1041 -194 ct 1065 -194 1078 -180 1083 -146 ct
|
||||||
|
1113 -146 l p ef
|
||||||
|
1219 -227 m 1168 -227 1134 -180 1134 -110 ct 1134 -41 1168 5 1218 5 ct 1268 5 1302 -41 1302 -110 ct
|
||||||
|
1302 -178 1268 -227 1219 -227 ct p
|
||||||
|
1219 -195 m 1250 -195 1270 -161 1270 -110 ct 1270 -59 1250 -26 1218 -26 ct
|
||||||
|
1186 -26 1165 -59 1165 -110 ct 1165 -162 1186 -195 1219 -195 ct p ef
|
||||||
|
1490 -303 m 1459 -303 l 1459 -187 l 1445 -216 1429 -227 1404 -227 ct 1359 -227 1329 -182 1329 -115 ct
|
||||||
|
1329 -41 1360 6 1408 6 ct 1433 6 1448 -4 1461 -31 ct 1461 0 l 1490 0 l 1490 -303 l
|
||||||
|
p
|
||||||
|
1410 -194 m 1441 -194 1459 -162 1459 -104 ct 1459 -76 1454 -57 1443 -43 ct
|
||||||
|
1434 -32 1422 -26 1409 -26 ct 1378 -26 1360 -58 1360 -113 ct 1360 -167 1377 -194 1410 -194 ct
|
||||||
|
p ef
|
||||||
|
1656 -69 m 1653 -44 1633 -26 1609 -26 ct 1591 -26 1576 -34 1568 -49 ct 1560 -61 1558 -73 1557 -98 ct
|
||||||
|
1689 -98 l 1688 -142 1684 -162 1674 -184 ct 1660 -214 1640 -227 1610 -227 ct
|
||||||
|
1558 -227 1524 -180 1524 -106 ct 1524 -36 1556 6 1608 6 ct 1650 6 1679 -21 1687 -69 ct
|
||||||
|
1656 -69 l p
|
||||||
|
1557 -128 m 1559 -167 1580 -194 1609 -194 ct 1625 -194 1638 -186 1646 -173 ct
|
||||||
|
1653 -162 1656 -151 1658 -128 ct 1557 -128 l p ef
|
||||||
|
1755 0 m 1755 -28 l 1768 -3 1782 6 1806 6 ct 1854 6 1885 -41 1885 -115 ct
|
||||||
|
1885 -182 1855 -227 1810 -227 ct 1788 -227 1772 -217 1756 -192 ct 1756 -303 l
|
||||||
|
1726 -303 l 1726 0 l 1755 0 l p
|
||||||
|
1805 -194 m 1837 -194 1853 -167 1853 -113 ct 1853 -58 1835 -26 1804 -26 ct
|
||||||
|
1792 -26 1780 -32 1771 -43 ct 1760 -57 1755 -76 1755 -105 ct 1755 -163 1772 -194 1805 -194 ct
|
||||||
|
p ef
|
||||||
|
1998 -227 m 1947 -227 1913 -180 1913 -110 ct 1913 -41 1947 5 1997 5 ct 2047 5 2081 -41 2081 -110 ct
|
||||||
|
2081 -178 2047 -227 1998 -227 ct p
|
||||||
|
1998 -195 m 2029 -195 2049 -161 2049 -110 ct 2049 -59 2029 -26 1997 -26 ct
|
||||||
|
1965 -26 1944 -59 1944 -110 ct 1944 -162 1965 -195 1998 -195 ct p ef
|
||||||
|
2193 -227 m 2142 -227 2108 -180 2108 -110 ct 2108 -41 2142 5 2192 5 ct 2242 5 2276 -41 2276 -110 ct
|
||||||
|
2276 -178 2242 -227 2193 -227 ct p
|
||||||
|
2193 -195 m 2224 -195 2244 -161 2244 -110 ct 2244 -59 2224 -26 2192 -26 ct
|
||||||
|
2160 -26 2139 -59 2139 -110 ct 2139 -162 2160 -195 2193 -195 ct p ef
|
||||||
|
2390 -138 m 2459 -221 l 2421 -221 l 2342 -127 l 2342 -303 l 2313 -303 l
|
||||||
|
2313 0 l 2342 0 l 2342 -83 l 2368 -111 l 2424 0 l 2463 0 l 2390 -138 l
|
||||||
|
p ef
|
||||||
|
2734 -221 m 2705 -221 l 2705 -188 l 2688 -217 2674 -227 2649 -227 ct 2604 -227 2574 -182 2574 -115 ct
|
||||||
|
2574 -42 2606 6 2654 6 ct 2676 6 2691 -2 2703 -24 ct 2703 -15 l 2703 11 2701 25 2695 37 ct
|
||||||
|
2687 54 2673 62 2651 62 ct 2628 62 2616 52 2610 27 ct 2580 27 l 2585 55 2591 68 2605 79 ct
|
||||||
|
2617 88 2632 93 2650 93 ct 2681 93 2705 80 2719 57 ct 2729 39 2734 17 2734 -18 ct
|
||||||
|
2734 -221 l p
|
||||||
|
2656 -194 m 2687 -194 2704 -162 2704 -104 ct 2704 -55 2686 -26 2654 -26 ct
|
||||||
|
2624 -26 2606 -58 2606 -113 ct 2606 -167 2623 -194 2656 -194 ct p ef
|
||||||
|
2805 -153 m 2809 -184 2821 -196 2848 -196 ct 2875 -196 2890 -184 2890 -159 ct
|
||||||
|
2890 -143 2885 -136 2874 -134 ct 2823 -126 l 2788 -121 2768 -96 2768 -58 ct
|
||||||
|
2768 -19 2791 6 2826 6 ct 2852 6 2871 -4 2890 -29 ct 2893 -5 2901 4 2922 4 ct 2926 4 2930 3 2936 1 ct
|
||||||
|
2938 0 2938 0 2940 0 ct 2940 -27 l 2933 -25 2931 -25 2929 -25 ct 2923 -25 2919 -30 2919 -38 ct
|
||||||
|
2919 -165 l 2919 -204 2893 -227 2850 -227 ct 2821 -227 2800 -217 2788 -198 ct
|
||||||
|
2781 -186 2778 -175 2777 -153 ct 2805 -153 l p
|
||||||
|
2889 -76 m 2889 -48 2863 -24 2832 -24 ct 2812 -24 2800 -38 2800 -61 ct 2800 -83 2811 -94 2839 -98 ct
|
||||||
|
2874 -104 2882 -107 2889 -112 ct 2889 -76 l p ef
|
||||||
|
3004 -221 m 2974 -221 l 2974 0 l 3004 0 l 3004 -221 l p
|
||||||
|
3004 -261 m 3004 -303 l 2974 -303 l 2974 -261 l 3004 -261 l p ef
|
||||||
|
3078 -221 m 3049 -221 l 3049 0 l 3079 0 l 3079 -120 l 3079 -166 3098 -194 3129 -194 ct
|
||||||
|
3155 -194 3167 -176 3167 -136 ct 3167 0 l 3197 0 l 3197 -150 l 3197 -199 3174 -227 3136 -227 ct
|
||||||
|
3111 -227 3093 -216 3078 -188 ct 3078 -221 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
9174 17762 t
|
||||||
|
165 -88 m 189 0 l 226 0 l 136 -303 l 98 -303 l 4 0 l 39 0 l 65 -88 l
|
||||||
|
165 -88 l p
|
||||||
|
75 -125 m 115 -259 l 153 -125 l 75 -125 l p ef
|
||||||
|
406 -303 m 375 -303 l 375 -187 l 361 -216 345 -227 320 -227 ct 275 -227 245 -182 245 -115 ct
|
||||||
|
245 -41 276 6 324 6 ct 349 6 364 -4 377 -31 ct 377 0 l 406 0 l 406 -303 l
|
||||||
|
p
|
||||||
|
326 -194 m 357 -194 375 -162 375 -104 ct 375 -76 370 -57 359 -43 ct 350 -32 338 -26 325 -26 ct
|
||||||
|
294 -26 276 -58 276 -113 ct 276 -167 293 -194 326 -194 ct p ef
|
||||||
|
477 -153 m 481 -184 493 -196 520 -196 ct 547 -196 562 -184 562 -159 ct 562 -143 557 -136 546 -134 ct
|
||||||
|
495 -126 l 460 -121 440 -96 440 -58 ct 440 -19 463 6 498 6 ct 524 6 543 -4 562 -29 ct
|
||||||
|
565 -5 573 4 594 4 ct 598 4 602 3 608 1 ct 610 0 610 0 612 0 ct 612 -27 l 605 -25 603 -25 601 -25 ct
|
||||||
|
595 -25 591 -30 591 -38 ct 591 -165 l 591 -204 565 -227 522 -227 ct 493 -227 472 -217 460 -198 ct
|
||||||
|
453 -186 450 -175 449 -153 ct 477 -153 l p
|
||||||
|
561 -76 m 561 -48 535 -24 504 -24 ct 484 -24 472 -38 472 -61 ct 472 -83 483 -94 511 -98 ct
|
||||||
|
546 -104 554 -107 561 -112 ct 561 -76 l p ef
|
||||||
|
642 87 m 672 87 l 672 -24 l 685 -2 699 6 722 6 ct 770 6 801 -42 801 -115 ct
|
||||||
|
801 -182 771 -227 726 -227 ct 701 -227 687 -217 671 -188 ct 671 -221 l 642 -221 l
|
||||||
|
642 87 l p
|
||||||
|
721 -194 m 752 -194 769 -166 769 -114 ct 769 -58 751 -26 720 -26 ct 690 -26 671 -55 671 -103 ct
|
||||||
|
671 -163 688 -194 721 -194 ct p ef
|
||||||
|
906 -190 m 906 -221 l 876 -221 l 876 -282 l 846 -282 l 846 -221 l
|
||||||
|
821 -221 l 821 -190 l 846 -190 l 846 -44 l 846 -12 857 2 881 2 ct 883 2 885 2 892 1 ct
|
||||||
|
894 1 899 0 905 0 ct 905 -29 l 895 -29 l 881 -29 876 -34 876 -46 ct 876 -190 l
|
||||||
|
906 -190 l p ef
|
||||||
|
967 -221 m 937 -221 l 937 0 l 967 0 l 967 -221 l p
|
||||||
|
967 -261 m 967 -303 l 937 -303 l 937 -261 l 967 -261 l p ef
|
||||||
|
1076 -39 m 1029 -221 l 993 -221 l 1059 0 l 1092 0 l 1161 -221 l 1128 -221 l
|
||||||
|
1076 -39 l p ef
|
||||||
|
1309 -69 m 1306 -44 1286 -26 1262 -26 ct 1244 -26 1229 -34 1221 -49 ct 1213 -61 1211 -73 1210 -98 ct
|
||||||
|
1342 -98 l 1341 -142 1337 -162 1327 -184 ct 1313 -214 1293 -227 1263 -227 ct
|
||||||
|
1211 -227 1177 -180 1177 -106 ct 1177 -36 1209 6 1261 6 ct 1303 6 1332 -21 1340 -69 ct
|
||||||
|
1309 -69 l p
|
||||||
|
1210 -128 m 1212 -167 1233 -194 1262 -194 ct 1278 -194 1291 -186 1299 -173 ct
|
||||||
|
1306 -162 1309 -151 1311 -128 ct 1210 -128 l p ef
|
||||||
|
1621 -146 m 1615 -200 1593 -227 1552 -227 ct 1499 -227 1466 -180 1466 -106 ct
|
||||||
|
1466 -37 1498 6 1547 6 ct 1589 6 1614 -22 1621 -78 ct 1591 -78 l 1585 -43 1570 -26 1547 -26 ct
|
||||||
|
1516 -26 1499 -56 1499 -109 ct 1499 -163 1517 -194 1549 -194 ct 1573 -194 1586 -180 1591 -146 ct
|
||||||
|
1621 -146 l p ef
|
||||||
|
1727 -227 m 1676 -227 1642 -180 1642 -110 ct 1642 -41 1676 5 1726 5 ct 1776 5 1810 -41 1810 -110 ct
|
||||||
|
1810 -178 1776 -227 1727 -227 ct p
|
||||||
|
1727 -195 m 1758 -195 1778 -161 1778 -110 ct 1778 -59 1758 -26 1726 -26 ct
|
||||||
|
1694 -26 1673 -59 1673 -110 ct 1673 -162 1694 -195 1727 -195 ct p ef
|
||||||
|
1998 -303 m 1967 -303 l 1967 -187 l 1953 -216 1937 -227 1912 -227 ct 1867 -227 1837 -182 1837 -115 ct
|
||||||
|
1837 -41 1868 6 1916 6 ct 1941 6 1956 -4 1969 -31 ct 1969 0 l 1998 0 l 1998 -303 l
|
||||||
|
p
|
||||||
|
1918 -194 m 1949 -194 1967 -162 1967 -104 ct 1967 -76 1962 -57 1951 -43 ct
|
||||||
|
1942 -32 1930 -26 1917 -26 ct 1886 -26 1868 -58 1868 -113 ct 1868 -167 1885 -194 1918 -194 ct
|
||||||
|
p ef
|
||||||
|
2164 -69 m 2161 -44 2141 -26 2117 -26 ct 2099 -26 2084 -34 2076 -49 ct 2068 -61 2066 -73 2065 -98 ct
|
||||||
|
2197 -98 l 2196 -142 2192 -162 2182 -184 ct 2168 -214 2148 -227 2118 -227 ct
|
||||||
|
2066 -227 2032 -180 2032 -106 ct 2032 -36 2064 6 2116 6 ct 2158 6 2187 -21 2195 -69 ct
|
||||||
|
2164 -69 l p
|
||||||
|
2065 -128 m 2067 -167 2088 -194 2117 -194 ct 2133 -194 2146 -186 2154 -173 ct
|
||||||
|
2161 -162 2164 -151 2166 -128 ct 2065 -128 l p ef
|
||||||
|
2263 0 m 2263 -28 l 2276 -3 2290 6 2314 6 ct 2362 6 2393 -41 2393 -115 ct
|
||||||
|
2393 -182 2363 -227 2318 -227 ct 2296 -227 2280 -217 2264 -192 ct 2264 -303 l
|
||||||
|
2234 -303 l 2234 0 l 2263 0 l p
|
||||||
|
2313 -194 m 2345 -194 2361 -167 2361 -113 ct 2361 -58 2343 -26 2312 -26 ct
|
||||||
|
2300 -26 2288 -32 2279 -43 ct 2268 -57 2263 -76 2263 -105 ct 2263 -163 2280 -194 2313 -194 ct
|
||||||
|
p ef
|
||||||
|
2506 -227 m 2455 -227 2421 -180 2421 -110 ct 2421 -41 2455 5 2505 5 ct 2555 5 2589 -41 2589 -110 ct
|
||||||
|
2589 -178 2555 -227 2506 -227 ct p
|
||||||
|
2506 -195 m 2537 -195 2557 -161 2557 -110 ct 2557 -59 2537 -26 2505 -26 ct
|
||||||
|
2473 -26 2452 -59 2452 -110 ct 2452 -162 2473 -195 2506 -195 ct p ef
|
||||||
|
2701 -227 m 2650 -227 2616 -180 2616 -110 ct 2616 -41 2650 5 2700 5 ct 2750 5 2784 -41 2784 -110 ct
|
||||||
|
2784 -178 2750 -227 2701 -227 ct p
|
||||||
|
2701 -195 m 2732 -195 2752 -161 2752 -110 ct 2752 -59 2732 -26 2700 -26 ct
|
||||||
|
2668 -26 2647 -59 2647 -110 ct 2647 -162 2668 -195 2701 -195 ct p ef
|
||||||
|
2898 -138 m 2967 -221 l 2929 -221 l 2850 -127 l 2850 -303 l 2821 -303 l
|
||||||
|
2821 0 l 2850 0 l 2850 -83 l 2876 -111 l 2932 0 l 2971 0 l 2898 -138 l
|
||||||
|
p ef
|
||||||
|
3242 -221 m 3213 -221 l 3213 -188 l 3196 -217 3182 -227 3157 -227 ct 3112 -227 3082 -182 3082 -115 ct
|
||||||
|
3082 -42 3114 6 3162 6 ct 3184 6 3199 -2 3211 -24 ct 3211 -15 l 3211 11 3209 25 3203 37 ct
|
||||||
|
3195 54 3181 62 3159 62 ct 3136 62 3124 52 3118 27 ct 3088 27 l 3093 55 3099 68 3113 79 ct
|
||||||
|
3125 88 3140 93 3158 93 ct 3189 93 3213 80 3227 57 ct 3237 39 3242 17 3242 -18 ct
|
||||||
|
3242 -221 l p
|
||||||
|
3164 -194 m 3195 -194 3212 -162 3212 -104 ct 3212 -55 3194 -26 3162 -26 ct
|
||||||
|
3132 -26 3114 -58 3114 -113 ct 3114 -167 3131 -194 3164 -194 ct p ef
|
||||||
|
3313 -153 m 3317 -184 3329 -196 3356 -196 ct 3383 -196 3398 -184 3398 -159 ct
|
||||||
|
3398 -143 3393 -136 3382 -134 ct 3331 -126 l 3296 -121 3276 -96 3276 -58 ct
|
||||||
|
3276 -19 3299 6 3334 6 ct 3360 6 3379 -4 3398 -29 ct 3401 -5 3409 4 3430 4 ct 3434 4 3438 3 3444 1 ct
|
||||||
|
3446 0 3446 0 3448 0 ct 3448 -27 l 3441 -25 3439 -25 3437 -25 ct 3431 -25 3427 -30 3427 -38 ct
|
||||||
|
3427 -165 l 3427 -204 3401 -227 3358 -227 ct 3329 -227 3308 -217 3296 -198 ct
|
||||||
|
3289 -186 3286 -175 3285 -153 ct 3313 -153 l p
|
||||||
|
3397 -76 m 3397 -48 3371 -24 3340 -24 ct 3320 -24 3308 -38 3308 -61 ct 3308 -83 3319 -94 3347 -98 ct
|
||||||
|
3382 -104 3390 -107 3397 -112 ct 3397 -76 l p ef
|
||||||
|
3512 -221 m 3482 -221 l 3482 0 l 3512 0 l 3512 -221 l p
|
||||||
|
3512 -261 m 3512 -303 l 3482 -303 l 3482 -261 l 3512 -261 l p ef
|
||||||
|
3586 -221 m 3557 -221 l 3557 0 l 3587 0 l 3587 -120 l 3587 -166 3606 -194 3637 -194 ct
|
||||||
|
3663 -194 3675 -176 3675 -136 ct 3675 0 l 3705 0 l 3705 -150 l 3705 -199 3682 -227 3644 -227 ct
|
||||||
|
3619 -227 3601 -216 3586 -188 ct 3586 -221 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
0 lw 1 lj 11185 19818 m 9435 19818 l 9435 18318 l 12935 18318 l 12935 19818 l
|
||||||
|
11185 19818 l pc
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
10523 19288 t
|
||||||
|
41 0 m 191 0 l 234 0 272 -17 297 -48 ct 332 -92 351 -157 351 -233 ct 351 -368 289 -455 193 -455 ct
|
||||||
|
41 -455 l 41 0 l p
|
||||||
|
92 -403 m 187 -403 l 259 -403 299 -341 299 -227 ct 299 -119 257 -52 190 -52 ct
|
||||||
|
92 -52 l 92 -403 l p ef
|
||||||
|
596 -104 m 591 -66 561 -39 524 -39 ct 497 -39 476 -51 462 -74 ct 451 -92 448 -110 446 -147 ct
|
||||||
|
645 -147 l 643 -213 637 -244 622 -277 ct 601 -321 570 -341 526 -341 ct 448 -341 397 -271 397 -160 ct
|
||||||
|
397 -55 445 9 523 9 ct 585 9 629 -32 641 -104 ct 596 -104 l p
|
||||||
|
446 -192 m 449 -252 481 -292 524 -292 ct 548 -292 568 -280 580 -260 ct 591 -243 595 -226 597 -192 ct
|
||||||
|
446 -192 l p ef
|
||||||
|
745 -455 m 699 -455 l 699 0 l 745 0 l 745 -455 l p ef
|
||||||
|
853 -231 m 859 -277 877 -295 917 -295 ct 958 -295 980 -276 980 -240 ct 980 -215 973 -204 956 -201 ct
|
||||||
|
880 -190 l 827 -182 798 -145 798 -87 ct 798 -29 832 9 885 9 ct 923 9 951 -6 981 -44 ct
|
||||||
|
984 -8 997 6 1028 6 ct 1035 6 1040 5 1049 1 ct 1052 0 1053 0 1055 0 ct 1055 -40 l
|
||||||
|
1045 -38 1043 -38 1039 -38 ct 1029 -38 1024 -45 1024 -57 ct 1024 -248 l 1024 -306 985 -341 920 -341 ct
|
||||||
|
878 -341 845 -326 827 -297 ct 817 -280 813 -264 811 -231 ct 853 -231 l p
|
||||||
|
979 -114 m 979 -73 940 -36 894 -36 ct 863 -36 845 -57 845 -92 ct 845 -125 862 -141 904 -148 ct
|
||||||
|
956 -157 969 -160 979 -169 ct 979 -114 l p ef
|
||||||
|
1197 -59 m 1124 -332 l 1072 -332 l 1173 8 l 1168 24 1164 38 1162 43 ct
|
||||||
|
1152 76 1144 85 1125 85 ct 1115 85 1106 83 1097 80 ct 1097 130 l 1101 132 l
|
||||||
|
1109 135 1113 135 1119 135 ct 1174 135 1182 125 1223 -6 ct 1321 -332 l 1270 -332 l
|
||||||
|
1197 -59 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
13385 18918 m 13385 19218 l 12935 19068 l 13385 18918 l p ef
|
||||||
|
1 lw 0 lj 14935 14567 m 14935 19068 l 13295 19068 l ps
|
||||||
|
7085 18268 m 6785 18268 l 6935 17818 l 7085 18268 l p ef
|
||||||
|
9435 19068 m 6935 19068 l 6935 18178 l ps
|
||||||
|
20025 14718 m 20031 14418 l 20478 14577 l 20025 14718 l p ef
|
||||||
|
19335 14568 m 20127 14568 l ps
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
10179 20249 t
|
||||||
|
63 -128 m 141 -128 l 186 -128 215 -163 215 -217 ct 215 -269 186 -303 141 -303 ct
|
||||||
|
30 -303 l 30 0 l 63 0 l 63 -128 l p
|
||||||
|
63 -268 m 131 -268 l 164 -268 181 -251 181 -216 ct 181 -181 164 -163 130 -163 ct
|
||||||
|
63 -163 l 63 -268 l p ef
|
||||||
|
282 -153 m 286 -184 298 -196 325 -196 ct 352 -196 367 -184 367 -159 ct 367 -143 362 -136 351 -134 ct
|
||||||
|
300 -126 l 265 -121 245 -96 245 -58 ct 245 -19 268 6 303 6 ct 329 6 348 -4 367 -29 ct
|
||||||
|
370 -5 378 4 399 4 ct 403 4 407 3 413 1 ct 415 0 415 0 417 0 ct 417 -27 l 410 -25 408 -25 406 -25 ct
|
||||||
|
400 -25 396 -30 396 -38 ct 396 -165 l 396 -204 370 -227 327 -227 ct 298 -227 277 -217 265 -198 ct
|
||||||
|
258 -186 255 -175 254 -153 ct 282 -153 l p
|
||||||
|
366 -76 m 366 -48 340 -24 309 -24 ct 289 -24 277 -38 277 -61 ct 277 -83 288 -94 316 -98 ct
|
||||||
|
351 -104 359 -107 366 -112 ct 366 -76 l p ef
|
||||||
|
582 -158 m 580 -202 555 -227 514 -227 ct 472 -227 444 -200 444 -157 ct 444 -129 458 -111 486 -103 ct
|
||||||
|
522 -92 l 550 -84 558 -77 558 -60 ct 558 -39 542 -26 515 -26 ct 484 -26 470 -39 468 -71 ct
|
||||||
|
439 -71 l 440 -49 442 -38 448 -27 ct 460 -5 483 6 513 6 ct 559 6 588 -22 588 -66 ct
|
||||||
|
588 -97 574 -113 537 -125 ct 507 -134 l 480 -142 474 -148 474 -163 ct 474 -183 488 -195 512 -195 ct
|
||||||
|
538 -195 551 -183 553 -158 ct 582 -158 l p ef
|
||||||
|
690 -190 m 690 -221 l 660 -221 l 660 -282 l 630 -282 l 630 -221 l
|
||||||
|
605 -221 l 605 -190 l 630 -190 l 630 -44 l 630 -12 641 2 665 2 ct 667 2 669 2 676 1 ct
|
||||||
|
678 1 683 0 689 0 ct 689 -29 l 679 -29 l 665 -29 660 -34 660 -46 ct 660 -190 l
|
||||||
|
690 -190 l p ef
|
||||||
|
950 -158 m 948 -202 923 -227 882 -227 ct 840 -227 812 -200 812 -157 ct 812 -129 826 -111 854 -103 ct
|
||||||
|
890 -92 l 918 -84 926 -77 926 -60 ct 926 -39 910 -26 883 -26 ct 852 -26 838 -39 836 -71 ct
|
||||||
|
807 -71 l 808 -49 810 -38 816 -27 ct 828 -5 851 6 881 6 ct 927 6 956 -22 956 -66 ct
|
||||||
|
956 -97 942 -113 905 -125 ct 875 -134 l 848 -142 842 -148 842 -163 ct 842 -183 856 -195 880 -195 ct
|
||||||
|
906 -195 919 -183 921 -158 ct 950 -158 l p ef
|
||||||
|
1138 0 m 1138 -221 l 1108 -221 l 1108 -99 l 1108 -54 1088 -26 1058 -26 ct
|
||||||
|
1034 -26 1023 -42 1023 -74 ct 1023 -221 l 992 -221 l 992 -62 l 992 -19 1015 6 1052 6 ct
|
||||||
|
1079 6 1093 -3 1109 -34 ct 1109 0 l 1138 0 l p ef
|
||||||
|
1213 0 m 1213 -28 l 1226 -3 1240 6 1264 6 ct 1312 6 1343 -41 1343 -115 ct
|
||||||
|
1343 -182 1313 -227 1268 -227 ct 1246 -227 1230 -217 1214 -192 ct 1214 -303 l
|
||||||
|
1184 -303 l 1184 0 l 1213 0 l p
|
||||||
|
1263 -194 m 1295 -194 1311 -167 1311 -113 ct 1311 -58 1293 -26 1262 -26 ct
|
||||||
|
1250 -26 1238 -32 1229 -43 ct 1218 -57 1213 -76 1213 -105 ct 1213 -163 1230 -194 1263 -194 ct
|
||||||
|
p ef
|
||||||
|
1449 -190 m 1449 -221 l 1419 -221 l 1419 -248 l 1419 -266 1424 -274 1437 -274 ct
|
||||||
|
1440 -274 1444 -274 1449 -273 ct 1449 -307 l 1440 -307 1438 -307 1435 -307 ct
|
||||||
|
1405 -307 1389 -291 1389 -259 ct 1389 -221 l 1363 -221 l 1363 -190 l 1389 -190 l
|
||||||
|
1389 0 l 1419 0 l 1419 -190 l 1449 -190 l p ef
|
||||||
|
1571 -188 m 1571 -226 l 1568 -227 1565 -227 1563 -227 ct 1541 -227 1527 -215 1511 -183 ct
|
||||||
|
1511 -221 l 1482 -221 l 1482 0 l 1513 0 l 1513 -129 l 1513 -163 1532 -188 1559 -188 ct
|
||||||
|
1571 -188 l p ef
|
||||||
|
1620 -153 m 1624 -184 1636 -196 1663 -196 ct 1690 -196 1705 -184 1705 -159 ct
|
||||||
|
1705 -143 1700 -136 1689 -134 ct 1638 -126 l 1603 -121 1583 -96 1583 -58 ct
|
||||||
|
1583 -19 1606 6 1641 6 ct 1667 6 1686 -4 1705 -29 ct 1708 -5 1716 4 1737 4 ct 1741 4 1745 3 1751 1 ct
|
||||||
|
1753 0 1753 0 1755 0 ct 1755 -27 l 1748 -25 1746 -25 1744 -25 ct 1738 -25 1734 -30 1734 -38 ct
|
||||||
|
1734 -165 l 1734 -204 1708 -227 1665 -227 ct 1636 -227 1615 -217 1603 -198 ct
|
||||||
|
1596 -186 1593 -175 1592 -153 ct 1620 -153 l p
|
||||||
|
1704 -76 m 1704 -48 1678 -24 1647 -24 ct 1627 -24 1615 -38 1615 -61 ct 1615 -83 1626 -94 1654 -98 ct
|
||||||
|
1689 -104 1697 -107 1704 -112 ct 1704 -76 l p ef
|
||||||
|
1787 0 m 1817 0 l 1817 -120 l 1817 -165 1836 -194 1866 -194 ct 1883 -194 1894 -179 1894 -153 ct
|
||||||
|
1894 0 l 1924 0 l 1924 -134 l 1924 -168 1943 -194 1968 -194 ct 1990 -194 2001 -177 2001 -142 ct
|
||||||
|
2001 0 l 2031 0 l 2031 -153 l 2031 -199 2009 -227 1974 -227 ct 1952 -227 1940 -219 1920 -191 ct
|
||||||
|
1908 -217 1894 -227 1872 -227 ct 1848 -227 1831 -216 1816 -188 ct 1816 -221 l
|
||||||
|
1787 -221 l 1787 0 l p ef
|
||||||
|
2198 -69 m 2195 -44 2175 -26 2151 -26 ct 2133 -26 2118 -34 2110 -49 ct 2102 -61 2100 -73 2099 -98 ct
|
||||||
|
2231 -98 l 2230 -142 2226 -162 2216 -184 ct 2202 -214 2182 -227 2152 -227 ct
|
||||||
|
2100 -227 2066 -180 2066 -106 ct 2066 -36 2098 6 2150 6 ct 2192 6 2221 -21 2229 -69 ct
|
||||||
|
2198 -69 l p
|
||||||
|
2099 -128 m 2101 -167 2122 -194 2151 -194 ct 2167 -194 2180 -186 2188 -173 ct
|
||||||
|
2195 -162 2198 -151 2200 -128 ct 2099 -128 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
tm setmatrix
|
||||||
|
0 0 t
|
||||||
|
1 1 s
|
||||||
|
0 11113 t
|
||||||
|
pom
|
||||||
|
count op_count sub {pop} repeat countdictstack dict_count sub {end} repeat b4_inc_state restore
|
||||||
|
%%PageTrailer
|
||||||
|
%%Trailer
|
||||||
|
%%EOF
|
||||||
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/celp_decoder.odg
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/celp_decoder.odg
vendored
Normal file
Binary file not shown.
1361
external/SpeexDSP/speexdsp-1.2.0/doc/components.eps
vendored
Normal file
1361
external/SpeexDSP/speexdsp-1.2.0/doc/components.eps
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/components.odg
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/components.odg
vendored
Normal file
Binary file not shown.
1298
external/SpeexDSP/speexdsp-1.2.0/doc/echo_path.eps
vendored
Normal file
1298
external/SpeexDSP/speexdsp-1.2.0/doc/echo_path.eps
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/echo_path.odg
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/echo_path.odg
vendored
Normal file
Binary file not shown.
11984
external/SpeexDSP/speexdsp-1.2.0/doc/manual.lyx
vendored
Normal file
11984
external/SpeexDSP/speexdsp-1.2.0/doc/manual.lyx
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/manual.pdf
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/manual.pdf
vendored
Normal file
Binary file not shown.
125
external/SpeexDSP/speexdsp-1.2.0/doc/programming.html
vendored
Normal file
125
external/SpeexDSP/speexdsp-1.2.0/doc/programming.html
vendored
Normal file
|
|
@ -0,0 +1,125 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Speex Programming</title>
|
||||||
|
|
||||||
|
<meta http-equiv="content-type"
|
||||||
|
content="text/html; charset=ISO-8859-1">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<h1>Speex Programming</h1>
|
||||||
|
|
||||||
|
<div align="left">
|
||||||
|
<h2>Encoding</h2>
|
||||||
|
In order to encode speech using Speex, you first need to:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>#include <speex.h></big></pre>
|
||||||
|
</blockquote>
|
||||||
|
You then need to declare a Speex bit-packing struct<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>SpeexBits bits;</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
and a Speex encoder state<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>void *enc_state;</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
The two are initialized by:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>speex_bits_init(&bits);</big></pre>
|
||||||
|
|
||||||
|
<pre><big>enc_state = speex_encoder_init(&speex_nb_mode);</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
For wideband coding, <i>speex_nb_mode</i> will be replaced by <i>speex_wb_mode</i>
|
||||||
|
. In most cases, you will need to know the frame size used by the mode you
|
||||||
|
are using. You can get that value in the <i>frame_size</i> variable with:<br>
|
||||||
|
<blockquote><big><tt>speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &frame_size);</tt></big><br>
|
||||||
|
</blockquote>
|
||||||
|
For every input frame:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>speex_bits_reset(&bits);</big></pre>
|
||||||
|
|
||||||
|
<pre><big>speex_encode(enc_state, input_frame, &bits);</big></pre>
|
||||||
|
|
||||||
|
<pre><big>nbBytes = speex_bits_write(&bits, byte_ptr, MAX_NB_BYTES);</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
where <i>input_frame</i> is a <i>(float *)</i> pointing to the beginning
|
||||||
|
of a speech frame, byte_ptr is a <i>(char *)</i> where the encoded frame will
|
||||||
|
be written, <i>MAX_NB_BYTES</i> is the maximum number of bytes that can be
|
||||||
|
written to <i>byte_ptr</i> without causing an overflow and <i>nbBytes</i>
|
||||||
|
is the number of bytes actually written to <i>byte_ptr</i> (the encoded
|
||||||
|
size in bytes).<br>
|
||||||
|
<br>
|
||||||
|
After you're done with the encoding, free all resources with:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>speex_bits_destroy(&bits);</big></pre>
|
||||||
|
|
||||||
|
<pre><big>speex_encoder_destroy(&enc_state);</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
That's about it for the encoder.<br>
|
||||||
|
|
||||||
|
<h2>Decoding</h2>
|
||||||
|
In order to encode speech using Speex, you first need to:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>#include <speex.h></big></pre>
|
||||||
|
</blockquote>
|
||||||
|
You then need to declare a Speex bit-packing struct<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>SpeexBits bits;</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
and a Speex encoder state<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>void *dec_state;</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
The two are initialized by:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>speex_bits_init(&bits);</big></pre>
|
||||||
|
|
||||||
|
<pre><big>dec_state = speex_decoder_init(&speex_nb_mode);</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
For wideband decoding, <i>speex_nb_mode</i> will be replaced by <i>speex_wb_mode</i>
|
||||||
|
. You can get that value in the <i>frame_size</i> variable with:<br>
|
||||||
|
|
||||||
|
<blockquote><big><tt>speex_decoder_ctl(dec_state, SPEEX_GET_FRAME_SIZE, &frame_size);</tt></big><br>
|
||||||
|
</blockquote>
|
||||||
|
There is also a parameter that can be set for the decoder: whether or not
|
||||||
|
to use a perceptual post-filter. This can be set by:<br>
|
||||||
|
<blockquote><big><tt>speex_decoder_ctl(dec_state, SPEEX_SET_PF, &pf);</tt></big><br>
|
||||||
|
</blockquote>
|
||||||
|
where <i>pf</i> is an <i>int</i> that with value 0 to have the post-filter
|
||||||
|
disabled and 1 to have it enabled.<br>
|
||||||
|
<br>
|
||||||
|
For every input frame:<br>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre><big>speex_bits_read_from(&bits, input_bytes, nbBytes);</big></pre>
|
||||||
|
|
||||||
|
<pre><big>speex_decode(st, &bits, output_frame, 0);</big></pre>
|
||||||
|
</blockquote>
|
||||||
|
where <i>input_bytes</i> is a <i>(char *)</i> containing the bit-stream
|
||||||
|
data received for a frame, <i>nbBytes</i> is the size (in bytes) of that
|
||||||
|
bit-stream, and <i>output_frame</i> is a <i>(float *)</i> and points to the
|
||||||
|
area where the decoded speech frame will be written. The last argument indicates
|
||||||
|
whether the frame we'd like to decode was lost. A value of 0 indicates the
|
||||||
|
normal case where bits points to the bit of the current frame. A value of
|
||||||
|
1 indicates that we don't have the bits for the current frame, in which case
|
||||||
|
the bits argument should be the same as the bits for the last correctly received
|
||||||
|
frame. When a frame is lost, the Speex decoder will do its best to "guess"
|
||||||
|
the sorrect signal.<br>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2045
external/SpeexDSP/speexdsp-1.2.0/doc/ref_shaping.eps
vendored
Normal file
2045
external/SpeexDSP/speexdsp-1.2.0/doc/ref_shaping.eps
vendored
Normal file
File diff suppressed because it is too large
Load diff
65
external/SpeexDSP/speexdsp-1.2.0/doc/sampledec.c
vendored
Normal file
65
external/SpeexDSP/speexdsp-1.2.0/doc/sampledec.c
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
#include <speex/speex.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/*The frame size in hardcoded for this sample code but it doesn't have to be*/
|
||||||
|
#define FRAME_SIZE 160
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
char *outFile;
|
||||||
|
FILE *fout;
|
||||||
|
/*Holds the audio that will be written to file (16 bits per sample)*/
|
||||||
|
short out[FRAME_SIZE];
|
||||||
|
/*Speex handle samples as float, so we need an array of floats*/
|
||||||
|
float output[FRAME_SIZE];
|
||||||
|
char cbits[200];
|
||||||
|
int nbBytes;
|
||||||
|
/*Holds the state of the decoder*/
|
||||||
|
void *state;
|
||||||
|
/*Holds bits so they can be read and written to by the Speex routines*/
|
||||||
|
SpeexBits bits;
|
||||||
|
int i, tmp;
|
||||||
|
|
||||||
|
/*Create a new decoder state in narrowband mode*/
|
||||||
|
state = speex_decoder_init(&speex_nb_mode);
|
||||||
|
|
||||||
|
/*Set the perceptual enhancement on*/
|
||||||
|
tmp=1;
|
||||||
|
speex_decoder_ctl(state, SPEEX_SET_ENH, &tmp);
|
||||||
|
|
||||||
|
outFile = argv[1];
|
||||||
|
fout = fopen(outFile, "w");
|
||||||
|
|
||||||
|
/*Initialization of the structure that holds the bits*/
|
||||||
|
speex_bits_init(&bits);
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/*Read the size encoded by sampleenc, this part will likely be
|
||||||
|
different in your application*/
|
||||||
|
fread(&nbBytes, sizeof(int), 1, stdin);
|
||||||
|
fprintf (stderr, "nbBytes: %d\n", nbBytes);
|
||||||
|
if (feof(stdin))
|
||||||
|
break;
|
||||||
|
|
||||||
|
/*Read the "packet" encoded by sampleenc*/
|
||||||
|
fread(cbits, 1, nbBytes, stdin);
|
||||||
|
/*Copy the data into the bit-stream struct*/
|
||||||
|
speex_bits_read_from(&bits, cbits, nbBytes);
|
||||||
|
|
||||||
|
/*Decode the data*/
|
||||||
|
speex_decode(state, &bits, output);
|
||||||
|
|
||||||
|
/*Copy from float to short (16 bits) for output*/
|
||||||
|
for (i=0;i<FRAME_SIZE;i++)
|
||||||
|
out[i]=output[i];
|
||||||
|
|
||||||
|
/*Write the decoded audio to file*/
|
||||||
|
fwrite(out, sizeof(short), FRAME_SIZE, fout);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Destroy the decoder state*/
|
||||||
|
speex_decoder_destroy(state);
|
||||||
|
/*Destroy the bit-stream truct*/
|
||||||
|
speex_bits_destroy(&bits);
|
||||||
|
fclose(fout);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
64
external/SpeexDSP/speexdsp-1.2.0/doc/sampleenc.c
vendored
Normal file
64
external/SpeexDSP/speexdsp-1.2.0/doc/sampleenc.c
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
#include <speex/speex.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/*The frame size in hardcoded for this sample code but it doesn't have to be*/
|
||||||
|
#define FRAME_SIZE 160
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
char *inFile;
|
||||||
|
FILE *fin;
|
||||||
|
short in[FRAME_SIZE];
|
||||||
|
float input[FRAME_SIZE];
|
||||||
|
char cbits[200];
|
||||||
|
int nbBytes;
|
||||||
|
/*Holds the state of the encoder*/
|
||||||
|
void *state;
|
||||||
|
/*Holds bits so they can be read and written to by the Speex routines*/
|
||||||
|
SpeexBits bits;
|
||||||
|
int i, tmp;
|
||||||
|
|
||||||
|
/*Create a new encoder state in narrowband mode*/
|
||||||
|
state = speex_encoder_init(&speex_nb_mode);
|
||||||
|
|
||||||
|
/*Set the quality to 8 (15 kbps)*/
|
||||||
|
tmp=8;
|
||||||
|
speex_encoder_ctl(state, SPEEX_SET_QUALITY, &tmp);
|
||||||
|
|
||||||
|
inFile = argv[1];
|
||||||
|
fin = fopen(inFile, "r");
|
||||||
|
|
||||||
|
/*Initialization of the structure that holds the bits*/
|
||||||
|
speex_bits_init(&bits);
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
/*Read a 16 bits/sample audio frame*/
|
||||||
|
fread(in, sizeof(short), FRAME_SIZE, fin);
|
||||||
|
if (feof(fin))
|
||||||
|
break;
|
||||||
|
/*Copy the 16 bits values to float so Speex can work on them*/
|
||||||
|
for (i=0;i<FRAME_SIZE;i++)
|
||||||
|
input[i]=in[i];
|
||||||
|
|
||||||
|
/*Flush all the bits in the struct so we can encode a new frame*/
|
||||||
|
speex_bits_reset(&bits);
|
||||||
|
|
||||||
|
/*Encode the frame*/
|
||||||
|
speex_encode(state, input, &bits);
|
||||||
|
/*Copy the bits to an array of char that can be written*/
|
||||||
|
nbBytes = speex_bits_write(&bits, cbits, 200);
|
||||||
|
|
||||||
|
/*Write the size of the frame first. This is what sampledec expects but
|
||||||
|
it's likely to be different in your own application*/
|
||||||
|
fwrite(&nbBytes, sizeof(int), 1, stdout);
|
||||||
|
/*Write the compressed data*/
|
||||||
|
fwrite(cbits, 1, nbBytes, stdout);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Destroy the encoder state*/
|
||||||
|
speex_encoder_destroy(state);
|
||||||
|
/*Destroy the bit-packing struct*/
|
||||||
|
speex_bits_destroy(&bits);
|
||||||
|
fclose(fin);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
3022
external/SpeexDSP/speexdsp-1.2.0/doc/speex_abs.eps
vendored
Normal file
3022
external/SpeexDSP/speexdsp-1.2.0/doc/speex_abs.eps
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/speex_abs.odg
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/speex_abs.odg
vendored
Normal file
Binary file not shown.
744
external/SpeexDSP/speexdsp-1.2.0/doc/speex_analysis.eps
vendored
Normal file
744
external/SpeexDSP/speexdsp-1.2.0/doc/speex_analysis.eps
vendored
Normal file
|
|
@ -0,0 +1,744 @@
|
||||||
|
%!PS-Adobe-3.0 EPSF-3.0
|
||||||
|
%%BoundingBox: 0 0 465 180
|
||||||
|
%%Pages: 0
|
||||||
|
%%Creator: Sun Microsystems, Inc.
|
||||||
|
%%Title: none
|
||||||
|
%%CreationDate: none
|
||||||
|
%%LanguageLevel: 2
|
||||||
|
%%EndComments
|
||||||
|
%%BeginProlog
|
||||||
|
%%BeginResource: SDRes
|
||||||
|
/b4_inc_state save def
|
||||||
|
/dict_count countdictstack def
|
||||||
|
/op_count count 1 sub def
|
||||||
|
userdict begin
|
||||||
|
0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 setdash newpath
|
||||||
|
/languagelevel where {pop languagelevel 1 ne {false setstrokeadjust false setoverprint} if} if
|
||||||
|
/bdef {bind def} bind def
|
||||||
|
/c {setgray} bdef
|
||||||
|
/l {neg lineto} bdef
|
||||||
|
/rl {neg rlineto} bdef
|
||||||
|
/lc {setlinecap} bdef
|
||||||
|
/lj {setlinejoin} bdef
|
||||||
|
/lw {setlinewidth} bdef
|
||||||
|
/ml {setmiterlimit} bdef
|
||||||
|
/ld {setdash} bdef
|
||||||
|
/m {neg moveto} bdef
|
||||||
|
/ct {6 2 roll neg 6 2 roll neg 6 2 roll neg curveto} bdef
|
||||||
|
/r {rotate} bdef
|
||||||
|
/t {neg translate} bdef
|
||||||
|
/s {scale} bdef
|
||||||
|
/sw {show} bdef
|
||||||
|
/gs {gsave} bdef
|
||||||
|
/gr {grestore} bdef
|
||||||
|
/f {findfont dup length dict begin
|
||||||
|
{1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def
|
||||||
|
currentdict end /NFont exch definefont pop /NFont findfont} bdef
|
||||||
|
/p {closepath} bdef
|
||||||
|
/sf {scalefont setfont} bdef
|
||||||
|
/ef {eofill}bdef
|
||||||
|
/pc {closepath stroke}bdef
|
||||||
|
/ps {stroke}bdef
|
||||||
|
/pum {matrix currentmatrix}bdef
|
||||||
|
/pom {setmatrix}bdef
|
||||||
|
/bs {/aString exch def /nXOfs exch def /nWidth exch def currentpoint nXOfs 0 rmoveto pum nWidth aString stringwidth pop div 1 scale aString show pom moveto} bdef
|
||||||
|
%%EndResource
|
||||||
|
%%EndProlog
|
||||||
|
%%BeginSetup
|
||||||
|
%%EndSetup
|
||||||
|
%%Page: 1 1
|
||||||
|
%%BeginPageSetup
|
||||||
|
%%EndPageSetup
|
||||||
|
pum
|
||||||
|
0.02832 0.02831 s
|
||||||
|
0 -6358 t
|
||||||
|
/tm matrix currentmatrix def
|
||||||
|
tm setmatrix
|
||||||
|
-700 -3000 t
|
||||||
|
1 1 s
|
||||||
|
50 lw 1 lj 0.000 c 3900 7000 m 3100 7000 l 3100 5500 l 4700 5500 l 4700 7000 l
|
||||||
|
3900 7000 l pc
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
3293 6460 t
|
||||||
|
47 0 m 47 -455 l 107 -455 l 107 -54 l 330 -54 l 330 0 l 47 0 l p ef
|
||||||
|
400 0 m 400 0 400 0 400 -455 ct 400 -455 400 -455 571 -455 ct 602 -455 625 -454 641 -451 ct
|
||||||
|
663 -447 682 -440 697 -429 ct 712 -419 724 -404 733 -385 ct 742 -367 747 -346 747 -323 ct
|
||||||
|
747 -285 735 -252 710 -225 ct 685 -198 641 -185 577 -185 ct 577 -185 577 -185 460 -185 ct
|
||||||
|
460 -185 460 -185 460 0 ct 460 0 460 0 400 0 ct p
|
||||||
|
460 -239 m 460 -239 460 -239 578 -239 ct 617 -239 644 -246 660 -261 ct 677 -275 685 -295 685 -322 ct
|
||||||
|
685 -341 680 -357 671 -370 ct 661 -384 648 -393 633 -397 ct 622 -400 604 -401 576 -401 ct
|
||||||
|
576 -401 576 -401 460 -401 ct 460 -401 460 -401 460 -239 ct p ef
|
||||||
|
1149 -159 m 1149 -159 1149 -159 1209 -144 ct 1196 -95 1174 -57 1141 -31 ct
|
||||||
|
1108 -5 1068 8 1021 8 ct 972 8 932 -2 901 -22 ct 870 -42 847 -71 831 -109 ct 815 -147 807 -187 807 -231 ct
|
||||||
|
807 -278 816 -320 834 -355 ct 852 -390 878 -417 911 -436 ct 945 -454 981 -463 1022 -463 ct
|
||||||
|
1067 -463 1105 -451 1136 -428 ct 1167 -405 1189 -373 1201 -331 ct 1201 -331 1201 -331 1142 -317 ct
|
||||||
|
1131 -350 1116 -374 1096 -389 ct 1076 -404 1051 -412 1020 -412 ct 985 -412 956 -404 933 -387 ct
|
||||||
|
909 -370 893 -347 883 -319 ct 874 -291 869 -261 869 -231 ct 869 -192 875 -158 886 -129 ct
|
||||||
|
897 -101 915 -79 939 -65 ct 962 -50 988 -43 1016 -43 ct 1050 -43 1078 -53 1102 -72 ct
|
||||||
|
1125 -92 1141 -121 1149 -159 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
1170 3636 t
|
||||||
|
181 -260 m 181 -260 181 -260 181 -174 ct 181 -174 181 -174 171 -174 ct 164 -201 155 -220 145 -229 ct
|
||||||
|
134 -239 120 -244 103 -244 ct 91 -244 80 -241 73 -234 ct 65 -227 61 -219 61 -211 ct
|
||||||
|
61 -201 64 -192 70 -185 ct 75 -177 87 -169 104 -161 ct 104 -161 104 -161 144 -141 ct
|
||||||
|
181 -123 200 -99 200 -69 ct 200 -47 191 -28 174 -14 ct 157 0 138 7 116 7 ct 101 7 83 4 64 -1 ct
|
||||||
|
58 -2 53 -3 49 -3 ct 45 -3 41 -1 39 3 ct 39 3 39 3 29 3 ct 29 3 29 3 29 -87 ct 29 -87 29 -87 39 -87 ct
|
||||||
|
44 -61 54 -42 68 -29 ct 83 -16 99 -9 116 -9 ct 129 -9 139 -13 147 -20 ct 155 -28 159 -37 159 -47 ct
|
||||||
|
159 -60 155 -70 146 -79 ct 137 -88 119 -98 93 -111 ct 66 -124 48 -136 40 -147 ct
|
||||||
|
32 -157 28 -171 28 -187 ct 28 -208 35 -225 49 -239 ct 63 -253 82 -260 104 -260 ct
|
||||||
|
114 -260 126 -258 140 -254 ct 149 -251 155 -250 158 -250 ct 161 -250 164 -251 165 -252 ct
|
||||||
|
167 -253 169 -256 171 -260 ct 171 -260 171 -260 181 -260 ct p ef
|
||||||
|
220 -228 m 220 -228 220 -228 298 -259 ct 298 -259 298 -259 309 -259 ct 309 -259 309 -259 309 -201 ct
|
||||||
|
322 -223 335 -238 348 -247 ct 361 -256 375 -260 389 -260 ct 414 -260 435 -250 452 -230 ct
|
||||||
|
473 -206 483 -175 483 -136 ct 483 -92 471 -56 446 -28 ct 425 -5 400 7 369 7 ct
|
||||||
|
355 7 343 5 334 1 ct 326 -2 318 -7 309 -16 ct 309 -16 309 -16 309 63 ct 309 80 310 91 312 96 ct
|
||||||
|
314 100 318 104 323 107 ct 329 110 338 111 352 111 ct 352 111 352 111 352 121 ct
|
||||||
|
352 121 352 121 217 121 ct 217 121 217 121 217 111 ct 217 111 217 111 224 111 ct
|
||||||
|
234 111 243 109 251 105 ct 254 103 257 100 259 95 ct 261 91 262 79 262 61 ct 262 61 262 61 262 -179 ct
|
||||||
|
262 -195 261 -205 260 -209 ct 258 -213 256 -216 253 -219 ct 250 -221 245 -222 240 -222 ct
|
||||||
|
236 -222 230 -221 223 -218 ct 223 -218 223 -218 220 -228 ct p
|
||||||
|
309 -185 m 309 -185 309 -185 309 -90 ct 309 -70 310 -57 311 -50 ct 314 -40 320 -30 330 -22 ct
|
||||||
|
340 -14 353 -10 368 -10 ct 386 -10 401 -17 412 -31 ct 427 -50 434 -77 434 -111 ct
|
||||||
|
434 -149 426 -179 409 -200 ct 397 -214 383 -221 367 -221 ct 359 -221 350 -219 341 -214 ct
|
||||||
|
335 -211 324 -201 309 -185 ct p ef
|
||||||
|
564 -158 m 564 -121 573 -92 591 -71 ct 609 -50 630 -39 655 -39 ct 671 -39 686 -43 698 -52 ct
|
||||||
|
710 -61 720 -77 728 -99 ct 728 -99 728 -99 737 -94 ct 733 -68 722 -45 703 -24 ct
|
||||||
|
685 -3 662 7 634 7 ct 604 7 578 -5 556 -28 ct 535 -52 524 -83 524 -123 ct 524 -166 535 -200 557 -224 ct
|
||||||
|
579 -248 607 -260 640 -260 ct 668 -260 692 -251 710 -232 ct 728 -214 737 -189 737 -158 ct
|
||||||
|
737 -158 737 -158 564 -158 ct p
|
||||||
|
564 -174 m 564 -174 564 -174 680 -174 ct 679 -190 677 -201 674 -208 ct 670 -218 663 -226 654 -231 ct
|
||||||
|
645 -237 635 -240 626 -240 ct 610 -240 597 -234 585 -223 ct 573 -211 566 -195 564 -174 ct
|
||||||
|
p ef
|
||||||
|
814 -158 m 814 -121 823 -92 841 -71 ct 859 -50 880 -39 905 -39 ct 921 -39 936 -43 948 -52 ct
|
||||||
|
960 -61 970 -77 978 -99 ct 978 -99 978 -99 987 -94 ct 983 -68 972 -45 953 -24 ct
|
||||||
|
935 -3 912 7 884 7 ct 854 7 828 -5 806 -28 ct 785 -52 774 -83 774 -123 ct 774 -166 785 -200 807 -224 ct
|
||||||
|
829 -248 857 -260 890 -260 ct 918 -260 942 -251 960 -232 ct 978 -214 987 -189 987 -158 ct
|
||||||
|
987 -158 987 -158 814 -158 ct p
|
||||||
|
814 -174 m 814 -174 814 -174 930 -174 ct 929 -190 927 -201 924 -208 ct 920 -218 913 -226 904 -231 ct
|
||||||
|
895 -237 885 -240 876 -240 ct 860 -240 847 -234 835 -223 ct 823 -211 816 -195 814 -174 ct
|
||||||
|
p ef
|
||||||
|
1236 -95 m 1229 -62 1216 -37 1196 -19 ct 1176 -2 1154 7 1130 7 ct 1101 7 1076 -5 1055 -29 ct
|
||||||
|
1034 -53 1023 -85 1023 -126 ct 1023 -166 1035 -198 1058 -223 ct 1082 -248 1111 -260 1144 -260 ct
|
||||||
|
1169 -260 1189 -253 1205 -240 ct 1221 -227 1229 -214 1229 -199 ct 1229 -192 1227 -187 1222 -182 ct
|
||||||
|
1218 -178 1211 -176 1203 -176 ct 1193 -176 1185 -180 1179 -187 ct 1176 -190 1174 -198 1173 -209 ct
|
||||||
|
1172 -220 1168 -228 1161 -234 ct 1155 -239 1146 -242 1135 -242 ct 1116 -242 1102 -235 1090 -222 ct
|
||||||
|
1075 -204 1068 -180 1068 -150 ct 1068 -120 1075 -94 1090 -71 ct 1105 -48 1125 -36 1150 -36 ct
|
||||||
|
1168 -36 1184 -42 1199 -54 ct 1209 -62 1218 -77 1228 -99 ct 1228 -99 1228 -99 1236 -95 ct
|
||||||
|
p ef
|
||||||
|
1345 -392 m 1345 -392 1345 -392 1345 -208 ct 1365 -230 1381 -244 1393 -251 ct
|
||||||
|
1405 -257 1417 -260 1429 -260 ct 1443 -260 1456 -256 1466 -248 ct 1476 -240 1484 -228 1489 -211 ct
|
||||||
|
1492 -199 1494 -178 1494 -146 ct 1494 -146 1494 -146 1494 -57 ct 1494 -41 1495 -30 1498 -24 ct
|
||||||
|
1500 -20 1503 -16 1507 -14 ct 1511 -11 1519 -10 1531 -10 ct 1531 -10 1531 -10 1531 0 ct
|
||||||
|
1531 0 1531 0 1407 0 ct 1407 0 1407 0 1407 -10 ct 1407 -10 1407 -10 1413 -10 ct
|
||||||
|
1425 -10 1433 -12 1437 -15 ct 1442 -19 1445 -24 1447 -31 ct 1448 -34 1448 -43 1448 -57 ct
|
||||||
|
1448 -57 1448 -57 1448 -147 ct 1448 -174 1447 -192 1444 -201 ct 1441 -210 1436 -216 1430 -221 ct
|
||||||
|
1424 -225 1417 -227 1408 -227 ct 1399 -227 1389 -225 1380 -220 ct 1370 -215 1359 -205 1345 -191 ct
|
||||||
|
1345 -191 1345 -191 1345 -57 ct 1345 -40 1346 -29 1348 -25 ct 1350 -21 1353 -17 1359 -14 ct
|
||||||
|
1364 -11 1373 -10 1386 -10 ct 1386 -10 1386 -10 1386 0 ct 1386 0 1386 0 1262 0 ct
|
||||||
|
1262 0 1262 0 1262 -10 ct 1273 -10 1281 -12 1287 -15 ct 1291 -17 1294 -21 1296 -26 ct
|
||||||
|
1298 -31 1299 -41 1299 -57 ct 1299 -57 1299 -57 1299 -286 ct 1299 -314 1298 -332 1297 -338 ct
|
||||||
|
1296 -345 1294 -349 1291 -352 ct 1288 -354 1284 -355 1279 -355 ct 1276 -355 1269 -354 1261 -351 ct
|
||||||
|
1261 -351 1261 -351 1257 -361 ct 1257 -361 1257 -361 1332 -392 ct 1332 -392 1332 -392 1345 -392 ct
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
1286 4263 t
|
||||||
|
117 -233 m 117 -233 117 -233 117 -67 ct 117 -43 120 -28 125 -22 ct 132 -14 141 -10 152 -10 ct
|
||||||
|
152 -10 152 -10 175 -10 ct 175 -10 175 -10 175 0 ct 175 0 175 0 24 0 ct 24 0 24 0 24 -10 ct
|
||||||
|
24 -10 24 -10 35 -10 ct 43 -10 49 -12 55 -16 ct 61 -19 65 -24 68 -30 ct 70 -37 71 -49 71 -67 ct
|
||||||
|
71 -67 71 -67 71 -233 ct 71 -233 71 -233 22 -233 ct 22 -233 22 -233 22 -253 ct
|
||||||
|
22 -253 22 -253 71 -253 ct 71 -253 71 -253 71 -270 ct 71 -295 75 -316 83 -334 ct
|
||||||
|
91 -351 104 -365 120 -376 ct 137 -387 156 -392 177 -392 ct 196 -392 214 -386 230 -373 ct
|
||||||
|
241 -365 246 -355 246 -345 ct 246 -340 244 -334 239 -329 ct 234 -324 229 -322 223 -322 ct
|
||||||
|
219 -322 215 -324 210 -327 ct 205 -330 200 -336 193 -346 ct 186 -356 180 -363 174 -367 ct
|
||||||
|
168 -370 162 -372 155 -372 ct 147 -372 139 -370 134 -365 ct 128 -361 123 -354 121 -344 ct
|
||||||
|
118 -335 117 -310 117 -271 ct 117 -271 117 -271 117 -253 ct 117 -253 117 -253 182 -253 ct
|
||||||
|
182 -253 182 -253 182 -233 ct 182 -233 182 -233 117 -233 ct p ef
|
||||||
|
283 -260 m 283 -260 283 -260 283 -203 ct 304 -241 326 -260 348 -260 ct 358 -260 366 -257 373 -251 ct
|
||||||
|
380 -245 383 -238 383 -230 ct 383 -222 381 -216 376 -211 ct 371 -206 365 -204 359 -204 ct
|
||||||
|
352 -204 345 -207 337 -214 ct 329 -220 323 -223 319 -223 ct 316 -223 312 -221 309 -217 ct
|
||||||
|
300 -210 292 -198 283 -180 ct 283 -180 283 -180 283 -59 ct 283 -45 285 -34 288 -27 ct
|
||||||
|
291 -22 295 -18 301 -15 ct 307 -12 316 -10 328 -10 ct 328 -10 328 -10 328 0 ct
|
||||||
|
328 0 328 0 196 0 ct 196 0 196 0 196 -10 ct 209 -10 219 -12 226 -16 ct 230 -19 234 -24 236 -30 ct
|
||||||
|
237 -33 237 -42 237 -57 ct 237 -57 237 -57 237 -154 ct 237 -184 236 -201 235 -207 ct
|
||||||
|
234 -213 232 -217 229 -219 ct 226 -222 222 -223 217 -223 ct 211 -223 205 -222 198 -219 ct
|
||||||
|
198 -219 198 -219 195 -229 ct 195 -229 195 -229 271 -260 ct 271 -260 271 -260 283 -260 ct
|
||||||
|
p ef
|
||||||
|
538 -37 m 512 -17 496 -5 489 -2 ct 479 3 469 5 457 5 ct 440 5 425 -1 414 -13 ct
|
||||||
|
403 -25 397 -40 397 -60 ct 397 -72 400 -83 405 -92 ct 413 -104 426 -116 445 -127 ct
|
||||||
|
463 -138 495 -151 538 -167 ct 538 -167 538 -167 538 -177 ct 538 -202 534 -219 526 -228 ct
|
||||||
|
518 -237 507 -242 491 -242 ct 480 -242 471 -239 464 -233 ct 457 -226 453 -219 453 -211 ct
|
||||||
|
453 -211 453 -211 454 -195 ct 454 -187 452 -180 447 -176 ct 443 -171 437 -169 430 -169 ct
|
||||||
|
424 -169 418 -171 414 -176 ct 409 -181 407 -188 407 -196 ct 407 -212 415 -227 431 -240 ct
|
||||||
|
447 -253 470 -260 499 -260 ct 521 -260 540 -256 554 -249 ct 565 -243 573 -234 578 -222 ct
|
||||||
|
581 -214 583 -198 583 -174 ct 583 -174 583 -174 583 -89 ct 583 -65 583 -50 584 -45 ct
|
||||||
|
585 -39 587 -36 589 -34 ct 591 -32 593 -31 596 -31 ct 599 -31 602 -32 604 -33 ct
|
||||||
|
608 -35 615 -42 626 -53 ct 626 -53 626 -53 626 -38 ct 606 -10 586 4 568 4 ct 559 4 551 1 546 -5 ct
|
||||||
|
541 -11 538 -22 538 -37 ct p
|
||||||
|
538 -54 m 538 -54 538 -54 538 -149 ct 510 -138 492 -130 484 -126 ct 469 -118 459 -110 452 -101 ct
|
||||||
|
446 -92 443 -83 443 -72 ct 443 -59 447 -49 455 -40 ct 463 -31 472 -27 482 -27 ct
|
||||||
|
497 -27 515 -36 538 -54 ct p ef
|
||||||
|
720 -206 m 738 -225 749 -235 752 -238 ct 761 -245 769 -250 779 -254 ct 789 -258 798 -260 807 -260 ct
|
||||||
|
823 -260 837 -255 848 -246 ct 859 -237 867 -224 871 -206 ct 890 -228 906 -243 919 -250 ct
|
||||||
|
932 -257 945 -260 959 -260 ct 972 -260 984 -257 994 -250 ct 1005 -243 1013 -232 1019 -216 ct
|
||||||
|
1023 -205 1025 -188 1025 -166 ct 1025 -166 1025 -166 1025 -57 ct 1025 -41 1026 -30 1028 -25 ct
|
||||||
|
1030 -21 1034 -17 1038 -14 ct 1043 -11 1051 -10 1062 -10 ct 1062 -10 1062 -10 1062 0 ct
|
||||||
|
1062 0 1062 0 938 0 ct 938 0 938 0 938 -10 ct 938 -10 938 -10 943 -10 ct 954 -10 963 -12 969 -16 ct
|
||||||
|
973 -19 976 -24 978 -30 ct 979 -33 979 -42 979 -57 ct 979 -57 979 -57 979 -166 ct
|
||||||
|
979 -186 977 -201 972 -209 ct 964 -221 953 -227 937 -227 ct 928 -227 918 -225 908 -220 ct
|
||||||
|
898 -215 886 -206 873 -193 ct 873 -193 873 -193 872 -189 ct 872 -189 872 -189 873 -178 ct
|
||||||
|
873 -178 873 -178 873 -57 ct 873 -40 874 -29 876 -25 ct 878 -21 881 -17 887 -14 ct
|
||||||
|
892 -11 901 -10 914 -10 ct 914 -10 914 -10 914 0 ct 914 0 914 0 786 0 ct 786 0 786 0 786 -10 ct
|
||||||
|
800 -10 810 -12 815 -15 ct 820 -18 824 -23 826 -30 ct 827 -33 827 -42 827 -57 ct
|
||||||
|
827 -57 827 -57 827 -166 ct 827 -186 824 -201 818 -210 ct 810 -221 799 -227 784 -227 ct
|
||||||
|
774 -227 765 -224 755 -219 ct 740 -211 728 -202 720 -193 ct 720 -193 720 -193 720 -57 ct
|
||||||
|
720 -41 721 -30 723 -25 ct 726 -20 729 -16 734 -14 ct 738 -11 747 -10 761 -10 ct
|
||||||
|
761 -10 761 -10 761 0 ct 761 0 761 0 637 0 ct 637 0 637 0 637 -10 ct 648 -10 656 -11 660 -14 ct
|
||||||
|
665 -16 668 -20 671 -26 ct 673 -31 674 -41 674 -57 ct 674 -57 674 -57 674 -154 ct
|
||||||
|
674 -182 673 -199 672 -207 ct 670 -213 668 -217 666 -220 ct 663 -222 659 -223 654 -223 ct
|
||||||
|
649 -223 643 -222 636 -219 ct 636 -219 636 -219 632 -229 ct 632 -229 632 -229 708 -260 ct
|
||||||
|
708 -260 708 -260 720 -260 ct 720 -260 720 -260 720 -206 ct p ef
|
||||||
|
1114 -158 m 1114 -121 1123 -92 1141 -71 ct 1159 -50 1180 -39 1205 -39 ct 1221 -39 1236 -43 1248 -52 ct
|
||||||
|
1260 -61 1270 -77 1278 -99 ct 1278 -99 1278 -99 1287 -94 ct 1283 -68 1272 -45 1253 -24 ct
|
||||||
|
1235 -3 1212 7 1184 7 ct 1154 7 1128 -5 1106 -28 ct 1085 -52 1074 -83 1074 -123 ct
|
||||||
|
1074 -166 1085 -200 1107 -224 ct 1129 -248 1157 -260 1190 -260 ct 1218 -260 1242 -251 1260 -232 ct
|
||||||
|
1278 -214 1287 -189 1287 -158 ct 1287 -158 1287 -158 1114 -158 ct p
|
||||||
|
1114 -174 m 1114 -174 1114 -174 1230 -174 ct 1229 -190 1227 -201 1224 -208 ct
|
||||||
|
1220 -218 1213 -226 1204 -231 ct 1195 -237 1185 -240 1176 -240 ct 1160 -240 1147 -234 1135 -223 ct
|
||||||
|
1123 -211 1116 -195 1114 -174 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
3100 6250 m 2538 6438 l 2538 6063 l 3100 6250 l p ef
|
||||||
|
1975 4500 m 1975 6250 l 1950 6250 l 1925 6250 l 1925 4500 l 1950 4500 l
|
||||||
|
1975 4500 l p ef
|
||||||
|
1950 6250 m 1950 6275 l 1946 6275 l 1941 6273 l 1938 6272 l 1934 6269 l
|
||||||
|
1931 6266 l 1928 6263 l 1927 6259 l 1925 6254 l 1925 6250 l 1925 6250 l
|
||||||
|
1950 6250 l p ef
|
||||||
|
1950 6225 m 2650 6225 l 2650 6250 l 2650 6275 l 1950 6275 l 1950 6250 l
|
||||||
|
1950 6225 l p ef
|
||||||
|
gs
|
||||||
|
4635 7681 m 6248 7681 l 6248 9206 l 4635 9206 l 4635 7681 l eoclip newpath
|
||||||
|
gs
|
||||||
|
tm setmatrix
|
||||||
|
3942 4683 t
|
||||||
|
1 1 s
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
0 0 m 1613 0 l 1613 1525 l 0 1525 l 0 0 l eoclip newpath
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
661 556 t
|
||||||
|
74 -379 m 74 -379 74 -379 176 -429 ct 176 -429 176 -429 186 -429 ct 186 -429 186 -429 186 -74 ct
|
||||||
|
186 -50 187 -36 189 -30 ct 191 -24 195 -19 201 -16 ct 207 -13 220 -11 239 -11 ct
|
||||||
|
239 -11 239 -11 239 0 ct 239 0 239 0 82 0 ct 82 0 82 0 82 -11 ct 101 -11 114 -13 120 -16 ct
|
||||||
|
125 -19 129 -23 132 -28 ct 134 -33 135 -49 135 -74 ct 135 -74 135 -74 135 -301 ct
|
||||||
|
135 -331 134 -351 132 -359 ct 130 -366 128 -371 124 -374 ct 120 -377 116 -379 110 -379 ct
|
||||||
|
103 -379 92 -375 79 -369 ct 79 -369 79 -369 74 -379 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
132 741 m 1350 0 rl 0 31 rl 1350 neg 0 rl ef p ef
|
||||||
|
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
238 1376 t
|
||||||
|
328 -430 m 328 -430 328 -430 296 -80 ct 294 -64 294 -53 294 -48 ct 294 -40 295 -33 298 -29 ct
|
||||||
|
302 -23 307 -18 314 -15 ct 321 -12 332 -11 348 -11 ct 348 -11 348 -11 345 0 ct
|
||||||
|
345 0 345 0 180 0 ct 180 0 180 0 184 -11 ct 184 -11 184 -11 191 -11 ct 204 -11 215 -14 224 -20 ct
|
||||||
|
230 -24 234 -30 238 -39 ct 240 -46 242 -61 244 -85 ct 244 -85 244 -85 249 -138 ct
|
||||||
|
249 -138 249 -138 128 -138 ct 128 -138 128 -138 86 -80 ct 76 -67 70 -57 67 -52 ct
|
||||||
|
65 -46 64 -41 64 -36 ct 64 -29 66 -24 72 -19 ct 77 -14 86 -11 98 -11 ct 98 -11 98 -11 95 0 ct
|
||||||
|
95 0 95 0 -30 0 ct -30 0 -30 0 -27 -11 ct -12 -12 2 -17 14 -26 ct 25 -36 43 -57 66 -88 ct
|
||||||
|
66 -88 66 -88 317 -430 ct 317 -430 317 -430 328 -430 ct p
|
||||||
|
268 -327 m 144 -159 l 251 -159 l 268 -327 l p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
661 1376 t
|
||||||
|
168 131 m 127 98 96 50 75 -12 ct 56 -66 47 -123 47 -183 ct 47 -241 56 -298 75 -354 ct
|
||||||
|
98 -419 128 -467 168 -497 ct 168 -497 168 -497 168 -481 ct 139 -454 116 -408 101 -342 ct
|
||||||
|
89 -290 83 -237 83 -183 ct 83 -129 89 -76 101 -24 ct 116 43 139 89 168 116 ct 168 116 168 116 168 131 ct
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
953 1376 t
|
||||||
|
54 -273 m 54 -273 54 -273 249 -273 ct 249 -273 249 -273 249 -265 ct 249 -265 249 -265 35 -42 ct
|
||||||
|
35 -42 35 -42 125 -42 ct 147 -42 161 -43 166 -44 ct 172 -46 178 -50 183 -55 ct
|
||||||
|
187 -60 193 -70 199 -84 ct 199 -84 199 -84 210 -84 ct 210 -84 210 -84 183 0 ct
|
||||||
|
183 0 183 0 -18 0 ct -18 0 -18 0 -18 -9 ct -18 -9 -18 -9 196 -232 ct 196 -232 196 -232 109 -232 ct
|
||||||
|
90 -232 78 -232 74 -231 ct 68 -229 63 -226 57 -221 ct 51 -216 45 -208 39 -196 ct
|
||||||
|
39 -196 39 -196 28 -196 ct 28 -196 28 -196 54 -273 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
1270 1376 t
|
||||||
|
33 116 m 61 90 82 46 97 -18 ct 110 -70 117 -120 117 -170 ct 117 -229 111 -284 100 -335 ct
|
||||||
|
86 -404 63 -453 33 -481 ct 33 -481 33 -481 33 -497 ct 72 -468 103 -421 125 -354 ct
|
||||||
|
143 -299 153 -241 153 -183 ct 153 -123 144 -66 125 -11 ct 103 54 72 102 33 131 ct
|
||||||
|
33 131 33 131 33 116 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
5400 9300 m 4400 9300 l 4400 7500 l 6400 7500 l 6400 9300 l 5400 9300 l
|
||||||
|
pc
|
||||||
|
7700 7000 m 6800 7000 l 6800 5500 l 8600 5500 l 8600 7000 l 7700 7000 l
|
||||||
|
pc
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
7102 6460 t
|
||||||
|
47 0 m 47 -455 l 107 -455 l 107 -54 l 330 -54 l 330 0 l 47 0 l p ef
|
||||||
|
380 -146 m 380 -146 380 -146 437 -151 ct 440 -128 446 -110 456 -95 ct 465 -80 481 -69 501 -60 ct
|
||||||
|
522 -51 545 -46 571 -46 ct 593 -46 614 -49 631 -56 ct 649 -63 662 -72 670 -84 ct
|
||||||
|
679 -96 683 -109 683 -123 ct 683 -138 679 -150 670 -161 ct 662 -171 648 -180 629 -187 ct
|
||||||
|
617 -192 590 -200 549 -210 ct 507 -220 478 -229 461 -238 ct 440 -249 424 -264 413 -280 ct
|
||||||
|
402 -297 397 -316 397 -337 ct 397 -360 404 -382 416 -402 ct 429 -422 448 -437 473 -447 ct
|
||||||
|
498 -458 526 -463 557 -463 ct 590 -463 620 -458 646 -447 ct 671 -436 691 -420 705 -399 ct
|
||||||
|
719 -378 726 -354 727 -327 ct 727 -327 727 -327 669 -323 ct 666 -351 656 -373 638 -387 ct
|
||||||
|
620 -402 594 -409 559 -409 ct 523 -409 496 -402 480 -389 ct 463 -376 455 -360 455 -341 ct
|
||||||
|
455 -324 461 -311 473 -300 ct 484 -290 514 -279 563 -268 ct 611 -257 645 -247 663 -239 ct
|
||||||
|
690 -227 709 -211 722 -193 ct 735 -174 741 -153 741 -128 ct 741 -104 734 -81 720 -60 ct
|
||||||
|
706 -38 687 -22 661 -10 ct 635 2 606 8 573 8 ct 532 8 498 2 470 -10 ct 442 -22 421 -40 405 -64 ct
|
||||||
|
389 -88 381 -116 380 -146 ct p ef
|
||||||
|
824 0 m 824 0 824 0 824 -455 ct 824 -455 824 -455 995 -455 ct 1026 -455 1049 -454 1065 -451 ct
|
||||||
|
1087 -447 1106 -440 1121 -429 ct 1136 -419 1148 -404 1157 -385 ct 1166 -367 1171 -346 1171 -323 ct
|
||||||
|
1171 -285 1159 -252 1134 -225 ct 1109 -198 1065 -185 1001 -185 ct 1001 -185 1001 -185 884 -185 ct
|
||||||
|
884 -185 884 -185 884 0 ct 884 0 884 0 824 0 ct p
|
||||||
|
884 -239 m 884 -239 884 -239 1002 -239 ct 1041 -239 1068 -246 1084 -261 ct
|
||||||
|
1101 -275 1109 -295 1109 -322 ct 1109 -341 1104 -357 1095 -370 ct 1085 -384 1072 -393 1057 -397 ct
|
||||||
|
1046 -400 1028 -401 1000 -401 ct 1000 -401 1000 -401 884 -401 ct 884 -401 884 -401 884 -239 ct
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
6800 6250 m 6238 6438 l 6238 6063 l 6800 6250 l p ef
|
||||||
|
4700 6225 m 6350 6225 l 6350 6275 l 4700 6275 l 4700 6225 l p ef
|
||||||
|
4400 8400 m 3988 8538 l 3988 8263 l 4400 8400 l p ef
|
||||||
|
4070 8425 m 1950 8425 l 1950 8400 l 1950 8375 l 4070 8375 l 4070 8400 l
|
||||||
|
4070 8425 l p ef
|
||||||
|
1950 8400 m 1950 8425 l 1946 8425 l 1941 8423 l 1938 8422 l 1934 8419 l
|
||||||
|
1931 8416 l 1928 8413 l 1927 8409 l 1925 8404 l 1925 8400 l 1925 8400 l
|
||||||
|
1950 8400 l p ef
|
||||||
|
1925 8400 m 1925 4500 l 1950 4500 l 1975 4500 l 1975 8400 l 1950 8400 l
|
||||||
|
1925 8400 l p ef
|
||||||
|
1950 4500 m 1950 4500 l 1950 4500 l 1950 4500 l 1950 4500 l 1950 4500 l
|
||||||
|
1950 4500 l p ef
|
||||||
|
5400 7500 m 5213 6938 l 5588 6938 l 5400 7500 l p ef
|
||||||
|
4700 6225 m 5400 6225 l 5400 6250 l 5400 6275 l 4700 6275 l 4700 6250 l
|
||||||
|
4700 6225 l p ef
|
||||||
|
5400 6250 m 5400 6225 l 5404 6225 l 5409 6227 l 5412 6228 l 5416 6231 l
|
||||||
|
5419 6234 l 5422 6237 l 5423 6241 l 5425 6246 l 5425 6250 l 5425 6250 l
|
||||||
|
5400 6250 l p ef
|
||||||
|
5425 6250 m 5425 7050 l 5400 7050 l 5375 7050 l 5375 6250 l 5400 6250 l
|
||||||
|
5425 6250 l p ef
|
||||||
|
10600 7000 m 9700 7000 l 9700 5500 l 11500 5500 l 11500 7000 l 10600 7000 l
|
||||||
|
pc
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
10153 6460 t
|
||||||
|
178 0 m 178 0 178 0 2 -455 ct 2 -455 2 -455 67 -455 ct 67 -455 67 -455 186 -124 ct
|
||||||
|
195 -98 203 -73 210 -50 ct 217 -74 225 -99 234 -124 ct 234 -124 234 -124 357 -455 ct
|
||||||
|
357 -455 357 -455 419 -455 ct 419 -455 419 -455 241 0 ct 241 0 241 0 178 0 ct p ef
|
||||||
|
817 -48 m 845 -29 870 -15 894 -6 ct 894 -6 894 -6 876 36 ct 843 24 811 5 778 -21 ct
|
||||||
|
745 -2 707 8 667 8 ct 625 8 588 -2 555 -22 ct 521 -42 495 -70 477 -106 ct 459 -142 450 -182 450 -227 ct
|
||||||
|
450 -272 459 -313 477 -350 ct 496 -387 521 -415 555 -434 ct 589 -453 626 -463 668 -463 ct
|
||||||
|
710 -463 748 -453 781 -433 ct 815 -413 841 -385 858 -349 ct 876 -313 885 -273 885 -227 ct
|
||||||
|
885 -190 879 -156 868 -126 ct 857 -96 839 -70 817 -48 ct p
|
||||||
|
684 -125 m 719 -115 747 -101 770 -82 ct 805 -114 823 -162 823 -227 ct 823 -264 817 -296 804 -324 ct
|
||||||
|
792 -352 773 -373 749 -388 ct 725 -403 698 -411 668 -411 ct 623 -411 586 -396 556 -365 ct
|
||||||
|
527 -334 512 -288 512 -227 ct 512 -168 527 -122 556 -91 ct 585 -59 623 -43 668 -43 ct
|
||||||
|
690 -43 710 -47 729 -55 ct 710 -67 690 -76 669 -81 ct 669 -81 669 -81 684 -125 ct
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
9700 6250 m 9138 6438 l 9138 6063 l 9700 6250 l p ef
|
||||||
|
8600 6225 m 9250 6225 l 9250 6275 l 8600 6275 l 8600 6225 l p ef
|
||||||
|
gs
|
||||||
|
8135 7931 m 9830 7931 l 9830 8806 l 8135 8806 l 8135 7931 l eoclip newpath
|
||||||
|
gs
|
||||||
|
tm setmatrix
|
||||||
|
7435 4921 t
|
||||||
|
1 1 s
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
0 0 m 1695 0 l 1695 875 l 0 875 l 0 0 l eoclip newpath
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
106 741 t
|
||||||
|
650 93 m 650 93 650 93 56 93 ct 56 93 56 93 56 76 ct 56 76 56 76 359 -301 ct 359 -301 359 -301 56 -670 ct
|
||||||
|
56 -670 56 -670 56 -687 ct 56 -687 56 -687 634 -687 ct 634 -687 634 -687 646 -534 ct
|
||||||
|
646 -534 646 -534 627 -534 ct 620 -611 582 -650 516 -650 ct 516 -650 516 -650 181 -650 ct
|
||||||
|
181 -650 181 -650 435 -339 ct 435 -339 435 -339 150 13 ct 150 13 150 13 520 13 ct
|
||||||
|
595 13 642 -24 661 -98 ct 661 -98 661 -98 679 -96 ct 679 -96 679 -96 650 93 ct
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
953 661 t
|
||||||
|
168 131 m 127 98 96 50 75 -12 ct 56 -66 47 -123 47 -183 ct 47 -241 56 -298 75 -354 ct
|
||||||
|
98 -419 128 -467 168 -497 ct 168 -497 168 -497 168 -481 ct 139 -454 116 -408 101 -342 ct
|
||||||
|
89 -290 83 -237 83 -183 ct 83 -129 89 -76 101 -24 ct 116 43 139 89 168 116 ct 168 116 168 116 168 131 ct
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
1217 661 t
|
||||||
|
33 116 m 61 90 82 46 97 -18 ct 110 -70 117 -120 117 -170 ct 117 -229 111 -284 100 -335 ct
|
||||||
|
86 -404 63 -453 33 -481 ct 33 -481 33 -481 33 -497 ct 72 -468 103 -421 125 -354 ct
|
||||||
|
143 -299 153 -241 153 -183 ct 153 -123 144 -66 125 -11 ct 103 54 72 102 33 131 ct
|
||||||
|
33 131 33 131 33 116 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
1402 344 t
|
||||||
|
175 -48 m 175 -48 175 -48 157 0 ct 157 0 157 0 8 0 ct 8 0 8 0 8 -7 ct 52 -47 83 -79 101 -105 ct
|
||||||
|
119 -130 128 -153 128 -174 ct 128 -190 123 -204 113 -214 ct 103 -225 91 -230 78 -230 ct
|
||||||
|
65 -230 54 -226 44 -219 ct 34 -212 27 -202 22 -188 ct 22 -188 22 -188 15 -188 ct
|
||||||
|
18 -211 26 -228 39 -240 ct 52 -252 68 -258 88 -258 ct 108 -258 125 -251 139 -238 ct
|
||||||
|
153 -225 160 -209 160 -191 ct 160 -179 157 -166 151 -153 ct 142 -133 127 -112 106 -89 ct
|
||||||
|
75 -55 55 -35 48 -28 ct 48 -28 48 -28 114 -28 ct 127 -28 137 -29 142 -29 ct 147 -30 152 -32 157 -36 ct
|
||||||
|
161 -39 165 -43 168 -48 ct 168 -48 168 -48 175 -48 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
8950 9100 m 7900 9100 l 7900 7700 l 10000 7700 l 10000 9100 l 8950 9100 l
|
||||||
|
pc
|
||||||
|
7900 8400 m 7338 8588 l 7338 8213 l 7900 8400 l p ef
|
||||||
|
6400 8375 m 7450 8375 l 7450 8425 l 6400 8425 l 6400 8375 l p ef
|
||||||
|
13350 9100 m 12300 9100 l 12300 7700 l 14400 7700 l 14400 9100 l 13350 9100 l
|
||||||
|
pc
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
12395 8584 t
|
||||||
|
242 -260 m 242 -260 242 -260 242 64 ct 242 81 243 91 245 96 ct 248 101 251 104 256 107 ct
|
||||||
|
260 110 269 111 283 111 ct 283 111 283 111 283 121 ct 283 121 283 121 156 121 ct
|
||||||
|
156 121 156 121 156 111 ct 156 111 156 111 161 111 ct 172 111 179 109 185 106 ct
|
||||||
|
189 104 191 101 194 95 ct 196 90 197 79 197 64 ct 197 64 197 64 197 -45 ct 180 -25 166 -11 153 -4 ct
|
||||||
|
141 3 128 7 114 7 ct 90 7 68 -4 49 -26 ct 30 -48 20 -78 20 -115 ct 20 -158 33 -193 58 -220 ct
|
||||||
|
83 -247 114 -260 149 -260 ct 160 -260 170 -259 178 -256 ct 187 -253 195 -248 202 -243 ct
|
||||||
|
213 -248 223 -253 233 -260 ct 233 -260 233 -260 242 -260 ct p
|
||||||
|
197 -62 m 197 -62 197 -62 197 -180 ct 197 -194 195 -205 192 -213 ct 188 -221 182 -227 172 -233 ct
|
||||||
|
163 -238 153 -241 141 -241 ct 121 -241 103 -232 88 -215 ct 73 -197 66 -171 66 -136 ct
|
||||||
|
66 -102 74 -76 89 -58 ct 104 -41 122 -32 143 -32 ct 154 -32 163 -34 172 -39 ct
|
||||||
|
181 -44 189 -51 197 -62 ct p ef
|
||||||
|
523 -253 m 523 -253 523 -253 523 -99 ct 523 -70 524 -53 525 -47 ct 526 -40 529 -36 532 -33 ct
|
||||||
|
535 -31 538 -29 542 -29 ct 548 -29 554 -31 561 -34 ct 561 -34 561 -34 565 -24 ct
|
||||||
|
565 -24 565 -24 490 7 ct 490 7 490 7 478 7 ct 478 7 478 7 478 -46 ct 456 -23 440 -8 428 -2 ct
|
||||||
|
417 4 405 7 392 7 ct 378 7 365 3 355 -5 ct 344 -14 337 -24 333 -37 ct 329 -50 327 -68 327 -92 ct
|
||||||
|
327 -92 327 -92 327 -205 ct 327 -217 326 -225 323 -229 ct 321 -234 317 -237 312 -240 ct
|
||||||
|
307 -242 297 -243 284 -243 ct 284 -243 284 -243 284 -253 ct 284 -253 284 -253 373 -253 ct
|
||||||
|
373 -253 373 -253 373 -84 ct 373 -60 377 -44 385 -37 ct 394 -30 403 -26 415 -26 ct
|
||||||
|
423 -26 432 -28 442 -33 ct 452 -38 464 -48 478 -62 ct 478 -62 478 -62 478 -205 ct
|
||||||
|
478 -220 475 -230 470 -235 ct 465 -240 454 -243 437 -243 ct 437 -243 437 -243 437 -253 ct
|
||||||
|
437 -253 437 -253 523 -253 ct p ef
|
||||||
|
728 -37 m 702 -17 686 -5 679 -2 ct 669 3 659 5 647 5 ct 630 5 615 -1 604 -13 ct
|
||||||
|
593 -25 587 -40 587 -60 ct 587 -72 590 -83 595 -92 ct 603 -104 616 -116 635 -127 ct
|
||||||
|
653 -138 685 -151 728 -167 ct 728 -167 728 -167 728 -177 ct 728 -202 724 -219 716 -228 ct
|
||||||
|
708 -237 697 -242 681 -242 ct 670 -242 661 -239 654 -233 ct 647 -226 643 -219 643 -211 ct
|
||||||
|
643 -211 643 -211 644 -195 ct 644 -187 642 -180 637 -176 ct 633 -171 627 -169 620 -169 ct
|
||||||
|
614 -169 608 -171 604 -176 ct 599 -181 597 -188 597 -196 ct 597 -212 605 -227 621 -240 ct
|
||||||
|
637 -253 660 -260 689 -260 ct 711 -260 730 -256 744 -249 ct 755 -243 763 -234 768 -222 ct
|
||||||
|
771 -214 773 -198 773 -174 ct 773 -174 773 -174 773 -89 ct 773 -65 773 -50 774 -45 ct
|
||||||
|
775 -39 777 -36 779 -34 ct 781 -32 783 -31 786 -31 ct 789 -31 792 -32 794 -33 ct
|
||||||
|
798 -35 805 -42 816 -53 ct 816 -53 816 -53 816 -38 ct 796 -10 776 4 758 4 ct 749 4 741 1 736 -5 ct
|
||||||
|
731 -11 728 -22 728 -37 ct p
|
||||||
|
728 -54 m 728 -54 728 -54 728 -149 ct 700 -138 682 -130 674 -126 ct 659 -118 649 -110 642 -101 ct
|
||||||
|
636 -92 633 -83 633 -72 ct 633 -59 637 -49 645 -40 ct 653 -31 662 -27 672 -27 ct
|
||||||
|
687 -27 705 -36 728 -54 ct p ef
|
||||||
|
909 -207 m 938 -242 966 -260 993 -260 ct 1007 -260 1019 -257 1028 -250 ct 1038 -243 1046 -231 1052 -216 ct
|
||||||
|
1056 -205 1058 -188 1058 -165 ct 1058 -165 1058 -165 1058 -57 ct 1058 -41 1059 -30 1062 -25 ct
|
||||||
|
1064 -20 1067 -16 1071 -14 ct 1075 -11 1083 -10 1095 -10 ct 1095 -10 1095 -10 1095 0 ct
|
||||||
|
1095 0 1095 0 971 0 ct 971 0 971 0 971 -10 ct 971 -10 971 -10 976 -10 ct 988 -10 996 -12 1001 -15 ct
|
||||||
|
1006 -19 1009 -24 1011 -31 ct 1012 -34 1012 -43 1012 -57 ct 1012 -57 1012 -57 1012 -161 ct
|
||||||
|
1012 -184 1009 -201 1003 -211 ct 997 -222 987 -227 973 -227 ct 952 -227 930 -215 909 -191 ct
|
||||||
|
909 -191 909 -191 909 -57 ct 909 -40 910 -29 912 -25 ct 915 -20 918 -16 923 -14 ct
|
||||||
|
927 -11 936 -10 950 -10 ct 950 -10 950 -10 950 0 ct 950 0 950 0 826 0 ct 826 0 826 0 826 -10 ct
|
||||||
|
826 -10 826 -10 831 -10 ct 844 -10 852 -13 856 -20 ct 861 -26 863 -39 863 -57 ct
|
||||||
|
863 -57 863 -57 863 -151 ct 863 -181 862 -200 861 -206 ct 860 -213 858 -217 855 -220 ct
|
||||||
|
852 -222 848 -223 843 -223 ct 838 -223 832 -222 825 -219 ct 825 -219 825 -219 821 -229 ct
|
||||||
|
821 -229 821 -229 897 -260 ct 897 -260 897 -260 909 -260 ct 909 -260 909 -260 909 -207 ct
|
||||||
|
p ef
|
||||||
|
1192 -337 m 1192 -337 1192 -337 1192 -253 ct 1192 -253 1192 -253 1251 -253 ct
|
||||||
|
1251 -253 1251 -253 1251 -234 ct 1251 -234 1251 -234 1192 -234 ct 1192 -234 1192 -234 1192 -70 ct
|
||||||
|
1192 -53 1194 -42 1199 -37 ct 1204 -31 1210 -28 1217 -28 ct 1223 -28 1229 -30 1235 -34 ct
|
||||||
|
1240 -37 1245 -43 1248 -50 ct 1248 -50 1248 -50 1259 -50 ct 1253 -32 1243 -19 1232 -10 ct
|
||||||
|
1220 -1 1207 4 1195 4 ct 1186 4 1178 2 1170 -3 ct 1162 -8 1156 -14 1152 -23 ct
|
||||||
|
1148 -32 1146 -45 1146 -64 ct 1146 -64 1146 -64 1146 -234 ct 1146 -234 1146 -234 1106 -234 ct
|
||||||
|
1106 -234 1106 -234 1106 -243 ct 1116 -247 1126 -254 1137 -264 ct 1148 -273 1157 -285 1165 -298 ct
|
||||||
|
1170 -305 1175 -318 1183 -337 ct 1183 -337 1183 -337 1192 -337 ct p ef
|
||||||
|
1339 -392 m 1347 -392 1353 -389 1359 -384 ct 1364 -378 1367 -372 1367 -364 ct
|
||||||
|
1367 -356 1364 -350 1359 -344 ct 1353 -339 1347 -336 1339 -336 ct 1331 -336 1325 -339 1319 -344 ct
|
||||||
|
1314 -350 1311 -356 1311 -364 ct 1311 -372 1314 -378 1319 -384 ct 1325 -389 1331 -392 1339 -392 ct
|
||||||
|
p
|
||||||
|
1362 -260 m 1362 -260 1362 -260 1362 -57 ct 1362 -41 1363 -31 1365 -26 ct 1368 -20 1371 -16 1375 -14 ct
|
||||||
|
1380 -11 1387 -10 1399 -10 ct 1399 -10 1399 -10 1399 0 ct 1399 0 1399 0 1279 0 ct
|
||||||
|
1279 0 1279 0 1279 -10 ct 1291 -10 1299 -11 1303 -14 ct 1307 -16 1310 -20 1312 -25 ct
|
||||||
|
1315 -31 1316 -41 1316 -57 ct 1316 -57 1316 -57 1316 -154 ct 1316 -181 1315 -199 1314 -207 ct
|
||||||
|
1312 -213 1310 -217 1308 -220 ct 1305 -222 1301 -223 1296 -223 ct 1291 -223 1285 -222 1278 -219 ct
|
||||||
|
1278 -219 1278 -219 1274 -229 ct 1274 -229 1274 -229 1350 -260 ct 1350 -260 1350 -260 1362 -260 ct
|
||||||
|
p ef
|
||||||
|
1651 -77 m 1651 -77 1651 -77 1648 0 ct 1648 0 1648 0 1425 0 ct 1425 0 1425 0 1425 -10 ct
|
||||||
|
1425 -10 1425 -10 1594 -234 ct 1594 -234 1594 -234 1509 -234 ct 1491 -234 1480 -233 1474 -231 ct
|
||||||
|
1469 -228 1464 -224 1461 -217 ct 1456 -208 1453 -197 1452 -183 ct 1452 -183 1452 -183 1442 -183 ct
|
||||||
|
1442 -183 1442 -183 1443 -253 ct 1443 -253 1443 -253 1655 -253 ct 1655 -253 1655 -253 1655 -243 ct
|
||||||
|
1655 -243 1655 -243 1486 -18 ct 1486 -18 1486 -18 1578 -18 ct 1597 -18 1610 -20 1617 -23 ct
|
||||||
|
1624 -26 1629 -32 1634 -40 ct 1637 -46 1639 -58 1641 -77 ct 1641 -77 1641 -77 1651 -77 ct
|
||||||
|
p ef
|
||||||
|
1724 -158 m 1724 -121 1733 -92 1751 -71 ct 1769 -50 1790 -39 1815 -39 ct 1831 -39 1846 -43 1858 -52 ct
|
||||||
|
1870 -61 1880 -77 1888 -99 ct 1888 -99 1888 -99 1897 -94 ct 1893 -68 1882 -45 1863 -24 ct
|
||||||
|
1845 -3 1822 7 1794 7 ct 1764 7 1738 -5 1716 -28 ct 1695 -52 1684 -83 1684 -123 ct
|
||||||
|
1684 -166 1695 -200 1717 -224 ct 1739 -248 1767 -260 1800 -260 ct 1828 -260 1852 -251 1870 -232 ct
|
||||||
|
1888 -214 1897 -189 1897 -158 ct 1897 -158 1897 -158 1724 -158 ct p
|
||||||
|
1724 -174 m 1724 -174 1724 -174 1840 -174 ct 1839 -190 1837 -201 1834 -208 ct
|
||||||
|
1830 -218 1823 -226 1814 -231 ct 1805 -237 1795 -240 1786 -240 ct 1770 -240 1757 -234 1745 -223 ct
|
||||||
|
1733 -211 1726 -195 1724 -174 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
12300 8400 m 11738 8588 l 11738 8213 l 12300 8400 l p ef
|
||||||
|
10000 8375 m 11850 8375 l 11850 8425 l 10000 8425 l 10000 8375 l p ef
|
||||||
|
gs
|
||||||
|
10100 7500 m 11689 7500 l 11689 8295 l 10100 8295 l 10100 7500 l eoclip newpath
|
||||||
|
gs
|
||||||
|
tm setmatrix
|
||||||
|
9393 4498 t
|
||||||
|
1 1 s
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
0 0 m 1589 0 l 1589 795 l 0 795 l 0 0 l eoclip newpath
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
159 556 t
|
||||||
|
331 -261 m 331 -261 331 -261 322 -229 ct 322 -229 322 -229 270 -229 ct 274 -218 276 -207 276 -198 ct
|
||||||
|
276 -170 264 -146 241 -124 ct 217 -103 185 -91 144 -89 ct 122 -82 106 -75 95 -65 ct
|
||||||
|
91 -62 89 -59 89 -55 ct 89 -51 91 -47 95 -44 ct 98 -40 108 -37 123 -33 ct 123 -33 123 -33 183 -20 ct
|
||||||
|
216 -12 238 -3 248 8 ct 259 19 264 31 264 46 ct 264 63 258 78 245 92 ct 233 106 215 117 190 125 ct
|
||||||
|
166 133 140 137 111 137 ct 85 137 62 134 41 128 ct 20 122 5 114 -4 103 ct -13 93 -18 82 -18 71 ct
|
||||||
|
-18 63 -15 53 -9 44 ct -3 34 4 26 13 20 ct 19 16 35 7 61 -8 ct 52 -15 47 -23 47 -32 ct
|
||||||
|
47 -40 51 -49 59 -58 ct 67 -68 85 -78 111 -89 ct 89 -93 71 -103 58 -118 ct 45 -132 39 -149 39 -167 ct
|
||||||
|
39 -196 52 -222 78 -245 ct 104 -268 138 -280 181 -280 ct 196 -280 209 -278 219 -275 ct
|
||||||
|
229 -272 239 -268 248 -261 ct 248 -261 248 -261 331 -261 ct p
|
||||||
|
225 -211 m 225 -228 220 -240 211 -250 ct 201 -259 189 -264 173 -264 ct 149 -264 129 -252 114 -229 ct
|
||||||
|
98 -206 90 -182 90 -157 ct 90 -141 95 -128 105 -118 ct 115 -108 127 -103 142 -103 ct
|
||||||
|
153 -103 164 -106 174 -112 ct 185 -118 194 -126 201 -136 ct 209 -147 214 -160 219 -176 ct
|
||||||
|
223 -192 225 -204 225 -211 ct p
|
||||||
|
74 0 m 57 8 45 18 36 30 ct 27 42 23 53 23 65 ct 23 79 29 90 42 99 ct 59 112 85 118 120 118 ct
|
||||||
|
149 118 175 113 196 103 ct 217 93 227 80 227 64 ct 227 56 223 48 215 41 ct 208 34 193 28 170 24 ct
|
||||||
|
158 21 126 13 74 0 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
609 714 t
|
||||||
|
119 -164 m 119 -164 119 -164 116 -150 ct 116 -150 116 -150 88 -150 ct 88 -150 88 -150 65 -69 ct
|
||||||
|
55 -34 45 -6 36 13 ct 23 41 9 60 -6 70 ct -18 78 -29 82 -41 82 ct -49 82 -55 80 -60 75 ct
|
||||||
|
-64 72 -66 68 -66 63 ct -66 59 -64 55 -61 52 ct -58 49 -54 48 -50 48 ct -46 48 -44 49 -41 51 ct
|
||||||
|
-39 53 -38 56 -38 58 ct -38 61 -39 64 -41 66 ct -43 68 -44 69 -44 70 ct -44 71 -44 72 -43 73 ct
|
||||||
|
-42 74 -40 74 -38 74 ct -32 74 -27 72 -21 69 ct -15 66 -10 61 -5 54 ct -1 48 3 38 8 26 ct
|
||||||
|
9 21 14 4 22 -25 ct 22 -25 22 -25 59 -150 ct 59 -150 59 -150 22 -150 ct 22 -150 22 -150 25 -164 ct
|
||||||
|
36 -164 44 -165 49 -166 ct 53 -168 57 -170 61 -174 ct 65 -178 70 -186 75 -197 ct
|
||||||
|
82 -212 89 -224 95 -232 ct 104 -243 113 -251 123 -257 ct 132 -262 142 -265 150 -265 ct
|
||||||
|
159 -265 166 -263 172 -258 ct 177 -253 180 -248 180 -242 ct 180 -238 179 -234 176 -231 ct
|
||||||
|
173 -228 169 -227 165 -227 ct 161 -227 158 -228 156 -230 ct 153 -233 152 -235 152 -238 ct
|
||||||
|
152 -240 153 -243 155 -245 ct 157 -248 158 -250 158 -251 ct 158 -253 157 -254 156 -255 ct
|
||||||
|
155 -256 153 -257 150 -257 ct 143 -257 136 -254 130 -249 ct 122 -242 115 -232 109 -217 ct
|
||||||
|
106 -210 100 -192 92 -164 ct 92 -164 92 -164 119 -164 ct p ef
|
||||||
|
125 -158 m 125 -158 125 -158 189 -168 ct 189 -168 189 -168 163 -78 ct 185 -115 204 -141 222 -155 ct
|
||||||
|
232 -164 240 -168 247 -168 ct 251 -168 254 -167 256 -164 ct 259 -162 260 -158 260 -154 ct
|
||||||
|
260 -146 258 -138 254 -130 ct 251 -125 247 -122 241 -122 ct 238 -122 236 -123 234 -125 ct
|
||||||
|
232 -127 230 -130 230 -134 ct 230 -136 229 -138 228 -138 ct 227 -139 226 -140 225 -140 ct
|
||||||
|
223 -140 221 -140 219 -139 ct 216 -137 211 -132 204 -124 ct 194 -112 183 -96 171 -77 ct
|
||||||
|
166 -68 161 -59 158 -49 ct 153 -35 150 -26 149 -23 ct 149 -23 149 -23 142 0 ct
|
||||||
|
142 0 142 0 114 0 ct 114 0 114 0 147 -116 ct 151 -129 153 -139 153 -144 ct 153 -146 153 -148 151 -150 ct
|
||||||
|
148 -152 145 -153 141 -153 ct 139 -153 134 -152 128 -151 ct 128 -151 128 -151 125 -158 ct
|
||||||
|
p ef
|
||||||
|
443 -166 m 443 -166 443 -166 406 -40 ct 406 -40 406 -40 402 -23 ct 402 -21 401 -20 401 -19 ct
|
||||||
|
401 -17 402 -15 403 -14 ct 403 -13 404 -13 405 -13 ct 406 -13 408 -13 409 -15 ct
|
||||||
|
413 -18 417 -26 423 -37 ct 423 -37 423 -37 429 -33 ct 422 -20 415 -11 407 -5 ct
|
||||||
|
399 1 392 4 386 4 ct 382 4 378 3 376 0 ct 373 -3 372 -6 372 -11 ct 372 -17 373 -25 376 -35 ct
|
||||||
|
376 -35 376 -35 380 -50 ct 362 -29 346 -14 331 -5 ct 320 1 309 4 299 4 ct 289 4 280 0 273 -7 ct
|
||||||
|
266 -14 262 -25 262 -38 ct 262 -57 268 -77 281 -99 ct 294 -120 311 -138 331 -151 ct
|
||||||
|
346 -161 361 -166 374 -166 ct 383 -166 390 -164 395 -160 ct 401 -157 405 -151 408 -142 ct
|
||||||
|
408 -142 408 -142 413 -162 ct 413 -162 413 -162 443 -166 ct p
|
||||||
|
373 -157 m 365 -157 356 -153 346 -146 ct 332 -136 320 -120 309 -100 ct 298 -80 293 -61 293 -45 ct
|
||||||
|
293 -37 295 -30 300 -25 ct 305 -20 310 -18 317 -18 ct 332 -18 349 -28 367 -47 ct
|
||||||
|
389 -73 399 -100 398 -128 ct 398 -138 396 -145 392 -150 ct 387 -155 381 -157 373 -157 ct
|
||||||
|
p ef
|
||||||
|
528 -168 m 528 -168 528 -168 504 -84 ct 515 -104 524 -119 532 -129 ct 544 -144 555 -155 567 -162 ct
|
||||||
|
573 -166 580 -168 588 -168 ct 594 -168 599 -166 603 -162 ct 607 -158 609 -153 609 -147 ct
|
||||||
|
609 -141 608 -133 605 -123 ct 605 -123 605 -123 591 -76 ct 612 -114 632 -140 652 -155 ct
|
||||||
|
662 -164 673 -168 683 -168 ct 689 -168 694 -166 698 -162 ct 702 -158 704 -151 704 -143 ct
|
||||||
|
704 -135 703 -128 700 -120 ct 700 -120 700 -120 677 -48 ct 672 -33 669 -24 669 -22 ct
|
||||||
|
669 -21 670 -19 671 -18 ct 672 -17 673 -17 674 -17 ct 675 -17 677 -18 680 -20 ct
|
||||||
|
686 -25 692 -33 698 -42 ct 698 -42 698 -42 704 -38 ct 701 -33 696 -26 688 -18 ct
|
||||||
|
681 -9 674 -3 669 0 ct 663 3 658 4 654 4 ct 650 4 646 3 643 0 ct 641 -3 639 -7 639 -11 ct
|
||||||
|
639 -17 642 -29 648 -47 ct 648 -47 648 -47 668 -106 ct 672 -120 674 -128 675 -129 ct
|
||||||
|
675 -132 675 -134 675 -136 ct 675 -139 675 -142 673 -143 ct 671 -145 670 -146 668 -146 ct
|
||||||
|
662 -146 656 -143 650 -138 ct 631 -122 613 -100 597 -72 ct 586 -53 576 -29 567 0 ct
|
||||||
|
567 0 567 0 540 0 ct 540 0 540 0 574 -112 ct 578 -124 580 -132 580 -136 ct 580 -140 579 -142 577 -144 ct
|
||||||
|
576 -145 574 -146 572 -146 ct 568 -146 564 -145 559 -142 ct 551 -137 542 -126 530 -111 ct
|
||||||
|
518 -95 508 -80 502 -65 ct 499 -59 491 -37 479 0 ct 479 0 479 0 452 0 ct 452 0 452 0 487 -120 ct
|
||||||
|
487 -120 487 -120 491 -136 ct 492 -138 493 -140 493 -141 ct 493 -144 491 -146 489 -148 ct
|
||||||
|
486 -150 483 -151 479 -151 ct 478 -151 473 -150 466 -149 ct 466 -149 466 -149 464 -156 ct
|
||||||
|
464 -156 464 -156 528 -168 ct p ef
|
||||||
|
763 -70 m 762 -64 762 -59 762 -55 ct 762 -44 766 -35 774 -27 ct 782 -20 792 -16 803 -16 ct
|
||||||
|
812 -16 821 -18 830 -21 ct 838 -25 851 -33 867 -45 ct 867 -45 867 -45 871 -40 ct
|
||||||
|
841 -11 813 4 786 4 ct 768 4 754 -2 745 -13 ct 736 -24 731 -37 731 -51 ct 731 -69 737 -88 748 -107 ct
|
||||||
|
760 -126 774 -141 792 -152 ct 809 -163 827 -168 845 -168 ct 858 -168 868 -165 874 -160 ct
|
||||||
|
881 -155 884 -148 884 -141 ct 884 -131 880 -121 871 -112 ct 860 -99 844 -89 823 -82 ct
|
||||||
|
809 -77 789 -73 763 -70 ct p
|
||||||
|
764 -79 m 783 -81 799 -85 811 -90 ct 826 -97 838 -105 846 -114 ct 854 -124 858 -133 858 -141 ct
|
||||||
|
858 -147 856 -151 853 -154 ct 850 -157 845 -159 838 -159 ct 825 -159 811 -152 797 -139 ct
|
||||||
|
782 -125 771 -105 764 -79 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
14601 7501 m 16190 7501 l 16190 8296 l 14601 8296 l 14601 7501 l eoclip newpath
|
||||||
|
gs
|
||||||
|
tm setmatrix
|
||||||
|
13891 4498 t
|
||||||
|
1 1 s
|
||||||
|
gs
|
||||||
|
gs
|
||||||
|
0 0 m 1590 0 l 1590 795 l 0 795 l 0 0 l eoclip newpath
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
212 556 t
|
||||||
|
208 -345 m 197 -344 l 113 -410 l 25 -342 l 11 -345 l 113 -462 l 208 -345 l
|
||||||
|
p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
159 556 t
|
||||||
|
331 -261 m 331 -261 331 -261 322 -229 ct 322 -229 322 -229 270 -229 ct 274 -218 276 -207 276 -198 ct
|
||||||
|
276 -170 264 -146 241 -124 ct 217 -103 185 -91 144 -89 ct 122 -82 106 -75 95 -65 ct
|
||||||
|
91 -62 89 -59 89 -55 ct 89 -51 91 -47 95 -44 ct 98 -40 108 -37 123 -33 ct 123 -33 123 -33 183 -20 ct
|
||||||
|
216 -12 238 -3 248 8 ct 259 19 264 31 264 46 ct 264 63 258 78 245 92 ct 233 106 215 117 190 125 ct
|
||||||
|
166 133 140 137 111 137 ct 85 137 62 134 41 128 ct 20 122 5 114 -4 103 ct -13 93 -18 82 -18 71 ct
|
||||||
|
-18 63 -15 53 -9 44 ct -3 34 4 26 13 20 ct 19 16 35 7 61 -8 ct 52 -15 47 -23 47 -32 ct
|
||||||
|
47 -40 51 -49 59 -58 ct 67 -68 85 -78 111 -89 ct 89 -93 71 -103 58 -118 ct 45 -132 39 -149 39 -167 ct
|
||||||
|
39 -196 52 -222 78 -245 ct 104 -268 138 -280 181 -280 ct 196 -280 209 -278 219 -275 ct
|
||||||
|
229 -272 239 -268 248 -261 ct 248 -261 248 -261 331 -261 ct p
|
||||||
|
225 -211 m 225 -228 220 -240 211 -250 ct 201 -259 189 -264 173 -264 ct 149 -264 129 -252 114 -229 ct
|
||||||
|
98 -206 90 -182 90 -157 ct 90 -141 95 -128 105 -118 ct 115 -108 127 -103 142 -103 ct
|
||||||
|
153 -103 164 -106 174 -112 ct 185 -118 194 -126 201 -136 ct 209 -147 214 -160 219 -176 ct
|
||||||
|
223 -192 225 -204 225 -211 ct p
|
||||||
|
74 0 m 57 8 45 18 36 30 ct 27 42 23 53 23 65 ct 23 79 29 90 42 99 ct 59 112 85 118 120 118 ct
|
||||||
|
149 118 175 113 196 103 ct 217 93 227 80 227 64 ct 227 56 223 48 215 41 ct 208 34 193 28 170 24 ct
|
||||||
|
158 21 126 13 74 0 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gs
|
||||||
|
pum
|
||||||
|
609 714 t
|
||||||
|
119 -164 m 119 -164 119 -164 116 -150 ct 116 -150 116 -150 88 -150 ct 88 -150 88 -150 65 -69 ct
|
||||||
|
55 -34 45 -6 36 13 ct 23 41 9 60 -6 70 ct -18 78 -29 82 -41 82 ct -49 82 -55 80 -60 75 ct
|
||||||
|
-64 72 -66 68 -66 63 ct -66 59 -64 55 -61 52 ct -58 49 -54 48 -50 48 ct -46 48 -44 49 -41 51 ct
|
||||||
|
-39 53 -38 56 -38 58 ct -38 61 -39 64 -41 66 ct -43 68 -44 69 -44 70 ct -44 71 -44 72 -43 73 ct
|
||||||
|
-42 74 -40 74 -38 74 ct -32 74 -27 72 -21 69 ct -15 66 -10 61 -5 54 ct -1 48 3 38 8 26 ct
|
||||||
|
9 21 14 4 22 -25 ct 22 -25 22 -25 59 -150 ct 59 -150 59 -150 22 -150 ct 22 -150 22 -150 25 -164 ct
|
||||||
|
36 -164 44 -165 49 -166 ct 53 -168 57 -170 61 -174 ct 65 -178 70 -186 75 -197 ct
|
||||||
|
82 -212 89 -224 95 -232 ct 104 -243 113 -251 123 -257 ct 132 -262 142 -265 150 -265 ct
|
||||||
|
159 -265 166 -263 172 -258 ct 177 -253 180 -248 180 -242 ct 180 -238 179 -234 176 -231 ct
|
||||||
|
173 -228 169 -227 165 -227 ct 161 -227 158 -228 156 -230 ct 153 -233 152 -235 152 -238 ct
|
||||||
|
152 -240 153 -243 155 -245 ct 157 -248 158 -250 158 -251 ct 158 -253 157 -254 156 -255 ct
|
||||||
|
155 -256 153 -257 150 -257 ct 143 -257 136 -254 130 -249 ct 122 -242 115 -232 109 -217 ct
|
||||||
|
106 -210 100 -192 92 -164 ct 92 -164 92 -164 119 -164 ct p ef
|
||||||
|
125 -158 m 125 -158 125 -158 189 -168 ct 189 -168 189 -168 163 -78 ct 185 -115 204 -141 222 -155 ct
|
||||||
|
232 -164 240 -168 247 -168 ct 251 -168 254 -167 256 -164 ct 259 -162 260 -158 260 -154 ct
|
||||||
|
260 -146 258 -138 254 -130 ct 251 -125 247 -122 241 -122 ct 238 -122 236 -123 234 -125 ct
|
||||||
|
232 -127 230 -130 230 -134 ct 230 -136 229 -138 228 -138 ct 227 -139 226 -140 225 -140 ct
|
||||||
|
223 -140 221 -140 219 -139 ct 216 -137 211 -132 204 -124 ct 194 -112 183 -96 171 -77 ct
|
||||||
|
166 -68 161 -59 158 -49 ct 153 -35 150 -26 149 -23 ct 149 -23 149 -23 142 0 ct
|
||||||
|
142 0 142 0 114 0 ct 114 0 114 0 147 -116 ct 151 -129 153 -139 153 -144 ct 153 -146 153 -148 151 -150 ct
|
||||||
|
148 -152 145 -153 141 -153 ct 139 -153 134 -152 128 -151 ct 128 -151 128 -151 125 -158 ct
|
||||||
|
p ef
|
||||||
|
443 -166 m 443 -166 443 -166 406 -40 ct 406 -40 406 -40 402 -23 ct 402 -21 401 -20 401 -19 ct
|
||||||
|
401 -17 402 -15 403 -14 ct 403 -13 404 -13 405 -13 ct 406 -13 408 -13 409 -15 ct
|
||||||
|
413 -18 417 -26 423 -37 ct 423 -37 423 -37 429 -33 ct 422 -20 415 -11 407 -5 ct
|
||||||
|
399 1 392 4 386 4 ct 382 4 378 3 376 0 ct 373 -3 372 -6 372 -11 ct 372 -17 373 -25 376 -35 ct
|
||||||
|
376 -35 376 -35 380 -50 ct 362 -29 346 -14 331 -5 ct 320 1 309 4 299 4 ct 289 4 280 0 273 -7 ct
|
||||||
|
266 -14 262 -25 262 -38 ct 262 -57 268 -77 281 -99 ct 294 -120 311 -138 331 -151 ct
|
||||||
|
346 -161 361 -166 374 -166 ct 383 -166 390 -164 395 -160 ct 401 -157 405 -151 408 -142 ct
|
||||||
|
408 -142 408 -142 413 -162 ct 413 -162 413 -162 443 -166 ct p
|
||||||
|
373 -157 m 365 -157 356 -153 346 -146 ct 332 -136 320 -120 309 -100 ct 298 -80 293 -61 293 -45 ct
|
||||||
|
293 -37 295 -30 300 -25 ct 305 -20 310 -18 317 -18 ct 332 -18 349 -28 367 -47 ct
|
||||||
|
389 -73 399 -100 398 -128 ct 398 -138 396 -145 392 -150 ct 387 -155 381 -157 373 -157 ct
|
||||||
|
p ef
|
||||||
|
528 -168 m 528 -168 528 -168 504 -84 ct 515 -104 524 -119 532 -129 ct 544 -144 555 -155 567 -162 ct
|
||||||
|
573 -166 580 -168 588 -168 ct 594 -168 599 -166 603 -162 ct 607 -158 609 -153 609 -147 ct
|
||||||
|
609 -141 608 -133 605 -123 ct 605 -123 605 -123 591 -76 ct 612 -114 632 -140 652 -155 ct
|
||||||
|
662 -164 673 -168 683 -168 ct 689 -168 694 -166 698 -162 ct 702 -158 704 -151 704 -143 ct
|
||||||
|
704 -135 703 -128 700 -120 ct 700 -120 700 -120 677 -48 ct 672 -33 669 -24 669 -22 ct
|
||||||
|
669 -21 670 -19 671 -18 ct 672 -17 673 -17 674 -17 ct 675 -17 677 -18 680 -20 ct
|
||||||
|
686 -25 692 -33 698 -42 ct 698 -42 698 -42 704 -38 ct 701 -33 696 -26 688 -18 ct
|
||||||
|
681 -9 674 -3 669 0 ct 663 3 658 4 654 4 ct 650 4 646 3 643 0 ct 641 -3 639 -7 639 -11 ct
|
||||||
|
639 -17 642 -29 648 -47 ct 648 -47 648 -47 668 -106 ct 672 -120 674 -128 675 -129 ct
|
||||||
|
675 -132 675 -134 675 -136 ct 675 -139 675 -142 673 -143 ct 671 -145 670 -146 668 -146 ct
|
||||||
|
662 -146 656 -143 650 -138 ct 631 -122 613 -100 597 -72 ct 586 -53 576 -29 567 0 ct
|
||||||
|
567 0 567 0 540 0 ct 540 0 540 0 574 -112 ct 578 -124 580 -132 580 -136 ct 580 -140 579 -142 577 -144 ct
|
||||||
|
576 -145 574 -146 572 -146 ct 568 -146 564 -145 559 -142 ct 551 -137 542 -126 530 -111 ct
|
||||||
|
518 -95 508 -80 502 -65 ct 499 -59 491 -37 479 0 ct 479 0 479 0 452 0 ct 452 0 452 0 487 -120 ct
|
||||||
|
487 -120 487 -120 491 -136 ct 492 -138 493 -140 493 -141 ct 493 -144 491 -146 489 -148 ct
|
||||||
|
486 -150 483 -151 479 -151 ct 478 -151 473 -150 466 -149 ct 466 -149 466 -149 464 -156 ct
|
||||||
|
464 -156 464 -156 528 -168 ct p ef
|
||||||
|
763 -70 m 762 -64 762 -59 762 -55 ct 762 -44 766 -35 774 -27 ct 782 -20 792 -16 803 -16 ct
|
||||||
|
812 -16 821 -18 830 -21 ct 838 -25 851 -33 867 -45 ct 867 -45 867 -45 871 -40 ct
|
||||||
|
841 -11 813 4 786 4 ct 768 4 754 -2 745 -13 ct 736 -24 731 -37 731 -51 ct 731 -69 737 -88 748 -107 ct
|
||||||
|
760 -126 774 -141 792 -152 ct 809 -163 827 -168 845 -168 ct 858 -168 868 -165 874 -160 ct
|
||||||
|
881 -155 884 -148 884 -141 ct 884 -131 880 -121 871 -112 ct 860 -99 844 -89 823 -82 ct
|
||||||
|
809 -77 789 -73 763 -70 ct p
|
||||||
|
764 -79 m 783 -81 799 -85 811 -90 ct 826 -97 838 -105 846 -114 ct 854 -124 858 -133 858 -141 ct
|
||||||
|
858 -147 856 -151 853 -154 ct 850 -157 845 -159 838 -159 ct 825 -159 811 -152 797 -139 ct
|
||||||
|
782 -125 771 -105 764 -79 ct p ef
|
||||||
|
pom
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
gr
|
||||||
|
16800 8400 m 16238 8588 l 16238 8213 l 16800 8400 l p ef
|
||||||
|
14400 8375 m 16350 8375 l 16350 8425 l 14400 8425 l 14400 8375 l p ef
|
||||||
|
13028 6249 m 12578 6399 l 12578 6099 l 13028 6249 l p ef
|
||||||
|
1 lw 0 lj 11500 6250 m 12527 6250 l 12527 6249 l 12668 6249 l ps
|
||||||
|
tm setmatrix
|
||||||
|
0 0 t
|
||||||
|
1 1 s
|
||||||
|
0 6358 t
|
||||||
|
pom
|
||||||
|
count op_count sub {pop} repeat countdictstack dict_count sub {end} repeat b4_inc_state restore
|
||||||
|
%%PageTrailer
|
||||||
|
%%Trailer
|
||||||
|
%%EOF
|
||||||
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/speex_analysis.odg
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/doc/speex_analysis.odg
vendored
Normal file
Binary file not shown.
BIN
external/SpeexDSP/speexdsp-1.2.0/html/speex.png
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/html/speex.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
7
external/SpeexDSP/speexdsp-1.2.0/html/speex.webprj
vendored
Normal file
7
external/SpeexDSP/speexdsp-1.2.0/html/speex.webprj
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<!DOCTYPE webproject ><webproject>
|
||||||
|
<project usePreviewPrefix="0" previewPrefix="" type="Local" name="speex" >
|
||||||
|
<upload/>
|
||||||
|
<author></author>
|
||||||
|
<email></email>
|
||||||
|
</project>
|
||||||
|
</webproject>
|
||||||
BIN
external/SpeexDSP/speexdsp-1.2.0/html/speex.xcf
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/html/speex.xcf
vendored
Normal file
Binary file not shown.
2
external/SpeexDSP/speexdsp-1.2.0/include/Makefile.am
vendored
Normal file
2
external/SpeexDSP/speexdsp-1.2.0/include/Makefile.am
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
SUBDIRS = speex
|
||||||
18
external/SpeexDSP/speexdsp-1.2.0/include/speex/Makefile.am
vendored
Normal file
18
external/SpeexDSP/speexdsp-1.2.0/include/speex/Makefile.am
vendored
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
|
||||||
|
|
||||||
68
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_buffer.h
vendored
Normal file
68
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_buffer.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_echo.h
vendored
Normal file
170
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_echo.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_jitter.h
vendored
Normal file
197
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_jitter.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_preprocess.h
vendored
Normal file
219
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_preprocess.h
vendored
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
|
||||||
343
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_resampler.h
vendored
Normal file
343
external/SpeexDSP/speexdsp-1.2.0/include/speex/speex_resampler.h
vendored
Normal file
|
|
@ -0,0 +1,343 @@
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
#define speex_assert(cond)
|
||||||
|
|
||||||
|
#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_OVERFLOW = 5,
|
||||||
|
|
||||||
|
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
|
||||||
12
external/SpeexDSP/speexdsp-1.2.0/include/speex/speexdsp_config_types.h.in
vendored
Normal file
12
external/SpeexDSP/speexdsp-1.2.0/include/speex/speexdsp_config_types.h.in
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef __SPEEX_TYPES_H__
|
||||||
|
#define __SPEEX_TYPES_H__
|
||||||
|
|
||||||
|
@INCLUDE_STDINT@
|
||||||
|
|
||||||
|
typedef @SIZE16@ spx_int16_t;
|
||||||
|
typedef @USIZE16@ spx_uint16_t;
|
||||||
|
typedef @SIZE32@ spx_int32_t;
|
||||||
|
typedef @USIZE32@ spx_uint32_t;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
126
external/SpeexDSP/speexdsp-1.2.0/include/speex/speexdsp_types.h
vendored
Normal file
126
external/SpeexDSP/speexdsp-1.2.0/include/speex/speexdsp_types.h
vendored
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 */
|
||||||
11
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/.cvsignore
vendored
Normal file
11
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/.cvsignore
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
.deps
|
||||||
|
.libs
|
||||||
|
*.la
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
testdenoise
|
||||||
|
testenc
|
||||||
|
testenc_uwb
|
||||||
|
testenc_wb
|
||||||
46
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/Makefile.am
vendored
Normal file
46
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/Makefile.am
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# 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 testresample2
|
||||||
|
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@
|
||||||
|
testresample2_SOURCES = testresample2.c
|
||||||
|
testresample2_LDADD = libspeexdsp.la @FFT_LIBS@ @LIBM@
|
||||||
|
endif
|
||||||
160
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/_kiss_fft_guts.h
vendored
Normal file
160
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/_kiss_fft_guts.h
vendored
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) )
|
||||||
235
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/arch.h
vendored
Normal file
235
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/arch.h
vendored
Normal file
|
|
@ -0,0 +1,235 @@
|
||||||
|
/* 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 WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x)))
|
||||||
|
|
||||||
|
#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))
|
||||||
|
|
||||||
|
#define WORD2INT(x) ((x) < -32767.5f ? -32768 : \
|
||||||
|
((x) > 32766.5f ? 32767 : (spx_int16_t)floor(.5 + (x))))
|
||||||
|
#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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/bfin.h
vendored
Normal file
15
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/bfin.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/buffer.c
vendored
Normal file
176
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/buffer.c
vendored
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, len - 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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/echo_diagnostic.m
vendored
Normal file
72
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/echo_diagnostic.m
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fftwrap.c
vendored
Normal file
448
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fftwrap.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fftwrap.h
vendored
Normal file
58
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fftwrap.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/filterbank.c
vendored
Normal file
227
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/filterbank.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/filterbank.h
vendored
Normal file
66
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/filterbank.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_arm4.h
vendored
Normal file
148
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_arm4.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_arm5e.h
vendored
Normal file
178
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_arm5e.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_bfin.h
vendored
Normal file
176
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_bfin.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_debug.h
vendored
Normal file
487
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_debug.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_generic.h
vendored
Normal file
110
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/fixed_generic.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/jitter.c
vendored
Normal file
839
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/jitter.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fft.c
vendored
Normal file
523
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fft.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fft.h
vendored
Normal file
108
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fft.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fftr.c
vendored
Normal file
297
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fftr.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fftr.h
vendored
Normal file
51
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/kiss_fftr.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/math_approx.h
vendored
Normal file
332
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/math_approx.h
vendored
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
|
||||||
1279
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/mdf.c
vendored
Normal file
1279
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/mdf.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
56
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/misc_bfin.h
vendored
Normal file
56
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/misc_bfin.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/os_support.h
vendored
Normal file
169
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/os_support.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/preprocess.c
vendored
Normal file
1215
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/preprocess.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
379
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/pseudofloat.h
vendored
Normal file
379
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/pseudofloat.h
vendored
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
|
||||||
1239
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/resample.c
vendored
Normal file
1239
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/resample.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
339
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/resample_neon.h
vendored
Normal file
339
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/resample_neon.h
vendored
Normal file
|
|
@ -0,0 +1,339 @@
|
||||||
|
/* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef FIXED_POINT
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
static inline int32_t saturate_32bit_to_16bit(int32_t a) {
|
||||||
|
int32_t ret;
|
||||||
|
asm ("fmov s0, %w[a]\n"
|
||||||
|
"sqxtn h0, s0\n"
|
||||||
|
"sxtl v0.4s, v0.4h\n"
|
||||||
|
"fmov %w[ret], s0\n"
|
||||||
|
: [ret] "=r" (ret)
|
||||||
|
: [a] "r" (a)
|
||||||
|
: "v0" );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#elif defined(__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 and len >= 4 */
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
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 %w[len], #0\n"
|
||||||
|
" b.ne 1f\n"
|
||||||
|
" ld1 {v16.4h}, [%[b]], #8\n"
|
||||||
|
" ld1 {v20.4h}, [%[a]], #8\n"
|
||||||
|
" subs %w[remainder], %w[remainder], #4\n"
|
||||||
|
" smull v0.4s, v16.4h, v20.4h\n"
|
||||||
|
" b.ne 4f\n"
|
||||||
|
" b 5f\n"
|
||||||
|
"1:"
|
||||||
|
" ld1 {v16.4h, v17.4h, v18.4h, v19.4h}, [%[b]], #32\n"
|
||||||
|
" ld1 {v20.4h, v21.4h, v22.4h, v23.4h}, [%[a]], #32\n"
|
||||||
|
" subs %w[len], %w[len], #16\n"
|
||||||
|
" smull v0.4s, v16.4h, v20.4h\n"
|
||||||
|
" smlal v0.4s, v17.4h, v21.4h\n"
|
||||||
|
" smlal v0.4s, v18.4h, v22.4h\n"
|
||||||
|
" smlal v0.4s, v19.4h, v23.4h\n"
|
||||||
|
" b.eq 3f\n"
|
||||||
|
"2:"
|
||||||
|
" ld1 {v16.4h, v17.4h, v18.4h, v19.4h}, [%[b]], #32\n"
|
||||||
|
" ld1 {v20.4h, v21.4h, v22.4h, v23.4h}, [%[a]], #32\n"
|
||||||
|
" subs %w[len], %w[len], #16\n"
|
||||||
|
" smlal v0.4s, v16.4h, v20.4h\n"
|
||||||
|
" smlal v0.4s, v17.4h, v21.4h\n"
|
||||||
|
" smlal v0.4s, v18.4h, v22.4h\n"
|
||||||
|
" smlal v0.4s, v19.4h, v23.4h\n"
|
||||||
|
" b.ne 2b\n"
|
||||||
|
"3:"
|
||||||
|
" cmp %w[remainder], #0\n"
|
||||||
|
" b.eq 5f\n"
|
||||||
|
"4:"
|
||||||
|
" ld1 {v18.4h}, [%[b]], #8\n"
|
||||||
|
" ld1 {v22.4h}, [%[a]], #8\n"
|
||||||
|
" subs %w[remainder], %w[remainder], #4\n"
|
||||||
|
" smlal v0.4s, v18.4h, v22.4h\n"
|
||||||
|
" b.ne 4b\n"
|
||||||
|
"5:"
|
||||||
|
" saddlv d0, v0.4s\n"
|
||||||
|
" sqxtn s0, d0\n"
|
||||||
|
" sqrshrn h0, s0, #15\n"
|
||||||
|
" sxtl v0.4s, v0.4h\n"
|
||||||
|
" fmov %w[ret], s0\n"
|
||||||
|
: [ret] "=r" (ret), [a] "+r" (a), [b] "+r" (b),
|
||||||
|
[len] "+r" (len), [remainder] "+r" (remainder)
|
||||||
|
:
|
||||||
|
: "cc", "v0",
|
||||||
|
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
#endif // !defined(__aarch64__)
|
||||||
|
|
||||||
|
#elif defined(FLOATING_POINT)
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
static inline int32_t saturate_float_to_16bit(float a) {
|
||||||
|
int32_t ret;
|
||||||
|
asm ("fcvtas s1, %s[a]\n"
|
||||||
|
"sqxtn h1, s1\n"
|
||||||
|
"sxtl v1.4s, v1.4h\n"
|
||||||
|
"fmov %w[ret], s1\n"
|
||||||
|
: [ret] "=r" (ret)
|
||||||
|
: [a] "w" (a)
|
||||||
|
: "v1");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef WORD2INT
|
||||||
|
#define WORD2INT(x) (saturate_float_to_16bit(x))
|
||||||
|
|
||||||
|
#define OVERRIDE_INNER_PRODUCT_SINGLE
|
||||||
|
/* Only works when len % 4 == 0 and len >= 4 */
|
||||||
|
#if defined(__aarch64__)
|
||||||
|
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 %w[len], #0\n"
|
||||||
|
" b.ne 1f\n"
|
||||||
|
" ld1 {v16.4s}, [%[b]], #16\n"
|
||||||
|
" ld1 {v20.4s}, [%[a]], #16\n"
|
||||||
|
" subs %w[remainder], %w[remainder], #4\n"
|
||||||
|
" fmul v1.4s, v16.4s, v20.4s\n"
|
||||||
|
" b.ne 4f\n"
|
||||||
|
" b 5f\n"
|
||||||
|
"1:"
|
||||||
|
" ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [%[b]], #64\n"
|
||||||
|
" ld1 {v20.4s, v21.4s, v22.4s, v23.4s}, [%[a]], #64\n"
|
||||||
|
" subs %w[len], %w[len], #16\n"
|
||||||
|
" fmul v1.4s, v16.4s, v20.4s\n"
|
||||||
|
" fmul v2.4s, v17.4s, v21.4s\n"
|
||||||
|
" fmul v3.4s, v18.4s, v22.4s\n"
|
||||||
|
" fmul v4.4s, v19.4s, v23.4s\n"
|
||||||
|
" b.eq 3f\n"
|
||||||
|
"2:"
|
||||||
|
" ld1 {v16.4s, v17.4s, v18.4s, v19.4s}, [%[b]], #64\n"
|
||||||
|
" ld1 {v20.4s, v21.4s, v22.4s, v23.4s}, [%[a]], #64\n"
|
||||||
|
" subs %w[len], %w[len], #16\n"
|
||||||
|
" fmla v1.4s, v16.4s, v20.4s\n"
|
||||||
|
" fmla v2.4s, v17.4s, v21.4s\n"
|
||||||
|
" fmla v3.4s, v18.4s, v22.4s\n"
|
||||||
|
" fmla v4.4s, v19.4s, v23.4s\n"
|
||||||
|
" b.ne 2b\n"
|
||||||
|
"3:"
|
||||||
|
" fadd v16.4s, v1.4s, v2.4s\n"
|
||||||
|
" fadd v17.4s, v3.4s, v4.4s\n"
|
||||||
|
" cmp %w[remainder], #0\n"
|
||||||
|
" fadd v1.4s, v16.4s, v17.4s\n"
|
||||||
|
" b.eq 5f\n"
|
||||||
|
"4:"
|
||||||
|
" ld1 {v18.4s}, [%[b]], #16\n"
|
||||||
|
" ld1 {v22.4s}, [%[a]], #16\n"
|
||||||
|
" subs %w[remainder], %w[remainder], #4\n"
|
||||||
|
" fmla v1.4s, v18.4s, v22.4s\n"
|
||||||
|
" b.ne 4b\n"
|
||||||
|
"5:"
|
||||||
|
" faddp v1.4s, v1.4s, v1.4s\n"
|
||||||
|
" faddp %[ret].4s, v1.4s, v1.4s\n"
|
||||||
|
: [ret] "=w" (ret), [a] "+r" (a), [b] "+r" (b),
|
||||||
|
[len] "+r" (len), [remainder] "+r" (remainder)
|
||||||
|
:
|
||||||
|
: "cc", "v1", "v2", "v3", "v4",
|
||||||
|
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
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 // defined(__aarch64__)
|
||||||
|
#endif
|
||||||
128
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/resample_sse.h
vendored
Normal file
128
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/resample_sse.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/scal.c
vendored
Normal file
293
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/scal.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/smallft.c
vendored
Normal file
1261
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/smallft.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
46
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/smallft.h
vendored
Normal file
46
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/smallft.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/stack_alloc.h
vendored
Normal file
115
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/stack_alloc.h
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testdenoise.c
vendored
Normal file
44
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testdenoise.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testecho.c
vendored
Normal file
53
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testecho.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testjitter.c
vendored
Normal file
75
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testjitter.c
vendored
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
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testresample.c
vendored
Normal file
86
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testresample.c
vendored
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;
|
||||||
|
}
|
||||||
|
|
||||||
93
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testresample2.c
vendored
Normal file
93
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/testresample2.c
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
/* Copyright (C) 2007 Jean-Marc Valin
|
||||||
|
|
||||||
|
File: testresample2.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 PERIOD 32
|
||||||
|
#define INBLOCK 1024
|
||||||
|
#define RATE 48000
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
spx_uint32_t i;
|
||||||
|
float *fin, *fout;
|
||||||
|
int rate = 1000, off = 0, avail = INBLOCK;
|
||||||
|
SpeexResamplerState *st = speex_resampler_init(1, RATE, RATE, 4, NULL);
|
||||||
|
speex_resampler_set_rate(st, RATE, rate);
|
||||||
|
speex_resampler_skip_zeros(st);
|
||||||
|
|
||||||
|
fin = malloc(INBLOCK*2*sizeof(float));
|
||||||
|
for (i=0; i<INBLOCK*2;i++)
|
||||||
|
fin[i] = sinf ((float)i/PERIOD * 2 * M_PI) * 0.9;
|
||||||
|
|
||||||
|
fout = malloc(INBLOCK*4*sizeof(float));
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
spx_uint32_t in_len;
|
||||||
|
spx_uint32_t out_len;
|
||||||
|
|
||||||
|
in_len = avail;
|
||||||
|
out_len = (in_len * rate + RATE-1) / RATE;
|
||||||
|
|
||||||
|
fprintf (stderr, "%d %d %d %d -> ", rate, off, in_len, out_len);
|
||||||
|
|
||||||
|
speex_resampler_process_float(st, 0, fin + off, &in_len, fout, &out_len);
|
||||||
|
|
||||||
|
fprintf (stderr, "%d %d\n", in_len, out_len);
|
||||||
|
off += in_len;
|
||||||
|
avail = avail - in_len + INBLOCK;
|
||||||
|
|
||||||
|
if (off >= INBLOCK)
|
||||||
|
off -= INBLOCK;
|
||||||
|
|
||||||
|
fwrite(fout, sizeof(float), out_len, stdout);
|
||||||
|
|
||||||
|
rate += 100;
|
||||||
|
if (rate > 128000)
|
||||||
|
break;
|
||||||
|
|
||||||
|
speex_resampler_set_rate(st, RATE, rate);
|
||||||
|
}
|
||||||
|
speex_resampler_destroy(st);
|
||||||
|
free(fin);
|
||||||
|
free(fout);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
97
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/vorbis_psy.h
vendored
Normal file
97
external/SpeexDSP/speexdsp-1.2.0/libspeexdsp/vorbis_psy.h
vendored
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
|
||||||
BIN
external/SpeexDSP/speexdsp-1.2.0/macosx/English.lproj/InfoPlist.strings
vendored
Normal file
BIN
external/SpeexDSP/speexdsp-1.2.0/macosx/English.lproj/InfoPlist.strings
vendored
Normal file
Binary file not shown.
30
external/SpeexDSP/speexdsp-1.2.0/macosx/Info.plist
vendored
Normal file
30
external/SpeexDSP/speexdsp-1.2.0/macosx/Info.plist
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>Speex</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>Speex framework 1.1.12svn, Copyright © 2002-2006 Xiph.Org Foundation</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.xiph.speex</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.1.12svn</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.1.12d1</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Speex framework 1.1.12svn, Copyright © 2002-2006 Xiph.Org Foundation</string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
538
external/SpeexDSP/speexdsp-1.2.0/macosx/Speex.xcodeproj/project.pbxproj
vendored
Normal file
538
external/SpeexDSP/speexdsp-1.2.0/macosx/Speex.xcodeproj/project.pbxproj
vendored
Normal file
|
|
@ -0,0 +1,538 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 42;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
37CA8DF00DD73408005C8CB6 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 37CA8DED0DD73408005C8CB6 /* buffer.c */; };
|
||||||
|
37CA8DF10DD73408005C8CB6 /* resample.c in Sources */ = {isa = PBXBuildFile; fileRef = 37CA8DEE0DD73408005C8CB6 /* resample.c */; };
|
||||||
|
37CA8DF30DD73408005C8CB6 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 37CA8DED0DD73408005C8CB6 /* buffer.c */; };
|
||||||
|
37CA8DF40DD73408005C8CB6 /* resample.c in Sources */ = {isa = PBXBuildFile; fileRef = 37CA8DEE0DD73408005C8CB6 /* resample.c */; };
|
||||||
|
37CA8DF60DD73424005C8CB6 /* resample_sse.h in Headers */ = {isa = PBXBuildFile; fileRef = 37CA8DEF0DD73408005C8CB6 /* resample_sse.h */; };
|
||||||
|
37CA8DF90DD7347D005C8CB6 /* speex_buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 37CA8DF70DD7347D005C8CB6 /* speex_buffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
37CA8DFA0DD7347D005C8CB6 /* speex_resampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 37CA8DF80DD7347D005C8CB6 /* speex_resampler.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
37CA8E000DD7352A005C8CB6 /* os_support.h in Headers */ = {isa = PBXBuildFile; fileRef = 37CA8DFF0DD7352A005C8CB6 /* os_support.h */; };
|
||||||
|
73814AFF0907FB8200C478FC /* speex_echo.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF30907FB8200C478FC /* speex_echo.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B000907FB8200C478FC /* speex_header.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF40907FB8200C478FC /* speex_header.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B010907FB8200C478FC /* speex_jitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF50907FB8200C478FC /* speex_jitter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B020907FB8200C478FC /* speex_preprocess.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF60907FB8200C478FC /* speex_preprocess.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B030907FB8200C478FC /* speex_stereo.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF70907FB8200C478FC /* speex_stereo.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B040907FB8200C478FC /* speex_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF80907FB8200C478FC /* speex_types.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B060907FBAB00C478FC /* speex_callbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 73814AF10907FB8200C478FC /* speex_callbacks.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
73814B750907FC9900C478FC /* jitter.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B280907FC9900C478FC /* jitter.c */; };
|
||||||
|
73814B8E0907FC9900C478FC /* preprocess.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B410907FC9900C478FC /* preprocess.c */; };
|
||||||
|
73814B930907FC9900C478FC /* smallft.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B460907FC9900C478FC /* smallft.c */; };
|
||||||
|
738837440B1934D0005C7A69 /* mdf.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B390907FC9900C478FC /* mdf.c */; };
|
||||||
|
738837540B193581005C7A69 /* _kiss_fft_guts.h in Headers */ = {isa = PBXBuildFile; fileRef = 738837460B193581005C7A69 /* _kiss_fft_guts.h */; };
|
||||||
|
738837550B193581005C7A69 /* fftwrap.c in Sources */ = {isa = PBXBuildFile; fileRef = 738837470B193581005C7A69 /* fftwrap.c */; };
|
||||||
|
738837560B193581005C7A69 /* fftwrap.h in Headers */ = {isa = PBXBuildFile; fileRef = 738837480B193581005C7A69 /* fftwrap.h */; };
|
||||||
|
738837570B193581005C7A69 /* filterbank.c in Sources */ = {isa = PBXBuildFile; fileRef = 738837490B193581005C7A69 /* filterbank.c */; };
|
||||||
|
738837580B193581005C7A69 /* filterbank.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388374A0B193581005C7A69 /* filterbank.h */; };
|
||||||
|
738837590B193581005C7A69 /* kiss_fft.c in Sources */ = {isa = PBXBuildFile; fileRef = 7388374B0B193581005C7A69 /* kiss_fft.c */; };
|
||||||
|
7388375A0B193581005C7A69 /* kiss_fft.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388374C0B193581005C7A69 /* kiss_fft.h */; };
|
||||||
|
7388375B0B193581005C7A69 /* kiss_fftr.c in Sources */ = {isa = PBXBuildFile; fileRef = 7388374D0B193581005C7A69 /* kiss_fftr.c */; };
|
||||||
|
7388375C0B193581005C7A69 /* kiss_fftr.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388374E0B193581005C7A69 /* kiss_fftr.h */; };
|
||||||
|
7388375D0B193581005C7A69 /* lsp_bfin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7388374F0B193581005C7A69 /* lsp_bfin.h */; };
|
||||||
|
7388375E0B193581005C7A69 /* pseudofloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 738837500B193581005C7A69 /* pseudofloat.h */; };
|
||||||
|
7388375F0B193581005C7A69 /* quant_lsp_bfin.h in Headers */ = {isa = PBXBuildFile; fileRef = 738837510B193581005C7A69 /* quant_lsp_bfin.h */; };
|
||||||
|
738837600B193581005C7A69 /* vorbis_psy.c in Sources */ = {isa = PBXBuildFile; fileRef = 738837520B193581005C7A69 /* vorbis_psy.c */; };
|
||||||
|
738837610B193581005C7A69 /* vorbis_psy.h in Headers */ = {isa = PBXBuildFile; fileRef = 738837530B193581005C7A69 /* vorbis_psy.h */; };
|
||||||
|
738837830B193791005C7A69 /* fftwrap.c in Sources */ = {isa = PBXBuildFile; fileRef = 738837470B193581005C7A69 /* fftwrap.c */; };
|
||||||
|
738837840B193792005C7A69 /* filterbank.c in Sources */ = {isa = PBXBuildFile; fileRef = 738837490B193581005C7A69 /* filterbank.c */; };
|
||||||
|
7388378B0B1937A0005C7A69 /* jitter.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B280907FC9900C478FC /* jitter.c */; };
|
||||||
|
7388378C0B1937A4005C7A69 /* kiss_fft.c in Sources */ = {isa = PBXBuildFile; fileRef = 7388374B0B193581005C7A69 /* kiss_fft.c */; };
|
||||||
|
7388378D0B1937A9005C7A69 /* kiss_fftr.c in Sources */ = {isa = PBXBuildFile; fileRef = 7388374D0B193581005C7A69 /* kiss_fftr.c */; };
|
||||||
|
738837940B1937BB005C7A69 /* mdf.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B390907FC9900C478FC /* mdf.c */; };
|
||||||
|
738837980B1937C2005C7A69 /* preprocess.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B410907FC9900C478FC /* preprocess.c */; };
|
||||||
|
7388379B0B1937C9005C7A69 /* smallft.c in Sources */ = {isa = PBXBuildFile; fileRef = 73814B460907FC9900C478FC /* smallft.c */; };
|
||||||
|
738837A10B1937DD005C7A69 /* vorbis_psy.c in Sources */ = {isa = PBXBuildFile; fileRef = 738837520B193581005C7A69 /* vorbis_psy.c */; };
|
||||||
|
8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
32BAE0B70371A74B00C91783 /* Speex_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Speex_Prefix.pch; sourceTree = "<group>"; };
|
||||||
|
37CA8DED0DD73408005C8CB6 /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buffer.c; path = ../libspeex/buffer.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
37CA8DEE0DD73408005C8CB6 /* resample.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = resample.c; path = ../libspeex/resample.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
37CA8DEF0DD73408005C8CB6 /* resample_sse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resample_sse.h; path = ../libspeex/resample_sse.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
37CA8DF70DD7347D005C8CB6 /* speex_buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speex_buffer.h; sourceTree = "<group>"; };
|
||||||
|
37CA8DF80DD7347D005C8CB6 /* speex_resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speex_resampler.h; sourceTree = "<group>"; };
|
||||||
|
37CA8DFF0DD7352A005C8CB6 /* os_support.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = os_support.h; path = ../libspeex/os_support.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814AEF0907FB8200C478FC /* speex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex.h; sourceTree = "<group>"; };
|
||||||
|
73814AF10907FB8200C478FC /* speex_callbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_callbacks.h; sourceTree = "<group>"; };
|
||||||
|
73814AF30907FB8200C478FC /* speex_echo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_echo.h; sourceTree = "<group>"; };
|
||||||
|
73814AF40907FB8200C478FC /* speex_header.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_header.h; sourceTree = "<group>"; };
|
||||||
|
73814AF50907FB8200C478FC /* speex_jitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_jitter.h; sourceTree = "<group>"; };
|
||||||
|
73814AF60907FB8200C478FC /* speex_preprocess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_preprocess.h; sourceTree = "<group>"; };
|
||||||
|
73814AF70907FB8200C478FC /* speex_stereo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_stereo.h; sourceTree = "<group>"; };
|
||||||
|
73814AF80907FB8200C478FC /* speex_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = speex_types.h; sourceTree = "<group>"; };
|
||||||
|
73814B0C0907FC9900C478FC /* arch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = arch.h; path = ../libspeex/arch.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B1E0907FC9900C478FC /* fixed_arm4.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fixed_arm4.h; path = ../libspeex/fixed_arm4.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B1F0907FC9900C478FC /* fixed_arm5e.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fixed_arm5e.h; path = ../libspeex/fixed_arm5e.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B200907FC9900C478FC /* fixed_bfin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fixed_bfin.h; path = ../libspeex/fixed_bfin.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B210907FC9900C478FC /* fixed_debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fixed_debug.h; path = ../libspeex/fixed_debug.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B220907FC9900C478FC /* fixed_generic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fixed_generic.h; path = ../libspeex/fixed_generic.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B280907FC9900C478FC /* jitter.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = jitter.c; path = ../libspeex/jitter.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B380907FC9900C478FC /* math_approx.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = math_approx.h; path = ../libspeex/math_approx.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B390907FC9900C478FC /* mdf.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = mdf.c; path = ../libspeex/mdf.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B3A0907FC9900C478FC /* misc_bfin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = misc_bfin.h; path = ../libspeex/misc_bfin.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B410907FC9900C478FC /* preprocess.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = preprocess.c; path = ../libspeex/preprocess.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B460907FC9900C478FC /* smallft.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = smallft.c; path = ../libspeex/smallft.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B470907FC9900C478FC /* smallft.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = smallft.h; path = ../libspeex/smallft.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B4B0907FC9900C478FC /* stack_alloc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = stack_alloc.h; path = ../libspeex/stack_alloc.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B4D0907FC9900C478FC /* testdenoise.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testdenoise.c; path = ../libspeex/testdenoise.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
73814B4E0907FC9900C478FC /* testecho.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testecho.c; path = ../libspeex/testecho.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837460B193581005C7A69 /* _kiss_fft_guts.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = _kiss_fft_guts.h; path = ../libspeex/_kiss_fft_guts.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837470B193581005C7A69 /* fftwrap.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = fftwrap.c; path = ../libspeex/fftwrap.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837480B193581005C7A69 /* fftwrap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = fftwrap.h; path = ../libspeex/fftwrap.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837490B193581005C7A69 /* filterbank.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = filterbank.c; path = ../libspeex/filterbank.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
7388374A0B193581005C7A69 /* filterbank.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = filterbank.h; path = ../libspeex/filterbank.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
7388374B0B193581005C7A69 /* kiss_fft.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = kiss_fft.c; path = ../libspeex/kiss_fft.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
7388374C0B193581005C7A69 /* kiss_fft.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = kiss_fft.h; path = ../libspeex/kiss_fft.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
7388374D0B193581005C7A69 /* kiss_fftr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = kiss_fftr.c; path = ../libspeex/kiss_fftr.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
7388374E0B193581005C7A69 /* kiss_fftr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = kiss_fftr.h; path = ../libspeex/kiss_fftr.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
7388374F0B193581005C7A69 /* lsp_bfin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = lsp_bfin.h; path = ../libspeex/lsp_bfin.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837500B193581005C7A69 /* pseudofloat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pseudofloat.h; path = ../libspeex/pseudofloat.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837510B193581005C7A69 /* quant_lsp_bfin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = quant_lsp_bfin.h; path = ../libspeex/quant_lsp_bfin.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837520B193581005C7A69 /* vorbis_psy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = vorbis_psy.c; path = ../libspeex/vorbis_psy.c; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837530B193581005C7A69 /* vorbis_psy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = vorbis_psy.h; path = ../libspeex/vorbis_psy.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
738837770B193667005C7A69 /* libspeex.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libspeex.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
8D07F2C80486CC7A007CD1D0 /* Speex.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Speex.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
738837750B193667005C7A69 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
034768DDFF38A45A11DB9C8B /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
8D07F2C80486CC7A007CD1D0 /* Speex.framework */,
|
||||||
|
738837770B193667005C7A69 /* libspeex.a */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0867D691FE84028FC02AAC07 /* Speex */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
08FB77ACFE841707C02AAC07 /* Source */,
|
||||||
|
73814AEB0907FB6400C478FC /* Headers */,
|
||||||
|
089C1665FE841158C02AAC07 /* Resources */,
|
||||||
|
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
|
||||||
|
034768DDFF38A45A11DB9C8B /* Products */,
|
||||||
|
);
|
||||||
|
name = Speex;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
);
|
||||||
|
name = "External Frameworks and Libraries";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
089C1665FE841158C02AAC07 /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
8D07F2C70486CC7A007CD1D0 /* Info.plist */,
|
||||||
|
089C1666FE841158C02AAC07 /* InfoPlist.strings */,
|
||||||
|
);
|
||||||
|
name = Resources;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
08FB77ACFE841707C02AAC07 /* Source */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
37CA8DFF0DD7352A005C8CB6 /* os_support.h */,
|
||||||
|
37CA8DED0DD73408005C8CB6 /* buffer.c */,
|
||||||
|
37CA8DEE0DD73408005C8CB6 /* resample.c */,
|
||||||
|
37CA8DEF0DD73408005C8CB6 /* resample_sse.h */,
|
||||||
|
738837460B193581005C7A69 /* _kiss_fft_guts.h */,
|
||||||
|
738837470B193581005C7A69 /* fftwrap.c */,
|
||||||
|
738837480B193581005C7A69 /* fftwrap.h */,
|
||||||
|
738837490B193581005C7A69 /* filterbank.c */,
|
||||||
|
7388374A0B193581005C7A69 /* filterbank.h */,
|
||||||
|
7388374B0B193581005C7A69 /* kiss_fft.c */,
|
||||||
|
7388374C0B193581005C7A69 /* kiss_fft.h */,
|
||||||
|
7388374D0B193581005C7A69 /* kiss_fftr.c */,
|
||||||
|
7388374E0B193581005C7A69 /* kiss_fftr.h */,
|
||||||
|
738837500B193581005C7A69 /* pseudofloat.h */,
|
||||||
|
738837520B193581005C7A69 /* vorbis_psy.c */,
|
||||||
|
738837530B193581005C7A69 /* vorbis_psy.h */,
|
||||||
|
73814B0C0907FC9900C478FC /* arch.h */,
|
||||||
|
73814B1E0907FC9900C478FC /* fixed_arm4.h */,
|
||||||
|
73814B1F0907FC9900C478FC /* fixed_arm5e.h */,
|
||||||
|
73814B200907FC9900C478FC /* fixed_bfin.h */,
|
||||||
|
73814B210907FC9900C478FC /* fixed_debug.h */,
|
||||||
|
73814B220907FC9900C478FC /* fixed_generic.h */,
|
||||||
|
73814B280907FC9900C478FC /* jitter.c */,
|
||||||
|
73814B380907FC9900C478FC /* math_approx.h */,
|
||||||
|
73814B390907FC9900C478FC /* mdf.c */,
|
||||||
|
73814B3A0907FC9900C478FC /* misc_bfin.h */,
|
||||||
|
73814B410907FC9900C478FC /* preprocess.c */,
|
||||||
|
73814B460907FC9900C478FC /* smallft.c */,
|
||||||
|
73814B470907FC9900C478FC /* smallft.h */,
|
||||||
|
73814B4B0907FC9900C478FC /* stack_alloc.h */,
|
||||||
|
73814B4D0907FC9900C478FC /* testdenoise.c */,
|
||||||
|
73814B4E0907FC9900C478FC /* testecho.c */,
|
||||||
|
32BAE0B70371A74B00C91783 /* Speex_Prefix.pch */,
|
||||||
|
);
|
||||||
|
name = Source;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
73814AEB0907FB6400C478FC /* Headers */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
73814AEC0907FB8200C478FC /* speex */,
|
||||||
|
);
|
||||||
|
name = Headers;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
73814AEC0907FB8200C478FC /* speex */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
73814AEF0907FB8200C478FC /* speex.h */,
|
||||||
|
37CA8DF70DD7347D005C8CB6 /* speex_buffer.h */,
|
||||||
|
73814AF30907FB8200C478FC /* speex_echo.h */,
|
||||||
|
73814AF40907FB8200C478FC /* speex_header.h */,
|
||||||
|
73814AF50907FB8200C478FC /* speex_jitter.h */,
|
||||||
|
73814AF60907FB8200C478FC /* speex_preprocess.h */,
|
||||||
|
37CA8DF80DD7347D005C8CB6 /* speex_resampler.h */,
|
||||||
|
73814AF80907FB8200C478FC /* speex_types.h */,
|
||||||
|
);
|
||||||
|
name = speex;
|
||||||
|
path = ../include/speex;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXHeadersBuildPhase section */
|
||||||
|
738837730B193667005C7A69 /* Headers */ = {
|
||||||
|
isa = PBXHeadersBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
|
||||||
|
isa = PBXHeadersBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
73814AFF0907FB8200C478FC /* speex_echo.h in Headers */,
|
||||||
|
73814B000907FB8200C478FC /* speex_header.h in Headers */,
|
||||||
|
73814B010907FB8200C478FC /* speex_jitter.h in Headers */,
|
||||||
|
73814B020907FB8200C478FC /* speex_preprocess.h in Headers */,
|
||||||
|
73814B030907FB8200C478FC /* speex_stereo.h in Headers */,
|
||||||
|
73814B040907FB8200C478FC /* speex_types.h in Headers */,
|
||||||
|
73814B060907FBAB00C478FC /* speex_callbacks.h in Headers */,
|
||||||
|
73814B080907FBAE00C478FC /* speex.h in Headers */,
|
||||||
|
738837540B193581005C7A69 /* _kiss_fft_guts.h in Headers */,
|
||||||
|
738837560B193581005C7A69 /* fftwrap.h in Headers */,
|
||||||
|
738837580B193581005C7A69 /* filterbank.h in Headers */,
|
||||||
|
7388375A0B193581005C7A69 /* kiss_fft.h in Headers */,
|
||||||
|
7388375C0B193581005C7A69 /* kiss_fftr.h in Headers */,
|
||||||
|
7388375D0B193581005C7A69 /* lsp_bfin.h in Headers */,
|
||||||
|
7388375E0B193581005C7A69 /* pseudofloat.h in Headers */,
|
||||||
|
7388375F0B193581005C7A69 /* quant_lsp_bfin.h in Headers */,
|
||||||
|
738837610B193581005C7A69 /* vorbis_psy.h in Headers */,
|
||||||
|
37CA8DF60DD73424005C8CB6 /* resample_sse.h in Headers */,
|
||||||
|
37CA8DF90DD7347D005C8CB6 /* speex_buffer.h in Headers */,
|
||||||
|
37CA8DFA0DD7347D005C8CB6 /* speex_resampler.h in Headers */,
|
||||||
|
37CA8E000DD7352A005C8CB6 /* os_support.h in Headers */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXHeadersBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
738837760B193667005C7A69 /* libspeex (static) */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 738837780B193687005C7A69 /* Build configuration list for PBXNativeTarget "libspeex (static)" */;
|
||||||
|
buildPhases = (
|
||||||
|
738837730B193667005C7A69 /* Headers */,
|
||||||
|
738837740B193667005C7A69 /* Sources */,
|
||||||
|
738837750B193667005C7A69 /* Frameworks */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "libspeex (static)";
|
||||||
|
productName = speex;
|
||||||
|
productReference = 738837770B193667005C7A69 /* libspeex.a */;
|
||||||
|
productType = "com.apple.product-type.library.static";
|
||||||
|
};
|
||||||
|
8D07F2BC0486CC7A007CD1D0 /* Speex */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 73814ADF0907FB1E00C478FC /* Build configuration list for PBXNativeTarget "Speex" */;
|
||||||
|
buildPhases = (
|
||||||
|
8D07F2BD0486CC7A007CD1D0 /* Headers */,
|
||||||
|
8D07F2BF0486CC7A007CD1D0 /* Resources */,
|
||||||
|
8D07F2C10486CC7A007CD1D0 /* Sources */,
|
||||||
|
8D07F2C30486CC7A007CD1D0 /* Frameworks */,
|
||||||
|
8D07F2C50486CC7A007CD1D0 /* Rez */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = Speex;
|
||||||
|
productInstallPath = "$(HOME)/Library/Frameworks";
|
||||||
|
productName = Speex;
|
||||||
|
productReference = 8D07F2C80486CC7A007CD1D0 /* Speex.framework */;
|
||||||
|
productType = "com.apple.product-type.framework";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
0867D690FE84028FC02AAC07 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
buildConfigurationList = 73814AE30907FB1E00C478FC /* Build configuration list for PBXProject "Speex" */;
|
||||||
|
compatibilityVersion = "Xcode 2.4";
|
||||||
|
hasScannedForEncodings = 1;
|
||||||
|
mainGroup = 0867D691FE84028FC02AAC07 /* Speex */;
|
||||||
|
productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = ..;
|
||||||
|
targets = (
|
||||||
|
8D07F2BC0486CC7A007CD1D0 /* Speex */,
|
||||||
|
738837760B193667005C7A69 /* libspeex (static) */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXRezBuildPhase section */
|
||||||
|
8D07F2C50486CC7A007CD1D0 /* Rez */ = {
|
||||||
|
isa = PBXRezBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXRezBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
738837740B193667005C7A69 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
738837830B193791005C7A69 /* fftwrap.c in Sources */,
|
||||||
|
738837840B193792005C7A69 /* filterbank.c in Sources */,
|
||||||
|
7388378B0B1937A0005C7A69 /* jitter.c in Sources */,
|
||||||
|
7388378C0B1937A4005C7A69 /* kiss_fft.c in Sources */,
|
||||||
|
7388378D0B1937A9005C7A69 /* kiss_fftr.c in Sources */,
|
||||||
|
738837940B1937BB005C7A69 /* mdf.c in Sources */,
|
||||||
|
738837980B1937C2005C7A69 /* preprocess.c in Sources */,
|
||||||
|
7388379B0B1937C9005C7A69 /* smallft.c in Sources */,
|
||||||
|
738837A10B1937DD005C7A69 /* vorbis_psy.c in Sources */,
|
||||||
|
37CA8DF30DD73408005C8CB6 /* buffer.c in Sources */,
|
||||||
|
37CA8DF40DD73408005C8CB6 /* resample.c in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
8D07F2C10486CC7A007CD1D0 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
73814B750907FC9900C478FC /* jitter.c in Sources */,
|
||||||
|
73814B8E0907FC9900C478FC /* preprocess.c in Sources */,
|
||||||
|
73814B930907FC9900C478FC /* smallft.c in Sources */,
|
||||||
|
738837440B1934D0005C7A69 /* mdf.c in Sources */,
|
||||||
|
738837550B193581005C7A69 /* fftwrap.c in Sources */,
|
||||||
|
738837570B193581005C7A69 /* filterbank.c in Sources */,
|
||||||
|
738837590B193581005C7A69 /* kiss_fft.c in Sources */,
|
||||||
|
7388375B0B193581005C7A69 /* kiss_fftr.c in Sources */,
|
||||||
|
738837600B193581005C7A69 /* vorbis_psy.c in Sources */,
|
||||||
|
37CA8DF00DD73408005C8CB6 /* buffer.c in Sources */,
|
||||||
|
37CA8DF10DD73408005C8CB6 /* resample.c in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
089C1667FE841158C02AAC07 /* English */,
|
||||||
|
);
|
||||||
|
name = InfoPlist.strings;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
73814AE00907FB1E00C478FC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
FRAMEWORK_VERSION = A;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||||
|
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
|
GCC_PREFIX_HEADER = Speex_Prefix.pch;
|
||||||
|
INFOPLIST_FILE = Info.plist;
|
||||||
|
INSTALL_PATH = /Library/Frameworks;
|
||||||
|
LIBRARY_STYLE = DYNAMIC;
|
||||||
|
MACH_O_TYPE = mh_dylib;
|
||||||
|
PRODUCT_NAME = Speex;
|
||||||
|
WRAPPER_EXTENSION = framework;
|
||||||
|
ZERO_LINK = YES;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
73814AE10907FB1E00C478FC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
FRAMEWORK_VERSION = A;
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||||
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
|
GCC_PREFIX_HEADER = Speex_Prefix.pch;
|
||||||
|
INFOPLIST_FILE = Info.plist;
|
||||||
|
INSTALL_PATH = /Library/Frameworks;
|
||||||
|
LIBRARY_STYLE = DYNAMIC;
|
||||||
|
MACH_O_TYPE = mh_dylib;
|
||||||
|
PRODUCT_NAME = Speex;
|
||||||
|
WRAPPER_EXTENSION = framework;
|
||||||
|
ZERO_LINK = NO;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
73814AE40907FB1E00C478FC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"$(inherited)",
|
||||||
|
__MACOSX__,
|
||||||
|
FLOATING_POINT,
|
||||||
|
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)",
|
||||||
|
);
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "EXPORT=__attribute__((visibility(\\\"default\\\")))";
|
||||||
|
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
73814AE50907FB1E00C478FC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ARCHS = (
|
||||||
|
ppc,
|
||||||
|
i386,
|
||||||
|
);
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 3;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"$(inherited)",
|
||||||
|
__MACOSX__,
|
||||||
|
FLOATING_POINT,
|
||||||
|
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)",
|
||||||
|
);
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "EXPORT=__attribute__((visibility(\\\"default\\\")))";
|
||||||
|
OTHER_CFLAGS = (
|
||||||
|
"$(OTHER_CFLAGS)",
|
||||||
|
"-falign-loops=16",
|
||||||
|
);
|
||||||
|
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
738837790B193687005C7A69 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||||
|
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
INSTALL_PATH = /usr/local/lib;
|
||||||
|
PREBINDING = NO;
|
||||||
|
PRODUCT_NAME = speex;
|
||||||
|
ZERO_LINK = YES;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
7388377A0B193687005C7A69 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||||
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
|
INSTALL_PATH = /usr/local/lib;
|
||||||
|
PREBINDING = NO;
|
||||||
|
PRODUCT_NAME = speex;
|
||||||
|
ZERO_LINK = NO;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
73814ADF0907FB1E00C478FC /* Build configuration list for PBXNativeTarget "Speex" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
73814AE00907FB1E00C478FC /* Debug */,
|
||||||
|
73814AE10907FB1E00C478FC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
73814AE30907FB1E00C478FC /* Build configuration list for PBXProject "Speex" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
73814AE40907FB1E00C478FC /* Debug */,
|
||||||
|
73814AE50907FB1E00C478FC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
738837780B193687005C7A69 /* Build configuration list for PBXNativeTarget "libspeex (static)" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
738837790B193687005C7A69 /* Debug */,
|
||||||
|
7388377A0B193687005C7A69 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue