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

ID 790148
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

WTFwd

Computes the forward wavelet transform.

Syntax

IppStatus ippsWTFwd_32f(const Ipp32f* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int dstLen, IppsWTFwdState_32f* pState);

IppStatus ippsWTFwd_8u32f(const Ipp8u* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int dstLen, IppsWTFwdState_8u32f* pState);

IppStatus ippsWTFwd_16s32f(const Ipp16s* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int dstLen, IppsWTFwdState_16s32f* pState);

IppStatus ippsWTFwd_16u32f(const Ipp16u* pSrc, Ipp32f* pDstLow, Ipp32f* pDstHigh, int dstLen, IppsWTFwdState_16u32f* pState);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the vector which holds the input signal for decomposition.

pDstLow

Pointer to the vector which holds output coarse “low frequency” components.

pDstHigh

Pointer to the vector which holds output detail “high frequency” components.

dstLen

Number of elements in the vectors pDstHigh and pDstLow.

pState

Pointer to the state structure.

Description

This function computes the forward wavelet transform. The function transforms the (2*dstLen)-length source data block pSrc into “low frequency” components pDstLow and “high frequency” components pDstHigh. The transform parameters are specified in the state structure pState.

Before using this function, you need to compute the size of the state structure and work buffer using the WTFwdGetSize_ WTInvGetSize function, and initialize the structure using WTFwdInit WTInvInit.

For an example on how to use this function, refer to Wavelet Transforms Example.

Application Notes

These functions perform the one-level forward discrete multi-scale transform. An equivalent transform diagram is shown in the Figure below. The input signal is divided into the “low frequency” and “high frequency” components. The transfer characteristics of filters are defined by the coefficients set at the initialization stage. The functions are designed for the block processing of data; the transform state structure pState contains all needed filter delay lines. Besides these main delay lines each function has an additional delay line for each filter. Adjustable extra delay lines help synchronize group delay times of both highpass and lowpass filters. Moreover, in multilevel systems of signal decomposition delays between different decomposition levels may also be synchronized.

Input and output data block lengths. The functions are designed to decompose signal blocks of even length, therefore, these functions have one parameter only, that is the length of input components. The length of the input block must be double the size of each component.

Filter group delays synchronization. Some applications may require synchronization of highpass and lowpass filter time responses. A typical example of this synchronization is synchronizing symmetrical filters of different length.

Below follows an example of bi orthogonal set of spline filters of respective length of 6 and 2:

static const float decLow[6] = {     -6.25000000e-002f,      6.25000000e-002f,      5.00000000e-001f,      5.00000000e-001f,      6.25000000e-002f,      -6.25000000e-002f }; 

static const float decHigh[2] = {     -5.00000000e-001f,      5.00000000e-001f }; 
In this case the lowpass filter gives a delay two samples longer than the highpass filter, which is exactly what the difference between additional initialization function delays should be. The following values must be selected to ensure minimum common signal delay, offsLow=-1, offsHigh=-1 + 2 = 1. In this case the group times of filter delays are balanced by additional delays. The total delay time is equal to the lowpass filter group delay which has the value of two samples in the decomposition stage in the original signal time frame.

NOTE:

Biorthogonal and orthogonal filter banks are distinguished by one specific peculiarity, that is, forward transform additional delays must be uniformly even for faultless signal reconstruction.

Multilevel decomposition algorithm. The implementation of multilevel decomposition algorithms may require synchronization of signal delays across components of different levels.

This is illustrated in the example of the three-level decomposition shown in Figure "Three-Level Discrete Wavelet Decomposition". Assume that for transformation the biorthogonal set of spline filters with respective filter length of 6 and 2 is used. Since group delay definitely needs to be synchronized, for the last level select additional filter delays offsLow3 = -1, offsHigh3 = 1. Total delay at the last stage of decomposition for this set of filters is two samples. This value corresponds to the time scale of the input of the last stage of decomposition. In order to ensure an equivalent delay of the “detail” part on the second level, the delay must be increased by 2*2 samples. Respective values of additional delays for the second level is equal to offsLow2 = -1, offsHigh2 = offsHigh3 + 4 = 5. A greater value of the “high frequency” component delay needs to be selected for the first level of decomposition, offsLow1 = -1, offsHigh1 = offsHigh2 + 2*4 = 13.

Total delay for three levels of decomposition is equal to 12 samples.

One Level Forward Transform

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsContextMatchErr

Indicates an error when the state identifier pState is incorrect.

ippStsSizeErr

Indicates an error when dstLen or srcLen is less than or equal to 0.

See Also