home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / c / lpc05b.zip / LPC.H < prev    next >
C/C++ Source or Header  |  1992-05-22  |  2KB  |  55 lines

  1. /*
  2. *----------------------------------------------------------------------- 
  3. *    file:    lpc.h
  4. *    desct:    lpc.c header
  5. *    by:    patrick ko shu pui
  6. *    date:    23 may 1992
  7. *-----------------------------------------------------------------------
  8. */
  9. /*
  10. *----------------------------------------------------------------------- 
  11. *    LPC methods \
  12. *
  13. *        LPCCOVAR = LPC using covariance method
  14. *        LPCAUTOCOR = LPC using autocorrelation method
  15. *        LPCCEPSTRUM = LPC CEPSTRUM 
  16. *        PARCOR    = PARtial CORrelation coefficients
  17. *-----------------------------------------------------------------------
  18. */
  19.  
  20. #define    LPCCOVAR    128
  21. #define    LPCAUTOCOR    129
  22. #define    LPCCEPSTRUM    130
  23. #define    PARCOR        131
  24.  
  25.  
  26. /*
  27. *----------------------------------------------------------------------- 
  28. * input data types
  29. *-----------------------------------------------------------------------
  30. */
  31. #define    AUDIOULAW8    1
  32. #define    AUDIOPCM16    2
  33.  
  34. /*
  35. *----------------------------------------------------------------------- 
  36. * data normalization to (-1,+1)
  37. *-----------------------------------------------------------------------
  38. */
  39. #define norm_s2d(x)    ((unsigned short)(x) == 0x8000? -1 : \
  40.             ((double)((short)(x))) / 32767.0)
  41.  
  42. extern short ulaw2linear[];
  43. #define    u2s(x)        (ulaw2linear[(unsigned char)(x)])
  44. /*
  45. *-----------------------------------------------------------------------
  46. *    function declarations
  47. *-----------------------------------------------------------------------
  48. */
  49. MATRIX cepstrum( );
  50. int normeqn_cv( );
  51. MATRIX lpc1( );
  52. int normeqn_ac( );
  53. MATRIX lpc2( );
  54.  
  55.