autocorr.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 : autocorr.h
  11. * Purpose : Compute autocorrelations of signal with windowing
  12. *
  13. ********************************************************************************
  14. */
  15. #ifndef autocorr_h
  16. #define autocorr_h "$Id $"
  17. /*
  18. ********************************************************************************
  19. * INCLUDE FILES
  20. ********************************************************************************
  21. */
  22. #include "typedef.h"
  23. /*
  24. ********************************************************************************
  25. * DEFINITION OF DATA TYPES
  26. ********************************************************************************
  27. */
  28. /*
  29. ********************************************************************************
  30. * DECLARATION OF PROTOTYPES
  31. ********************************************************************************
  32. */
  33. /*
  34. **************************************************************************
  35. *
  36. * Function : autocorr
  37. * Purpose : Compute autocorrelations of signal with windowing
  38. * Description : - Windowing of input speech: s'[n] = s[n] * w[n]
  39. * - Autocorrelations of input speech:
  40. * r[k] = sum_{i=k}^{239} s'[i]*s'[i-k] k=0,...,10
  41. * The autocorrelations are expressed in normalized
  42. * double precision format.
  43. * Returns : Autocorrelation
  44. *
  45. **************************************************************************
  46. */
  47. Word16 Autocorr (
  48. Word16 x[], /* (i) : Input signal (L_WINDOW) */
  49. Word16 m, /* (i) : LPC order */
  50. Word16 r_h[], /* (o) : Autocorrelations (msb) (MP1) */
  51. Word16 r_l[], /* (o) : Autocorrelations (lsb) (MP1) */
  52. const Word16 wind[]/* (i) : window for LPC analysis. (L_WINDOW) */
  53. );
  54. #endif