diff --git a/apps/codecs/libfaad/fixed.h b/apps/codecs/libfaad/fixed.h index ac916ba0b9..9452d8c102 100644 --- a/apps/codecs/libfaad/fixed.h +++ b/apps/codecs/libfaad/fixed.h @@ -59,98 +59,7 @@ typedef int32_t real_t; #define Q2_PRECISION (1 << Q2_BITS) #define Q2_CONST(A) (((A) >= 0) ? ((real_t)((A)*(Q2_PRECISION)+0.5)) : ((real_t)((A)*(Q2_PRECISION)-0.5))) -#if defined(_WIN32) && !defined(_WIN32_WCE) - -/* multiply with real shift */ -static INLINE real_t MUL_R(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - shrd eax,edx,REAL_BITS - } -} - -/* multiply with coef shift */ -static INLINE real_t MUL_C(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - shrd eax,edx,COEF_BITS - } -} - -static INLINE real_t MUL_Q2(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - shrd eax,edx,Q2_BITS - } -} - -static INLINE real_t MUL_SHIFT6(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - shrd eax,edx,6 - } -} - -static INLINE real_t MUL_SHIFT23(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - shrd eax,edx,23 - } -} - -#if 1 -static INLINE real_t _MulHigh(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - mov eax,edx - } -} - -/* multiply with fractional shift */ -static INLINE real_t MUL_F(real_t A, real_t B) -{ - return _MulHigh(A,B) << (FRAC_SIZE-FRAC_BITS); -} - -/* Complex multiplication */ -static INLINE void ComplexMult(real_t *y1, real_t *y2, - real_t x1, real_t x2, real_t c1, real_t c2) -{ - *y1 = (_MulHigh(x1, c1) + _MulHigh(x2, c2))<<(FRAC_SIZE-FRAC_BITS); - *y2 = (_MulHigh(x2, c1) - _MulHigh(x1, c2))<<(FRAC_SIZE-FRAC_BITS); -} -#else -static INLINE real_t MUL_F(real_t A, real_t B) -{ - _asm { - mov eax,A - imul B - shrd eax,edx,FRAC_BITS - } -} - -/* Complex multiplication */ -static INLINE void ComplexMult(real_t *y1, real_t *y2, - real_t x1, real_t x2, real_t c1, real_t c2) -{ - *y1 = MUL_F(x1, c1) + MUL_F(x2, c2); - *y2 = MUL_F(x2, c1) - MUL_F(x1, c2); -} -#endif - -#elif defined(__GNUC__) && defined (__arm__) +#if defined(__GNUC__) && defined (__arm__) /* taken from MAD */ #define arm_mul(x, y, SCALEBITS) \