svn merge ^/trunk/blender -r48276:48283
This commit is contained in:
@@ -254,7 +254,7 @@ void WorkScheduler::initialize()
|
||||
gpudevices.push_back(clDevice);
|
||||
}
|
||||
}
|
||||
delete cldevices;
|
||||
delete[] cldevices;
|
||||
}
|
||||
}
|
||||
delete[] platforms;
|
||||
|
||||
@@ -36,10 +36,12 @@ GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(C
|
||||
|
||||
void *GaussianAlphaXBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
||||
{
|
||||
lockMutex();
|
||||
if (!this->sizeavailable) {
|
||||
updateGauss(memoryBuffers);
|
||||
}
|
||||
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
|
||||
unlockMutex();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -47,6 +49,8 @@ void GaussianAlphaXBlurOperation::initExecution()
|
||||
{
|
||||
/* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */
|
||||
|
||||
initMutex();
|
||||
|
||||
if (this->sizeavailable) {
|
||||
float rad = size * this->data->sizex;
|
||||
if (rad < 1)
|
||||
@@ -154,6 +158,8 @@ void GaussianAlphaXBlurOperation::deinitExecution()
|
||||
this->gausstab = NULL;
|
||||
delete [] this->distbuf_inv;
|
||||
this->distbuf_inv = NULL;
|
||||
|
||||
deinitMutex();
|
||||
}
|
||||
|
||||
bool GaussianAlphaXBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
|
||||
|
||||
@@ -36,10 +36,12 @@ GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(C
|
||||
|
||||
void *GaussianAlphaYBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
||||
{
|
||||
lockMutex();
|
||||
if (!this->sizeavailable) {
|
||||
updateGauss(memoryBuffers);
|
||||
}
|
||||
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
|
||||
unlockMutex();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -47,6 +49,8 @@ void GaussianAlphaYBlurOperation::initExecution()
|
||||
{
|
||||
/* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */
|
||||
|
||||
initMutex();
|
||||
|
||||
if (this->sizeavailable) {
|
||||
float rad = size * this->data->sizey;
|
||||
if (rad < 1)
|
||||
@@ -65,7 +69,7 @@ void GaussianAlphaYBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
|
||||
float rad = size * this->data->sizey;
|
||||
if (rad < 1)
|
||||
rad = 1;
|
||||
|
||||
|
||||
this->rad = rad;
|
||||
this->gausstab = BlurBaseOperation::make_gausstab(rad);
|
||||
}
|
||||
@@ -154,6 +158,8 @@ void GaussianAlphaYBlurOperation::deinitExecution()
|
||||
this->gausstab = NULL;
|
||||
delete [] this->distbuf_inv;
|
||||
this->distbuf_inv = NULL;
|
||||
|
||||
deinitMutex();
|
||||
}
|
||||
|
||||
bool GaussianAlphaYBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
|
||||
|
||||
@@ -34,10 +34,12 @@ GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM
|
||||
|
||||
void *GaussianBokehBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
||||
{
|
||||
lockMutex();
|
||||
if (!sizeavailable) {
|
||||
updateGauss(memoryBuffers);
|
||||
}
|
||||
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
|
||||
unlockMutex();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -45,6 +47,8 @@ void GaussianBokehBlurOperation::initExecution()
|
||||
{
|
||||
BlurBaseOperation::initExecution();
|
||||
|
||||
initMutex();
|
||||
|
||||
if (this->sizeavailable) {
|
||||
updateGauss(NULL);
|
||||
}
|
||||
@@ -154,6 +158,8 @@ void GaussianBokehBlurOperation::deinitExecution()
|
||||
BlurBaseOperation::deinitExecution();
|
||||
delete [] this->gausstab;
|
||||
this->gausstab = NULL;
|
||||
|
||||
deinitMutex();
|
||||
}
|
||||
|
||||
bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
|
||||
|
||||
@@ -31,15 +31,16 @@ GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(COM_DT_COLO
|
||||
{
|
||||
this->gausstab = NULL;
|
||||
this->rad = 0;
|
||||
|
||||
}
|
||||
|
||||
void *GaussianXBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
||||
{
|
||||
lockMutex();
|
||||
if (!this->sizeavailable) {
|
||||
updateGauss(memoryBuffers);
|
||||
}
|
||||
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
|
||||
unlockMutex();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
@@ -47,6 +48,8 @@ void GaussianXBlurOperation::initExecution()
|
||||
{
|
||||
BlurBaseOperation::initExecution();
|
||||
|
||||
initMutex();
|
||||
|
||||
if (this->sizeavailable) {
|
||||
float rad = size * this->data->sizex;
|
||||
if (rad < 1)
|
||||
@@ -66,8 +69,8 @@ void GaussianXBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
|
||||
rad = 1;
|
||||
|
||||
this->rad = rad;
|
||||
this->gausstab = BlurBaseOperation::make_gausstab(rad);
|
||||
}
|
||||
this->gausstab = BlurBaseOperation::make_gausstab(rad);
|
||||
}
|
||||
}
|
||||
|
||||
void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
|
||||
@@ -108,6 +111,8 @@ void GaussianXBlurOperation::deinitExecution()
|
||||
BlurBaseOperation::deinitExecution();
|
||||
delete [] this->gausstab;
|
||||
this->gausstab = NULL;
|
||||
|
||||
deinitMutex();
|
||||
}
|
||||
|
||||
bool GaussianXBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
|
||||
|
||||
@@ -35,15 +35,21 @@ GaussianYBlurOperation::GaussianYBlurOperation() : BlurBaseOperation(COM_DT_COLO
|
||||
|
||||
void *GaussianYBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
||||
{
|
||||
lockMutex();
|
||||
if (!this->sizeavailable) {
|
||||
updateGauss(memoryBuffers);
|
||||
}
|
||||
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
|
||||
unlockMutex();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void GaussianYBlurOperation::initExecution()
|
||||
{
|
||||
BlurBaseOperation::initExecution();
|
||||
|
||||
initMutex();
|
||||
|
||||
if (this->sizeavailable) {
|
||||
float rad = size * this->data->sizey;
|
||||
if (rad < 1)
|
||||
@@ -61,7 +67,7 @@ void GaussianYBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
|
||||
float rad = size * this->data->sizey;
|
||||
if (rad < 1)
|
||||
rad = 1;
|
||||
|
||||
|
||||
this->rad = rad;
|
||||
this->gausstab = BlurBaseOperation::make_gausstab(rad);
|
||||
}
|
||||
@@ -86,8 +92,8 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
|
||||
maxy = min(maxy, inputBuffer->getRect()->ymax);
|
||||
maxx = min(maxx, inputBuffer->getRect()->xmax);
|
||||
|
||||
int step = getStep();
|
||||
int index;
|
||||
int step = getStep();
|
||||
for (int ny = miny; ny < maxy; ny += step) {
|
||||
index = (ny - y) + this->rad;
|
||||
int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
|
||||
@@ -103,6 +109,8 @@ void GaussianYBlurOperation::deinitExecution()
|
||||
BlurBaseOperation::deinitExecution();
|
||||
delete [] this->gausstab;
|
||||
this->gausstab = NULL;
|
||||
|
||||
deinitMutex();
|
||||
}
|
||||
|
||||
bool GaussianYBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
|
||||
|
||||
@@ -34,7 +34,7 @@ KeyingBlurOperation::KeyingBlurOperation() : NodeOperation()
|
||||
this->addOutputSocket(COM_DT_VALUE);
|
||||
|
||||
this->size = 0;
|
||||
this->axis = 0;
|
||||
this->axis = BLUR_AXIS_X;
|
||||
|
||||
this->setComplex(true);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ bool KeyingBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
|
||||
{
|
||||
rcti newInput;
|
||||
|
||||
if (this->axis == 0) {
|
||||
if (this->axis == BLUR_AXIS_X) {
|
||||
newInput.xmin = input->xmin - this->size;
|
||||
newInput.ymin = input->ymin;
|
||||
newInput.xmax = input->xmax + this->size;
|
||||
|
||||
@@ -180,7 +180,7 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB
|
||||
// Absolute fixed siez
|
||||
ScaleFixedSizeOperation::ScaleFixedSizeOperation() : NodeOperation()
|
||||
{
|
||||
this->addInputSocket(COM_DT_COLOR);
|
||||
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
|
||||
this->addOutputSocket(COM_DT_COLOR);
|
||||
this->setResolutionInputSocketIndex(0);
|
||||
this->inputOperation = NULL;
|
||||
|
||||
Reference in New Issue
Block a user