Help - Search - Members - Calendar
Full Version: aoTuV beta 5 packages for Ubuntu 7.10 (gutsy)
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - General
rsilva
Following the suggestion in a link from Yota post, I have patched Ubuntu 7.10 (gutsy) source for vorbis with aoTuV beta 5.

To make the life of Ubuntu users easy I am making my packages available in my PPA. To use it just
add

deb http://ppa.launchpad.net/pjssilva/ubuntu gutsy main

to the /etc/apt/sources.list file. If you want the source, add

deb-src http://ppa.launchpad.net/pjssilva/ubuntu gutsy main

After that you may do a "apt-get update; apt-get upgrade" or just wait for the automatic
update manager to kick in.

Feel free to use it and, please, let me know if you find any problem.

By the way, Ubuntu libvorbis file is based on libvorbis 1.2.0, while the aoTuV patch was created againt 1.1.2. Hence, the original patch did not apply cleanly to the source (some line offsets and a trivial failure). It required some simple manual intervention. Is there an easy way to compare the a file encoded by my package with the result of static compile available at the wiki? I would like to make sure I didn't commit some stupid mistake. To test it, I have just compared the average bit-rate of my package and the static binary from the wiki and they are basically equal (as much as one can expect from floating point implementations). Is this enough?
Aoyumi
QUOTE(rsilva @ Dec 27 2007, 09:50) *

By the way, Ubuntu libvorbis file is based on libvorbis 1.2.0, while the aoTuV patch was created againt 1.1.2. Hence, the original patch did not apply cleanly to the source (some line offsets and a trivial failure). It required some simple manual intervention. Is there an easy way to compare the a file encoded by my package with the result of static compile available at the wiki? I would like to make sure I didn't commit some stupid mistake. To test it, I have just compared the average bit-rate of my package and the static binary from the wiki and they are basically equal (as much as one can expect from floating point implementations). Is this enough?

You should perform the comparison of the encoding result after decoding ogg file. The difference of libvorbis 1.1.2 and 1.2.0 emerges to only in low sampling frequency. For example, in the source of 44.1kHz, the result of the comparison mentioned above accords.
rsilva
QUOTE(Aoyumi @ Jan 5 2008, 01:27) *

You should perform the comparison of the encoding result after decoding ogg file. The difference of libvorbis 1.1.2 and 1.2.0 emerges to only in low sampling frequency. For example, in the source of 44.1kHz, the result of the comparison mentioned above accords.


I am not sure a completely understood your post (sorry for my English). Do you mean that the wavs I obtain from the encoded ogg should be exactly the same if the original source is 44.1kHz (like a CD)?

If this is the case I don't get that. I tried to compare the wavs using EAC "compare wav tool" and they are not the same (even though the difference is minimal, less than 0.3s of difference in a 10s sample).

Is there any better tool to do this comparison?

However, why should one expect the wavs to be the same if both come from floating point codes compiled from different compilers, possibly different optimization options, and with a slightly different source (that may result in different paths of execution, and in floating point code even the slightest difference can result in slightly different results)?

Am I missing something here?

Aoyumi
QUOTE
I am not sure a completely understood your post (sorry for my English). Do you mean that the wavs I obtain from the encoded ogg should be exactly the same if the original source is 44.1kHz (like a CD)?
Yes, the 2 produce the totally same result in my environment.

QUOTE
If this is the case I don't get that. I tried to compare the wavs
using EAC "compare wav tool" and they are not the same (even though the difference is minimal, less than 0.3s of difference in a 10s sample).

Is there any better tool to do this comparison?
I use the Japanese CRC32 calculation / comparison tool.

