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

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

FilterBilateralGetBufferSize

Computes the size of the bilateral context structure and the size of the work buffer for bilateral filtering with user-defined borders.

Syntax

IppStatus ippiFilterBilateralGetBufferSize(IppiFilterBilateralType filter, IppiSize dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethodType, int* pSpecSize, int* pBufferSize);

Platform-aware function

IppStatus ippiFilterBilateralGetBufferSize_L(IppiFilterBilateralType filter, IppiSizeL dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethodType, IppSizeL* pSpecSize, IppSizeL* pBufferSize);

Threading Layer (TL) function based on the Platform Aware API

IppStatus ippiFilterBilateralGetBufferSize_LT(IppiFilterBilateralType filter, IppiSizeL dstRoiSize, IppSizeL kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethodType, IppSizeL* pSpecSize, IppSizeL* pBufferSize);

Threading Layer (TL) function based on the Classic API

IppStatus ippiFilterBilateralGetBufferSize_T(IppiFilterBilateralType filter, IppiSize dstRoiSize, int kernelWidthHeight, IppDataType dataType, int numChannels, IppiDistanceMethodType distMethodType, int* pSpecSize, int* pBufferSize);

Include Files

ippi.h

ippi_l.h

ippi_tl.h

Domain Dependencies

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

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

Parameters

filter

Type of the bilateral filter. Possible value is ippiFilterBilateralGauss - Gaussian bilateral filter.

dstRoiSize

Size of the destination ROI in pixels.

kernelWidthHeight

Linear dimension of the square kernel. The value 1 corresponds to the distance between two adjacent pixels.

dataType

Data type of the source and destination images. Possible values are ipp8u, ipp32f, and ipp64f.

numChannels

Number of channels in the images.

distMethodType

Method of defining the differences in intensity between pixels. Depending on the number of channels in the image, possible value are:

numChannels value

Possible distMethodType values

1

ippDistNormL1

3

ippDistNormL1, ippDistNormL2
.

pSpecSize

Pointer to the computed size of the specification structure.

pBufferSize

Pointer to the computed size of the external buffer.

Description

This function computes the size of the bilateral context structure and external work buffer for the FilterBilateral function. The results are stored in pSpecSize and pBufferSize.

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.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error when pSpecSize or pBufferSize is NULL.

ippStsSizeErr

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

ippStsMaskSizeErr

Indicates an error when kernelWidthHeight is less than, or equal to zero.

ippStsNotSupportedModeErr

Indicates an error when the filter or distMethodType value is not supported.

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsNumChannelsErr

Indicates an error when numChannels has an illegal value.

See Also