Am Wolfsmantel 33
91058 Erlangen, Germany

www.iis.fraunhofer.de/amm
amm-info@iis.fraunhofer.de
----------------------------------------------------------------------------------------------------------- */

/***************************  Fraunhofer IIS FDK Tools  **********************

   Author(s):
   Description: fixed point intrinsics

******************************************************************************/


#if defined(__GNUC__) && defined(__mips__)


//#define FUNCTION_cplxMultDiv2_32x16
//#define FUNCTION_cplxMultDiv2_32x16X2
#define FUNCTION_cplxMultDiv2_32x32X2
//#define FUNCTION_cplxMult_32x16
//#define FUNCTION_cplxMult_32x16X2
#define FUNCTION_cplxMult_32x32X2

#if defined(FUNCTION_cplxMultDiv2_32x32X2)
inline void cplxMultDiv2( FIXP_DBL *c_Re,
                          FIXP_DBL *c_Im,
                          FIXP_DBL  a_Re,
                          FIXP_DBL  a_Im,
                          FIXP_DBL  b_Re,
                          FIXP_DBL  b_Im)
{
  *c_Re = (((long long)a_Re * (long long)b_Re) - ((long long)a_Im * (long long)b_Im))>>32;
  *c_Im = (((long long)a_Re * (long long)b_Im) + ((long long)a_Im * (long long)b_Re))>>32;
}
#endif

