diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbcodec/codecs/lib/fixedpoint.h | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/lib/rbcodec/codecs/lib/fixedpoint.h b/lib/rbcodec/codecs/lib/fixedpoint.h index 1cbd1573bb..3d8e77cd89 100644 --- a/lib/rbcodec/codecs/lib/fixedpoint.h +++ b/lib/rbcodec/codecs/lib/fixedpoint.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Copyright (C) 2006 Jens Arnold | 10 | * Copyright (C) 2006 Jens Arnold |
11 | * | 11 | * |
12 | * Fixed point library for plugins | 12 | * Fixed point library for codecs |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License | 15 | * modify it under the terms of the GNU General Public License |
@@ -20,30 +20,7 @@ | |||
20 | * KIND, either express or implied. | 20 | * KIND, either express or implied. |
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | |||
24 | /** CODECS - FIXED POINT MATH ROUTINES - USAGE | ||
25 | * | ||
26 | * - x and y arguments are fixed point integers | ||
27 | * - fracbits is the number of fractional bits in the argument(s) | ||
28 | * - functions return long fixed point integers with the specified number | ||
29 | * of fractional bits unless otherwise specified | ||
30 | * | ||
31 | * Calculate sin and cos of an angle: | ||
32 | * fp_sincos(phase, *cos) | ||
33 | * where phase is a 32 bit unsigned integer with 0 representing 0 | ||
34 | * and 0xFFFFFFFF representing 2*pi, and *cos is the address to | ||
35 | * a long signed integer. Value returned is a long signed integer | ||
36 | * from -0x80000000 to 0x7fffffff, representing -1 to 1 respectively. | ||
37 | * That is, value is a fixed point integer with 31 fractional bits. | ||
38 | * | ||
39 | * Take square root of a fixed point number: | ||
40 | * fp_sqrt(x, fracbits) | ||
41 | * | ||
42 | */ | ||
43 | #ifndef _FIXEDPOINT_H_CODECS | 23 | #ifndef _FIXEDPOINT_H_CODECS |
44 | #define _FIXEDPOINT_H_CODECS | 24 | #define _FIXEDPOINT_H_CODECS |
45 | 25 | #include "../../../../firmware/include/fixedpoint.h" | |
46 | long fp_sincos(unsigned long phase, long *cos); | 26 | #endif /* _FIXEDPOINT_H_CODECS */ |
47 | long fp_sqrt(long a, unsigned int fracbits); | ||
48 | |||
49 | #endif | ||