<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic detecting integer overflow in ippiResizeGetBufSize when resizin in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827093#M5261</link>
    <description>It only occurs when interpolation is set toIPPI_INTER_LINEAR|IPPI_ANTIALIASING. It doesn't occur with IPPI_INTER_LINEAR alone.&lt;BR /&gt;&lt;BR /&gt;When the anti-aliasing flag is added, the buffer size is606766416. (with numThreads = 1)&lt;DIV&gt;Without the anti-aliasing flag, the buffer size is163472. (with numThreads = 1)&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;When static-linked with the non-threaded LIB, numThreads default to 1.&lt;BR /&gt;When dynamically-linked with the DLL, numThreads defaults to the number of virtual cores, which is 8 in my computer.&lt;/DIV&gt;</description>
    <pubDate>Sat, 21 Jan 2012 02:01:37 GMT</pubDate>
    <dc:creator>Ryan_Wong</dc:creator>
    <dc:date>2012-01-21T02:01:37Z</dc:date>
    <item>
      <title>detecting integer overflow in ippiResizeGetBufSize when resizing large images</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827086#M5254</link>
      <description>Dear all,&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I was trying to resize a large 8bpp grayscale image (15440 x 9813) to half size, using IPPI_INTER_LINEAR and IPPI_ANTIALIASING flags. The application runs in 32-bit Windows.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;(In the application I'm developing, it is very common task to resize large images as long as the total image size (input size plus output size) doesn't exceed the available memory. In this case, the non-IPP version of my application typically requires 15440 x 9813 + 7720 x 4906 = less than 200MB memory.)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;When the program was first run, it crashes with access violation. The first version did not call ippSetNumThreads.&lt;BR /&gt;It turns out that because my machine is quad-core with HT enabled, IPP was defaulting to 8 threads, and the call to ippiResizeGetBufSize returns a value that is 8 times the value needed for single-threaded mode, which caused an 32-bit integer wrap-around, resulting in a value that falls short of the memory needed for ippiResizeSqrPixel_8u_C1R.&lt;BR /&gt;&lt;BR /&gt;(When single-thread is specified, the buffer size is606766416. When the default number of threads is used, e.g. 8, the buffer size is 0x121542A80, which is bigger than 32-bit and was wrapped around to559164032 when returned by ippiResizeGetBufSize.)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;I'm using Visual Studio, which fixes "sizeof(int) == 4" for both 32-bit and 64-bit applications.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;PRE&gt;[cpp]// ippiResizeCrash.cpp : Defines the entry point for the console application.[/cpp]&lt;/PRE&gt;&lt;PRE&gt;[cpp]#include "stdafx.h"
#include "ipp.h"
#include &lt;WINDOWS.H&gt;
#include &lt;IOSTREAM&gt;
#include &lt;EXCEPTION&gt;

#pragma comment(lib,"ippcore.lib")
#pragma comment(lib,"ipps.lib")
#pragma comment(lib,"ippi.lib")

