comparison libtwamr/cl_ltp.h @ 406:85e9768d497f

libtwamr: integrate cl_ltp.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 23:32:59 +0000
parents
children
comparison
equal deleted inserted replaced
405:8fff74ca83e8 406:85e9768d497f
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 : cl_ltp.h
11 * Purpose : Closed-loop fractional pitch search
12 *
13 ********************************************************************************
14 */
15 #ifndef cl_ltp_h
16 #define cl_ltp_h "$Id $"
17
18 /*
19 ********************************************************************************
20 * INCLUDE FILES
21 ********************************************************************************
22 */
23 #include "tw_amr.h"
24 #include "typedef.h"
25 #include "pitch_fr.h"
26 #include "ton_stab.h"
27
28 /*
29 ********************************************************************************
30 * LOCAL VARIABLES AND TABLES
31 ********************************************************************************
32 */
33
34 /*
35 ********************************************************************************
36 * DEFINITION OF DATA TYPES
37 ********************************************************************************
38 */
39
40 /* state variable */
41 typedef struct {
42 Pitch_frState pitchSt;
43 } clLtpState;
44
45 /*
46 ********************************************************************************
47 * DECLARATION OF PROTOTYPES
48 ********************************************************************************
49 */
50
51 void cl_ltp_reset (clLtpState *st);
52 /* reset of pre processing state (i.e. set state memory to zero)
53 returns 0 on success
54 */
55
56 int cl_ltp(
57 clLtpState *clSt, /* i/o : State struct */
58 tonStabState *tonSt, /* i/o : State struct */
59 enum Mode mode, /* i : coder mode */
60 Word16 frameOffset, /* i : Offset to subframe */
61 Word16 T_op[], /* i : Open loop pitch lags */
62 Word16 *h1, /* i : Impulse response vector Q12 */
63 Word16 *exc, /* i/o : Excitation vector Q0 */
64 Word16 res2[], /* i/o : Long term prediction residual Q0 */
65 Word16 xn[], /* i : Target vector for pitch search Q0 */
66 Word16 lsp_flag, /* i : LSP resonance flag */
67 Word16 xn2[], /* o : Target vector for codebook search Q0 */
68 Word16 y1[], /* o : Filtered adaptive excitation Q0 */
69 Word16 *T0, /* o : Pitch delay (integer part) */
70 Word16 *T0_frac, /* o : Pitch delay (fractional part) */
71 Word16 *gain_pit, /* o : Pitch gain Q14 */
72 Word16 g_coeff[], /* o : Correlations between xn, y1, & y2 */
73 Word16 **anap, /* o : Analysis parameters */
74 Word16 *gp_limit /* o : pitch gain limit */
75 );
76
77 #endif