annotate libtwamr/hp_max.h @ 483:4f13db3a7086

doc/Utils-overview: document new utilities
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 20 May 2024 01:26:12 +0000
parents 176a44ff94a1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
379
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * R99 Version 3.3.0
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * REL-4 Version 4.1.0
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 * File : hp_max.h
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 * Purpose : Find the maximum correlation of scal_sig[] in a given
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 * delay range.
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #ifndef hp_max_h
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #define hp_max_h "$Id $"
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 /*
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 * INCLUDE FILES
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "typedef.h"
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 /*
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 * DECLARATION OF PROTOTYPES
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 ********************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /*************************************************************************
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 * FUNCTION: hp_max
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 * PURPOSE: Find the maximum high-pass filtered correlation of
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 * signal scal_sig[] in a given delay range.
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 * DESCRIPTION:
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 * The correlation is given by
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 * corr[t] = <scal_sig[n],scal_sig[n-t]>, t=lag_min,...,lag_max
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 * The functions outputs the maximum high-pass filtered correlation
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 * after normalization.
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 *
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 *************************************************************************/
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 Word16 hp_max (
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 Word32 corr[], /* i : correlation vector. */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 Word16 scal_sig[], /* i : scaled signal. */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 Word16 L_frame, /* i : length of frame to compute pitch */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 Word16 lag_max, /* i : maximum lag */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 Word16 lag_min, /* i : minimum lag */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 Word16 *cor_hp_max /* o : max high-pass filtered norm. correlation */
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 );
176a44ff94a1 libtwamr: integrate hp_max.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #endif