lpc.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
  5. * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
  6. * PLEASE READ THESE TERMS DISTRIBUTING. *
  7. * *
  8. * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
  9. * by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
  10. * http://www.xiph.org/ *
  11. * *
  12. ********************************************************************
  13. function: LPC low level routines
  14. last mod: $Id: lpc.h,v 1.9.4.1 2000/04/06 15:59:37 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_LPC_H_
  17. #define _V_LPC_H_
  18. #include "vorbis/codec.h"
  19. #include "smallft.h"
  20. typedef struct lpclook{
  21. /* en/decode lookups */
  22. drft_lookup fft;
  23. int ln;
  24. int m;
  25. } lpc_lookup;
  26. extern void lpc_init(lpc_lookup *l,long mapped, int m);
  27. extern void lpc_clear(lpc_lookup *l);
  28. /* simple linear scale LPC code */
  29. extern double vorbis_lpc_from_data(double *data,double *lpc,int n,int m);
  30. extern double vorbis_lpc_from_curve(double *curve,double *lpc,lpc_lookup *l);
  31. extern void vorbis_lpc_to_curve(double *curve,double *lpc,double amp,
  32. lpc_lookup *l);
  33. /* standard lpc stuff */
  34. extern void vorbis_lpc_residue(double *coeff,double *prime,int m,
  35. double *data,long n);
  36. extern void vorbis_lpc_predict(double *coeff,double *prime,int m,
  37. double *data,long n);
  38. #endif