comparison libtwamr/p_ol_wgh.h @ 416:48c7f8e8c9af

libtwamr: integrate p_ol_wgh.c
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 May 2024 03:15:19 +0000
parents
children
comparison
equal deleted inserted replaced
415:01c4becb9fda 416:48c7f8e8c9af
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 : p_ol_wgh.h
11 * Purpose : Compute the open loop pitch lag with weighting.
12 *
13 ********************************************************************************
14 */
15 #ifndef p_ol_wgh_h
16 #define p_ol_wgh_h "$Id $"
17
18 /*
19 ********************************************************************************
20 * INCLUDE FILES
21 ********************************************************************************
22 */
23 #include "tw_amr.h"
24 #include "typedef.h"
25 #include "vad.h"
26
27 /*
28 ********************************************************************************
29 * DEFINITION OF DATA TYPES
30 ********************************************************************************
31 */
32 /* state variable */
33 typedef struct {
34 Word16 old_T0_med;
35 Word16 ada_w;
36 Word16 wght_flg;
37 } pitchOLWghtState;
38
39 /*
40 ********************************************************************************
41 * DECLARATION OF PROTOTYPES
42 ********************************************************************************
43 */
44
45 void p_ol_wgh_reset (pitchOLWghtState *st);
46 /* reset of pre processing state (i.e. set state memory to zero)
47 returns 0 on success
48 */
49
50 Word16 Pitch_ol_wgh ( /* o : open loop pitch lag */
51 pitchOLWghtState *st, /* i/o : State struct */
52 vadState *vadSt, /* i/o : VAD state struct */
53 Word16 signal[], /* i : signal used to compute the open loop pitch */
54 /* signal[-pit_max] to signal[-1] should be known */
55 Word16 pit_min, /* i : minimum pitch lag */
56 Word16 pit_max, /* i : maximum pitch lag */
57 Word16 L_frame, /* i : length of frame to compute pitch */
58 Word16 old_lags[], /* i : history with old stored Cl lags */
59 Word16 ol_gain_flg[], /* i : OL gain flag */
60 Word16 idx, /* i : index */
61 Flag dtx /* i : dtx flag; use dtx=1, do not use dtx=0 */
62 );
63
64 #endif