fix own error in r51819, was reading outside of the buffer, also comment unused vars.
This commit is contained in:
@@ -102,12 +102,12 @@ void GaussianAlphaXBlurOperation::executePixel(float output[4], int x, int y, vo
|
||||
int bufferstarty = inputBuffer->getRect()->ymin;
|
||||
|
||||
int miny = y;
|
||||
int maxy = y;
|
||||
// int maxy = y; // UNUSED
|
||||
int minx = x - this->m_rad;
|
||||
int maxx = x + this->m_rad;
|
||||
int maxx = x + this->m_rad; // UNUSED
|
||||
miny = max(miny, inputBuffer->getRect()->ymin);
|
||||
minx = max(minx, inputBuffer->getRect()->xmin);
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
// maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
|
||||
/* *** this is the main part which is different to 'GaussianXBlurOperation' *** */
|
||||
|
@@ -104,11 +104,11 @@ void GaussianAlphaYBlurOperation::executePixel(float output[4], int x, int y, vo
|
||||
int miny = y - this->m_rad;
|
||||
int maxy = y + this->m_rad;
|
||||
int minx = x;
|
||||
int maxx = x;
|
||||
// int maxx = x; // UNUSED
|
||||
miny = max(miny, inputBuffer->getRect()->ymin);
|
||||
minx = max(minx, inputBuffer->getRect()->xmin);
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax - 1);
|
||||
// maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
|
||||
/* *** this is the main part which is different to 'GaussianYBlurOperation' *** */
|
||||
int step = getStep();
|
||||
|
@@ -85,13 +85,13 @@ void GaussianXBlurOperation::executePixel(float output[4], int x, int y, void *d
|
||||
int bufferstarty = inputBuffer->getRect()->ymin;
|
||||
|
||||
int miny = y;
|
||||
int maxy = y;
|
||||
// int maxy = y; // UNUSED
|
||||
int minx = x - this->m_rad;
|
||||
int maxx = x + this->m_rad;
|
||||
miny = max(miny, inputBuffer->getRect()->ymin);
|
||||
minx = max(minx, inputBuffer->getRect()->xmin);
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
// maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
maxx = min(maxx, inputBuffer->getRect()->xmax - 1);
|
||||
|
||||
int step = getStep();
|
||||
int offsetadd = getOffsetAdd();
|
||||
|
@@ -87,11 +87,11 @@ void GaussianYBlurOperation::executePixel(float output[4], int x, int y, void *d
|
||||
int miny = y - this->m_rad;
|
||||
int maxy = y + this->m_rad;
|
||||
int minx = x;
|
||||
int maxx = x;
|
||||
// int maxx = x; // UNUSED
|
||||
miny = max(miny, inputBuffer->getRect()->ymin);
|
||||
minx = max(minx, inputBuffer->getRect()->xmin);
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax - 1);
|
||||
// maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
|
||||
int index;
|
||||
int step = getStep();
|
||||
|
Reference in New Issue
Block a user