-
MP3 Decoder
Over the last few months, i've been trying to speed up the ISO MP3 decoder, and also make it work on fixed-point maths. I thought I'd acheived my aim today when it decoded a file quick enough on my 3ghz pc that (in theory) it should play in real time on a 50mhz 486 i've got lying around. Then i tested the accuracy and.... although it sounds alright, its no where near good enough.
So I plan on rewriting the whole thing (copying bits accross but generally making it neater and also trying to get better accuracy at the same speed), but tbh this doesn't appeal as an individual project as its going to be a lot of work...
So does anyone want to help?
Pete
-
I am, if you are.
Is the probemo speed? If so, then is it mathmatical? Is it just plain slow? Does it need optimaztion?
Thanks :)
-
Well, the original ISO code that I was optimizing produces the EXACT results (as it is the standard for comparing against) but takes ages to decode. I managed to get the speed down to 16.25secs for a 17:30minute song on my 3GHz, which (ignoring the fact that new processors do more in 1 cycle) suggests that it should just about play in real time on a 50Mhz:-
Code:
3000
---- = 60, 60 * 16.25 = 975 < 1050 (17:30)
50
But then when I compared the outputs with the orignal, it was completely inaccurate. I hope that this is mainly due to how I converted from floating math to fixed point...
Pete
-
I'm interested to know how you got your hands on a proprietary format. I've been wanting to create an MP3 decoder to play my music in games w/o using DirectShow, but cannot find the format.
-
I haven't got a copy of the standard, but you can easily get the ISO distribution and learn from that. Although its copyright, my plan is to use it to try out different ways of optimizing and then once I know what's quickest etc., I can tidy up the code, add comments and put it in to my own decoder. You wouldn't ever use the ISO code as it has parts in it which were obviously not written for speed but clarity, it also guarentees 100% correct results, so compare your output with what comes from the ISO decoder
Pete
PS. Download for the original decoder is here