Available Languages?:

MP3 Decoder for dsPIC

dsPIC MP3 Decoder


Last version

  • 1.0.1042 (16 july 2008) download @ 1 МБ
    • First release on this site. Project contain source code of dsPIC MAD decoder, MPLAB project and test MP3 files. File ..\doc\test_result.txt contain reports of test streams decoding.


MP3 decoder library project for Microchip DSC dsPIC is based on well known fixed-point MP3 decoder MAD. Generally speaking this project based on another MAD port for TI TMS320C55xx that you can find in net (author: Grigory Abuladze).

I rewrite all assemblers routines, check alingment (TI CCS assume that char size is 16 bit), check all endian-sensitive operations (TMS320 is big-endian, while dsPIC is little-endian). I use only static data allocation in my port.

dsPIC33 MAD MP3 decoder is available under the terms of the GPL


~29 kB of code + ~17 kB of const section (totally 18% of dsPIC33FJ256GP710 flash size)
~25 kB + ~1.5 kB for stack (totally 88% of dsPIC33FJ256GP710 SRAM)

Today the only one Microchip DSC on which you can run this code is dsPIC33FJ256GP710. This is only because of SRAM memory requirements - any dsPIC33 have enough MIPS for decode low-rata MP3 streams.


Project archive contain test MP3 streams with different bitrates. Productivity estimated as time needed for stream decode (without audio buffer read and write functions) on 40 MIPS.

The test results shows that current version can decode in real time:

  • all mono streams
  • stereo streams with sample rate up to 32 kHz and bitrate up to 128 kbps

The dsPIC MAD decoder need about 33.6 MIPS for decode stereo stream 32 kHz @ 128 kbps and 6.8 MIPS for decode stereo stream 8 kHz @ 20 kbps.

Full test report you can find in ..\doc\test_results.txt.


The current decoder version have the following limitations:

  • MPEG1 Layer 1 and Layer 2 not supported
  • 16-bit math is used
  • bug in mad_port_stereo_intensity_lsf() function FIXME
en/mp3_dspic/ref/intro.txt · Last modified: 21.07.2008 00:31 by admin
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki