IPB

Welcome Guest ( Log In | Register )

Optimized vorbis encoder for Linux (SSE instructions), I have built the binary - any interest ?
The_Sven
post Nov 5 2009, 12:10
Post #1





Group: Members
Posts: 13
Joined: 5-November 09
Member No.: 74643



A quick look around the forum seemed to indicate that no-one has ever attempted to build Vorbis with Lancer optimisations for Linux ?!

So I spent a few hours fiddling and produced an executable:
- Linux
- aoTuV-beta5
- Lancer optimisations for SSE
- 32 bit (x86)
- statically linked
- around 3x faster compared to the standard aoTuV-beta5 build

I did not attempt to port Lancer's SSE2/SSE3 instructions to Linux because the difference between SSE/SSE2/SSE3 is minimal on the PCs I use.
(Intel Celeron M and AMD Turion 64x2)

Any interest? If so, I will post the binary.
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Mr_Rabid_Teddybe...
post Nov 15 2009, 13:49
Post #2





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



I compiled your snapshot vorbis-lancer-gcc-master.tar.gz locally by running ./build-script. The result here are not a static build and seems to have compiled my systems libogg in dynamically:

CODE

~/src/lancer/vorbis-lancer-gcc$ file oggenc
oggenc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped
~/src/lancer/vorbis-lancer-gcc$ ldd oggenc
    linux-gate.so.1 =>  (0xb7fae000)
    libogg.so.0 => /usr/lib/libogg.so.0 (0xb7f63000)
    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f3d000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7ddf000)
    /lib/ld-linux.so.2 (0xb7f94000)
~/src/lancer/vorbis-lancer-gcc$



--------------------
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts
Go to the top of the page
+Quote Post
The_Sven
post Nov 15 2009, 14:43
Post #3





Group: Members
Posts: 13
Joined: 5-November 09
Member No.: 74643



QUOTE (Mr_Rabid_Teddybear @ Nov 15 2009, 12:49) *
I compiled your snapshot vorbis-lancer-gcc-master.tar.gz locally by running ./build-script. The result here are not a static build and seems to have compiled my systems libogg in dynamically:

You're absolutely right: my build script doesn't generate a completely static binary. To do that, I would have to modify the autoconf build script and I don't know how, being a Windows person. I've posted a question about it on LinuxQuestions:
http://www.linuxquestions.org/questions/li...utoconf-769088/

