Sound Open Firmware
Loading...
Searching...
No Matches
icomplex32.h File Reference
Include dependency graph for icomplex32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  icomplex32
 struct icomplex32 - Storage for a normal complex number. More...
struct  ipolar32
 struct ipolar32 - Storage for complex number in polar format. More...

Functions

static void icomplex32_add (const struct icomplex32 *in1, const struct icomplex32 *in2, struct icomplex32 *out)
static void icomplex32_adds (const struct icomplex32 *in1, const struct icomplex32 *in2, struct icomplex32 *out)
static void icomplex32_sub (const struct icomplex32 *in1, const struct icomplex32 *in2, struct icomplex32 *out)
static void icomplex32_mul (const struct icomplex32 *in1, const struct icomplex32 *in2, struct icomplex32 *out)
static void icomplex32_conj (struct icomplex32 *comp)
static void icomplex32_shift (const struct icomplex32 *input, int32_t n, struct icomplex32 *output)
void sofm_icomplex32_to_polar (struct icomplex32 *complex, struct ipolar32 *polar)
 sofm_icomplex32_to_polar() - Convert (re, im) complex number to polar.
void sofm_ipolar32_to_complex (struct ipolar32 *polar, struct icomplex32 *complex)
 sofm_ipolar32_to_complex() - Convert complex number from polar to normal (re, im) format.

Function Documentation

◆ icomplex32_add()

void icomplex32_add ( const struct icomplex32 * in1,
const struct icomplex32 * in2,
struct icomplex32 * out )
inlinestatic

◆ icomplex32_adds()

void icomplex32_adds ( const struct icomplex32 * in1,
const struct icomplex32 * in2,
struct icomplex32 * out )
inlinestatic

◆ icomplex32_conj()

void icomplex32_conj ( struct icomplex32 * comp)
inlinestatic

◆ icomplex32_mul()

void icomplex32_mul ( const struct icomplex32 * in1,
const struct icomplex32 * in2,
struct icomplex32 * out )
inlinestatic

◆ icomplex32_shift()

void icomplex32_shift ( const struct icomplex32 * input,
int32_t n,
struct icomplex32 * output )
inlinestatic

◆ icomplex32_sub()

void icomplex32_sub ( const struct icomplex32 * in1,
const struct icomplex32 * in2,
struct icomplex32 * out )
inlinestatic

◆ sofm_icomplex32_to_polar()

void sofm_icomplex32_to_polar ( struct icomplex32 * complex,
struct ipolar32 * polar )

sofm_icomplex32_to_polar() - Convert (re, im) complex number to polar.

Parameters
complexPointer to input complex number in Q1.31 format.
polarPointer to output complex number in Q2.30 format for magnitude and Q3.29 for phase angle.

The function can be used to convert data in-place with same address for input and output. It can be useful to save scratch memory.

◆ sofm_ipolar32_to_complex()

void sofm_ipolar32_to_complex ( struct ipolar32 * polar,
struct icomplex32 * complex )

sofm_ipolar32_to_complex() - Convert complex number from polar to normal (re, im) format.

Parameters
polarPointer to input complex number in polar format.
complexPointer to output complex number in normal format in Q1.31.

This function can be used to convert data in-place with same address for input and output. It can be useful to save scratch memory.