Example (1.1.2 <=> 1.2.0)
CODE
* : source_16k_-1.wav
* : source_16k_0.wav
x : source_16k_1.wav
x : source_16k_10.wav
x : source_16k_2.wav
x : source_16k_3.wav
x : source_16k_4.wav
x : source_16k_5.wav
x : source_16k_6.wav
x : source_16k_7.wav
x : source_16k_8.wav
x : source_16k_9.wav
* : source_2.wav
* : source_22k-mono_-1.wav
* : source_22k-mono_0.wav
* : source_22k-mono_1.wav
* : source_22k-mono_10.wav
* : source_22k-mono_2.wav
* : source_22k-mono_3.wav
* : source_22k-mono_4.wav
* : source_22k-mono_5.wav
* : source_22k-mono_6.wav
* : source_22k-mono_7.wav
* : source_22k-mono_8.wav
* : source_22k-mono_9.wav
* : source_22k_-1.wav
* : source_22k_0.wav
x : source_22k_1.wav
x : source_22k_10.wav
x : source_22k_2.wav
x : source_22k_3.wav
x : source_22k_4.wav
x : source_22k_5.wav
x : source_22k_6.wav
x : source_22k_7.wav
x : source_22k_8.wav
x : source_22k_9.wav
* : source_3.wav
* : source_32k-mono_-1.wav
* : source_32k-mono_0.wav
* : source_32k-mono_1.wav
* : source_32k-mono_10.wav
* : source_32k-mono_2.wav
* : source_32k-mono_3.wav
* : source_32k-mono_4.wav
* : source_32k-mono_5.wav
* : source_32k-mono_6.wav
* : source_32k-mono_7.wav
* : source_32k-mono_8.wav
* : source_32k-mono_9.wav

*:OK x:NG


QUOTE
However, why should one expect the wavs to be the same if both come from floating point codes compiled from different compilers, possibly different optimization options, and with a slightly different source (that may result in different paths of execution, and in floating point code even the slightest difference can result in slightly different results)?

You must not use a different compiler. Two binaries use the same compiler on the same environment and must compile it with the same option. wink.gif
rsilva
QUOTE(Aoyumi @ Jan 8 2008, 06:29) *

QUOTE
I am not sure a completely understood your post (sorry for my English). Do you mean that the wavs I obtain from the encoded ogg should be exactly the same if the original source is 44.1kHz (like a CD)?
Yes, the 2 produce the totally same result in my environment.


I have compiled libvorbis 1.1.2 and 1.2.0 (pristine, without the beta5 patch). I followed the directions from the wiki for compiling and using a local version of the libraries.

Then, I encoded a music ripped from a cd (that should be 44.1kHz). The enconded files are still not equal (they have slightly difference bitrates). The decoded wavs are not equal either. Once again, if you compare the wavs, only a few frames are different, less than 2% of the total.

Is there any option I should pass to the oggenc command?

huh.gif
Aoyumi
QUOTE(rsilva @ Jan 11 2008, 09:38) *

I have compiled libvorbis 1.1.2 and 1.2.0 (pristine, without the beta5 patch). I followed the directions from the wiki for compiling and using a local version of the libraries.

Then, I encoded a music ripped from a cd (that should be 44.1kHz). The enconded files are still not equal (they have slightly difference bitrates). The decoded wavs are not equal either. Once again, if you compare the wavs, only a few frames are different, less than 2% of the total.

Is there any option I should pass to the oggenc command?

huh.gif
I compile them with mingw+msys(gcc3.4.5). And I use oggenc for encoding.

For example,
CODE
oggenc -q0 "source.wav" -o "source_0.ogg"

Information of 1.1.2 -q0/44.1kHz.
CODE
>>General Info:<-----------------------------------------------------
Channel:   2 Ch         Sample : 354557 Samples
Rate   :  44100 Hz      Length : 8.04 Sec.
Average bitrate (vorbis)       : 67.573 (66.559) kbps
Nominal bitrate (upper/lower)  : 64.000 (0.000 / 0.000) kbps
Made by "Xiph.Org libVorbis I 20050304"
0 user-comment included.
>>Stream Info:<------------------------------------------------------
Ogg:    total pages/bytes      : [           18 /         67910]
Vorbis: total packes/bytes     : [          520 /         66890]
          header packes/bytes   : [            3 /          3838]
          stream packes/bytes   : [          517 /         63052]
          average stream bitrate: 62.740kbps
