annotate libtwamr/log2.h @ 342:e42075184628

libtwamr: integrate q_plsf_3.tab
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 19 Apr 2024 00:57:15 +0000
parents bfe74a9edd5a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
326
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * R99 Version 3.3.0
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * REL-4 Version 4.1.0
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 *
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 * File : log2.h
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 * Purpose : Computes log2(L_x)
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 *
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #ifndef log2_h
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #define log2_h "$Id $"
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 /*
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 * INCLUDE FILES
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "typedef.h"
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 /*
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 * DEFINITION OF DATA TYPES
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /*
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 * DECLARATION OF PROTOTYPES
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 ********************************************************************************
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 void Log2 (
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Word32 L_x, /* (i) : input value */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 Word16 *exponent, /* (o) : Integer part of Log2. (range: 0<=val<=30) */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1)*/
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 );
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 void Log2_norm (
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 Word32 L_x, /* (i) : input value (normalized) */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 Word16 exp, /* (i) : norm_l (L_x) */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 Word16 *exponent, /* (o) : Integer part of Log2. (range: 0<=val<=30) */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 Word16 *fraction /* (o) : Fractional part of Log2. (range: 0<=val<1) */
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 );
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
bfe74a9edd5a libtwamr: integrate log2.c
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #endif