FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/int_lpc.h @ 381:32bc48faec4b
libtwamr: integrate int_lpc.c
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 06 May 2024 05:35:21 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
380:2ed325c9a507 | 381:32bc48faec4b |
---|---|
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 : int_lpc.h | |
11 * Purpose : Interpolates the LSPs and converts to LPC parameters | |
12 * | |
13 ******************************************************************************** | |
14 */ | |
15 #ifndef int_lpc_h | |
16 #define int_lpc_h "$Id $" | |
17 | |
18 /* | |
19 ******************************************************************************** | |
20 * INCLUDE FILES | |
21 ******************************************************************************** | |
22 */ | |
23 #include "typedef.h" | |
24 | |
25 /* | |
26 ******************************************************************************** | |
27 * DEFINITION OF DATA TYPES | |
28 ******************************************************************************** | |
29 */ | |
30 | |
31 /* | |
32 ******************************************************************************** | |
33 * DECLARATION OF PROTOTYPES | |
34 ******************************************************************************** | |
35 */ | |
36 /* | |
37 ************************************************************************** | |
38 * | |
39 * Function : Int_lpc_1and3 | |
40 * Purpose : Interpolates the LSPs and converts to LPC parameters | |
41 * to get a different LP filter in each subframe. | |
42 * Description : The 20 ms speech frame is divided into 4 subframes. | |
43 * The LSPs are quantized and transmitted at the 2nd and | |
44 * 4th subframes (twice per frame) and interpolated at the | |
45 * 1st and 3rd subframe. | |
46 * | |
47 * |------|------|------|------| | |
48 * sf1 sf2 sf3 sf4 | |
49 * F0 Fm F1 | |
50 * | |
51 * sf1: 1/2 Fm + 1/2 F0 sf3: 1/2 F1 + 1/2 Fm | |
52 * sf2: Fm sf4: F1 | |
53 * Returns : void | |
54 * | |
55 ************************************************************************** | |
56 */ | |
57 void Int_lpc_1and3 ( | |
58 Word16 lsp_old[], /* i : LSP vector at the 4th subfr. of past frame (M) */ | |
59 Word16 lsp_mid[], /* i : LSP vector at the 2nd subfr. of | |
60 present frame (M) */ | |
61 Word16 lsp_new[], /* i : LSP vector at the 4th subfr. of | |
62 present frame (M) */ | |
63 Word16 Az[] /* o : interpolated LP parameters in all subfr. | |
64 (AZ_SIZE) */ | |
65 ); | |
66 | |
67 /* | |
68 ************************************************************************** | |
69 * | |
70 * Function : Int_lpc_1and3_2 | |
71 * Purpose : Interpolation of the LPC parameters. Same as the Int_lpc | |
72 * function but we do not recompute Az() for subframe 2 and | |
73 * 4 because it is already available. | |
74 * Returns : void | |
75 * | |
76 ************************************************************************** | |
77 */ | |
78 void Int_lpc_1and3_2 ( | |
79 Word16 lsp_old[], /* i : LSP vector at the 4th subfr. of past frame (M) */ | |
80 Word16 lsp_mid[], /* i : LSP vector at the 2nd subframe of | |
81 present frame (M) */ | |
82 Word16 lsp_new[], /* i : LSP vector at the 4th subframe of | |
83 present frame (M) */ | |
84 Word16 Az[] /* o :interpolated LP parameters | |
85 in subframes 1 and 3 (AZ_SIZE) */ | |
86 ); | |
87 | |
88 /* | |
89 ************************************************************************** | |
90 * | |
91 * Function : Int_lpc_1to3 | |
92 * Purpose : Interpolates the LSPs and converts to LPC parameters | |
93 * to get a different LP filter in each subframe. | |
94 * Description : The 20 ms speech frame is divided into 4 subframes. | |
95 * The LSPs are quantized and transmitted at the 4th | |
96 * subframes (once per frame) and interpolated at the | |
97 * 1st, 2nd and 3rd subframe. | |
98 * | |
99 * |------|------|------|------| | |
100 * sf1 sf2 sf3 sf4 | |
101 * F0 F1 | |
102 * | |
103 * sf1: 3/4 F0 + 1/4 F1 sf3: 1/4 F0 + 3/4 F1 | |
104 * sf2: 1/2 F0 + 1/2 F1 sf4: F1 | |
105 * Returns : void | |
106 * | |
107 ************************************************************************** | |
108 */ | |
109 void Int_lpc_1to3 ( | |
110 Word16 lsp_old[], /* i : LSP vector at the 4th SF of past frame (M) */ | |
111 Word16 lsp_new[], /* i : LSP vector at the 4th SF of present frame (M) */ | |
112 Word16 Az[] /* o : interpolated LP parameters in all SFs (AZ_SIZE) */ | |
113 ); | |
114 | |
115 /* | |
116 ************************************************************************** | |
117 * | |
118 * Function : Int_lpc_1to3_2 | |
119 * Purpose : Interpolation of the LPC parameters. Same as the Int_lpc | |
120 * function but we do not recompute Az() for subframe 4 | |
121 * because it is already available. | |
122 * Returns : void | |
123 * | |
124 ************************************************************************** | |
125 */ | |
126 void Int_lpc_1to3_2 ( | |
127 Word16 lsp_old[], /* i : LSP vector at the 4th SF of past frame (M) */ | |
128 Word16 lsp_new[], /* i : LSP vector at the 4th SF present frame (M) */ | |
129 Word16 Az[] /* o :interpolated LP parameters in SFs 1, 2, 3 | |
130 (AZ_SIZE) */ | |
131 ); | |
132 | |
133 #endif |