6.4.2 CosFactorInit
Description
CosFactorInit generates the first half of the set of cosine factors required by a Type II Discrete Cosine Transform and places the result in the complex destination vector.
Effectively, the set contains the values:
Prototype
fractcomplex* CosFactorInit (int log2N, fractcomplex* cosFactors);
Arguments
Parameters |
Description |
---|---|
log2N |
Based 2 logarithm of N (N = number of complex factors needed by a DCT) |
cosFactors |
Pointer to complex cosine factors |
Returns
Pointer to the base address of the cosine factors.
Remarks
N must be an integer power of 2.
Only the first N/2 cosine factors are generated.
A complex vector of size N/2 must have already been allocated and assigned to cosFactors prior to invoking the function. The complex vector should reside in X-Data memory.
Factors are computed in floating-point arithmetic and converted to 1.31 complex fractionals.
Source File
- initcosf_aa.c