You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > IDCT Method > Vector.IDCT Method (TVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.IDCT Method (TVec)

The inverse discrete cosine transform (DCT).

Pascal
function IDCT(const Vec: TVec): TVec; overload;

Calculates the inverse discrete cosine transform (DCT) of a Vec and writes the results in the calling vector. If Vec Length is a power of 2, the function uses an efficient algorithm that is significantly faster than the direct computation of DCT. For other values of Vec length, this function uses the direct formulas given below; however, the symmetry of cosine function is taken into account, which allows to perform about half of the multiplication operations in the formulas. In the following definition of inverse DCT, N=Vec.Length and V is the calling vector: 

 

var a,b: Vector; begin a.SetIt(False,[1,-2,3,4]); b.IDCT(a); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!