CSI-DSP  Version 1.0.0
CSI DSP Software Library
Functions
Vector Absolute Max value

Functions

q15_t csky_dsp_lib_vec_max_abs16 (q15_t *A, uint32_t N)
 Q15 vector absolute max value. More...
 
q31_t csky_dsp_lib_vec_max_abs32 (q31_t *A, uint32_t N)
 Q31 vector absolute max value. More...
 

Description

compute the absolute value of every element, and return the maxmum value of them.

    Result = max(abs(*(A+i))),   0 <= i < N.

support for q15 and q31 format.

Function Documentation

q15_t csky_dsp_lib_vec_max_abs16 ( q15_t A,
uint32_t  N 
)
Parameters
[in]*Apoints to the input buffer
[in]Nnumber of samples in each vector
Returns
the max value of all the absolute values of the vector

Scaling and Overflow Behavior:

The function uses saturating arithmetic. The Q15 value -1 (0x8000) will be saturated to the maximum allowable positive value 0x7FFF.
q31_t csky_dsp_lib_vec_max_abs32 ( q31_t A,
uint32_t  N 
)
Parameters
[in]*Apoints to the input buffer
[in]Nnumber of samples in each vector
Returns
the max value of all the absolute values of the vector

Scaling and Overflow Behavior:

The function uses saturating arithmetic. The Q31 value -1 (0x80000000) will be saturated to the maximum allowable positive value 0x7FFFFFFF.