- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
void BGRA2NV12(const unsigned char I[], const int image_width, const int image_height, unsigned char J[])
{
IppStatus ipp_status;
int srcStep = image_width * 4;
int dstYStep = image_width;
int dstCbCrStep = image_width;
IppiSize roiSize = { image_width, image_height };
const Ipp8u* psrc=(Ipp8u*)I;
Ipp8u* pDstY = (Ipp8u*)J; //Y color plane is the first image_width*image_height pixels of J.
Ipp8u* pDstCbCr = (Ipp8u*)&J[image_width * image_height]; //In NV12 format, UV plane starts below Y.
Ipp8u* pDstV = (Ipp8u*)&J[image_width * image_height * 3 / 2];
//unsigned char * pDst[3] = { pDstY, pDstCbCr, pDstV };
unsigned char* pDst[3] = { pDstY, pDstCbCr, pDstV };
int dstStep[3] = { image_width, image_width / 2, image_width / 2 };
ipp_status = ippiBGRToYCbCr420_8u_AC4P3R((Ipp8u*)pSrc, srcStep, (Ipp8u**)pDst, dstStep, roiSize);
#if 0
if (ipp_status != ippStsNoErr)
{
memset(J, 128, image_width * image_height * 3 / 2);
}
#endif
}
Use this function to compare the original image with the output image during image conversion. It is found that the output image, red is lost. Is it written in the wrong way? How to solve it?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
We are forwarding this issue to the SME.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The function BGRToYUV420 uses the same formulas as the function ippiRGBToYUV does. Can you please refer and verify the formulas mentioned here in this example?
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page