diff options
Diffstat (limited to 'libFDK')
-rw-r--r-- | libFDK/include/cplx_mul.h | 2 | ||||
-rw-r--r-- | libFDK/include/fixpoint_math.h | 12 | ||||
-rw-r--r-- | libFDK/include/mips/cplx_mul.h | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/libFDK/include/cplx_mul.h b/libFDK/include/cplx_mul.h index 093ffa6..ce5c9f7 100644 --- a/libFDK/include/cplx_mul.h +++ b/libFDK/include/cplx_mul.h @@ -96,7 +96,7 @@ amm-info@iis.fraunhofer.de #if defined(__CC_ARM) || defined(__arm__) || defined(_M_ARM) /* cppp replaced: elif */ #include "arm/cplx_mul.h" -#elif defined(__GNUC__) && defined(__mips__) /* cppp replaced: elif */ +#elif defined(__GNUC__) && defined(__mips__) && __mips_isa_rev < 6 #include "mips/cplx_mul.h" #endif /* #if defined all cores: bfin, arm, etc. */ diff --git a/libFDK/include/fixpoint_math.h b/libFDK/include/fixpoint_math.h index df141d3..26c001f 100644 --- a/libFDK/include/fixpoint_math.h +++ b/libFDK/include/fixpoint_math.h @@ -450,15 +450,19 @@ inline FIXP_DBL fAddSaturate(const FIXP_DBL a, const FIXP_DBL b) /** * \brief Calculate the value of 1/i where i is a integer value. It supports - * input values from 1 upto 50. + * input values from 0 upto 49. * \param intValue Integer input value. * \param FIXP_DBL representation of 1/intValue */ inline FIXP_DBL GetInvInt(int intValue) { - FDK_ASSERT((intValue > 0) && (intValue < 50)); - FDK_ASSERT(intValue<50); - return invCount[intValue]; + FDK_ASSERT((intValue >= 0) && (intValue < 50)); + if (intValue < 0) + return invCount[0]; + else if (intValue > 49) + return invCount[49]; + else + return invCount[intValue]; } diff --git a/libFDK/include/mips/cplx_mul.h b/libFDK/include/mips/cplx_mul.h index e05d2b6..43cdbd0 100644 --- a/libFDK/include/mips/cplx_mul.h +++ b/libFDK/include/mips/cplx_mul.h @@ -89,7 +89,7 @@ amm-info@iis.fraunhofer.de ******************************************************************************/ -#if defined(__GNUC__) && defined(__mips__) +#if defined(__GNUC__) && defined(__mips__) && __mips_isa_rev < 6 //#define FUNCTION_cplxMultDiv2_32x16 |