diff options
Diffstat (limited to 'source/blender/compositor/operations')
4 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp index 0a257b22ab8..45750244d87 100644 --- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp @@ -64,7 +64,7 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix float levelHighlights = 0.0; #define MARGIN 0.10 #define MARGIN_DIV (0.5/MARGIN) - if ( level < this->data->startmidtones-MARGIN) { + if (level < this->data->startmidtones-MARGIN) { levelShadows = 1.0f; } else if (level < this->data->startmidtones+MARGIN) { @@ -95,9 +95,9 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix float invgamma = 1.0f/gamma; float luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; - r = ( luma + saturation * (r - luma)); - g = ( luma + saturation * (g - luma)); - b = ( luma + saturation * (b - luma)); + r = (luma + saturation * (r - luma)); + g = (luma + saturation * (g - luma)); + b = (luma + saturation * (b - luma)); CLAMP (r, 0.0f, 1.0f); CLAMP (g, 0.0f, 1.0f); CLAMP (b, 0.0f, 1.0f); diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index 8b343374f1c..5a919965ede 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -74,7 +74,8 @@ void CompositorOperation::deinitExecution() re = NULL; } BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE); - } else { + } + else { if (this->outputBuffer) { MEM_freeN(this->outputBuffer); } diff --git a/source/blender/compositor/operations/COM_LensGhostOperation.cpp b/source/blender/compositor/operations/COM_LensGhostOperation.cpp index e99bbb536f7..bbf6df6c1e5 100644 --- a/source/blender/compositor/operations/COM_LensGhostOperation.cpp +++ b/source/blender/compositor/operations/COM_LensGhostOperation.cpp @@ -314,24 +314,24 @@ public: float rs01 = -sin(theta0-theta1)/sin(theta0+theta1); float rp01 = tan( theta0-theta1)/tan(theta0+theta1); - float ts01 = 2 * sin ( theta1 ) * cos ( theta0 ) / sin ( theta0+theta1 ) ; + float ts01 = 2 * sin( theta1 ) * cos( theta0 ) / sin( theta0+theta1 ) ; float tp01 = ts01*cos(theta0-theta1); // amplitude for inner reflection - float rs12 = -sin ( theta1-theta2 ) / sin ( theta1+theta2 ) ; - float rp12 = +tan ( theta1-theta2 ) / tan ( theta1+theta2 ) ; + float rs12 = -sin( theta1-theta2 ) / sin( theta1+theta2 ) ; + float rp12 = +tan( theta1-theta2 ) / tan( theta1+theta2 ) ; // after passing through first surface twice : // 2 transmissions and 1 reflection float ris = ts01 * ts01 * rs12 ; float rip = tp01 * tp01 * rp12 ; // phase difference between outer and inner reflections float dy = d1 * n1 ; - float dx = tan ( theta1 ) * dy ; - float delay = sqrt ( dx * dx+dy * dy ) ; - float relPhase = 4 * M_PI / lambda * ( delay-dx * sin ( theta0 ) ) ; + float dx = tan( theta1 ) * dy ; + float delay = sqrt( dx * dx+dy * dy ) ; + float relPhase = 4 * M_PI / lambda * ( delay-dx * sin( theta0 ) ) ; // Add up sines of different phase and amplitude - float out_s2 = rs01 * rs01 + ris * ris + 2 * rs01 * ris * cos ( relPhase ) ; - float out_p2 = rp01 * rp01 + rip * rip + 2 * rp01 * rip * cos ( relPhase ) ; - return ( out_s2+out_p2 ) / 2 ; + float out_s2 = rs01 * rs01 + ris * ris + 2 * rs01 * ris * cos( relPhase ) ; + float out_p2 = rp01 * rp01 + rip * rip + 2 * rp01 * rip * cos( relPhase ) ; + return (out_s2 + out_p2) / 2 ; } void detectHit(Ray *result, Ray *inputRay, Bounce *bounce) { diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp index 2f315855652..3a287cb7239 100644 --- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp @@ -174,7 +174,7 @@ void MathPowerOperation::executePixel(float *outputValue, float x, float y, Pixe inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers); inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers); - if ( inputValue1[0] >= 0 ) { + if (inputValue1[0] >= 0) { outputValue[0] = pow(inputValue1[0], inputValue2[0]); } else { @@ -197,7 +197,7 @@ void MathLogarithmOperation::executePixel(float *outputValue, float x, float y, inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers); inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers); - if ( inputValue1[0] > 0 && inputValue2[0] > 0 ) + if (inputValue1[0] > 0 && inputValue2[0] > 0) outputValue[0] = log(inputValue1[0]) / log(inputValue2[0]); else outputValue[0] = 0.0; |