Merge pull request #2798 from psumbera/master
This array is so big that it eats whole stack for the thread and makes
This commit is contained in:
commit
fdac05b967
@ -90,14 +90,16 @@ int shadow_capture_compare(BYTE* pData1, int nStep1, int nWidth, int nHeight, BY
|
|||||||
int l, t, r, b;
|
int l, t, r, b;
|
||||||
BYTE *p1, *p2;
|
BYTE *p1, *p2;
|
||||||
BOOL rows[1024];
|
BOOL rows[1024];
|
||||||
|
#ifdef WITH_DEBUG_SHADOW_CAPTURE
|
||||||
BOOL cols[1024];
|
BOOL cols[1024];
|
||||||
BOOL grid[1024][1024];
|
#endif
|
||||||
|
|
||||||
allEqual = TRUE;
|
allEqual = TRUE;
|
||||||
ZeroMemory(rect, sizeof(RECTANGLE_16));
|
ZeroMemory(rect, sizeof(RECTANGLE_16));
|
||||||
FillMemory(rows, sizeof(rows), 0xFF);
|
FillMemory(rows, sizeof(rows), 0xFF);
|
||||||
|
#ifdef WITH_DEBUG_SHADOW_CAPTURE
|
||||||
FillMemory(cols, sizeof(cols), 0xFF);
|
FillMemory(cols, sizeof(cols), 0xFF);
|
||||||
FillMemory(grid, sizeof(grid), 0xFF);
|
#endif
|
||||||
|
|
||||||
nrow = (nHeight + 15) / 16;
|
nrow = (nHeight + 15) / 16;
|
||||||
ncol = (nWidth + 15) / 16;
|
ncol = (nWidth + 15) / 16;
|
||||||
@ -141,9 +143,10 @@ int shadow_capture_compare(BYTE* pData1, int nStep1, int nWidth, int nHeight, BY
|
|||||||
|
|
||||||
if (!equal)
|
if (!equal)
|
||||||
{
|
{
|
||||||
grid[ty][tx] = FALSE;
|
|
||||||
rows[ty] = FALSE;
|
rows[ty] = FALSE;
|
||||||
|
#ifdef WITH_DEBUG_SHADOW_CAPTURE
|
||||||
cols[tx] = FALSE;
|
cols[tx] = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (l > tx)
|
if (l > tx)
|
||||||
l = tx;
|
l = tx;
|
||||||
@ -179,40 +182,39 @@ int shadow_capture_compare(BYTE* pData1, int nStep1, int nWidth, int nHeight, BY
|
|||||||
if (rect->bottom > nHeight)
|
if (rect->bottom > nHeight)
|
||||||
rect->bottom = nHeight;
|
rect->bottom = nHeight;
|
||||||
|
|
||||||
if (0)
|
#ifdef WITH_DEBUG_SHADOW_CAPTURE
|
||||||
|
char *col_str = calloc(ncol + 1, sizeof(char));
|
||||||
|
if (!col_str)
|
||||||
{
|
{
|
||||||
char *col_str = calloc(ncol + 1, sizeof(char));
|
WLog_ERR(TAG, "calloc failed!");
|
||||||
if (!col_str)
|
return 1;
|
||||||
{
|
}
|
||||||
WLog_ERR(TAG, "calloc failed!");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (tx = 0; tx < ncol; tx++)
|
for (tx = 0; tx < ncol; tx++)
|
||||||
sprintf(&col_str[tx], "-");
|
sprintf(&col_str[tx], "-");
|
||||||
WLog_INFO(TAG, "%s", col_str);
|
WLog_INFO(TAG, "%s", col_str);
|
||||||
|
|
||||||
|
for (tx = 0; tx < ncol; tx++)
|
||||||
|
sprintf(&col_str[tx], "%c", cols[tx] ? 'O' : 'X');
|
||||||
|
WLog_INFO(TAG, "%s", col_str);
|
||||||
|
|
||||||
|
for (tx = 0; tx < ncol; tx++)
|
||||||
|
sprintf(&col_str[tx], "-");
|
||||||
|
WLog_INFO(TAG, "%s", col_str);
|
||||||
|
|
||||||
|
for (ty = 0; ty < nrow; ty++)
|
||||||
|
{
|
||||||
for (tx = 0; tx < ncol; tx++)
|
for (tx = 0; tx < ncol; tx++)
|
||||||
sprintf(&col_str[tx], "%c", cols[tx] ? 'O' : 'X');
|
sprintf(&col_str[tx], "%c", cols[tx] ? 'O' : 'X');
|
||||||
WLog_INFO(TAG, "%s", col_str);
|
WLog_INFO(TAG, "%s", col_str);
|
||||||
|
WLog_INFO(TAG, "|%s|", rows[ty] ? "O" : "X");
|
||||||
for (tx = 0; tx < ncol; tx++)
|
|
||||||
sprintf(&col_str[tx], "-");
|
|
||||||
WLog_INFO(TAG, "%s", col_str);
|
|
||||||
|
|
||||||
for (ty = 0; ty < nrow; ty++)
|
|
||||||
{
|
|
||||||
for (tx = 0; tx < ncol; tx++)
|
|
||||||
sprintf(&col_str[tx], "%c", cols[tx] ? 'O' : 'X');
|
|
||||||
WLog_INFO(TAG, "%s", col_str);
|
|
||||||
WLog_INFO(TAG, "|%s|", rows[ty] ? "O" : "X");
|
|
||||||
}
|
|
||||||
|
|
||||||
WLog_INFO(TAG, "left: %d top: %d right: %d bottom: %d ncol: %d nrow: %d",
|
|
||||||
l, t, r, b, ncol, nrow);
|
|
||||||
free(col_str);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WLog_INFO(TAG, "left: %d top: %d right: %d bottom: %d ncol: %d nrow: %d",
|
||||||
|
l, t, r, b, ncol, nrow);
|
||||||
|
free(col_str);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user