dct
Functions
-
int main(int argc, char *argv[])
dct [ option ] [ infile ]
-l int
DCT length
-q int
input format
0
real and imaginary parts1
real part
-o int
output format
0
real and imaginary parts1
real part2
imaginary part3
amplitude spectrum4
power spectrum
infile str
double-type data sequence
stdout
double-type DCT sequence
- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.
See also
-
class DiscreteCosineTransform
Calculate DCT-II of complex-valued input data.
The inputs are
-length order complex-valued data:Public Functions
-
explicit DiscreteCosineTransform(int dct_length)
- Parameters:
dct_length – [in] DCT length,
.
-
inline int GetDctLength() const
- Returns:
DCT length.
-
inline bool IsValid() const
- Returns:
True if this object is valid.
-
bool Run(const std::vector<double> &real_part_input, const std::vector<double> &imag_part_input, std::vector<double> *real_part_output, std::vector<double> *imag_part_output, DiscreteCosineTransform::Buffer *buffer) const
- Parameters:
real_part_input – [in]
-length real part of input.imag_part_input – [in]
-length imaginary part of input.real_part_output – [out]
-length real part of output.imag_part_output – [out]
-length imaginary part of output.buffer – [out] Buffer.
- Returns:
True on success, false on failure.
-
bool Run(std::vector<double> *real_part, std::vector<double> *imag_part, DiscreteCosineTransform::Buffer *buffer) const
- Parameters:
real_part – [inout]
-length real part.imag_part – [inout]
-length imaginary part.buffer – [out] Buffer.
- Returns:
True on success, false on failure.
-
class Buffer
Buffer for DiscreteCosineTransform class.
-
explicit DiscreteCosineTransform(int dct_length)