diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ColorCurveOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_ColorCurveOperation.cc | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cc b/source/blender/compositor/operations/COM_ColorCurveOperation.cc index b88989ad224..7cfa1c09298 100644 --- a/source/blender/compositor/operations/COM_ColorCurveOperation.cc +++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cc @@ -24,36 +24,36 @@ namespace blender::compositor { ColorCurveOperation::ColorCurveOperation() { - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Color); - this->addInputSocket(DataType::Color); - this->addInputSocket(DataType::Color); - this->addOutputSocket(DataType::Color); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Color); + this->add_input_socket(DataType::Color); + this->add_input_socket(DataType::Color); + this->add_output_socket(DataType::Color); - inputFacProgram_ = nullptr; - inputImageProgram_ = nullptr; - inputBlackProgram_ = nullptr; - inputWhiteProgram_ = nullptr; + input_fac_program_ = nullptr; + input_image_program_ = nullptr; + input_black_program_ = nullptr; + input_white_program_ = nullptr; this->set_canvas_input_index(1); } -void ColorCurveOperation::initExecution() +void ColorCurveOperation::init_execution() { - CurveBaseOperation::initExecution(); - inputFacProgram_ = this->getInputSocketReader(0); - inputImageProgram_ = this->getInputSocketReader(1); - inputBlackProgram_ = this->getInputSocketReader(2); - inputWhiteProgram_ = this->getInputSocketReader(3); + CurveBaseOperation::init_execution(); + input_fac_program_ = this->get_input_socket_reader(0); + input_image_program_ = this->get_input_socket_reader(1); + input_black_program_ = this->get_input_socket_reader(2); + input_white_program_ = this->get_input_socket_reader(3); - BKE_curvemapping_premultiply(curveMapping_, 0); + BKE_curvemapping_premultiply(curve_mapping_, 0); } -void ColorCurveOperation::executePixelSampled(float output[4], - float x, - float y, - PixelSampler sampler) +void ColorCurveOperation::execute_pixel_sampled(float output[4], + float x, + float y, + PixelSampler sampler) { - CurveMapping *cumap = curveMapping_; + CurveMapping *cumap = curve_mapping_; float fac[4]; float image[4]; @@ -63,15 +63,15 @@ void ColorCurveOperation::executePixelSampled(float output[4], float white[4]; float bwmul[3]; - inputBlackProgram_->readSampled(black, x, y, sampler); - inputWhiteProgram_->readSampled(white, x, y, sampler); + input_black_program_->read_sampled(black, x, y, sampler); + input_white_program_->read_sampled(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); - inputFacProgram_->readSampled(fac, x, y, sampler); - inputImageProgram_->readSampled(image, x, y, sampler); + input_fac_program_->read_sampled(fac, x, y, sampler); + input_image_program_->read_sampled(image, x, y, sampler); if (*fac >= 1.0f) { BKE_curvemapping_evaluate_premulRGBF_ex(cumap, output, image, black, bwmul); @@ -87,20 +87,20 @@ void ColorCurveOperation::executePixelSampled(float output[4], output[3] = image[3]; } -void ColorCurveOperation::deinitExecution() +void ColorCurveOperation::deinit_execution() { - CurveBaseOperation::deinitExecution(); - inputFacProgram_ = nullptr; - inputImageProgram_ = nullptr; - inputBlackProgram_ = nullptr; - inputWhiteProgram_ = nullptr; + CurveBaseOperation::deinit_execution(); + input_fac_program_ = nullptr; + input_image_program_ = nullptr; + input_black_program_ = nullptr; + input_white_program_ = nullptr; } void ColorCurveOperation::update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span<MemoryBuffer *> inputs) { - CurveMapping *cumap = curveMapping_; + CurveMapping *cumap = curve_mapping_; float bwmul[3]; for (BuffersIterator<float> it = output->iterate_with(inputs, area); !it.is_end(); ++it) { /* Local versions of `cumap->black` and `cumap->white`. */ @@ -130,63 +130,63 @@ void ColorCurveOperation::update_memory_buffer_partial(MemoryBuffer *output, ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation() { - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Color); - this->addOutputSocket(DataType::Color); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Color); + this->add_output_socket(DataType::Color); - inputFacProgram_ = nullptr; - inputImageProgram_ = nullptr; + input_fac_program_ = nullptr; + input_image_program_ = nullptr; this->set_canvas_input_index(1); } -void ConstantLevelColorCurveOperation::initExecution() +void ConstantLevelColorCurveOperation::init_execution() { - CurveBaseOperation::initExecution(); - inputFacProgram_ = this->getInputSocketReader(0); - inputImageProgram_ = this->getInputSocketReader(1); + CurveBaseOperation::init_execution(); + input_fac_program_ = this->get_input_socket_reader(0); + input_image_program_ = this->get_input_socket_reader(1); - BKE_curvemapping_premultiply(curveMapping_, 0); + BKE_curvemapping_premultiply(curve_mapping_, 0); - BKE_curvemapping_set_black_white(curveMapping_, black_, white_); + BKE_curvemapping_set_black_white(curve_mapping_, black_, white_); } -void ConstantLevelColorCurveOperation::executePixelSampled(float output[4], - float x, - float y, - PixelSampler sampler) +void ConstantLevelColorCurveOperation::execute_pixel_sampled(float output[4], + float x, + float y, + PixelSampler sampler) { float fac[4]; float image[4]; - inputFacProgram_->readSampled(fac, x, y, sampler); - inputImageProgram_->readSampled(image, x, y, sampler); + input_fac_program_->read_sampled(fac, x, y, sampler); + input_image_program_->read_sampled(image, x, y, sampler); if (*fac >= 1.0f) { - BKE_curvemapping_evaluate_premulRGBF(curveMapping_, output, image); + BKE_curvemapping_evaluate_premulRGBF(curve_mapping_, output, image); } else if (*fac <= 0.0f) { copy_v3_v3(output, image); } else { float col[4]; - BKE_curvemapping_evaluate_premulRGBF(curveMapping_, col, image); + BKE_curvemapping_evaluate_premulRGBF(curve_mapping_, col, image); interp_v3_v3v3(output, image, col, *fac); } output[3] = image[3]; } -void ConstantLevelColorCurveOperation::deinitExecution() +void ConstantLevelColorCurveOperation::deinit_execution() { - CurveBaseOperation::deinitExecution(); - inputFacProgram_ = nullptr; - inputImageProgram_ = nullptr; + CurveBaseOperation::deinit_execution(); + input_fac_program_ = nullptr; + input_image_program_ = nullptr; } void ConstantLevelColorCurveOperation::update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span<MemoryBuffer *> inputs) { - CurveMapping *cumap = curveMapping_; + CurveMapping *cumap = curve_mapping_; 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); |