Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

FilterGaussianGetBufferSize

Computes the size of the Gaussian specification structure and the size of the external work buffer for Gaussian filtering with user-defined borders.

Syntax

IppStatus ippiFilterGaussianGetBufferSize(IppiSize maxRoiSize, Ipp32u kernelSize, IppDataType dataType, int numChannels, int* pSpecSize, int* pBufferSize);

Platform-aware functions

IppStatus ippiFilterGaussianGetBufferSize_L(IppiSizeL maxRoiSize, int kernelSize, IppDataType dataType, IppiBorderType borderType, int numChannels, IppSizeL* pBufferSize);

Include Files

ippcv.h

Flavors with the _L suffix: ippcv_l.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

maxRoiSize

Maximal size of the image ROI in pixels.

kernelSize

Size of the Gaussian filter kernel. The value must be odd and greater, or equal to 3.

dataType

Data type of the source and destination images.

borderType

One of border supported types.

numChannels

Number of channels in the images. Possible values are 1 and 3.

pSpecSize

Pointer to the computed size (in bytes) of the Gaussian specification structure.

pBufferSize

Pointer to the computed size (in bytes) of the external buffer.

Description

This function computes the size of the Gaussian context structure and external work buffer for the FilterGaussianBorder function or for the platform-aware function FilterGaussian. The results are stored in pSpecSize and pBufferSize. The buffer with the length pBufferSize[0] can be used to filter an image with the width and height less than, or equal to the corresponding fields of maxRoiSize, and/or kernel size that is less than, or equal to kernelSize.

NOTE:

The platform-aware function FilterGaussianGetBufferSize_L computes only the size of the external work buffer for Gaussian filtering with user-defined borders. To compute the size of the Gaussian specification structure, please use the platform-aware function FilterGaussianGetSpecSize.

Use the computed pBufferSize and pSpecSize values to allocate the memory using the ippMalloc or ippsMalloc functions. The allocated memory can be freed only by the ippFree or ippsFree functions, respectively. For more information about the memory allocation functions, refer to the "Support Functions" section of the Intel IPP Developer Reference, vol. 1.

For an example on how to use this function, refer to the example provided with the FilterGaussianBorder function description.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when maxRoiSize has a field with a zero or negative value.

ippStsBadArgErr

Indicates an error when kernelSize is even, or less than 3.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelErr

Indicates an error when numChannels has an illegal value.

See Also