Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

Ogg Vorbis and the N800

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


krischan.keitsch at alumni

Jan 28, 2007, 11:45 PM

Post #1 of 11 (7750 views)
Permalink
Ogg Vorbis and the N800

Hi

as far as I can tell the n800 with the OMAP2420 processor has a vfp (vector
floating point unit; see [1] ) Based on this I wanted to find out if vorbis
could take advantage of this unit by default.

To make it short: Yes it works - BUT it is just painful!

What I did:
1) Set up scratchbox for bora --> excellent install script! Thanks! :-)
2) downloaded the sources for libao, libogg, libvorbis from [2]
3) downloaded gst-plugins-base-0-10.9 from [3]
4) compiled on SDK_ARMEL target
5) copied the libs to the n800
6) called gst-inspect:
------------snip-------------
Nokia-N800-51:~# gst-inspect vorbis
Plugin Details:
Name: vorbis
Description: Vorbis plugin library
Filename: /usr/lib/gstreamer-0.10/libgstvorbis.so
Version: 0.10.9
License: LGPL
Source module: gst-plugins-base
Binary package: GStreamer Base Plug-ins source release
Origin URL: Unknown package origin

vorbisparse: VorbisParse
vorbisdec: Vorbis audio decoder
vorbisenc: Vorbis audio encoder

3 features:
+-- 3 elements

Nokia-N800-51:~# gst-inspect ogg
Plugin Details:
Name: ogg
Description: ogg stream manipulation (info about ogg:
http://xiph.org)
Filename: /usr/lib/gstreamer-0.10/libgstogg.so
Version: 0.10.9
License: LGPL
Source module: gst-plugins-base
Binary package: GStreamer Base Plug-ins source release
Origin URL: Unknown package origin

oggparse: Ogg parser
ogmtextparse: OGM text stream parser
ogmvideoparse: OGM video stream parser
ogmaudioparse: OGM audio stream parser
oggmux: Ogg muxer
oggdemux: Ogg demuxer

6 features:
+-- 6 elements
------------snap-------------
7) ran gst-launch-0.10 filesrc location=opensource.ogg ! oggdemux !
vorbisdec ! audioconvert ! dsppcmsink

8) listen to ogg vorbis :-)

Conclusion:
It works but the cpu load is high. Vorbis decoding takes almost 80% cpu. I
also tried MPlayer 1.0rc1-maemo.8 which has the integer based Tremor decoder
codec [4] nicely integrated. Tremor needs around 12% cpu for the same ogg
file. (That is an expected scale up from the 770 experience - tremor takes
around 20% cpu on the 770 - due to the faster cpu of the n800)

It exceeds my skills to analyze this much further. However it seems that the
vorbis decoder is not vfp optimized ;-) [yet?].

Hm, and now?
Maybe someone who is more skilled than me could verify my results.
It all boils down to the dsp! The dsp on the 770 and the n800 is the same. So,
a once implemented plugin could support both platforms (770 and n800).

--> We need a dsp based vorbis decoder!
[I know: demanding is easy - implementing rather not ;-) ]

As we wait for Nokia to release more codecs we can try to use the Tremor based
plugins for the audioplayer [5] (great work!).

Any feedback is wellcome.

Regards Krischan

[1] http://en.wikipedia.org/wiki/ARM_architecture#VFP
[2] http://svn.xiph.org/trunk/
[3] http://gstreamer.freedesktop.org/src/
[4] http://svn.xiph.org/trunk/Tremor/
[5] https://garage.maemo.org/projects/mogg/
--
Krischan Keitsch
jabber: krischan_keitsch [at] jabber


kalle.vahlman at gmail

Jan 29, 2007, 12:08 AM

Post #2 of 11 (7572 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

