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:
authorManuel Castilla <manzanillawork@gmail.com>2021-10-14 00:01:04 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-10-14 00:41:14 +0300
commita2ee3c3a9f01f5cb2f05f1e84a1b6c1931d9d4a4 (patch)
treed409678b16280311ed228929a45c9470f67a6dcd /source/blender/compositor/operations/COM_KeyingBlurOperation.cc
parentea79efef70da14100b591b50dcada819808f20b6 (diff)
Cleanup: replace members `m_` prefix by `_` suffix in Compositor
To convert old code to the current convention and use a single code style.
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingBlurOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.cc b/source/blender/compositor/operations/COM_KeyingBlurOperation.cc
index b5c93ad2888..fcf304de174 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cc
@@ -25,8 +25,8 @@ KeyingBlurOperation::KeyingBlurOperation()
this->addInputSocket(DataType::Value);
this->addOutputSocket(DataType::Value);
- m_size = 0;
- m_axis = BLUR_AXIS_X;
+ size_ = 0;
+ axis_ = BLUR_AXIS_X;
this->flags.complex = true;
}
@@ -46,8 +46,8 @@ void KeyingBlurOperation::executePixel(float output[4], int x, int y, void *data
int count = 0;
float average = 0.0f;
- if (m_axis == 0) {
- const int start = MAX2(0, x - m_size + 1), end = MIN2(bufferWidth, x + m_size);
+ if (axis_ == 0) {
+ const int start = MAX2(0, x - size_ + 1), end = MIN2(bufferWidth, x + size_);
for (int cx = start; cx < end; cx++) {
int bufferIndex = (y * bufferWidth + cx);
average += buffer[bufferIndex];
@@ -55,7 +55,7 @@ void KeyingBlurOperation::executePixel(float output[4], int x, int y, void *data
}
}
else {
- const int start = MAX2(0, y - m_size + 1), end = MIN2(inputBuffer->getHeight(), y + m_size);
+ const int start = MAX2(0, y - size_ + 1), end = MIN2(inputBuffer->getHeight(), y + size_);
for (int cy = start; cy < end; cy++) {
int bufferIndex = (cy * bufferWidth + x);
average += buffer[bufferIndex];
@@ -74,17 +74,17 @@ bool KeyingBlurOperation::determineDependingAreaOfInterest(rcti *input,
{
rcti newInput;
- if (m_axis == BLUR_AXIS_X) {
- newInput.xmin = input->xmin - m_size;
+ if (axis_ == BLUR_AXIS_X) {
+ newInput.xmin = input->xmin - size_;
newInput.ymin = input->ymin;
- newInput.xmax = input->xmax + m_size;
+ newInput.xmax = input->xmax + size_;
newInput.ymax = input->ymax;
}
else {
newInput.xmin = input->xmin;
- newInput.ymin = input->ymin - m_size;
+ newInput.ymin = input->ymin - size_;
newInput.xmax = input->xmax;
- newInput.ymax = input->ymax + m_size;
+ newInput.ymax = input->ymax + size_;
}
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
@@ -94,18 +94,18 @@ void KeyingBlurOperation::get_area_of_interest(const int UNUSED(input_idx),
const rcti &output_area,
rcti &r_input_area)
{
- switch (m_axis) {
+ switch (axis_) {
case BLUR_AXIS_X:
- r_input_area.xmin = output_area.xmin - m_size;
+ r_input_area.xmin = output_area.xmin - size_;
r_input_area.ymin = output_area.ymin;
- r_input_area.xmax = output_area.xmax + m_size;
+ r_input_area.xmax = output_area.xmax + size_;
r_input_area.ymax = output_area.ymax;
break;
case BLUR_AXIS_Y:
r_input_area.xmin = output_area.xmin;
- r_input_area.ymin = output_area.ymin - m_size;
+ r_input_area.ymin = output_area.ymin - size_;
r_input_area.xmax = output_area.xmax;
- r_input_area.ymax = output_area.ymax + m_size;
+ r_input_area.ymax = output_area.ymax + size_;
break;
default:
BLI_assert_msg(0, "Unknown axis");
@@ -123,7 +123,7 @@ void KeyingBlurOperation::update_memory_buffer_partial(MemoryBuffer *output,
int coord_max;
int elem_stride;
std::function<int()> get_current_coord;
- switch (m_axis) {
+ switch (axis_) {
case BLUR_AXIS_X:
get_current_coord = [&] { return it.x; };
coord_max = this->getWidth();
@@ -138,8 +138,8 @@ void KeyingBlurOperation::update_memory_buffer_partial(MemoryBuffer *output,
for (; !it.is_end(); ++it) {
const int coord = get_current_coord();
- const int start_coord = MAX2(0, coord - m_size + 1);
- const int end_coord = MIN2(coord_max, coord + m_size);
+ const int start_coord = MAX2(0, coord - size_ + 1);
+ const int end_coord = MIN2(coord_max, coord + size_);
const int count = end_coord - start_coord;
float sum = 0.0f;