diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-10 18:07:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-10 18:07:24 +0400 |
commit | 94a3945cf9de0913b75f83b26e2e62b3bc1b0c07 (patch) | |
tree | 89aeabd20d883137b69815d9580f3bc108531a7e /source/blender/compositor/operations/COM_KeyingDespillOperation.cpp | |
parent | e8772477894a6fd8c09488b488fdcc1af432da1b (diff) |
code cleanup: compositor - define size for executePixel function output float array
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingDespillOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingDespillOperation.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp index 2f3fa2bd72a..4426666f100 100644 --- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp @@ -65,7 +65,7 @@ void KeyingDespillOperation::deinitExecution() this->m_screenReader = NULL; } -void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelSampler sampler) +void KeyingDespillOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { float pixelColor[4]; float screenColor[4]; @@ -85,12 +85,9 @@ void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelS average_value = this->m_colorBalance * pixelColor[min_channel] + (1.0f - this->m_colorBalance) * pixelColor[max_channel]; amount = (pixelColor[screen_primary_channel] - average_value); - color[0] = pixelColor[0]; - color[1] = pixelColor[1]; - color[2] = pixelColor[2]; - color[3] = pixelColor[3]; + copy_v4_v4(output, pixelColor); if (this->m_despillFactor * amount > 0) { - color[screen_primary_channel] = pixelColor[screen_primary_channel] - this->m_despillFactor * amount; + output[screen_primary_channel] = pixelColor[screen_primary_channel] - this->m_despillFactor * amount; } } |