xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Common::MDCT Class Reference

(Inverse) Modified Discrete Cosine Transforms. More...

#include <mdct.h>

Inheritance diagram for Common::MDCT:
Inheritance graph
[legend]
Collaboration diagram for Common::MDCT:
Collaboration graph
[legend]

Public Member Functions

 MDCT (int bits, bool inverse, double scale)
 
 ~MDCT ()
 
void calcMDCT (float *output, const float *input)
 Compute MDCT of size N = 2^nbits. More...
 
void calcIMDCT (float *output, const float *input)
 Compute inverse MDCT of size N = 2^nbits. More...
 

Private Member Functions

void calcHalfIMDCT (float *output, const float *input)
 Compute the middle half of the inverse MDCT of size N = 2^nbits, thus excluding the parts that can be derived by symmetry. More...
 

Private Attributes

int _bits
 
int _size
 
ScopedArray< float > _tCos
 
float * _tSin
 
ScopedPtr< FFT_fft
 

Detailed Description

(Inverse) Modified Discrete Cosine Transforms.

Definition at line 64 of file mdct.h.

Constructor & Destructor Documentation

◆ MDCT()

Common::MDCT::MDCT ( int  bits,
bool  inverse,
double  scale 
)

Definition at line 58 of file mdct.cpp.

References _bits, _fft, _size, _tCos, _tSin, ABS(), Common::ScopedPtrBase< T, Deallocator >::get(), inverse(), M_PI, and Common::ScopedPtrBase< T, Deallocator >::reset().

Here is the call graph for this function:

◆ ~MDCT()

Common::MDCT::~MDCT ( )

Definition at line 80 of file mdct.cpp.

Member Function Documentation

◆ calcHalfIMDCT()

void Common::MDCT::calcHalfIMDCT ( float *  output,
const float *  input 
)
private

Compute the middle half of the inverse MDCT of size N = 2^nbits, thus excluding the parts that can be derived by symmetry.

Definition at line 141 of file mdct.cpp.

References _fft, _size, _tCos, _tSin, CMUL, Common::Complex::im, and Common::Complex::re.

Referenced by calcIMDCT().

Here is the caller graph for this function:

◆ calcIMDCT()

void Common::MDCT::calcIMDCT ( float *  output,
const float *  input 
)

Compute inverse MDCT of size N = 2^nbits.

Definition at line 129 of file mdct.cpp.

References _size, and calcHalfIMDCT().

Referenced by Sound::WMACodec::calculateIMDCT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcMDCT()

void Common::MDCT::calcMDCT ( float *  output,
const float *  input 
)

Compute MDCT of size N = 2^nbits.

Definition at line 88 of file mdct.cpp.

References _fft, _size, _tCos, _tSin, CMUL, Common::Complex::im, and Common::Complex::re.

Member Data Documentation

◆ _bits

int Common::MDCT::_bits
private

Definition at line 76 of file mdct.h.

Referenced by MDCT().

◆ _fft

ScopedPtr<FFT> Common::MDCT::_fft
private

Definition at line 82 of file mdct.h.

Referenced by calcHalfIMDCT(), calcMDCT(), and MDCT().

◆ _size

int Common::MDCT::_size
private

Definition at line 77 of file mdct.h.

Referenced by calcHalfIMDCT(), calcIMDCT(), calcMDCT(), and MDCT().

◆ _tCos

ScopedArray<float> Common::MDCT::_tCos
private

Definition at line 79 of file mdct.h.

Referenced by calcHalfIMDCT(), calcMDCT(), and MDCT().

◆ _tSin

float* Common::MDCT::_tSin
private

Definition at line 80 of file mdct.h.

Referenced by calcHalfIMDCT(), calcMDCT(), and MDCT().


The documentation for this class was generated from the following files: