Skip to main content

Topic: Tremor's mdct backward function (Read 6788 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • antrox87
  • [*]
Tremor's mdct backward function
Hi to all,
I'm trying to understand the Tremor's code that implements the iMDCT.
First of all.. Does it implement iMDCT throught a mechanism of rotation and FFT? I'm not sure of it..
If it's true.. where does implement the presorting?
Then.. the parameter "n" defines the dimension on witch the iMDCT is calculated (I know that the range on witch n is defined could be only between 64 and 8192 , multiples of 2).  Is it the input's array dimension?

Thanks for answers


  • saratoga
  • [*][*][*][*][*]
Tremor's mdct backward function
Reply #1
First of all.. Does it implement iMDCT throught a mechanism of rotation and FFT? I'm not sure of it..


It does not.  FFT based iMDCTs are very easy to spot since they nearly all look the same.  See mdct.c in ffmpeg (or the unrelated but nearly identically written mdct.c in libfaad) for good examples of these.

Then.. the parameter "n" defines the dimension on witch the iMDCT is calculated (I know that the range on witch n is defined could be only between 64 and 8192 , multiples of 2).  Is it the input's array dimension?


Correct.  Its the input array's dimension (number of frequency domain samples), typically 256 or 2048 for vorbis. 




  • antrox87
  • [*]
Tremor's mdct backward function
Reply #2
It does not.  FFT based iMDCTs are very easy to spot since they nearly all look the same.  See mdct.c in ffmpeg (or the unrelated but nearly identically written mdct.c in libfaad) for good examples of these.


So.. what does implement?? How is it implemented?
I thought that it was following the algorithm to implement a MDCT thorugh an FFT in the reverse way...

  • saratoga
  • [*][*][*][*][*]
Tremor's mdct backward function
Reply #3
It does not.  FFT based iMDCTs are very easy to spot since they nearly all look the same.  See mdct.c in ffmpeg (or the unrelated but nearly identically written mdct.c in libfaad) for good examples of these.


So.. what does implement?? How is it implemented?


Check the comments in the code.  The author gives a reference for his particular MDCT.  Unfortunately, its a book which I've never bothered to track down so I can't say anything specific about it.  However, if you search for IMDCTs, you'll see that theres quite a few different algorithms out there for computing them (though the FFT method is most popular).

I thought that it was following the algorithm to implement a MDCT thorugh an FFT in the reverse way...


The forward and backward MDCTs are nearly identical, and are extremely simple.  Most are just a few lines of code for rotations, then an FFT, then a few more lines of code for post rotations.  The algorithm in Tremor is clearly quite different since its both very long and has no FFT

  • OggY68
  • [*]
Tremor's mdct backward function
Reply #4
It does not.  FFT based iMDCTs are very easy to spot since they nearly all look the same.  See mdct.c in ffmpeg (or the unrelated but nearly identically written mdct.c in libfaad) for good examples of these.


So.. what does implement?? How is it implemented?


Check the comments in the code.  The author gives a reference for his particular MDCT.  Unfortunately, its a book which I've never bothered to track down so I can't say anything specific about it.  However, if you search for IMDCTs, you'll see that theres quite a few different algorithms out there for computing them (though the FFT method is most popular).

I thought that it was following the algorithm to implement a MDCT thorugh an FFT in the reverse way...


The forward and backward MDCTs are nearly identical, and are extremely simple.  Most are just a few lines of code for rotations, then an FFT, then a few more lines of code for post rotations.  The algorithm in Tremor is clearly quite different since its both very long and has no FFT


Hmmm,    ,  actually the mdct_backward function in Tremor's mdct.c file does implement an FFT.  I see bitreverse, butterfly etc methods, all the building blocks of a good old Fast Fourier Transform:
http://www.dspguide.com/ch12/2.htm

  • saratoga
  • [*][*][*][*][*]
Tremor's mdct backward function
Reply #5
Hmmm,    ,  actually the mdct_backward function in Tremor's mdct.c file does implement an FFT.  I see bitreverse, butterfly etc methods, all the building blocks of a good old Fast Fourier Transform:
http://www.dspguide.com/ch12/2.htm


If you can pick out a DFT in there, then good work!  But don't assume that just because theres butterflies and bit reversal that its an FFT.  The MDCT is itself a discretized Fourier transform, so it can be computed using much the same decomposition methods.

Tremor's mdct backward function
Reply #6
Hi to all,
I'm trying to understand the Tremor's code that implements the iMDCT.
First of all.. Does it implement iMDCT throught a mechanism of rotation and FFT? I'm not sure of it..
If it's true.. where does implement the presorting?
Then.. the parameter "n" defines the dimension on witch the iMDCT is calculated (I know that the range on witch n is defined could be only between 64 and 8192 , multiples of 2).  Is it the input's array dimension?

Thanks for answers



Hi,
i am working on MDCT Backward of tremor's code.
i need to replace this to Duhamels algorithim.
can u plz help me out by any suggesstions or inputs??
i need to replace existing MDCT to duhamels FFT  so as to increase the performance.
Thanks a lot.

Regards,
Ruchi

  • saratoga
  • [*][*][*][*][*]
Tremor's mdct backward function
Reply #7
Hi,
i am working on MDCT Backward of tremor's code.
i need to replace this to Duhamels algorithim.
can u plz help me out by any suggesstions or inputs??
i need to replace existing MDCT to duhamels FFT  so as to increase the performance.
Thanks a lot.


I tried several FFT based IMDCTs in place of tremor's and all were slower.  You will need a very fast FFT algorithm to beat Tremor.  Lately I've been working on a slit radix version, but I have no idea if its going to be any faster

If you want to try, take a look at one of the mdct.c files mentioned above and use your own FFT.
  • Last Edit: 14 October, 2009, 09:26:23 AM by Mike Giacomelli