* Floating point performance
@ 2005-09-27 8:17 Matej Kupljen
2005-09-27 8:42 ` Jerry
0 siblings, 1 reply; 12+ messages in thread
From: Matej Kupljen @ 2005-09-27 8:17 UTC (permalink / raw)
To: linux-mips
Hi
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!
I used
GCC: 3.3.5
GLIBC: 2.3.5
BINUTILS: 2.16.1
I did some profiling and this is what I get:
-----------------------------------------------------------------------------------
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
18.09 44.70 44.70 __pack_f
17.30 87.44 42.74 _fpadd_parts
15.82 126.54 39.10 __mulsf3
15.28 164.31 37.77 __unpack_f
6.49 180.36 16.05 _fpadd_parts
5.30 193.45 13.09 17424 0.00 0.00 dct64_1
4.75 205.18 11.73 __subsf3
4.04 215.16 9.98 __addsf3
3.68 224.26 9.10 17424 0.00 0.00 synth_1to1
1.90 228.96 4.70 __pack_d
1.20 231.92 2.96 __unpack_d
1.17 234.80 2.88 __muldf3
-----------------------------------------------------------------------------------
As it seems, all the time is spent in the FP routines.
I decided to use SF toolchain, because they should be faster
then FPU emulator (at least it is on ARM), but did no test
this with emulator.
Does anybody use MPlayer on MIPS?
What performance do you get?
Any other suggestions?
BR,
Matej
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-27 8:17 Matej Kupljen
@ 2005-09-27 8:42 ` Jerry
0 siblings, 0 replies; 12+ messages in thread
From: Jerry @ 2005-09-27 8:42 UTC (permalink / raw)
To: Matej Kupljen; +Cc: linux-mips
>[In reply to "Floating point performance" from Matej Kupljen <matej.kupljen@ultra.si> to linux-mips@linux-mips.org <linux-mips@linux-mips.org> 27.09.2005 11:17]
> Hi
> I've built soft float toolchain (with crosstool) and then build
> MPlayer with it. The performance is very low. I cannot even
> As it seems, all the time is spent in the FP routines.
> I decided to use SF toolchain, because they should be faster
> then FPU emulator (at least it is on ARM), but did no test
> this with emulator.
Decoding of mp3 (and/or other media) with FP routines is extremely
slow on systems w/o fp processor. No matter is it "soft-float" or
"kernel-trap emulator". Both cases it is the emulator.(but SF is a
litthe faster because it has no "trap" overhead).
> Does anybody use MPlayer on MIPS?
> What performance do you get?
I used mplayed with libmad (libmad uses only integer ops to decode
mp3). It consumes about 10-15% of cpu time (au1200) to play mp3 file.
()_()
-( ^,^ )- -[21398845]- -<The Bat! 3.51.10>- -<27.09.2005 11:33>-
(") (")
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Floating point performance
@ 2005-09-29 7:08 Ulrich Eckhardt
2005-09-29 7:08 ` Ulrich Eckhardt
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Ulrich Eckhardt @ 2005-09-29 7:08 UTC (permalink / raw)
To: linux-mips
(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
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Floating point performance
2005-09-29 7:08 Floating point performance Ulrich Eckhardt
@ 2005-09-29 7:08 ` Ulrich Eckhardt
2005-09-29 11:16 ` Matej Kupljen
2005-09-29 11:31 ` Greg Weeks
2 siblings, 0 replies; 12+ messages in thread
From: Ulrich Eckhardt @ 2005-09-29 7:08 UTC (permalink / raw)
To: linux-mips
(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
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Floating point performance
2005-09-29 7:08 Floating point performance Ulrich Eckhardt
2005-09-29 7:08 ` Ulrich Eckhardt
@ 2005-09-29 11:16 ` Matej Kupljen
2005-09-29 11:36 ` Nigel Stephens
` (2 more replies)
2005-09-29 11:31 ` Greg Weeks
2 siblings, 3 replies; 12+ messages in thread
From: Matej Kupljen @ 2005-09-29 11:16 UTC (permalink / raw)
To: Ulrich Eckhardt; +Cc: linux-mips
Hi
> > 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 7:08 Floating point performance Ulrich Eckhardt
2005-09-29 7:08 ` Ulrich Eckhardt
2005-09-29 11:16 ` Matej Kupljen
@ 2005-09-29 11:31 ` Greg Weeks
2 siblings, 0 replies; 12+ messages in thread
From: Greg Weeks @ 2005-09-29 11:31 UTC (permalink / raw)
To: linux-mips
Ulrich Eckhardt wrote:
>(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.
>
>
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 11:16 ` Matej Kupljen
@ 2005-09-29 11:36 ` Nigel Stephens
2005-09-29 11:44 ` Matej Kupljen
` (2 more replies)
2005-09-29 15:39 ` David Daney
2005-09-30 11:48 ` Dominik 'Rathann' Mierzejewski
2 siblings, 3 replies; 12+ messages in thread
From: Nigel Stephens @ 2005-09-29 11:36 UTC (permalink / raw)
To: Matej Kupljen; +Cc: Ulrich Eckhardt, linux-mips
Matej Kupljen wrote:
>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?
>
>
Maybe someone should volunteer to port Nicolas's "amazing SF support"
from ARM to MIPS. Hint hint.
Nigel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 11:36 ` Nigel Stephens
@ 2005-09-29 11:44 ` Matej Kupljen
2005-09-29 11:49 ` Matej Kupljen
2005-09-29 13:31 ` Daniel Jacobowitz
2 siblings, 0 replies; 12+ messages in thread
From: Matej Kupljen @ 2005-09-29 11:44 UTC (permalink / raw)
To: Nigel Stephens; +Cc: Ulrich Eckhardt, linux-mips
Hi
> Maybe someone should volunteer to port Nicolas's "amazing SF support"
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 11:36 ` Nigel Stephens
2005-09-29 11:44 ` Matej Kupljen
@ 2005-09-29 11:49 ` Matej Kupljen
2005-09-29 13:31 ` Daniel Jacobowitz
2 siblings, 0 replies; 12+ messages in thread
From: Matej Kupljen @ 2005-09-29 11:49 UTC (permalink / raw)
To: Nigel Stephens; +Cc: Ulrich Eckhardt, linux-mips
Hi
> Maybe someone should volunteer to port Nicolas's "amazing SF support"
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 11:36 ` Nigel Stephens
2005-09-29 11:44 ` Matej Kupljen
2005-09-29 11:49 ` Matej Kupljen
@ 2005-09-29 13:31 ` Daniel Jacobowitz
2 siblings, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2005-09-29 13:31 UTC (permalink / raw)
To: Nigel Stephens; +Cc: Matej Kupljen, Ulrich Eckhardt, linux-mips
On Thu, Sep 29, 2005 at 12:36:10PM +0100, Nigel Stephens wrote:
>
>
> Matej Kupljen wrote:
>
> >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?
> >
> >
>
> Maybe someone should volunteer to port Nicolas's "amazing SF support"
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 11:16 ` Matej Kupljen
2005-09-29 11:36 ` Nigel Stephens
@ 2005-09-29 15:39 ` David Daney
2005-09-30 11:48 ` Dominik 'Rathann' Mierzejewski
2 siblings, 0 replies; 12+ messages in thread
From: David Daney @ 2005-09-29 15:39 UTC (permalink / raw)
To: Matej Kupljen; +Cc: Ulrich Eckhardt, linux-mips
Matej Kupljen wrote:
> Hi
>
>
>>>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.
>
>
> 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.
>
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Floating point performance
2005-09-29 11:16 ` Matej Kupljen
2005-09-29 11:36 ` Nigel Stephens
2005-09-29 15:39 ` David Daney
@ 2005-09-30 11:48 ` Dominik 'Rathann' Mierzejewski
2 siblings, 0 replies; 12+ messages in thread
From: Dominik 'Rathann' Mierzejewski @ 2005-09-30 11:48 UTC (permalink / raw)
To: linux-mips
On Thu, Sep 29, 2005 at 01:16:40PM +0200, Matej Kupljen wrote:
> Hi
>
> > > 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.
>
> 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-09-30 11:48 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-29 7:08 Floating point performance Ulrich Eckhardt
2005-09-29 7:08 ` Ulrich Eckhardt
2005-09-29 11:16 ` Matej Kupljen
2005-09-29 11:36 ` Nigel Stephens
2005-09-29 11:44 ` Matej Kupljen
2005-09-29 11:49 ` Matej Kupljen
2005-09-29 13:31 ` Daniel Jacobowitz
2005-09-29 15:39 ` David Daney
2005-09-30 11:48 ` Dominik 'Rathann' Mierzejewski
2005-09-29 11:31 ` Greg Weeks
-- strict thread matches above, loose matches on Subject: below --
2005-09-27 8:17 Matej Kupljen
2005-09-27 8:42 ` Jerry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox