comparison libtwamr/levinson.h @ 385:c713061b6edf

libtwamr: integrate levinson.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 06:01:56 +0000
parents
children
comparison
equal deleted inserted replaced
384:a8dab7028e4d 385:c713061b6edf
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 : levinson.h
11 * Purpose : Levinson-Durbin algorithm in double precision.
12 * : To compute the LP filter parameters from the
13 * : speech autocorrelations.
14 *
15 ********************************************************************************
16 */
17 #ifndef levinson_h
18 #define levinson_h "$Id $"
19
20 /*
21 ********************************************************************************
22 * INCLUDE FILES
23 ********************************************************************************
24 */
25 #include "typedef.h"
26 #include "cnst.h"
27
28 /*
29 ********************************************************************************
30 * LOCAL VARIABLES AND TABLES
31 ********************************************************************************
32 */
33
34 /*
35 ********************************************************************************
36 * DEFINITION OF DATA TYPES
37 ********************************************************************************
38 */
39 typedef struct {
40 Word16 old_A[M + 1]; /* Last A(z) for case of unstable filter */
41 } LevinsonState;
42
43 /*
44 ********************************************************************************
45 * DECLARATION OF PROTOTYPES
46 ********************************************************************************
47 */
48
49 void Levinson_reset (LevinsonState *st);
50 /* reset of pre processing state (i.e. set state memory to zero)
51 returns 0 on success
52 */
53
54 int Levinson (
55 LevinsonState *st,
56 Word16 Rh[], /* i : Rh[m+1] Vector of autocorrelations (msb) */
57 Word16 Rl[], /* i : Rl[m+1] Vector of autocorrelations (lsb) */
58 Word16 A[], /* o : A[m] LPC coefficients (m = 10) */
59 Word16 rc[] /* o : rc[4] First 4 reflection coefficients */
60 );
61
62 #endif