2007/1/29, Krischan Keitsch <krischan.keitsch [at] alumni>:
> Hi
>
> as far as I can tell the n800 with the OMAP2420 processor has a vfp (vector
> floating point unit; see [1] ) Based on this I wanted to find out if vorbis
> could take advantage of this unit by default.
>
> To make it short: Yes it works - BUT it is just painful!
[...]
> Conclusion:
> It works but the cpu load is high. Vorbis decoding takes almost 80% cpu. I
> also tried MPlayer 1.0rc1-maemo.8 which has the integer based Tremor decoder
> codec [4] nicely integrated. Tremor needs around 12% cpu for the same ogg
> file. (That is an expected scale up from the 770 experience - tremor takes
> around 20% cpu on the 770 - due to the faster cpu of the n800)
>
> It exceeds my skills to analyze this much further. However it seems that the
> vorbis decoder is not vfp optimized ;-) [yet?].

Did you specify any compiler flags or just compile as-is?

I'm not 100% sure but I've let myself belive (based on comments on the
IRC channel) that it won't compile with vfp unless you specify
"-mfpu=vfp -mfloat-abi=softfp" for the compiler. Also based on the
chatting on #maemo, "-mcpu=arm1136j-s" might be worth it.

--
Kalle Vahlman, zuh [at] iki
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://maemo.org/mailman/listinfo/maemo-developers


S.G.Pickering at bath

Jan 29, 2007, 2:40 AM

Post #3 of 11 (7580 views)
Permalink
RE: Ogg Vorbis and the N800 [In reply to]

> > Conclusion:
> > It works but the cpu load is high. Vorbis decoding takes almost 80%
> > cpu. I also tried MPlayer 1.0rc1-maemo.8 which has the integer based
> > Tremor decoder codec [4] nicely integrated. Tremor needs around 12%
> > cpu for the same ogg file. (That is an expected scale up from the 770
> > experience - tremor takes around 20% cpu on the 770 - due to the
> > faster cpu of the n800)
> >
> > It exceeds my skills to analyze this much further. However it seems
> > that the vorbis decoder is not vfp optimized ;-) [yet?].
>
> Did you specify any compiler flags or just compile as-is?
>
> I'm not 100% sure but I've let myself belive (based on
> comments on the IRC channel) that it won't compile with vfp
> unless you specify "-mfpu=vfp -mfloat-abi=softfp" for the
> compiler. Also based on the chatting on #maemo,
> "-mcpu=arm1136j-s" might be worth it.

Those were my comments and yes, simply specifying "-mfpu=vfp" produced
soft-float code rather than the expected hard-float.

I guess I should also take this opportunity to note that libm on the N800
appears to not use hard-float either (thanks jacques on irc for bringing
this up). Or at least it's very very slow. This will cause some significant
slowdown on the variety of functions it provides.

Cheers,


Simon



_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://maemo.org/mailman/listinfo/maemo-developers


kalle.vahlman at gmail

Jan 29, 2007, 2:48 AM

Post #4 of 11 (7577 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

2007/1/29, Simon Pickering <S.G.Pickering [at] bath>:
> > > Conclusion:
> > > It works but the cpu load is high. Vorbis decoding takes almost 80%
> > > cpu. I also tried MPlayer 1.0rc1-maemo.8 which has the integer based
> > > Tremor decoder codec [4] nicely integrated. Tremor needs around 12%
> > > cpu for the same ogg file. (That is an expected scale up from the 770
> > > experience - tremor takes around 20% cpu on the 770 - due to the
> > > faster cpu of the n800)
> > >
> > > It exceeds my skills to analyze this much further. However it seems
> > > that the vorbis decoder is not vfp optimized ;-) [yet?].
> >
> > Did you specify any compiler flags or just compile as-is?
> >
> > I'm not 100% sure but I've let myself belive (based on
> > comments on the IRC channel) that it won't compile with vfp
> > unless you specify "-mfpu=vfp -mfloat-abi=softfp" for the
> > compiler. Also based on the chatting on #maemo,
> > "-mcpu=arm1136j-s" might be worth it.
>
> Those were my comments and yes, simply specifying "-mfpu=vfp" produced
> soft-float code rather than the expected hard-float.
>
> I guess I should also take this opportunity to note that libm on the N800
> appears to not use hard-float either (thanks jacques on irc for bringing
> this up). Or at least it's very very slow. This will cause some significant
> slowdown on the variety of functions it provides.

Now that we're on the topic, let's bring this bit into the conversation too:

http://marc2.theaimsgroup.com/?l=qemu-devel&m=114364317919922&w=2

