[MPlayer-dev-eng] [PATCH] demux_mkv.c: fix crash with gcc 4.4 and optimizations

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Sep 30 12:32:40 CEST 2009


On Wed, Sep 30, 2009 at 02:00:18PM +0400, Andrew Savchenko wrote:
> Hi,
> 
> On Wednesday 30 September 2009, Ivan Kalvachev wrote:
> > On 9/30/09, Corey Hickey <bugfood-ml at fatooh.org> wrote:
> > > Hello,
> > >
> > > The MKV demuxer segfaults when compiled with gcc 4.4.
> >
> > gcc 4.4.0 and 4.4.1 are known to produce bad code.
> > I guess we must add them to the configure list of buggy
> > compilers.
> >
> > Some of the problems may be related to -O4 level,
> > if somebody is eager to mess with that stuff.
> 
> For gcc-4.4 the problem is in alignment of SSE code. Usually it is 
> triggered by -ftree-vectorize which is part of -O3 (-O4 and higher 
> in gcc have the same meaning as -O3 for now).
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838
> 
> I fixed this by using my own CFLAGS/CXXFLAGS. And I got nice 
> surprise: performance increased by 2..8% depending on test. Of 
> course, options are hardware dependent, so may not be so easy 
> reproducible.

Yes, -ftree-vectorize works really, really bad on x86, which is why
FFmpeg disables it explicitly.
That wasn't done yet for MPlayer...



More information about the MPlayer-dev-eng mailing list