FreeCalypso > hg > efr-experiments
comparison src/vad.h @ 0:56410792419a
src: original EFR source from ETSI
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 03 Apr 2024 05:31:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:56410792419a |
---|---|
1 /*************************************************************************** | |
2 * | |
3 * File Name: vad.h | |
4 * | |
5 * Purpose: Contains the prototypes for all functions of voice activity | |
6 * detection. Also contains the type definition for the pseudo | |
7 * floating point data type. | |
8 * | |
9 **************************************************************************/ | |
10 | |
11 /* Struct for storing pseudo floating point exponent and mantissa */ | |
12 struct _fp | |
13 { | |
14 Word16 e; /* exponent */ | |
15 Word16 m; /* mantissa */ | |
16 }; | |
17 | |
18 typedef struct _fp Pfloat; | |
19 | |
20 void vad_reset (void); | |
21 | |
22 Word16 vad_computation ( | |
23 Word16 r_h[], | |
24 Word16 r_l[], | |
25 Word16 scal_acf, | |
26 Word16 rc[], | |
27 Word16 ptch | |
28 ); | |
29 | |
30 void energy_computation ( | |
31 Word16 r_h[], | |
32 Word16 scal_acf, | |
33 Word16 rvad[], | |
34 Word16 scal_rvad, | |
35 Pfloat * acf0, | |
36 Pfloat * pvad | |
37 ); | |
38 | |
39 void acf_averaging ( | |
40 Word16 r_h[], | |
41 Word16 r_l[], | |
42 Word16 scal_acf, | |
43 Word32 L_av0[], | |
44 Word32 L_av1[] | |
45 ); | |
46 | |
47 void predictor_values ( | |
48 Word32 L_av1[], | |
49 Word16 rav1[], | |
50 Word16 *scal_rav1 | |
51 ); | |
52 | |
53 void schur_recursion ( | |
54 Word32 L_av1[], | |
55 Word16 vpar[] | |
56 ); | |
57 | |
58 void step_up ( | |
59 Word16 np, | |
60 Word16 vpar[], | |
61 Word16 aav1[] | |
62 ); | |
63 | |
64 void compute_rav1 ( | |
65 Word16 aav1[], | |
66 Word16 rav1[], | |
67 Word16 *scal_rav1 | |
68 ); | |
69 | |
70 Word16 spectral_comparison ( | |
71 Word16 rav1[], | |
72 Word16 scal_rav1, | |
73 Word32 L_av0[] | |
74 ); | |
75 | |
76 void threshold_adaptation ( | |
77 Word16 stat, | |
78 Word16 ptch, | |
79 Word16 tone, | |
80 Word16 rav1[], | |
81 Word16 scal_rav1, | |
82 Pfloat pvad, | |
83 Pfloat acf0, | |
84 Word16 rvad[], | |
85 Word16 *scal_rvad, | |
86 Pfloat * thvad | |
87 ); | |
88 | |
89 void tone_detection ( | |
90 Word16 rc[], | |
91 Word16 *tone | |
92 ); | |
93 | |
94 Word16 vad_decision ( | |
95 Pfloat pvad, | |
96 Pfloat thvad | |
97 ); | |
98 | |
99 Word16 vad_hangover ( | |
100 Word16 vvad | |
101 ); | |
102 | |
103 void periodicity_update ( | |
104 Word16 lags[], | |
105 Word16 *ptch | |
106 ); |