Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

ippiLUTPalette_8u_C3R Problem

Hi:

I'm getting an unexpected error from ippiLUTPalette_8u_C3R() using IPP 9.0. The return status appears to depend on the roi. No error is reported with IPP 7.0 Example code below.

 

	int nBitSize = 3;
	Ipp8u pTable0[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
	Ipp8u *pTable[3] = { pTable0, pTable0, pTable0 };

	int srcStepBytes, dstStepBytes;
	Ipp8u* pSrc = ippiMalloc_8u_C1(100, 100, &srcStepBytes);
	Ipp8u* pDst = ippiMalloc_8u_C3(100, 100, &dstStepBytes);

	IppiSize roiSize = { 4, 4 };
	IppStatus status = ippiLUTPalette_8u_C3R(pSrc, srcStepBytes, pDst, dstStepBytes, roiSize, pTable, nBitSize);	// status = ippStsNoErr (0) for 7.0 and 9.0

	roiSize = { 50, 50 };
	status = ippiLUTPalette_8u_C3R(pSrc, srcStepBytes, pDst, dstStepBytes, roiSize, pTable, nBitSize);				// status = ippStsStepErr (-14) on 9.0

	ippiFree(pSrc);
	ippiFree(pDst);

IPP 7.0 returns ippStsNoErr for both roi's.

IPP 9.0 Update 1 returns ippStsStepErr with the larger roi.

Is this a bug in version 9.0 of ippiLUTPalette_8u_C3R() ?

 

0 Kudos
3 Replies
Highlighted
13 Views

Hi Plane,

did you intensionally initialize the pSrc as 1 channel data array?

 

 

0 Kudos
Highlighted
Beginner
13 Views

Thanks for the reply Jon.

Yes, using ippiMalloc_8u_C1 to allocate pSrc was intentional.

The intent is to map index image pSrc (1 channel, 3 bits/px in this example) to RGB image pDst (3 channels).

This was possible in IPP 7.0 but something seems to have changed in IPP 9.0.

Can you confirm? Is there a workaround?

Thanks

0 Kudos
Highlighted
Beginner
13 Views

This is now resolved. No problem with ippiLUTPalette_8u_C3R. 

I now understand this function maps a C3 buffer to a C3 buffer - not C1 to C3 as I had though.

 

0 Kudos