[x264-devel] [PATCH] msvc workaround against SSE2 deblocking issue

Loren Merritt lorenm at u.washington.edu
Thu Jun 12 01:55:52 CEST 2008


On Tue, 10 Jun 2008, Gabriel Bouvigne wrote:

> After digging into msdn docs and links, it appears that MSVC is aligning
> the stack on mod4 when targetting x86, and mod16 when targetting x64. As
> the SSE2 deblocking is assuming a stack aligned on 128bits, it obviously
> doesn't work when compiled/linked with msvc.
>
> Any suggestion on how to properly deal with this issue?
>
> *manually aligning the stack before going into the problematic assembly
> code will likely kill performance, and would require platform-specific
> assembly code (as in: only used if msvc)
>
> *don't bother with msvc doesn't seems to be a good solution (well, at
> least for me)
>
> *compiler-specific disabling of the problematic function (as done with
> this patch) will introduce yet another platform-specific #ifdef
>
> Right now, my own opinion is that platform-specific disabling of those
> function would be the best choice.

I don't care whether msvc is slow, and I also don't case whether msvc 
works at all, so either of those is ok. Someday I'll make a precise survey 
of what we can cleanup if we officially drop support for msvc and gcc2, 
but until then I don't mind an extra ifdef.

--Loren Merritt


More information about the x264-devel mailing list