[iPAQ] mpg123 v madplay comparison

From: Christopher J Mason <cmason.a.t.cmu.edu>
Date: Sun Sep 24 2000 - 22:56:09 EDT

This is a comparison of the mpg123 and madplay mp3 players running on the
Compaq iPAQ (data from an intel PII is included for comparison). This
test is for "raw" decoding, where the decoder is just asked to decode the
file, not to send it to the audio device (it is hoped that this will negate
the effects of possibly nascent audio drivers for the iPAQ, no offense to
anyone). The file is in a ramfs filesystem. (Scroll down to the end for a
summary.)

madplay was configured with:

 ./configure --host=arm4l-linux-gnu --enable-fpm=arm --enable-aso

I also tried the --enable-speed option.

mpg123 is as installed in v0.16

____________________________________________________________________

Here's the raw data from my tests:

The first file is a VBR layer 3 encoded with "lame -V1 -b 128 -h -m j" with
an average bitrate of 182kbps.

time madplay -o NULL:/dev/null all_you_ever_needed.mp3 &
[1] 201
(none):/mnt/ramfs/root# MPEG Audio Decoder version 0.11.3 (beta) -
Copyright (C)
 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip

 all_you_ever_needed.mp3: 10164 frames decoded (0:04:25.5
)
real 1m8.566s
user 1m7.940s
sys 0m0.190s

[1]+ Done time madplay -o NULL:/dev/null
all_you_ever_needed
.mp3

(none):/mnt/ramfs/root# time ./madplay.speed -o NULL:/dev/null
all_you_ever_need
ed.mp3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip
all_you_ever_needed.mp3: 10164 frames decoded (0:04:25.5)

real 1m7.998s
user 1m7.780s
sys 0m0.200s

(none):/mnt/ramfs/root# time mpg123 -t all_you_ever_needed.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : All You Ever Needed Artist: Olive
Album : Trickle Year : 0
Comment: Created by Grip Genre : Rock

Playing MPEG stream from all_you_ever_needed.mp3 ...
MPEG 1.0 layer III, 64 kbit/s, 44100 Hz joint-stereo

[4:25] Decoding of all_you_ever_needed.mp3 finished.

real 1m24.882s
user 1m13.480s
sys 0m11.380s

For comparison, here's the decoding on my PII 333 laptop with mpg123

root@crisp:~/mp3/olive/trickle# time mpg123 -t all_you_ever_needed.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : All You Ever Needed Artist: Olive
Album : Trickle Year : 0
Comment: Created by Grip Genre : Rock

Playing MPEG stream from all_you_ever_needed.mp3 ...
MPEG 1.0 layer III, 64 kbit/s, 44100 Hz joint-stereo

[4:25] Decoding of all_you_ever_needed.mp3 finished.
36.110u 0.130s 0:41.97 86.3% 0+0k 0+0io 1662pf+0w

Here's madplay on the PII 333: (configured with ./configure)

root@crisp:/usr/local/src/mad-0.11.3b# time ./madplay -o NULL:/dev/null
~/mp3/olive/trickle/all_you_ever_needed.mp3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip
/home/cmason/mp3/olive/trickle/all_you_ever_needed.mp3: 10164 frames
decoded (0:04:25.5)
83.780u 0.190s 1:32.49 90.7% 0+0k 0+0io 3129pf+0w

Here's the mad play speed-optimized version (configured with ./configure
--enable-speed):

cmason@crisp:/usr/local/src/mad-0.11.3b> time ./madplay.speed -o
NULL:/dev/null ~/mp3/olive/trickle/all_you_ever_needed.mp3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Comment: Created by Grip
/home/cmason/mp3/olive/trickle/all_you_ever_needed.mp3: 10164 frames
decoded (0:04:25.5)
78.720u 0.180s 1:26.10 91.6% 0+0k 0+0io 3114pf+0w

The second file is the same track encoded at 128kbps with "lame -b 128 -m j"

Here's madplay on arm 206mhz:

(none):/mnt/ramfs/root# time madplay -o NULL:/dev/null
all_you_ever_needed.128.m
p3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip
all_you_ever_needed.128.mp3: 10163 frames decoded (0:04:25.4)

real 1m2.331s
user 1m2.250s
sys 0m0.070s

Here's the speed optimized version on arm:

(none):/mnt/ramfs/root# time ./madplay.speed -o NULL:/dev/null
all_you_ever_need
ed.128.mp3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip
all_you_ever_needed.128.mp3: 10163 frames decoded (0:04:25.4)

real 1m2.221s
user 1m1.970s
sys 0m0.240s

Here's mpg123 on arm:

(none):/mnt/ramfs/root# time mpg123 -t all_you_ever_needed.128.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : All You Ever Needed Artist: Olive
Album : Trickle Year : 0
Comment: Created by Grip Genre : Rock

