Shop OBEX P1 Docs P2 Docs Learn Events
MP3 — Parallax Forums

MP3

CruxCrux Posts: 74
edited 2006-10-04 15:10 in Propeller 1
Can the propeller chip handle MP3 decoding?

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-03 05:46
    The answer is likely yes, but it is by no means simple. Its on the bottom of my to do list (at least investigating exactly how difficult it would be), but given the current priority of things, it wont be for many months before I look at it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Bill HenningBill Henning Posts: 6,445
    edited 2006-10-03 05:48
    As a starting point, find some code for an integer-only MP3 decoder... then decompose the algorithm, and try to implement it in propeller assembly code. If one cog is not enough, you may have to divide the task between several cogs. It should be doable; I am not sure one cog can do it.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-03 05:58
    Those were my thoughts as well Bill, that it would require multiple cogs performing frame decoding.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • potatoheadpotatohead Posts: 10,254
    edited 2006-10-03 06:53
    Well, a 33Mhz MIPS R3K can do it.

    I used to have an old SGI Indigo playing mp3's up to 192Kbps. (95 percent CPU utilization) The endoder was Amp, and it's open source. Probably was a floating point code though...

    The Ogg Vorbis codec (similar to mp3), has an integer code base to examine.
  • Bill HenningBill Henning Posts: 6,445
    edited 2006-10-04 04:25
    This seemed like an interesting problem, so I did a bit of googling...

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

    A dual-licensed integer only MPEG audio decoder; free for GPL projects, $$$ for closed source projects.
    MAD appears to be 'THE' integer only decoder to use.

    http://www.mp3-tech.org/programmer/decoding.html

    Helix fixed point mp3 decoder:

    https://datatype.helixcommunity.org/mp3dec

    A list of links to free source code for MP3 decoders

    http://www.mp3-tech.org/programmer/docs/2001MAR26_DSP_MSD_TAC.pdf

    An interesting paper on integer-only DSP decoding

    Apparently a 30MHz ARM can do it, with about 50k of ram.

    I think two cogs, and careful memory optimizations should do it.

    Hope this helps!

    Bill
  • Ym2413aYm2413a Posts: 630
    edited 2006-10-04 15:10
    I'm releasing a ADPCM object into the Object Exchange in the near future along with tools to convert the audio over.
    It compresses down 1/6th of wave and only needs one COG.

    I wouldn't be useful for projects that need to play back MP3s though, such as a propeller based MP3 player.
    Instead it would be useful for people who need to add voice or audio samples to their projects as another form of output.
    Like talking Robots or a talking time clock for example.

    The nice thing is it only needs one COG and doesn't take up any HUB-ram for decoding, so anyone with a COG to spare can add audio to their project.

    Post Edited (Ym2413a) : 10/4/2006 3:27:05 PM GMT
Sign In or Register to comment.