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

Error in documetation of color conversion

gilgil
Beginner
265 Views
I am using intel compiler 11.1.054 and I have the ippiman.pdf of march 2009. In page 273 there is "Example 6-1 Using the Function ippiRGBToYUV".
The example returns error due to wrong roi size. it should be {3,3} and not {9,3).

Is it a bug in the compiler or the wrong documanetation ?
0 Kudos
3 Replies
Gennady_F_Intel
Moderator
265 Views
This is the wrong example. roiSize should be {3,3}.
This issue has been submitted to our internal development tracking database for further investigation, we will inform you once a new update becomes available.
Here is a bug tracking number for your reference: DPD200186071.
--Gennady

0 Kudos
Gennady_F_Intel
Moderator
265 Views
I think, this code would be much better:

#define nChannels 3

int main() {

Ipp8u src[3*3*nChannels] = {

255, 0, 0, 255, 0, 0, 255, 0, 0,

0, 255, 0, 0, 255, 0, 0, 255, 0,

0, 0, 255, 0, 0, 255, 0, 0, 255};

Ipp8u dst[3*3*nChannels];

IppiSize roiSize = { 3, 3 };

IppStatus st = ippStsNoErr;

int srcStep = 3*nChannels;

int dstStep = 3*nChannels;

st = ippiRGBToYUV_8u_C3R ( src, srcStep, dst, dstStep, roiSize );

if ( st == ippStsNoErr){

printf("\n ************* passed ****************\n");

}else{

printf("\n ************* failed ****************\t");

}

return 0;

}

--Gennady
0 Kudos
gilgil
Beginner
265 Views
This solves the problem.
Thanks
0 Kudos
Reply