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-11-01 13:54:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-01 13:54:00 +0400
commitf213ae0b19e55a5a17216dea4c4769ca6d7a0a38 (patch)
treeb5d895595d3f83b28097b20695fbc5630df6bd84 /source/blender/compositor
parentbd574fe2a265538efa80ff3eb1c8606be4f3629c (diff)
style cleanup
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp4
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h5
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_ViewerNode.cpp3
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.h5
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp15
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ViewerBaseOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp3
11 files changed, 31 insertions, 34 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index bdbe21f82ea..357a4c1d4c0 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -160,7 +160,7 @@ void MemoryBuffer::writePixel(int x, int y, const float color[4])
if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
y >= this->m_rect.ymin && y < this->m_rect.ymax)
{
- const int offset = (this->m_chunkWidth * (y-this->m_rect.ymin) + x-this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
+ const int offset = (this->m_chunkWidth * (y - this->m_rect.ymin) + x - this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
copy_v4_v4(&this->m_buffer[offset], color);
}
}
@@ -170,7 +170,7 @@ void MemoryBuffer::addPixel(int x, int y, const float color[4])
if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
y >= this->m_rect.ymin && y < this->m_rect.ymax)
{
- const int offset = (this->m_chunkWidth * (y-this->m_rect.ymin) + x-this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
+ const int offset = (this->m_chunkWidth * (y - this->m_rect.ymin) + x - this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
add_v4_v4(&this->m_buffer[offset], color);
}
}
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index 9964c27bd46..42d90eca38f 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -163,7 +163,10 @@ public:
* @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution
* @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution
*/
- virtual void executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) {}
+ virtual void executeOpenCL(OpenCLDevice *device,
+ MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
+ MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
+ list<cl_kernel> *clKernelsToCleanUp) {}
virtual void deinitExecution();
bool isResolutionSet() {
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index e9767c41230..724abb59bcf 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -106,13 +106,11 @@ void **g_highlightedNodesRead;
void COM_startReadHighlights()
{
- if (!g_highlightInitialized)
- {
+ if (!g_highlightInitialized) {
return;
}
- if (g_highlightedNodesRead)
- {
+ if (g_highlightedNodesRead) {
MEM_freeN(g_highlightedNodesRead);
}
diff --git a/source/blender/compositor/nodes/COM_ViewerNode.cpp b/source/blender/compositor/nodes/COM_ViewerNode.cpp
index d67e9e274b0..f44470a9b9a 100644
--- a/source/blender/compositor/nodes/COM_ViewerNode.cpp
+++ b/source/blender/compositor/nodes/COM_ViewerNode.cpp
@@ -52,8 +52,7 @@ void ViewerNode::convertToOperations(ExecutionSystem *graph, CompositorContext *
viewerOperation->setDisplaySettings(context->getDisplaySettings());
viewerOperation->setResolutionInputSocketIndex(0);
- if (!imageSocket->isConnected())
- {
+ if (!imageSocket->isConnected()) {
if (alphaSocket->isConnected()) {
viewerOperation->setResolutionInputSocketIndex(1);
}
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.h b/source/blender/compositor/operations/COM_BokehBlurOperation.h
index 37483d3dc69..74ca6b7b058 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.h
@@ -59,6 +59,9 @@ public:
void setSize(float size) { this->m_size = size; this->m_sizeavailable = true; }
- void executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp);
+ void executeOpenCL(OpenCLDevice *device,
+ MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
+ MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
+ list<cl_kernel> *clKernelsToCleanUp);
};
#endif
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index 44bce6308e8..2d662c1061e 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -236,7 +236,7 @@ void GaussianBlurReferenceOperation::initExecution()
/* horizontal */
m_radx = (float)this->m_data->sizex;
- int imgx = getWidth()/2;
+ int imgx = getWidth() / 2;
if (m_radx > imgx)
m_radx = imgx;
else if (m_radx < 1)
@@ -245,7 +245,7 @@ void GaussianBlurReferenceOperation::initExecution()
/* vertical */
m_rady = (float)this->m_data->sizey;
- int imgy = getHeight()/2;
+ int imgy = getHeight() / 2;
if (m_rady > imgy)
m_rady = imgy;
else if (m_rady < 1)
@@ -344,8 +344,8 @@ bool GaussianBlurReferenceOperation::determineDependingAreaOfInterest(rcti *inpu
return true;
}
else {
- int addx = this->m_data->sizex+2;
- int addy = this->m_data->sizey+2;
+ int addx = this->m_data->sizex + 2;
+ int addy = this->m_data->sizey + 2;
newInput.xmax = input->xmax + addx;
newInput.xmin = input->xmin - addx;
newInput.ymax = input->ymax + addy;
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index 0af5ec2d06c..df48c7a6716 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -33,8 +33,7 @@ vector<DistortionCache *> s_cache;
void deintializeDistortionCache(void)
{
- while (s_cache.size()>0)
- {
+ while (s_cache.size() > 0) {
DistortionCache * cache = s_cache.back();
s_cache.pop_back();
delete cache;
@@ -61,8 +60,7 @@ void MovieDistortionOperation::initExecution()
BKE_movieclip_user_set_frame(&clipUser, this->m_framenumber);
BKE_movieclip_get_size(this->m_movieClip, &clipUser, &calibration_width, &calibration_height);
- for (unsigned int i = 0; i < s_cache.size(); i++)
- {
+ for (unsigned int i = 0; i < s_cache.size(); i++) {
DistortionCache *c = (DistortionCache *)s_cache[i];
if (c->isCacheFor(this->m_movieClip, this->m_width, this->m_height,
calibration_width, calibration_height, this->m_distortion))
@@ -86,15 +84,12 @@ void MovieDistortionOperation::deinitExecution()
{
this->m_inputOperation = NULL;
this->m_movieClip = NULL;
- while (s_cache.size() > COM_DISTORTIONCACHE_MAXSIZE)
- {
+ while (s_cache.size() > COM_DISTORTIONCACHE_MAXSIZE) {
double minTime = PIL_check_seconds_timer();
vector<DistortionCache*>::iterator minTimeIterator = s_cache.begin();
- for (vector<DistortionCache*>::iterator it = s_cache.begin(); it < s_cache.end(); it ++)
- {
+ for (vector<DistortionCache*>::iterator it = s_cache.begin(); it < s_cache.end(); it ++) {
DistortionCache * cache = *it;
- if (cache->getTimeLastUsage()<minTime)
- {
+ if (cache->getTimeLastUsage() < minTime) {
minTime = cache->getTimeLastUsage();
minTimeIterator = it;
}
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 00e35f2c9d8..5cc02a1ed65 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -81,7 +81,7 @@ bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *in
}
else {
rcti dispInput;
- BLI_rcti_init(&dispInput, 0,5,0,5);
+ BLI_rcti_init(&dispInput, 0, 5, 0, 5);
if (this->getInputOperation(1)->determineDependingAreaOfInterest(&dispInput, readOperation, output)) {
return true;
}
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index 52a9e2a4d8c..61720c7676d 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -118,7 +118,7 @@ void VariableSizeBokehBlurOperation::executePixel(float output[4], int x, int y,
#ifdef COM_DEFOCUS_SEARCH
float search[4];
- this->m_inputSearchProgram->read(search, x/InverseSearchRadiusOperation::DIVIDER, y / InverseSearchRadiusOperation::DIVIDER, NULL);
+ this->m_inputSearchProgram->read(search, x / InverseSearchRadiusOperation::DIVIDER, y / InverseSearchRadiusOperation::DIVIDER, NULL);
int minx = search[0];
int miny = search[1];
int maxx = search[2];
@@ -298,9 +298,9 @@ voi *InverseSearchRadiusOperation::initializeTileData(rcti *rect)
int rx = x * DIVIDER;
int ry = y * DIVIDER;
buffer[offset] = MAX2(rx - m_maxBlur, 0);
- buffer[offset+1] = MAX2(ry- m_maxBlur, 0);
- buffer[offset+2] = MIN2(rx+DIVIDER + m_maxBlur, width);
- buffer[offset+3] = MIN2(ry+DIVIDER + m_maxBlur, height);
+ buffer[offset + 1] = MAX2(ry - m_maxBlur, 0);
+ buffer[offset + 2] = MIN2(rx + DIVIDER + m_maxBlur, width);
+ buffer[offset + 3] = MIN2(ry + DIVIDER + m_maxBlur, height);
offset += 4;
}
}
diff --git a/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp b/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
index 55a001530ee..4d4c1199f3e 100644
--- a/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
@@ -79,8 +79,7 @@ void ViewerBaseOperation::initImage()
BLI_unlock_thread(LOCK_DRAW_IMAGE);
}
- if (m_doDepthBuffer)
- {
+ if (m_doDepthBuffer) {
addzbuffloatImBuf(ibuf);
}
BLI_unlock_thread(LOCK_DRAW_IMAGE);
@@ -96,8 +95,7 @@ void ViewerBaseOperation::initImage()
*/
this->m_ibuf = ibuf;
- if (m_doDepthBuffer)
- {
+ if (m_doDepthBuffer) {
this->m_depthBuffer = ibuf->zbuf_float;
}
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 273c10b60ac..17c8f4d9fd1 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -110,7 +110,8 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber)
memoryBuffer->setCreatedState();
}
-void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, unsigned int chunkNumber, MemoryBuffer **inputMemoryBuffers, MemoryBuffer *outputBuffer)
+void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, unsigned int chunkNumber,
+ MemoryBuffer **inputMemoryBuffers, MemoryBuffer *outputBuffer)
{
float *outputFloatBuffer = outputBuffer->getBuffer();
cl_int error;