CMSIS-DSP  Verison 1.1.0
CMSIS DSP Software Library
math_helper.c File Reference

Functions

float arm_snr_f32 (float *pRef, float *pTest, uint32_t buffSize)
 Caluclation of SNR.
void arm_provide_guard_bits_q15 (q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits)
 Provide guard bits for Input buffer.
void arm_float_to_q12_20 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed in q12.20 format.
uint32_t arm_compare_fixed_q15 (q15_t *pIn, q15_t *pOut, uint32_t numSamples)
 Compare MATLAB Reference Output and ARM Test output.
uint32_t arm_compare_fixed_q31 (q31_t *pIn, q31_t *pOut, uint32_t numSamples)
 Compare MATLAB Reference Output and ARM Test output.
void arm_provide_guard_bits_q31 (q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits)
 Provide guard bits for Input buffer.
void arm_provide_guard_bits_q7 (q7_t *input_buf, uint32_t blockSize, uint32_t guard_bits)
 Provide guard bits for Input buffer.
uint32_t arm_calc_guard_bits (uint32_t num_adds)
 Caluclates number of guard bits.
void arm_apply_guard_bits (float32_t *pIn, uint32_t numSamples, uint32_t guard_bits)
 Converts Q15 to floating-point.
uint32_t arm_calc_2pow (uint32_t numShifts)
 Calculates pow(2, numShifts)
void arm_float_to_q14 (float *pIn, q15_t *pOut, uint32_t numSamples)
 Converts float to fixed q14.
void arm_float_to_q30 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed q30 format.
void arm_float_to_q29 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed q30 format.
void arm_float_to_q28 (float *pIn, q31_t *pOut, uint32_t numSamples)
 Converts float to fixed q28 format.
void arm_clip_f32 (float *pIn, uint32_t numSamples)
 Clip the float values to +/- 1.

Function Documentation

void arm_apply_guard_bits ( float32_t pIn,
uint32_t  numSamples,
uint32_t  guard_bits 
)
Parameters:
uint32_tnumber of samples in the buffer
Returns:
none

References arm_calc_2pow().

uint32_t arm_calc_2pow ( uint32_t  numShifts)
Parameters:
uint32_tnumber of shifts
Returns:
pow(2, numShifts)

Referenced by arm_apply_guard_bits().

uint32_t arm_calc_guard_bits ( uint32_t  num_adds)
Parameters:
uint32_tnumber of additions
Returns:
none The function Caluclates the number of guard bits depending on the numtaps
void arm_clip_f32 ( float *  pIn,
uint32_t  numSamples 
)
Parameters:
pIninput buffer
numSamplesnumber of samples in the buffer
Returns:
none The function converts floating point values to fixed point values
uint32_t arm_compare_fixed_q15 ( q15_t pIn,
q15_t pOut,
uint32_t  numSamples 
)
Parameters:
q15_t*Pointer to Ref buffer
q15_t*Pointer to Test buffer
uint32_tnumber of samples in the buffer
Returns:
none
uint32_t arm_compare_fixed_q31 ( q31_t pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters:
q31_t*Pointer to Ref buffer
q31_t*Pointer to Test buffer
uint32_tnumber of samples in the buffer
Returns:
none
void arm_float_to_q12_20 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters:
uint32_tnumber of samples in the buffer
Returns:
none The function converts floating point values to fixed point(q12.20) values
void arm_float_to_q14 ( float *  pIn,
q15_t pOut,
uint32_t  numSamples 
)
Parameters:
uint32_tnumber of samples in the buffer
Returns:
none The function converts floating point values to fixed point values
void arm_float_to_q28 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters:
uint32_tnumber of samples in the buffer
Returns:
none The function converts floating point values to fixed point values
void arm_float_to_q29 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters:
uint32_tnumber of samples in the buffer
Returns:
none The function converts floating point values to fixed point values
void arm_float_to_q30 ( float *  pIn,
q31_t pOut,
uint32_t  numSamples 
)
Parameters:
uint32_tnumber of samples in the buffer
Returns:
none The function converts floating point values to fixed point values
void arm_provide_guard_bits_q15 ( q15_t input_buf,
uint32_t  blockSize,
uint32_t  guard_bits 
)
Parameters:
q15_t*Pointer to input buffer
uint32_tblockSize
uint32_tguard_bits
Returns:
none The function Provides the guard bits for the buffer to avoid overflow

References blockSize.

void arm_provide_guard_bits_q31 ( q31_t input_buf,
uint32_t  blockSize,
uint32_t  guard_bits 
)
Parameters:
q31_t*Pointer to input buffer
uint32_tblockSize
uint32_tguard_bits
Returns:
none The function Provides the guard bits for the buffer to avoid overflow

References blockSize.

void arm_provide_guard_bits_q7 ( q7_t input_buf,
uint32_t  blockSize,
uint32_t  guard_bits 
)
Parameters:
q31_t*Pointer to input buffer
uint32_tblockSize
uint32_tguard_bits
Returns:
none The function Provides the guard bits for the buffer to avoid overflow

References blockSize.

float arm_snr_f32 ( float *  pRef,
float *  pTest,
uint32_t  buffSize 
)
Parameters:
float*Pointer to the reference buffer
float*Pointer to the test buffer
uint32_ttotal number of samples
Returns:
float SNR The function Caluclates signal to noise ratio for the reference output and test output

Referenced by main().