diff options
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/libatrac/fixp_math.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/codecs/libatrac/fixp_math.h b/apps/codecs/libatrac/fixp_math.h index 5bfc2c5703..ed72cf6a0f 100644 --- a/apps/codecs/libatrac/fixp_math.h +++ b/apps/codecs/libatrac/fixp_math.h | |||
@@ -1,4 +1,9 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #ifdef ROCKBOX | ||
3 | #include "asm_arm.h" | ||
4 | #include "asm_mcf5249.h" | ||
5 | #include "codeclib_misc.h" | ||
6 | #endif | ||
2 | 7 | ||
3 | /* Macros for converting between various fixed-point representations and floating point. */ | 8 | /* Macros for converting between various fixed-point representations and floating point. */ |
4 | #define ONE_16 (1L << 16) | 9 | #define ONE_16 (1L << 16) |
@@ -8,7 +13,12 @@ | |||
8 | #define fix31tof64(x) (float)((float)(x) / (float)(1 << 31)) | 13 | #define fix31tof64(x) (float)((float)(x) / (float)(1 << 31)) |
9 | 14 | ||
10 | /* Fixed point math routines for use in atrac3.c */ | 15 | /* Fixed point math routines for use in atrac3.c */ |
11 | inline int32_t fixdiv16(int32_t x, int32_t y); | 16 | #ifdef ROCKBOX |
17 | #define fixmul31(x,y) (MULT31(x,y)) | ||
18 | #define fixmul16(x,y) (MULT32(x,y)) | ||
19 | #else | ||
12 | inline int32_t fixmul16(int32_t x, int32_t y); | 20 | inline int32_t fixmul16(int32_t x, int32_t y); |
13 | inline int32_t fixmul31(int32_t x, int32_t y); | 21 | inline int32_t fixmul31(int32_t x, int32_t y); |
22 | #endif /* ROCKBOX */ | ||
23 | inline int32_t fixdiv16(int32_t x, int32_t y); | ||
14 | inline int32_t fastSqrt(int32_t n); | 24 | inline int32_t fastSqrt(int32_t n); |