FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/pstfilt.h @ 401:59655481e45b
libtwamr: integrate pstfilt.c
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 06 May 2024 19:44:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
400:ffd48f0a2ab5 | 401:59655481e45b |
---|---|
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 : pstfilt.h | |
11 * Purpose : Performs adaptive postfiltering on the synthesis | |
12 * : speech | |
13 * | |
14 ******************************************************************************** | |
15 */ | |
16 #ifndef pstfilt_h | |
17 #define pstfilt_h "$Id $" | |
18 | |
19 /* | |
20 ******************************************************************************** | |
21 * INCLUDE FILES | |
22 ******************************************************************************** | |
23 */ | |
24 #include "tw_amr.h" | |
25 #include "typedef.h" | |
26 #include "cnst.h" | |
27 #include "preemph.h" | |
28 #include "agc.h" | |
29 /* | |
30 ******************************************************************************** | |
31 * DEFINITION OF DATA TYPES | |
32 ******************************************************************************** | |
33 */ | |
34 typedef struct{ | |
35 Word16 res2[L_SUBFR]; | |
36 Word16 mem_syn_pst[M]; | |
37 preemphasisState preemph_state; | |
38 agcState agc_state; | |
39 Word16 synth_buf[M + L_FRAME]; | |
40 } Post_FilterState; | |
41 | |
42 /* | |
43 ******************************************************************************** | |
44 * DECLARATION OF PROTOTYPES | |
45 ******************************************************************************** | |
46 */ | |
47 | |
48 void Post_Filter_reset (Post_FilterState *st); | |
49 /* reset post filter (i.e. set state memory to zero) | |
50 returns 0 on success | |
51 */ | |
52 | |
53 int Post_Filter ( | |
54 Post_FilterState *st, /* i/o : post filter states */ | |
55 enum Mode mode, /* i : AMR mode */ | |
56 Word16 *syn, /* i/o : synthesis speech (postfiltered is output) */ | |
57 Word16 *Az_4 /* i : interpolated LPC parameters in all subfr. */ | |
58 ); | |
59 /* filters the signal syn using the parameters in Az_4 to calculate filter | |
60 coefficients. | |
61 The filter must be set up using Post_Filter_init prior to the first call | |
62 to Post_Filter. Post_FilterState is updated to mirror the current state | |
63 of the filter | |
64 | |
65 return 0 on success | |
66 */ | |
67 | |
68 #endif |