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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-26 05:22:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-26 05:22:05 +0400
commit6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch)
tree0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
parent7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff)
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index c17e51e6391..9eb004b3686 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -36,21 +36,21 @@ VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation() : NodeOperation
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputProgram = NULL;
- this->inputBokehProgram = NULL;
- this->inputSizeProgram = NULL;
- this->inputDepthProgram = NULL;
- this->maxBlur = 32.0f;
- this->threshold = 1.0f;
+ this->m_inputProgram = NULL;
+ this->m_inputBokehProgram = NULL;
+ this->m_inputSizeProgram = NULL;
+ this->m_inputDepthProgram = NULL;
+ this->m_maxBlur = 32.0f;
+ this->m_threshold = 1.0f;
}
void VariableSizeBokehBlurOperation::initExecution()
{
- this->inputProgram = getInputSocketReader(0);
- this->inputBokehProgram = getInputSocketReader(1);
- this->inputSizeProgram = getInputSocketReader(2);
- this->inputDepthProgram = getInputSocketReader(3);
+ this->m_inputProgram = getInputSocketReader(0);
+ this->m_inputBokehProgram = getInputSocketReader(1);
+ this->m_inputSizeProgram = getInputSocketReader(2);
+ this->m_inputDepthProgram = getInputSocketReader(3);
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -63,27 +63,27 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
float multiplier_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
- int miny = y - maxBlur;
- int maxy = y + maxBlur;
- int minx = x - maxBlur;
- int maxx = x + maxBlur;
+ int miny = y - this->m_maxBlur;
+ int maxy = y + this->m_maxBlur;
+ int minx = x - this->m_maxBlur;
+ int maxx = x + this->m_maxBlur;
{
- inputSizeProgram->read(tempSize, x, y, COM_PS_NEAREST, inputBuffers);
- inputDepthProgram->read(tempDepth, x, y, COM_PS_NEAREST, inputBuffers);
- inputProgram->read(readColor, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputSizeProgram->read(tempSize, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputDepthProgram->read(tempDepth, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputProgram->read(readColor, x, y, COM_PS_NEAREST, inputBuffers);
add_v4_v4(color_accum, readColor);
add_v4_fl(multiplier_accum, 1.0f);
float sizeCenter = tempSize[0];
- float centerDepth = tempDepth[0]+threshold;
+ float centerDepth = tempDepth[0] + this->m_threshold;
for (int ny = miny; ny < maxy; ny += QualityStepHelper::getStep()) {
for (int nx = minx; nx < maxx; nx += QualityStepHelper::getStep()) {
if (nx >= 0 && nx < this->getWidth() && ny >= 0 && ny < getHeight()) {
- inputDepthProgram->read(tempDepth, nx, ny, COM_PS_NEAREST, inputBuffers);
- inputSizeProgram->read(tempSize, nx, ny, COM_PS_NEAREST, inputBuffers);
+ this->m_inputDepthProgram->read(tempDepth, nx, ny, COM_PS_NEAREST, inputBuffers);
+ this->m_inputSizeProgram->read(tempSize, nx, ny, COM_PS_NEAREST, inputBuffers);
float size = tempSize[0];
if (tempDepth[0] < centerDepth) {
- if ((sizeCenter > threshold && size > threshold) || size <= threshold) {
+ if ((sizeCenter > this->m_threshold && size > this->m_threshold) || size <= this->m_threshold) {
float dx = nx - x;
float dy = ny - y;
if (nx == x && ny == y) {
@@ -91,8 +91,8 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
else if (size >= fabsf(dx) && size >= fabsf(dy)) {
float u = 256 + dx * 256 / size;
float v = 256 + dy * 256 / size;
- inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
- inputProgram->read(readColor, nx, ny, COM_PS_NEAREST, inputBuffers);
+ this->m_inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
+ this->m_inputProgram->read(readColor, nx, ny, COM_PS_NEAREST, inputBuffers);
madd_v4_v4v4(color_accum, bokeh, readColor);
add_v4_v4(multiplier_accum, bokeh);
}
@@ -112,9 +112,9 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
void VariableSizeBokehBlurOperation::deinitExecution()
{
- this->inputProgram = NULL;
- this->inputBokehProgram = NULL;
- this->inputSizeProgram = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputBokehProgram = NULL;
+ this->m_inputSizeProgram = NULL;
}
bool VariableSizeBokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -122,10 +122,10 @@ bool VariableSizeBokehBlurOperation::determineDependingAreaOfInterest(rcti *inpu
rcti newInput;
rcti bokehInput;
- newInput.xmax = input->xmax + maxBlur + 2;
- newInput.xmin = input->xmin - maxBlur + 2;
- newInput.ymax = input->ymax + maxBlur - 2;
- newInput.ymin = input->ymin - maxBlur - 2;
+ newInput.xmax = input->xmax + this->m_maxBlur + 2;
+ newInput.xmin = input->xmin - this->m_maxBlur + 2;
+ newInput.ymax = input->ymax + this->m_maxBlur - 2;
+ newInput.ymin = input->ymin - this->m_maxBlur - 2;
bokehInput.xmax = 512;
bokehInput.xmin = 0;
bokehInput.ymax = 512;