Mean

Computes the mean value of a vector.

Syntax

Intel IPP style:

IppStatus ippsqMean_32f(const Ipp32f* pSrc , Ipp32u len , Ipp32f* pMean );

IppStatus ippsqMeanQ15_16s_Rz(const Ipp16s* pSrc , Ipp32u len , Ipp16s* pMean );

IppStatus ippsqMeanQ31_32s_Rz(const Ipp32s* pSrc , Ipp32u len , Ipp32s* pMean );

DSP style:

void ippsq_mean_f32(const float32_t* pSrc , uint32_t len , float32_t* pMean );

void ippsq_mean_q15(const q15_t* pSrc , uint32_t len , q15_t* pMean );

void ippsq_mean_q31(const q31_t* pSrc , uint32_t len , q31_t* pMean );

Include Files

ippsq.h

dsp.h

Parameters

pSrc

Pointer to the source vector.

pMean

Pointer to the result.

len

Number of elements in the vector.

Description

This function computes the mean (average) value of the pSrc vector and stores the result in pMean. The mean value is computed by the following formula:



Function flavors with the _Rz suffix perform rounding to zero.

Return Values

ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when len is equal to zero.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.
For more complete information about compiler optimizations, see our Optimization Notice.