int _tmain(int argc, _TCHAR* argv[])
{
	IppStatus st = ippStsNoErr;

	st = ippInit();
	if (st != ippStsNoErr)
	{
		std::cout &amp;lt;&amp;lt; "ippInit" &amp;lt;&amp;lt; std::endl;
		throw std::exception();
	}

	// No crash if numThreads set to 1.
	st = ippSetNumThreads(3);
	if (st != ippStsNoErr)
	{
		std::cout &amp;lt;&amp;lt; "ippSetNumThreads" &amp;lt;&amp;lt; std::endl;
		throw std::exception();
	}

	const int sourceWidth = 15440;
	const int sourceHeight = 9813;
	const int destWidth = sourceWidth / 2;
	const int destHeight = sourceHeight / 2;
	const int numChannels = 1;
	
	const int sourceStep = sourceWidth;
	const int destStep = destWidth;

	Ipp8u* srcData = (Ipp8u*)ippMalloc(sourceWidth * sourceHeight);
	Ipp8u* destData = (Ipp8u*)ippMalloc(destWidth * destHeight);

	if (!srcData || !destData)
	{
		std::cout &amp;lt;&amp;lt; "ippMalloc (source, dest)" &amp;lt;&amp;lt; std::endl;
		throw std::exception();
	}

	IppiSize srcSize = {0};
	srcSize.width = sourceWidth;
	srcSize.height = sourceHeight;

	IppiRect srcRoi = {0};
	srcRoi.x = 0;
	srcRoi.y = 0;
	srcRoi.width = sourceWidth;
	srcRoi.height = sourceHeight;

	IppiRect destRoi = {0};
	destRoi.x = 0;
	destRoi.y = 0;
	destRoi.width = destWidth;
	destRoi.height = destHeight;

	double xFactor = (double)destWidth / (double)sourceWidth;
	double yFactor = (double)destHeight / (double)sourceHeight;
	double xShift = 0.0;
	double yShift = 0.0;

	int interpolation = IPPI_INTER_LINEAR | IPPI_ANTIALIASING;

	int bufferSize = 0;
	st = ippiResizeGetBufSize(srcRoi, destRoi, numChannels, interpolation, &amp;amp;bufferSize);
	if (st != ippStsNoErr)
	{
		std::cout &amp;lt;&amp;lt; "ippiResizeGetBufSize" &amp;lt;&amp;lt; std::endl;
		throw std::exception();
	}
	
	Ipp8u* buffer = (Ipp8u*)ippMalloc(bufferSize);
	if (!buffer)
	{
		std::cout &amp;lt;&amp;lt; "ippMalloc (buffer)" &amp;lt;&amp;lt; std::endl;
		throw std::exception();
	}

	for (int k = 0; k &amp;lt; 5; ++k)
	{
		st = ippiResizeSqrPixel_8u_C1R((const Ipp8u*)srcData, srcSize, sourceStep, srcRoi,
			(Ipp8u*)destData, destStep, destRoi, 
			xFactor, yFactor, xShift, yShift, interpolation, buffer);
		if (st != ippStsNoErr)
		{
			std::cout &amp;lt;&amp;lt; "ippiResizeSqrPixel_8u_C1R" &amp;lt;&amp;lt; std::endl;
			throw std::exception();
		}
	}
	ippFree(srcData);
	ippFree(destData);
	ippFree(buffer);

	::Sleep(1000);
	return 0;
}
[/cpp]&lt;/EXCEPTION&gt;&lt;/IOSTREAM&gt;&lt;/WINDOWS.H&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Jan 2012 03:21:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827086#M5254</guid>
      <dc:creator>Ryan_Wong</dc:creator>
      <dc:date>2012-01-20T03:21:51Z</dc:date>
    </item>
    <item>
      <title>Detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827087#M5255</link>
      <description>&amp;gt;&amp;gt;...&lt;BR /&gt;&amp;gt;&amp;gt;When single-thread is specified, the buffer size is606766416. When the default number of threads is&lt;BR /&gt;&amp;gt;&amp;gt;used, e.g. 8, the buffer size is &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;0x121542A80&lt;/SPAN&gt;&lt;/STRONG&gt;, which is bigger than 32-bit...&lt;BR /&gt;&amp;gt;&amp;gt;...&lt;BR /&gt;&lt;BR /&gt;Hi Ryan,&lt;BR /&gt;&lt;BR /&gt;On&lt;STRONG&gt;32-bit&lt;/STRONG&gt; Windows platforms an application &lt;SPAN style="text-decoration: underline;"&gt;can not allocate&lt;/SPAN&gt; more than &lt;STRONG&gt;2GB&lt;/STRONG&gt; of memory.A &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;0x121542A80&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;( &lt;STRONG&gt;~4.5GB&lt;/STRONG&gt; ) number isgreater than &lt;STRONG&gt;2GB&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jan 2012 06:27:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827087#M5255</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-01-20T06:27:02Z</dc:date>
    </item>
    <item>
      <title>detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827088#M5256</link>
      <description>I'm surprised IPP requires such a large buffer for this case.&lt;BR /&gt;&lt;BR /&gt;You could try again with Resize() or ResizeCenter() to see if that can handle your case.&lt;BR /&gt;Those functions are marked as depreciated, so it is only a test...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jan 2012 08:26:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827088#M5256</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2012-01-20T08:26:23Z</dc:date>
    </item>
    <item>
      <title>detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827089#M5257</link>
      <description>I'm actually having a very similar problem when compiling against the 64-bit builds (v7.0.4.196) and was about to post a thread here.&lt;BR /&gt;&lt;BR /&gt;I have a similar use case -- need to resize a large image (7000 x 7000) to a smaller sized scale (typically 65-50% the original size). If I resize to below 5%, the attached code below doesn't crash. But if scaling is set to 0.5, it crashes every time on the call to ippiResizeSqrPixel_8u_C1R(). I've noticed increasing the image size (anything above 8196x8196) results in ippiResizeGetBufSize() overflowing and returning a very large negative number. Even in 64-bit mode, I can't allocate that much memory ;)&lt;BR /&gt;&lt;BR /&gt;One thing that occurred to me to ask is if anyone knows if ippiResizeSqrPixel_8u_C1R requires any padding? Many of the other image kernels (EG: erosion/dilation) require padding of some size to work properly. The docs don't seem to indicate any padding is necessary, but this wouldn't be the first time there was insufficient documentation for an IPP function...&lt;BR /&gt;&lt;BR /&gt;Here's what I'm doing (very similar to the above snippit):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]#include &lt;IPP.H&gt;
