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

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

FilterBorderInit

Initializes the filter specification structure.

Syntax

IppStatus ippiFilterBorderInit_16s(const Ipp16s* pKernel, IppiSize kernelSize, int divisor, IppDataType dataType, int numChannels, IppRoundMode roundMode, IppiFilterBorderSpec* pSpec);

IppStatus ippiFilterBorderInit_32f(const Ipp32f* pKernel, IppiSize kernelSize, IppDataType dataType, int numChannels, IppRoundMode roundMode, IppiFilterBorderSpec* pSpec);

IppStatus ippiFilterBorderInit_64f(const Ipp64f* pKernel, IppiSize kernelSize, IppDataType dataType, int numChannels, IppRoundMode roundMode, IppiFilterBorderSpec* pSpec);

Include Files

ippi.h

Domain Dependencies

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

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

Parameters

pKernel

Pointer to the kernel values.

kernelSize

Size of the rectangular kernel in pixels.

divisor

Integer value by which the computed result is divided.

dataType

Data type of the source image. Possible values are ipp8u, ipp16u, ipp16s, ipp32f, or ipp64f.

numChannels

Number of channels in the image. Possible values are 1, 3, or 4.

roundMode

Rounding mode, possible values:

ippRndZero

Floating-point values are truncated to zero. This mode is not supported for ippiFilterBorderInit_64f.

ippRndNear

Floating-point values are rounded to the nearest even integer when the fractional part equals to 0.5; otherwise they are rounded to the nearest integer.

ippRndFinancial

Floating-point values are rounded down to the nearest integer when the fractional part is less than 0.5, or rounded up to the nearest integer if the fractional part is equal or greater than 0.5. This mode is not supported for ippiFilterBorderInit_64f.

ippRndHintAccurate

The result of calculations is accurate. This mode is supported only when:
  • dataType is equal to 8u and numChannels is equal to 1, 3, or 4

  • dataType is equal to 16s and numChannels is equal to 1

pSpec

Pointer to the filter specification structure.

Description

This function initializes the filter specification structure pSpec in the external buffer. Before using this function, you need to compute the size of the specification structure using the FilterBorderGetSize function. This structure is used by the FilterBorder function that performs filtering operations on the source image pixels.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

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

ippStsDataTypeErr

Indicates an error when dataType has an illegal value.

ippStsRoundModeNotSupportedErr

Indicates an error when the specified rounding mode is not supported.

ippStsAccurateModeNotSupported

Indicates a warning when the ippRndHintAccurate mode is not supported.

See Also