comparison libtwamr/pitch_fr.h @ 391:be8edf9e6bc1

libtwamr: integrate pitch_fr.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 18:30:00 +0000
parents
children
comparison
equal deleted inserted replaced
390:bde9f5804670 391:be8edf9e6bc1
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 : pitch_fr.h
11 * Purpose : Find the pitch period with 1/3 or 1/6 subsample
12 * : resolution (closed loop).
13 *
14 ********************************************************************************
15 */
16 #ifndef pitch_fr_h
17 #define pitch_fr_h "$Id $"
18
19 /*
20 ********************************************************************************
21 * INCLUDE FILES
22 ********************************************************************************
23 */
24 #include "tw_amr.h"
25 #include "typedef.h"
26
27 /*
28 ********************************************************************************
29 * DEFINITION OF DATA TYPES
30 ********************************************************************************
31 */
32 typedef struct {
33 Word16 T0_prev_subframe; /* integer pitch lag of previous sub-frame */
34 } Pitch_frState;
35
36 /*
37 ********************************************************************************
38 * DECLARATION OF PROTOTYPES
39 ********************************************************************************
40 */
41
42 void Pitch_fr_reset (Pitch_frState *st);
43 /* reset of pre processing state (i.e. set state memory to zero)
44 returns 0 on success
45 */
46
47 Word16 Pitch_fr ( /* o : pitch period (integer) */
48 Pitch_frState *st, /* i/o : State struct */
49 enum Mode mode, /* i : codec mode */
50 Word16 T_op[], /* i : open loop pitch lags */
51 Word16 exc[], /* i : excitation buffer */
52 Word16 xn[], /* i : target vector */
53 Word16 h[], /* i : impulse response of synthesis and
54 weighting filters */
55 Word16 L_subfr, /* i : Length of subframe */
56 Word16 i_subfr, /* i : subframe offset */
57 Word16 *pit_frac, /* o : pitch period (fractional) */
58 Word16 *resu3, /* o : subsample resolution 1/3 (=1) or 1/6 (=0) */
59 Word16 *ana_index /* o : index of encoding */
60 );
61
62 #endif