[MPlayer-users] layer2.c + gcc 3.3.1 + -fstrict-aliasing -> 'underwater sound'

D Richard Felker III dalias at aerifal.cx
Sun Dec 21 22:04:40 CET 2003


On Sun, Dec 21, 2003 at 09:10:01PM +0100, Attila Kinali wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> On Sun, 21 Dec 2003 19:12:33 +0100
> "Goetz Waschk" <waschk at informatik.uni-rostock.de> wrote:
> 
> > Am Fr 19 Dez 2003 23:25:20 GMT schrieb Henk Slager:
> > > I am using stock SuSE 9.0 32bit and 64bit on an Athlon64 platform and
> > > found out that software based on mpg123 (e.g. MPlayer-1.0pre2) compiles
> > > wrong if -O2 is used for the whole mpg123 0.59s package. No segfaults or
> > > so, but there is a strong  'underwater soundeffect', especially when the
> > > source has quite some mid-and hi frequencies.
> > [schnipp]
> > > I wonder if the same happens with gcc 3.3.2 or newer; Anyone experienced
> > 
> > I've noticed this too with the 'optimized build' of my Mandrake Cooker
> > package of mplayer 1.0pre3. The current Cooker has gcc 3.3.2 and the
> > normal build with these flags "-O2 -fomit-frame-pointer -pipe -march=i586
> > -mcpu=pentiumpro" overwriting the default is OK, while the optimized
> > build with configure's flags and disabled CPU detection creates the
> > effect mentioned above.
> 
> These 3 reports sound like gcc bugs, please report to the gcc team.

Actually, for once I don't think they are! mp3lib is actually quite
broken, and breaking some aliasing rules I expect. The best solution
is just to put afm=libmad in your config (and make sure libmad is
installed when you compile). Someday it should be fixed, but mp3lib is
really nasty, broken code, so there's a sentiment to just remove it if
we can get ffmpeg's decoder to perform as well...

Rich




More information about the MPlayer-users mailing list