annotate libtwamr/cor_h.h @ 542:f2d0f2f15d5f

libgsmefr: add wrapper for TW-TS-001 RTP input
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 28 Sep 2024 06:38:08 +0000
parents 5401aaf7acb0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
315
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * R99 Version 3.3.0
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * REL-4 Version 4.1.0
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 *
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 * File : cor_h.h
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 * Purpose : correlation functions for codebook search
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 *
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 /*
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 * MODULE INCLUDE FILE AND VERSION ID
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #ifndef cor_h_h
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #define cor_h_h "@(#)$Id $"
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 /*
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 * INCLUDE FILES
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #include "typedef.h"
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "cnst.h"
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 /*
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 * DECLARATION OF PROTOTYPES
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 *****************************************************************************
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 void cor_h_x (
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Word16 h[], /* (i) : impulse response of weighted synthesis filter */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Word16 x[], /* (i) : target */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 Word16 dn[], /* (o) : correlation between target and h[] */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 Word16 sf /* (i) : scaling factor: 2 for 12.2, 1 for 7.4 */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 );
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 void cor_h_x2 (
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 Word16 h[], /* (i) : impulse response of weighted synthesis filter */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 Word16 x[], /* (i) : target */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 Word16 dn[], /* (o) : correlation between target and h[] */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 Word16 sf, /* (i) : scaling factor: 2 for 12.2, 1 for 7.4 */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 Word16 nb_track,/* (i) : the number of ACB tracks */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 Word16 step /* (i) : step size from one pulse position to the next
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 in one track */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 );
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 void cor_h (
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 Word16 h[], /* (i) : impulse response of weighted synthesis filter */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 Word16 sign[], /* (i) : sign of d[n] */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 Word16 rr[][L_CODE] /* (o) : matrix of autocorrelation */
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 );
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
5401aaf7acb0 libtwamr: integrate cor_h.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #endif