[Ffmpeg-devel] Re: Re: Compilation poblem and fix on 2007-03-06trunk (Tatu Kilappa)

elupus elupus
Fri Mar 9 14:04:43 CET 2007


"Reimar D?ffinger" <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote in 
message news:20070309112314.GA20583 at 1und1.de...
On Fri, Mar 09, 2007 at 09:51:18AM +0100, Fran?ois Revol wrote:
> > "larry.sdk" <larry.sdk at gmail.com> writes:
> > > As the MS VC do not support declaration array with varible size,
> > > all
> > > of the source code must be modified with _alloc(). And below is and
> > > example in the dsputils.c:
> > >
> > > DECLARE_ALIGNED_8 (uint64_t, aligned_bak[stride]);
> > >
> > > replaced it by:
> > >
> > >  uint64_t *aligned_bak = (uint64_t *)_alloca(sizeof(uint64_t)*
> > > stride);
> >
> > MSVC lacks support for quite a few other C features used by FFmpeg.
> > The code must be compiled with a (mostly) C99 compliant compiler,
> > such
> > as gcc.  Most of the assembler optimizations are also available only
> > when gcc is used.
>
> However, defining an DECLARE_ALIGN_8_ARRAY(type,name,sz) macro could
> provide a one-line workaround for that incomplete compiler...

Workaround for what? To what end? To achieve what kind of goal?


Aligned variables if caller of library doesn't align stack the same way as 
GCC incorrectly assumes everybody does. It has been discussed before, and 
since the above way of declaring it allows the use of _alloca wich 
guarantees the alignment nomatter what stack, it could be of use.

/Joakim 






More information about the ffmpeg-devel mailing list