OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Ashitaka on December 21, 2004, 06:28:33 am

Title: Mp3 Decoder
Post by: Ashitaka on December 21, 2004, 06:28:33 am
As some may remember, I was working on porting the streaming application MPEG4IP (mpeg4ip.sf.net (http://mpeg4ip.sf.net)) on Zaurus, but I had a few problems. Most of them are now solved, partly because I am using pdaXrom so I could get rid of the 2.95 toolchain.
But the sound problem remains, and I just discovered it was only because of heavy floating point usage inside the MP3 decoder, which makes it horribly slow (85 ms to decode a 36 ms frame, with only a 16kHz / 1 channel / 16 kbits MP3 file). To have an idea of the source you can look at filter.cpp (http://cvs.sourceforge.net/viewcvs.py/mpeg4ip/mpeg4ip/player/lib/audio/mp3/filter.cpp?rev=1.3&view=auto)

The first thing is that I am quite surprised I did not see much speed difference when switching to pdaXrom, which should have this Vector Floating Point stuff to make things faster. Am I missing something?

The second is, does someone have any recommendations about integrating another decoder, if ever I have to do it? Or someone who is willing to help?
Title: Mp3 Decoder
Post by: ikm on December 21, 2004, 07:25:15 am
Quote
The second is, does someone have any recommendations about integrating another decoder, if ever I have to do it? Or someone who is willing to help?
Well, there is a MAD decoder out there, obviously. It's a fully fixed-point MP3 decoder, available under the GPL license. Actually, this decoder is the only feasible way for the open source software to efficiently play mp3s on PDAs and other low-end devices without an FPU.

Furthermore, the current pdaXrom SDK already includes it. Look into /opt/arm/3.3.2-vfp/armv5tel-cacko-linux/include/mad.h for the interface. The corresponding library to link with (libmad) is also present, of course.

The decoder's home page is here:

http://www.underbit.com/products/mad/ (http://www.underbit.com/products/mad/)

How to integrate it into your application is another question, though. You'll have to find it out yourself, I guess. Alternatively, you can try contacting the original developers about the problem and possible clues.
Title: Mp3 Decoder
Post by: Ashitaka on December 21, 2004, 09:05:28 pm
Yes, I know about MAD
And yes, I am working with the original developper of the application to integrate it, but I just wanted to hear some advice from the Zaurus community, thanks

By the way, I think there is another good solution for fixed-point MP3 decoding, optimized for ARM :
https://helixcommunity.org/viewcvs/cgi/view...p3/codec/fixpt/ (https://helixcommunity.org/viewcvs/cgi/viewcvs.cgi/datatype/mp3/codec/fixpt/)
Title: Mp3 Decoder
Post by: Ashitaka on December 23, 2004, 10:10:18 pm
Quote
Furthermore, the current pdaXrom SDK already includes it. Look into /opt/arm/3.3.2-vfp/armv5tel-cacko-linux/include/mad.h for the interface. The corresponding library to link with (libmad) is also present, of course.
It seems I don't have the same version of the SDK, I don't have this library included  
As for MPEG4IP, the developer just finished integrating MAD, I have to build and test it now
Title: Mp3 Decoder
Post by: ikm on December 24, 2004, 07:30:18 am
Quote
It seems I don't have the same version of the SDK, I don't have this library included   
As for MPEG4IP, the developer just finished integrating MAD, I have to build and test it now

If you don't have it, then you're using an old 1.0.5 SDK. It is only for pdaXrom < 1.1.0 RC5, which are almost obsolete now.

For pdaXrom 1.1.0 RC5 and higher, this one should be used:

http://mirror1.pdaxrom.org/rc5/pdaxromsdk-...ftfloat.tar.bz2 (http://mirror1.pdaxrom.org/rc5/pdaxromsdk-1.1.0-softfloat.tar.bz2)

Nice to hear about MAD integration, it is a Good Thing
Title: Mp3 Decoder
Post by: Ashitaka on December 26, 2004, 09:14:34 pm
...............
If only I had found this SDK earlier   That's why floating point operations were so slow !

By the way, MAD works fine !
Title: Mp3 Decoder
Post by: Ashitaka on December 27, 2004, 02:46:12 am
Hum with this environment I don't even need the MAD plugin, FP are like 3 times faster... *sigh*  
Title: Mp3 Decoder
Post by: ikm on December 27, 2004, 07:17:00 am
Quote
Hum with this environment I don't even need the MAD plugin, FP are like 3 times faster... *sigh* 
Don't forget that MAD is still much more efficient, so it's much better for the battery life.