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_ColorBalanceASCCDLOperation.cpp | |
parent | 69b95e1a8a00c9ff146d803b8ec11183d7a68908 (diff) |
style cleanup: compositor, pointer syntax, function brace placement, line length
Diffstat (limited to 'source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp index 317d84b0299..cc535cd95df 100644 --- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp @@ -33,7 +33,8 @@ inline float colorbalance_cdl(float in, float offset, float power, float slope) return powf(x, power); } -ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation(): NodeOperation() { +ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation(): NodeOperation() +{ this->addInputSocket(COM_DT_VALUE); this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); @@ -42,12 +43,14 @@ ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation(): NodeOperation() { this->setResolutionInputSocketIndex(1); } -void ColorBalanceASCCDLOperation::initExecution() { +void ColorBalanceASCCDLOperation::initExecution() +{ this->inputValueOperation = this->getInputSocketReader(0); this->inputColorOperation = this->getInputSocketReader(1); } -void ColorBalanceASCCDLOperation::executePixel(float* outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float inputColor[4]; float value[4]; @@ -56,7 +59,7 @@ void ColorBalanceASCCDLOperation::executePixel(float* outputColor, float x, floa float fac = value[0]; fac = min(1.0f, fac); - const float mfac= 1.0f - fac; + const float mfac = 1.0f - fac; outputColor[0] = mfac*inputColor[0] + fac * colorbalance_cdl(inputColor[0], this->lift[0], this->gamma[0], this->gain[0]); outputColor[1] = mfac*inputColor[1] + fac * colorbalance_cdl(inputColor[1], this->lift[1], this->gamma[1], this->gain[1]); @@ -65,7 +68,8 @@ void ColorBalanceASCCDLOperation::executePixel(float* outputColor, float x, floa } -void ColorBalanceASCCDLOperation::deinitExecution() { +void ColorBalanceASCCDLOperation::deinitExecution() +{ this->inputValueOperation = NULL; this->inputColorOperation = NULL; } |