ts-7000
[Top] [All Lists]

fixed-point mp3 encoder

To:
Subject: fixed-point mp3 encoder
From: Andrew Taylor <>
Date: Tue, 25 Nov 2008 21:37:04 +1100
I'm looking to stream audio off a ts-7800 using icecast.  I found a
(mostly) fixed-point  mp3 encoder (build details below).   Its has
few features but  seems to work OK.  On a ts-7260 running armel(EABI) it
encoded a 1 minute 32khz 16-bit stereo wav file in 40 seconds.

The author included ARM assembler for the fixed-point arithmetic but I
could not get this to work so I replaced it - hopefully correctly - with
simple C.  Not sure if the assembler would be faster.  I'd guess rest
of the code could be tweaked to run faster.

Andrew


mkdir mp3encoder
cd mp3encoder
wget http://www.mp3-tech.org/programmer/sources/shinefixed.zip
unzip shinefixed.zip
perl -pi -e 'if (/^#include/) {tr/A-Z/a-z/;s/"l/"L/};s/^extern long mul.*//' *.c
cat <<eof >>types.h
#define mul(a1, a2) (((int64_t)(a1)*((int64_t)(a2))) >> 32)
#define muls(a1, a2) (((int64_t)(a1)*((int64_t)(a2))) >> 31)
#define mulr(a1, a2) (((int64_t)(a1)*((int64_t)(a2)) + (((int64_t)1)<<31)) >> 
32)
#define mulsr(a1, a2) (((int64_t)(a1)*((int64_t)(a2)) + (((int64_t)1)<<31)) >> 
31)
eof
mv riscos.c riscos.c.uneeded
gcc -fargument-noalias-global  -funroll-loops  -mtune=arm9tdmi -march=armv4t 
-O3 -o mp3encoder *.c -lm

<Prev in Thread] Current Thread [Next in Thread>
  • fixed-point mp3 encoder, Andrew Taylor <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU