Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 10/31/2024
Public
Document Table of Contents

DCTInv

Computes the inverse discrete cosine transform of a signal.

Syntax

Case 1: Not-in-place operation

IppStatus ippsDCTInv_32f(const Ipp32f* pSrc, Ipp32f* pDst, const IppsDCTInvSpec_32f* pDCTSpec, Ipp8u* pBuffer);

IppStatus ippsDCTInv_64f(const Ipp64f* pSrc, Ipp64f* pDst, const IppsDCTInvSpec_64f* pDCTSpec, Ipp8u* pBuffer);

Case 2: In-place operation

IppStatus ippsDCTInv_32f_I(Ipp32f* pSrcDst, const IppsDCTInvSpec_32f* pDCTSpec, Ipp8u* pBuffer);

IppStatus ippsDCTInv_64f_I(Ipp64f* pSrcDst, const IppsDCTInvSpec_64f* pDCTSpec, Ipp8u* pBuffer);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pDCTSpec

Pointer to the inverse DCT specification structure.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDst

Pointer to the source and destination vector for in-place operations.

pBuffer

Pointer to the external work buffer.

Description

This function computes the inverse discrete cosine transform (DCT) of the source signal pSrc (pSrcDst for in-place operations) in accordance with the specification structure pDCTSpec that must be initialized by calling ippsDCTInvInit beforehand. The result in stored in the pDst (pSrcDst for in-place operations).

If len is a power of 2, the functions use an efficient algorithm that is significantly faster than the direct computation of DCT. For other values of len, these functions use the direct formulas given below; however, the symmetry of the cosine function is taken into account, which allows to perform about half of the multiplication operations in the formulas.

In the following definition of DCT, N = len,



x(n) is pDst[n] and y(k) is pSrc[k].

The inverse DCT is defined by the formula:



Use this function with the external work buffer pBuffer. Once the work buffer is allocated, it can be used for all following calls to the functions computing DCT. The use of an external buffer improves performance significantly, especially for the small size transforms.

The size of this buffer must be computed previously using ippsDCTInvGetSize.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the pDCTSpec, pSrc, pDst, pSrcDst pointers is NULL.

ippStsContextMatchErr

Indicates an error when the specification identifier pDCTSpec is incorrect.

ippStsMemAllocErr

Indicates an error if memory allocation fails.