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-07-05 22:43:44 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-07-06 00:36:43 +0300
commit3d9ecf1cf26e5b55f1d961c9068e20c63d5c03b0 (patch)
tree24d7044b1ec22b50346b2757dd98ad8680180e1d /source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc
parent0c90aa097d0eb2f4faf91974113edb2b60599c9c (diff)
Compositor: Full frame Color Balance node
Adds full frame implementation to this node operations. No functional changes. 1.3x faster than tiled fallback. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11764
Diffstat (limited to 'source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc
index cac16a3f7b0..36307f0b136 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc
@@ -81,6 +81,23 @@ void ColorBalanceLGGOperation::executePixelSampled(float output[4],
output[3] = inputColor[3];
}
+void ColorBalanceLGGOperation::update_memory_buffer_row(PixelCursor &p)
+{
+ for (; p.out < p.row_end; p.next()) {
+ const float *in_factor = p.ins[0];
+ const float *in_color = p.ins[1];
+ const float fac = MIN2(1.0f, in_factor[0]);
+ const float fac_m = 1.0f - fac;
+ p.out[0] = fac_m * in_color[0] +
+ fac * colorbalance_lgg(in_color[0], m_lift[0], m_gamma_inv[0], m_gain[0]);
+ p.out[1] = fac_m * in_color[1] +
+ fac * colorbalance_lgg(in_color[1], m_lift[1], m_gamma_inv[1], m_gain[1]);
+ p.out[2] = fac_m * in_color[2] +
+ fac * colorbalance_lgg(in_color[2], m_lift[2], m_gamma_inv[2], m_gain[2]);
+ p.out[3] = in_color[3];
+ }
+}
+
void ColorBalanceLGGOperation::deinitExecution()
{
this->m_inputValueOperation = nullptr;