Performs a forward DCT on a 2D buffer of 8x8 size.
Case 1: Not-in-place operation
IppStatus ippiDCT8x8Fwd_<mod>(const Ipp<datatype>* pSrc, Ipp<datatype>* pDst);
Supported values for mod:
16s_C1 |
32f_C1 |
Case 2: Not-in-place operation with ROI
IppStatus ippiDCT8x8Fwd_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, Ipp<dstDatatype>* pDst);
Supported values for mod:
16s_C1R |
8u16s_C1R |
Case 3: In-place operation
IppStatus ippiDCT8x8Fwd_<mod>(Ipp<datatype>* pSrcDst);
Supported values for mod:
16s_C1I |
32f_C1I |
pSrc |
Pointer to the source image buffer. |
srcStep |
Distance in bytes between starts of consecutive lines in the source image buffer for operations with ROI. |
pDst |
Pointer to the destination image buffer. |
pSrcDst |
Pointer to the source and destination image for in-place operations. |
The function ippiDCT8x8Fwd is declared in the ippi.h file. Some flavors operate with ROI (see Regions of Interest in Intel IPP).
This function computes the forward discrete cosine transform of short integer or floating-point data in a 2D buffer of 8x8 size. No prerequisites are needed to use this transform function.
The code Example “Forward DCT of 8x8 Size” illustrates the use of ippiDCT8x8Fwd function.
IppStatus dct16s( void ) {
Ipp16s x[64] = {0};
IppiSize roi = {8,8};
int i;
for( i=0; i<8; ++i ) {
ippiSet_16s_C1R( (Ipp16s)i, x+8*i+i, 8*sizeof(Ipp16s), roi );
--roi.width;
--roi.height;
}
return ippiDCT8x8Fwd_16s_C1I( x );
}
The destination image x contains:
18 -9 -2 -1 -1 0 0 0
-9 7 0 0 0 0 0 0
-2 0 2 0 0 0 0 0
-1 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if pSrc, pDst, or pSrcDst pointer is NULL. |
ippStsStepErr |
Indicates an error condition if srcStep value is zero or negative. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.