Debian Codegraph @

libs/Music/LPC.h

raw
1 #ifndef _LPC_h_
2 #define _LPC_h_
3
4 // http://kbs.cs.tu-berlin.de/~jutta/gsm/lpc.html
5
6 /* LPC- and Reflection Coefficients
7 *
8 * The next two functions calculate linear prediction coefficients
9 * and/or the related reflection coefficients from the first P_MAX+1
10 * values of the autocorrelation function.
11 */
12
13 /* Invented by N. Levinson in 1947, modified by J. Durbin in 1959.
14 */
15 double /* returns minimum mean square error */
16 levinson_durbin(
17 double const * ac, /* in: [0...p] autocorrelation values */
18 double * ref, /* out: [0...p-1] reflection coef's */
19 double * lpc); /* [0...p-1] LPC coefficients */
20
21 /* I. Sch"ur's recursion from 1917 is related to the Levinson-Durbin
22 * method, but faster on parallel architectures; where Levinson-Durbin
23 * would take time proportional to p * log(p), Sch"ur only requires
24 * time proportional to p. The GSM coder uses an integer version of
25 * the Sch"ur recursion.
26 */
27 double /* returns the minimum mean square error */
28 schur( double const * ac, /* in: [0...p] autocorrelation c's */
29 double * ref); /* out: [0...p-1] reflection c's */
30
31 #endif