Opened 18 years ago

Closed 18 years ago

#1690 closed defect (fixed)

libvorbis 1.1.1 compiled by GCC4 fails to produce correct files

Reported by: sknolli@… Owned by: Randy McMurchy
Priority: high Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Files produced with a libvorbis compiled by GCC4 and the standard optimization settings will have a) the wrong (too high) bitrate and b) sound bad. Detailed description at http://trac.xiph.org/cgi-bin/trac.cgi/ticket/583

The problem is fixed upstream, a possible patch extracted from their SVN repository is posted at http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2005-November/012073.html

Cheers, Steffen

Change History (4)

comment:1 by Randy McMurchy, 18 years ago

Owner: changed from blfs-book@… to Randy McMurchy

I would like to get further information on how to reproduce this problem. I cannot. And what is interesting is the bug referenced in the original post is against libvorbis 1.1.0, which is not the current version in BLFS-SVN.

I used Sound-Juicer to rip a file from a CD and cannot notice any difference in the output playing the .ogg file using ogg123 or playing it straight from the CD using a CD player. My understanding is that Sound-Juicer uses libvorbis to encode the data being ripped from the CD, so I'm thinking this bug should be applicable here.

Here is the pertinant stuff from playing a file using ogg123.

randy@rmlinux: ~/Willie_Nelson/Always_on_My_Mind > ogg123 *Always_on_My_Mind.ogg

Audio Device: Advanced Linux Sound Architecture (ALSA) output

Playing: 02 - Always_on_My_Mind.ogg Ogg Vorbis stream: 2 channel, 44100 Hz Title: Always on My Mind Artist: Willie Nelson Track number: 2 Tracktotal: 10 Album: Always on My Mind Musicbrainz_albumid: b9e8f4de-59be-49ce-95ae-4b1bad072b99 Musicbrainz_albumartistid: 668fd73c-bf54-4310-a139-305517f05311 Musicbrainz_artistid: 668fd73c-bf54-4310-a139-305517f05311 Musicbrainz_trackid: 19d0be93-fdbc-4510-8a5e-c849967a927f Done.

comment:2 by Randy McMurchy, 18 years ago

Milestone: future6.2
rep_platform: PCAll
Status: newassigned

comment:3 by sknolli@…, 18 years ago

Compiling libvorbis 1.1.1 with

$ ./configure --prefix=/usr $ make $ make install

using

$ gcc --version gcc (GCC) 4.0.2

Note that the CFLAGS set by the package are:

-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -DUSE_MEMORY_H

Now convert a wav --> ogg by

$ oggenc -q 4 -o test1.ogg track01.cdda.wav Opening with wav module: WAV file reader Encoding "track01.cdda.wav" to

"test1.ogg"

at quality 4,00

[100,0%] [ 0m00s remaining] |

Done encoding file "test1.ogg"

File length: 3m 34,0s Elapsed time: 0m 32,8s Rate: 6,5504 Average bitrate: 156,4 kb/s

Listen to it, it will sound bad. Hissing etc.

Now again to libvorbis:

$ patch -Np1 -i ../libvorbis-1.1.1-gcc4-fix_optimization-1.patch $ ./configure --prefix=/usr $ make $ make install

CFLAGS used here are the same as above:

-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -DUSE_MEMORY_H

Trying the encoding again:

$ oggenc -q 4 -o test1.ogg track01.cdda.wav Opening with wav module: WAV file reader Encoding "track01.cdda.wav" to

"test2.ogg"

at quality 4,00

[ 99,7%] [ 0m00s remaining] /

Done encoding file "test2.ogg"

File length: 3m 34,0s Elapsed time: 0m 31,8s Rate: 6,7622 Average bitrate: 126,3 kb/s

Note the different bitrate as compared to the first run. Playing the second file now reveals the quality difference.

The setting -q 4 is supposed to be a traget bitrate of ~128kB/s, the difference might be less audible when using a higher setting like -q 8 or so.

As to libvorbis-1.1.0 vs. 1.1.1: The bug was discovered in 1.1.0 but wasn't fixed until recently, so also affects 1.1.1.

HTH, Cheers, Steffen

comment:4 by Randy McMurchy, 18 years ago

Resolution: fixed
Status: assignedclosed

Added the GCC4 patch to the libvorbis instructions

Note: See TracTickets for help on using tickets.