FreeCalypso > hg > gsm-codec-lib
annotate libtwamr/calc_cor.h @ 468:4104b0390fab
efrtest: new program gsmefr-dlcap-sync
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 13 May 2024 07:21:09 +0000 |
parents | 67c31802392b |
children |
rev | line source |
---|---|
325
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001 |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * R99 Version 3.3.0 |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * REL-4 Version 4.1.0 |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 * File : calc_cor.h |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 * Purpose : Calculate all correlations for prior the OL LTP |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #ifndef calc_cor_h |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #define calc_cor_h "$Id $" |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 /* |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 * INCLUDE FILES |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 #include "typedef.h" |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /* |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 * DECLARATION OF PROTOTYPES |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 ******************************************************************************** |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 /************************************************************************* |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 * FUNCTION: comp_corr |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 * PURPOSE: Calculate all correlations of scal_sig[] in a given delay |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 * range. |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 * DESCRIPTION: |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 * The correlation is given by |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 * cor[t] = <scal_sig[n], scal_sig[n-t]>, t=lag_min,...,lag_max |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 * The functions outputs all correlations in the given range |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 * |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 *************************************************************************/ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 void comp_corr (Word16 scal_sig[], /* i : scaled signal. */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 Word16 L_frame, /* i : length of frame to compute pitch */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 Word16 lag_max, /* i : maximum lag */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 Word16 lag_min, /* i : minimum lag */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 Word32 corr[] /* o : correlation of selected lag */ |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 ); |
67c31802392b
libtwamr: integrate calc_cor.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 #endif |