diff options
author | Alfred E. Heggestad <aeh@db.org> | 2009-01-30 19:30:16 +0300 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2009-01-30 19:30:16 +0300 |
commit | 0da5a11cf45d51b09fc1fb659eb98fcb46bf80af (patch) | |
tree | cca814df73286f5c306d134001c5521513daca9d /libspeex | |
parent | 97303fce573ab91f23b0cc7fe71781d2f9d04da8 (diff) |
Cosmetic fixes
Diffstat (limited to 'libspeex')
-rw-r--r-- | libspeex/arch.h | 2 | ||||
-rw-r--r-- | libspeex/filters.c | 2 | ||||
-rw-r--r-- | libspeex/lsp.h | 124 | ||||
-rw-r--r-- | libspeex/nb_celp.c | 4 | ||||
-rw-r--r-- | libspeex/preprocess.c | 4 | ||||
-rw-r--r-- | libspeex/sb_celp.c | 4 |
6 files changed, 64 insertions, 76 deletions
diff --git a/libspeex/arch.h b/libspeex/arch.h index 1de9f92..3b47ed9 100644 --- a/libspeex/arch.h +++ b/libspeex/arch.h @@ -89,7 +89,7 @@ #ifdef FIXED_POINT typedef spx_int16_t spx_word16_t; -typedef spx_int32_t spx_word32_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; diff --git a/libspeex/filters.c b/libspeex/filters.c index 473e16c..79f6546 100644 --- a/libspeex/filters.c +++ b/libspeex/filters.c @@ -601,7 +601,7 @@ const float shift_filt[3][7] = {{-0.011915f, 0.046995f, -0.152373f, 0.614108f, 0 #endif #endif -int interp_pitch( +static int interp_pitch( spx_word16_t *exc, /*decoded excitation*/ spx_word16_t *interp, /*decoded excitation*/ int pitch, /*pitch period*/ diff --git a/libspeex/lsp.h b/libspeex/lsp.h index 4f8f9e9..d19c62a 100644 --- a/libspeex/lsp.h +++ b/libspeex/lsp.h @@ -1,62 +1,62 @@ -/*---------------------------------------------------------------------------*\
-Original Copyright
- FILE........: AK2LSPD.H
- TYPE........: Turbo C header file
- COMPANY.....: Voicetronix
- AUTHOR......: James Whitehall
- DATE CREATED: 21/11/95
-
-Modified by Jean-Marc Valin
-
- This file contains functions for converting Linear Prediction
- Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the
- LSP coefficients are not in radians format but in the x domain of the
- unit circle.
-
-\*---------------------------------------------------------------------------*/
-/**
- @file lsp.h
- @brief Line Spectral Pair (LSP) functions.
-*/
-/* Speex License:
-
- 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 __AK2LSPD__
-#define __AK2LSPD__
-
-#include "arch.h"
-
-int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack);
-void lsp_to_lpc(spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack);
-
-/*Added by JMV*/
-void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes, spx_word16_t margin);
-
-#endif /* __AK2LSPD__ */
+/*---------------------------------------------------------------------------*\ +Original Copyright + FILE........: AK2LSPD.H + TYPE........: Turbo C header file + COMPANY.....: Voicetronix + AUTHOR......: James Whitehall + DATE CREATED: 21/11/95 + +Modified by Jean-Marc Valin + + This file contains functions for converting Linear Prediction + Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the + LSP coefficients are not in radians format but in the x domain of the + unit circle. + +\*---------------------------------------------------------------------------*/ +/** + @file lsp.h + @brief Line Spectral Pair (LSP) functions. +*/ +/* Speex License: + + 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 __AK2LSPD__ +#define __AK2LSPD__ + +#include "arch.h" + +int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack); +void lsp_to_lpc(spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack); + +/*Added by JMV*/ +void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes, spx_word16_t margin); + +#endif /* __AK2LSPD__ */ diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c index b696ebb..53ed54f 100644 --- a/libspeex/nb_celp.c +++ b/libspeex/nb_celp.c @@ -54,10 +54,6 @@ #include "vorbis_psy.h" #endif -#ifndef M_PI -#define M_PI 3.14159265358979323846 /* pi */ -#endif - #ifndef NULL #define NULL 0 #endif diff --git a/libspeex/preprocess.c b/libspeex/preprocess.c index 9b114a8..3920a76 100644 --- a/libspeex/preprocess.c +++ b/libspeex/preprocess.c @@ -68,10 +68,6 @@ #include "math_approx.h" #include "os_support.h" -#ifndef M_PI -#define M_PI 3.14159263 -#endif - #define LOUDNESS_EXP 5.f #define AMP_SCALE .001f #define AMP_SCALE_1 1000.f diff --git a/libspeex/sb_celp.c b/libspeex/sb_celp.c index ab7000c..adee4df 100644 --- a/libspeex/sb_celp.c +++ b/libspeex/sb_celp.c @@ -65,10 +65,6 @@ #ifndef DISABLE_WIDEBAND -#ifndef M_PI -#define M_PI 3.14159265358979323846 /* pi */ -#endif - #define sqr(x) ((x)*(x)) #define SUBMODE(x) st->submodes[st->submodeID]->x |