[Bf-blender-cvs] [0563280] tiles-scheduler: Compositor squashed patch reapplied
Jeroen Bakker
noreply at git.blender.org
Wed May 21 16:01:21 CEST 2014
Commit: 0563280bff35652a599ff5758f76a7ac5048d728
Author: Jeroen Bakker
Date: Tue Apr 15 19:11:05 2014 +0200
https://developer.blender.org/rB0563280bff35652a599ff5758f76a7ac5048d728
Compositor squashed patch reapplied
Started with the MemoryBufferValue
still a lot needs to be done
stopped at testing the dilate/erode
TILES: did some fixed for value buffer
Determine image format of OpenCL device
TILES: TextureNode fix
TILES: moved buffer sizes to constants for easy access.
TILES: fixed some nodes.
still working on the defocus node
TILES: fixed glare, keying, defocus, normalize, vector curves
===================================================================
M source/blender/compositor/CMakeLists.txt
M source/blender/compositor/COM_defines.h
D source/blender/compositor/intern/COM_ChannelInfo.cpp
D source/blender/compositor/intern/COM_ChannelInfo.h
M source/blender/compositor/intern/COM_ExecutionGroup.cpp
M source/blender/compositor/intern/COM_ExecutionSystem.cpp
M source/blender/compositor/intern/COM_MemoryBuffer.cpp
M source/blender/compositor/intern/COM_MemoryBuffer.h
A source/blender/compositor/intern/COM_MemoryBufferColor.cpp
A source/blender/compositor/intern/COM_MemoryBufferColor.h
A source/blender/compositor/intern/COM_MemoryBufferValue.cpp
A source/blender/compositor/intern/COM_MemoryBufferValue.h
A source/blender/compositor/intern/COM_MemoryBufferVector.cpp
A source/blender/compositor/intern/COM_MemoryBufferVector.h
M source/blender/compositor/intern/COM_MemoryProxy.cpp
M source/blender/compositor/intern/COM_MemoryProxy.h
M source/blender/compositor/intern/COM_OpenCLDevice.cpp
M source/blender/compositor/intern/COM_OpenCLDevice.h
M source/blender/compositor/intern/COM_OutputSocket.h
M source/blender/compositor/intern/COM_SocketConnection.h
M source/blender/compositor/nodes/COM_SocketProxyNode.cpp
M source/blender/compositor/nodes/COM_TranslateNode.cpp
M source/blender/compositor/operations/COM_AntiAliasOperation.cpp
M source/blender/compositor/operations/COM_CompositorOperation.cpp
M source/blender/compositor/operations/COM_ConvertOperation.cpp
M source/blender/compositor/operations/COM_DilateErodeOperation.cpp
M source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
M source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
M source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
M source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
M source/blender/compositor/operations/COM_GlareBaseOperation.cpp
M source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
M source/blender/compositor/operations/COM_GlareGhostOperation.cpp
M source/blender/compositor/operations/COM_GlareStreaksOperation.cpp
M source/blender/compositor/operations/COM_InpaintOperation.cpp
M source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
M source/blender/compositor/operations/COM_KeyingClipOperation.cpp
M source/blender/compositor/operations/COM_MapUVOperation.cpp
M source/blender/compositor/operations/COM_NormalizeOperation.cpp
M source/blender/compositor/operations/COM_QualityStepHelper.cpp
M source/blender/compositor/operations/COM_ReadBufferOperation.cpp
M source/blender/compositor/operations/COM_ReadBufferOperation.h
M source/blender/compositor/operations/COM_RenderLayersProg.cpp
M source/blender/compositor/operations/COM_SetVectorOperation.cpp
M source/blender/compositor/operations/COM_TextureOperation.cpp
M source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
M source/blender/compositor/operations/COM_VectorBlurOperation.cpp
M source/blender/compositor/operations/COM_VectorCurveOperation.cpp
M source/blender/compositor/operations/COM_WrapOperation.cpp
M source/blender/compositor/operations/COM_WrapOperation.h
M source/blender/compositor/operations/COM_WriteBufferOperation.cpp
M source/blender/compositor/operations/COM_WriteBufferOperation.h
===================================================================
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index cbb1017..1ab0820 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -80,7 +80,10 @@ set(SRC
intern/COM_MemoryProxy.h
intern/COM_MemoryBuffer.cpp
intern/COM_MemoryBuffer.h
- intern/COM_WorkScheduler.cpp
+ intern/COM_MemoryBufferColor
+ intern/COM_MemoryBufferVector
+ intern/COM_MemoryBufferValue
+ intern/COM_WorkScheduler.cpp
intern/COM_WorkScheduler.h
intern/COM_WorkPackage.cpp
intern/COM_WorkPackage.h
@@ -96,8 +99,6 @@ set(SRC
intern/COM_OpenCLDevice.h
intern/COM_CompositorContext.cpp
intern/COM_CompositorContext.h
- intern/COM_ChannelInfo.cpp
- intern/COM_ChannelInfo.h
intern/COM_SingleThreadedNodeOperation.cpp
intern/COM_SingleThreadedNodeOperation.h
intern/COM_Debug.cpp
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index 6c07aad..f3e224a 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -105,7 +105,9 @@ typedef enum OrderOfChunks {
#define COM_RULE_OF_THIRDS_DIVIDER 100.0f
-#define COM_NUMBER_OF_CHANNELS 4
+#define COM_NO_CHANNELS_VALUE 1
+#define COM_NO_CHANNELS_VECTOR 3
+#define COM_NO_CHANNELS_COLOR 4
#define COM_BLUR_BOKEH_PIXELS 512
diff --git a/source/blender/compositor/intern/COM_ChannelInfo.cpp b/source/blender/compositor/intern/COM_ChannelInfo.cpp
deleted file mode 100644
index 557075c..0000000
--- a/source/blender/compositor/intern/COM_ChannelInfo.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_ChannelInfo.h"
-#include "COM_defines.h"
-#include <stdio.h>
-
-/**
- * @brief create new ChannelInfo instance and sets the defaults.
- */
-ChannelInfo::ChannelInfo()
-{
- this->m_number = 0;
- this->m_premultiplied = true;
- this->m_type = COM_CT_UNUSED;
-}
diff --git a/source/blender/compositor/intern/COM_ChannelInfo.h b/source/blender/compositor/intern/COM_ChannelInfo.h
deleted file mode 100644
index 4466444..0000000
--- a/source/blender/compositor/intern/COM_ChannelInfo.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_ChannelInfo_h
-#define _COM_ChannelInfo_h
-
-#include <vector>
-#include "BKE_text.h"
-#include <string>
-#include "DNA_node_types.h"
-#include "BLI_rect.h"
-
-using namespace std;
-
-/**
- * @brief List of possible channel types
- * @ingroup Model
- */
-typedef enum ChannelType {
- COM_CT_ColorComponent /** @brief this channel is contains color information. Specific used is determined by channelnumber, and in the future color space */,
- COM_CT_Alpha /** @brief this channel is contains transparency value */,
- COM_CT_Value /** @brief this channel is contains a value */,
- COM_CT_X /** @brief this channel is contains a X value */,
- COM_CT_Y /** @brief this channel is contains a Y value */,
- COM_CT_Z /** @brief this channel is contains a Z value */,
- COM_CT_W /** @brief this channel is contains a W value */,
- COM_CT_UNUSED /** @brief this channel is unused */
-} ChannelType;
-
-/**
- * @brief ChannelInfo holds information about a channel.
- *
- * Channels are transported from node to node via a SocketConnection.
- * ChannelInfo holds specific setting of these channels in order that the to-node of the connection
- * Can handle specific logic per channel setting.
- *
- * @note currently this is not used, but a future place to implement color spacing and other things.
- * @ingroup Model
- */
-class ChannelInfo {
-private:
- /**
- * @brief the channel number, in the connection. [0-3]
- */
- int m_number;
-
- /**
- * @brief type of channel
- */
- ChannelType m_type;
-
- /**
- * @brieg Is this value in this channel premultiplied with its alpha
- * @note only valid if type = ColorComponent;
- */
- bool m_premultiplied;
-
-// /**
-// * Color space of this value.
-// * only valid when type = ColorComponent;
-// */
-// string colorspacename;
-
-public:
- /**
- * @brief creates a new ChannelInfo and set default values
- */
- ChannelInfo();
-
- /**
- * @brief set the index of this channel in the SocketConnection
- */
- void setNumber(const int number) { this->m_number = number; }
-
- /**
- * @brief get the index of this channel in the SocketConnection
- */
- const int getNumber() const { return this->m_number; }
-
- /**
- * @brief set the type of channel
- */
- void setType(const ChannelType type) { this->m_type = type; }
-
- /**
- * @brief get the type of channel
- */
- const ChannelType getType() const { return this->m_type; }
-
- /**
- * @brief set the premultiplicatioin of this channel
- */
- void setPremultiplied(const bool premultiplied) { this->m_premultiplied = premultiplied; }
-
- /**
- * @brief is this channel premultiplied
- */
- const bool isPremultiplied() const { return this->m_premultiplied; }
-};
-
-
-#endif
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index a2e4e80..a8cd928 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -416,7 +416,7 @@ MemoryBuffer **ExecutionGroup::getInputBuffersOpenCL(int chunkNumber)
MemoryBuffer *ExecutionGroup::constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *rect)
{
MemoryBuffer *imageBuffer = memoryProxy->getBuffer();
- MemoryBuffer *result = new MemoryBuffer(memoryProxy, rect);
+ MemoryBuffer *result = MemoryBuffer::create(memoryProxy, rect);
result->copyContentFrom(imageBuffer);
return result;
}
@@ -509,7 +509,7 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int chunkNumber, rcti *rect)
NodeOperation *operation = this->getOutputNodeOperation();
if (operation->isWriteBufferOperation()) {
WriteBufferOperation *writeOperation = (WriteBufferOperation *)operation;
- MemoryBuffer *buffer = new MemoryBuffer(writeOperation->getMemoryProxy(), rect);
+ MemoryBuffer *buffer = MemoryBuffer::create(writeOperation->getMemoryProxy(), rect);
return buffer;
}
return NULL;
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 0882324..7bdec35 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -101,7 +101,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, Scene *scene, bNodeTree *editin
}
}
-// DebugInfo::graphviz(this);
+ DebugInfo::graphviz(this);
}
ExecutionSystem::~ExecutionSystem()
@@ -219,13 +219,13 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
OutputSocket *fromsocket = connection->getFromSocket();
WriteBufferOperation *writeoperation = fromsocket->findAttachedWriteBufferOperation();
if (writeoperation == NULL) {
- writeoperation = new WriteBufferOperation();
+ writeoperation = new WriteBufferOperation(fromsocket->getDataType());
writeoperation->setbNodeTree(this->getContext().getbNodeTree());
this->addOperation(writeoperation);
ExecutionSystemHelper::addLink(this->getConnections(), fromsocket, writeoperation->getInputSocket(0));
writeoperation->readResolutionFromInputSocket();
}
- ReadBufferOperation *readoperation = new ReadBufferOperation();
+ ReadBufferOperation *readoperation = new ReadBufferOperation(fromsocket->getDataType());
readoperation->setMemoryProxy(writeoperation->getMemoryProxy());
connection->setFromSocket(readoperation->getOutputSocket());
readoperation->getOutputSocket()->addConnection(connection);
@@ -256,7 +256,7 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
}
/* if no write buffer operation exists yet, create a new one */
if (!writeOperation) {
- writeOperation = new WriteBufferOperation();
+ writeOperation = new WriteBufferOperation(outputsocket->getDataType());
writeOperation->setbNodeTree(this->getContext().getbNodeTree());
this->addOperation(writeOperation);
ExecutionSystemHelper::addLink(this->getConnections(), outputsocket, writeOperation->getInputSocket(0));
@@ -269,7 +269,7 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
if (connection->getToNode() == writeOperation)
continue;
- ReadBufferOperation *readoperation = new ReadBufferOperation();
+ ReadBufferOperation *readoperation = new ReadBufferOperation(outputsocket->getDataType());
readop
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list