MP3 decode is hard!
Rayman
Posts: 14,801
I started looking at MP3 decoding and found it to be about 100X more complicated than I thought.· Still, I found a paper saying something to the effect that real-time playback is possible with 48 MIPS, 18kB program space, 9kB coefficient space and 22kB stack space...· So, I guess it's plausible to have a Prop based MP3 player, but it will probably use all the cogs and all the memory.
I'm looking at the inner workings of Libmad right now...
I'm looking at the inner workings of Libmad right now...
Comments
to look into the inner working, however the algorithm(s) used are very advanced. I should doubt that the Propeller can work it. You need about 50kB memory and 50 MIPS. The Propeller I has half of both
There are all-integer implementations, for instance in mplayer and in xine. Maybe one of those could be useful. OTOH a mp3 player IC does not cost that much, but has its limitations. That is what I'd call ... a challenge. Good luck !
Edit: The propeller has more MIPS, but less memory. A multithreded decoding would be really neat stuff, some real piece of engineering.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I see the main issue in the missing multiplication instruction. This is normally the bottleneck for all signal processing. The LIBMAD may use many tables but access to them needs indexing and interpolation as well. I am really excited what Rayman will find out!
The math coprocesor of the 486 was not the fastest, but using floating point can simplify algorithms considerably.... And it worked "in parallel"
It all depends on the structure of the core algorithm.. There is a thing called Amdahl's law which tricked me many times when I worked with speeding up programs for vector processors, many many years ago
MP3 isn't a walk in the park for most microcontrollers.
There are other compression formats that are easier to decode, but then again I guess that would be missing the point.
What about a slave prop and a master.......? dedicated MP3 decoding?.....
I think that would miss the point also, other then proof of concept maybe...
Since there are cheap MP3 decoder ICs out there.
What would be nice is if MP3 could be done with some resources left over. Then that would be an useful object. [noparse];)[/noparse]
Single chip MP3 player/jukebox anyone?
Really the Prop would do a better job decodering some other forms of audio compression, but the thing with MP3 is that it is so widely supported and the fact that it is used on other platforms. [noparse]:)[/noparse]
It barely worked but I got stuck on the Fourier Modified Discrete Cosine Transforms. Need more brains!!!
The prop has a SINE table which is useful in this app, and somehow can be used for fast multiplication too.
The Propeller is also a little bit faster than the first windows PC's that could play MP3's!
Behold, the prop can synthesize up to 8 wideband broadcast frequency TV channels! (and singing monks too!)
What can't it do with snail-paced audio frequencies?