FreeCalypso > hg > gsm-codec-lib
annotate libtwamr/int_lsf.h @ 409:4184ccc136a3
libtwamr/typedef.h: drop Pfloat from EFR, not used in AMR
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 07 May 2024 01:04:17 +0000 |
parents | 693ea1d5cf1e |
children |
rev | line source |
---|---|
382
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * R99 Version 3.3.0 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * REL-4 Version 4.1.0 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 * File : int_lsf.h |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 * Purpose : Interpolates the LSFs |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #ifndef int_lsf_h |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #define int_lsf_h "$Id $" |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 /* |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 * INCLUDE FILES |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #include "typedef.h" |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /* |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 * DEFINITION OF DATA TYPES |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 /* |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 * DECLARATION OF PROTOTYPES |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 ******************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 /* |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 ************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 * Function : Int_lsf |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 * Purpose : Interpolates the LSFs for selected subframe |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 * Description : The 20 ms speech frame is divided into 4 subframes. |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 * The LSFs are interpolated at the 1st, 2nd and 3rd |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 * subframe and only forwarded at the 4th subframe. |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 * |------|------|------|------| |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 * sf1 sf2 sf3 sf4 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 * F0 F1 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 * sf1: 3/4 F0 + 1/4 F1 sf3: 1/4 F0 + 3/4 F1 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 * sf2: 1/2 F0 + 1/2 F1 sf4: F1 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 * Returns : void |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 * |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 ************************************************************************** |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 void Int_lsf ( |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 Word16 lsf_old[], /* i : LSF vector at the 4th SF of past frame */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 Word16 lsf_new[], /* i : LSF vector at the 4th SF of present frame */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 Word16 i_subfr, /* i : Pointer to current sf (equal to 0,40,80 or 120) */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 Word16 lsf_out[] /* o : interpolated LSF parameters for current sf */ |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 ); |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 |
693ea1d5cf1e
libtwamr: integrate int_lsf.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 #endif |