[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47975] trunk/blender/source/blender/ compositor: style cleanup: compositor operations
Campbell Barton
ideasman42 at gmail.com
Fri Jun 15 20:42:03 CEST 2012
Revision: 47975
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47975
Author: campbellbarton
Date: 2012-06-15 18:42:03 +0000 (Fri, 15 Jun 2012)
Log Message:
-----------
style cleanup: compositor operations
Modified Paths:
--------------
trunk/blender/source/blender/compositor/intern/COM_OpenCLDevice.h
trunk/blender/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BokehImageOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BrightnessOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorRampOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CropOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DisplaceOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DotproductOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_FlipOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_GammaOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
trunk/blender/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_IDMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ImageOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_InvertOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MapUVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MapValueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MathBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixAddOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixBlendOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixBurnOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixColorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixDivideOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixGlareOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixHueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixLightenOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixScreenOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixValueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MovieClipOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_NormalizeOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_OutputFileOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_PreviewOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_QualityStepHelper.cpp
trunk/blender/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RotateOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetColorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetValueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetVectorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_TextureOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_TonemapOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_TranslateOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ZCombineOperation.cpp
Modified: trunk/blender/source/blender/compositor/intern/COM_OpenCLDevice.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_OpenCLDevice.h 2012-06-15 18:31:46 UTC (rev 47974)
+++ trunk/blender/source/blender/compositor/intern/COM_OpenCLDevice.h 2012-06-15 18:42:03 UTC (rev 47975)
@@ -37,29 +37,29 @@
class OpenCLDevice : public Device {
private:
/**
- *@brief opencl context
+ * @brief opencl context
*/
cl_context context;
/**
- *@brief opencl device
+ * @brief opencl device
*/
cl_device_id device;
/**
- *@brief opencl program
+ * @brief opencl program
*/
cl_program program;
/**
- *@brief opencl command queue
+ * @brief opencl command queue
*/
cl_command_queue queue;
public:
/**
- *@brief constructor with opencl device
- *@param context
- *@param device
+ * @brief constructor with opencl device
+ * @param context
+ * @param device
*/
OpenCLDevice(cl_context context, cl_device_id device, cl_program program);
Modified: trunk/blender/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp 2012-06-15 18:31:46 UTC (rev 47974)
+++ trunk/blender/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp 2012-06-15 18:42:03 UTC (rev 47975)
@@ -22,7 +22,7 @@
#include "COM_AlphaOverKeyOperation.h"
-AlphaOverKeyOperation::AlphaOverKeyOperation(): MixBaseOperation()
+AlphaOverKeyOperation::AlphaOverKeyOperation() : MixBaseOperation()
{
/* pass */
}
@@ -44,12 +44,12 @@
copy_v4_v4(outputValue, inputOverColor);
}
else {
- float premul = value[0]*inputOverColor[3];
+ float premul = value[0] * inputOverColor[3];
float mul = 1.0f - premul;
- outputValue[0] = (mul*inputColor1[0]) + premul*inputOverColor[0];
- outputValue[1] = (mul*inputColor1[1]) + premul*inputOverColor[1];
- outputValue[2] = (mul*inputColor1[2]) + premul*inputOverColor[2];
- outputValue[3] = (mul*inputColor1[3]) + value[0]*inputOverColor[3];
+ outputValue[0] = (mul * inputColor1[0]) + premul * inputOverColor[0];
+ outputValue[1] = (mul * inputColor1[1]) + premul * inputOverColor[1];
+ outputValue[2] = (mul * inputColor1[2]) + premul * inputOverColor[2];
+ outputValue[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
}
}
Modified: trunk/blender/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp 2012-06-15 18:31:46 UTC (rev 47974)
+++ trunk/blender/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp 2012-06-15 18:42:03 UTC (rev 47975)
@@ -22,7 +22,7 @@
#include "COM_AlphaOverMixedOperation.h"
-AlphaOverMixedOperation::AlphaOverMixedOperation(): MixBaseOperation()
+AlphaOverMixedOperation::AlphaOverMixedOperation() : MixBaseOperation()
{
this->x = 0.0f;
}
@@ -44,14 +44,14 @@
copy_v4_v4(outputValue, inputOverColor);
}
else {
- float addfac = 1.0f - this->x + inputOverColor[3]*this->x;
- float premul = value[0]*addfac;
- float mul = 1.0f - value[0]*inputOverColor[3];
-
- outputValue[0] = (mul*inputColor1[0]) + premul*inputOverColor[0];
- outputValue[1] = (mul*inputColor1[1]) + premul*inputOverColor[1];
- outputValue[2] = (mul*inputColor1[2]) + premul*inputOverColor[2];
- outputValue[3] = (mul*inputColor1[3]) + value[0]*inputOverColor[3];
+ float addfac = 1.0f - this->x + inputOverColor[3] * this->x;
+ float premul = value[0] * addfac;
+ float mul = 1.0f - value[0] * inputOverColor[3];
+
+ outputValue[0] = (mul * inputColor1[0]) + premul * inputOverColor[0];
+ outputValue[1] = (mul * inputColor1[1]) + premul * inputOverColor[1];
+ outputValue[2] = (mul * inputColor1[2]) + premul * inputOverColor[2];
+ outputValue[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
}
}
Modified: trunk/blender/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp 2012-06-15 18:31:46 UTC (rev 47974)
+++ trunk/blender/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp 2012-06-15 18:42:03 UTC (rev 47975)
@@ -22,7 +22,7 @@
#include "COM_AlphaOverPremultiplyOperation.h"
-AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation(): MixBaseOperation()
+AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() : MixBaseOperation()
{
/* pass */
}
@@ -38,19 +38,19 @@
inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
/* Zero alpha values should still permit an add of RGB data */
- if (inputOverColor[3]<0.0f) {
+ if (inputOverColor[3] < 0.0f) {
copy_v4_v4(outputValue, inputColor1);
}
else if (value[0] == 1.0f && inputOverColor[3] >= 1.0f) {
copy_v4_v4(outputValue, inputOverColor);
}
else {
- float mul = 1.0f - value[0]*inputOverColor[3];
+ float mul = 1.0f - value[0] * inputOverColor[3];
- outputValue[0] = (mul*inputColor1[0]) + value[0]*inputOverColor[0];
- outputValue[1] = (mul*inputColor1[1]) + value[0]*inputOverColor[1];
- outputValue[2] = (mul*inputColor1[2]) + value[0]*inputOverColor[2];
- outputValue[3] = (mul*inputColor1[3]) + value[0]*inputOverColor[3];
+ outputValue[0] = (mul * inputColor1[0]) + value[0] * inputOverColor[0];
+ outputValue[1] = (mul * inputColor1[1]) + value[0] * inputOverColor[1];
+ outputValue[2] = (mul * inputColor1[2]) + value[0] * inputOverColor[2];
+ outputValue[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
}
}
Modified: trunk/blender/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_AntiAliasOperation.cpp 2012-06-15 18:31:46 UTC (rev 47974)
+++ trunk/blender/source/blender/compositor/operations/COM_AntiAliasOperation.cpp 2012-06-15 18:42:03 UTC (rev 47975)
@@ -28,7 +28,7 @@
}
-AntiAliasOperation::AntiAliasOperation(): NodeOperation()
+AntiAliasOperation::AntiAliasOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
@@ -42,14 +42,14 @@
NodeOperation::initMutex();
}
-void AntiAliasOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void * data)
+void AntiAliasOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
if (y < 0 || (unsigned int)y >= this->height || x < 0 || (unsigned int)x >= this->width) {
color[0] = 0.0f;
}
else {
- int offset = y*this->width + x;
- color[0] = buffer[offset]/255.0f;
+ int offset = y * this->width + x;
+ color[0] = buffer[offset] / 255.0f;
}
}
@@ -84,17 +84,17 @@
void *AntiAliasOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->buffer) {return buffer;}
+ if (this->buffer) {return buffer; }
lockMutex();
if (this->buffer == NULL) {
- MemoryBuffer *tile = (MemoryBuffer*)valueReader->initializeTileData(rect, memoryBuffers);
- int size = tile->getHeight()*tile->getWidth();
- float * input = tile->getBuffer();
+ MemoryBuffer *tile = (MemoryBuffer *)valueReader->initializeTileData(rect, memoryBuffers);
+ int size = tile->getHeight() * tile->getWidth();
+ float *input = tile->getBuffer();
char *valuebuffer = new char[size];
- for (int i = 0 ; i < size ; i ++) {
+ for (int i = 0; i < size; i++) {
float in = input[i * COM_NUMBER_OF_CHANNELS];
- if (in < 0.0f) { in = 0.0f;}
- if (in > 1.0f) {in = 1.0f;}
+ if (in < 0.0f) { in = 0.0f; }
+ if (in > 1.0f) {in = 1.0f; }
valuebuffer[i] = in * 255;
}
antialias_tagbuf(tile->getWidth(), tile->getHeight(), valuebuffer);
Modified: trunk/blender/source/blender/compositor/operations/COM_BokehImageOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_BokehImageOperation.cpp 2012-06-15 18:31:46 UTC (rev 47974)
+++ trunk/blender/source/blender/compositor/operations/COM_BokehImageOperation.cpp 2012-06-15 18:42:03 UTC (rev 47975)
@@ -23,7 +23,7 @@
#include "COM_BokehImageOperation.h"
#include "BLI_math.h"
-BokehImageOperation::BokehImageOperation(): NodeOperation()
+BokehImageOperation::BokehImageOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_COLOR);
this->deleteData = false;
@@ -35,7 +35,7 @@
this->center[0] = this->centerX;
this->center[1] = this->centerY;
this->inverseRounding = 1.0f - this->data->rounding;
- this->circularDistance = getWidth()/2;
+ this->circularDistance = getWidth() / 2;
this->flapRad = (float)(M_PI * 2) / this->data->flaps;
this->flapRadAdd = (this->data->angle / 360.0f) * (float)(M_PI * 2.0);
while (this->flapRadAdd < 0.0f) {
@@ -64,19 +64,19 @@
const float distanceToCenter = len_v2v2(point, center);
const float bearing = (atan2f(deltaX, deltaY) + (float)(M_PI * 2.0));
- int flapNumber = (int)((bearing-flapRadAdd)/flapRad);
+ int flapNumber = (int)((bearing - flapRadAdd) / flapRad);
detemineStartPointOfFlap(lineP1, flapNumber, distance);
- detemineStartPointOfFlap(lineP2, flapNumber+1, distance);
+ detemineStartPointOfFlap(lineP2, flapNumber + 1, distance);
closest_to_line_v2(closestPoint, point, lineP1, lineP2);
const float distanceLineToCenter = len_v2v2(center, closestPoint);
- const float distanceRoundingToCenter = inverseRounding*distanceLineToCenter+this->data->rounding*distance;
+ const float distanceRoundingToCenter = inverseRounding * distanceLineToCenter + this->data->rounding * distance;
const float catadioptricDistanceToCenter = distanceRoundingToCenter * this->data->catadioptric;
- if (distanceRoundingToCenter>=distanceToCenter && catadioptricDistanceToCenter <= distanceToCenter) {
+ if (distanceRoundingToCenter >= distanceToCenter && catadioptricDistanceToCenter <= distanceToCenter) {
if (distanceRoundingToCenter - distanceToCenter < 1.0f) {
- insideBokeh = (distanceRoundingToCenter-distanceToCenter);
+ insideBokeh = (distanceRoundingToCenter - distanceToCenter);
}
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list