lsp.h 2.5 KB

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