wmafixed.c File Reference

Include dependency graph for wmafixed.c:


Defines

#define STEP(k)

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.

Variables

static const long cordic_circular_gain = 0xb2458939
static const unsigned long atan_table []

Define Documentation

#define STEP (  ) 

Value:

s = r + (1 << k * 2); r >>= 1; \
    if (s <= v) { v -= s; r |= (1 << k * 2); }

Referenced by fixsqrt32().


Function Documentation

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().

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  ) 


Variable Documentation

const unsigned long atan_table[] [static]

Referenced by fsincos().

const long cordic_circular_gain = 0xb2458939 [static]

Referenced by fsincos().


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