#include &lt;IOSTREAM&gt;

IppStatus ResizeSqrPixel( void )
{
    const int NUMBER_ROWS = 7000;
    const int NUMBER_COLS = 7000;
    
    double scale = 0.5;
    int scaledCols = (int)(scale*NUMBER_COLS + 0.5);
    int scaledRows = (int)(scale*NUMBER_ROWS + 0.5);
    IppiSize srcSize = {NUMBER_ROWS, NUMBER_COLS};
    IppiSize destSize = {scaledRows,scaledCols};
    IppiRect srcRect = {0,0,NUMBER_ROWS, NUMBER_COLS};
    IppiRect destRect = {0,0,scaledRows,scaledCols};
    Ipp8u *scratchBuf = NULL;
    int bufsize = 0;
    IppStatus status = ippStsNoErr;

    int sourceStep = 0;
    Ipp8u* src = ippiMalloc_8u_C1(NUMBER_ROWS, NUMBER_COLS, &amp;amp;sourceStep);

    int destStep = 0;
    Ipp8u* dst = ippiMalloc_8u_C1(scaledRows, scaledCols, &amp;amp;destStep);

    // initialize source and dest
    status = ippiSet_8u_C1R( 1, src, sourceStep, srcSize );
    status = ippiSet_8u_C1R( 0, dst, destStep, destSize );

    static const int IPP_INPUT_IMAGE_RESIZE_MODE = IPPI_INTER_LINEAR | IPPI_ANTIALIASING;

    status = ippiResizeGetBufSize( srcRect,
                                   destRect, 
                                   1, 
                                   IPP_INPUT_IMAGE_RESIZE_MODE, 
                                   &amp;amp;bufsize );

    scratchBuf = ippsMalloc_8u( bufsize );
    if( NULL != scratchBuf )
    {
        status = ippiResizeSqrPixel_8u_C1R(src, srcSize, sourceStep, srcRect,
                                           dst, destStep, destRect,
                                           scale,
                                           scale,
                                           0,
                                           0,
                                           IPP_INPUT_IMAGE_RESIZE_MODE, 
                                           scratchBuf );
    }
    else
    {
        std::cerr &amp;lt;&amp;lt; "Malloc failed, check bufsize of " &amp;lt;&amp;lt; bufsize;
        return ippStsMemAllocErr;
    }

    if( NULL != scratchBuf )
    {
        ippsFree( scratchBuf );
    }
    return status;
}

