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

Looking for Join function

Kelvin
Beginner
241 Views
Hi,

I am trying to look for IPP function that
join 2 32 bit RGBA images into 1.
i.e.

R1G1B1A1 R1G1B1A1 R1G1B1A1 ....
R2G2B2A2 R2G2B2A2 R2G2B2A2 ....

=>

R1G1B1A1 R2G2B2A2 R1G1B1A1 R2G2B2A2 R1G1B1A1 R2G2B2A2 ...


Although this can be done easily in a loop.

int *p = (int *) src1;
int *q = (int *) src2;
int *r = (int *) dst;
for (int j=0; j < imgWidth*imgHeight; j++) {
*r++ = *p++;
*r++ = *q++;
}

I wonder if IPP can give me better performance
since it is critical.

I search for imaging, video and small matrices
reference but can't locate a suitable function.

Let me know if I miss small useful function
to replace above code.

Thanks a lot !

- Kelvin

http://graphics.usc.edu/~tatchung
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
241 Views
Hi,
it looks like with your 'easy loop' youwill getsomething like
R1R2G1G2B1B2A1A2...
it can bedone in IPP by:

IppStatus ippsRealToCplx_32f(const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32fc* pDst, int len);

but there is no appropriate function in IPP to get

R1G1B1A1 R2G2B2A2...
so you need to write such code by yourself

Regards,
Vladimir

0 Kudos
Reply