lpc.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. ********************************************************************************
  3. *
  4. * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
  5. * R99 Version 3.3.0
  6. * REL-4 Version 4.1.0
  7. *
  8. ********************************************************************************
  9. *
  10. * File : lpc.h
  11. * Purpose : 2 LP analyses centered at 2nd and 4th subframe
  12. * for mode 12.2. For all other modes a
  13. * LP analysis centered at 4th subframe is
  14. * performed.
  15. *
  16. ********************************************************************************
  17. */
  18. #ifndef lpc_h
  19. #define lpc_h "$Id $"
  20. /*
  21. ********************************************************************************
  22. * INCLUDE FILES
  23. ********************************************************************************
  24. */
  25. #include "typedef.h"
  26. #include "levinson.h"
  27. #include "mode.h"
  28. /*
  29. ********************************************************************************
  30. * LOCAL VARIABLES AND TABLES
  31. ********************************************************************************
  32. */
  33. /*
  34. ********************************************************************************
  35. * DEFINITION OF DATA TYPES
  36. ********************************************************************************
  37. */
  38. typedef struct {
  39. LevinsonState *levinsonSt;
  40. } lpcState;
  41. /*
  42. ********************************************************************************
  43. * DECLARATION OF PROTOTYPES
  44. ********************************************************************************
  45. */
  46. int lpc_init (lpcState **st);
  47. /* initialize one instance of the pre processing state.
  48. Stores pointer to filter status struct in *st. This pointer has to
  49. be passed to lpc in each call.
  50. returns 0 on success
  51. */
  52. int lpc_reset (lpcState *st);
  53. /* reset of pre processing state (i.e. set state memory to zero)
  54. returns 0 on success
  55. */
  56. void lpc_exit (lpcState **st);
  57. /* de-initialize pre processing state (i.e. free status struct)
  58. stores NULL in *st
  59. */
  60. int lpc(
  61. lpcState *st, /* i/o: State struct */
  62. enum Mode mode, /* i : coder mode */
  63. Word16 x[], /* i : Input signal Q15 */
  64. Word16 x_12k2[], /* i : Input signal (EFR) Q15 */
  65. Word16 a[] /* o : predictor coefficients Q12 */
  66. );
  67. #endif