]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/ext/speex/lsp.h
wwww
[16.git] / src / lib / doslib / ext / speex / lsp.h
1 /*---------------------------------------------------------------------------*\\r
2 Original Copyright\r
3         FILE........: AK2LSPD.H\r
4         TYPE........: Turbo C header file\r
5         COMPANY.....: Voicetronix\r
6         AUTHOR......: James Whitehall\r
7         DATE CREATED: 21/11/95\r
8 \r
9 Modified by Jean-Marc Valin\r
10 \r
11     This file contains functions for converting Linear Prediction\r
12     Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the\r
13     LSP coefficients are not in radians format but in the x domain of the\r
14     unit circle.\r
15 \r
16 \*---------------------------------------------------------------------------*/\r
17 /**\r
18    @file lsp.h\r
19    @brief Line Spectral Pair (LSP) functions.\r
20 */\r
21 /* Speex License:\r
22 \r
23    Redistribution and use in source and binary forms, with or without\r
24    modification, are permitted provided that the following conditions\r
25    are met:\r
26    \r
27    - Redistributions of source code must retain the above copyright\r
28    notice, this list of conditions and the following disclaimer.\r
29    \r
30    - Redistributions in binary form must reproduce the above copyright\r
31    notice, this list of conditions and the following disclaimer in the\r
32    documentation and/or other materials provided with the distribution.\r
33    \r
34    - Neither the name of the Xiph.org Foundation nor the names of its\r
35    contributors may be used to endorse or promote products derived from\r
36    this software without specific prior written permission.\r
37    \r
38    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
39    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
40    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
41    A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR\r
42    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
43    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
44    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
45    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
46    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
47    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
48    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
49 */\r
50 \r
51 #ifndef __AK2LSPD__\r
52 #define __AK2LSPD__\r
53 \r
54 #include "arch.h"\r
55 \r
56 int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack);\r
57 void lsp_to_lpc(spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack);\r
58 \r
59 /*Added by JMV*/\r
60 void lsp_enforce_margin(spx_lsp_t *lsp, int len, spx_word16_t margin);\r
61 \r
62 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);\r
63 \r
64 #endif  /* __AK2LSPD__ */\r