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

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

FilterSeparable

Apply the filter to an image.

Syntax

IppStatus ippiFilterSeparable_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, Ipp<datatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C1R 16s_C1R 16u_C1R 32f_C1R
8u_C3R 16s_C3R 16u_C3R 32f_C3R
8u_C4R 16s_C4R 16u_C4R 32f_C4R
8u_C1R_T 16s_C1R_T 16u_C1R_T 32f_c1R_T
8u_C3R_T 16s_C3R_T 16u_C3R_T 32f_C3R_T
8u_C4R_T 16s_C4R_T 16u_C4R_T 32f_C4R_T

IppStatus ippiFilterSeparable_<mod>(const Ipp<srcdatatype>* pSrc, int srcStep, Ipp<dstdatatype>* pDst, int dstStep, IppiSize roiSize, IppiBorderType borderType, Ipp<srcdatatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u16s_C1R
8u16s_C3R
8u16s_C4R
8u16s_C1R_T
8u16s_C3R_T
8u16s_C4R_T

Platform-aware functions

IppStatus ippiFilterSeparable_<mod>(const Ipp<datatype>* pSrc, IppSizeL srcStep, Ipp<datatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, Ipp<datatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u_C1R_L 16s_C1R_L 16u_C1R_L 32f_C1R_L
8u_C3R_L 16s_C3R_L 16u_C3R_L 32f_C3R_L
8u_C4R_L 16s_C4R_L 16u_C4R_L 32f_C4R_L
8u_C1R_LT 16s_C1R_LT 16u_C1R_LT 32f_C1R_LT
8u_C3R_LT 16s_C3R_LT 16u_C3R_LT 32f_C3R_LT
8u_C4R_LT 16s_C4R_LT 16u_C4R_LT 32f_C4R_LT

IppStatus ippiFilterSeparable_<mod>(const Ipp<srcdatatype>* pSrc, IppSizeL srcStep, Ipp<dstdatatype>* pDst, IppSizeL dstStep, IppiSizeL roiSize, IppiBorderType borderType, Ipp<srcdatatype> borderValue, const IppiFilterSeparableSpec* pSpec, Ipp8u* pBuffer);

Supported values for mod:

8u16s_C1R_L
8u16s_C3R_L
8u16s_C4R_L
8u16s_C1R_LT
8u16s_C3R_LT
8u16s_C4R_LT

Include Files

ippcv.h

ippcv_l.h

Domain Dependencies

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

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

Parameters

pSrc

Pointer to the source image ROI.

srcStep

Distance in bytes between starts of consecuitve lines in the source image.

pDst

Pointer to the destination image ROI.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

roiSize

Size of the source and destination ROI in pixels.

borderType

Type of border. Possible values are:

ippBorderConst

Values of all border pixels are set to constant.

ippBorderRept

Replicated border is used.

ippBorderWrap

Wrapped border is used.

ippBorderMirror

Mirrored border is used.

ippBorderMirrorR

Mirrored border with replication is used.

borderValue

Constant value (constant vector in case of three- or four-channel data) to assign to the pixels in the ippBorderConst border type (not applicable for other border types).

pSpec

Pointer to the filter specification structure.

pBuffer

Pointer to the working buffer.

Description

This function operates with ROI.

Before using this function, compute the size of the external buffer pBuffer using the ippiFilterSeparableGetBufferSize function.

This function applies the horizontal row filter of the separable convolution kernel to the source image pSrc and the column filter of the separable convolution kernel to the intermediate result.

For integer data:

and for floating point data:

Here j = 0, ... roiSize.width - 1, i = 0,... roiSize.height - 1. The values of pixels of the source image that lies outside of the image ROI (that is, if for pixel pSrc[i,l] l ∉ [0, roiSize.width-1] are set in accordance with the specified parameters borderType and borderValue. xAnchor = (rowKernelSize - 1) / 2.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error condition.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition ifroiSize has a field with a zero or negative value.

ippStsStepErr

Indicates an error condition if the srcStep or dstStep value is less than roiSize.width* <pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if one of the step values is not divisible by 4 for floating-point images, or by 2 for short-integer images.

See Also