Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

DCTFwd

Computes the forward discrete cosine transform of a signal.

Syntax

Case 1: Not-in-place operation
IppStatus ippsDCTFwd_32f(const Ipp32f*
pSrc
, Ipp32f*
pDst
, const IppsDCTFwdSpec_32f*
pDCTSpec
, Ipp8u*
pBuffer
);
IppStatus ippsDCTFwd_64f(const Ipp64f*
pSrc
, Ipp64f*
pDst
, const IppsDCTFwdSpec_64f*
pDCTSpec
, Ipp8u*
pBuffer
);
Case 2: In-place operation
IppStatus ippsDCTFwd_32f_I(Ipp32f*
pSrcDst
, const IppsDCTFwdSpec_32f*
pDCTSpec
, Ipp8u*
pBuffer
);
IppStatus ippsDCTFwd_64f_I(Ipp64f*
pSrcDst
, const IppsDCTFwdSpec_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 forward 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 forward 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
ippsDCTFwdInit
beforehand. The result in stored in the
pDst
(
pSrcDst
for in-place operations).
If
len
is a power of 2, the function 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
pSrc
[n]
and
y
(k)
is
pDst
[k]
.
The forward DCT is defined by the formula:
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 this buffer must be computed previously using
ippsDCTFwdGetSize
.
If the external buffer is not specified (
pBuffer
is set to
NULL
), then the function itself allocates the memory needed for operation.
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 if the specification identifier
pDCTSpec
is incorrect.
ippStsMemAllocErr
Indicates an error if memory allocation fails.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804