[Ffmpeg-devel] Stack alignment

koyama tadayoshi koyama
Fri Feb 23 07:59:40 CET 2007


Ramiro Polla <ramiro at lisha.ufsc.br> wrote:
> I wonder for how long it has been doing this... Anyone with olders
> versions (eg: VC6) care to test too?

I've just tested and latest version of VC6 support __declspec(align(NN)).
I also see a MS's document which mentions this option published Feb. 2002.

BTW, current ff_check_alignment will fail to detected incompatible compiler
when the variable just happens to be placed on an aligned address.
Double checking will works better, just IMHO.

DECLARE_ALIGNED_16(int, a);
DECLARE_ALIGNED_16(int, b);
if (((int)&a | (int)&b) & 15) {
 ...
}

TK





More information about the ffmpeg-devel mailing list