Subject: RE: Floating point performance

From: "Ulrich Eckhardt" <[email-masked]>
Date: Thu, 29 Sep 2005 09:08:47 +0200

(Sorry if this mail is garbled, I'm forced to use a sub-par client)

Matej Kupljen wrote:
> I've built soft float toolchain (with crosstool) and then build
> MPlayer with it. The performance is very low. I cannot even play the
> mp3 file with MPlayer on DBAU1200 with 400MHz CPU!
[...]
> Any other suggestions?

I'm not sure what you are doing, but if you only want to play music, I'd use Ogg Vorbis instead, which has a decoder that only uses integer arithmetic for exactly the case of FPU-less machines and the Au1200. I could also imagine an MP3 decoder written for integer only being written somewhere, but I don't know anything about it.

Uli

---

From: Matej Kupljen <[email-masked]>
Date: Thu, 29 Sep 2005 13:16:40 +0200

Hi

> I'm not sure what you are doing, but if you only want to play music, 
> I'd use Ogg Vorbis instead, which has a decoder that only uses integer 
> arithmetic for exactly the case of FPU-less machines and the Au1200. 
> I could also imagine an MP3 decoder written for integer only being 
> written somewhere, but I don't know anything about it.

Yes, I can use madplay (libmad) for music only, which uses int
arithmetics (also special version for MIPS).

But I also want to play video and currently I am testing this with
MPlayer (maybe I'll add support for MAE, sometime in the future).
Then I found out, that MPlayer can use libmad for MP3 and it
works great know.

Now I'll try to write XV driver for MAE backend so I'll have
HW accelerated Color Space Conversion (form YV12->RGB) and
Scaling. 

I thought that SF *should* be relatively fast, because I have
experience with it on ARM, where Nicolas Pitre wrote amazing 
SF support for the glibc.
How can we speed-up SF on MIPS? 
Does anybody have some suggestions?

BR,
Matej

---

From: Greg Weeks <[email-masked]>
Date: Thu, 29 Sep 2005 07:31:26 -0400

>I'm not sure what you are doing, but if you only want to play music, I'd use Ogg Vorbis instead, which has a decoder that only uses integer arithmetic for exactly the case of FPU-less machines and t…
mpg123 had a version of the libs for OS-9 that used integer ops only. It 
was in contributions and not the mainline and I don't know how difficult 
it would be to get it running on Linux. It's a dead project now anyway.

Greg Weeks

---

From: Nigel Stephens <[email-masked]>
Date: Thu, 29 Sep 2005 12:36:10 +0100

>Does anybody have some suggestions?

Maybe someone should volunteer to port Nicolas's "amazing SF support" 
from ARM to MIPS. Hint hint.

Nigel

---

From: Matej Kupljen <[email-masked]>
Date: Thu, 29 Sep 2005 13:44:49 +0200

Hi

> from ARM to MIPS. Hint hint.

It is very ARM specific, so I don't know if it would be possible.
I'll look into it, when I find the time.

BR,
Matej

---

From: Matej Kupljen <[email-masked]>
Date: Thu, 29 Sep 2005 13:49:20 +0200

Hi

> from ARM to MIPS. Hint hint.

Take a look at those benchmarks:
http://lists.arm.linux.org.uk/pipermail/linux-arm/2004-March/007214.html
http://lists.arm.linux.org.uk/pipermail/linux-arm/2004-March/007223.html

BR,
Matej

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 29 Sep 2005 09:31:25 -0400

> from ARM to MIPS. Hint hint.

Unless you've got a spare ASE lying around with conditional execution
and a barrel shifter, I don't think this is in the cards.

Which isn't to say that someone couldn't write a good MIPS-specific
implementation, if they were a sufficiently good FP guru.  But
my feeling is that ARM is more prone than MIPS to clever tricks that
are hard for a compiler to generate.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: David Daney <[email-masked]>
Date: Thu, 29 Sep 2005 08:39:18 -0700

> Then I found out, that MPlayer can use libmad for MP3 and it

We are using libmad and can play 128kbps MP3s on a mips 300MHz 4kc code 
with about 10-15% CPU utilization.

However I think anything but very low resolution low frame rate video is 
out of the question.  You need several orders of magnitude more 
processing power to make it work.  All of the MIPS based video systems 
that I am aware of (TiVo, Sony and Samsung HDTVs etc.) have dedicated 
hardware video decoders.  There are people talking about doing the 
decoding purely in software, but they would be using something with the 
processing power of a 2GHz Pentium4 with special DSP extensions.  As far 
as I know these are just paper designs and are not yet in production.

I guess what I am trying to say is that even if you could make the soft 
float library four times faster, you would still be no where close to 
being able to decode video.

I declare it impossible, but encourage you to prove me wrong.

David Daney.

---

From: "Dominik 'Rathann' Mierzejewski" <[email-masked]>
Date: Fri, 30 Sep 2005 13:48:16 +0200

> HW accelerated Color Space Conversion (form YV12->RGB) and

If you're interested in video playback using MPlayer, you may
want to port the assembly parts of its code to MIPS. We (MPlayer
developers) would be grateful if you could contribute your code
back to MPlayer. I'm sure that you can get assistance from our
coders if you have any problems and questions about the code.

Regards,
R.

-- 
Dominik 'Rathann' Mierzejewski <rathann*at*icm.edu.pl>
Interdisciplinary Centre for Mathematical and Computational Modelling
Warsaw University  |  http://www.icm.edu.pl  |  tel. +48 (22) 5540810