Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

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

Document Table of Contents

WTFwdInit, WTInvInit

Initialize the wavelet transform state structures.

Syntax

Case 1: Forward transform

IppStatus ippsWTFwdInit_32f(IppsWTFwdState_32f* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

IppStatus ippsWTFwdInit_8u32f(IppsWTFwdState_8u32f* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

IppStatus ippsWTFwdInit_16s32f(IppsWTFwdState_16s32f* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

IppStatus ippsWTFwdInit_16u32f(IppsWTFwdState_16u32f* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

Case 2: Inverse transform

IppStatus ippsWTInvInit_32f(IppsWTInvState_32f* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

IppStatus ippsWTInvInit_32f8u(IppsWTInvState_32f8u* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

IppStatus ippsWTInvInit_32f16s(IppsWTInvState_32f16s* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

IppStatus ippsWTInvInit_32f16u(IppsWTInvState_32f16u* pState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pState

Pointer to the initialized forward or inverse wavelet transform state structure.

pTapsLow

Pointer to the vector of low-pass filter taps.

lenLow

Number of taps in the low-pass filter.

offsLow

Input delay (offset) of the low-pass filter.

pTapsHigh

Pointer to the vector of high-pass filter taps.

lenHigh

Number of taps in the high-pass filter.

offsHigh

Input delay (offset) of the high-pass filter.

Description

The ippsWTFwdInit and ippsWTInvInit functions initialize the forward and inverse wavelet transform state structures, respectively, with the following parameters: the low-pass and high-pass filter taps pTapsLow and pTapsHigh, lengths lenLow and lenHigh, input additional delays offsLow and offsHigh.

Application Notes

These functions initialize the wavelet state structure and return thepState pointer to it. The initialization procedures are implemented separately for forward and inverse transforms. To perform both forward and inverse wavelet transforms, create two separate state structures. In general, the meanings of initialization parameters of forward and inverse transforms are similar. Each function has parameters describing of a pair of filters. The forward transform uses the taps pTapsHigh and pTapsLow, and the lengths lenHigh and lenLow of a pair of analysis filters. The inverse transform uses the taps pTapsHigh and pTapsLow, and the lengths lenHigh and lenLow of a pair of synthesis filters. You can also specify an additional delay offsLow and offsHigh for each filter. With the adjustable values of delays you can synchronize:

  • Group of delays for high-pass and low-pass filters
  • Delays between data of different levels in multilevel decomposition and reconstruction algorithms

For more information about using these parameters, see descriptions of the ippsWTFwd and ippsWTInv functions. The minimum allowed value of the additional delay for the forward transform is -1. For the inverse transform the delay values must be greater than, or equal to 0. See descriptions of the ippsWTFwd and ippsWTInv functions for an example showing how to choose additional delay values. The initialization functions copy filter taps into the state structure pState. So all the memory referred to with the pointers can be freed or modified after the functions finished operating. In case of the memory shortage, the function sets a zero pointer to the structure.

Boundaries extrapolation. Typically, reversible wavelet transforms of a bounded signal require data extrapolation towards one or both sides. All internal delay lines are set to zero at the initialization stage. To set a non-zero signal prehistory, call the function ippsWTFwdSetDlyLine. When processed an entire limited data set, data extrapolation may be performed both towards the start and the end of the data vector. For that, the source data and their initial extrapolation are used to form the delay line, the rest of the signal is subdivided into the main block and the signal end. The signal end data and their extrapolation are used to form the last block.

For an example on how to use these functions, refer to Wavelet Transforms Example.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

Indicates an error when lenLow or lenHigh is less than, or equal to 0.

ippStsWtOffsetErr

Indicates an error when the filter delay offsLow or offsHigh is less than -1.

See Also