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

How to get detail conversion of ippiYCbCr422ToBGR_8u_C2C3R ?

Peter_L_8
Beginner
635 Views

Hello everyone, 

I would like to do image processing and need to know the detail of ippiYCbCr422ToBGR_8u_C2C3R.

such as 

Y'= 0.299*R' + 0.587*G' + 0.114*B'

U'= -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B'- Y') V'= 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R'- Y') R' = Y' + 1.140*V'

G' = Y' - 0.394*U' - 0.581*V' )

Is anyone can help me ? thanks

 

0 Kudos
1 Reply
Ying_H_Intel
Employee
635 Views

Hi Peter, 

Do you have problem to call the function or other exact issues? 

Yes, the function do the exact work as you list. You can see it in IPP manual. 

https://software.intel.com/en-us/ipp-9.0-ippi-manual-pdf

https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-documentation/

There is sample: about  ippiYCbCr422ToGray

const int WIDTH = 2;
const int HEIGHT = 2;
Ipp8u pSrc[WIDTH * HEIGHT * 2] = {
190,70,191,80,
200,71,201,81,
};
Ipp8u pDst[WIDTH * HEIGHT];
int srcStep = WIDTH * 2, dstStep = WIDTH;
IppiSize roiSize = {WIDTH, HEIGHT};
IppStatus status = ippiYCbCr422ToGray_8u_C2C1R(pSrc, srcStep, pDst, dstStep, roiSize);
if ( status == ippStsNoErr) 
printf("PASS:\n%3d %3d\n%3d %3d\n", pDst[0], pDst[1], pDst[2], pDst[3]);
else 
printf("FAIL: status = %d\n", status);
 

You can change it to ippiYCbCr422ToBGR_8u_C2C3R

like  

Ipp8u pDst[3*WIDTH * HEIGHT];

dstStep = 3*WIDTH

ippiYCbCr422ToBGR_8u_C2C3R(pSrc,  srcStep,  pDst,
dstStep, roiSize)

Best Regards,

Ying H.

Intel IPP Support 

0 Kudos
Reply