All sample rates/modes with fresh training now in CVS.
[platform/upstream/libvorbis.git] / lib / lpc.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
5  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
7  *                                                                  *
8  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
9  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
10  *                                                                  *
11  ********************************************************************
12
13   function: LPC low level routines
14   last mod: $Id: lpc.h,v 1.19 2002/07/11 06:40:49 xiphmont Exp $
15
16  ********************************************************************/
17
18 #ifndef _V_LPC_H_
19 #define _V_LPC_H_
20
21 #include "vorbis/codec.h"
22 #include "smallft.h"
23
24 typedef struct lpclook{
25   /* en/decode lookups */
26   drft_lookup fft;
27
28   int ln;
29   int m;
30
31 } lpc_lookup;
32
33 extern void lpc_init(lpc_lookup *l,long mapped, int m);
34 extern void lpc_clear(lpc_lookup *l);
35
36 /* simple linear scale LPC code */
37 extern float vorbis_lpc_from_data(float *data,float *lpc,int n,int m);
38 extern float vorbis_lpc_from_curve(float *curve,float *lpc,lpc_lookup *l);
39
40 extern void vorbis_lpc_predict(float *coeff,float *prime,int m,
41                                float *data,long n);
42
43 #endif