int main(int argc, char* argv[])
{
    ResizeSqrPixel();
	return 0;
}[/cpp]&lt;/IOSTREAM&gt;&lt;/IPP.H&gt;&lt;/PRE&gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jan 2012 17:35:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827089#M5257</guid>
      <dc:creator>Frank_S</dc:creator>
      <dc:date>2012-01-20T17:35:06Z</dc:date>
    </item>
    <item>
      <title>Detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827090#M5258</link>
      <description>Hi Frank,&lt;BR /&gt;&lt;BR /&gt;I use '&lt;STRONG&gt;ippiResize_8u_C1R&lt;/STRONG&gt;' instead ona computer with one CPUwithone &lt;STRONG&gt;IPP&lt;/STRONG&gt; threadand it works for&lt;BR /&gt;sizes up to &lt;STRONG&gt;34207&lt;/STRONG&gt; x &lt;STRONG&gt;34207&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Somethinggoes wrongif I increase the size to &lt;STRONG&gt;34208&lt;/STRONG&gt; x &lt;STRONG&gt;34208&lt;/STRONG&gt;, that is, an &lt;STRONG&gt;Access Violation&lt;/STRONG&gt; happens.&lt;BR /&gt;&lt;BR /&gt;Here is an example of an output:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt; Application - ScaLibTestApp - &lt;STRONG&gt;WIN32_MSC&lt;/STRONG&gt;&lt;BR /&gt; Tests: Start&lt;BR /&gt;&lt;STRONG&gt; &amp;gt; Test1147 Start &amp;lt;&lt;/STRONG&gt;&lt;BR /&gt; Intel IPP Library Support Enabled&lt;BR /&gt; Sub-Test 07&lt;BR /&gt; Source Image size : &lt;STRONG&gt;32768&lt;/STRONG&gt; x &lt;STRONG&gt;32768&lt;/STRONG&gt;&lt;BR /&gt; Destination Image size: &lt;STRONG&gt;16384&lt;/STRONG&gt; x &lt;STRONG&gt;16384&lt;/STRONG&gt;&lt;BR /&gt; Memory for a Source Image is allocated&lt;BR /&gt; Memory for a Destination Image is allocated&lt;BR /&gt; [ &lt;STRONG&gt;ippiSet_8u_C1R&lt;/STRONG&gt; ] Completed&lt;BR /&gt; Resizing the Source Image...&lt;BR /&gt; [ &lt;STRONG&gt;ippiResize_8u_C1R&lt;/STRONG&gt; ] Completed&lt;BR /&gt; [ &lt;STRONG&gt;ippiFree&lt;/STRONG&gt; ] for the Source Image Completed&lt;BR /&gt; [ &lt;STRONG&gt;ippiFree&lt;/STRONG&gt; ] for theDestination Image Completed&lt;BR /&gt; &amp;gt; Test1147 End &amp;lt;&lt;BR /&gt; Tests: Completed&lt;BR /&gt; Memory Blocks Allocated  : 0&lt;BR /&gt; Memory Blocks Released  : 0&lt;BR /&gt; Memory Blocks NOT Released: 0&lt;BR /&gt; Memory Tracer Integrity Verified - Memory Leaks NOT Detected&lt;/P&gt;&lt;P&gt; Deallocating Memory Tracer Data Table&lt;BR /&gt; Completed&lt;BR /&gt; Press any key to continue . . .&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;PS:&lt;/STRONG&gt; I'll provide a screenshot of the &lt;STRONG&gt;Windows Task Manager&lt;/STRONG&gt; later&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2012 19:19:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827090#M5258</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-01-20T19:19:31Z</dc:date>
    </item>
    <item>
      <title>Detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827091#M5259</link>
      <description>&lt;STRONG&gt;Here is the source code of my Test-Case:&lt;/STRONG&gt; &lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Note:&lt;/SPAN&gt;&lt;/STRONG&gt; An error proccesing is very limited!&lt;BR /&gt;&lt;BR /&gt;// &lt;STRONG&gt;Sub-Test 07&lt;/STRONG&gt; - Tests for '&lt;STRONG&gt;ippiResize_8u_C1R&lt;/STRONG&gt;' function&lt;BR /&gt;{&lt;BR /&gt;///*&lt;BR /&gt;#if defined ( _WIN32_MSC )&lt;/P&gt;&lt;P&gt;CrtPrintf( RTU("Sub-Test 07\n") ); // Max Image size is34207 x 34207&lt;/P&gt;&lt;P&gt;IppStatus st = ippStsNoErr;&lt;BR /&gt;RTint iSrcWidth = 32768 / 1;&lt;BR /&gt;RTint iSrcHeight = 32768 / 1;&lt;BR /&gt;RTint iDstWidth = iSrcWidth / 2;&lt;BR /&gt;RTint iDstHeight = iSrcHeight / 2;&lt;/P&gt;&lt;P&gt;CrtPrintf( RTU("Source Image size: %5ld x %5ld\n"), iSrcWidth, iSrcHeight );&lt;BR /&gt;CrtPrintf( RTU("Destination Image size: %5ld x %5ld\n"), iDstWidth, iDstHeight );&lt;/P&gt;&lt;P&gt;RTint iSrcStepBytes = -1;&lt;BR /&gt;RTint iDstStepBytes = -1;&lt;BR /&gt;&lt;BR /&gt;Ipp8u *pSrcImage = ( Ipp8u * )::ippiMalloc_8u_C1( iSrcWidth, iSrcHeight, &amp;amp;iSrcStepBytes );&lt;BR /&gt;if( pSrcImage == RTnull )&lt;BR /&gt; CrtPrintf( RTU("Memory for a Source Image is NOT allocated\n") );&lt;BR /&gt;else&lt;BR /&gt; CrtPrintf( RTU("Memory for a Source Image is allocated\n") );&lt;/P&gt;&lt;P&gt;Ipp8u *pDstImage = ( Ipp8u * )::ippiMalloc_8u_C1( iDstWidth + 0, iDstHeight + 0, &amp;amp;iDstStepBytes );&lt;BR /&gt;if( pDstImage == RTnull )&lt;BR /&gt; CrtPrintf( RTU("Memory for a Destination Image is NOT allocated\n") );&lt;BR /&gt;else&lt;BR /&gt; CrtPrintf( RTU("Memory for a Destination Image is allocated\n") );&lt;/P&gt;&lt;P&gt;IppiSize srcSize = { 0 };&lt;BR /&gt;srcSize.width = iSrcWidth * iSrcHeight;&lt;BR /&gt;srcSize.height = 1;&lt;/P&gt;&lt;P&gt;st = ::ippiSet_8u_C1R( 1, pSrcImage, 1, srcSize );&lt;BR /&gt;if( st != ippStsNoErr )&lt;BR /&gt; CrtPrintf( RTU("[ ippiSet_8u_C1R ] Failed\n") );&lt;BR /&gt;else&lt;BR /&gt; CrtPrintf( RTU("[ ippiSet_8u_C1R ] Completed\n") );&lt;BR /&gt;&lt;BR /&gt;srcSize.width = iSrcWidth;&lt;BR /&gt;srcSize.height = iSrcHeight;&lt;BR /&gt;&lt;BR /&gt;IppiRect srcRoi = { 0 };&lt;BR /&gt;srcRoi.x = 0;&lt;BR /&gt;srcRoi.y = 0;&lt;BR /&gt;srcRoi.width = iSrcWidth;&lt;BR /&gt;srcRoi.height = iSrcHeight;&lt;BR /&gt;&lt;BR /&gt;IppiSize dstSize = { 0 };&lt;BR /&gt;dstSize.width = iDstWidth;&lt;BR /&gt;dstSize.height = iDstHeight;&lt;BR /&gt;&lt;BR /&gt;RTdouble dFactorX = ( RTdouble )iDstWidth / ( RTdouble )iSrcWidth;&lt;BR /&gt;RTdouble dFactorY = ( RTdouble )iDstHeight / ( RTdouble )iSrcHeight;&lt;BR /&gt;&lt;BR /&gt;RTint iInterpolation = IPPI_INTER_LINEAR;&lt;BR /&gt;&lt;BR /&gt;CrtPrintf( RTU("Resizing the Source Image...\n") );&lt;BR /&gt;&lt;BR /&gt;st = ::ippiResize_8u_C1R( ( const Ipp8u * )pSrcImage, srcSize, iSrcStepBytes, srcRoi,&lt;BR /&gt; ( Ipp8u * )pDstImage, iDstStepBytes, dstSize,&lt;BR /&gt; dFactorX, dFactorY, iInterpolation );&lt;BR /&gt;if( st != ippStsNoErr )&lt;BR /&gt; CrtPrintf( RTU("[ ippiResize_8u_C1R ] Failed\n") );&lt;BR /&gt;else&lt;BR /&gt; CrtPrintf( RTU("[ ippiResize_8u_C1R ] Completed\n") );&lt;/P&gt;&lt;P&gt;if( pSrcImage != RTnull )&lt;BR /&gt;{&lt;BR /&gt; ::ippiFree( pSrcImage );&lt;BR /&gt; CrtPrintf( RTU("[ ippiFree ] for the Source Image Completed\n") );&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if( pDstImage != RTnull )&lt;BR /&gt;{&lt;BR /&gt; ::ippiFree( pDstImage );&lt;BR /&gt; CrtPrintf( RTU("[ ippiFree ] for the Destination Image Completed\n") );&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;pSrcImage = RTnull;&lt;BR /&gt;pDstImage = RTnull;&lt;/P&gt;&lt;P&gt;#endif&lt;BR /&gt;//*/&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2012 19:35:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827091#M5259</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-01-20T19:35:33Z</dc:date>
    </item>
    <item>
      <title>detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827092#M5260</link>
      <description>Sergey,&lt;BR /&gt;&lt;BR /&gt;Thank you for the quick response. I was able to substitute ippiResize_8u_C1R for ippiResizeSqrPixel_8u_C1R and get the desired results without crashing. However, I'm greeted with a warning that ippiResize_8u_C1R is deprecated, and we should be using ippiResizeSqrPixel_8u_C1R.&lt;BR /&gt;&lt;BR /&gt;I've disabled this warning with a pragma, but in the interest of making my code compatable with future versions of IPP, I'm uncomfortable substituting these functions for the long term.&lt;BR /&gt;&lt;BR /&gt;Warning message:&lt;BR /&gt;&lt;BR /&gt;1&amp;gt;.\IPPResizeTest.cpp(38) : warning C4996: 'ippiResize_8u_C1R': use ippiResizeSqrPixel_8u_C1R function instead of this one&lt;BR /&gt;1&amp;gt; c:\program files (x86)\intel\composerxe-2011\ipp\include\ippi.h(5131) : see declaration of 'ippiResize_8u_C1R'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Do you think Intel will fix ippiResizeSqrPixel_8u_C1R in a future IPP release?&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jan 2012 19:58:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827092#M5260</guid>
      <dc:creator>Frank_S</dc:creator>
      <dc:date>2012-01-20T19:58:28Z</dc:date>
    </item>
    <item>
      <title>detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827093#M5261</link>
      <description>It only occurs when interpolation is set toIPPI_INTER_LINEAR|IPPI_ANTIALIASING. It doesn't occur with IPPI_INTER_LINEAR alone.&lt;BR /&gt;&lt;BR /&gt;When the anti-aliasing flag is added, the buffer size is606766416. (with numThreads = 1)&lt;DIV&gt;Without the anti-aliasing flag, the buffer size is163472. (with numThreads = 1)&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;When static-linked with the non-threaded LIB, numThreads default to 1.&lt;BR /&gt;When dynamically-linked with the DLL, numThreads defaults to the number of virtual cores, which is 8 in my computer.&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Jan 2012 02:01:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827093#M5261</guid>
      <dc:creator>Ryan_Wong</dc:creator>
      <dc:date>2012-01-21T02:01:37Z</dc:date>
    </item>
    <item>
      <title>detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827094#M5262</link>
      <description>If I'm not wrong, the antialiasing flag only deals with the borders of the result.&lt;BR /&gt;Can't you just drop it?&lt;BR /&gt;&lt;BR /&gt;Regarding how many cores IPP uses, there are a bunch of OMP settings that can control multithreading.&lt;BR /&gt;Those settings are related to getting max performance when you have different Intel CPU architectures, such as:&lt;BR /&gt;- Two cpu chips.&lt;BR /&gt;- One cpu chip with two dies inside.&lt;BR /&gt;- One cpu chip with one die inside.&lt;BR /&gt;- Etc.&lt;BR /&gt;&lt;BR /&gt;Those OMP flags can be set programatically and/or by setting an environment variable.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 21 Jan 2012 11:47:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827094#M5262</guid>
      <dc:creator>Thomas_Jensen1</dc:creator>
      <dc:date>2012-01-21T11:47:35Z</dc:date>
    </item>
    <item>
      <title>Detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827095#M5263</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1327169820156="55" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=550644" href="https://community.intel.com/en-us/profile/550644/" class="basic"&gt;Frank S&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;EM&gt;...&lt;BR /&gt;Warning message:&lt;BR /&gt;&lt;BR /&gt;1&amp;gt;.\IPPResizeTest.cpp(38) : warning C4996: 'ippiResize_8u_C1R': use ippiResizeSqrPixel_8u_C1R function instead of this one&lt;BR /&gt;1&amp;gt; c:\program files (x86)\intel\composerxe-2011\ipp\include\ippi.h(5131) : see declaration of 'ippiResize_8u_C1R'&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt; [&lt;STRONG&gt;SergeyK&lt;/STRONG&gt;] If &lt;STRONG&gt;Intel&lt;/STRONG&gt; will decide to remove '&lt;STRONG&gt;ippiResize_8u_C1R&lt;/STRONG&gt;' function I will be forced touse&lt;BR /&gt; an older &lt;STRONG&gt;IPP&lt;/STRONG&gt; version that supports it.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Do you think Intel will fix &lt;SPAN style="text-decoration: underline;"&gt;ippiResizeSqrPixel_8u_C1R&lt;/SPAN&gt; in a future IPP release?&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt; [&lt;STRONG&gt;SergeyK&lt;/STRONG&gt;] I think Yes. If you really need '&lt;STRONG&gt;ippiResizeSqrPixel_8u_C1R&lt;/STRONG&gt;' function I would contact to&lt;BR /&gt; the &lt;STRONG&gt;Intel Premium support&lt;/STRONG&gt;. It is clear that there are &lt;SPAN style="text-decoration: underline;"&gt;problems&lt;/SPAN&gt; in a &lt;SPAN style="text-decoration: underline;"&gt;Multi-CPU&lt;/SPAN&gt;&lt;BR /&gt;environment and with processing of &lt;SPAN style="text-decoration: underline;"&gt;large images&lt;/SPAN&gt;. &lt;STRONG&gt;IPP&lt;/STRONG&gt; team should do as better as&lt;BR /&gt; possible stress testing. I &lt;SPAN style="text-decoration: underline;"&gt;believe they've donestress testing&lt;/SPAN&gt;but something was missed.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Unfortunately, we don't hear anything from &lt;STRONG&gt;Intel&lt;/STRONG&gt; regarding these problems.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2012 18:31:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827095#M5263</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-01-21T18:31:07Z</dc:date>
    </item>
    <item>
      <title>Detecting integer overflow in ippiResizeGetBufSize when resizin</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827096#M5264</link>
      <description>&lt;DIV id="tiny_quote"&gt;&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A jquery1327171137093="55" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=547447" href="https://community.intel.com/en-us/profile/547447/" class="basic"&gt;Ryan Wong&lt;/A&gt;&lt;/DIV&gt;&lt;DIV style="background-color: #e5e5e5; margin-left: 2px; margin-right: 2px; border: 1px inset; padding: 5px;"&gt;&lt;I&gt;...&lt;BR /&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;When single-thread is specified, the buffer size is606766416. &lt;SPAN style="text-decoration: underline;"&gt;When the default number of threads is used, e.g. 8, the buffer size is &lt;STRONG&gt;0x121542A80&lt;/STRONG&gt;&lt;/SPAN&gt;, which is bigger than 32-bit and was wrapped around&lt;BR /&gt;to559164032 when returned by ippiResizeGetBufSize.&lt;BR /&gt;&lt;/SPAN&gt;...&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Hi Ryan,&lt;BR /&gt;&lt;BR /&gt;Did you get that number, that is&lt;STRONG&gt;0x121542A80&lt;/STRONG&gt;, on a &lt;STRONG&gt;32-bit&lt;/STRONG&gt; or &lt;STRONG&gt;64-bit&lt;/STRONG&gt; Windowsplatform?&lt;BR /&gt;&lt;BR /&gt; &lt;STRONG&gt;0x121542A80 = 4,854,131,328&lt;/STRONG&gt; ( greater that &lt;STRONG&gt;MAX 32-bit&lt;/STRONG&gt;value &lt;STRONG&gt;4,294,967,296&lt;/STRONG&gt;)&lt;BR /&gt;&lt;BR /&gt; ...&lt;BR /&gt; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;bufferSize&lt;/SPAN&gt;=0;&lt;BR /&gt; st=ippiResizeGetBufSize(srcRoi,destRoi,numChannels,interpolation,&amp;amp;&lt;SPAN style="text-decoration: underline;"&gt;bufferSize&lt;/SPAN&gt;); &lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;I could assume that it happened on a &lt;STRONG&gt;64-bit&lt;/STRONG&gt; platform because only in that case '&lt;STRONG&gt;int&lt;/STRONG&gt;' is &lt;STRONG&gt;64-bit&lt;/STRONG&gt; based.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2012 18:51:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/detecting-integer-overflow-in-ippiResizeGetBufSize-when-resizing/m-p/827096#M5264</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-01-21T18:51:46Z</dc:date>
    </item>
  </channel>
</rss>

