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