If you want to get a statically linked binary, do the following from the ogg-aoTuVb5-lancer directory (i.e. the root):
1. $ ./build-script (if you haven't done this already)
2. $ cd vorbis-tools-1.2.0/oggenc/
3. $ make clean; make
4. Copy the last gcc line on your console, paste it on your command line and add the -static switch. Execute it.
5. $ cd ..
6. $ make install
7. The binary is now in ogg-aoTuVb5-lancer/out/bin

Any help with fixing this is very welcome!!

This post has been edited by The_Sven: Nov 15 2009, 14:44
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Nov 15 2009, 15:53
Post #4





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (The_Sven @ Nov 15 2009, 06:43) *
If you want to get a statically linked binary, do the following from the ogg-aoTuVb5-lancer directory (i.e. the root):
1. $ ./build-script (if you haven't done this already)
2. $ cd vorbis-tools-1.2.0/oggenc/
3. $ make clean; make
4. Copy the last gcc line on your console, paste it on your command line and add the -static switch. Execute it.
5. $ cd ..
6. $ make install
7. The binary is now in ogg-aoTuVb5-lancer/out/bin


That last gcc line also had a pointer to /usr/lib/libogg.so instead of to ${WORKDIR}/out/lib/libbogg.a which made it fail with:

CODE
/usr/bin/ld: attempted static link of dynamic object `/usr/lib/libogg.so'
collect2: ld returned 1 exit status

Correcting that bit I succeeded in making the build static. smile.gif
Neither I know enough to fix this...

EDIT:
My build fails anyway, somethings wrong with it, trying to encode a file:
QUOTE
$ ./oggenc -q5 Luckie.wav -o Luckie.ogg
Open with wav-module: WAV file reader
Encoding "Luckie.wav" to
"Luckie.ogg"
at quality 5,00
Mode initialisation failed: invalid parameters for quality


Well, well... blink.gif



This post has been edited by Mr_Rabid_Teddybear: Nov 15 2009, 16:16


--------------------
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts
Go to the top of the page
+Quote Post
The_Sven
post Nov 15 2009, 16:35
Post #5





Group: Members
Posts: 13
Joined: 5-November 09
Member No.: 74643



QUOTE (Mr_Rabid_Teddybear @ Nov 15 2009, 14:53) *
Well, well... blink.gif

Does your build machine have libogg, liborbis and libflac installed? Mine doesn't. I suspect that vorbis-tools's makefile prefers installed libraries, and simply ignores the --with-ogg, --with-vorbis switches. I already had to do a work-around for the --with-flac switch, which didn't work.

As an aside: I'm a Windows person, and know very little of the Linux dev world. It's completely baffling to me why *anyone* would use a tool like autoconf/automake. For starters, I haven't yet found a single software developer who understands these tools. Is this really the state-of-the-art in Linux? With Visual Studio, build maintenance consists of a mouse click here and there. Time saved there is time gained for important things, such as code development/debugging/test etc.

The --with-flac switch bug was discussed by its developers on a Xiph.org forum as early as 2007(!!). Are we the only ones struggling with the build system? I doubt it...
Go to the top of the page
+Quote Post

Posts in this topic
- The_Sven   Optimized vorbis encoder for Linux (SSE instructions)   Nov 5 2009, 12:10
- - skamp   Better yet, post your (I assume) cleaned-up source...   Nov 5 2009, 12:19
|- - The_Sven   QUOTE (skamp @ Nov 5 2009, 11:19) Better ...   Nov 5 2009, 12:39
|- - Soap   QUOTE (The_Sven @ Nov 5 2009, 07:39) Is i...   Nov 5 2009, 13:52
|- - skamp   QUOTE (The_Sven @ Nov 5 2009, 12:39) I gu...   Nov 5 2009, 15:46
- - HotshotGG   QUOTE Any interest? If so, I will post the binary....   Nov 5 2009, 14:35
|- - The_Sven   QUOTE (HotshotGG @ Nov 5 2009, 13:35) Yes...   Nov 5 2009, 15:43
- - HotshotGG   QUOTE Do you have rarewares' contact info ? ...   Nov 5 2009, 17:59
- - The_Sven   I put the required patches and modifications under...   Nov 14 2009, 15:04
|- - imre_herceg   Thank you for the binary. It is twice as fast as m...   Nov 14 2009, 17:43
|- - skamp   QUOTE (imre_herceg @ Nov 14 2009, 17:43) ...   Nov 14 2009, 21:13
||- - The_Sven   QUOTE (skamp @ Nov 14 2009, 20:13) Very n...   Nov 14 2009, 22:23
|- - The_Sven   QUOTE (imre_herceg @ Nov 14 2009, 16:43) ...   Nov 15 2009, 00:25
||- - skamp   QUOTE (The_Sven @ Nov 15 2009, 00:25) I w...   Nov 15 2009, 08:49
||- - imre_herceg   QUOTE (The_Sven @ Nov 15 2009, 00:25) FLA...   Nov 15 2009, 11:05
|- - The_Sven   QUOTE (imre_herceg @ Nov 14 2009, 16:43) ...   Nov 15 2009, 12:44
- - Mr_Rabid_Teddybear   I compiled your snapshot vorbis-lancer-gcc-master....   Nov 15 2009, 13:49
|- - The_Sven   QUOTE (Mr_Rabid_Teddybear @ Nov 15 2009, 12...   Nov 15 2009, 14:43
|- - Mr_Rabid_Teddybear   QUOTE (The_Sven @ Nov 15 2009, 06:43) If ...   Nov 15 2009, 15:53
|- - The_Sven   QUOTE (Mr_Rabid_Teddybear @ Nov 15 2009, 14...   Nov 15 2009, 16:35
||- - Mr_Rabid_Teddybear   QUOTE (The_Sven @ Nov 15 2009, 08:35) Doe...   Nov 15 2009, 17:17
||- - [JAZ]   autoconf/automake works in linux x86, linux ARM, U...   Nov 15 2009, 17:18
||- - The_Sven   QUOTE ([JAZ] @ Nov 15 2009, 16:18...   Nov 15 2009, 17:49
||- - [JAZ]   QUOTE (The_Sven @ Nov 15 2009, 17:49) vi ...   Nov 15 2009, 18:45
|- - The_Sven   QUOTE (Mr_Rabid_Teddybear @ Nov 15 2009, 14...   Nov 16 2009, 19:38
- - maacruz   That's great Thank you very much.   Nov 19 2009, 20:32
- - imre_herceg   I was listening to some songs which go into anothe...   Jun 10 2010, 08:20
- - Bregalad   Hi I just tried your build and it works perfectly....   Oct 1 2011, 00:33
- - punkrockdude   Are the latest aoTuV available to compile? Regards...   Sep 2 2012, 23:10


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 3rd September 2014 - 05:15