Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
index b4f2714360e..3840e775fe3 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -30,39 +30,39 @@ ConvolutionFilterOperation::ConvolutionFilterOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->filter = NULL;
+ this->m_inputOperation = NULL;
+ this->m_filter = NULL;
this->setComplex(true);
}
void ConvolutionFilterOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- this->inputValueOperation = this->getInputSocketReader(1);
+ this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_inputValueOperation = this->getInputSocketReader(1);
}
void ConvolutionFilterOperation::set3x3Filter(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9)
{
- this->filter = new float[9];
- this->filter[0] = f1;
- this->filter[1] = f2;
- this->filter[2] = f3;
- this->filter[3] = f4;
- this->filter[4] = f5;
- this->filter[5] = f6;
- this->filter[6] = f7;
- this->filter[7] = f8;
- this->filter[8] = f9;
- this->filterHeight = 3;
- this->filterWidth = 3;
+ this->m_filter = new float[9];
+ this->m_filter[0] = f1;
+ this->m_filter[1] = f2;
+ this->m_filter[2] = f3;
+ this->m_filter[3] = f4;
+ this->m_filter[4] = f5;
+ this->m_filter[5] = f6;
+ this->m_filter[6] = f7;
+ this->m_filter[7] = f8;
+ this->m_filter[8] = f9;
+ this->m_filterHeight = 3;
+ this->m_filterWidth = 3;
}
void ConvolutionFilterOperation::deinitExecution()
{
- this->inputOperation = NULL;
- this->inputValueOperation = NULL;
- if (this->filter) {
- delete[] this->filter;
- this->filter = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputValueOperation = NULL;
+ if (this->m_filter) {
+ delete[] this->m_filter;
+ this->m_filter = NULL;
}
}
@@ -84,28 +84,28 @@ void ConvolutionFilterOperation::executePixel(float *color, int x, int y, Memory
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
const float mval = 1.0f - value[0];
zero_v4(color);
- this->inputOperation->read(in1, x1, y1, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[0]);
- this->inputOperation->read(in1, x2, y1, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[1]);
- this->inputOperation->read(in1, x3, y1, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[2]);
- this->inputOperation->read(in1, x1, y2, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[3]);
- this->inputOperation->read(in2, x2, y2, inputBuffers, NULL);
- madd_v4_v4fl(color, in2, this->filter[4]);
- this->inputOperation->read(in1, x3, y2, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[5]);
- this->inputOperation->read(in1, x1, y3, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[6]);
- this->inputOperation->read(in1, x2, y3, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[7]);
- this->inputOperation->read(in1, x3, y3, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[8]);
+ this->m_inputOperation->read(in1, x1, y1, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[0]);
+ this->m_inputOperation->read(in1, x2, y1, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[1]);
+ this->m_inputOperation->read(in1, x3, y1, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[2]);
+ this->m_inputOperation->read(in1, x1, y2, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[3]);
+ this->m_inputOperation->read(in2, x2, y2, inputBuffers, NULL);
+ madd_v4_v4fl(color, in2, this->m_filter[4]);
+ this->m_inputOperation->read(in1, x3, y2, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[5]);
+ this->m_inputOperation->read(in1, x1, y3, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[6]);
+ this->m_inputOperation->read(in1, x2, y3, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[7]);
+ this->m_inputOperation->read(in1, x3, y3, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[8]);
color[0] = color[0] * value[0] + in2[0] * mval;
color[1] = color[1] * value[0] + in2[1] * mval;
@@ -116,8 +116,8 @@ void ConvolutionFilterOperation::executePixel(float *color, int x, int y, Memory
bool ConvolutionFilterOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- int addx = (this->filterWidth - 1) / 2 + 1;
- int addy = (this->filterHeight - 1) / 2 + 1;
+ int addx = (this->m_filterWidth - 1) / 2 + 1;
+ int addy = (this->m_filterHeight - 1) / 2 + 1;
newInput.xmax = input->xmax + addx;
newInput.xmin = input->xmin - addx;
newInput.ymax = input->ymax + addy;