Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

Does Windowing work for somebody in the forum?

lkosovsky
Beginner
220 Views
Hi there,

My system is PXA270, embedded Linux, IPP v5.2 for IXP architecture.

I need to use windowing API for my processing, but it doesn't seem to work properly. Instead of creating an array of window coefficients, it fills the array with "1"s an "0"s.

Here is a code snippet:

Ipp16s* window16s = ippsMalloc_16s(blockSize);
ippsSet_16s(1, window16s, blockSize);
ippsWinHamming_16s_I(window16s, blockSize);
ippsMul_16s_ISfs(window16s, pSrc, blockSize, 0); // pSrc is raw data


Having blockSize = 512, the window16s array results in zeros from 0 to 120, ones - from 121 to 390, and zeros again to the end.

I believe I'm doing something not correctly with this only-integer API I'm using. Does anyone has a hintof what Imight do wrong?

Thank you.
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
220 Views

Hello,

there is comment from our expert:

The way you use IPPis wrong win functions dont prepare coefficients they multiply input vector by the corresponding window coefficients. It is evident that for all ones input data the output will have a range 0-1 as widnowing functions are non-amplified. Try the following to see the correct result:

Ipp16s* window16s = ippsMalloc_16s(blockSize);
ippsSet_16s(1024, window16s, blockSize);
ippsWinHamming_16s_I(window16s, blockSize);
ippsMul_16s_ISfs(window16s, pSrc, blockSize, 10); // pSrc is raw data

Or even better:

ippsWinHamming_16s_I(pSrc, blockSize);

Regards,
Vladimir

0 Kudos
lkosovsky
Beginner
220 Views
Excellent! Thanks a lot.

Because I'm using IXP version of IPP I have only a sub-set of the major IPP's API. My source data is in 32s format and I cannot, unfortunately, multiply data vector by corresponding window coefficients because there are only 16s versions for my PXA270 platform. Anyway, it takes more processing to do windowing, but it works.

My main mistake was in not taking into account that "windowing functions are non-amplified".

Thank you.

0 Kudos
Reply