Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Question about the DTS polyphase filterbank (Read 4603 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Question about the DTS polyphase filterbank

Hi~All
I'm doing optimizations of  DTS decoder on the libdca. After profiling, the most hot pot is the function qmf32_fir_subband, which consumes more than 90% time of the whole decoding process.
So,I need to know more about the polyphae filterbank in DTS decoding.
After reading the book of  “Introduction to Audio Coding and Standards ”, I got some basical idea about the PQMF filterbank used in MPEG. And the filterbank is described as follows:
Hk[n]=h[n]*cos(pai*(....)+...)
Gk[n]=Hk[N-n-1]
while N is the length of h[n] and k is the index of subband.

But when it comes to the computation of DTS pqmf, how can I find out the exact presentation of the above fomula?
Could anyone can help me ?
Thx!

Question about the DTS polyphase filterbank

Reply #1
The iQMF is really slow.  For ATRAC3 I ended up rewriting the whole thing in ASM to squeeze out every last bit of performance.  What CPU are you using?  If its got SIMD, unrolling the loop and vectorizing is probably the way to go.

Question about the DTS polyphase filterbank

Reply #2
Thank you for your reply!
I am optimizing it on Loongson CPU cores which provide SIMD.
I know how to find hot pots,unroll loops ,and using SIMD instruction to enhance performance.
But I want to know more about the whole thing. For example,I want to know what's the exact representation of the polyphase filterbank they use in DTS decoder?
In the tech-specification "ETSI TS 102 114 V1.2.1 (2002-12)" http://multimedia.cx/mirror/dts2.pdf 
The annex c.6 given c code for the computing process. And also there is the filter coefficients in the annex D.8.
It seems that in the c codes, it's not an direct implementation of IQMF but a optimized one.
How cound I find the original form?
Could anyone give some idea?

Question about the DTS polyphase filterbank

Reply #3
I believe at the heart of the (i)PQMF filterbank is transform that resembles some kind of DCT or DST. As such it should be possible to perform this transform in O(n * log n) time instead of O(n^2) where n is the number of samples, in this case 32. Since n=32 is rather low, it might not be worth the effort. But it also might be twice as fast. I don't know.

Question about the DTS polyphase filterbank

Reply #4
I believe at the heart of the (i)PQMF filterbank is transform that resembles some kind of DCT or DST. As such it should be possible to perform this transform in O(n * log n) time instead of O(n^2) where n is the number of samples, in this case 32. Since n=32 is rather low, it might not be worth the effort. But it also might be twice as fast. I don't know.


Usually these filterbanks are implemented as an FFT/DCT stage and a dewindowing stage.  Since the FFT is usually pretty short, its usually quite fast compared to the dewindowing stage which is usually a long FIT filter or something similar. 

For ATRAC, this is pretty easy to understand, since the transform is just 4 subbands, each 512 samples long using a 48 point filter (IIRC).  So the transform becomes a 4 point FFT followed by a 48 point FIR filter iterated over 512 samples.  Obviously the FFT is much faster then the FIR

qjivy:

Without knowing anything about DTS, my guess would be that you want to steal an optimized (integer) DCT from mp3 (since it also uses a 32 channel filterbank).  There are optimized ones in rockbox:

http://svn.rockbox.org/viewvc.cgi/trunk/ap...h.c?view=markup

Additionally, ffmpeg has a (floating point) implementation implemented using an iMDCT (in place of the DCT above) and an FIR filter:

http://git.ffmpeg.org/?p=ffmpeg.git;a=blob...9feba1d;hb=HEAD

Rockbox also has an integer implementation of the ffmpeg iMDCT if you choose to go that route.