[FFmpeg-devel] Stack	variables	alignment	check	in	libavcodec/dsputil.c
    Uoti Urpala 
    uoti.urpala
       
    Tue Jul 31 00:18:27 CEST 2007
    
    
  
On Mon, 2007-07-30 at 14:47 -0700, Roman Shaposhnick wrote:
> P.S. I wonder if a clever macro allocating +(align-1) bytes on the
> stack and then coercing a pointer wouldn't be as efficient as 
> the current implementation relying on half-broken gcc...
It would be less efficient. Normally GCC at least maintains stack
alignment by making all stack frames a multiple of 16 bytes, so no
additional code per aligned variable is needed (if you can rely on other
programs in the call chain not breaking the alignment). Doing additional
manual alignment like you suggested would add overhead.
    
    
More information about the ffmpeg-devel
mailing list