diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ColorCurveOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_ColorCurveOperation.cc | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cc b/source/blender/compositor/operations/COM_ColorCurveOperation.cc index 31541786b85..c103a3fc651 100644 --- a/source/blender/compositor/operations/COM_ColorCurveOperation.cc +++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cc @@ -30,22 +30,22 @@ ColorCurveOperation::ColorCurveOperation() this->addInputSocket(DataType::Color); this->addOutputSocket(DataType::Color); - this->m_inputFacProgram = nullptr; - this->m_inputImageProgram = nullptr; - this->m_inputBlackProgram = nullptr; - this->m_inputWhiteProgram = nullptr; + m_inputFacProgram = nullptr; + m_inputImageProgram = nullptr; + m_inputBlackProgram = nullptr; + m_inputWhiteProgram = nullptr; this->set_canvas_input_index(1); } void ColorCurveOperation::initExecution() { CurveBaseOperation::initExecution(); - this->m_inputFacProgram = this->getInputSocketReader(0); - this->m_inputImageProgram = this->getInputSocketReader(1); - this->m_inputBlackProgram = this->getInputSocketReader(2); - this->m_inputWhiteProgram = this->getInputSocketReader(3); + m_inputFacProgram = this->getInputSocketReader(0); + m_inputImageProgram = this->getInputSocketReader(1); + m_inputBlackProgram = this->getInputSocketReader(2); + m_inputWhiteProgram = this->getInputSocketReader(3); - BKE_curvemapping_premultiply(this->m_curveMapping, 0); + BKE_curvemapping_premultiply(m_curveMapping, 0); } void ColorCurveOperation::executePixelSampled(float output[4], @@ -53,7 +53,7 @@ void ColorCurveOperation::executePixelSampled(float output[4], float y, PixelSampler sampler) { - CurveMapping *cumap = this->m_curveMapping; + CurveMapping *cumap = m_curveMapping; float fac[4]; float image[4]; @@ -63,15 +63,15 @@ void ColorCurveOperation::executePixelSampled(float output[4], float white[4]; float bwmul[3]; - this->m_inputBlackProgram->readSampled(black, x, y, sampler); - this->m_inputWhiteProgram->readSampled(white, x, y, sampler); + m_inputBlackProgram->readSampled(black, x, y, sampler); + m_inputWhiteProgram->readSampled(white, x, y, sampler); /* get our own local bwmul value, * since we can't be threadsafe and use cumap->bwmul & friends */ BKE_curvemapping_set_black_white_ex(black, white, bwmul); - this->m_inputFacProgram->readSampled(fac, x, y, sampler); - this->m_inputImageProgram->readSampled(image, x, y, sampler); + m_inputFacProgram->readSampled(fac, x, y, sampler); + m_inputImageProgram->readSampled(image, x, y, sampler); if (*fac >= 1.0f) { BKE_curvemapping_evaluate_premulRGBF_ex(cumap, output, image, black, bwmul); @@ -90,17 +90,17 @@ void ColorCurveOperation::executePixelSampled(float output[4], void ColorCurveOperation::deinitExecution() { CurveBaseOperation::deinitExecution(); - this->m_inputFacProgram = nullptr; - this->m_inputImageProgram = nullptr; - this->m_inputBlackProgram = nullptr; - this->m_inputWhiteProgram = nullptr; + m_inputFacProgram = nullptr; + m_inputImageProgram = nullptr; + m_inputBlackProgram = nullptr; + m_inputWhiteProgram = nullptr; } void ColorCurveOperation::update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span<MemoryBuffer *> inputs) { - CurveMapping *cumap = this->m_curveMapping; + CurveMapping *cumap = m_curveMapping; float bwmul[3]; for (BuffersIterator<float> it = output->iterate_with(inputs, area); !it.is_end(); ++it) { /* Local versions of `cumap->black` and `cumap->white`. */ @@ -134,20 +134,20 @@ ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation() this->addInputSocket(DataType::Color); this->addOutputSocket(DataType::Color); - this->m_inputFacProgram = nullptr; - this->m_inputImageProgram = nullptr; + m_inputFacProgram = nullptr; + m_inputImageProgram = nullptr; this->set_canvas_input_index(1); } void ConstantLevelColorCurveOperation::initExecution() { CurveBaseOperation::initExecution(); - this->m_inputFacProgram = this->getInputSocketReader(0); - this->m_inputImageProgram = this->getInputSocketReader(1); + m_inputFacProgram = this->getInputSocketReader(0); + m_inputImageProgram = this->getInputSocketReader(1); - BKE_curvemapping_premultiply(this->m_curveMapping, 0); + BKE_curvemapping_premultiply(m_curveMapping, 0); - BKE_curvemapping_set_black_white(this->m_curveMapping, this->m_black, this->m_white); + BKE_curvemapping_set_black_white(m_curveMapping, m_black, m_white); } void ConstantLevelColorCurveOperation::executePixelSampled(float output[4], @@ -158,18 +158,18 @@ void ConstantLevelColorCurveOperation::executePixelSampled(float output[4], float fac[4]; float image[4]; - this->m_inputFacProgram->readSampled(fac, x, y, sampler); - this->m_inputImageProgram->readSampled(image, x, y, sampler); + m_inputFacProgram->readSampled(fac, x, y, sampler); + m_inputImageProgram->readSampled(image, x, y, sampler); if (*fac >= 1.0f) { - BKE_curvemapping_evaluate_premulRGBF(this->m_curveMapping, output, image); + BKE_curvemapping_evaluate_premulRGBF(m_curveMapping, output, image); } else if (*fac <= 0.0f) { copy_v3_v3(output, image); } else { float col[4]; - BKE_curvemapping_evaluate_premulRGBF(this->m_curveMapping, col, image); + BKE_curvemapping_evaluate_premulRGBF(m_curveMapping, col, image); interp_v3_v3v3(output, image, col, *fac); } output[3] = image[3]; @@ -178,15 +178,15 @@ void ConstantLevelColorCurveOperation::executePixelSampled(float output[4], void ConstantLevelColorCurveOperation::deinitExecution() { CurveBaseOperation::deinitExecution(); - this->m_inputFacProgram = nullptr; - this->m_inputImageProgram = nullptr; + m_inputFacProgram = nullptr; + m_inputImageProgram = nullptr; } void ConstantLevelColorCurveOperation::update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span<MemoryBuffer *> inputs) { - CurveMapping *cumap = this->m_curveMapping; + CurveMapping *cumap = m_curveMapping; for (BuffersIterator<float> it = output->iterate_with(inputs, area); !it.is_end(); ++it) { const float fac = *it.in(0); const float *image = it.in(1); |