So if you use the "-mcpu=arm1136j-s", you'll likely need sbrsh as the
CPU transparency since QEMU won't handle the produced binaries. I
tried to build glib for example and the docs failed since it compiles
a tool and runs it in the genrating process.

After setting sbrsh up with my N800, it was all peachy (haven't got
time to produce numbers on how peachy it'll be, but I'm working on it
;).

--
Kalle Vahlman, zuh [at] iki
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://maemo.org/mailman/listinfo/maemo-developers


kalle.vahlman at gmail

Jan 30, 2007, 12:34 PM

Post #5 of 11 (7557 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

2007/1/30, Krischan Keitsch <krishan.keitsch [at] alumni>:
> Am Montag, 29. Januar 2007 09:08 schrieb Kalle Vahlman:
> > 2007/1/29, Krischan Keitsch <krischan.keitsch [at] alumni>:
> > > Hi
> > >
> > > as far as I can tell the n800 with the OMAP2420 processor has a vfp
> > > (vector floating point unit; see [1] ) Based on this I wanted to find out
> > > if vorbis could take advantage of this unit by default.
> > >
> > > To make it short: Yes it works - BUT it is just painful!
> >
> > [...]
> >
> > > Conclusion:
> > > It works but the cpu load is high. Vorbis decoding takes almost 80% cpu.
> > > I also tried MPlayer 1.0rc1-maemo.8 which has the integer based Tremor
> > > decoder codec [4] nicely integrated. Tremor needs around 12% cpu for the
> > > same ogg file. (That is an expected scale up from the 770 experience -
> > > tremor takes around 20% cpu on the 770 - due to the faster cpu of the
> > > n800)
> > >
> > > It exceeds my skills to analyze this much further. However it seems that
> > > the vorbis decoder is not vfp optimized ;-) [yet?].
> >
> > Did you specify any compiler flags or just compile as-is?
> >
> > I'm not 100% sure but I've let myself belive (based on comments on the
> > IRC channel) that it won't compile with vfp unless you specify
> > "-mfpu=vfp -mfloat-abi=softfp" for the compiler. Also based on the
> > chatting on #maemo, "-mcpu=arm1136j-s" might be worth it.
>
> I tried again with the flags
> mfpu=vfp mfp=vfp mcpu=arm1136j-s
> (mfloat-abi=... didn't work)
>
> (I passed the flags to the configure script. Is that the correct way to do
> it?)

No, they should be set to the CFLAGS environment variable (for example):

export CFLAGS='-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136j-s'

and after that run configure and recompile (remember to 'make
clean'!). You should see them in the lines that begin with 'gcc' if
the configure script picked them up properly.

> --> No success! It compiled fine but cpu was above 80% and playback got
> interruppted quite often. :-(

That sounds strange, if you pass those to the configure script it
should just silently ignore them...

--
Kalle Vahlman, zuh [at] iki
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://maemo.org/mailman/listinfo/maemo-developers


S.G.Pickering at bath

Jan 30, 2007, 3:56 PM

Post #6 of 11 (7553 views)
Permalink
RE: Ogg Vorbis and the N800 [In reply to]

> > Hi
> >
> > as far as I can tell the n800 with the OMAP2420 processor has a vfp
> > (vector floating point unit; see [1] ) Based on this I wanted to find
> > out if vorbis could take advantage of this unit by default.
> >
> > To make it short: Yes it works - BUT it is just painful!
> [...]
> > Conclusion:
> > It works but the cpu load is high. Vorbis decoding takes almost 80%
> > cpu. I also tried MPlayer 1.0rc1-maemo.8 which has the integer based
> > Tremor decoder codec [4] nicely integrated. Tremor needs around 12%
> > cpu for the same ogg file. (That is an expected scale up from the 770
> > experience - tremor takes around 20% cpu on the 770 - due to the
> > faster cpu of the n800)
> >
> > It exceeds my skills to analyze this much further. However it seems
> > that the vorbis decoder is not vfp optimized ;-) [yet?].
>
> Did you specify any compiler flags or just compile as-is?
>
> I'm not 100% sure but I've let myself belive (based on
> comments on the IRC channel) that it won't compile with vfp
> unless you specify "-mfpu=vfp -mfloat-abi=softfp" for the
> compiler. Also based on the chatting on #maemo,
> "-mcpu=arm1136j-s" might be worth it.

Just using the "-mfpu=vfp -mfloat-abi=softfp" flags (I couldn't remember the
exact -mcpu setting), produces a gstreamer vorbis plugin with a CPU load of
~30% playing the same file. So better, but still not too good. I wonder why
this is so slow compared with the integer version (does the integer version
produce worse sound?).

Files are here (including the ~12% load tremor gst plugin):
http://people.bath.ac.uk/enpsgp/temp/vorbis-stuff.tar.gz

Put the libgst*.so files in /usr/lib/gstreamer-0.10/ and the others in
/usr/lib/, note that you may not need all of the files in the tarball as
some already exist, namely libao* and libgstvideo4linux.so. Make sure you
symlink the files from *.so.X.x -> *.so.X and again from *.so.X -> *.so

Cheers,


Si

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://maemo.org/mailman/listinfo/maemo-developers


krischan.keitsch at alumni

Feb 6, 2007, 12:29 PM

Post #7 of 11 (7502 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

Am Mittwoch, 31. Januar 2007 schrieb Simon Pickering:
> > > Hi
> > >
> > > as far as I can tell the n800 with the OMAP2420 processor has a vfp
> > > (vector floating point unit; see [1] ) Based on this I wanted to find
> > > out if vorbis could take advantage of this unit by default.
> > >
> > > To make it short: Yes it works - BUT it is just painful!
> >
> > [...]

[...]
> Just using the "-mfpu=vfp -mfloat-abi=softfp" flags (I couldn't remember
> the exact -mcpu setting), produces a gstreamer vorbis plugin with a CPU
> load of ~30% playing the same file. So better, but still not too good.
>

I just wanted to confirm that "-mfpu=vfp -mfloat-abi=softfp" flags for
compiling libvorbis works without any error with cpu load ~25%.
Using the "-mcpu=arm1136j-s" flag ends up in compiling errors.

>I wonder why this is so slow compared with the integer version

Have you had any chance findig out why integer based tremor decoder takes half
the cpu load of the floating point codec?

> (does the integer version produce worse sound?).

I don't know. My ears are not (yet) optimized ;-)

Regards Krischan


jaebird at gmail

Feb 7, 2007, 8:11 PM

Post #8 of 11 (7484 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

On 1/30/07, Simon Pickering <S.G.Pickering [at] bath> wrote:
>
>
> Files are here (including the ~12% load tremor gst plugin):
> http://people.bath.ac.uk/enpsgp/temp/vorbis-stuff.tar.gz
>
> Put the libgst*.so files in /usr/lib/gstreamer-0.10/ and the others in
> /usr/lib/, note that you may not need all of the files in the tarball as
> some already exist, namely libao* and libgstvideo4linux.so. Make sure you
> symlink the files from *.so.X.x -> *.so.X and again from *.so.X -> *.so
>
> Cheers,
>
>
> Si


I did this and installed 'gstreamer0.10-tools' then:
gst-launch filesrc location=test.ogg !tremor ! dsppcmsink

...and voila, my ogg file played.

Then following these instructions (mostly):
http://maemo.org/platform/docs/multimedia/getting_started.html
I was able to get the filemanager to mime them correctly and open up the
media player when double-tapping on ogg files; however, the media player did
NOT play the files...just sat there with an empty "now playing" panel.

Anyone gotten this to work in media player? Also opened Bug 1035 for ogg on
the N800 (which is sorta a dupe of Bug 176 for the 770, but there isn't a
combined option) Hopefully this is something on Nokia's radar (Or at least a
current howto that works :)

Jae


krischan.keitsch at alumni

Feb 7, 2007, 10:36 PM

Post #9 of 11 (7501 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

Am Donnerstag, 8. Februar 2007 schrieb Jae Stutzman:
> On 1/30/07, Simon Pickering <S.G.Pickering [at] bath> wrote:
> > Files are here (including the ~12% load tremor gst plugin):
> > http://people.bath.ac.uk/enpsgp/temp/vorbis-stuff.tar.gz
> >
> > Put the libgst*.so files in /usr/lib/gstreamer-0.10/ and the others in
> > /usr/lib/, note that you may not need all of the files in the tarball as
> > some already exist, namely libao* and libgstvideo4linux.so. Make sure you
> > symlink the files from *.so.X.x -> *.so.X and again from *.so.X -> *.so
> >
> > Cheers,
> >
> >
> > Si
>
> I did this and installed 'gstreamer0.10-tools' then:
> gst-launch filesrc location=test.ogg !tremor ! dsppcmsink
>
> ...and voila, my ogg file played.
>
> Then following these instructions (mostly):
> http://maemo.org/platform/docs/multimedia/getting_started.html
> I was able to get the filemanager to mime them correctly and open up the
> media player when double-tapping on ogg files; however, the media player
> did NOT play the files...just sat there with an empty "now playing" panel.
>
> Anyone gotten this to work in media player? Also opened Bug 1035 for ogg on
> the N800 (which is sorta a dupe of Bug 176 for the 770, but there isn't a
> combined option) Hopefully this is something on Nokia's radar (Or at least
> a current howto that works :)
>
> Jae
Hi Jae,

