tests/cuda2.2/tests/Dct8x8/BmpUtil.cpp
short *MallocPlaneShort(int width, int height, int *pStepBytes)
{
	short *ptr;
	*pStepBytes = ((int)ceil((width*sizeof(short))/16.0f))*16;
	//#ifdef __ALLOW_ALIGNED_MEMORY_MANAGEMENT
	//	ptr = (float *)_aligned_malloc(*pStepBytes * height, 16);
	//#else
	ptr = (short *)malloc(*pStepBytes * height);
	//#endif
	*pStepBytes = *pStepBytes / sizeof(short);
	return ptr;
}
/**
**************************************************************************
*  Memory allocator, returns aligned format frame with 16bpp float pixels.
*
* \param width			[IN] - Width of image buffer to be allocated
* \param height			[IN] - Height of image buffer to be allocated
* \param pStepBytes		[OUT] - Step between two sequential rows
*  
* \return Pointer to the created plane
*/
Memory allocator, returns aligned format frame with 16bpp float pixels.
\param width                   [IN] - Width of image buffer to be allocated
\param height                  [IN] - Height of image buffer to be allocated
\param pStepBytes              [OUT] - Step between two sequential rows

\return Pointer to the created plane
Memory allocator returns aligned format frame with 16bpp float pixels . \ param width [ IN ] - Width of image buffer to be allocated \ param height [ IN ] - Height of image buffer to be allocated \ param pStepBytes [ OUT ] - Step between two sequential rows \ return Pointer to the created plane
short *MallocPlaneShort(int width, int height, int *pStepBytes)
{
	short *ptr;
	*pStepBytes = ((int)ceil((width*sizeof(short))/16.0f))*16;
	ptr = (short *)malloc(*pStepBytes * height);
	*pStepBytes = *pStepBytes / sizeof(short);
	return ptr;
}
short * MallocPlaneShort ( int width , int height , int * pStepBytes ) { short * ptr ; * pStepBytes = ( ( int ) ceil ( ( width * sizeof ( short ) ) / 16.0f ) ) * 16 ; ptr = ( short * ) malloc ( * pStepBytes * height ) ; * pStepBytes = * pStepBytes / sizeof ( short ) ; return ptr ; }
Memory allocator, returns aligned format frame with 16bpp float pixels.
Memory allocator returns aligned format frame with 16bpp float pixels .
//#ifdef __ALLOW_ALIGNED_MEMORY_MANAGEMENT //	ptr = (float *)_aligned_malloc(*pStepBytes * height, 16); //#else //#endif