How to use ippiWTFwd_32f_C1R?

How to use ippiWTFwd_32f_C1R?

I have encounted a problem of how to use ippiWTFwd_32f_C1R, can anyone help me about this?

I have done some initializations of wavelet decomposition, but I cannot make my program pass the function.

I use the to compile this program, and the program breaks down when it runs to the function of ippiWTFwd_32f_C1R() under the Debug mode.

My code is posted below:

// Initialization
const Ipp32f low[4] =
const Ipp32f high[4] =
low, 4, 2,
high, 4, 2);
int bufSize;
ippiWTFwdGetBufSize_C1R(m_spec, &bufSize);
m_buffer = ippsMalloc_8u(bufSize);

// width and height of input image (Ipp8u), and width and heightcan be divided by 8 exactly.
IppiSize size = {m_srcSize.width, m_srcSize.height};

/* width and height of the first wavelet transforming decomposition */
IppiSize decomSize1 = {size.width / 2, size.height / 2};
Ipp32f* LxLy1 = ippsMalloc_32f(decomSize1.width * decomSize1.height);
Ipp32f* LxHy1 = ippsMalloc_32f(decomSize1.width * decomSize1.height);
Ipp32f* HxLy1 = ippsMalloc_32f(decomSize1.width * decomSize1.height);
Ipp32f* HxHy1 = ippsMalloc_32f(decomSize1.width * decomSize1.height);

Transform(m_ippImage, size, LxLy1, LxHy1, HxLy1, HxHy1, decomSize1);

// some free momery operations

// The function of Transform() are defined as follows:

void Transform(Ipp8u* pSrc, IppiSize size,
Ipp32f* LxLy, Ipp32f* LxHy,
Ipp32f* HxLy, Ipp32f* HxHy,
IppiSize decomSize)
// Convert image format from 8u to 32s
Ipp32s* pSrc32s = ippsMalloc_32s(size.width * size.height);
ippiConvert_8u32s_C1R(pSrc, size.width, pSrc32s, size.width * 4, size);

// Set the border of the source image
IppiSize BorderSize = {size.width + 2, size.height + 2};
Ipp32s* pDst32s = ippsMalloc_32s(BorderSize.width * BorderSize.height);
ippiCopyWrapBorder_32s_C1R(pSrc32s, size.width * 4, size, pDst32s, BorderSize.width * 4, BorderSize, 1, 1);

// Convert image format from 32s to 32f
Ipp8u* pDst8u = ippsMalloc_8u(BorderSize.width * BorderSize.height);
ippiConvert_32s8u_C1R(pDst32s, BorderSize.width * 4, pDst8u, BorderSize.width, BorderSize);
Ipp32f* pDst32f = ippsMalloc_32f(BorderSize.width * BorderSize.height);
ippiConvert_8u32f_C1R(pDst8u, BorderSize.width, pDst32f, BorderSize.width * 4, BorderSize);
IppStatus status = ippiWTFwd_32f_C1R(pDst32f, BorderSize.width * 4,
LxLy, decomSize.width * 4,
LxHy, decomSize.width * 4,
HxLy, decomSize.width * 4,
HxHy, decomSize.width * 4,
decomSize, m_spec, m_buffer);


Best Wishes,
Feng Li

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

could you please look at the ipp sample wavelet2d first

Hi Feng,

Did you ever get your code to work? I like your example much better than the highly factored C++ example by Intel. It would be nice to see the primitives in sequence as you showed without jumping through large amounts of templates and so forth.



it seems the pointer to WTFwd source is not correct. It should be adjusted by offset topBorder * lineStep + leftBorder * sizeof(32f) according to ROI concept.

Let me know if pointer offset doesn't solve the main problem,



Message Edited by mkulikov on 01-12-2006 12:27 PM

Leave a Comment

Please sign in to add a comment. Not a member? Join today