Posts Tagged: ‘embedded’

Easy/Small JPEG compressor program for embedded systems / mono images

11/20/2012 Posted by admin

Here is a code I created long time ago for PPC target (there is still some asm statements that might work, although I have not tested them recently).

It should be pretty simple to re-use it on any other target that can do 16×16 multiplications.

The main loop looks like this :

For each group of 8x8 block(MCU)
process MCU
write outputbuffer

Code is around 15K in standard C, and results in a static executable file of around the same size (14440 on my machine).

In the example, the input file is ‘image.y’ (Netpbm PGM « rawbits » image data , 1280×1024).
Output file is ‘testout.jpg’.

The jpeg header & related quantification tables are all fixed and pre-calculated (in included files).
(Lire la suite…)

MP3 Audio Decoder on STM32F4 Discovery

03/07/2012 Posted by admin

The ST Firmware for STM32F4 Discovery includes a simple Audio demo that
demonstrates a Wave player (directory Project/Audio_playback_and_record).

From that project, I derived an Audio_playback_MP3 that plays an embedded MP3
stream (the same audio as in the ST example), but the audio is now around 55 seconds
instead of the original 5 seconds.

The MP3 decoder lib used is the libmad v. 0.15.1 .
(Lire la suite…)