[x264-devel] commit: Convert to a unified "pixel" type for pixel data (Oskar Arvidsson )
Steven Walters
kemuri9 at gmail.com
Fri Jun 4 13:32:10 CEST 2010
It's inherently the fault of combining mingw and msvc code:
mingw performs an optimization that assumes the 16byte stack alignment
it can maintain.
msvc is at fault for not being able to maintain 16byte alignment.
This situation only occurs on x86 though as msvc enforces 16byte stack
alignment on x86_64...
I doubt using a new mingw is going to make any difference.
you should try doing -fno-tree-vectorize when building x264 or
see if editing the x264.h you use in msvc and adding the
__declspec(align(16)) attribute to x264_encoder_encode() will fix the
issue.
though I think this latter option would only work if using x264 via a
shared library and not a static one within msvc.
On Fri, Jun 4, 2010 at 1:54 AM, avcoder <ffmpeg at gmail.com> wrote:
> It's not the fault of your C code, but the fault of gcc 4.4.4
>
> I use gcc 4.4.4 from
>
> http://komisar.gin.by/mingw/
>
> I will try gcc 4.5
>
> On Fri, Jun 4, 2010 at 1:32 PM, Jason Garrett-Glaser
> <darkshikari at gmail.com> wrote:
>> On Thu, Jun 3, 2010 at 10:15 AM, avcoder <ffmpeg at gmail.com> wrote:
>>> It seems that the following code breaks on non-16 bytes stack such as MSVC++
>>> +static void ALWAYS_INLINE pixel_memset( pixel *dst, int value, int size )
>>> +{
>>> + for( int i = 0; i < size; i++ )
>>> + dst[i] = value;
>>> +}
>>>
>>> because: <compiled by gcc 4.4.4>
>>
>> Then use -fno-tree-vectorize. I am not responsible for what your
>> stupid compiler chooses to do with my perfectly correct, portable C
>> code.
>>
>> Dark Shikari
>> _______________________________________________
>> x264-devel mailing list
>> x264-devel at videolan.org
>> http://mailman.videolan.org/listinfo/x264-devel
>>
>
>
>
> --
> -----------------------------------------------------------------------------------------
> My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>
More information about the x264-devel
mailing list