Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference
Wavelet Transforms Example
The wavelet transform functions for images support regions of interest (ROI, see Regions of Interest in Intel IPP), but they do not perform internally any border extension of the image ROI data. It means that the source images must already contain all border data that are necessary for the convolution operations. (See the descriptions of the functions WTFwd and WTInv for detailed information on how to calculate extended image border sizes.) Therefore the processing of an entire image requires the extension of the image with borders that are suitable for the type of the filter bank that is used in the transforms.
The following code examples demonstrate how to implement this approach using the Intel IPP functions. They perform forward and inverse wavelet transforms of the same image of 8x8 pixels with Daubechies filter banks (that allow the perfect reconstruction) and periodical data extension by wrapping. Each example is a complete program that checks the status returned by every Intel IPP function and prints the result on the console.
One decomposition level produces four subbands of 4x4 pixels each: approximation, horizontal detail, vertical detail, and diagonal detail image. The periodical extension is materialized as a border around the source image and around each of these four subbands with the function ippiCopyWrapBorder_32s_C1R. The sizes of the borders are derived from the length of the filters and from the anchor position, so they are the only difference between the examples:
Example |
Filter bank |
Border of the forward transform |
Border of the inverse transform |
|---|---|---|---|
c_wtfwd_2d_db2.c |
Daubechies 2 (four taps) |
3 columns and rows on the right and at the bottom |
1 column and row on the left and at the top |
c_wtfwd_2d_db3.c |
Daubechies 3 (six taps) |
5 columns and rows on the right and at the bottom |
2 columns and rows on the left and at the top |
Two-Dimensional Transform, Daubechies 2 Filter Bank
This example decomposes the source image into the approximation, horizontal, vertical, and diagonal detail images, and then reconstructs the source image from these four subbands.
/*******************************************************************************
* Copyright 2026 Intel Corporation.
*
*
* This software and the related documents are Intel copyrighted materials, and your use of them is governed by
* the express license under which they were provided to you ('License'). Unless the License provides otherwise,
* you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related
* documents without Intel's prior written permission.
* This software and the related documents are provided as is, with no express or implied warranties, other than
* those that are expressly stated in the License.
*******************************************************************************/
// A simple example of forward/inverse wavelet Daubechies 2 (db2) transform of an
// image, implemented with Intel(R) Integrated Performance Primitives
// (Intel(R) IPP) functions:
// ippiWTFwdGetSize_32f
// ippiWTFwdInit_32f_C1R
// ippiWTFwd_32f_C1R
// ippiWTInvGetSize_32f
// ippiWTInvInit_32f_C1R
// ippiWTInv_32f_C1R
// ippiCopyWrapBorder_32s_C1R
//
// How this example differs from the other wavelet examples:
// - it uses the two-dimensional image processing API (ippi), so a single
// decomposition level of the 8x8 source image produces four subbands:
// approximation, horizontal, vertical and diagonal details, each 4x4;
// - the filter bank is Daubechies 2 (db2), that is four taps per filter;
// - the image functions have no delay line: the periodic (wrapping) extension is
// materialized as a border around every image with ippiCopyWrapBorder_32s_C1R,
// which is why the source image and the four subbands are copied into padded
// buffers before the transform. The border sizes are derived from the filter
// length and the anchor position.
// See c_wtfwd_db2.c for the one-dimensional counterpart, which handles the same
// extension through the delay line of the state, and c_wtfwd_2d_db3.c for the
// same two-dimensional transform with the db3 filter bank.
#include <stdio.h>
#include "ipp.h"
#define FILTER_LENGTH 4
#define ANCHOR (FILTER_LENGTH - 1)
#define EXIT_MAIN \
exitLine: /* Label for Exit */
#define check_sts(st) \
if ((st) != ippStsNoErr) \
goto exitLine; /* Go to Exit if Intel(R) IPP function returned status different from ippStsNoErr */
#define FwdPadL 0 // Pad size on Left: taplen-1-anchor;
#define FwdPadR 3 // Pad size on Right: anchor size
#define FwdPadT 0 // Pad size on Top: TopBorder = LeftBorder
#define FwdPadB 3 // Pad size on Bottom: BottomBorder= rightBorder
#define InvPadL 1 // Pad size on Left: (taplen - 1 - anchor) / 2;
#define InvPadR 0 // Pad size on Right: (anchor + 1)/2
#define InvPadT 1 // Pad size on Top: TopBorder = LeftBorder
#define InvPadB 0 // Pad size on Bottom: BottomBorder= rightBorder
static const Ipp32f pTapsLowF[FILTER_LENGTH] = {/* Pointer to lowpass filter taps */
-1.294095225509215e-001f, 2.241438680418574e-001f, 8.365163037374690e-001f, 4.829629131446903e-001f};
static const Ipp32f pTapsHighF[FILTER_LENGTH] = {/* Pointer to highpass filter taps */
-4.829629131446903e-001f, 8.365163037374690e-001f, -2.241438680418574e-001f,
-1.294095225509215e-001f};
static const Ipp32f pTapsLowI[FILTER_LENGTH] = {/* Pointer to lowpass filter taps */
4.829629131446903e-001f, 8.365163037374690e-001f, 2.241438680418574e-001f, -1.294095225509215e-001f};
static const Ipp32f pTapsHighI[FILTER_LENGTH] = {/* Pointer to highpass filter taps */
-1.294095225509215e-001f, -2.241438680418574e-001f, 8.365163037374690e-001f,
-4.829629131446903e-001f};
static Ipp32f pSrc[8 * 8] = {/* the source image */
1.1f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 1.2f, 0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f, 11.1f, 11.2f, 11.3f, 11.4f, 11.5f, 11.6f, 11.7f, 11.8f,
11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f, 1.3f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 1.4f};
int main(void)
{
int i, j;
IppStatus status = ippStsNoErr;
int lenHighF = FILTER_LENGTH, lenHighI = FILTER_LENGTH, lenLowF = FILTER_LENGTH,
lenLowI = FILTER_LENGTH; /* Length of the lowpass/highpass filter */
int anchorHighF = ANCHOR, anchorHighI = 0, anchorLowF = ANCHOR, anchorLowI = 0; /* Anchor position of the lowpass/highpass filter */
IppiWTFwdSpec_32f_C1R *pSpecFwd = NULL; /* Pointer to pointer to allocated ippiWTFwd spec structure */
IppiWTInvSpec_32f_C1R *pSpecInv = NULL; /* Pointer to pointer to allocated ippiWTInv spec structure */
int pSpecSize;
Ipp32f pSrcB[(8 + FwdPadL + FwdPadR) * (8 + FwdPadT + FwdPadB)]; /* Pointer to source image ROI */
int srcStepB = (8 + FwdPadL + FwdPadR) * sizeof(Ipp32f);
IppiSize roiSizeB = {(8 + FwdPadL + FwdPadR), (8 + FwdPadT + FwdPadB)};
int srcStep = 8 * sizeof(Ipp32f);
IppiSize roiSize = {8, 8};
Ipp32f pDetailXDst[4 * 4]; /* Pointer to the destination "horizontal details" image ROI */
Ipp32f pDetailYDst[4 * 4]; /* Pointer to the destination "vertical details" image ROI */
Ipp32f pDetailXYDst[4 * 4]; /* Pointer to the destination "diagonal details" image ROI */
Ipp32f pApproxDst[4 * 4]; /* Pointer to destination "approximation" image ROI */
IppiSize dstRoiSize = {4, 4}; /* ROI size for all destination images */
int pBufSize;
Ipp8u *pBuffer = NULL;
Ipp32f pDstInv[8 * 8]; /* Pointer to the destination image ROI */
int stepDstInv = 8 * sizeof(Ipp32f);
int numChannels = 1;
Ipp32f pAppB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)]; /* Pointer to the source "approximation" image ROI */
Ipp32f pXB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)];
Ipp32f pYB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)];
Ipp32f pXYB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)];
int StepB = (4 + InvPadL + InvPadR) * sizeof(Ipp32f);
IppiSize roiInvSize = {4, 4};
IppiSize roiInvSizeB = {4 + InvPadL + InvPadR, 4 + InvPadT + InvPadB};
int approxStep, detailXStep, detailYStep, detailXYStep;
approxStep = detailXStep = detailYStep = detailXYStep = 4 * sizeof(Ipp32f);
/* adds border to the source image */
check_sts(status = ippiCopyWrapBorder_32s_C1R((Ipp32s *)pSrc, srcStep, roiSize, (Ipp32s *)pSrcB, srcStepB, roiSizeB, FwdPadT, FwdPadL));
/* performs forward wavelet transform */
check_sts(status = ippiWTFwdGetSize_32f(numChannels, lenLowF, anchorLowF, lenHighF, anchorHighF, &pSpecSize, &pBufSize));
pBuffer = ippsMalloc_8u(pBufSize);
pSpecFwd = (IppiWTFwdSpec_32f_C1R *)ippsMalloc_8u(pSpecSize);
if (NULL == pBuffer || NULL == pSpecFwd) {
status = ippStsNoMemErr;
goto exitLine;
}
check_sts(status = ippiWTFwdInit_32f_C1R(pSpecFwd, pTapsLowF, lenLowF, anchorLowF, pTapsHighF, lenHighF, anchorHighF));
check_sts(status = ippiWTFwd_32f_C1R(pSrcB + FwdPadT * roiSizeB.width + FwdPadL, srcStepB, pApproxDst, approxStep, pDetailXDst, detailXStep,
pDetailYDst, detailYStep, pDetailXYDst, detailXYStep, dstRoiSize, pSpecFwd, pBuffer));
ippsFree(pBuffer);
pBuffer = NULL;
check_sts(status = ippiWTInvGetSize_32f(numChannels, lenLowI, anchorLowI, lenHighI, anchorHighI, &pSpecSize, &pBufSize));
pBuffer = ippsMalloc_8u(pBufSize);
pSpecInv = (IppiWTInvSpec_32f_C1R *)ippsMalloc_8u(pSpecSize);
if (NULL == pBuffer || NULL == pSpecInv) {
status = ippStsNoMemErr;
goto exitLine;
}
check_sts(status = ippiWTInvInit_32f_C1R(pSpecInv, pTapsLowI, lenLowI, anchorLowI, pTapsHighI, lenHighI, anchorHighI));
/* adds border to four images obtained after ippiWTFwd */
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pApproxDst, approxStep, dstRoiSize, (Ipp32s *)pAppB, StepB, roiInvSizeB, InvPadT, InvPadL));
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pDetailXDst, detailXStep, dstRoiSize, (Ipp32s *)pXB, StepB, roiInvSizeB, InvPadT, InvPadL));
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pDetailYDst, detailYStep, dstRoiSize, (Ipp32s *)pYB, StepB, roiInvSizeB, InvPadT, InvPadL));
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pDetailXYDst, detailXYStep, dstRoiSize, (Ipp32s *)pXYB, StepB, roiInvSizeB, InvPadT, InvPadL));
/* performs inverse wavelet transform */
check_sts(status = ippiWTInv_32f_C1R(pAppB + InvPadT * roiInvSizeB.width + InvPadL, StepB, pXB + InvPadT * roiInvSizeB.width + InvPadL, StepB,
pYB + InvPadT * roiInvSizeB.width + InvPadL, StepB, pXYB + InvPadT * roiInvSizeB.width + InvPadL, StepB,
roiInvSize, pDstInv, stepDstInv, pSpecInv, pBuffer));
for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++)
printf("%8.3f ", pDstInv[i * 8 + j]);
printf("\n");
}
EXIT_MAIN
ippsFree(pSpecFwd);
ippsFree(pBuffer);
ippsFree(pSpecInv);
printf("Exit status %d (%s)\n", (int)status, ippGetStatusString(status));
return (int)status;
}
After compiling and running it prints the reconstructed image, which repeats the source one:
1.100 -0.000 0.000 11.100 11.100 0.000 0.000 1.200
0.000 0.000 0.000 11.100 11.100 0.000 0.000 -0.000
-0.000 0.000 0.000 11.100 11.100 -0.000 -0.000 0.000
11.100 11.200 11.300 11.400 11.500 11.600 11.700 11.800
11.100 11.100 11.100 11.100 11.100 11.100 11.100 11.100
-0.000 -0.000 -0.000 11.100 11.100 0.000 0.000 -0.000
0.000 -0.000 0.000 11.100 11.100 0.000 -0.000 0.000
1.300 -0.000 0.000 11.100 11.100 -0.000 0.000 1.400
Exit status 0 (ippStsNoErr: No errors)
Two-Dimensional Transform, Daubechies 3 Filter Bank
This example performs the same transform of the same image with the Daubechies filter bank of the order 3. The longer filters require wider wrapping borders, which is the only difference from the previous example.
/*******************************************************************************
* Copyright 2026 Intel Corporation.
*
*
* This software and the related documents are Intel copyrighted materials, and your use of them is governed by
* the express license under which they were provided to you ('License'). Unless the License provides otherwise,
* you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related
* documents without Intel's prior written permission.
* This software and the related documents are provided as is, with no express or implied warranties, other than
* those that are expressly stated in the License.
*******************************************************************************/
// A simple example of forward/inverse wavelet Daubechies 3 (db3) transform of an
// image, implemented with Intel(R) Integrated Performance Primitives
// (Intel(R) IPP) functions:
// ippiWTFwdGetSize_32f
// ippiWTFwdInit_32f_C1R
// ippiWTFwd_32f_C1R
// ippiWTInvGetSize_32f
// ippiWTInvInit_32f_C1R
// ippiWTInv_32f_C1R
// ippiCopyWrapBorder_32s_C1R
//
// How this example differs from the other wavelet examples:
// - it uses the two-dimensional image processing API (ippi), so a single
// decomposition level of the 8x8 source image produces four subbands:
// approximation, horizontal, vertical and diagonal details, each 4x4;
// - the filter bank is Daubechies 3 (db3), that is six taps per filter. Compared
// to c_wtfwd_2d_db2.c, the only difference is the longer filter bank and the
// wider wrapping borders it requires: five columns and rows for the forward
// transform and two for the inverse one;
// - the image functions have no delay line: the periodic (wrapping) extension is
// materialized as a border around every image with ippiCopyWrapBorder_32s_C1R.
// See c_wtfwd_db3.c for the one-dimensional db3 counterpart, which handles the
// same extension through the delay line of the state.
#include <stdio.h>
#include "ipp.h"
#define FILTER_LENGTH 6
#define ANCHOR (FILTER_LENGTH - 1)
#define EXIT_MAIN \
exitLine: /* Label for Exit */
#define check_sts(st) \
if ((st) != ippStsNoErr) \
goto exitLine; /* Go to Exit if Intel(R) IPP function returned status different from ippStsNoErr */
#define FwdPadL 0 // Pad size on Left: taplen-1-anchorLow;
#define FwdPadR 5 // Pad size on Right: anchor size
#define FwdPadT 0 // Pad size on Top: TopBorder = LeftBorder
#define FwdPadB 5 // Pad size on Bottom: BottomBorder= rightBorder
#define InvPadL 2 // Pad size on Left: (lenLow - 1 - anchor) / 2;
#define InvPadR 0 // Pad size on Right: (anchor + 1)/2
#define InvPadT 2 // Pad size on Top: TopBorder = LeftBorder
#define InvPadB 0 // Pad size on Bottom: BottomBorder= rightBorder
static const Ipp32f pTapsLowF[FILTER_LENGTH] = {/* Pointer to lowpass filter taps */
0.035226291882100656f, -0.08544127388224149f, -0.13501102001039084f,
0.4598775021193313f, 0.8068915093133388f, 0.3326705529509569f};
static const Ipp32f pTapsHighF[FILTER_LENGTH] = {/* Pointer to highpass filter taps */
-0.3326705529509569f, 0.8068915093133388f, -0.4598775021193313f,
-0.13501102001039084f, 0.08544127388224149f, 0.035226291882100656f};
static const Ipp32f pTapsLowI[FILTER_LENGTH] = {
/* Pointer to lowpass filter taps */
0.3326705529509569f, 0.8068915093133388f, 0.4598775021193313f, -0.13501102001039084f, -0.08544127388224149f, 0.035226291882100656f,
};
static const Ipp32f pTapsHighI[FILTER_LENGTH] = {/* Pointer to highpass filter taps */
0.035226291882100656f, 0.08544127388224149f, -0.13501102001039084f,
-0.4598775021193313f, 0.8068915093133388f, -0.3326705529509569f};
static Ipp32f pSrc[8 * 8] = {/* the source image */
1.1f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 1.2f, 0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f, 11.1f, 11.2f, 11.3f, 11.4f, 11.5f, 11.6f, 11.7f, 11.8f,
11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 0.0f, 1.3f, 0.0f, 0.0f, 11.1f, 11.1f, 0.0f, 0.0f, 1.4f};
int main(void)
{
int i, j;
IppStatus status = ippStsNoErr;
int lenHighF = FILTER_LENGTH, lenHighI = FILTER_LENGTH, lenLowF = FILTER_LENGTH,
lenLowI = FILTER_LENGTH; /* Length of the lowpass/highpass filter */
int anchorHighF = ANCHOR, anchorHighI = 0, anchorLowF = ANCHOR, anchorLowI = 0; /* Anchor position of the lowpass/highpass filter */
IppiWTFwdSpec_32f_C1R *pSpecFwd = NULL; /* Pointer to pointer to allocated ippiWTFwd spec structure */
IppiWTInvSpec_32f_C1R *pSpecInv = NULL; /* Pointer to pointer to allocated ippiWTInv spec structure */
int pSpecSize;
Ipp32f pSrcB[(8 + FwdPadL + FwdPadR) * (8 + FwdPadT + FwdPadB)]; /* Pointer to source image ROI */
int srcStepB = (8 + FwdPadL + FwdPadR) * sizeof(Ipp32f);
IppiSize roiSizeB = {(8 + FwdPadL + FwdPadR), (8 + FwdPadT + FwdPadB)};
int srcStep = 8 * sizeof(Ipp32f);
IppiSize roiSize = {8, 8};
Ipp32f pDetailXDst[4 * 4]; /* Pointer to the destination "horizontal details" image ROI */
Ipp32f pDetailYDst[4 * 4]; /* Pointer to the destination "vertical details" image ROI */
Ipp32f pDetailXYDst[4 * 4]; /* Pointer to the destination "diagonal details" image ROI */
Ipp32f pApproxDst[4 * 4]; /* Pointer to destination "approximation" image ROI */
IppiSize dstRoiSize = {4, 4}; /* ROI size for all destination images */
int pBufSize;
Ipp8u *pBuffer = NULL;
Ipp32f pDstInv[8 * 8]; /* Pointer to the destination image ROI */
int stepDstInv = 8 * sizeof(Ipp32f);
int numChannels = 1;
Ipp32f pAppB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)]; /* Pointer to the source "approximation" image ROI */
Ipp32f pXB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)];
Ipp32f pYB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)];
Ipp32f pXYB[(4 + InvPadL + InvPadR) * (4 + InvPadT + InvPadB)];
int StepB = (4 + InvPadL + InvPadR) * sizeof(Ipp32f);
IppiSize roiInvSize = {4, 4};
IppiSize roiInvSizeB = {4 + InvPadL + InvPadR, 4 + InvPadT + InvPadB};
int approxStep, detailXStep, detailYStep, detailXYStep;
approxStep = detailXStep = detailYStep = detailXYStep = 4 * sizeof(Ipp32f);
/* adds border to the source image */
check_sts(status = ippiCopyWrapBorder_32s_C1R((Ipp32s *)pSrc, srcStep, roiSize, (Ipp32s *)pSrcB, srcStepB, roiSizeB, FwdPadT, FwdPadL));
/* performs forward wavelet transform */
check_sts(status = ippiWTFwdGetSize_32f(numChannels, lenLowF, anchorLowF, lenHighF, anchorHighF, &pSpecSize, &pBufSize));
pBuffer = ippsMalloc_8u(pBufSize);
pSpecFwd = (IppiWTFwdSpec_32f_C1R *)ippsMalloc_8u(pSpecSize);
if (NULL == pBuffer || NULL == pSpecFwd) {
status = ippStsNoMemErr;
goto exitLine;
}
check_sts(status = ippiWTFwdInit_32f_C1R(pSpecFwd, pTapsLowF, lenLowF, anchorLowF, pTapsHighF, lenHighF, anchorHighF));
check_sts(status = ippiWTFwd_32f_C1R(pSrcB + FwdPadT * roiSizeB.width + FwdPadL, srcStepB, pApproxDst, approxStep, pDetailXDst, detailXStep,
pDetailYDst, detailYStep, pDetailXYDst, detailXYStep, dstRoiSize, pSpecFwd, pBuffer));
ippsFree(pBuffer);
pBuffer = NULL;
check_sts(status = ippiWTInvGetSize_32f(numChannels, lenLowI, anchorLowI, lenHighI, anchorHighI, &pSpecSize, &pBufSize));
pBuffer = ippsMalloc_8u(pBufSize);
pSpecInv = (IppiWTInvSpec_32f_C1R *)ippsMalloc_8u(pSpecSize);
if (NULL == pBuffer || NULL == pSpecInv) {
status = ippStsNoMemErr;
goto exitLine;
}
check_sts(status = ippiWTInvInit_32f_C1R(pSpecInv, pTapsLowI, lenLowI, anchorLowI, pTapsHighI, lenHighI, anchorHighI));
/* adds border to four images obtained after ippiWTFwd */
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pApproxDst, approxStep, dstRoiSize, (Ipp32s *)pAppB, StepB, roiInvSizeB, InvPadT, InvPadL));
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pDetailXDst, detailXStep, dstRoiSize, (Ipp32s *)pXB, StepB, roiInvSizeB, InvPadT, InvPadL));
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pDetailYDst, detailYStep, dstRoiSize, (Ipp32s *)pYB, StepB, roiInvSizeB, InvPadT, InvPadL));
check_sts(status =
ippiCopyWrapBorder_32s_C1R((Ipp32s *)pDetailXYDst, detailXYStep, dstRoiSize, (Ipp32s *)pXYB, StepB, roiInvSizeB, InvPadT, InvPadL));
/* performs inverse wavelet transform */
check_sts(status = ippiWTInv_32f_C1R(pAppB + InvPadT * roiInvSizeB.width + InvPadL, StepB, pXB + InvPadT * roiInvSizeB.width + InvPadL, StepB,
pYB + InvPadT * roiInvSizeB.width + InvPadL, StepB, pXYB + InvPadT * roiInvSizeB.width + InvPadL, StepB,
roiInvSize, pDstInv, stepDstInv, pSpecInv, pBuffer));
for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++)
printf("%8.3f ", pDstInv[i * 8 + j]);
printf("\n");
}
EXIT_MAIN
ippsFree(pSpecFwd);
ippsFree(pBuffer);
ippsFree(pSpecInv);
printf("Exit status %d (%s)\n", (int)status, ippGetStatusString(status));
return (int)status;
}
After compiling and running it prints the reconstructed image, which repeats the source one:
1.100 0.000 -0.000 11.100 11.100 -0.000 0.000 1.200
0.000 0.000 0.000 11.100 11.100 -0.000 -0.000 -0.000
0.000 -0.000 0.000 11.100 11.100 -0.000 0.000 -0.000
11.100 11.200 11.300 11.400 11.500 11.600 11.700 11.800
11.100 11.100 11.100 11.100 11.100 11.100 11.100 11.100
-0.000 -0.000 -0.000 11.100 11.100 -0.000 -0.000 -0.000
-0.000 0.000 0.000 11.100 11.100 -0.000 -0.000 -0.000
1.300 0.000 0.000 11.100 11.100 0.000 0.000 1.400
Exit status 0 (ippStsNoErr: No errors)
Every program prints on console the perfect reconstruction of the source image obtained after the inverse transform, and the status of the last Intel IPP function that it called.
For the one-dimensional counterparts of these examples, which process a signal and provide the periodical extension through the delay line of the transform state, see Wavelet Transforms Example.