- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a problem with ippiLUT. Following code:
Hello, following code:
int values[] = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; int levels[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; uint8_t data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; uint8_t outData[10]; IppiSize roiSize = { 10, 1 }; int specSize = 0; int numLevels[1] = { 10 }; const int *valuesPtr[] = { values }; const int *levelsPtr[] = { levels }; ippiLUT_GetSize(IppiInterpolationType::ippNearest, ipp8u, ippC1, roiSize, numLevels, &specSize); auto spec = (IppiLUT_Spec*)ippMalloc(specSize); ippiLUT_Init_8u(IppiInterpolationType::ippNearest, ippC1, roiSize, valuesPtr, levelsPtr, numLevels, spec); ippiLUT_8u_C1R(data, 10, outData, 10, roiSize, spec); ippFree(spec);
I guess, outDatais wrong for last pixel, which has a value of 9 but should be 14. Do I use it wrongly or is this a bug?
I'm using IPP 2019.0.4.
Best regards Steffen
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello steffenroeber,
Update uint8_t to int, and set srcStep/dstStep value from 10 to 10*sizeof(int), then you might get expected results. Let us know if have other problem.
Regards,
Ruqiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ruqiu,
not sure if I understood you right. Changing uint8_t data[] to int data[] is not compatible with ippiLUT_8u_C1R.
Best regards
Steffen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Steffen,
Please make sure all data type is aligned to mod in ippiLUT_<mod>. For example, values, levels, and data. You can refer to the sample code through https://software.intel.com/en-us/ipp-dev-reference-lut
Regards,
Ruqiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wow, bytes aligned to 8-bit bytes, that's the greatest invention in computing since the Turing machine !
Sincerely,
Adriaan van Os
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have never used ippiLUT, so the following is just a guess. Maybe, ippiLUT has the same problem as ippiHistogram, see https://software.intel.com/en-us/forums/intel-integrated-performance-primitives/topic/749059
Regards,
Adriaan van Os
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page