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-05-17 17:44:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-17 17:44:15 +0400
commit979f6bab9c1aba27b8d018d1481987d841f68ee1 (patch)
tree162419d475bf68326b3b5e88b25f27057fee6831 /source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
parentfe0d1a381003408dedcd3142a727c77806617150 (diff)
style cleanup: braces, compositor
Diffstat (limited to 'source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index fef045481f7..fb617549b1c 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -63,15 +63,19 @@ void ColorCorrectionOperation::executePixel(float* output, float x, float y, Pix
#define MARGIN_DIV (0.5/MARGIN)
if ( level < this->data->startmidtones-MARGIN) {
levelShadows = 1.0f;
- } else if (level < this->data->startmidtones+MARGIN) {
+ }
+ else if (level < this->data->startmidtones+MARGIN) {
levelMidtones = ((level-this->data->startmidtones)*MARGIN_DIV)+0.5;
levelShadows = 1.0- levelMidtones;
- } else if (level < this->data->endmidtones-MARGIN) {
+ }
+ else if (level < this->data->endmidtones-MARGIN) {
levelMidtones = 1.0f;
- } else if (level < this->data->endmidtones+MARGIN) {
+ }
+ else if (level < this->data->endmidtones+MARGIN) {
levelHighlights = ((level-this->data->endmidtones)*MARGIN_DIV)+0.5;
levelMidtones = 1.0- levelHighlights;
- } else {
+ }
+ else {
levelHighlights = 1.0f;
}
#undef MARGIN
@@ -111,17 +115,20 @@ void ColorCorrectionOperation::executePixel(float* output, float x, float y, Pix
if (this->redChannelEnabled) {
output[0] = r;
- } else {
+ }
+ else {
output[0] = inputImageColor[0];
}
if (this->greenChannelEnabled) {
output[1] = g;
- } else {
+ }
+ else {
output[1] = inputImageColor[1];
}
if (this->blueChannelEnabled) {
output[2] = b;
- } else {
+ }
+ else {
output[2] = inputImageColor[2];
}
output[3] = inputImageColor[3];