diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_BilateralBlurOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_BilateralBlurOperation.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cc b/source/blender/compositor/operations/COM_BilateralBlurOperation.cc index 4baaa416054..7368dcf0cad 100644 --- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cc +++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cc @@ -27,14 +27,14 @@ BilateralBlurOperation::BilateralBlurOperation() this->addOutputSocket(DataType::Color); this->flags.complex = true; - m_inputColorProgram = nullptr; - m_inputDeterminatorProgram = nullptr; + inputColorProgram_ = nullptr; + inputDeterminatorProgram_ = nullptr; } void BilateralBlurOperation::initExecution() { - m_inputColorProgram = getInputSocketReader(0); - m_inputDeterminatorProgram = getInputSocketReader(1); + inputColorProgram_ = getInputSocketReader(0); + inputDeterminatorProgram_ = getInputSocketReader(1); QualityStepHelper::initExecution(COM_QH_INCREASE); } @@ -47,14 +47,14 @@ void BilateralBlurOperation::executePixel(float output[4], int x, int y, void *d float tempColor[4]; float blurColor[4]; float blurDivider; - float space = m_space; - float sigmacolor = m_data->sigma_color; + float space = space_; + float sigmacolor = data_->sigma_color; int minx = floor(x - space); int maxx = ceil(x + space); int miny = floor(y - space); int maxy = ceil(y + space); float deltaColor; - m_inputDeterminatorProgram->read(determinatorReferenceColor, x, y, data); + inputDeterminatorProgram_->read(determinatorReferenceColor, x, y, data); zero_v4(blurColor); blurDivider = 0.0f; @@ -65,14 +65,14 @@ void BilateralBlurOperation::executePixel(float output[4], int x, int y, void *d for (int yi = miny; yi < maxy; yi += QualityStepHelper::getStep()) { for (int xi = minx; xi < maxx; xi += QualityStepHelper::getStep()) { /* Read determinator. */ - m_inputDeterminatorProgram->read(determinator, xi, yi, data); + inputDeterminatorProgram_->read(determinator, xi, yi, data); deltaColor = (fabsf(determinatorReferenceColor[0] - determinator[0]) + fabsf(determinatorReferenceColor[1] - determinator[1]) + /* Do not take the alpha channel into account. */ fabsf(determinatorReferenceColor[2] - determinator[2])); if (deltaColor < sigmacolor) { /* Add this to the blur. */ - m_inputColorProgram->read(tempColor, xi, yi, data); + inputColorProgram_->read(tempColor, xi, yi, data); add_v4_v4(blurColor, tempColor); blurDivider += 1.0f; } @@ -92,8 +92,8 @@ void BilateralBlurOperation::executePixel(float output[4], int x, int y, void *d void BilateralBlurOperation::deinitExecution() { - m_inputColorProgram = nullptr; - m_inputDeterminatorProgram = nullptr; + inputColorProgram_ = nullptr; + inputDeterminatorProgram_ = nullptr; } bool BilateralBlurOperation::determineDependingAreaOfInterest(rcti *input, @@ -101,7 +101,7 @@ bool BilateralBlurOperation::determineDependingAreaOfInterest(rcti *input, rcti *output) { rcti newInput; - int add = ceil(m_space) + 1; + int add = ceil(space_) + 1; newInput.xmax = input->xmax + (add); newInput.xmin = input->xmin - (add); @@ -115,7 +115,7 @@ void BilateralBlurOperation::get_area_of_interest(const int UNUSED(input_idx), const rcti &output_area, rcti &r_input_area) { - const int add = ceil(m_space) + 1; + const int add = ceil(space_) + 1; r_input_area.xmax = output_area.xmax + (add); r_input_area.xmin = output_area.xmin - (add); @@ -174,10 +174,10 @@ void BilateralBlurOperation::update_memory_buffer_partial(MemoryBuffer *output, { PixelCursor p = {}; p.step = QualityStepHelper::getStep(); - p.sigma_color = m_data->sigma_color; + p.sigma_color = data_->sigma_color; p.input_color = inputs[0]; p.input_determinator = inputs[1]; - const float space = m_space; + const float space = space_; for (int y = area.ymin; y < area.ymax; y++) { p.out = output->get_elem(area.xmin, y); /* This will be used as the reference color for the determinator. */ |