~~NOTOC~~ \\ {{:b_mp3_dspic.png|MP3 Decoder for dsPIC}} ====== dsPIC MP3 Decoder ====== ===== Download ===== ==== Last version ==== * **1.0.1042** (16 july 2008) {{mp3_dspic:ref:mp3_dspic_c30_1_0_1042.rar|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. ---- ~~UP~~ ===== Description ===== MP3 decoder library project for Microchip DSC dsPIC is based on well known fixed-point MP3 decoder [[http://www.underbit.com/products/mad/|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 [[http://www.underbit.com/resources/license/gpl/|GPL]] ~~UP~~ ===== Requirements ===== ; Flash : ~29 kB of code + ~17 kB of ''const'' section (totally 18% of dsPIC33FJ256GP710 flash size) ; SRAM : ~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 [[http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en024679|dsPIC33FJ256GP710]]. This is only because of SRAM memory requirements - any dsPIC33 have enough MIPS for decode low-rata MP3 streams. ~~UP~~ ===== Productivity ===== 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''. ~~UP~~ ===== Limitations ===== 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 ~~UP~~