[Ffmpeg-devel] about ff_check_alignment()
Dominik 'Rathann' Mierzejewski
Sun Feb 11 14:34:41 CET 2007
On Sunday, 11 February 2007 at 14:01, Michael Niedermayer wrote:
> On Sun, Feb 11, 2007 at 12:28:49PM +0000, Mario Rossi wrote:
> > On Tue Jan 30 13:30:52 CET 2007, Uoti Urpala wrote:
> > >On Tue, 2007-01-30 at 09:00 +0100, Guillaume POIRIER wrote:
> > >> On 1/30/07, yubing <trueice at gmail.com> wrote:
> > >>
> > >> > I wonder which compiler the developers are using, would you refer an
> > >> > appropriate compiler to me?
> > >>
> > >> gcc 4.2 or 4.3
> > >You don't need a development branch compiler for proper stack variable
> > >alignment. GCC 4.1 works. I don't currently have GCC 4.0 (or older)
> > >installed, it might or might not work.
> > I have the same warning (about stack not aligned), but only when
> > running xine (1.1.4).
> > I'm compiling everything with GCC 4.1.1 (shipped with Fedora Core 5).
> > Xine contains a copy of ffmpeg which is compiled within xine compilation.
> > What I've found, is that xine passes this switch to the compiler
> > -mpreferred-stack-boundary=2
> > when compiling ffmpeg.
> > On a small test with a standalone ff_check_alignment(), this switch is
> > enough to cause the test to fail. The default is =4 (i.e. 16 bytes).
> > Should I write to xine mailing list?
> yes, it would be interresting why they mess with the default ...
> > What happens when the stack is not aligned as ffmpeg expects it to be?
> depends, mmx/see/sse2/altivec, double precission float/int64 code slows down
> or will crash (amount of slowdown depends upon cpu) crash depends upon kernel
> cpu and what is executed exactly
> on recent (anything after and including the pentium 1) x86
> -mpreferred-stack-boundary=3 is the absolute minimum
> on cpus with SSE* or altivec or similar SIMD instruction sets 4 is needed
Just a thought... why not add it to default CFLAGS then?
Something along the lines of
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
More information about the ffmpeg-devel