Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function DCT: TVec; | The forward discrete cosine transform (DCT). |
| 2 | function DCT(const Vec: TVec): TVec; | Calculates the forward discrete cosine transform (DCT) of the Vec. |
| 3 | function DCT(const Vec: TMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | The forward discrete cosine transform (DCT). |
Overload 1: function DCT: TVec;
The forward discrete cosine transform (DCT).
Result: stored in self (calling object), returns self for chaining
Calculates the forward discrete cosine transform (DCT) of all calling vector elements in-place. If vector Vector.Length is a power of 2, the function uses an efficient algorithm that is significantly faster than the direct computation of DCT. For different lengths 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 DCT, N=Vec.Length and V is the calling vector:
var a,b: Vector;
begin
a.SetIt(False,[1,-2,3,4]);
b.DCT(a);
end;
Overload 2: function DCT(const Vec: TVec): TVec;
Calculates the forward discrete cosine transform (DCT) of the Vec.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TVec |
Result: stored in self (calling object), returns self for chaining
Writes the result 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.
Overload 3: function DCT(const Vec: TMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
The forward discrete cosine transform (DCT).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TMtxVec | |
| 2 | VecIndex | Integer | |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Calculates the forward discrete cosine transform (DCT) of the Vec and writes the result 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 DCT, N=Vec.Length and V is the calling vector:
var a,b: Vector;
begin
a.SetIt(False,[1,-2,3,4]);
b.DCT(a);
end;