[FFmpeg-cvslog] r18896 - trunk/libavcodec/eatgq.c

Måns Rullgård mans
Sat May 23 17:25:11 CEST 2009

Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Fri, May 22, 2009 at 10:27:35PM +0100, M?ns Rullg?rd wrote:
>> reimar <subversion at mplayerhq.hu> writes:
>> > Author: reimar
>> > Date: Fri May 22 20:39:00 2009
>> > New Revision: 18896
>> >
>> > Log:
>> > Move eatgq blocks array from the stack to the codec context and make sure
>> > it is aligned as necessary for DSPContext's idct_put.
>> > Just aligning it on the stack would have been possible but less reliable
>> > and without any real benefit.
>> Aligning for idct on the stack is *not* possible.  It may work by
>> accident most of the time, but DO NOT RELY ON IT.
> Given we have added gcc attributes to realign the stack etc. I conclude
> that someone somewhen wanted it to be possible,

Wanting something does not make it so.

> and I'm not sure you have to rely on "accident" for it to work with
> gcc/Linux at least.

We support a multitude of compilers and operating systems, several of
which DO NOT SUPPORT aligning stack variables to more than 8 bytes.

> So it seems to me that the commit message is quite accurate, even if
> we might want to avoid aligned data on the stack completely in the
> future.

Aligning stack variables is either possible or impossible.  Unreliable
is equivalent to impossible.  The commit message is misleading.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-cvslog mailing list