How to use ippiYCbCr420ToRGB_8u_P2C3R

How to use ippiYCbCr420ToRGB_8u_P2C3R

Hi,

Based from this link (http://software.intel.com/en-us/forums/topic/282021), I can use ippiYCbCr420ToRGB_8u_P2C3R to convert NV12 to BGR but I can't find any sample code on how to use the API. Could someone give me a simple code snippet? Say a 640x480 NV12 frame to a BGR of the same size? I'm new to IPP (using 7.1 now). What I'm particularly unsure of are these: const Ipp8u* pY, int pYStep, const Ipp8u* pCbCr, int CbCrStep parameters.

Thanks.

Chew

3 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hi Chew,

You may refer to IPPi manul page 208 to see the YCbCr420 2 plane format. The width of Y and interlace UV is same, so the step is same
Suppose your NV12 data are stored in to 2 plane . pYdata, and pUVData.
const Ipp8u* pY = pYData;
int pYStep = 640
pCbCr=pUVData
int CbCrStep=640

then as the http://software.intel.com/en-us/forums/topic/333526. do the conversion.

And regarding the code sample, you can refer to ipp sample package, like in ipp image processing ippiDemo sample , ipp UMC sample, there are almost of kind of color conversion functions demo.

Best Regards,
Ying

Some code from http://software.intel.com/en-us/forums/topic/333526

Const Ipp8u* (pYUV[3]) = {0,0,0};
pYUV[0] = pData;
pYUV[1] = pYUV[0] + 1920*1080;

pYUV[2] = pYUV[1] + 1920*1080/4

int YUVStep[3] = {1920,960,960};

Int step;

IppiSize roi = {1920,1080};

Ipp8u* pBuf = ippiMalloc_8u_C3(1920,1080, &step);

ippiYUV420ToBGR_8u_P3C3R(pYUV, YUVStep, pBuf, step, roi};

Hi Ying,

Thank you very much for you reply. Actually, I was expecting some sample codes from the evaluation download but the only sample in there was Life.zip which is kind of limited. I'm assuming now that these samples you mentioned are to be downloaded separately. I'll check that later.

Faça login para deixar um comentário.