WTFwdInitAlloc, WTInvInitAlloc

Initializes the wavelet transform structure.

Syntax

Case 1: Forward transform

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

IppStatus ippsWTFwdInitAlloc_8s32f(IppsWTFwdState_8s32f** ppState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

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

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

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

Case 2: Inverse transform

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

IppStatus ippsWTInvInitAlloc_32f8s(IppsWTInvState_32f8s** ppState, const Ipp32f* pTapsLow, int lenLow, int offsLow, const Ipp32f* pTapsHigh, int lenHigh, int offsHigh);

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

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

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

Parameters

pState

Pointer to the pointer to the allocated and initialized state structure.

pTapsLow

Pointer to the vector of lowpass filter taps.

lenLow

Number of taps in the lowpass filter.

offsLow

Additional delay (offset) of the lowpass filter.

pTapsHigh

Pointer to the vector of highpass filter taps.

lenHigh

Number of taps in the highpass filter.

offsHigh

Additional delay (offset) of the highpass filter.

Description

The functions ippsWTFwdInitAlloc and ippsWTInvInitAlloc are declared in the ipps.h file. These functions create and initialize the WT state structure ppState with the following parameters: the lowpass and highpass filter taps pTapsLow and pTapsHigh, lengths lenLow and lenHigh, input additional delays offsLow and offsHigh, respectively.

ippsWTFwdInitAlloc. This function initializes the forward WT state structure.

ippsWTInvInitAlloc. This function initializes the inverse WT state structure.

Application Notes

These functions allocate memory for the wavelet state structure, initialize it, and returns theppState pointer to the state structure. 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. Besides lengths and sets of taps the functions allow to specify an additional delay offsLow and offsHigh for each filter. The adjustable values of delays allow to synchronize:

For more information about using these parameters, see descriptions of the functions ippsWTFwd and ippsWTInv. The minimum allowed value of the additional delay for the forward transform is -1. For the inverse transform the delay values must be greater or equal to 0. See descriptions of the functions ippsWTFwd and ippsWTInv 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 stage of initialization. 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.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the ppState, pTapsHigh, or pTapsLow pointer 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 for the forward transform; and is less than 0 for the inverse transform.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.