- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
(I've deliberately left out ippiFree because I need to get lots of different pointers before the crash occurs).
Any help appreciated - Jon.
Could you try a test with verifications of 'image1' and 'image2' pointersas follows:
...
for( int i = 0; i < 1000; i++ )
{
IppiSize ippiSize = { 1024, 4 };
Ipp8u* image1 = (Ipp8u*)ippiMalloc(ippiSize.width * ippiSize.height);
if( image1 == NULL )
{
printf( "Failed to allocate memory for Image1\n" );
break;
}
Ipp8u* image2 = (Ipp8u*)ippiMalloc(ippiSize.width * ippiSize.height);
if( image2 == NULL )
{
printf( "Failed to allocate memory for Image2\n" );
break;
}
ippiCopySubpix_8u_C1R(image2, ippiSize.width, image1, ippiSize.width, ippiSize, 0, 0);
}
...
I don't think that the problem with access violation is related to a "lack of memory" on a 64-bit Windows 7 because ~31MB of memory is allocated
after 1,000 interations in Jon's test case.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
disassembler: movq xmm5,mmword ptr [eax+esi+8]
image2 = 16317472
esi = 16321528
eax = 1024
image size in bytes = 1024 * 4 = 4096
image2 + image size = 16321568
The address being used at the point of failure = [1024 + 16321528 + 8] = 16322560
So the reason for the crash is the algorithm is trying to read memory (16322560) that is beyond the end of image 2 (16317472 to 16321567)
If my understanding is correct then the algorithm is sampling data outside of the image bounds. This makes sense when you think of the fractional offsets being used. But this also means that the documentation is incorrect by not stipulating that the ROI should take into account this effect (as we do for most kernel operations). It also means the demo app has the same bug that I do because it also processes the entire region of an image. (The demo app can be made to crash using this function).
So my current conclusion is that the documentation is wrong, and that my software and your demo need to be fixed. For the moment I have to stop using the function as I have alternatives (such as the affine transformation) that work for my full ROI.
Any more feedback on this much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If my understanding is correct then the algorithm is sampling data outside of the image bounds...
...
Any more feedback on this much appreciated.
I think Intel Software Engineers should look at the problem.
One more thing, could you try to increasethe sizeof a buffer that holds the second image:
...
int iExtra = 128; // Number of Extra Rowsand Cols
Ipp8u* image2 = (Ipp8u*)ippiMalloc( ( ippiSize.width +iExtra )* (ippiSize.height + iExtra ));
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page