the people behind mogg [1] build some .dep's for 770. These packages worked
well and integrated nicely into the audio app. They will hopefully soon
release n800 packages? :)

Krischan

[1] https://garage.maemo.org/projects/mogg/


morpheuz at gmail

Feb 8, 2007, 3:27 AM

Post #10 of 11 (7474 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

This ogg files you're playing contain video ? I was just able to play
audio until now...


Best Regards,


MoRpHeUz

On 2/8/07, Krischan Keitsch <krischan.keitsch [at] alumni> wrote:
> Am Donnerstag, 8. Februar 2007 schrieb Jae Stutzman:
> > On 1/30/07, Simon Pickering <S.G.Pickering [at] bath> wrote:
> > > Files are here (including the ~12% load tremor gst plugin):
> > > http://people.bath.ac.uk/enpsgp/temp/vorbis-stuff.tar.gz
> > >
> > > Put the libgst*.so files in /usr/lib/gstreamer-0.10/ and the others in
> > > /usr/lib/, note that you may not need all of the files in the tarball as
> > > some already exist, namely libao* and libgstvideo4linux.so. Make sure you
> > > symlink the files from *.so.X.x -> *.so.X and again from *.so.X -> *.so
> > >
> > > Cheers,
> > >
> > >
> > > Si
> >
> > I did this and installed 'gstreamer0.10-tools' then:
> > gst-launch filesrc location=test.ogg !tremor ! dsppcmsink
> >
> > ...and voila, my ogg file played.
> >
> > Then following these instructions (mostly):
> > http://maemo.org/platform/docs/multimedia/getting_started.html
> > I was able to get the filemanager to mime them correctly and open up the
> > media player when double-tapping on ogg files; however, the media player
> > did NOT play the files...just sat there with an empty "now playing" panel.
> >
> > Anyone gotten this to work in media player? Also opened Bug 1035 for ogg on
> > the N800 (which is sorta a dupe of Bug 176 for the 770, but there isn't a
> > combined option) Hopefully this is something on Nokia's radar (Or at least
> > a current howto that works :)
> >
> > Jae
> Hi Jae,
>
> the people behind mogg [1] build some .dep's for 770. These packages worked
> well and integrated nicely into the audio app. They will hopefully soon
> release n800 packages? :)
>
> Krischan
>
> [1] https://garage.maemo.org/projects/mogg/
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://maemo.org/mailman/listinfo/maemo-developers
>
>
>
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://maemo.org/mailman/listinfo/maemo-developers


jaebird at gmail

Feb 8, 2007, 5:52 AM

Post #11 of 11 (7487 views)
Permalink
Re: Ogg Vorbis and the N800 [In reply to]

On 2/8/07, MoRpHeUz <morpheuz [at] gmail> wrote:
>
> This ogg files you're playing contain video ? I was just able to play
> audio until now...
>
>
> Best Regards,
>
>
> MoRpHeUz
>

My ogg files are audio only. I was able to play them with gst-launch, but
not the built in media player.

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.