summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad/fixed.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libfaad/fixed.h')
-rw-r--r--apps/codecs/libfaad/fixed.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/apps/codecs/libfaad/fixed.h b/apps/codecs/libfaad/fixed.h
index 6cda967..ee06dc4 100644
--- a/apps/codecs/libfaad/fixed.h
+++ b/apps/codecs/libfaad/fixed.h
@@ -49,7 +49,6 @@ extern "C" {
typedef int32_t real_t;
-#define UFIX_CONST(A,PRECISION) ((uint32_t)((A)*(PRECISION)+0.5))
#define FIX_CONST(A,PRECISION) (((A) >= 0) ? ((real_t)((A)*(PRECISION)+0.5)) : ((real_t)((A)*(PRECISION)-0.5)))
#define REAL_CONST(A) FIX_CONST((A),(REAL_PRECISION))
#define COEF_CONST(A) FIX_CONST((A),(COEF_PRECISION))
@@ -129,8 +128,6 @@ static INLINE void ComplexMult(real_t *y1, real_t *y2,
#define MUL_Q2(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (Q2_BITS-1))) >> Q2_BITS)
#define MUL_SHIFT6(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (6-1))) >> 6)
#define MUL_SHIFT23(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (23-1))) >> 23)
- #define DESCALE(A,S) ((S)>0?(((A)>>((S)-1))+1)>>1:(A)<<-(S))
- #define DESCALE_SHIFT(A,SH,SC) DESCALE((A),(SC)-(SH))
#elif defined(__GNUC__) && defined (__arm__)
@@ -208,18 +205,6 @@ static INLINE void ComplexMult(real_t *y1, real_t *y2,
*y2 = yt2 << (FRAC_SIZE-FRAC_BITS);
}
-static inline real_t DESCALE_SHIFT(unsigned val, int shift, int scale)
-{
- unsigned out;
- if ((out = val >> (scale - shift - 1)))
- {
- out++;
- out >>= 1;
- } else
- out = val << (shift - scale);
- return out;
-}
-
#else
/* multiply with real shift */
@@ -240,8 +225,6 @@ static inline real_t DESCALE_SHIFT(unsigned val, int shift, int scale)
#define MUL_Q2(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (Q2_BITS-1))) >> Q2_BITS)
#define MUL_SHIFT6(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (6-1))) >> 6)
#define MUL_SHIFT23(A,B) (real_t)(((int64_t)(A)*(int64_t)(B)+(1 << (23-1))) >> 23)
- #define DESCALE(A,S) ((S)>0?(((A)>>((S)-1))+1)>>1:(A)<<-(S))
- #define DESCALE_SHIFT(A,SH,SC) DESCALE((A),(SC)-(SH))
/* Complex multiplication */
static INLINE void ComplexMult(real_t *y1, real_t *y2,