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

Error in documetation of color conversion

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
Highlighted
Moderator
14 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
Highlighted
Moderator
14 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
Highlighted
Beginner
14 Views

This solves the problem.
Thanks
0 Kudos