[Ffmpeg-devel] about ff_check_alignment()

Michael Niedermayer michaelni
Sun Feb 11 14:01:18 CET 2007


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

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070211/3a64857c/attachment.pgp>

More information about the ffmpeg-devel mailing list