Reply by Yuansheng Wu March 9, 20062006-03-09
While I was reading through the aacPlus decoder code, I wasn't sure
what the following function's usage, is this an implementation of the
IMDCT? Or something else?

Any help is appreciated. Thanks in advance.


/*
 *
 * \brief Perform complex-valued inverse modulation of the subband
 *        samples stored in rSubband (real part) and iSubband
(imaginary
 *        part) and stores the result in timeOut
 *
 */
static void
inverseModulation (float *qmfReal,
                  float *qmfImag,
                  HANDLE_SBR_QMF_FILTER_BANK synQmf
                  )
{
 int i, no_synthesis_channels, M;

 float r1, i1, r2, i2;

 no_synthesis_channels = synQmf->no_channels;
 M = no_synthesis_channels / 2;
 for (i = synQmf->usb; i < no_synthesis_channels; i++) {
   qmfReal[i]=qmfImag[i]=0;
 }

 cosMod (qmfReal, synQmf);
 sinMod (qmfImag, synQmf);

 for (i = 0; i < M; i++) {
   r1 = qmfReal[i];
   i2 = qmfImag[no_synthesis_channels - 1 - i];
   r2 = qmfReal[no_synthesis_channels - i - 1];
   i1 = qmfImag[i];

   qmfReal[i] = (r1 - i1);
   qmfImag[no_synthesis_channels - 1 - i] = -(r1 + i1);
   qmfReal[no_synthesis_channels - i - 1] = (r2 - i2);
   qmfImag[i] = -(r2 + i2);
 }
}