Commit 1808700e authored by Steve Lhomme's avatar Steve Lhomme

MSVC compatibility fix from Haali

git-svn-id: svn://svn.videolan.org/x264/trunk@556 df754926-b1dd-0310-bc7b-ec298dee348c
parent f78c224c
......@@ -37,6 +37,11 @@
#define X264_VERSION "" // no configure script for msvc
#endif
/* alloca */
#ifdef _MSC_VER
#define alloca _alloca
#endif
/* threads */
#ifdef __WIN32__
#include <windows.h>
......
......@@ -379,9 +379,8 @@ float x264_pixel_ssim_wxh( x264_pixel_function_t *pf,
{
int x, y, z;
float ssim = 0.0;
int sums[2][width/4+3][4];
int (*sum0)[4] = sums[0];
int (*sum1)[4] = sums[1];
int (*sum0)[4] = alloca(4 * (width/4+3) * sizeof(int));
int (*sum1)[4] = alloca(4 * (width/4+3) * sizeof(int));
width >>= 2;
height >>= 2;
z = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment