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_DespeckleOperation.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_DespeckleOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_DespeckleOperation.cc56
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/compositor/operations/COM_DespeckleOperation.cc b/source/blender/compositor/operations/COM_DespeckleOperation.cc
index a317cdcc7f0..f655c17fdf2 100644
--- a/source/blender/compositor/operations/COM_DespeckleOperation.cc
+++ b/source/blender/compositor/operations/COM_DespeckleOperation.cc
@@ -28,19 +28,19 @@ DespeckleOperation::DespeckleOperation()
this->addInputSocket(DataType::Value);
this->addOutputSocket(DataType::Color);
this->set_canvas_input_index(0);
- m_inputOperation = nullptr;
+ inputOperation_ = nullptr;
this->flags.complex = true;
}
void DespeckleOperation::initExecution()
{
- m_inputOperation = this->getInputSocketReader(0);
- m_inputValueOperation = this->getInputSocketReader(1);
+ inputOperation_ = this->getInputSocketReader(0);
+ inputValueOperation_ = this->getInputSocketReader(1);
}
void DespeckleOperation::deinitExecution()
{
- m_inputOperation = nullptr;
- m_inputValueOperation = nullptr;
+ inputOperation_ = nullptr;
+ inputValueOperation_ = nullptr;
}
BLI_INLINE int color_diff(const float a[3], const float b[3], const float threshold)
@@ -69,10 +69,10 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- m_inputValueOperation->read(value, x2, y2, nullptr);
+ inputValueOperation_->read(value, x2, y2, nullptr);
// const float mval = 1.0f - value[0];
- m_inputOperation->read(color_org, x2, y2, nullptr);
+ inputOperation_->read(color_org, x2, y2, nullptr);
#define TOT_DIV_ONE 1.0f
#define TOT_DIV_CNR (float)M_SQRT1_2
@@ -82,7 +82,7 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
#define COLOR_ADD(fac) \
{ \
madd_v4_v4fl(color_mid, in1, fac); \
- if (color_diff(in1, color_org, m_threshold)) { \
+ if (color_diff(in1, color_org, threshold_)) { \
w += fac; \
madd_v4_v4fl(color_mid_ok, in1, fac); \
} \
@@ -91,34 +91,34 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
zero_v4(color_mid);
zero_v4(color_mid_ok);
- m_inputOperation->read(in1, x1, y1, nullptr);
+ inputOperation_->read(in1, x1, y1, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- m_inputOperation->read(in1, x2, y1, nullptr);
+ inputOperation_->read(in1, x2, y1, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- m_inputOperation->read(in1, x3, y1, nullptr);
+ inputOperation_->read(in1, x3, y1, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- m_inputOperation->read(in1, x1, y2, nullptr);
+ inputOperation_->read(in1, x1, y2, nullptr);
COLOR_ADD(TOT_DIV_ONE)
#if 0
- m_inputOperation->read(in2, x2, y2, nullptr);
- madd_v4_v4fl(color_mid, in2, m_filter[4]);
+ inputOperation_->read(in2, x2, y2, nullptr);
+ madd_v4_v4fl(color_mid, in2, filter_[4]);
#endif
- m_inputOperation->read(in1, x3, y2, nullptr);
+ inputOperation_->read(in1, x3, y2, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- m_inputOperation->read(in1, x1, y3, nullptr);
+ inputOperation_->read(in1, x1, y3, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- m_inputOperation->read(in1, x2, y3, nullptr);
+ inputOperation_->read(in1, x2, y3, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- m_inputOperation->read(in1, x3, y3, nullptr);
+ inputOperation_->read(in1, x3, y3, nullptr);
COLOR_ADD(TOT_DIV_CNR)
mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * (float)M_SQRT1_2)));
// mul_v4_fl(color_mid, 1.0f / w);
- if ((w != 0.0f) && ((w / WTOT) > (m_threshold_neighbor)) &&
- color_diff(color_mid, color_org, m_threshold)) {
+ if ((w != 0.0f) && ((w / WTOT) > (threshold_neighbor_)) &&
+ color_diff(color_mid, color_org, threshold_)) {
mul_v4_fl(color_mid_ok, 1.0f / w);
interp_v4_v4v4(output, color_org, color_mid_ok, value[0]);
}
@@ -137,8 +137,8 @@ bool DespeckleOperation::determineDependingAreaOfInterest(rcti *input,
rcti *output)
{
rcti newInput;
- int addx = 2; //(m_filterWidth - 1) / 2 + 1;
- int addy = 2; //(m_filterHeight - 1) / 2 + 1;
+ int addx = 2; //(filterWidth_ - 1) / 2 + 1;
+ int addy = 2; //(filterHeight_ - 1) / 2 + 1;
newInput.xmax = input->xmax + addx;
newInput.xmin = input->xmin - addx;
newInput.ymax = input->ymax + addy;
@@ -153,8 +153,8 @@ void DespeckleOperation::get_area_of_interest(const int input_idx,
{
switch (input_idx) {
case IMAGE_INPUT_INDEX: {
- const int add_x = 2; //(m_filterWidth - 1) / 2 + 1;
- const int add_y = 2; //(m_filterHeight - 1) / 2 + 1;
+ const int add_x = 2; //(filterWidth_ - 1) / 2 + 1;
+ const int add_y = 2; //(filterHeight_ - 1) / 2 + 1;
r_input_area.xmin = output_area.xmin - add_x;
r_input_area.xmax = output_area.xmax + add_x;
r_input_area.ymin = output_area.ymin - add_y;
@@ -197,7 +197,7 @@ void DespeckleOperation::update_memory_buffer_partial(MemoryBuffer *output,
#define COLOR_ADD(fac) \
{ \
madd_v4_v4fl(color_mid, in1, fac); \
- if (color_diff(in1, color_org, m_threshold)) { \
+ if (color_diff(in1, color_org, threshold_)) { \
w += fac; \
madd_v4_v4fl(color_mid_ok, in1, fac); \
} \
@@ -217,7 +217,7 @@ void DespeckleOperation::update_memory_buffer_partial(MemoryBuffer *output,
#if 0
const float* in2 = image->get_elem(x2, y2);
- madd_v4_v4fl(color_mid, in2, m_filter[4]);
+ madd_v4_v4fl(color_mid, in2, filter_[4]);
#endif
in1 = image->get_elem(x3, y2);
@@ -232,8 +232,8 @@ void DespeckleOperation::update_memory_buffer_partial(MemoryBuffer *output,
mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * (float)M_SQRT1_2)));
// mul_v4_fl(color_mid, 1.0f / w);
- if ((w != 0.0f) && ((w / WTOT) > (m_threshold_neighbor)) &&
- color_diff(color_mid, color_org, m_threshold)) {
+ if ((w != 0.0f) && ((w / WTOT) > (threshold_neighbor_)) &&
+ color_diff(color_mid, color_org, threshold_)) {
const float factor = *it.in(FACTOR_INPUT_INDEX);
mul_v4_fl(color_mid_ok, 1.0f / w);
interp_v4_v4v4(it.out, color_org, color_mid_ok, factor);