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