Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

problem with x64 ippiCopy YV12 image ROI

$
0
0

I have an image that I am copying into another image using ROI. Format is YV12.  The code I am using is from the intel sample Image,cpp: BOOL Image::CopyDataP_ROI(void** ppData, int* step, IppiSize roiSize) { if (!(m_InitFlag & initAlloc)) return FALSE;
     if (!ppData) return FALSE;
     if (!m_plane) return FALSE;
     roiSize.width *= ItemSize();
     for (int c=0; c < Channels(); c++) {

          IppiSize size = roiSize;
          CorrectPlaneSize(size.width,size.height,c);
          ippiCopy_8u_C1R((Ipp8u*)ppData[c], step[c], (Ipp8u*)GetRoiPtrP(c), StepP(c), size);     
     }
     m_Updated = TRUE;
     return TRUE;
}

If I have a 640x480 image that I copy into a 640x480 ROI, it appears correct.
If I have a 320x240 image that I copy into a 640x480 image, the image appears as shown int he attached image.

The image appears stretched vertically and repeated four times.  
If I have a 640x480 source and resize it to 320x240 and place it within a 320x240 ROI in the destination 640x480 image,  it appears correctly.  It seems that everything works correctly if the source image resolution is the same as the destination resolution.  
The same exact code compiled for 32-bit does not have this issue at all.  Not sure why but could it have something to do with the x64 pointers to the planar data or perhaps the ptr math (common errors when converting to x64).
Has anyone else run into this issue or can perhaps point me int he right direction?  Thanks.


Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>