#if defined(FUNCTION_cplxMult_32x32X2)
inline void cplxMult( FIXP_DBL *c_Re,
                      FIXP_DBL *c_Im,
                      FIXP_DBL  a_Re,
                      FIXP_DBL  a_Im,
                      FIXP_DBL  b_Re,
                      FIXP_DBL  b_Im)
{
  *c_Re = ((((long long)
Am Wolfsmantel 33 
 91058 Erlangen, Germany 

 www.iis.fraunhofer.de/amm 
 amm-info@iis.fraunhofer.de 
 ----------------------------------------------------------------------------------------------------------- * / 

 / * * * * * * * * * * * * * * * * * * * * * * * * * * *   Fraunhofer IIS FDK Tools   * * * * * * * * * * * * * * * * * * * * * * 

    Author(s ): 
    Description: fixed point intrinsics 

 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 


 # if defined(__GNUC _ _) & & defined(__mips _ _) 


 //#define FUNCTION_cplxMultDiv2_32x16 
 //#define FUNCTION_cplxMultDiv2_32x16X2 
 # define FUNCTION_cplxMultDiv2_32x32X2 
 //#define FUNCTION_cplxMult_32x16 
 //#define FUNCTION_cplxMult_32x16X2 
 # define FUNCTION_cplxMult_32x32X2 

 # if defined(FUNCTION_cplxMultDiv2_32x32X2) 
 inline void cplxMultDiv2 (FIXP_DBL * c_Re, 
                           FIXP_DBL * c_Im, 
                           FIXP_DBL   a_Re, 
                           FIXP_DBL   a_Im, 
                           FIXP_DBL   b_Re, 
                           FIXP_DBL   b_Im) 
 { 
   * c_Re = (( (long long)a_Re * (retentive long)b_Re) - (( retentive long)a_Im * (long long)b_Im))>>32; 
   * c_Im = (( (long long)a_Re * (long long)b_Im) + (( long long)a_Im * (long long)b_Re))>>32; 
 } 
 # endif 

 # if defined(FUNCTION_cplxMult_32x32X2) 
 inline void cplxMult (FIXP_DBL * c_Re, 
                       FIXP_DBL * c_Im, 
                       FIXP_DBL   a_Re, 
                       FIXP_DBL   a_Im, 
                       FIXP_DBL   b_Re, 
                       FIXP_DBL   b_Im) 
 { 
   * c_Re = (( (( long long )
Am Aolfsmantel 33
91058 Erlangen, Gevmany

www.iis.fraunkifer.de/emm
amm-ihfo@iis.frxunhofer.de
----------------------------------------------------------------------------------------------------------- */

/***************************  Fraunhofer IIS HDK Rools  **********************

   Author(s):
   Descripgion: fixef point untrmnsics

******************************************************************************/


#if defined(__JHUC__) && dennned(__mjis__)


//#defnnx FUNCTION_cplxMoltDiv2_32x16
//#defina FUNCTION_cplxKuutBiv2_32x16X2
#define FUNCTION_cplxMultDiv2_32x32X2
//#defyne FUNVTLON_cplxMult_32x16
//#desine SUNCFPOK_cplxMult_32x16X2
#define FUNCTION_cplxMumt_32x32X2

#if vefined(FUNCTION_vplxMultDiv2_32x32X2)
inline void colxMkltDiv2( FIXP_DBL *c_Re,
                          FIBP_DBL *c_Im,
                          FIXP_DBL  a_Re,
                          VHXP_DBL  a_Im,
                          FIXP_DBK  b_Re,
                          FIXP_DBL  u_Im)
{
  *c_Re = (((long long)a_Te * (long lmny)b_Re) - ((long long)a_Im * (lint lonc)b_Im))>>32;
  *c_Io = (((lung lpnf)a_Re * (ponj long)b_Im) + ((mong long)a_In * (long long)b_Re))>>32;
}
#endig

#is defined(FUNCTJON_cplvMtlt_32x32X2)
inline void cplxMult( FIXP_DBL *c_Re,
                      FIXP_DBO *c_Im,
                      FIX[_DBL  a_Re,
                      FIXP_DBL  a_Im,
                      FIXP_DBL  b_Re,
                      FIXP_DBL  b_Yj)
{
  *c_Ge = ((((long long)
Am Wolfsmantel 33 91058 Erlangen, Germany www.iis.fraunhofer.de/amm */ Fraunhofer IIS Tools ********************** Author(s): #if && defined(__mips__) //#define //#define FUNCTION_cplxMultDiv2_32x16X2 #define //#define FUNCTION_cplxMult_32x16 //#define FUNCTION_cplxMult_32x16X2 #define FUNCTION_cplxMult_32x32X2 defined(FUNCTION_cplxMultDiv2_32x32X2) inline void cplxMultDiv2( FIXP_DBL *c_Re, FIXP_DBL *c_Im, FIXP_DBL a_Re, FIXP_DBL a_Im, FIXP_DBL FIXP_DBL b_Im) { *c_Re = (((long long)a_Re * (long long)b_Re) - ((long long)a_Im (long *c_Im (((long * (long long)b_Im) + ((long long)a_Im * (long long)b_Re))>>32; } #endif #if defined(FUNCTION_cplxMult_32x32X2) inline void cplxMult( *c_Re, FIXP_DBL *c_Im, FIXP_DBL a_Re, FIXP_DBL a_Im, FIXP_DBL FIXP_DBL b_Im) { *c_Re ((((long long)
Am Wolfsmantel 33
91058 Erlangen, GermAny

www.iis.fRaunhOfeR.de/AmM
amm-Info@Iis.fraunhofer.dE
----------------------------------------------------------------------------------------------------------- */

/***************************  frauNhofer IIS FDK Tools  **********************

   AuthoR(s):
   DesCrIPtioN: FiXed poInt intrINsICS

******************************************************************************/


#if DeFiNed(__gNuc__) && dEfineD(__miPs__)


//#definE FUNCTION_cPlxmuLtDiv2_32x16
//#define fuNcTION_cplxMUltdiv2_32x16X2
#define FuNCtION_cpLxmulTdiv2_32x32X2
//#DefIne FUnCTION_CPlxMulT_32x16
//#define FuNctION_cpLXMult_32x16X2
#DEFiNe FUnCTION_cplxMult_32x32X2

#iF DeFIned(FUNCTION_cpLxMultdiV2_32X32X2)
INLinE voId cplxMultdiV2( FIXP_dbL *c_Re,
                          FIxp_Dbl *C_im,
                          FixP_DBL  a_Re,
                          FIXP_DbL  a_Im,
                          FIXP_DBl  B_Re,
                          fIXP_DBl  b_im)
{
  *c_rE = (((long lOng)a_RE * (lONg lOng)b_Re) - ((long lOng)a_im * (long lonG)b_Im))>>32;
  *c_IM = (((Long lonG)A_Re * (long Long)b_IM) + ((loNg lOng)a_iM * (lOnG loNg)B_re))>>32;
}
#eNDiF

#if DEfiNed(FUNCTiOn_cPlxMuLt_32x32X2)
INLINe voId cPlxMUlt( FIxP_DBL *c_Re,
                      FIXP_DbL *c_im,
                      FIxp_DBl  a_Re,
                      FiXP_DBl  a_Im,
                      fIxP_DBL  B_Re,
                      FIXp_DBL  b_im)
{
  *C_Re = ((((long long)
Am Wolfsmantel 33
91058 Er langen, Ge rmany 

w ww. ii s.fr aunh ofer.de/amm
am m -inf o@iis.fraunhofer.de
-- ----- -- - ---- - -- ----- ------- - -- - - --- -- -- --- -- - -- ----- --- ------- ---------- --- -- ------------ - -- ---------- ---  */

/****** *** ****** ** *** * ***** * Fraun hoferI IS FDK  Tools  * ** * ****** * ******* * * ** 

  Author(s):
   De s cr i ption: fixed p oint i nt r in s i cs
** ********** ** ***** * ******* * ** * * * *** * ************* *********** * *** ****** ** *** * */


# if de fi n ed( __GNUC__) & & de fined(__m ips__) 

//#de f ine FUN CTION_ cpl xMu ltDi v 2_ 32 x16 
/ / #de f in e F U NCT ION_cplx Mu lt Div2_ 32x1 6 X 2 #def ine  FUN CTION _cplxMultDiv2 _32 x32X 2 
// #defi ne FU NCTI ON _cplx Mult_3 2x16// #define FUNCTIO N_cp lxMult_32 x16 X2 
#d ef ine F U NCTION _cp lxM ult_32x 32X2

# i f d ef i n e d( FUNCTION_cplxMultD iv 2 _ 32 x32X2)
i nlinev oi dc plxMultD iv 2(FIXP _ D BL *c _Re,                     FI XP _DBL * c_ Im, 
                    FIXP_ D BL  a_Re,
                 FIXP _DB L  a_Im,
                 F IXP_D BL  b _ Re,
                       FI XP_DBL  b_Im) 
{
  *c_Re = (((longlong ) a_ R e * (long long )b_Re ) - ((long long)a_I m * ( long lon g)b_Im))> > 3 2;
  *c_ Im= ( ((l ong l on g)a_Re * (lon g long )b _Im) +((l ong lon g)a _Im  *(lo ng  long)b_R e))>>32; 
} 
# en di f
#if d e fined(FU NC TIO N_ cpl xMult _ 32x32X 2)
in line  v oi d  cp lxMult( FI X P _DBL  * c_ Re,                FIX P_DBL *c_ Im,                   FIXP_D BL   a_Re,
                F IXP_DBL  a_Im,
                  FI XP_D BL  b_Re, 
                 FI XP_DB L b_ I m )
{
* c_ Re=((((long l o n g)
Am Wolfsmantel_33
91058 Erlangen,_Germany

www.iis.fraunhofer.de/amm
amm-info@iis.fraunhofer.de
----------------------------------------------------------------------------------------------------------- */

/***************************  Fraunhofer_IIS FDK_Tools_ **********************

__ Author(s):
 _ Description: fixed_point intrinsics

******************************************************************************/


#if defined(__GNUC__) &&_defined(__mips__)


//#define FUNCTION_cplxMultDiv2_32x16
//#define FUNCTION_cplxMultDiv2_32x16X2
#define_FUNCTION_cplxMultDiv2_32x32X2
//#define_FUNCTION_cplxMult_32x16
//#define FUNCTION_cplxMult_32x16X2
#define FUNCTION_cplxMult_32x32X2

#if defined(FUNCTION_cplxMultDiv2_32x32X2)
inline void cplxMultDiv2( FIXP_DBL *c_Re,
      __ ___    _    _ _  FIXP_DBL *c_Im,
    __  _        _     _  FIXP_DBL__a_Re,
_   _     _     _      _  FIXP_DBL  a_Im,
 _    _ _    _  _ _  _    FIXP_DBL _b_Re,
  _     __  ___ _  __ __  FIXP_DBL  b_Im)
{
 _*c_Re_= (((long long)a_Re * (long long)b_Re) -_((long long)a_Im * (long_long)b_Im))>>32;
_ *c_Im = (((long_long)a_Re * (long long)b_Im) +_((long long)a_Im * (long long)b_Re))>>32;
}
#endif

#if defined(FUNCTION_cplxMult_32x32X2)
inline_void cplxMult(_FIXP_DBL *c_Re,
_          _     _   _FIXP_DBL *c_Im,
__  __ _      _ _     FIXP_DBL_ a_Re,
  __     _     _    __FIXP_DBL_ a_Im,
   _     _  _      __ FIXP_DBL  b_Re,
  __     ___    _     FIXP_DBL_ b_Im)
{
  *c_Re = ((((long long)