FreeCalypso > hg > gsm-codec-lib
annotate libtwamr/post_pro.h @ 514:67b13a6a63c9
libgsmhr1: implement validation for *.dec frames
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 25 Aug 2024 19:14:40 +0000 |
parents | a0f914a28371 |
children |
rev | line source |
---|---|
392
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * R99 Version 3.3.0 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * REL-4 Version 4.1.0 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 * |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 * File : post_pro.h |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 * Purpose : Postprocessing of output speech. |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 * |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 * - 2nd order high pass filtering with cut |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 * off frequency at 60 Hz. |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 * - Multiplication of output by two. |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 * |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #ifndef post_pro_h |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 #define post_pro_h "$Id $" |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 /* |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 * INCLUDE FILES |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 #include "typedef.h" |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 /* |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 * LOCAL VARIABLES AND TABLES |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 /* |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 * DEFINITION OF DATA TYPES |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 typedef struct { |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 Word16 y2_hi; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 Word16 y2_lo; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 Word16 y1_hi; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 Word16 y1_lo; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 Word16 x0; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 Word16 x1; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 } Post_ProcessState; |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 /* |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 * DECLARATION OF PROTOTYPES |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 ******************************************************************************** |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 void Post_Process_reset (Post_ProcessState *st); |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 /* reset of Post processing state (i.e. set state memory to zero) |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 returns 0 on success |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 int Post_Process ( |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 Post_ProcessState *st, /* i/o : post process state */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 Word16 signal[], /* i/o : signal */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 Word16 lg /* i : lenght of signal */ |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 ); |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
a0f914a28371
libtwamr: integrate post_pro.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 #endif |