wmafixed.h File Reference

Include dependency graph for wmafixed.h:

Go to the source code of this file.

Defines

#define PRECISION   16
#define PRECISION64   16
#define fixtof64(x)   (float)((float)(x) / (float)(1 << PRECISION64))
#define ftofix32(x)   ((int32_t)((x) * (float)(1 << PRECISION) + ((x) < 0 ? -0.5 : 0.5)))
#define itofix64(x)   (IntTo64(x))
#define itofix32(x)   ((x) << PRECISION)
#define fixtoi32(x)   ((x) >> PRECISION)
#define fixtoi64(x)   (IntFrom64(x))

Functions

int64_t IntTo64 (int x)
int IntFrom64 (int64_t x)
int32_t Fixed32From64 (int64_t x)
int64_t Fixed32To64 (int32_t x)
int64_t fixmul64byfixed (int64_t x, int32_t y)
int32_t fixdiv32 (int32_t x, int32_t y)
int64_t fixdiv64 (int64_t x, int64_t y)
int32_t fixsqrt32 (int32_t x)
long fsincos (unsigned long phase, int32_t *cos)
 Implements sin and cos using CORDIC rotation.
static int32_t fixmul32 (int32_t x, int32_t y)
static int32_t fixmul32b (int32_t x, int32_t y)
static void CMUL (int32_t *pre, int32_t *pim, int32_t are, int32_t aim, int32_t bre, int32_t bim)


Define Documentation

#define fixtof64 (  )     (float)((float)(x) / (float)(1 << PRECISION64))

Referenced by pow_m1_4().

#define fixtoi32 (  )     ((x) >> PRECISION)

#define fixtoi64 (  )     (IntFrom64(x))

Referenced by wma_decode_init().

#define ftofix32 (  )     ((int32_t)((x) * (float)(1 << PRECISION) + ((x) < 0 ? -0.5 : 0.5)))

Referenced by pow_m1_4().

#define itofix32 (  )     ((x) << PRECISION)

#define itofix64 (  )     (IntTo64(x))

Referenced by wma_decode_init().

#define PRECISION   16

#define PRECISION64   16

Referenced by fixdiv64().


Function Documentation

static void CMUL ( int32_t *  pre,
int32_t *  pim,
int32_t  are,
int32_t  aim,
int32_t  bre,
int32_t  bim 
) [inline, static]

References fixmul32b().

Referenced by ff_imdct_calc(), and fft_calc_unscaled().

int32_t fixdiv32 ( int32_t  x,
int32_t  y 
)

int64_t fixdiv64 ( int64_t  x,
int64_t  y 
)

References PRECISION64.

Referenced by wma_decode_block(), and wma_decode_init().

int32_t Fixed32From64 ( int64_t  x  ) 

Referenced by wma_decode_block().

int64_t Fixed32To64 ( int32_t  x  ) 

Referenced by wma_decode_block().

static int32_t fixmul32 ( int32_t  x,
int32_t  y 
) [inline, static]

static int32_t fixmul32b ( int32_t  x,
int32_t  y 
) [inline, static]

int64_t fixmul64byfixed ( int64_t  x,
int32_t  y 
)

int32_t fixsqrt32 ( int32_t  x  ) 

References long(), and STEP.

Referenced by wma_decode_block().

long fsincos ( unsigned long  phase,
int32_t *  cos 
)

Implements sin and cos using CORDIC rotation.

Parameters:
phase has range from 0 to 0xffffffff, representing 0 and 2*pi respectively.
cos return address for cos
Returns:
sin of phase, value is a signed value from LONG_MIN to LONG_MAX, representing -1 and 1 respectively.
Gives at least 24 bits precision (last 2-8 bits or so are probably off)

References atan_table, cordic_circular_gain, and i.

Referenced by ff_mdct_init(), fft_init_global(), wma_decode_init(), and wma_lsp_to_curve_init().

int IntFrom64 ( int64_t  x  ) 

int64_t IntTo64 ( int  x  ) 


Generated on Tue May 25 08:05:15 2010 for VLC by  doxygen 1.5.6