- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My image is YUY2 and I am trying to convert it to I420.
When I try it I get unable to reading memory 0x00000000.
Sample code using the IPP would be very helpfully.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LPBYTE ImageI420[3];
IppiSize RoiSize;
ImageI420[0] = (LPBYTE)
new unsigned char[dwWidth * dwHeight * 3];ImageI420[1] = (LPBYTE)
new unsigned char[dwWidth * dwHeight * 3];ImageI420[2] = (LPBYTE)
new unsigned char[dwWidth * dwHeight * 3];RoiSize.height = dwHeight * 2;
RoiSize.width = dwWidth * 2;
ippiYCbCr422ToYCbCr420_8u_C2P3R(RawImageAddr,0,ImageI420,0,RoiSize);
RawImageAddr is a YUY2 image in LPBYTE type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
int
dstStep[3]; LPBYTE ImageI420[3];IppiSize RoiSize;
ImageI420[0] = (LPBYTE)
new unsigned char[dwWidth * dwHeight * 3];ImageI420[1] = (LPBYTE)
new unsigned char[dwWidth * dwHeight * 3];ImageI420[2] = (LPBYTE)
new unsigned char[dwWidth * dwHeight * 3];dstStep[0] = dwWidth * dwHeight *
sizeof(ImageI420);dstStep[1] = dwWidth * dwHeight *
sizeof(ImageI420);dstStep[2] = dwWidth * dwHeight *
sizeof(ImageI420);RoiSize.height = dwHeight * 2;
RoiSize.width = dwWidth * 2;
ippiYCbCr422ToYCbCr420_8u_C2P3R(RawImageAddr,dwWidth * dwHeight *
sizeof(RawImageAddr),ImageI420,dstStep,RoiSize);- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
{
Ipp8u* ImageI420[3];
int stepI420[3];
Ipp8u* ImageYUY2;
int stepYUY2;
IppiSize roiSize = { 1024, 768};
ImageI420[0] = ippiMalloc_8u_C1( roiSize.width, roiSize.height, &(stepI420[0]));
ImageI420[1] = ippiMalloc_8u_C1( roiSize.width, roiSize.height, &(stepI420[1]));
ImageI420[2] = ippiMalloc_8u_C1( roiSize.width, roiSize.height, &(stepI420[2]));
ImageYUY2 = ippiMalloc_8u_C2( roiSize.width, roiSize.height, &stepYUY2 );
ippiYCbCr422ToYCbCr420_8u_C2P3R( ImageYUY2, stepYUY2, ImageI420, stepI420, roiSize);
ippiFree(ImageI420[0]);
ippiFree(ImageI420[1]);
ippiFree(ImageI420[2]);
ippiFree(ImageYUY2);
}
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page