Playing MPEG stream from all_you_ever_needed.128.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo

[4:25] Decoding of all_you_ever_needed.128.mp3 finished.

real 1m22.297s
user 1m11.120s
sys 0m11.150s

Here's madplay on PII 333:

cmason@crisp:~/mp3/olive/trickle> time madplay -o NULL:/dev/null
all_you_ever_needed.128.mp3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip
all_you_ever_needed.128.mp3: 10163 frames decoded (0:04:25.4)
85.890u 0.050s 1:31.79 93.6% 0+0k 0+0io 1178pf+0w
f

Here's the mad play speed-optimized version:

cmason@crisp:/usr/local/src/mad-0.11.3b> time ./madplay.speed -o
NULL:/dev/null ~/mp3/olive/trickle/all_you_ever_needed.128.mp3
MPEG Audio Decoder version 0.11.3 (beta) - Copyright (C) 2000 Robert Leslie
 Title: All You Ever Needed Artist: Olive
 Album: Trickle Genre: Rock
  Year: 0 Track: 5 Comment: Created by Grip
/home/cmason/mp3/olive/trickle/all_you_ever_needed.128.mp3: 10163 frames
decoded (0:04:25.4)
66.750u 0.080s 1:10.99 94.1% 0+0k 0+0io 1180pf+0w

Here's mpg123 on the PII 333:

cmason@crisp:~/mp3/olive/trickle> time mpg123 -t all_you_ever_needed.128.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : All You Ever Needed Artist: Olive
Album : Trickle Year : 0
Comment: Created by Grip Genre : Rock

Playing MPEG stream from all_you_ever_needed.128.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo

[4:25] Decoding of all_you_ever_needed.128.mp3 finished.
35.480u 0.140s 0:38.85 91.6% 0+0k 0+0io 2286pf+0w

____________________________________________________________________

To summarize: (cpu time in min:sec) (4:25 mp3, same track, same encoder)
                        ARM SA1100 (206mhz) i686 (333mhz)
                     madplay mp-speed mpg123 madplay mp-speed mpg123
VBR (182kpbs avg) 1:08 1:08 1:13 1:24 1:19 0:36
128kbs 1:02 1:02 1:11 1:25 1:07 0:35

(mp-speed is madplay compiled with the --enable-speed option; this doesn't
seem to have much effect on arm.)

In general this translates to about 28% of the processor all the time on
206mhz strong-arm; versus less than 5% of the processor on 333mhz intel.
The difference between the VBR and 128kbs files seems to be minimal (this
is quite surprising to me; the VBR file sounds noticeably better, and is
significantly larger).

Here's the filesizes of the executables on arm: (both stripped)

(none):/mnt/ramfs/root# du -s `which madplay`
107 /usr/local/bin/madplay
(none):/mnt/ramfs/root# du -s `which mpg123`
189 /usr/bin/mpg123

Here are the file sizes of the mp3 files themselves:

cmason@crisp:/usr/local/src/mad-0.11.3b> du -s ~/mp3/olive/trickle/all*
4164 /home/cmason/mp3/olive/trickle/all_you_ever_needed.128.mp3
6020 /home/cmason/mp3/olive/trickle/all_you_ever_needed.mp3

Subjectively, I can tell only slight differences in the quality of the
output from the three different decoders. Maybe mpg123 sounds just
slightly "more cluttered" in the high-tones than madplay; this is more
noticable on the 128kbps mp3 and it's damn close. This difference seems to
go away with the speed optimized version of madplay. I think I may hear
some background buzz in the low amplitude parts in the mpg123 decode of the
128kbps file, but I could be imagining this.

I guess I'm a bit disappointed that even the 128kbits stream takes up 28%
of the processor. I also notice that the audio quality on the iPAQ seems
to lack the bass response of my Sony laptop. It's still quite acceptable,
though. The audio amp on the iPAQ can get /much/ louder than that on my
laptop. Which is good, I guess; I'm waiting for the time when I forget to
set the volume level (I'm using -g option to mpg123, or the slider in
gqmpg; I can't find I user land tool like xmixer or aumix) and blow out my
eardrums.

The only conclusion that I can draw is that the lack of FPU is really going
to hamper any serious multimedia codecs. Is this true? Can we do much
better? Am I just naive to think that it'll take less than 30% of the
processor to decode mp3?

Honestly, it's pretty impressive that the 206mhz strongarm bests the 333mhz
pentium at integer performance.

I'll tell you one thing for certain though: I'll never listen to this song
again!

-c

[Christopher Mason <cmason.a.t.cmu.edu> http://ash.rem.cmu.edu/ ]
["Don't you see?! We're actors--we're the opposite of people!" -Stoppard]
Received on Sun Sep 24 19:49:38 2000

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:42 EDT