Thread: MP3 Decoder

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    17

    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

  2. #2
    C maniac
    Join Date
    Aug 2004
    Location
    Cyberwarping to Middle Earth
    Posts
    154
    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

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    17
    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

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    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.

  5. #5
    Registered User
    Join Date
    Jul 2004
    Posts
    17
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. which Portable mp3 player?
    By Raihana in forum A Brief History of Cprogramming.com
    Replies: 27
    Last Post: 01-09-2004, 07:58 AM
  2. MP3 to WAVE and WAVE to MP3 conversion
    By Blizzarddog in forum C++ Programming
    Replies: 8
    Last Post: 01-01-2004, 08:32 PM
  3. mp3 players vs mp3 cd players
    By Geo-Fry in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-06-2003, 09:22 PM
  4. Mp3
    By gvector1 in forum C# Programming
    Replies: 15
    Last Post: 07-08-2003, 05:48 PM