comparison libtwamr/lsp.h @ 388:550d3594c878

libtwamr: integrate lsp.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 06:43:22 +0000
parents
children
comparison
equal deleted inserted replaced
387:7818f466a639 388:550d3594c878
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.h
11 * Purpose : Conversion from A(z) to LSP. Quantization and
12 * interpolation of LSPs.
13 *
14 ********************************************************************************
15 */
16 #ifndef lsp_h
17 #define lsp_h "$Id $"
18
19 /*
20 ********************************************************************************
21 * INCLUDE FILES
22 ********************************************************************************
23 */
24 #include "tw_amr.h"
25 #include "typedef.h"
26 #include "q_plsf.h"
27
28 /*
29 ********************************************************************************
30 * LOCAL VARIABLES AND TABLES
31 ********************************************************************************
32 */
33
34 /*
35 ********************************************************************************
36 * DEFINITION OF DATA TYPES
37 ********************************************************************************
38 */
39 typedef struct {
40 /* Past LSPs */
41 Word16 lsp_old[M];
42 Word16 lsp_old_q[M];
43
44 /* Quantization state */
45 Q_plsfState qSt;
46 } lspState;
47
48 /*
49 ********************************************************************************
50 * DECLARATION OF PROTOTYPES
51 ********************************************************************************
52 */
53
54 /*
55 **************************************************************************
56 *
57 * Function : lsp_reset
58 * Purpose : Resets state memory
59 * Returns : 0 on success
60 *
61 **************************************************************************
62 */
63 void lsp_reset (lspState *st);
64
65 /*
66 **************************************************************************
67 *
68 * Function : lsp
69 * Purpose : Conversion from LP coefficients to LSPs.
70 * Quantization of LSPs.
71 * Description : Generates 2 sets of LSPs from 2 sets of
72 * LP coefficients for mode 12.2. For the other
73 * modes 1 set of LSPs is generated from 1 set of
74 * LP coefficients. These LSPs are quantized with
75 * Matrix/Vector quantization (depending on the mode)
76 * and interpolated for the subframes not yet having
77 * their own LSPs.
78 *
79 **************************************************************************
80 */
81 int lsp(lspState *st, /* i/o : State struct */
82 enum Mode req_mode, /* i : requested coder mode */
83 enum Mode used_mode, /* i : used coder mode */
84 Word16 az[], /* i/o : interpolated LP parameters Q12 */
85 Word16 azQ[], /* o : quantization interpol. LP parameters Q12*/
86 Word16 lsp_new[], /* o : new lsp vector */
87 Word16 **anap /* o : analysis parameters */
88 );
89
90 #endif