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