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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-10 18:07:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-10 18:07:24 +0400
commit94a3945cf9de0913b75f83b26e2e62b3bc1b0c07 (patch)
tree89aeabd20d883137b69815d9580f3bc108531a7e /source/blender/compositor/operations/COM_GammaOperation.cpp
parente8772477894a6fd8c09488b488fdcc1af432da1b (diff)
code cleanup: compositor - define size for executePixel function output float array
Diffstat (limited to 'source/blender/compositor/operations/COM_GammaOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index 40c2ee0a1d4..326031c5984 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -37,7 +37,7 @@ void GammaOperation::initExecution()
this->m_inputGammaProgram = this->getInputSocketReader(1);
}
-void GammaOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void GammaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputValue[4];
float inputGamma[4];
@@ -46,11 +46,11 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s
this->m_inputGammaProgram->read(inputGamma, x, y, sampler);
const float gamma = inputGamma[0];
/* check for negative to avoid nan's */
- color[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
- color[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1];
- color[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2];
+ output[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
+ output[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1];
+ output[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2];
- color[3] = inputValue[3];
+ output[3] = inputValue[3];
}
void GammaOperation::deinitExecution()