Visible to Intel only — GUID: GUID-9724339C-0FE6-42BB-A0FD-2D6BA6C179F9
Visible to Intel only — GUID: GUID-9724339C-0FE6-42BB-A0FD-2D6BA6C179F9
WinHann
Multiplies a vector by a Hann windowing function.
Syntax
IppStatus ippsWinHann_16s(const Ipp16s* pSrc, Ipp16s* pDst, int len);
IppStatus ippsWinHann_16sc(const Ipp16sc* pSrc, Ipp16sc* pDst, int len);
IppStatus ippsWinHann_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len);
IppStatus ippsWinHann_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len);
IppStatus ippsWinHann_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len);
IppStatus ippsWinHann_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len);
IppStatus ippsWinHann_16s_I(Ipp16s* pSrcDst, int len);
IppStatus ippsWinHann_16sc_I(Ipp16sc* pSrcDst, int len);
IppStatus ippsWinHann_32f_I(Ipp32f* pSrcDst, int len);
IppStatus ippsWinHann_32fc_I(Ipp32fc* pSrcDst, int len);
IppStatus ippsWinHann_64f_I(Ipp64f* pSrcDst, int len);
IppStatus ippsWinHann_64fc_I(Ipp64fc* pSrcDst, int len);
Include Files
ipps.h
Domain Dependencies
Headers: ippcore.h, ippvm.h
Libraries: ippcore.lib, ippvm.lib
Parameters
pSrc |
Pointer to the source vector. |
pDst |
Pointer to the destination vector. |
pSrcDst |
Pointer to the source and destination vector for the in-place operation. |
len |
Number of elements in the vector. |
Description
This function multiplies the vector pSrc by the Hann window and stores the result in pDst.
The in-place flavors of ippsWinHann multiply the vector pSrcDst by the Hann window and store the result in pSrcDst.
The complex types multiply both the real and imaginary parts of the vector by the same window. The Hann window is defined as follows:
Return Values
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when the pSrc, pDst, or pSrcDst pointer is NULL. |
ippStsSizeErr |
Indicates an error when len is less than 3. |
Example
The example below shows how to use the function ippsWinHann_32f_I
void hann(void) { Ipp32f x[8]; ippsSet_32f(1, x, 8); ippsWinHann_32f_I(x, 8); printf_32f("hann(half) =", x, 4, ippStsNoErr); }
Output:
hann(half) = 0.000000 0.188255 0.611260 0.950484 Matlab* Analog: >> N = 8; n = 0:N-1; 0.5*(1-cos(2*pi*n/(N-1)))