>>Vorbis block Info:<------------------------------------------------
LONG (2048) [          322] blocks > num./time%[ 62.28% /  92.96%]
SHORT( 256) [          195] blocks > num./time%[ 37.72% /   7.04%]
       total [          517] blocks

Information of 1.2.0. -q0/44.1kHz.
CODE
>>General Info:<-----------------------------------------------------
Channel:   2 Ch         Sample : 354557 Samples
Rate   :  44100 Hz      Length : 8.04 Sec.
Average bitrate (vorbis)       : 67.573 (66.559) kbps
Nominal bitrate (upper/lower)  : 64.000 (0.000 / 0.000) kbps
Made by "Xiph.Org libVorbis I 20070622"
0 user-comment included.
>>Stream Info:<------------------------------------------------------
Ogg:    total pages/bytes      : [           18 /         67910]
Vorbis: total packes/bytes     : [          520 /         66890]
          header packes/bytes   : [            3 /          3838]
          stream packes/bytes   : [          517 /         63052]
          average stream bitrate: 62.740kbps
>>Vorbis block Info:<------------------------------------------------
LONG (2048) [          322] blocks > num./time%[ 62.28% /  92.96%]
SHORT( 256) [          195] blocks > num./time%[ 37.72% /   7.04%]
       total [          517] blocks
rsilva
QUOTE(Aoyumi @ Jan 11 2008, 06:01) *

I compile them with mingw+msys(gcc3.4.5). And I use oggenc for encoding.


Bingo! laugh.gif

The compiler is the "problem". I was using gcc-4.1.3 to compile the libraries (I tried with and without -fno-strict-aliasing). With gcc-4.1.3 the wavs generated by libvorbis-1.1.2 and libvorbis-1.2.0 are not the same. I went with gcc-4.1 for compilation because this is the default compiler in Ubuntu (and it is used to compile libvorbis in Gutsy, the newest Ubuntu version).

If I compile the same libraries with gcc-3.4.6 the wavs are identical!

I have only tested the result with the pristine libvorbis sources, I haven't tried the aoTuV beta 5 patch. I'll try to do this tonight or tomorrow and confirm that my patch against 1.2.0 is indeed correct. I'll post my results here.
xmixahlx
the gcc4 issue is known:
https://trac.xiph.org/ticket/583


later
rsilva
QUOTE(xmixahlx @ Jan 11 2008, 11:39) *

the gcc4 issue is known:
https://trac.xiph.org/ticket/583


later


That bug should not appear if you use -fno-strict-aliasing with gcc-4. The directions on how to compile libvorbis in the wiki already mention that. As I said above, the (little) difference appears with and without this option. I have also tried to add the option -fno-inline-function that is cited in the bug discussion. No change. The wavs still different. So I believe that the problem is not explained by this bug report.

Obs: Maybe this is getting too technical... Should I open a new discussion on "Ogg Vorbis - Tech"?
rsilva
QUOTE(rsilva @ Dec 26 2007, 16:50) *


By the way, Ubuntu libvorbis file is based on libvorbis 1.2.0, while the aoTuV patch was created againt 1.1.2. Hence, the original patch did not apply cleanly to the source (some line offsets and a trivial failure). It required some simple manual intervention. Is there an easy way to compare the a file encoded by my package with the result of static compile available at the wiki? I would like to make sure I didn't commit some stupid mistake. To test it, I have just compared the average bit-rate of my package and the static binary from the wiki and they are basically equal (as much as one can expect from floating point implementations). Is this enough?


I have just confirmed that if I compile my package with gcc-3.4 (see the discussion following Aoyumi reply to see why gcc-3.4 is needed) then it generates exactly the same output as the original aoTuV beta 5 compiled with the same compiler. I have confirmed that by encoding a music to vorbis and then decoding to wav. The wav files generated are exactly the same.

I can only conclude that my port of the aoTuV beta 5 patch to the Ubuntu version of libvorbis 1.2.0 is OK.

Feel free to use my package.
alter4
rsilva, can you make packages for aotuv beta 5.5?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.