[Ffmpeg-devel] Re: Re: Compilation poblem and fix on 2007-03-06trunk (Tatu Kilappa)
Fri Mar 9 14:22:07 CET 2007
On Fri, Mar 09, 2007 at 02:04:43PM +0100, elupus wrote:
> "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.
Hm. This means the _alloca MS libc function?
I know it's bad to take MS documentations seriously, but this does not
sound that good: "This function is deprecated"...
The "replacement" function needs a free...
And some people really deserve to be banned from writing documentation
for writing useless crap (BSD people seem to like that same style,
"The _alloca routine returns a void pointer to the allocated space, which
is guaranteed to be suitably aligned for storage of any type of object."
Oh, so my special algorithm that assumes my data will be aligned a 1GB
will work with that, too! Great!
Though probably they have just forgotten to define their idea of
"object". Or is there a list of Micrsoft- (or BSD-) certified C-objects
(Cited from http://msdn2.microsoft.com/en-us/library/wb1s57t5(VS.80).aspx)
More information about the ffmpeg-devel