diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-18 02:55:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-18 02:55:28 +0400 |
commit | 7862b2fa13c0437d9c17eae78e7b79a421dacf05 (patch) | |
tree | 08f9c26af3e71795d0f65803a415b5612d6b53ab /source/blender/compositor/operations/COM_ChromaMatteOperation.cpp | |
parent | 69b95e1a8a00c9ff146d803b8ec11183d7a68908 (diff) |
style cleanup: compositor, pointer syntax, function brace placement, line length
Diffstat (limited to 'source/blender/compositor/operations/COM_ChromaMatteOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ChromaMatteOperation.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp index 9556b673c0f..e082ffed2b6 100644 --- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp @@ -22,7 +22,8 @@ #include "COM_ChromaMatteOperation.h" #include "BLI_math.h" -ChromaMatteOperation::ChromaMatteOperation(): NodeOperation() { +ChromaMatteOperation::ChromaMatteOperation(): NodeOperation() +{ addInputSocket(COM_DT_COLOR); addInputSocket(COM_DT_COLOR); addOutputSocket(COM_DT_VALUE); @@ -31,17 +32,20 @@ ChromaMatteOperation::ChromaMatteOperation(): NodeOperation() { inputKeyProgram = NULL; } -void ChromaMatteOperation::initExecution() { +void ChromaMatteOperation::initExecution() +{ this->inputImageProgram = this->getInputSocketReader(0); this->inputKeyProgram = this->getInputSocketReader(1); } -void ChromaMatteOperation::deinitExecution() { - this->inputImageProgram= NULL; - this->inputKeyProgram= NULL; +void ChromaMatteOperation::deinitExecution() +{ + this->inputImageProgram = NULL; + this->inputKeyProgram = NULL; } -void ChromaMatteOperation::executePixel(float* outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float inKey[4]; float inImage[4]; @@ -70,7 +74,7 @@ void ChromaMatteOperation::executePixel(float* outputValue, float x, float y, Pi /*if within the acceptance angle */ /* if kfg is <0 then the pixel is outside of the key color */ - kfg= x_angle-(fabsf(z_angle)/tanf(acceptance/2.f)); + kfg = x_angle-(fabsf(z_angle)/tanf(acceptance/2.f)); if (kfg>0.f) { /* found a pixel that is within key color */ alpha=(1.f-kfg)*(gain); |