comparison libtwamr/lsp_avg.h @ 389:9cd332a94c97

libtwamr: integrate lsp_avg.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 06:49:54 +0000
parents
children
comparison
equal deleted inserted replaced
388:550d3594c878 389:9cd332a94c97
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 : lsp_avg.h
11 * Purpose: : LSP averaging and history
12 * The LSPs are averaged over 8 frames
13 *
14 ********************************************************************************
15 */
16 #ifndef lsp_avg_h
17 #define lsp_avg_h "$Id $"
18
19 /*
20 ********************************************************************************
21 * INCLUDE FILES
22 ********************************************************************************
23 */
24 #include "typedef.h"
25 #include "cnst.h"
26
27 /*
28 ********************************************************************************
29 * LOCAL VARIABLES AND TABLES
30 ********************************************************************************
31 */
32
33 #define EXPCONST 5243 /* 0.16 in Q15 */
34
35 /*
36 ********************************************************************************
37 * DEFINITION OF DATA TYPES
38 ********************************************************************************
39 */
40 typedef struct {
41 Word16 lsp_meanSave[M]; /* Averaged LSPs saved for efficiency */
42 } lsp_avgState;
43
44 /*
45 ********************************************************************************
46 * DECLARATION OF PROTOTYPES
47 ********************************************************************************
48 */
49
50 /*
51 **************************************************************************
52 *
53 * Function : lsp_history_reset
54 * Purpose : Resets state memory
55 *
56 **************************************************************************
57 */
58 void lsp_avg_reset (
59 lsp_avgState *state
60 );
61
62 /*
63 **************************************************************************
64 *
65 * Function : lsp_avg
66 * Purpose : Calculate the LSP averages
67 *
68 **************************************************************************
69 */
70 void lsp_avg (
71 lsp_avgState *st, /* i/o : State struct Q15 */
72 Word16 *lsp /* i : LSP vector Q15 */
73 );
74 #endif