Applies a forward discrete cosine transform to an image.
IppStatus ippiDCTFwd_<mod> (const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, const IppiDCTFwdSpec_32f* pDCTSpec, Ipp8u* pBuffer);
Supported values for mod:
32f_C1R |
32f_C3R |
32f_C4R |
32f_AC4R |
pSrc |
Pointer to the source image ROI. |
srcStep |
Distance in bytes between starts of consecutive lines in the source image. |
pDst |
Pointer to the destination image ROI. |
dstStep |
Distance in bytes between starts of consecutive lines in the destination image. |
pDCTSpec |
Pointer to the previously initialized forward DCT context structure. |
pBuffer |
Pointer to the external work buffer, can be NULL. |
The function ippiDCTFwd is declared in the ippi.h file. It operates with ROI (see Regions of Interest in Intel IPP) of the size that is specified by the function ippiDCTFwdInitAlloc.
This function performs a forward DCT on each channel of the source image pSrc and writes the result into the corresponding channel of the destination image buffer pDst. Note that the function flavor with AC4 descriptor does not process alpha channel. This function uses the previously initialized pDCTSpec context structure to set the mode of calculations and retrieve support data.
The function may be used with the external work buffer pBuffer to avoid memory allocation within the functions. Once the work buffer is allocated, it can be used for all following calls to the functions computing DCT. As internal allocation of memory is too expensive operation and depends on operating system and/or runtime libraries used - the use of an external buffer improves performance significantly, especially for the small size transforms.
The size of the external buffer must be previously computed by the function ippiDCTFwdGetBufSize. If the external buffer is not specified (pBuffer is set to NULL), the function itself allocates the memory needed for operation.
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if pSrc, pDst, or pDCTSpec pointer is NULL. |
ippStsStepErr |
Indicates an error condition if srcStep or dstStep value is zero or negative. |
ippStsContextMatchErr |
Indicates an error condition if a pointer to an invalid pDCTSpec structure is passed. |
ippStsMemAllocErr |
Indicates an error condition if memory allocation fails. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.