Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Error in documetation of color conversion

gilgil
Beginner
88 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
88 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

Gennady_F_Intel
Moderator
88 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
gilgil
Beginner
88 Views
This solves the problem.
Thanks
Reply