Author Topic: Mp3 Decoder  (Read 3596 times)

Ashitaka

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • http://leiber.free.fr
Mp3 Decoder
« on: December 21, 2004, 06:28:33 am »
As some may remember, I was working on porting the streaming application MPEG4IP (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

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?
« Last Edit: December 21, 2004, 06:30:12 am by Ashitaka »
Zaurus SL-C760, SL-C860 and SL-6000
Sharp ROM 1.20 JP and pdaXrom RC8
512 MB SD Card, other memory, wireless and ethernet CF cards
www.nautilus6.org/operation/zaurus.html

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Mp3 Decoder
« Reply #1 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/

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.

Ashitaka

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • http://leiber.free.fr
Mp3 Decoder
« Reply #2 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/
Zaurus SL-C760, SL-C860 and SL-6000
Sharp ROM 1.20 JP and pdaXrom RC8
512 MB SD Card, other memory, wireless and ethernet CF cards
www.nautilus6.org/operation/zaurus.html

Ashitaka

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • http://leiber.free.fr
Mp3 Decoder
« Reply #3 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
Zaurus SL-C760, SL-C860 and SL-6000
Sharp ROM 1.20 JP and pdaXrom RC8
512 MB SD Card, other memory, wireless and ethernet CF cards
www.nautilus6.org/operation/zaurus.html

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Mp3 Decoder
« Reply #4 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

Nice to hear about MAD integration, it is a Good Thing
« Last Edit: December 24, 2004, 07:31:50 am by ikm »

Ashitaka

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • http://leiber.free.fr
Mp3 Decoder
« Reply #5 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 !
« Last Edit: December 26, 2004, 09:17:01 pm by Ashitaka »
Zaurus SL-C760, SL-C860 and SL-6000
Sharp ROM 1.20 JP and pdaXrom RC8
512 MB SD Card, other memory, wireless and ethernet CF cards
www.nautilus6.org/operation/zaurus.html

Ashitaka

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • http://leiber.free.fr
Mp3 Decoder
« Reply #6 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*  
Zaurus SL-C760, SL-C860 and SL-6000
Sharp ROM 1.20 JP and pdaXrom RC8
512 MB SD Card, other memory, wireless and ethernet CF cards
www.nautilus6.org/operation/zaurus.html

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Mp3 Decoder
« Reply #7 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.