[Ffmpeg-cvslog] r8420 - trunk/libavcodec/dv.c

Roman Shaposhnik rvs
Sun Mar 25 05:13:31 CEST 2007


On Sat, 2007-03-24 at 21:47 -0500, Rich Felker wrote:
> > Modified: trunk/libavcodec/dv.c
> > ==============================================================================
> > --- trunk/libavcodec/dv.c	(original)
> > +++ trunk/libavcodec/dv.c	Fri Mar 16 00:45:20 2007
> > @@ -838,7 +838,7 @@ static inline void dv_encode_video_segme
> >      uint8_t*  data;
> >      uint8_t*  ptr;
> >      int       do_edge_wrap;
> > -    DECLARE_ALIGNED_8(DCTELEM, block[64]);
> > +    DECLARE_ALIGNED_16(DCTELEM, block[64]);
> 
> Aligned data on the stack does not work anyway. 

  Well it does (we've just implemented it in Sun Studio ;-)). The only
problem is -- you can't align to a stricter boundary than what
ABI mandates without generating extra code for function prologues.
Strictly speaking on x86 the largest alignment you can do is 4 and 
on x64 that would be 16. Now, given that every sensible x86 compiler
in the world tends to aligns on 8 anyway -- 8 is a pretty safe bet,
whereas 16 is NOT.  

> If you want to use it,
> you need to just declare an extra-large array and then align it
> yourself in code.. Blame the gcc developers.

  Well, gcc developers should be blamed for right reasons ;-)  

Thanks,
Roman.





More information about the ffmpeg-cvslog mailing list