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_KeyingClipOperation.cpp | |
parent | e8772477894a6fd8c09488b488fdcc1af432da1b (diff) |
code cleanup: compositor - define size for executePixel function output float array
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingClipOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingClipOperation.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp index d8afaceb37b..909eeed8937 100644 --- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp @@ -51,7 +51,7 @@ void *KeyingClipOperation::initializeTileData(rcti *rect) return buffer; } -void KeyingClipOperation::executePixel(float *color, int x, int y, void *data) +void KeyingClipOperation::executePixel(float output[4], int x, int y, void *data) { const int delta = this->m_kernelRadius; const float tolerance = this->m_kernelTolerance; @@ -92,20 +92,20 @@ void KeyingClipOperation::executePixel(float *color, int x, int y, void *data) if (this->m_isEdgeMatte) { if (ok) - color[0] = 0.0f; + output[0] = 0.0f; else - color[0] = 1.0f; + output[0] = 1.0f; } else { - color[0] = value; + output[0] = value; if (ok) { - if (color[0] < this->m_clipBlack) - color[0] = 0.0f; - else if (color[0] >= this->m_clipWhite) - color[0] = 1.0f; + if (output[0] < this->m_clipBlack) + output[0] = 0.0f; + else if (output[0] >= this->m_clipWhite) + output[0] = 1.0f; else - color[0] = (color[0] - this->m_clipBlack) / (this->m_clipWhite - this->m_clipBlack); + output[0] = (output[0] - this->m_clipBlack) / (this->m_clipWhite - this->m_clipBlack); } } } |