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_KeyingOperation.cpp
parente8772477894a6fd8c09488b488fdcc1af432da1b (diff)
code cleanup: compositor - define size for executePixel function output float array
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index ed9e4f1df16..35138cf0b92 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -77,7 +77,7 @@ void KeyingOperation::deinitExecution()
this->m_screenReader = NULL;
}
-void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void KeyingOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float pixelColor[4];
float screenColor[4];
@@ -93,7 +93,7 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
* because saturation and falloff calculation is based on the fact
* that pixels are not overexposured
*/
- color[0] = 1.0f;
+ output[0] = 1.0f;
}
else {
float saturation = get_pixel_saturation(pixelColor, this->m_screenBalance, primary_channel);
@@ -103,19 +103,19 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
/* means main channel of pixel is different from screen,
* assume this is completely a foreground
*/
- color[0] = 1.0f;
+ output[0] = 1.0f;
}
else if (saturation >= screen_saturation) {
/* matched main channels and higher saturation on pixel
* is treated as completely background
*/
- color[0] = 0.0f;
+ output[0] = 0.0f;
}
else {
/* nice alpha falloff on edges */
float distance = 1.0f - saturation / screen_saturation;
- color[0] = distance;
+ output[0] = distance;
}
}
}