rename remaining class members with m_ prefix.
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
ChannelInfo::ChannelInfo()
|
ChannelInfo::ChannelInfo()
|
||||||
{
|
{
|
||||||
this->number = 0;
|
this->m_number = 0;
|
||||||
this->premultiplied = true;
|
this->m_premultiplied = true;
|
||||||
this->type = COM_CT_UNUSED;
|
this->m_type = COM_CT_UNUSED;
|
||||||
}
|
}
|
||||||
|
@@ -61,18 +61,18 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief the channel number, in the connection. [0-3]
|
* @brief the channel number, in the connection. [0-3]
|
||||||
*/
|
*/
|
||||||
int number;
|
int m_number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief type of channel
|
* @brief type of channel
|
||||||
*/
|
*/
|
||||||
ChannelType type;
|
ChannelType m_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brieg Is this value in this channel premultiplied with its alpha
|
* @brieg Is this value in this channel premultiplied with its alpha
|
||||||
* @note only valid if type = ColorComponent;
|
* @note only valid if type = ColorComponent;
|
||||||
*/
|
*/
|
||||||
bool premultiplied;
|
bool m_premultiplied;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * Color space of this value.
|
// * Color space of this value.
|
||||||
@@ -89,32 +89,32 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief set the index of this channel in the SocketConnection
|
* @brief set the index of this channel in the SocketConnection
|
||||||
*/
|
*/
|
||||||
void setNumber(const int number) { this->number = number; }
|
void setNumber(const int number) { this->m_number = number; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the index of this channel in the SocketConnection
|
* @brief get the index of this channel in the SocketConnection
|
||||||
*/
|
*/
|
||||||
const int getNumber() const { return this->number; }
|
const int getNumber() const { return this->m_number; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the type of channel
|
* @brief set the type of channel
|
||||||
*/
|
*/
|
||||||
void setType(const ChannelType type) { this->type = type; }
|
void setType(const ChannelType type) { this->m_type = type; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the type of channel
|
* @brief get the type of channel
|
||||||
*/
|
*/
|
||||||
const ChannelType getType() const { return this->type; }
|
const ChannelType getType() const { return this->m_type; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the premultiplicatioin of this channel
|
* @brief set the premultiplicatioin of this channel
|
||||||
*/
|
*/
|
||||||
void setPremultiplied(const bool premultiplied) { this->premultiplied = premultiplied; }
|
void setPremultiplied(const bool premultiplied) { this->m_premultiplied = premultiplied; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief is this channel premultiplied
|
* @brief is this channel premultiplied
|
||||||
*/
|
*/
|
||||||
const bool isPremultiplied() const { return this->premultiplied; }
|
const bool isPremultiplied() const { return this->m_premultiplied; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
ChunkOrder::ChunkOrder()
|
ChunkOrder::ChunkOrder()
|
||||||
{
|
{
|
||||||
this->distance = 0.0;
|
this->m_distance = 0.0;
|
||||||
this->number = 0;
|
this->m_number = 0;
|
||||||
this->x = 0;
|
this->m_x = 0;
|
||||||
this->y = 0;
|
this->m_y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots)
|
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots)
|
||||||
@@ -37,15 +37,15 @@ void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int nu
|
|||||||
double distance = MAXFLOAT;
|
double distance = MAXFLOAT;
|
||||||
for (index = 0; index < numberOfHotspots; index++) {
|
for (index = 0; index < numberOfHotspots; index++) {
|
||||||
ChunkOrderHotspot *hotspot = hotspots[index];
|
ChunkOrderHotspot *hotspot = hotspots[index];
|
||||||
double ndistance = hotspot->determineDistance(this->x, this->y);
|
double ndistance = hotspot->determineDistance(this->m_x, this->m_y);
|
||||||
if (ndistance < distance) {
|
if (ndistance < distance) {
|
||||||
distance = ndistance;
|
distance = ndistance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->distance = distance;
|
this->m_distance = distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator<(const ChunkOrder& a, const ChunkOrder& b)
|
bool operator<(const ChunkOrder& a, const ChunkOrder& b)
|
||||||
{
|
{
|
||||||
return a.distance < b.distance;
|
return a.m_distance < b.m_distance;
|
||||||
}
|
}
|
||||||
|
@@ -26,20 +26,20 @@
|
|||||||
#include "COM_ChunkOrderHotspot.h"
|
#include "COM_ChunkOrderHotspot.h"
|
||||||
class ChunkOrder {
|
class ChunkOrder {
|
||||||
private:
|
private:
|
||||||
unsigned int number;
|
unsigned int m_number;
|
||||||
int x;
|
int m_x;
|
||||||
int y;
|
int m_y;
|
||||||
double distance;
|
double m_distance;
|
||||||
public:
|
public:
|
||||||
ChunkOrder();
|
ChunkOrder();
|
||||||
void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots);
|
void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots);
|
||||||
friend bool operator<(const ChunkOrder& a, const ChunkOrder& b);
|
friend bool operator<(const ChunkOrder& a, const ChunkOrder& b);
|
||||||
|
|
||||||
void setChunkNumber(unsigned int chunknumber) { this->number = chunknumber; }
|
void setChunkNumber(unsigned int chunknumber) { this->m_number = chunknumber; }
|
||||||
void setX(int x) { this->x = x; }
|
void setX(int x) { this->m_x = x; }
|
||||||
void setY(int y) { this->y = y; }
|
void setY(int y) { this->m_y = y; }
|
||||||
unsigned int getChunkNumber() { return this->number; }
|
unsigned int getChunkNumber() { return this->m_number; }
|
||||||
double getDistance() { return this->distance; }
|
double getDistance() { return this->m_distance; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -25,16 +25,16 @@
|
|||||||
|
|
||||||
ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition)
|
ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition)
|
||||||
{
|
{
|
||||||
this->x = x;
|
this->m_x = x;
|
||||||
this->y = y;
|
this->m_y = y;
|
||||||
this->addition = addition;
|
this->m_addition = addition;
|
||||||
}
|
}
|
||||||
|
|
||||||
double ChunkOrderHotspot::determineDistance(int x, int y)
|
double ChunkOrderHotspot::determineDistance(int x, int y)
|
||||||
{
|
{
|
||||||
int dx = x - this->x;
|
int dx = x - this->m_x;
|
||||||
int dy = y - this->y;
|
int dy = y - this->m_y;
|
||||||
double result = sqrt((double)(dx * dx + dy * dy));
|
double result = sqrt((double)(dx * dx + dy * dy));
|
||||||
result += (double)this->addition;
|
result += (double)this->m_addition;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@@ -29,9 +29,9 @@
|
|||||||
|
|
||||||
class ChunkOrderHotspot {
|
class ChunkOrderHotspot {
|
||||||
private:
|
private:
|
||||||
int x;
|
int m_x;
|
||||||
int y;
|
int m_y;
|
||||||
float addition;
|
float m_addition;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ChunkOrderHotspot(int x, int y, float addition);
|
ChunkOrderHotspot(int x, int y, float addition);
|
||||||
|
@@ -26,16 +26,16 @@
|
|||||||
|
|
||||||
CompositorContext::CompositorContext()
|
CompositorContext::CompositorContext()
|
||||||
{
|
{
|
||||||
this->rd = NULL;
|
this->m_rd = NULL;
|
||||||
this->quality = COM_QUALITY_HIGH;
|
this->m_quality = COM_QUALITY_HIGH;
|
||||||
this->hasActiveOpenCLDevices = false;
|
this->m_hasActiveOpenCLDevices = false;
|
||||||
this->activegNode = NULL;
|
this->m_activegNode = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int CompositorContext::getFramenumber() const
|
const int CompositorContext::getFramenumber() const
|
||||||
{
|
{
|
||||||
if (this->rd) {
|
if (this->m_rd) {
|
||||||
return this->rd->cfra;
|
return this->m_rd->cfra;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return -1; /* this should never happen */
|
return -1; /* this should never happen */
|
||||||
@@ -44,8 +44,8 @@ const int CompositorContext::getFramenumber() const
|
|||||||
|
|
||||||
const int CompositorContext::isColorManaged() const
|
const int CompositorContext::isColorManaged() const
|
||||||
{
|
{
|
||||||
if (this->rd) {
|
if (this->m_rd) {
|
||||||
return this->rd->color_mgt_flag & R_COLOR_MANAGEMENT;
|
return this->m_rd->color_mgt_flag & R_COLOR_MANAGEMENT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0; /* this should never happen */
|
return 0; /* this should never happen */
|
||||||
|
@@ -41,38 +41,38 @@ private:
|
|||||||
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
||||||
* @see ExecutionSystem
|
* @see ExecutionSystem
|
||||||
*/
|
*/
|
||||||
bool rendering;
|
bool m_rendering;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The quality of the composite.
|
* @brief The quality of the composite.
|
||||||
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
||||||
* @see ExecutionSystem
|
* @see ExecutionSystem
|
||||||
*/
|
*/
|
||||||
CompositorQuality quality;
|
CompositorQuality m_quality;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reference to the render data that is being composited.
|
* @brief Reference to the render data that is being composited.
|
||||||
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
||||||
* @see ExecutionSystem
|
* @see ExecutionSystem
|
||||||
*/
|
*/
|
||||||
RenderData *rd;
|
RenderData *m_rd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief reference to the bNodeTree
|
* @brief reference to the bNodeTree
|
||||||
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
||||||
* @see ExecutionSystem
|
* @see ExecutionSystem
|
||||||
*/
|
*/
|
||||||
bNodeTree *bnodetree;
|
bNodeTree *m_bnodetree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief activegNode the group node that is currently being edited.
|
* @brief activegNode the group node that is currently being edited.
|
||||||
*/
|
*/
|
||||||
bNode *activegNode;
|
bNode *m_activegNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief does this system have active opencl devices?
|
* @brief does this system have active opencl devices?
|
||||||
*/
|
*/
|
||||||
bool hasActiveOpenCLDevices;
|
bool m_hasActiveOpenCLDevices;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@@ -83,56 +83,52 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief set the rendering field of the context
|
* @brief set the rendering field of the context
|
||||||
*/
|
*/
|
||||||
void setRendering(bool rendering) { this->rendering = rendering; }
|
void setRendering(bool rendering) { this->m_rendering = rendering; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the rendering field of the context
|
* @brief get the rendering field of the context
|
||||||
*/
|
*/
|
||||||
bool isRendering() const { return this->rendering; }
|
bool isRendering() const { return this->m_rendering; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the scene of the context
|
* @brief set the scene of the context
|
||||||
*/
|
*/
|
||||||
void setRenderData(RenderData *rd) { this->rd = rd; }
|
void setRenderData(RenderData *rd) { this->m_rd = rd; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the bnodetree of the context
|
* @brief set the bnodetree of the context
|
||||||
*/
|
*/
|
||||||
void setbNodeTree(bNodeTree *bnodetree) { this->bnodetree = bnodetree; }
|
void setbNodeTree(bNodeTree *bnodetree) { this->m_bnodetree = bnodetree; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the bnodetree of the context
|
* @brief get the bnodetree of the context
|
||||||
*/
|
*/
|
||||||
const bNodeTree *getbNodeTree() const { return this->bnodetree; }
|
const bNodeTree *getbNodeTree() const { return this->m_bnodetree; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the active groupnode of the context
|
* @brief set the active groupnode of the context
|
||||||
*/
|
*/
|
||||||
void setActivegNode(bNode *gnode) { this->activegNode = gnode; }
|
void setActivegNode(bNode *gnode) { this->m_activegNode = gnode; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the active groupnode of the context
|
* @brief get the active groupnode of the context
|
||||||
*/
|
*/
|
||||||
const bNode *getActivegNode() const { return this->activegNode; }
|
const bNode *getActivegNode() const { return this->m_activegNode; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the scene of the context
|
* @brief get the scene of the context
|
||||||
*/
|
*/
|
||||||
const RenderData *getRenderData() const { return this->rd; }
|
const RenderData *getRenderData() const { return this->m_rd; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the quality
|
* @brief set the quality
|
||||||
*/
|
*/
|
||||||
void setQuality(CompositorQuality quality) {
|
void setQuality(CompositorQuality quality) { this->m_quality = quality; }
|
||||||
this->quality = quality;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the quality
|
* @brief get the quality
|
||||||
*/
|
*/
|
||||||
const CompositorQuality getQuality() const {
|
const CompositorQuality getQuality() const { return this->m_quality; }
|
||||||
return quality;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the current framenumber of the scene in this context
|
* @brief get the current framenumber of the scene in this context
|
||||||
@@ -142,16 +138,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief has this system active openclDevices?
|
* @brief has this system active openclDevices?
|
||||||
*/
|
*/
|
||||||
const bool getHasActiveOpenCLDevices() const {
|
const bool getHasActiveOpenCLDevices() const { return this->m_hasActiveOpenCLDevices; }
|
||||||
return this->hasActiveOpenCLDevices;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set has this system active openclDevices?
|
* @brief set has this system active openclDevices?
|
||||||
*/
|
*/
|
||||||
void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) {
|
void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) { this->m_hasActiveOpenCLDevices = hasAvtiveOpenCLDevices; }
|
||||||
this->hasActiveOpenCLDevices = hasAvtiveOpenCLDevices;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getChunksize() { return this->getbNodeTree()->chunksize; }
|
int getChunksize() { return this->getbNodeTree()->chunksize; }
|
||||||
|
|
||||||
|
@@ -43,20 +43,20 @@
|
|||||||
|
|
||||||
ExecutionGroup::ExecutionGroup()
|
ExecutionGroup::ExecutionGroup()
|
||||||
{
|
{
|
||||||
this->isOutput = false;
|
this->m_isOutput = false;
|
||||||
this->complex = false;
|
this->m_complex = false;
|
||||||
this->chunkExecutionStates = NULL;
|
this->m_chunkExecutionStates = NULL;
|
||||||
this->bTree = NULL;
|
this->m_bTree = NULL;
|
||||||
this->height = 0;
|
this->m_height = 0;
|
||||||
this->width = 0;
|
this->m_width = 0;
|
||||||
this->cachedMaxReadBufferOffset = 0;
|
this->m_cachedMaxReadBufferOffset = 0;
|
||||||
this->numberOfXChunks = 0;
|
this->m_numberOfXChunks = 0;
|
||||||
this->numberOfYChunks = 0;
|
this->m_numberOfYChunks = 0;
|
||||||
this->numberOfChunks = 0;
|
this->m_numberOfChunks = 0;
|
||||||
this->initialized = false;
|
this->m_initialized = false;
|
||||||
this->openCL = false;
|
this->m_openCL = false;
|
||||||
this->singleThreaded = false;
|
this->m_singleThreaded = false;
|
||||||
this->chunksFinished = 0;
|
this->m_chunksFinished = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompositorPriority ExecutionGroup::getRenderPriotrity()
|
CompositorPriority ExecutionGroup::getRenderPriotrity()
|
||||||
@@ -66,7 +66,7 @@ CompositorPriority ExecutionGroup::getRenderPriotrity()
|
|||||||
|
|
||||||
bool ExecutionGroup::containsOperation(NodeOperation *operation)
|
bool ExecutionGroup::containsOperation(NodeOperation *operation)
|
||||||
{
|
{
|
||||||
for (vector<NodeOperation *>::const_iterator iterator = this->operations.begin(); iterator != this->operations.end(); ++iterator) {
|
for (vector<NodeOperation *>::const_iterator iterator = this->m_operations.begin(); iterator != this->m_operations.end(); ++iterator) {
|
||||||
NodeOperation *inListOperation = *iterator;
|
NodeOperation *inListOperation = *iterator;
|
||||||
if (inListOperation == operation) {
|
if (inListOperation == operation) {
|
||||||
return true;
|
return true;
|
||||||
@@ -77,12 +77,12 @@ bool ExecutionGroup::containsOperation(NodeOperation *operation)
|
|||||||
|
|
||||||
const bool ExecutionGroup::isComplex() const
|
const bool ExecutionGroup::isComplex() const
|
||||||
{
|
{
|
||||||
return this->complex;
|
return this->m_complex;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ExecutionGroup::canContainOperation(NodeOperation *operation)
|
bool ExecutionGroup::canContainOperation(NodeOperation *operation)
|
||||||
{
|
{
|
||||||
if (!this->initialized) { return true; }
|
if (!this->m_initialized) { return true; }
|
||||||
if (operation->isReadBufferOperation()) { return true; }
|
if (operation->isReadBufferOperation()) { return true; }
|
||||||
if (operation->isWriteBufferOperation()) { return false; }
|
if (operation->isWriteBufferOperation()) { return false; }
|
||||||
if (operation->isSetOperation()) { return true; }
|
if (operation->isSetOperation()) { return true; }
|
||||||
@@ -100,12 +100,12 @@ void ExecutionGroup::addOperation(ExecutionSystem *system, NodeOperation *operat
|
|||||||
if (containsOperation(operation)) return;
|
if (containsOperation(operation)) return;
|
||||||
if (canContainOperation(operation)) {
|
if (canContainOperation(operation)) {
|
||||||
if (!operation->isBufferOperation()) {
|
if (!operation->isBufferOperation()) {
|
||||||
this->complex = operation->isComplex();
|
this->m_complex = operation->isComplex();
|
||||||
this->openCL = operation->isOpenCL();
|
this->m_openCL = operation->isOpenCL();
|
||||||
this->singleThreaded = operation->isSingleThreaded();
|
this->m_singleThreaded = operation->isSingleThreaded();
|
||||||
this->initialized = true;
|
this->m_initialized = true;
|
||||||
}
|
}
|
||||||
this->operations.push_back(operation);
|
this->m_operations.push_back(operation);
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->isReadBufferOperation()) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
|
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
|
||||||
WriteBufferOperation *writeOperation = readOperation->getMemoryProxy()->getWriteBufferOperation();
|
WriteBufferOperation *writeOperation = readOperation->getMemoryProxy()->getWriteBufferOperation();
|
||||||
@@ -137,52 +137,52 @@ void ExecutionGroup::addOperation(ExecutionSystem *system, NodeOperation *operat
|
|||||||
|
|
||||||
NodeOperation *ExecutionGroup::getOutputNodeOperation() const
|
NodeOperation *ExecutionGroup::getOutputNodeOperation() const
|
||||||
{
|
{
|
||||||
return this->operations[0]; // the first operation of the group is always the output operation.
|
return this->m_operations[0]; // the first operation of the group is always the output operation.
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecutionGroup::initExecution()
|
void ExecutionGroup::initExecution()
|
||||||
{
|
{
|
||||||
if (this->chunkExecutionStates != NULL) {
|
if (this->m_chunkExecutionStates != NULL) {
|
||||||
delete[] this->chunkExecutionStates;
|
delete[] this->m_chunkExecutionStates;
|
||||||
}
|
}
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
determineNumberOfChunks();
|
determineNumberOfChunks();
|
||||||
|
|
||||||
this->chunkExecutionStates = NULL;
|
this->m_chunkExecutionStates = NULL;
|
||||||
if (this->numberOfChunks != 0) {
|
if (this->m_numberOfChunks != 0) {
|
||||||
this->chunkExecutionStates = new ChunkExecutionState[numberOfChunks];
|
this->m_chunkExecutionStates = new ChunkExecutionState[this->m_numberOfChunks];
|
||||||
for (index = 0; index < numberOfChunks; index++) {
|
for (index = 0; index < this->m_numberOfChunks; index++) {
|
||||||
this->chunkExecutionStates[index] = COM_ES_NOT_SCHEDULED;
|
this->m_chunkExecutionStates[index] = COM_ES_NOT_SCHEDULED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int maxNumber = 0;
|
unsigned int maxNumber = 0;
|
||||||
|
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
NodeOperation *operation = this->operations[index];
|
NodeOperation *operation = this->m_operations[index];
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->isReadBufferOperation()) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
|
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
|
||||||
this->cachedReadOperations.push_back(readOperation);
|
this->m_cachedReadOperations.push_back(readOperation);
|
||||||
maxNumber = max(maxNumber, readOperation->getOffset());
|
maxNumber = max(maxNumber, readOperation->getOffset());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maxNumber++;
|
maxNumber++;
|
||||||
this->cachedMaxReadBufferOffset = maxNumber;
|
this->m_cachedMaxReadBufferOffset = maxNumber;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecutionGroup::deinitExecution()
|
void ExecutionGroup::deinitExecution()
|
||||||
{
|
{
|
||||||
if (this->chunkExecutionStates != NULL) {
|
if (this->m_chunkExecutionStates != NULL) {
|
||||||
delete[] this->chunkExecutionStates;
|
delete[] this->m_chunkExecutionStates;
|
||||||
this->chunkExecutionStates = NULL;
|
this->m_chunkExecutionStates = NULL;
|
||||||
}
|
}
|
||||||
this->numberOfChunks = 0;
|
this->m_numberOfChunks = 0;
|
||||||
this->numberOfXChunks = 0;
|
this->m_numberOfXChunks = 0;
|
||||||
this->numberOfYChunks = 0;
|
this->m_numberOfYChunks = 0;
|
||||||
this->cachedReadOperations.clear();
|
this->m_cachedReadOperations.clear();
|
||||||
this->bTree = NULL;
|
this->m_bTree = NULL;
|
||||||
}
|
}
|
||||||
void ExecutionGroup::determineResolution(unsigned int resolution[])
|
void ExecutionGroup::determineResolution(unsigned int resolution[])
|
||||||
{
|
{
|
||||||
@@ -194,16 +194,16 @@ void ExecutionGroup::determineResolution(unsigned int resolution[])
|
|||||||
|
|
||||||
void ExecutionGroup::determineNumberOfChunks()
|
void ExecutionGroup::determineNumberOfChunks()
|
||||||
{
|
{
|
||||||
if (singleThreaded) {
|
if (this->m_singleThreaded) {
|
||||||
this->numberOfXChunks = 1;
|
this->m_numberOfXChunks = 1;
|
||||||
this->numberOfYChunks = 1;
|
this->m_numberOfYChunks = 1;
|
||||||
this->numberOfChunks = 1;
|
this->m_numberOfChunks = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const float chunkSizef = this->chunkSize;
|
const float chunkSizef = this->m_chunkSize;
|
||||||
this->numberOfXChunks = ceil(this->width / chunkSizef);
|
this->m_numberOfXChunks = ceil(this->m_width / chunkSizef);
|
||||||
this->numberOfYChunks = ceil(this->height / chunkSizef);
|
this->m_numberOfYChunks = ceil(this->m_height / chunkSizef);
|
||||||
this->numberOfChunks = this->numberOfXChunks * this->numberOfYChunks;
|
this->m_numberOfChunks = this->m_numberOfXChunks * this->m_numberOfYChunks;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,17 +214,17 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
{
|
{
|
||||||
CompositorContext& context = graph->getContext();
|
CompositorContext& context = graph->getContext();
|
||||||
const bNodeTree *bTree = context.getbNodeTree();
|
const bNodeTree *bTree = context.getbNodeTree();
|
||||||
if (this->width == 0 || this->height == 0) {return; } /// @note: break out... no pixels to calculate.
|
if (this->m_width == 0 || this->m_height == 0) {return; } /// @note: break out... no pixels to calculate.
|
||||||
if (bTree->test_break && bTree->test_break(bTree->tbh)) {return; } /// @note: early break out for blur and preview nodes
|
if (bTree->test_break && bTree->test_break(bTree->tbh)) {return; } /// @note: early break out for blur and preview nodes
|
||||||
if (this->numberOfChunks == 0) {return; } /// @note: early break out
|
if (this->m_numberOfChunks == 0) {return; } /// @note: early break out
|
||||||
unsigned int chunkNumber;
|
unsigned int chunkNumber;
|
||||||
|
|
||||||
this->chunksFinished = 0;
|
this->m_chunksFinished = 0;
|
||||||
this->bTree = bTree;
|
this->m_bTree = bTree;
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
unsigned int *chunkOrder = new unsigned int[this->numberOfChunks];
|
unsigned int *chunkOrder = new unsigned int[this->m_numberOfChunks];
|
||||||
|
|
||||||
for (chunkNumber = 0; chunkNumber < this->numberOfChunks; chunkNumber++) {
|
for (chunkNumber = 0; chunkNumber < this->m_numberOfChunks; chunkNumber++) {
|
||||||
chunkOrder[chunkNumber] = chunkNumber;
|
chunkOrder[chunkNumber] = chunkNumber;
|
||||||
}
|
}
|
||||||
NodeOperation *operation = this->getOutputNodeOperation();
|
NodeOperation *operation = this->getOutputNodeOperation();
|
||||||
@@ -241,9 +241,9 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
|
|
||||||
switch (chunkorder) {
|
switch (chunkorder) {
|
||||||
case COM_TO_RANDOM:
|
case COM_TO_RANDOM:
|
||||||
for (index = 0; index < 2 * numberOfChunks; index++) {
|
for (index = 0; index < 2 * this->m_numberOfChunks; index++) {
|
||||||
int index1 = rand() % numberOfChunks;
|
int index1 = rand() % this->m_numberOfChunks;
|
||||||
int index2 = rand() % numberOfChunks;
|
int index2 = rand() % this->m_numberOfChunks;
|
||||||
int s = chunkOrder[index1];
|
int s = chunkOrder[index1];
|
||||||
chunkOrder[index1] = chunkOrder[index2];
|
chunkOrder[index1] = chunkOrder[index2];
|
||||||
chunkOrder[index2] = s;
|
chunkOrder[index2] = s;
|
||||||
@@ -252,10 +252,10 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
case COM_TO_CENTER_OUT:
|
case COM_TO_CENTER_OUT:
|
||||||
{
|
{
|
||||||
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot *[1];
|
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot *[1];
|
||||||
hotspots[0] = new ChunkOrderHotspot(this->width * centerX, this->height * centerY, 0.0f);
|
hotspots[0] = new ChunkOrderHotspot(this->m_width * centerX, this->m_height * centerY, 0.0f);
|
||||||
rcti rect;
|
rcti rect;
|
||||||
ChunkOrder *chunkOrders = new ChunkOrder[this->numberOfChunks];
|
ChunkOrder *chunkOrders = new ChunkOrder[this->m_numberOfChunks];
|
||||||
for (index = 0; index < this->numberOfChunks; index++) {
|
for (index = 0; index < this->m_numberOfChunks; index++) {
|
||||||
determineChunkRect(&rect, index);
|
determineChunkRect(&rect, index);
|
||||||
chunkOrders[index].setChunkNumber(index);
|
chunkOrders[index].setChunkNumber(index);
|
||||||
chunkOrders[index].setX(rect.xmin);
|
chunkOrders[index].setX(rect.xmin);
|
||||||
@@ -263,8 +263,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
chunkOrders[index].determineDistance(hotspots, 1);
|
chunkOrders[index].determineDistance(hotspots, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sort(&chunkOrders[0], &chunkOrders[numberOfChunks - 1]);
|
sort(&chunkOrders[0], &chunkOrders[this->m_numberOfChunks - 1]);
|
||||||
for (index = 0; index < numberOfChunks; index++) {
|
for (index = 0; index < this->m_numberOfChunks; index++) {
|
||||||
chunkOrder[index] = chunkOrders[index].getChunkNumber();
|
chunkOrder[index] = chunkOrders[index].getChunkNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,14 +276,14 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
case COM_TO_RULE_OF_THIRDS:
|
case COM_TO_RULE_OF_THIRDS:
|
||||||
{
|
{
|
||||||
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot *[9];
|
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot *[9];
|
||||||
unsigned int tx = this->width / 6;
|
unsigned int tx = this->m_width / 6;
|
||||||
unsigned int ty = this->height / 6;
|
unsigned int ty = this->m_height / 6;
|
||||||
unsigned int mx = this->width / 2;
|
unsigned int mx = this->m_width / 2;
|
||||||
unsigned int my = this->height / 2;
|
unsigned int my = this->m_height / 2;
|
||||||
unsigned int bx = mx + 2 * tx;
|
unsigned int bx = mx + 2 * tx;
|
||||||
unsigned int by = my + 2 * ty;
|
unsigned int by = my + 2 * ty;
|
||||||
|
|
||||||
float addition = numberOfChunks / COM_RULE_OF_THIRDS_DIVIDER;
|
float addition = this->m_numberOfChunks / COM_RULE_OF_THIRDS_DIVIDER;
|
||||||
hotspots[0] = new ChunkOrderHotspot(mx, my, addition * 0);
|
hotspots[0] = new ChunkOrderHotspot(mx, my, addition * 0);
|
||||||
hotspots[1] = new ChunkOrderHotspot(tx, my, addition * 1);
|
hotspots[1] = new ChunkOrderHotspot(tx, my, addition * 1);
|
||||||
hotspots[2] = new ChunkOrderHotspot(bx, my, addition * 2);
|
hotspots[2] = new ChunkOrderHotspot(bx, my, addition * 2);
|
||||||
@@ -294,8 +294,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
hotspots[7] = new ChunkOrderHotspot(mx, ty, addition * 7);
|
hotspots[7] = new ChunkOrderHotspot(mx, ty, addition * 7);
|
||||||
hotspots[8] = new ChunkOrderHotspot(mx, by, addition * 8);
|
hotspots[8] = new ChunkOrderHotspot(mx, by, addition * 8);
|
||||||
rcti rect;
|
rcti rect;
|
||||||
ChunkOrder *chunkOrders = new ChunkOrder[this->numberOfChunks];
|
ChunkOrder *chunkOrders = new ChunkOrder[this->m_numberOfChunks];
|
||||||
for (index = 0; index < this->numberOfChunks; index++) {
|
for (index = 0; index < this->m_numberOfChunks; index++) {
|
||||||
determineChunkRect(&rect, index);
|
determineChunkRect(&rect, index);
|
||||||
chunkOrders[index].setChunkNumber(index);
|
chunkOrders[index].setChunkNumber(index);
|
||||||
chunkOrders[index].setX(rect.xmin);
|
chunkOrders[index].setX(rect.xmin);
|
||||||
@@ -303,9 +303,9 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
chunkOrders[index].determineDistance(hotspots, 9);
|
chunkOrders[index].determineDistance(hotspots, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
sort(&chunkOrders[0], &chunkOrders[numberOfChunks]);
|
sort(&chunkOrders[0], &chunkOrders[this->m_numberOfChunks]);
|
||||||
|
|
||||||
for (index = 0; index < numberOfChunks; index++) {
|
for (index = 0; index < this->m_numberOfChunks; index++) {
|
||||||
chunkOrder[index] = chunkOrders[index].getChunkNumber();
|
chunkOrder[index] = chunkOrders[index].getChunkNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,11 +338,11 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
|
|||||||
finished = true;
|
finished = true;
|
||||||
int numberEvaluated = 0;
|
int numberEvaluated = 0;
|
||||||
|
|
||||||
for (index = startIndex; index < numberOfChunks && numberEvaluated < maxNumberEvaluated; index++) {
|
for (index = startIndex; index < this->m_numberOfChunks && numberEvaluated < maxNumberEvaluated; index++) {
|
||||||
int chunkNumber = chunkOrder[index];
|
int chunkNumber = chunkOrder[index];
|
||||||
int yChunk = chunkNumber / this->numberOfXChunks;
|
int yChunk = chunkNumber / this->m_numberOfXChunks;
|
||||||
int xChunk = chunkNumber - (yChunk * this->numberOfXChunks);
|
int xChunk = chunkNumber - (yChunk * this->m_numberOfXChunks);
|
||||||
const ChunkExecutionState state = this->chunkExecutionStates[chunkNumber];
|
const ChunkExecutionState state = this->m_chunkExecutionStates[chunkNumber];
|
||||||
if (state == COM_ES_NOT_SCHEDULED) {
|
if (state == COM_ES_NOT_SCHEDULED) {
|
||||||
scheduleChunkWhenPossible(graph, xChunk, yChunk);
|
scheduleChunkWhenPossible(graph, xChunk, yChunk);
|
||||||
finished = false;
|
finished = false;
|
||||||
@@ -375,12 +375,12 @@ MemoryBuffer **ExecutionGroup::getInputBuffersCPU()
|
|||||||
unsigned int index;
|
unsigned int index;
|
||||||
|
|
||||||
this->determineDependingMemoryProxies(&memoryproxies);
|
this->determineDependingMemoryProxies(&memoryproxies);
|
||||||
MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->cachedMaxReadBufferOffset];
|
MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->m_cachedMaxReadBufferOffset];
|
||||||
for (index = 0; index < this->cachedMaxReadBufferOffset; index++) {
|
for (index = 0; index < this->m_cachedMaxReadBufferOffset; index++) {
|
||||||
memoryBuffers[index] = NULL;
|
memoryBuffers[index] = NULL;
|
||||||
}
|
}
|
||||||
for (index = 0; index < this->cachedReadOperations.size(); index++) {
|
for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *)this->cachedReadOperations[index];
|
ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index];
|
||||||
memoryBuffers[readOperation->getOffset()] = readOperation->getMemoryProxy()->getBuffer();
|
memoryBuffers[readOperation->getOffset()] = readOperation->getMemoryProxy()->getBuffer();
|
||||||
}
|
}
|
||||||
return memoryBuffers;
|
return memoryBuffers;
|
||||||
@@ -394,13 +394,13 @@ MemoryBuffer **ExecutionGroup::getInputBuffersOpenCL(int chunkNumber)
|
|||||||
determineChunkRect(&rect, chunkNumber);
|
determineChunkRect(&rect, chunkNumber);
|
||||||
|
|
||||||
this->determineDependingMemoryProxies(&memoryproxies);
|
this->determineDependingMemoryProxies(&memoryproxies);
|
||||||
MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->cachedMaxReadBufferOffset];
|
MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->m_cachedMaxReadBufferOffset];
|
||||||
for (index = 0; index < this->cachedMaxReadBufferOffset; index++) {
|
for (index = 0; index < this->m_cachedMaxReadBufferOffset; index++) {
|
||||||
memoryBuffers[index] = NULL;
|
memoryBuffers[index] = NULL;
|
||||||
}
|
}
|
||||||
rcti output;
|
rcti output;
|
||||||
for (index = 0; index < this->cachedReadOperations.size(); index++) {
|
for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *)this->cachedReadOperations[index];
|
ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index];
|
||||||
MemoryProxy *memoryProxy = readOperation->getMemoryProxy();
|
MemoryProxy *memoryProxy = readOperation->getMemoryProxy();
|
||||||
this->determineDependingAreaOfInterest(&rect, readOperation, &output);
|
this->determineDependingAreaOfInterest(&rect, readOperation, &output);
|
||||||
MemoryBuffer *memoryBuffer = memoryProxy->getExecutor()->constructConsolidatedMemoryBuffer(memoryProxy, &output);
|
MemoryBuffer *memoryBuffer = memoryProxy->getExecutor()->constructConsolidatedMemoryBuffer(memoryProxy, &output);
|
||||||
@@ -419,12 +419,12 @@ MemoryBuffer *ExecutionGroup::constructConsolidatedMemoryBuffer(MemoryProxy *mem
|
|||||||
|
|
||||||
void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memoryBuffers)
|
void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memoryBuffers)
|
||||||
{
|
{
|
||||||
if (this->chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED)
|
if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED)
|
||||||
this->chunkExecutionStates[chunkNumber] = COM_ES_EXECUTED;
|
this->m_chunkExecutionStates[chunkNumber] = COM_ES_EXECUTED;
|
||||||
|
|
||||||
this->chunksFinished++;
|
this->m_chunksFinished++;
|
||||||
if (memoryBuffers) {
|
if (memoryBuffers) {
|
||||||
for (unsigned int index = 0; index < this->cachedMaxReadBufferOffset; index++) {
|
for (unsigned int index = 0; index < this->m_cachedMaxReadBufferOffset; index++) {
|
||||||
MemoryBuffer *buffer = memoryBuffers[index];
|
MemoryBuffer *buffer = memoryBuffers[index];
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
if (buffer->isTemporarily()) {
|
if (buffer->isTemporarily()) {
|
||||||
@@ -435,30 +435,30 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
|
|||||||
}
|
}
|
||||||
delete[] memoryBuffers;
|
delete[] memoryBuffers;
|
||||||
}
|
}
|
||||||
if (bTree) {
|
if (this->m_bTree) {
|
||||||
// status report is only performed for top level Execution Groups.
|
// status report is only performed for top level Execution Groups.
|
||||||
float progress = chunksFinished;
|
float progress = this->m_chunksFinished;
|
||||||
progress /= numberOfChunks;
|
progress /= this->m_numberOfChunks;
|
||||||
bTree->progress(bTree->prh, progress);
|
this->m_bTree->progress(this->m_bTree->prh, progress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int xChunk, const unsigned int yChunk) const
|
inline void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int xChunk, const unsigned int yChunk) const
|
||||||
{
|
{
|
||||||
if (singleThreaded) {
|
if (this->m_singleThreaded) {
|
||||||
BLI_init_rcti(rect, 0, this->width, 0, this->height);
|
BLI_init_rcti(rect, 0, this->m_width, 0, this->m_height);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const unsigned int minx = xChunk * chunkSize;
|
const unsigned int minx = xChunk * this->m_chunkSize;
|
||||||
const unsigned int miny = yChunk * chunkSize;
|
const unsigned int miny = yChunk * this->m_chunkSize;
|
||||||
BLI_init_rcti(rect, minx, min(minx + this->chunkSize, this->width), miny, min(miny + this->chunkSize, this->height));
|
BLI_init_rcti(rect, minx, min(minx + this->m_chunkSize, this->m_width), miny, min(miny + this->m_chunkSize, this->m_height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int chunkNumber) const
|
void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int chunkNumber) const
|
||||||
{
|
{
|
||||||
const unsigned int yChunk = chunkNumber / numberOfXChunks;
|
const unsigned int yChunk = chunkNumber / this->m_numberOfXChunks;
|
||||||
const unsigned int xChunk = chunkNumber - (yChunk * numberOfXChunks);
|
const unsigned int xChunk = chunkNumber - (yChunk * this->m_numberOfXChunks);
|
||||||
determineChunkRect(rect, xChunk, yChunk);
|
determineChunkRect(rect, xChunk, yChunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,13 +477,13 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int chunkNumber, rcti *rect)
|
|||||||
|
|
||||||
bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area)
|
bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area)
|
||||||
{
|
{
|
||||||
if (singleThreaded) {
|
if (this->m_singleThreaded) {
|
||||||
return scheduleChunkWhenPossible(graph, 0, 0);
|
return scheduleChunkWhenPossible(graph, 0, 0);
|
||||||
}
|
}
|
||||||
// find all chunks inside the rect
|
// find all chunks inside the rect
|
||||||
// determine minxchunk, minychunk, maxxchunk, maxychunk where x and y are chunknumbers
|
// determine minxchunk, minychunk, maxxchunk, maxychunk where x and y are chunknumbers
|
||||||
|
|
||||||
float chunkSizef = this->chunkSize;
|
float chunkSizef = this->m_chunkSize;
|
||||||
|
|
||||||
int indexx, indexy;
|
int indexx, indexy;
|
||||||
const int minxchunk = floor(area->xmin / chunkSizef);
|
const int minxchunk = floor(area->xmin / chunkSizef);
|
||||||
@@ -505,8 +505,8 @@ bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area
|
|||||||
|
|
||||||
bool ExecutionGroup::scheduleChunk(unsigned int chunkNumber)
|
bool ExecutionGroup::scheduleChunk(unsigned int chunkNumber)
|
||||||
{
|
{
|
||||||
if (this->chunkExecutionStates[chunkNumber] == COM_ES_NOT_SCHEDULED) {
|
if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_NOT_SCHEDULED) {
|
||||||
this->chunkExecutionStates[chunkNumber] = COM_ES_SCHEDULED;
|
this->m_chunkExecutionStates[chunkNumber] = COM_ES_SCHEDULED;
|
||||||
WorkScheduler::schedule(this, chunkNumber);
|
WorkScheduler::schedule(this, chunkNumber);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -515,20 +515,20 @@ bool ExecutionGroup::scheduleChunk(unsigned int chunkNumber)
|
|||||||
|
|
||||||
bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChunk, int yChunk)
|
bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChunk, int yChunk)
|
||||||
{
|
{
|
||||||
if (xChunk < 0 || xChunk >= (int)this->numberOfXChunks) {
|
if (xChunk < 0 || xChunk >= (int)this->m_numberOfXChunks) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (yChunk < 0 || yChunk >= (int)this->numberOfYChunks) {
|
if (yChunk < 0 || yChunk >= (int)this->m_numberOfYChunks) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
int chunkNumber = yChunk * this->numberOfXChunks + xChunk;
|
int chunkNumber = yChunk * this->m_numberOfXChunks + xChunk;
|
||||||
// chunk is already executed
|
// chunk is already executed
|
||||||
if (this->chunkExecutionStates[chunkNumber] == COM_ES_EXECUTED) {
|
if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_EXECUTED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// chunk is scheduled, but not executed
|
// chunk is scheduled, but not executed
|
||||||
if (this->chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED) {
|
if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,8 +542,8 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChun
|
|||||||
bool canBeExecuted = true;
|
bool canBeExecuted = true;
|
||||||
rcti area;
|
rcti area;
|
||||||
|
|
||||||
for (index = 0; index < cachedReadOperations.size(); index++) {
|
for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *)cachedReadOperations[index];
|
ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index];
|
||||||
BLI_init_rcti(&area, 0, 0, 0, 0);
|
BLI_init_rcti(&area, 0, 0, 0, 0);
|
||||||
MemoryProxy *memoryProxy = memoryProxies[index];
|
MemoryProxy *memoryProxy = memoryProxies[index];
|
||||||
determineDependingAreaOfInterest(&rect, readOperation, &area);
|
determineDependingAreaOfInterest(&rect, readOperation, &area);
|
||||||
@@ -574,13 +574,13 @@ void ExecutionGroup::determineDependingAreaOfInterest(rcti *input, ReadBufferOpe
|
|||||||
void ExecutionGroup::determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies)
|
void ExecutionGroup::determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies)
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->cachedReadOperations.size(); index++) {
|
for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
|
||||||
ReadBufferOperation *readOperation = (ReadBufferOperation *) this->cachedReadOperations[index];
|
ReadBufferOperation *readOperation = (ReadBufferOperation *) this->m_cachedReadOperations[index];
|
||||||
memoryProxies->push_back(readOperation->getMemoryProxy());
|
memoryProxies->push_back(readOperation->getMemoryProxy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ExecutionGroup::isOpenCL()
|
bool ExecutionGroup::isOpenCL()
|
||||||
{
|
{
|
||||||
return this->openCL;
|
return this->m_openCL;
|
||||||
}
|
}
|
||||||
|
@@ -67,81 +67,81 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief list of operations in this ExecutionGroup
|
* @brief list of operations in this ExecutionGroup
|
||||||
*/
|
*/
|
||||||
vector<NodeOperation *> operations;
|
vector<NodeOperation *> m_operations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief is this ExecutionGroup an input ExecutionGroup
|
* @brief is this ExecutionGroup an input ExecutionGroup
|
||||||
* an input execution group is a group that is at the end of the calculation (the output is important for the user)
|
* an input execution group is a group that is at the end of the calculation (the output is important for the user)
|
||||||
*/
|
*/
|
||||||
int isOutput;
|
int m_isOutput;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Width of the output
|
* @brief Width of the output
|
||||||
*/
|
*/
|
||||||
unsigned int width;
|
unsigned int m_width;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Height of the output
|
* @brief Height of the output
|
||||||
*/
|
*/
|
||||||
unsigned int height;
|
unsigned int m_height;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief size of a single chunk, being Width or of height
|
* @brief size of a single chunk, being Width or of height
|
||||||
* a chunk is always a square, except at the edges of the MemoryBuffer
|
* a chunk is always a square, except at the edges of the MemoryBuffer
|
||||||
*/
|
*/
|
||||||
unsigned int chunkSize;
|
unsigned int m_chunkSize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief number of chunks in the x-axis
|
* @brief number of chunks in the x-axis
|
||||||
*/
|
*/
|
||||||
unsigned int numberOfXChunks;
|
unsigned int m_numberOfXChunks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief number of chunks in the y-axis
|
* @brief number of chunks in the y-axis
|
||||||
*/
|
*/
|
||||||
unsigned int numberOfYChunks;
|
unsigned int m_numberOfYChunks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief total number of chunks
|
* @brief total number of chunks
|
||||||
*/
|
*/
|
||||||
unsigned int numberOfChunks;
|
unsigned int m_numberOfChunks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief contains this ExecutionGroup a complex NodeOperation.
|
* @brief contains this ExecutionGroup a complex NodeOperation.
|
||||||
*/
|
*/
|
||||||
bool complex;
|
bool m_complex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
|
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
|
||||||
*/
|
*/
|
||||||
bool openCL;
|
bool m_openCL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Is this Execution group SingleThreaded
|
* @brief Is this Execution group SingleThreaded
|
||||||
*/
|
*/
|
||||||
bool singleThreaded;
|
bool m_singleThreaded;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief what is the maximum number field of all ReadBufferOperation in this ExecutionGroup.
|
* @brief what is the maximum number field of all ReadBufferOperation in this ExecutionGroup.
|
||||||
* @note this is used to construct the MemoryBuffers that will be passed during execution.
|
* @note this is used to construct the MemoryBuffers that will be passed during execution.
|
||||||
*/
|
*/
|
||||||
unsigned int cachedMaxReadBufferOffset;
|
unsigned int m_cachedMaxReadBufferOffset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief a cached vector of all read operations in the execution group.
|
* @brief a cached vector of all read operations in the execution group.
|
||||||
*/
|
*/
|
||||||
vector<NodeOperation *> cachedReadOperations;
|
vector<NodeOperation *> m_cachedReadOperations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief reference to the original bNodeTree, this field is only set for the 'top' execution group.
|
* @brief reference to the original bNodeTree, this field is only set for the 'top' execution group.
|
||||||
* @note can only be used to call the callbacks for progress, status and break
|
* @note can only be used to call the callbacks for progress, status and break
|
||||||
*/
|
*/
|
||||||
const bNodeTree *bTree;
|
const bNodeTree *m_bTree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief total number of chunks that have been calculated for this ExecutionGroup
|
* @brief total number of chunks that have been calculated for this ExecutionGroup
|
||||||
*/
|
*/
|
||||||
unsigned int chunksFinished;
|
unsigned int m_chunksFinished;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be
|
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be
|
||||||
@@ -149,7 +149,7 @@ private:
|
|||||||
* - COM_ES_SCHEDULED: scheduled
|
* - COM_ES_SCHEDULED: scheduled
|
||||||
* - COM_ES_EXECUTED: executed
|
* - COM_ES_EXECUTED: executed
|
||||||
*/
|
*/
|
||||||
ChunkExecutionState *chunkExecutionStates;
|
ChunkExecutionState *m_chunkExecutionStates;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
|
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
|
||||||
@@ -160,7 +160,7 @@ private:
|
|||||||
* @see complex
|
* @see complex
|
||||||
* @see openCL
|
* @see openCL
|
||||||
*/
|
*/
|
||||||
bool initialized;
|
bool m_initialized;
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
/**
|
/**
|
||||||
@@ -258,13 +258,13 @@ public:
|
|||||||
* @note ViewerOperation, CompositeOperation, PreviewOperation.
|
* @note ViewerOperation, CompositeOperation, PreviewOperation.
|
||||||
* @see NodeOperation.isOutputOperation
|
* @see NodeOperation.isOutputOperation
|
||||||
*/
|
*/
|
||||||
const int isOutputExecutionGroup() const { return this->isOutput; }
|
const int isOutputExecutionGroup() const { return this->m_isOutput; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set whether this ExecutionGroup is an output
|
* @brief set whether this ExecutionGroup is an output
|
||||||
* @param isOutput
|
* @param isOutput
|
||||||
*/
|
*/
|
||||||
void setOutputExecutionGroup(int isOutput) { this->isOutput = isOutput; }
|
void setOutputExecutionGroup(int isOutput) { this->m_isOutput = isOutput; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief determine the resolution of this ExecutionGroup
|
* @brief determine the resolution of this ExecutionGroup
|
||||||
@@ -276,17 +276,17 @@ public:
|
|||||||
* @brief set the resolution of this executiongroup
|
* @brief set the resolution of this executiongroup
|
||||||
* @param resolution
|
* @param resolution
|
||||||
*/
|
*/
|
||||||
void setResolution(unsigned int resolution[]) { this->width = resolution[0]; this->height = resolution[1]; }
|
void setResolution(unsigned int resolution[]) { this->m_width = resolution[0]; this->m_height = resolution[1]; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the width of this execution group
|
* @brief get the width of this execution group
|
||||||
*/
|
*/
|
||||||
const unsigned int getWidth() { return this->width; }
|
const unsigned int getWidth() { return this->m_width; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the height of this execution group
|
* @brief get the height of this execution group
|
||||||
*/
|
*/
|
||||||
const unsigned int getHeight() { return this->height; }
|
const unsigned int getHeight() { return this->m_height; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief does this ExecutionGroup contains a complex NodeOperation
|
* @brief does this ExecutionGroup contains a complex NodeOperation
|
||||||
@@ -387,7 +387,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool isOpenCL();
|
bool isOpenCL();
|
||||||
|
|
||||||
void setChunksize(int chunksize) { this->chunkSize = chunksize; }
|
void setChunksize(int chunksize) { this->m_chunkSize = chunksize; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the Render priority of this ExecutionGroup
|
* @brief get the Render priority of this ExecutionGroup
|
||||||
|
@@ -47,36 +47,36 @@
|
|||||||
|
|
||||||
ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool rendering)
|
ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool rendering)
|
||||||
{
|
{
|
||||||
context.setbNodeTree(editingtree);
|
this->m_context.setbNodeTree(editingtree);
|
||||||
bNode *gnode;
|
bNode *gnode;
|
||||||
for (gnode = (bNode *)editingtree->nodes.first; gnode; gnode = (bNode *)gnode->next) {
|
for (gnode = (bNode *)editingtree->nodes.first; gnode; gnode = (bNode *)gnode->next) {
|
||||||
if (gnode->type == NODE_GROUP && gnode->typeinfo->group_edit_get(gnode)) {
|
if (gnode->type == NODE_GROUP && gnode->typeinfo->group_edit_get(gnode)) {
|
||||||
context.setActivegNode(gnode);
|
this->m_context.setActivegNode(gnode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initialize the CompositorContext */
|
/* initialize the CompositorContext */
|
||||||
if (rendering) {
|
if (rendering) {
|
||||||
context.setQuality((CompositorQuality)editingtree->render_quality);
|
this->m_context.setQuality((CompositorQuality)editingtree->render_quality);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
context.setQuality((CompositorQuality)editingtree->edit_quality);
|
this->m_context.setQuality((CompositorQuality)editingtree->edit_quality);
|
||||||
}
|
}
|
||||||
context.setRendering(rendering);
|
this->m_context.setRendering(rendering);
|
||||||
context.setHasActiveOpenCLDevices(WorkScheduler::hasGPUDevices() && (editingtree->flag & NTREE_COM_OPENCL));
|
this->m_context.setHasActiveOpenCLDevices(WorkScheduler::hasGPUDevices() && (editingtree->flag & NTREE_COM_OPENCL));
|
||||||
|
|
||||||
ExecutionSystemHelper::addbNodeTree(*this, 0, editingtree, NULL);
|
ExecutionSystemHelper::addbNodeTree(*this, 0, editingtree, NULL);
|
||||||
|
|
||||||
context.setRenderData(rd);
|
this->m_context.setRenderData(rd);
|
||||||
this->convertToOperations();
|
this->convertToOperations();
|
||||||
this->groupOperations(); /* group operations in ExecutionGroups */
|
this->groupOperations(); /* group operations in ExecutionGroups */
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
unsigned int resolution[2];
|
unsigned int resolution[2];
|
||||||
for (index = 0; index < this->groups.size(); index++) {
|
for (index = 0; index < this->m_groups.size(); index++) {
|
||||||
resolution[0] = 0;
|
resolution[0] = 0;
|
||||||
resolution[1] = 0;
|
resolution[1] = 0;
|
||||||
ExecutionGroup *executionGroup = groups[index];
|
ExecutionGroup *executionGroup = this->m_groups[index];
|
||||||
executionGroup->determineResolution(resolution);
|
executionGroup->determineResolution(resolution);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,32 +88,32 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool re
|
|||||||
ExecutionSystem::~ExecutionSystem()
|
ExecutionSystem::~ExecutionSystem()
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->connections.size(); index++) {
|
for (index = 0; index < this->m_connections.size(); index++) {
|
||||||
SocketConnection *connection = this->connections[index];
|
SocketConnection *connection = this->m_connections[index];
|
||||||
delete connection;
|
delete connection;
|
||||||
}
|
}
|
||||||
this->connections.clear();
|
this->m_connections.clear();
|
||||||
for (index = 0; index < this->nodes.size(); index++) {
|
for (index = 0; index < this->m_nodes.size(); index++) {
|
||||||
Node *node = this->nodes[index];
|
Node *node = this->m_nodes[index];
|
||||||
delete node;
|
delete node;
|
||||||
}
|
}
|
||||||
this->nodes.clear();
|
this->m_nodes.clear();
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
NodeOperation *operation = this->operations[index];
|
NodeOperation *operation = this->m_operations[index];
|
||||||
delete operation;
|
delete operation;
|
||||||
}
|
}
|
||||||
this->operations.clear();
|
this->m_operations.clear();
|
||||||
for (index = 0; index < this->groups.size(); index++) {
|
for (index = 0; index < this->m_groups.size(); index++) {
|
||||||
ExecutionGroup *group = this->groups[index];
|
ExecutionGroup *group = this->m_groups[index];
|
||||||
delete group;
|
delete group;
|
||||||
}
|
}
|
||||||
this->groups.clear();
|
this->m_groups.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecutionSystem::execute()
|
void ExecutionSystem::execute()
|
||||||
{
|
{
|
||||||
unsigned int order = 0;
|
unsigned int order = 0;
|
||||||
for (vector<NodeOperation *>::iterator iter = this->operations.begin(); iter != operations.end(); ++iter) {
|
for (vector<NodeOperation *>::iterator iter = this->m_operations.begin(); iter != this->m_operations.end(); ++iter) {
|
||||||
NodeBase *node = *iter;
|
NodeBase *node = *iter;
|
||||||
NodeOperation *operation = (NodeOperation *) node;
|
NodeOperation *operation = (NodeOperation *) node;
|
||||||
if (operation->isReadBufferOperation()) {
|
if (operation->isReadBufferOperation()) {
|
||||||
@@ -124,18 +124,18 @@ void ExecutionSystem::execute()
|
|||||||
}
|
}
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
|
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
NodeOperation *operation = this->operations[index];
|
NodeOperation *operation = this->m_operations[index];
|
||||||
operation->setbNodeTree(this->context.getbNodeTree());
|
operation->setbNodeTree(this->m_context.getbNodeTree());
|
||||||
operation->initExecution();
|
operation->initExecution();
|
||||||
}
|
}
|
||||||
for (index = 0; index < this->groups.size(); index++) {
|
for (index = 0; index < this->m_groups.size(); index++) {
|
||||||
ExecutionGroup *executionGroup = this->groups[index];
|
ExecutionGroup *executionGroup = this->m_groups[index];
|
||||||
executionGroup->setChunksize(context.getChunksize());
|
executionGroup->setChunksize(this->m_context.getChunksize());
|
||||||
executionGroup->initExecution();
|
executionGroup->initExecution();
|
||||||
}
|
}
|
||||||
|
|
||||||
WorkScheduler::start(this->context);
|
WorkScheduler::start(this->m_context);
|
||||||
|
|
||||||
executeGroups(COM_PRIORITY_HIGH);
|
executeGroups(COM_PRIORITY_HIGH);
|
||||||
executeGroups(COM_PRIORITY_MEDIUM);
|
executeGroups(COM_PRIORITY_MEDIUM);
|
||||||
@@ -144,12 +144,12 @@ void ExecutionSystem::execute()
|
|||||||
WorkScheduler::finish();
|
WorkScheduler::finish();
|
||||||
WorkScheduler::stop();
|
WorkScheduler::stop();
|
||||||
|
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
NodeOperation *operation = this->operations[index];
|
NodeOperation *operation = this->m_operations[index];
|
||||||
operation->deinitExecution();
|
operation->deinitExecution();
|
||||||
}
|
}
|
||||||
for (index = 0; index < this->groups.size(); index++) {
|
for (index = 0; index < this->m_groups.size(); index++) {
|
||||||
ExecutionGroup *executionGroup = this->groups[index];
|
ExecutionGroup *executionGroup = this->m_groups[index];
|
||||||
executionGroup->deinitExecution();
|
executionGroup->deinitExecution();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ void ExecutionSystem::executeGroups(CompositorPriority priority)
|
|||||||
|
|
||||||
void ExecutionSystem::addOperation(NodeOperation *operation)
|
void ExecutionSystem::addOperation(NodeOperation *operation)
|
||||||
{
|
{
|
||||||
ExecutionSystemHelper::addOperation(this->operations, operation);
|
ExecutionSystemHelper::addOperation(this->m_operations, operation);
|
||||||
// operation->setBTree
|
// operation->setBTree
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,13 +231,13 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
|
|||||||
void ExecutionSystem::convertToOperations()
|
void ExecutionSystem::convertToOperations()
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->nodes.size(); index++) {
|
for (index = 0; index < this->m_nodes.size(); index++) {
|
||||||
Node *node = (Node *)this->nodes[index];
|
Node *node = (Node *)this->m_nodes[index];
|
||||||
node->convertToOperations(this, &this->context);
|
node->convertToOperations(this, &this->m_context);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (index = 0; index < this->connections.size(); index++) {
|
for (index = 0; index < this->m_connections.size(); index++) {
|
||||||
SocketConnection *connection = this->connections[index];
|
SocketConnection *connection = this->m_connections[index];
|
||||||
if (connection->isValid()) {
|
if (connection->isValid()) {
|
||||||
if (connection->getFromSocket()->getDataType() != connection->getToSocket()->getDataType()) {
|
if (connection->getFromSocket()->getDataType() != connection->getToSocket()->getDataType()) {
|
||||||
Converter::convertDataType(connection, this);
|
Converter::convertDataType(connection, this);
|
||||||
@@ -246,18 +246,18 @@ void ExecutionSystem::convertToOperations()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// determine all resolutions of the operations (Width/Height)
|
// determine all resolutions of the operations (Width/Height)
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
NodeOperation *operation = this->operations[index];
|
NodeOperation *operation = this->m_operations[index];
|
||||||
if (operation->isOutputOperation(context.isRendering()) && !operation->isPreviewOperation()) {
|
if (operation->isOutputOperation(this->m_context.isRendering()) && !operation->isPreviewOperation()) {
|
||||||
unsigned int resolution[2] = {0, 0};
|
unsigned int resolution[2] = {0, 0};
|
||||||
unsigned int preferredResolution[2] = {0, 0};
|
unsigned int preferredResolution[2] = {0, 0};
|
||||||
operation->determineResolution(resolution, preferredResolution);
|
operation->determineResolution(resolution, preferredResolution);
|
||||||
operation->setResolution(resolution);
|
operation->setResolution(resolution);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
NodeOperation *operation = this->operations[index];
|
NodeOperation *operation = this->m_operations[index];
|
||||||
if (operation->isOutputOperation(context.isRendering()) && operation->isPreviewOperation()) {
|
if (operation->isOutputOperation(this->m_context.isRendering()) && operation->isPreviewOperation()) {
|
||||||
unsigned int resolution[2] = {0, 0};
|
unsigned int resolution[2] = {0, 0};
|
||||||
unsigned int preferredResolution[2] = {0, 0};
|
unsigned int preferredResolution[2] = {0, 0};
|
||||||
operation->determineResolution(resolution, preferredResolution);
|
operation->determineResolution(resolution, preferredResolution);
|
||||||
@@ -266,8 +266,8 @@ void ExecutionSystem::convertToOperations()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add convert resolution operations when needed.
|
// add convert resolution operations when needed.
|
||||||
for (index = 0; index < this->connections.size(); index++) {
|
for (index = 0; index < this->m_connections.size(); index++) {
|
||||||
SocketConnection *connection = this->connections[index];
|
SocketConnection *connection = this->m_connections[index];
|
||||||
if (connection->isValid()) {
|
if (connection->isValid()) {
|
||||||
if (connection->needsResolutionConversion()) {
|
if (connection->needsResolutionConversion()) {
|
||||||
Converter::convertResolution(connection, this);
|
Converter::convertResolution(connection, this);
|
||||||
@@ -282,13 +282,13 @@ void ExecutionSystem::groupOperations()
|
|||||||
NodeOperation *operation;
|
NodeOperation *operation;
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
// surround complex operations with ReadBufferOperation and WriteBufferOperation
|
// surround complex operations with ReadBufferOperation and WriteBufferOperation
|
||||||
for (index = 0; index < this->operations.size(); index++) {
|
for (index = 0; index < this->m_operations.size(); index++) {
|
||||||
operation = this->operations[index];
|
operation = this->m_operations[index];
|
||||||
if (operation->isComplex()) {
|
if (operation->isComplex()) {
|
||||||
this->addReadWriteBufferOperations(operation);
|
this->addReadWriteBufferOperations(operation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExecutionSystemHelper::findOutputNodeOperations(&outputOperations, this->getOperations(), this->context.isRendering());
|
ExecutionSystemHelper::findOutputNodeOperations(&outputOperations, this->getOperations(), this->m_context.isRendering());
|
||||||
for (vector<NodeOperation *>::iterator iter = outputOperations.begin(); iter != outputOperations.end(); ++iter) {
|
for (vector<NodeOperation *>::iterator iter = outputOperations.begin(); iter != outputOperations.end(); ++iter) {
|
||||||
operation = *iter;
|
operation = *iter;
|
||||||
ExecutionGroup *group = new ExecutionGroup();
|
ExecutionGroup *group = new ExecutionGroup();
|
||||||
@@ -300,15 +300,15 @@ void ExecutionSystem::groupOperations()
|
|||||||
|
|
||||||
void ExecutionSystem::addSocketConnection(SocketConnection *connection)
|
void ExecutionSystem::addSocketConnection(SocketConnection *connection)
|
||||||
{
|
{
|
||||||
this->connections.push_back(connection);
|
this->m_connections.push_back(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result, CompositorPriority priority) const
|
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result, CompositorPriority priority) const
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->groups.size(); index++) {
|
for (index = 0; index < this->m_groups.size(); index++) {
|
||||||
ExecutionGroup *group = this->groups[index];
|
ExecutionGroup *group = this->m_groups[index];
|
||||||
if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) {
|
if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) {
|
||||||
result->push_back(group);
|
result->push_back(group);
|
||||||
}
|
}
|
||||||
@@ -318,8 +318,8 @@ void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result,
|
|||||||
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result) const
|
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result) const
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->groups.size(); index++) {
|
for (index = 0; index < this->m_groups.size(); index++) {
|
||||||
ExecutionGroup *group = this->groups[index];
|
ExecutionGroup *group = this->m_groups[index];
|
||||||
if (group->isOutputExecutionGroup()) {
|
if (group->isOutputExecutionGroup()) {
|
||||||
result->push_back(group);
|
result->push_back(group);
|
||||||
}
|
}
|
||||||
|
@@ -108,27 +108,27 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief the context used during execution
|
* @brief the context used during execution
|
||||||
*/
|
*/
|
||||||
CompositorContext context;
|
CompositorContext m_context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief vector of nodes
|
* @brief vector of nodes
|
||||||
*/
|
*/
|
||||||
vector<Node *> nodes;
|
vector<Node *> m_nodes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief vector of operations
|
* @brief vector of operations
|
||||||
*/
|
*/
|
||||||
vector<NodeOperation *> operations;
|
vector<NodeOperation *> m_operations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief vector of groups
|
* @brief vector of groups
|
||||||
*/
|
*/
|
||||||
vector<ExecutionGroup *> groups
|
vector<ExecutionGroup *> m_groups;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief vector of connections
|
* @brief vector of connections
|
||||||
*/;
|
*/
|
||||||
vector<SocketConnection *> connections;
|
vector<SocketConnection *> m_connections;
|
||||||
|
|
||||||
private: //methods
|
private: //methods
|
||||||
/**
|
/**
|
||||||
@@ -200,27 +200,27 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief get the reference to the compositor context
|
* @brief get the reference to the compositor context
|
||||||
*/
|
*/
|
||||||
CompositorContext& getContext() { return this->context; }
|
CompositorContext& getContext() { return this->m_context; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the reference to the compositor nodes
|
* @brief get the reference to the compositor nodes
|
||||||
*/
|
*/
|
||||||
vector<Node *>& getNodes() { return this->nodes; }
|
vector<Node *>& getNodes() { return this->m_nodes; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the reference to the compositor connections
|
* @brief get the reference to the compositor connections
|
||||||
*/
|
*/
|
||||||
vector<SocketConnection *>& getConnections() { return this->connections; }
|
vector<SocketConnection *>& getConnections() { return this->m_connections; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the reference to the list of execution groups
|
* @brief get the reference to the list of execution groups
|
||||||
*/
|
*/
|
||||||
vector<ExecutionGroup *>& getExecutionGroups() { return this->groups; }
|
vector<ExecutionGroup *>& getExecutionGroups() { return this->m_groups; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the reference to the list of operations
|
* @brief get the reference to the list of operations
|
||||||
*/
|
*/
|
||||||
vector<NodeOperation *>& getOperations() { return this->operations; }
|
vector<NodeOperation *>& getOperations() { return this->m_operations; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@@ -27,37 +27,37 @@
|
|||||||
|
|
||||||
InputSocket::InputSocket(DataType datatype) : Socket(datatype)
|
InputSocket::InputSocket(DataType datatype) : Socket(datatype)
|
||||||
{
|
{
|
||||||
this->connection = NULL;
|
this->m_connection = NULL;
|
||||||
this->resizeMode = COM_SC_CENTER;
|
this->m_resizeMode = COM_SC_CENTER;
|
||||||
}
|
}
|
||||||
InputSocket::InputSocket(DataType datatype, InputSocketResizeMode resizeMode) : Socket(datatype)
|
InputSocket::InputSocket(DataType datatype, InputSocketResizeMode resizeMode) : Socket(datatype)
|
||||||
{
|
{
|
||||||
this->connection = NULL;
|
this->m_connection = NULL;
|
||||||
this->resizeMode = resizeMode;
|
this->m_resizeMode = resizeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
InputSocket::InputSocket(InputSocket *from) : Socket(from->getDataType())
|
InputSocket::InputSocket(InputSocket *from) : Socket(from->getDataType())
|
||||||
{
|
{
|
||||||
this->connection = NULL;
|
this->m_connection = NULL;
|
||||||
this->resizeMode = from->getResizeMode();
|
this->m_resizeMode = from->getResizeMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
int InputSocket::isInputSocket() const { return true; }
|
int InputSocket::isInputSocket() const { return true; }
|
||||||
const int InputSocket::isConnected() const { return this->connection != NULL; }
|
const int InputSocket::isConnected() const { return this->m_connection != NULL; }
|
||||||
|
|
||||||
void InputSocket::setConnection(SocketConnection *connection)
|
void InputSocket::setConnection(SocketConnection *connection)
|
||||||
{
|
{
|
||||||
this->connection = connection;
|
this->m_connection = connection;
|
||||||
}
|
}
|
||||||
SocketConnection *InputSocket::getConnection()
|
SocketConnection *InputSocket::getConnection()
|
||||||
{
|
{
|
||||||
return this->connection;
|
return this->m_connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputSocket::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
|
void InputSocket::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
|
||||||
{
|
{
|
||||||
if (this->isConnected()) {
|
if (this->isConnected()) {
|
||||||
this->connection->getFromSocket()->determineResolution(resolution, preferredResolution);
|
this->m_connection->getFromSocket()->determineResolution(resolution, preferredResolution);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
@@ -140,7 +140,7 @@ SocketReader *InputSocket::getReader()
|
|||||||
NodeOperation *InputSocket::getOperation() const
|
NodeOperation *InputSocket::getOperation() const
|
||||||
{
|
{
|
||||||
if (isConnected()) {
|
if (isConnected()) {
|
||||||
return (NodeOperation *)this->connection->getFromSocket()->getNode();
|
return (NodeOperation *)this->m_connection->getFromSocket()->getNode();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -65,12 +65,12 @@ private:
|
|||||||
* @brief connection connected to this InputSocket.
|
* @brief connection connected to this InputSocket.
|
||||||
* An input socket can only have a single connection
|
* An input socket can only have a single connection
|
||||||
*/
|
*/
|
||||||
SocketConnection *connection;
|
SocketConnection *m_connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief resize mode of this socket
|
* @brief resize mode of this socket
|
||||||
*/
|
*/
|
||||||
InputSocketResizeMode resizeMode;
|
InputSocketResizeMode m_resizeMode;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -126,7 +126,7 @@ public:
|
|||||||
* @param resizeMode the new resize mode.
|
* @param resizeMode the new resize mode.
|
||||||
*/
|
*/
|
||||||
void setResizeMode(InputSocketResizeMode resizeMode) {
|
void setResizeMode(InputSocketResizeMode resizeMode) {
|
||||||
this->resizeMode = resizeMode;
|
this->m_resizeMode = resizeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,7 +134,7 @@ public:
|
|||||||
* @return InputSocketResizeMode
|
* @return InputSocketResizeMode
|
||||||
*/
|
*/
|
||||||
InputSocketResizeMode getResizeMode() const {
|
InputSocketResizeMode getResizeMode() const {
|
||||||
return this->resizeMode;
|
return this->m_resizeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChannelInfo *getChannelInfo(const int channelnumber);
|
const ChannelInfo *getChannelInfo(const int channelnumber);
|
||||||
|
@@ -32,43 +32,43 @@ unsigned int MemoryBuffer::determineBufferSize()
|
|||||||
|
|
||||||
int MemoryBuffer::getWidth() const
|
int MemoryBuffer::getWidth() const
|
||||||
{
|
{
|
||||||
return this->rect.xmax - this->rect.xmin;
|
return this->m_rect.xmax - this->m_rect.xmin;
|
||||||
}
|
}
|
||||||
int MemoryBuffer::getHeight() const
|
int MemoryBuffer::getHeight() const
|
||||||
{
|
{
|
||||||
return this->rect.ymax - this->rect.ymin;
|
return this->m_rect.ymax - this->m_rect.ymin;
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti *rect)
|
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti *rect)
|
||||||
{
|
{
|
||||||
BLI_init_rcti(&this->rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
|
BLI_init_rcti(&this->m_rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
|
||||||
this->memoryProxy = memoryProxy;
|
this->m_memoryProxy = memoryProxy;
|
||||||
this->chunkNumber = chunkNumber;
|
this->m_chunkNumber = chunkNumber;
|
||||||
this->buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
|
this->m_buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
|
||||||
this->state = COM_MB_ALLOCATED;
|
this->m_state = COM_MB_ALLOCATED;
|
||||||
this->datatype = COM_DT_COLOR;
|
this->m_datatype = COM_DT_COLOR;
|
||||||
this->chunkWidth = this->rect.xmax - this->rect.xmin;
|
this->m_chunkWidth = this->m_rect.xmax - this->m_rect.xmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, rcti *rect)
|
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, rcti *rect)
|
||||||
{
|
{
|
||||||
BLI_init_rcti(&this->rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
|
BLI_init_rcti(&this->m_rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
|
||||||
this->memoryProxy = memoryProxy;
|
this->m_memoryProxy = memoryProxy;
|
||||||
this->chunkNumber = -1;
|
this->m_chunkNumber = -1;
|
||||||
this->buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
|
this->m_buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
|
||||||
this->state = COM_MB_TEMPORARILY;
|
this->m_state = COM_MB_TEMPORARILY;
|
||||||
this->datatype = COM_DT_COLOR;
|
this->m_datatype = COM_DT_COLOR;
|
||||||
this->chunkWidth = this->rect.xmax - this->rect.xmin;
|
this->m_chunkWidth = this->m_rect.xmax - this->m_rect.xmin;
|
||||||
}
|
}
|
||||||
MemoryBuffer *MemoryBuffer::duplicate()
|
MemoryBuffer *MemoryBuffer::duplicate()
|
||||||
{
|
{
|
||||||
MemoryBuffer *result = new MemoryBuffer(this->memoryProxy, &this->rect);
|
MemoryBuffer *result = new MemoryBuffer(this->m_memoryProxy, &this->m_rect);
|
||||||
memcpy(result->buffer, this->buffer, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
|
memcpy(result->m_buffer, this->m_buffer, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
void MemoryBuffer::clear()
|
void MemoryBuffer::clear()
|
||||||
{
|
{
|
||||||
memset(this->buffer, 0, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
|
memset(this->m_buffer, 0, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
|
||||||
}
|
}
|
||||||
|
|
||||||
float *MemoryBuffer::convertToValueBuffer()
|
float *MemoryBuffer::convertToValueBuffer()
|
||||||
@@ -78,7 +78,7 @@ float *MemoryBuffer::convertToValueBuffer()
|
|||||||
|
|
||||||
float *result = new float[size];
|
float *result = new float[size];
|
||||||
|
|
||||||
const float *fp_src = this->buffer;
|
const float *fp_src = this->m_buffer;
|
||||||
float *fp_dst = result;
|
float *fp_dst = result;
|
||||||
|
|
||||||
for (i = 0; i < size; i++, fp_dst++, fp_src += COM_NUMBER_OF_CHANNELS) {
|
for (i = 0; i < size; i++, fp_dst++, fp_src += COM_NUMBER_OF_CHANNELS) {
|
||||||
@@ -90,9 +90,9 @@ float *MemoryBuffer::convertToValueBuffer()
|
|||||||
|
|
||||||
MemoryBuffer::~MemoryBuffer()
|
MemoryBuffer::~MemoryBuffer()
|
||||||
{
|
{
|
||||||
if (this->buffer) {
|
if (this->m_buffer) {
|
||||||
MEM_freeN(this->buffer);
|
MEM_freeN(this->m_buffer);
|
||||||
this->buffer = NULL;
|
this->m_buffer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,30 +102,30 @@ void MemoryBuffer::copyContentFrom(MemoryBuffer *otherBuffer)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
unsigned int otherY;
|
unsigned int otherY;
|
||||||
unsigned int minX = max(this->rect.xmin, otherBuffer->rect.xmin);
|
unsigned int minX = max(this->m_rect.xmin, otherBuffer->m_rect.xmin);
|
||||||
unsigned int maxX = min(this->rect.xmax, otherBuffer->rect.xmax);
|
unsigned int maxX = min(this->m_rect.xmax, otherBuffer->m_rect.xmax);
|
||||||
unsigned int minY = max(this->rect.ymin, otherBuffer->rect.ymin);
|
unsigned int minY = max(this->m_rect.ymin, otherBuffer->m_rect.ymin);
|
||||||
unsigned int maxY = min(this->rect.ymax, otherBuffer->rect.ymax);
|
unsigned int maxY = min(this->m_rect.ymax, otherBuffer->m_rect.ymax);
|
||||||
int offset;
|
int offset;
|
||||||
int otherOffset;
|
int otherOffset;
|
||||||
|
|
||||||
|
|
||||||
for (otherY = minY; otherY < maxY; otherY++) {
|
for (otherY = minY; otherY < maxY; otherY++) {
|
||||||
otherOffset = ((otherY - otherBuffer->rect.ymin) * otherBuffer->chunkWidth + minX - otherBuffer->rect.xmin) * COM_NUMBER_OF_CHANNELS;
|
otherOffset = ((otherY - otherBuffer->m_rect.ymin) * otherBuffer->m_chunkWidth + minX - otherBuffer->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
|
||||||
offset = ((otherY - this->rect.ymin) * this->chunkWidth + minX - this->rect.xmin) * COM_NUMBER_OF_CHANNELS;
|
offset = ((otherY - this->m_rect.ymin) * this->m_chunkWidth + minX - this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
|
||||||
memcpy(&this->buffer[offset], &otherBuffer->buffer[otherOffset], (maxX - minX) * COM_NUMBER_OF_CHANNELS * sizeof(float));
|
memcpy(&this->m_buffer[offset], &otherBuffer->m_buffer[otherOffset], (maxX - minX) * COM_NUMBER_OF_CHANNELS * sizeof(float));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryBuffer::read(float result[4], int x, int y)
|
void MemoryBuffer::read(float result[4], int x, int y)
|
||||||
{
|
{
|
||||||
if (x >= this->rect.xmin && x < this->rect.xmax &&
|
if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
|
||||||
y >= this->rect.ymin && y < this->rect.ymax)
|
y >= this->m_rect.ymin && y < this->m_rect.ymax)
|
||||||
{
|
{
|
||||||
const int dx = x - this->rect.xmin;
|
const int dx = x - this->m_rect.xmin;
|
||||||
const int dy = y - this->rect.ymin;
|
const int dy = y - this->m_rect.ymin;
|
||||||
const int offset = (this->chunkWidth * dy + dx) * COM_NUMBER_OF_CHANNELS;
|
const int offset = (this->m_chunkWidth * dy + dx) * COM_NUMBER_OF_CHANNELS;
|
||||||
copy_v4_v4(result, &this->buffer[offset]);
|
copy_v4_v4(result, &this->m_buffer[offset]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
zero_v4(result);
|
zero_v4(result);
|
||||||
@@ -133,21 +133,21 @@ void MemoryBuffer::read(float result[4], int x, int y)
|
|||||||
}
|
}
|
||||||
void MemoryBuffer::writePixel(int x, int y, const float color[4])
|
void MemoryBuffer::writePixel(int x, int y, const float color[4])
|
||||||
{
|
{
|
||||||
if (x >= this->rect.xmin && x < this->rect.xmax &&
|
if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
|
||||||
y >= this->rect.ymin && y < this->rect.ymax)
|
y >= this->m_rect.ymin && y < this->m_rect.ymax)
|
||||||
{
|
{
|
||||||
const int offset = (this->chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
|
const int offset = (this->m_chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
|
||||||
copy_v4_v4(&this->buffer[offset], color);
|
copy_v4_v4(&this->m_buffer[offset], color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryBuffer::addPixel(int x, int y, const float color[4])
|
void MemoryBuffer::addPixel(int x, int y, const float color[4])
|
||||||
{
|
{
|
||||||
if (x >= this->rect.xmin && x < this->rect.xmax &&
|
if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
|
||||||
y >= this->rect.ymin && y < this->rect.ymax)
|
y >= this->m_rect.ymin && y < this->m_rect.ymax)
|
||||||
{
|
{
|
||||||
const int offset = (this->chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
|
const int offset = (this->m_chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
|
||||||
add_v4_v4(&this->buffer[offset], color);
|
add_v4_v4(&this->m_buffer[offset], color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,39 +56,39 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief proxy of the memory (same for all chunks in the same buffer)
|
* @brief proxy of the memory (same for all chunks in the same buffer)
|
||||||
*/
|
*/
|
||||||
MemoryProxy *memoryProxy;
|
MemoryProxy *m_memoryProxy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief the type of buffer COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR
|
* @brief the type of buffer COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR
|
||||||
*/
|
*/
|
||||||
DataType datatype;
|
DataType m_datatype;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief region of this buffer inside reative to the MemoryProxy
|
* @brief region of this buffer inside reative to the MemoryProxy
|
||||||
*/
|
*/
|
||||||
rcti rect;
|
rcti m_rect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brief refers to the chunknumber within the executiongroup where related to the MemoryProxy
|
* brief refers to the chunknumber within the executiongroup where related to the MemoryProxy
|
||||||
* @see memoryProxy
|
* @see memoryProxy
|
||||||
*/
|
*/
|
||||||
unsigned int chunkNumber;
|
unsigned int m_chunkNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief width of the chunk
|
* @brief width of the chunk
|
||||||
*/
|
*/
|
||||||
unsigned int chunkWidth;
|
unsigned int m_chunkWidth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief state of the buffer
|
* @brief state of the buffer
|
||||||
*/
|
*/
|
||||||
MemoryBufferState state;
|
MemoryBufferState m_state;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief the actual float buffer/data
|
* @brief the actual float buffer/data
|
||||||
*/
|
*/
|
||||||
float *buffer;
|
float *m_buffer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@@ -109,19 +109,19 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief read the ChunkNumber of this MemoryBuffer
|
* @brief read the ChunkNumber of this MemoryBuffer
|
||||||
*/
|
*/
|
||||||
unsigned int getChunkNumber() { return this->chunkNumber; }
|
unsigned int getChunkNumber() { return this->m_chunkNumber; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the data of this MemoryBuffer
|
* @brief get the data of this MemoryBuffer
|
||||||
* @note buffer should already be available in memory
|
* @note buffer should already be available in memory
|
||||||
*/
|
*/
|
||||||
float *getBuffer() { return this->buffer; }
|
float *getBuffer() { return this->m_buffer; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief after execution the state will be set to available by calling this method
|
* @brief after execution the state will be set to available by calling this method
|
||||||
*/
|
*/
|
||||||
void setCreatedState() {
|
void setCreatedState() {
|
||||||
this->state = COM_MB_AVAILABLE;
|
this->m_state = COM_MB_AVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void read(float result[4], int x, int y);
|
void read(float result[4], int x, int y);
|
||||||
@@ -133,7 +133,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk)
|
* @brief is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk)
|
||||||
*/
|
*/
|
||||||
inline const bool isTemporarily() const { return this->state == COM_MB_TEMPORARILY; }
|
inline const bool isTemporarily() const { return this->m_state == COM_MB_TEMPORARILY; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief add the content from otherBuffer to this MemoryBuffer
|
* @brief add the content from otherBuffer to this MemoryBuffer
|
||||||
@@ -144,7 +144,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief get the rect of this MemoryBuffer
|
* @brief get the rect of this MemoryBuffer
|
||||||
*/
|
*/
|
||||||
rcti *getRect() { return &this->rect; }
|
rcti *getRect() { return &this->m_rect; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the width of this MemoryBuffer
|
* @brief get the width of this MemoryBuffer
|
||||||
|
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
MemoryProxy::MemoryProxy()
|
MemoryProxy::MemoryProxy()
|
||||||
{
|
{
|
||||||
this->writeBufferOperation = NULL;
|
this->m_writeBufferOperation = NULL;
|
||||||
this->executor = NULL;
|
this->m_executor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryProxy::allocate(unsigned int width, unsigned int height)
|
void MemoryProxy::allocate(unsigned int width, unsigned int height)
|
||||||
@@ -37,14 +37,14 @@ void MemoryProxy::allocate(unsigned int width, unsigned int height)
|
|||||||
result.ymin = 0;
|
result.ymin = 0;
|
||||||
result.ymax = height;
|
result.ymax = height;
|
||||||
|
|
||||||
buffer = new MemoryBuffer(this, 1, &result);
|
this->m_buffer = new MemoryBuffer(this, 1, &result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemoryProxy::free()
|
void MemoryProxy::free()
|
||||||
{
|
{
|
||||||
if (buffer) {
|
if (this->m_buffer) {
|
||||||
delete buffer;
|
delete this->m_buffer;
|
||||||
buffer = NULL;
|
this->m_buffer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,8 +23,8 @@
|
|||||||
class MemoryProxy;
|
class MemoryProxy;
|
||||||
|
|
||||||
|
|
||||||
#ifndef _COM_MemoryProxy_h
|
#ifndef _COM_MemoryProxy_h_
|
||||||
#define _COM_MemoryProxy_h
|
#define _COM_MemoryProxy_h_
|
||||||
#include "COM_ExecutionGroup.h"
|
#include "COM_ExecutionGroup.h"
|
||||||
|
|
||||||
class ExecutionGroup;
|
class ExecutionGroup;
|
||||||
@@ -40,27 +40,27 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief reference to the ouput operation of the executiongroup
|
* @brief reference to the ouput operation of the executiongroup
|
||||||
*/
|
*/
|
||||||
WriteBufferOperation *writeBufferOperation;
|
WriteBufferOperation *m_writeBufferOperation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief reference to the executor. the Execution group that can fill a chunk
|
* @brief reference to the executor. the Execution group that can fill a chunk
|
||||||
*/
|
*/
|
||||||
ExecutionGroup *executor;
|
ExecutionGroup *m_executor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief datatype of this MemoryProxy
|
* @brief datatype of this MemoryProxy
|
||||||
*/
|
*/
|
||||||
DataType datatype;
|
DataType m_datatype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief channel information of this buffer
|
* @brief channel information of this buffer
|
||||||
*/
|
*/
|
||||||
ChannelInfo channelInfo[COM_NUMBER_OF_CHANNELS];
|
ChannelInfo m_channelInfo[COM_NUMBER_OF_CHANNELS];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief the allocated memory
|
* @brief the allocated memory
|
||||||
*/
|
*/
|
||||||
MemoryBuffer *buffer;
|
MemoryBuffer *m_buffer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MemoryProxy();
|
MemoryProxy();
|
||||||
@@ -69,24 +69,24 @@ public:
|
|||||||
* @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk.
|
* @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk.
|
||||||
* @param group the ExecutionGroup to set
|
* @param group the ExecutionGroup to set
|
||||||
*/
|
*/
|
||||||
void setExecutor(ExecutionGroup *executor) { this->executor = executor; }
|
void setExecutor(ExecutionGroup *executor) { this->m_executor = executor; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
|
* @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
|
||||||
*/
|
*/
|
||||||
ExecutionGroup *getExecutor() { return this->executor; }
|
ExecutionGroup *getExecutor() { return this->m_executor; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
|
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
|
||||||
* @param operation
|
* @param operation
|
||||||
*/
|
*/
|
||||||
void setWriteBufferOperation(WriteBufferOperation *operation) { this->writeBufferOperation = operation; }
|
void setWriteBufferOperation(WriteBufferOperation *operation) { this->m_writeBufferOperation = operation; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
|
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
|
||||||
* @return WriteBufferOperation
|
* @return WriteBufferOperation
|
||||||
*/
|
*/
|
||||||
WriteBufferOperation *getWriteBufferOperation() { return this->writeBufferOperation; }
|
WriteBufferOperation *getWriteBufferOperation() { return this->m_writeBufferOperation; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief allocate memory of size widht x height
|
* @brief allocate memory of size widht x height
|
||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief get the allocated memory
|
* @brief get the allocated memory
|
||||||
*/
|
*/
|
||||||
inline MemoryBuffer *getBuffer() { return this->buffer; }
|
inline MemoryBuffer *getBuffer() { return this->m_buffer; }
|
||||||
|
|
||||||
#ifdef WITH_CXX_GUARDEDALLOC
|
#ifdef WITH_CXX_GUARDEDALLOC
|
||||||
MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryProxy")
|
MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryProxy")
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
Node::Node(bNode *editorNode, bool create_sockets)
|
Node::Node(bNode *editorNode, bool create_sockets)
|
||||||
{
|
{
|
||||||
this->editorNode = editorNode;
|
this->m_editorNode = editorNode;
|
||||||
|
|
||||||
if (create_sockets) {
|
if (create_sockets) {
|
||||||
bNodeSocket *input = (bNodeSocket *)editorNode->inputs.first;
|
bNodeSocket *input = (bNodeSocket *)editorNode->inputs.first;
|
||||||
@@ -66,12 +66,12 @@ Node::Node(bNode *editorNode, bool create_sockets)
|
|||||||
}
|
}
|
||||||
Node::Node()
|
Node::Node()
|
||||||
{
|
{
|
||||||
this->editorNode = NULL;
|
this->m_editorNode = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bNode *Node::getbNode()
|
bNode *Node::getbNode()
|
||||||
{
|
{
|
||||||
return this->editorNode;
|
return this->m_editorNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex)
|
void Node::addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex)
|
||||||
|
@@ -51,12 +51,12 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief stores the reference to the SDNA bNode struct
|
* @brief stores the reference to the SDNA bNode struct
|
||||||
*/
|
*/
|
||||||
bNode *editorNode;
|
bNode *m_editorNode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Is this node part of the active group
|
* @brief Is this node part of the active group
|
||||||
*/
|
*/
|
||||||
bool inActiveGroup;
|
bool m_inActiveGroup;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Node(bNode *editorNode, bool create_sockets = true);
|
Node(bNode *editorNode, bool create_sockets = true);
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
* @brief Is this node in the active group (the group that is being edited)
|
* @brief Is this node in the active group (the group that is being edited)
|
||||||
* @param isInActiveGroup
|
* @param isInActiveGroup
|
||||||
*/
|
*/
|
||||||
void setIsInActiveGroup(bool isInActiveGroup) { this->inActiveGroup = isInActiveGroup; }
|
void setIsInActiveGroup(bool isInActiveGroup) { this->m_inActiveGroup = isInActiveGroup; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Is this node part of the active group
|
* @brief Is this node part of the active group
|
||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
* the active group will be the main tree (all nodes that are not part of a group will be active)
|
* the active group will be the main tree (all nodes that are not part of a group will be active)
|
||||||
* @return bool [false:true]
|
* @return bool [false:true]
|
||||||
*/
|
*/
|
||||||
inline bool isInActiveGroup() { return this->inActiveGroup; }
|
inline bool isInActiveGroup() { return this->m_inActiveGroup; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief convert node to operation
|
* @brief convert node to operation
|
||||||
|
@@ -39,13 +39,13 @@ NodeBase::NodeBase()
|
|||||||
|
|
||||||
NodeBase::~NodeBase()
|
NodeBase::~NodeBase()
|
||||||
{
|
{
|
||||||
while (!this->outputsockets.empty()) {
|
while (!this->m_outputsockets.empty()) {
|
||||||
delete (this->outputsockets.back());
|
delete (this->m_outputsockets.back());
|
||||||
this->outputsockets.pop_back();
|
this->m_outputsockets.pop_back();
|
||||||
}
|
}
|
||||||
while (!this->inputsockets.empty()) {
|
while (!this->m_inputsockets.empty()) {
|
||||||
delete (this->inputsockets.back());
|
delete (this->m_inputsockets.back());
|
||||||
this->inputsockets.pop_back();
|
this->m_inputsockets.pop_back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ void NodeBase::addInputSocket(DataType datatype, InputSocketResizeMode resizeMod
|
|||||||
InputSocket *socket = new InputSocket(datatype, resizeMode);
|
InputSocket *socket = new InputSocket(datatype, resizeMode);
|
||||||
socket->setEditorSocket(bSocket);
|
socket->setEditorSocket(bSocket);
|
||||||
socket->setNode(this);
|
socket->setNode(this);
|
||||||
this->inputsockets.push_back(socket);
|
this->m_inputsockets.push_back(socket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeBase::addOutputSocket(DataType datatype)
|
void NodeBase::addOutputSocket(DataType datatype)
|
||||||
@@ -76,21 +76,21 @@ void NodeBase::addOutputSocket(DataType datatype, bNodeSocket *bSocket)
|
|||||||
OutputSocket *socket = new OutputSocket(datatype);
|
OutputSocket *socket = new OutputSocket(datatype);
|
||||||
socket->setEditorSocket(bSocket);
|
socket->setEditorSocket(bSocket);
|
||||||
socket->setNode(this);
|
socket->setNode(this);
|
||||||
this->outputsockets.push_back(socket);
|
this->m_outputsockets.push_back(socket);
|
||||||
}
|
}
|
||||||
const bool NodeBase::isInputNode() const
|
const bool NodeBase::isInputNode() const
|
||||||
{
|
{
|
||||||
return this->inputsockets.size() == 0;
|
return this->m_inputsockets.size() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputSocket *NodeBase::getOutputSocket(unsigned int index)
|
OutputSocket *NodeBase::getOutputSocket(unsigned int index)
|
||||||
{
|
{
|
||||||
BLI_assert(index < this->outputsockets.size());
|
BLI_assert(index < this->m_outputsockets.size());
|
||||||
return this->outputsockets[index];
|
return this->m_outputsockets[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
InputSocket *NodeBase::getInputSocket(unsigned int index)
|
InputSocket *NodeBase::getInputSocket(unsigned int index)
|
||||||
{
|
{
|
||||||
BLI_assert(index < this->inputsockets.size());
|
BLI_assert(index < this->m_inputsockets.size());
|
||||||
return this->inputsockets[index];
|
return this->m_inputsockets[index];
|
||||||
}
|
}
|
||||||
|
@@ -47,23 +47,23 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief the list of actual inputsockets @see InputSocket
|
* @brief the list of actual inputsockets @see InputSocket
|
||||||
*/
|
*/
|
||||||
vector<InputSocket *> inputsockets;
|
vector<InputSocket *> m_inputsockets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief the list of actual outputsockets @see OutputSocket
|
* @brief the list of actual outputsockets @see OutputSocket
|
||||||
*/
|
*/
|
||||||
vector<OutputSocket *> outputsockets;
|
vector<OutputSocket *> m_outputsockets;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief get access to the vector of input sockets
|
* @brief get access to the vector of input sockets
|
||||||
*/
|
*/
|
||||||
inline vector<InputSocket *>& getInputSockets() { return this->inputsockets; }
|
inline vector<InputSocket *>& getInputSockets() { return this->m_inputsockets; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get access to the vector of input sockets
|
* @brief get access to the vector of input sockets
|
||||||
*/
|
*/
|
||||||
inline vector<OutputSocket *>& getOutputSockets() { return this->outputsockets; }
|
inline vector<OutputSocket *>& getOutputSockets() { return this->m_outputsockets; }
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -91,12 +91,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Return the number of input sockets of this node.
|
* @brief Return the number of input sockets of this node.
|
||||||
*/
|
*/
|
||||||
const unsigned int getNumberOfInputSockets() const { return this->inputsockets.size(); }
|
const unsigned int getNumberOfInputSockets() const { return this->m_inputsockets.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Return the number of output sockets of this node.
|
* @brief Return the number of output sockets of this node.
|
||||||
*/
|
*/
|
||||||
const unsigned int getNumberOfOutputSockets() const { return this->outputsockets.size(); }
|
const unsigned int getNumberOfOutputSockets() const { return this->m_outputsockets.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the reference to a certain outputsocket
|
* get the reference to a certain outputsocket
|
||||||
|
@@ -27,24 +27,24 @@ typedef enum COM_VendorID {NVIDIA=0x10DE, AMD=0x1002} COM_VendorID;
|
|||||||
|
|
||||||
OpenCLDevice::OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId)
|
OpenCLDevice::OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId)
|
||||||
{
|
{
|
||||||
this->device = device;
|
this->m_device = device;
|
||||||
this->context = context;
|
this->m_context = context;
|
||||||
this->program = program;
|
this->m_program = program;
|
||||||
this->queue = NULL;
|
this->m_queue = NULL;
|
||||||
this->vendorID = vendorId;
|
this->m_vendorID = vendorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenCLDevice::initialize()
|
bool OpenCLDevice::initialize()
|
||||||
{
|
{
|
||||||
cl_int error;
|
cl_int error;
|
||||||
queue = clCreateCommandQueue(context, device, 0, &error);
|
this->m_queue = clCreateCommandQueue(this->m_context, this->m_device, 0, &error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenCLDevice::deinitialize()
|
void OpenCLDevice::deinitialize()
|
||||||
{
|
{
|
||||||
if (queue) {
|
if (this->m_queue) {
|
||||||
clReleaseCommandQueue(queue);
|
clReleaseCommandQueue(this->m_queue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ cl_mem OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
|
|||||||
CL_FLOAT
|
CL_FLOAT
|
||||||
};
|
};
|
||||||
|
|
||||||
cl_mem clBuffer = clCreateImage2D(this->context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, &imageFormat, result->getWidth(),
|
cl_mem clBuffer = clCreateImage2D(this->m_context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, &imageFormat, result->getWidth(),
|
||||||
result->getHeight(), 0, result->getBuffer(), &error);
|
result->getHeight(), 0, result->getBuffer(), &error);
|
||||||
|
|
||||||
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
||||||
@@ -124,7 +124,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
|
|||||||
cl_int error;
|
cl_int error;
|
||||||
const size_t size[] = {outputMemoryBuffer->getWidth(), outputMemoryBuffer->getHeight()};
|
const size_t size[] = {outputMemoryBuffer->getWidth(), outputMemoryBuffer->getHeight()};
|
||||||
|
|
||||||
error = clEnqueueNDRangeKernel(this->queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
|
error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
|
||||||
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
|
|||||||
size_t size[2];
|
size_t size[2];
|
||||||
cl_int2 offset;
|
cl_int2 offset;
|
||||||
|
|
||||||
if (this->vendorID == NVIDIA){localSize = 32;}
|
if (this->m_vendorID == NVIDIA) {localSize = 32;}
|
||||||
bool breaked = false;
|
bool breaked = false;
|
||||||
for (offsety = 0; offsety < height && (!breaked); offsety += localSize) {
|
for (offsety = 0; offsety < height && (!breaked); offsety += localSize) {
|
||||||
offset[1] = offsety;
|
offset[1] = offsety;
|
||||||
@@ -160,9 +160,9 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
|
|||||||
|
|
||||||
error = clSetKernelArg(kernel, offsetIndex, sizeof(cl_int2), &offset);
|
error = clSetKernelArg(kernel, offsetIndex, sizeof(cl_int2), &offset);
|
||||||
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
||||||
error = clEnqueueNDRangeKernel(this->queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
|
error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
|
||||||
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
||||||
clFlush(this->queue);
|
clFlush(this->m_queue);
|
||||||
if (operation->isBreaked()) {
|
if (operation->isBreaked()) {
|
||||||
breaked = false;
|
breaked = false;
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
|
|||||||
cl_kernel OpenCLDevice::COM_clCreateKernel(const char *kernelname, list<cl_kernel> *clKernelsToCleanUp)
|
cl_kernel OpenCLDevice::COM_clCreateKernel(const char *kernelname, list<cl_kernel> *clKernelsToCleanUp)
|
||||||
{
|
{
|
||||||
cl_int error;
|
cl_int error;
|
||||||
cl_kernel kernel = clCreateKernel(this->program, kernelname, &error);
|
cl_kernel kernel = clCreateKernel(this->m_program, kernelname, &error);
|
||||||
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
|
||||||
else {
|
else {
|
||||||
if (clKernelsToCleanUp) clKernelsToCleanUp->push_back(kernel);
|
if (clKernelsToCleanUp) clKernelsToCleanUp->push_back(kernel);
|
||||||
|
@@ -38,27 +38,27 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief opencl context
|
* @brief opencl context
|
||||||
*/
|
*/
|
||||||
cl_context context;
|
cl_context m_context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief opencl device
|
* @brief opencl device
|
||||||
*/
|
*/
|
||||||
cl_device_id device;
|
cl_device_id m_device;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief opencl program
|
* @brief opencl program
|
||||||
*/
|
*/
|
||||||
cl_program program;
|
cl_program m_program;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief opencl command queue
|
* @brief opencl command queue
|
||||||
*/
|
*/
|
||||||
cl_command_queue queue;
|
cl_command_queue m_queue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief opencl vendor ID
|
* @brief opencl vendor ID
|
||||||
*/
|
*/
|
||||||
cl_int vendorID;
|
cl_int m_vendorID;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@@ -91,9 +91,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
void execute(WorkPackage *work);
|
void execute(WorkPackage *work);
|
||||||
|
|
||||||
cl_context getContext(){return this->context;}
|
cl_context getContext(){ return this->m_context; }
|
||||||
|
|
||||||
cl_command_queue getQueue(){return this->queue;}
|
cl_command_queue getQueue(){ return this->m_queue; }
|
||||||
|
|
||||||
cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader);
|
cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader);
|
||||||
void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers);
|
void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers);
|
||||||
|
@@ -31,7 +31,7 @@ OutputSocket::OutputSocket(DataType datatype) : Socket(datatype)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int OutputSocket::isOutputSocket() const { return true; }
|
int OutputSocket::isOutputSocket() const { return true; }
|
||||||
const int OutputSocket::isConnected() const { return this->connections.size() != 0; }
|
const int OutputSocket::isConnected() const { return this->m_connections.size() != 0; }
|
||||||
|
|
||||||
void OutputSocket::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
|
void OutputSocket::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
|
||||||
{
|
{
|
||||||
@@ -51,37 +51,37 @@ void OutputSocket::determineResolution(unsigned int resolution[], unsigned int p
|
|||||||
|
|
||||||
void OutputSocket::addConnection(SocketConnection *connection)
|
void OutputSocket::addConnection(SocketConnection *connection)
|
||||||
{
|
{
|
||||||
this->connections.push_back(connection);
|
this->m_connections.push_back(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputSocket::relinkConnections(OutputSocket *relinkToSocket, bool single)
|
void OutputSocket::relinkConnections(OutputSocket *relinkToSocket, bool single)
|
||||||
{
|
{
|
||||||
if (isConnected()) {
|
if (isConnected()) {
|
||||||
if (single) {
|
if (single) {
|
||||||
SocketConnection *connection = this->connections[0];
|
SocketConnection *connection = this->m_connections[0];
|
||||||
connection->setFromSocket(relinkToSocket);
|
connection->setFromSocket(relinkToSocket);
|
||||||
relinkToSocket->addConnection(connection);
|
relinkToSocket->addConnection(connection);
|
||||||
this->connections.erase(this->connections.begin());
|
this->m_connections.erase(this->m_connections.begin());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->connections.size(); index++) {
|
for (index = 0; index < this->m_connections.size(); index++) {
|
||||||
SocketConnection *connection = this->connections[index];
|
SocketConnection *connection = this->m_connections[index];
|
||||||
connection->setFromSocket(relinkToSocket);
|
connection->setFromSocket(relinkToSocket);
|
||||||
relinkToSocket->addConnection(connection);
|
relinkToSocket->addConnection(connection);
|
||||||
}
|
}
|
||||||
this->connections.clear();
|
this->m_connections.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void OutputSocket::removeFirstConnection()
|
void OutputSocket::removeFirstConnection()
|
||||||
{
|
{
|
||||||
SocketConnection *connection = this->connections[0];
|
SocketConnection *connection = this->m_connections[0];
|
||||||
InputSocket *inputSocket = connection->getToSocket();
|
InputSocket *inputSocket = connection->getToSocket();
|
||||||
if (inputSocket != NULL) {
|
if (inputSocket != NULL) {
|
||||||
inputSocket->setConnection(NULL);
|
inputSocket->setConnection(NULL);
|
||||||
}
|
}
|
||||||
this->connections.erase(this->connections.begin());
|
this->m_connections.erase(this->m_connections.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputSocket::clearConnections()
|
void OutputSocket::clearConnections()
|
||||||
@@ -94,8 +94,8 @@ void OutputSocket::clearConnections()
|
|||||||
WriteBufferOperation *OutputSocket::findAttachedWriteBufferOperation() const
|
WriteBufferOperation *OutputSocket::findAttachedWriteBufferOperation() const
|
||||||
{
|
{
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
for (index = 0; index < this->connections.size(); index++) {
|
for (index = 0; index < this->m_connections.size(); index++) {
|
||||||
SocketConnection *connection = this->connections[index];
|
SocketConnection *connection = this->m_connections[index];
|
||||||
NodeBase *node = connection->getToNode();
|
NodeBase *node = connection->getToNode();
|
||||||
if (node->isOperation()) {
|
if (node->isOperation()) {
|
||||||
NodeOperation *operation = (NodeOperation *)node;
|
NodeOperation *operation = (NodeOperation *)node;
|
||||||
|
@@ -42,7 +42,7 @@ class WriteBufferOperation;
|
|||||||
*/
|
*/
|
||||||
class OutputSocket : public Socket {
|
class OutputSocket : public Socket {
|
||||||
private:
|
private:
|
||||||
vector<SocketConnection *> connections;
|
vector<SocketConnection *> m_connections;
|
||||||
|
|
||||||
void removeFirstConnection();
|
void removeFirstConnection();
|
||||||
public:
|
public:
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex);
|
OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex);
|
||||||
OutputSocket(OutputSocket *from);
|
OutputSocket(OutputSocket *from);
|
||||||
void addConnection(SocketConnection *connection);
|
void addConnection(SocketConnection *connection);
|
||||||
SocketConnection *getConnection(unsigned int index) { return this->connections[index]; }
|
SocketConnection *getConnection(unsigned int index) { return this->m_connections[index]; }
|
||||||
const int isConnected() const;
|
const int isConnected() const;
|
||||||
int isOutputSocket() const;
|
int isOutputSocket() const;
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void relinkConnections(OutputSocket *relinkToSocket) { this->relinkConnections(relinkToSocket, false); };
|
void relinkConnections(OutputSocket *relinkToSocket) { this->relinkConnections(relinkToSocket, false); };
|
||||||
void relinkConnections(OutputSocket *relinkToSocket, bool single);
|
void relinkConnections(OutputSocket *relinkToSocket, bool single);
|
||||||
const int getNumberOfConnections() { return connections.size(); }
|
const int getNumberOfConnections() { return this->m_connections.size(); }
|
||||||
|
|
||||||
void clearConnections();
|
void clearConnections();
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
SingleThreadedNodeOperation::SingleThreadedNodeOperation() : NodeOperation()
|
SingleThreadedNodeOperation::SingleThreadedNodeOperation() : NodeOperation()
|
||||||
{
|
{
|
||||||
this->cachedInstance = NULL;
|
this->m_cachedInstance = NULL;
|
||||||
setComplex(true);
|
setComplex(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,26 +35,26 @@ void SingleThreadedNodeOperation::initExecution()
|
|||||||
|
|
||||||
void SingleThreadedNodeOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
|
void SingleThreadedNodeOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
|
||||||
{
|
{
|
||||||
this->cachedInstance->read(color, x, y);
|
this->m_cachedInstance->read(color, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SingleThreadedNodeOperation::deinitExecution()
|
void SingleThreadedNodeOperation::deinitExecution()
|
||||||
{
|
{
|
||||||
deinitMutex();
|
deinitMutex();
|
||||||
if (this->cachedInstance) {
|
if (this->m_cachedInstance) {
|
||||||
delete cachedInstance;
|
delete this->m_cachedInstance;
|
||||||
this->cachedInstance = NULL;
|
this->m_cachedInstance = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void *SingleThreadedNodeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
void *SingleThreadedNodeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
|
||||||
{
|
{
|
||||||
if (this->cachedInstance) return this->cachedInstance;
|
if (this->m_cachedInstance) return this->m_cachedInstance;
|
||||||
|
|
||||||
lockMutex();
|
lockMutex();
|
||||||
if (this->cachedInstance == NULL) {
|
if (this->m_cachedInstance == NULL) {
|
||||||
//
|
//
|
||||||
this->cachedInstance = createMemoryBuffer(rect, memoryBuffers);
|
this->m_cachedInstance = createMemoryBuffer(rect, memoryBuffers);
|
||||||
}
|
}
|
||||||
unlockMutex();
|
unlockMutex();
|
||||||
return this->cachedInstance;
|
return this->m_cachedInstance;
|
||||||
}
|
}
|
||||||
|
@@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
class SingleThreadedNodeOperation : public NodeOperation {
|
class SingleThreadedNodeOperation : public NodeOperation {
|
||||||
private:
|
private:
|
||||||
MemoryBuffer *cachedInstance;
|
MemoryBuffer *m_cachedInstance;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline bool isCached() {
|
inline bool isCached() {
|
||||||
return cachedInstance != NULL;
|
return this->m_cachedInstance != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -26,18 +26,18 @@
|
|||||||
|
|
||||||
Socket::Socket(DataType datatype)
|
Socket::Socket(DataType datatype)
|
||||||
{
|
{
|
||||||
this->datatype = datatype;
|
this->m_datatype = datatype;
|
||||||
this->editorSocket = NULL;
|
this->m_editorSocket = NULL;
|
||||||
this->node = NULL;
|
this->m_node = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataType Socket::getDataType() const
|
DataType Socket::getDataType() const
|
||||||
{
|
{
|
||||||
return this->datatype;
|
return this->m_datatype;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Socket::isInputSocket() const { return false; }
|
int Socket::isInputSocket() const { return false; }
|
||||||
int Socket::isOutputSocket() const { return false; }
|
int Socket::isOutputSocket() const { return false; }
|
||||||
const int Socket::isConnected() const { return false; }
|
const int Socket::isConnected() const { return false; }
|
||||||
void Socket::setNode(NodeBase *node) { this->node = node; }
|
void Socket::setNode(NodeBase *node) { this->m_node = node; }
|
||||||
NodeBase *Socket::getNode() const { return this->node; }
|
NodeBase *Socket::getNode() const { return this->m_node; }
|
||||||
|
@@ -53,15 +53,15 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Reference to the node where this Socket belongs to
|
* Reference to the node where this Socket belongs to
|
||||||
*/
|
*/
|
||||||
NodeBase *node;
|
NodeBase *m_node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the datatype of this socket. Is used for automatically data transformation.
|
* the datatype of this socket. Is used for automatically data transformation.
|
||||||
* @section data-conversion
|
* @section data-conversion
|
||||||
*/
|
*/
|
||||||
DataType datatype;
|
DataType m_datatype;
|
||||||
|
|
||||||
bNodeSocket *editorSocket;
|
bNodeSocket *m_editorSocket;
|
||||||
public:
|
public:
|
||||||
Socket(DataType datatype);
|
Socket(DataType datatype);
|
||||||
|
|
||||||
@@ -75,8 +75,8 @@ public:
|
|||||||
int isOutputSocket() const;
|
int isOutputSocket() const;
|
||||||
virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {}
|
virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {}
|
||||||
|
|
||||||
void setEditorSocket(bNodeSocket *editorSocket) { this->editorSocket = editorSocket; }
|
void setEditorSocket(bNodeSocket *editorSocket) { this->m_editorSocket = editorSocket; }
|
||||||
bNodeSocket *getbNodeSocket() const { return this->editorSocket; }
|
bNodeSocket *getbNodeSocket() const { return this->m_editorSocket; }
|
||||||
|
|
||||||
#ifdef WITH_CXX_GUARDEDALLOC
|
#ifdef WITH_CXX_GUARDEDALLOC
|
||||||
MEM_CXX_CLASS_ALLOC_FUNCS("COM:Socket")
|
MEM_CXX_CLASS_ALLOC_FUNCS("COM:Socket")
|
||||||
|
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
SocketConnection::SocketConnection()
|
SocketConnection::SocketConnection()
|
||||||
{
|
{
|
||||||
this->fromSocket = NULL;
|
this->m_fromSocket = NULL;
|
||||||
this->toSocket = NULL;
|
this->m_toSocket = NULL;
|
||||||
this->setIgnoreResizeCheck(false);
|
this->setIgnoreResizeCheck(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,19 +35,19 @@ void SocketConnection::setFromSocket(OutputSocket *fromsocket)
|
|||||||
if (fromsocket == NULL) {
|
if (fromsocket == NULL) {
|
||||||
throw "ERROR";
|
throw "ERROR";
|
||||||
}
|
}
|
||||||
this->fromSocket = fromsocket;
|
this->m_fromSocket = fromsocket;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputSocket *SocketConnection::getFromSocket() const { return this->fromSocket; }
|
OutputSocket *SocketConnection::getFromSocket() const { return this->m_fromSocket; }
|
||||||
void SocketConnection::setToSocket(InputSocket *tosocket)
|
void SocketConnection::setToSocket(InputSocket *tosocket)
|
||||||
{
|
{
|
||||||
if (tosocket == NULL) {
|
if (tosocket == NULL) {
|
||||||
throw "ERROR";
|
throw "ERROR";
|
||||||
}
|
}
|
||||||
this->toSocket = tosocket;
|
this->m_toSocket = tosocket;
|
||||||
}
|
}
|
||||||
|
|
||||||
InputSocket *SocketConnection::getToSocket() const { return this->toSocket; }
|
InputSocket *SocketConnection::getToSocket() const { return this->m_toSocket; }
|
||||||
|
|
||||||
NodeBase *SocketConnection::getFromNode() const
|
NodeBase *SocketConnection::getFromNode() const
|
||||||
{
|
{
|
||||||
@@ -79,10 +79,10 @@ bool SocketConnection::isValid() const
|
|||||||
|
|
||||||
bool SocketConnection::needsResolutionConversion() const
|
bool SocketConnection::needsResolutionConversion() const
|
||||||
{
|
{
|
||||||
if (this->ignoreResizeCheck) { return false; }
|
if (this->m_ignoreResizeCheck) { return false; }
|
||||||
NodeOperation *fromOperation = (NodeOperation *)this->getFromNode();
|
NodeOperation *fromOperation = (NodeOperation *)this->getFromNode();
|
||||||
NodeOperation *toOperation = (NodeOperation *)this->getToNode();
|
NodeOperation *toOperation = (NodeOperation *)this->getToNode();
|
||||||
if (this->toSocket->getResizeMode() == COM_SC_NO_RESIZE) { return false; }
|
if (this->m_toSocket->getResizeMode() == COM_SC_NO_RESIZE) { return false; }
|
||||||
const unsigned int fromWidth = fromOperation->getWidth();
|
const unsigned int fromWidth = fromOperation->getWidth();
|
||||||
const unsigned int fromHeight = fromOperation->getHeight();
|
const unsigned int fromHeight = fromOperation->getHeight();
|
||||||
const unsigned int toWidth = toOperation->getWidth();
|
const unsigned int toWidth = toOperation->getWidth();
|
||||||
|
@@ -48,17 +48,17 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief Startpoint of the connection
|
* @brief Startpoint of the connection
|
||||||
*/
|
*/
|
||||||
OutputSocket *fromSocket;
|
OutputSocket *m_fromSocket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Endpoint of the connection
|
* @brief Endpoint of the connection
|
||||||
*/
|
*/
|
||||||
InputSocket *toSocket;
|
InputSocket *m_toSocket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief has the resize already been done for this connection
|
* @brief has the resize already been done for this connection
|
||||||
*/
|
*/
|
||||||
bool ignoreResizeCheck;
|
bool m_ignoreResizeCheck;
|
||||||
public:
|
public:
|
||||||
SocketConnection();
|
SocketConnection();
|
||||||
|
|
||||||
@@ -104,12 +104,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief set, whether the resize has already been done for this SocketConnection
|
* @brief set, whether the resize has already been done for this SocketConnection
|
||||||
*/
|
*/
|
||||||
void setIgnoreResizeCheck(bool check) { this->ignoreResizeCheck = check; }
|
void setIgnoreResizeCheck(bool check) { this->m_ignoreResizeCheck = check; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief has the resize already been done for this SocketConnection
|
* @brief has the resize already been done for this SocketConnection
|
||||||
*/
|
*/
|
||||||
bool isIgnoreResizeCheck() const { return this->ignoreResizeCheck; }
|
bool isIgnoreResizeCheck() const { return this->m_ignoreResizeCheck; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief does this SocketConnection need resolution conversion
|
* @brief does this SocketConnection need resolution conversion
|
||||||
|
@@ -24,6 +24,6 @@
|
|||||||
|
|
||||||
WorkPackage::WorkPackage(ExecutionGroup *group, unsigned int chunkNumber)
|
WorkPackage::WorkPackage(ExecutionGroup *group, unsigned int chunkNumber)
|
||||||
{
|
{
|
||||||
this->executionGroup = group;
|
this->m_executionGroup = group;
|
||||||
this->chunkNumber = chunkNumber;
|
this->m_chunkNumber = chunkNumber;
|
||||||
}
|
}
|
||||||
|
@@ -36,12 +36,12 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief executionGroup with the operations-setup to be evaluated
|
* @brief executionGroup with the operations-setup to be evaluated
|
||||||
*/
|
*/
|
||||||
ExecutionGroup *executionGroup;
|
ExecutionGroup *m_executionGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief number of the chunk to be executed
|
* @brief number of the chunk to be executed
|
||||||
*/
|
*/
|
||||||
unsigned int chunkNumber;
|
unsigned int m_chunkNumber;
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
@@ -53,12 +53,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief get the ExecutionGroup
|
* @brief get the ExecutionGroup
|
||||||
*/
|
*/
|
||||||
ExecutionGroup *getExecutionGroup() const { return this->executionGroup; }
|
ExecutionGroup *getExecutionGroup() const { return this->m_executionGroup; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the number of the chunk
|
* @brief get the number of the chunk
|
||||||
*/
|
*/
|
||||||
unsigned int getChunkNumber() const { return this->chunkNumber; }
|
unsigned int getChunkNumber() const { return this->m_chunkNumber; }
|
||||||
|
|
||||||
#ifdef WITH_CXX_GUARDEDALLOC
|
#ifdef WITH_CXX_GUARDEDALLOC
|
||||||
MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
|
MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_AlphaOverNode_h
|
#ifndef _COM_AlphaOverNode_h_
|
||||||
#define _COM_AlphaOverNode_h
|
#define _COM_AlphaOverNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
* @brief BlurNode
|
* @brief BlurNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BlurNode : public Node {
|
class BlurNode : public Node {
|
||||||
public:
|
public:
|
||||||
BlurNode(bNode *editorNode);
|
BlurNode(bNode *editorNode);
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
* @brief BokehBlurNode
|
* @brief BokehBlurNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BokehBlurNode : public Node {
|
class BokehBlurNode : public Node {
|
||||||
public:
|
public:
|
||||||
BokehBlurNode(bNode *editorNode);
|
BokehBlurNode(bNode *editorNode);
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_ChannelMatteNODE_H
|
#ifndef _COM_ChannelMatteNode_h_
|
||||||
#define COM_ChannelMatteNODE_H
|
#define _COM_ChannelMatteNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@
|
|||||||
* @brief ChannelMatteNode
|
* @brief ChannelMatteNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ChannelMatteNode : public Node
|
class ChannelMatteNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ChannelMatteNode(bNode *editorNode);
|
ChannelMatteNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_ChromaMatteNODE_H
|
#ifndef _COM_ChromaMatteNode_h_
|
||||||
#define COM_ChromaMatteNODE_H
|
#define _COM_ChromaMatteNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@
|
|||||||
* @brief ChromaMatteNode
|
* @brief ChromaMatteNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ChromaMatteNode : public Node
|
class ChromaMatteNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ChromaMatteNode(bNode *editorNode);
|
ChromaMatteNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_ColorBalanceNODE_H
|
#ifndef _COM_ColorBalanceNode_h_
|
||||||
#define COM_ColorBalanceNODE_H
|
#define _COM_ColorBalanceNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@
|
|||||||
* @brief ColorBalanceNode
|
* @brief ColorBalanceNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ColorBalanceNode : public Node
|
class ColorBalanceNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ColorBalanceNode(bNode *editorNode);
|
ColorBalanceNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_ColorMatteNODE_H
|
#ifndef _COM_ColorMatteNode_h_
|
||||||
#define COM_ColorMatteNODE_H
|
#define _COM_ColorMatteNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@
|
|||||||
* @brief ColorMatteNode
|
* @brief ColorMatteNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ColorMatteNode : public Node
|
class ColorMatteNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ColorMatteNode(bNode *editorNode);
|
ColorMatteNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_ColorRampNODE_H
|
#ifndef _COM_ColorRampNode_h_
|
||||||
#define COM_ColorRampNODE_H
|
#define _COM_ColorRampNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@
|
|||||||
* @brief ColorRampNode
|
* @brief ColorRampNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ColorRampNode : public Node
|
class ColorRampNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ColorRampNode(bNode *editorNode);
|
ColorRampNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_ColorSpillNODE_H
|
#ifndef _COM_ColorSpillNode_h_
|
||||||
#define COM_ColorSpillNODE_H
|
#define _COM_ColorSpillNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@
|
|||||||
* @brief ColorSpillNode
|
* @brief ColorSpillNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ColorSpillNode : public Node
|
class ColorSpillNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
ColorSpillNode(bNode *editorNode);
|
ColorSpillNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ColourToBWNode_h
|
#ifndef _COM_ColourToBWNode_h_
|
||||||
#define _COM_ColourToBWNode_h
|
#define _COM_ColourToBWNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_CombineHSVANode_h
|
#ifndef _COM_CombineHSVANode_h_
|
||||||
#define _COM_CombineHSVANode_h
|
#define _COM_CombineHSVANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_CombineRGBANode_h
|
#ifndef _COM_CombineRGBANode_h_
|
||||||
#define _COM_CombineRGBANode_h
|
#define _COM_CombineRGBANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_CombineYCCANode_h
|
#ifndef _COM_CombineYCCANode_h_
|
||||||
#define _COM_CombineYCCANode_h
|
#define _COM_CombineYCCANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_CombineYUVANode_h
|
#ifndef _COM_CombineYUVANode_h_
|
||||||
#define _COM_CombineYUVANode_h
|
#define _COM_CombineYUVANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_CompositorNode_h
|
#ifndef _COM_CompositorNode_h_
|
||||||
#define _COM_CompositorNode_h
|
#define _COM_CompositorNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ConvertAlphaNode_h
|
#ifndef _COM_ConvertAlphaNode_h_
|
||||||
#define _COM_ConvertAlphaNode_h
|
#define _COM_ConvertAlphaNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -25,6 +25,10 @@
|
|||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief CropNode
|
||||||
|
* @ingroup Node
|
||||||
|
*/
|
||||||
class CropNode : public Node {
|
class CropNode : public Node {
|
||||||
public:
|
public:
|
||||||
CropNode(bNode *editorNode);
|
CropNode(bNode *editorNode);
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
* @brief DefocusNode
|
* @brief DefocusNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DefocusNode : public Node {
|
class DefocusNode : public Node {
|
||||||
public:
|
public:
|
||||||
DefocusNode(bNode *editorNode);
|
DefocusNode(bNode *editorNode);
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_DifferenceMatteNODE_H
|
#ifndef _COM_DifferenceMatteNode_h_
|
||||||
#define COM_DifferenceMatteNODE_H
|
#define _COM_DifferenceMatteNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@
|
|||||||
* @brief DifferenceMatteNode
|
* @brief DifferenceMatteNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class DifferenceMatteNode : public Node
|
class DifferenceMatteNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
DifferenceMatteNode(bNode *editorNode);
|
DifferenceMatteNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -77,7 +77,7 @@ void DilateErodeNode::convertToOperations(ExecutionSystem *graph, CompositorCont
|
|||||||
CompositorQuality quality = context->getQuality();
|
CompositorQuality quality = context->getQuality();
|
||||||
|
|
||||||
/* initialize node data */
|
/* initialize node data */
|
||||||
NodeBlurData *data = (NodeBlurData *)&this->alpha_blur;
|
NodeBlurData *data = (NodeBlurData *)&this->m_alpha_blur;
|
||||||
memset(data, 0, sizeof(*data));
|
memset(data, 0, sizeof(*data));
|
||||||
data->filtertype = R_FILTER_GAUSS;
|
data->filtertype = R_FILTER_GAUSS;
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class DilateErodeNode : public Node {
|
class DilateErodeNode : public Node {
|
||||||
NodeBlurData alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
|
NodeBlurData m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
|
||||||
public:
|
public:
|
||||||
DilateErodeNode(bNode *editorNode);
|
DilateErodeNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_DisplaceNode_h
|
#ifndef _COM_DisplaceNode_h_
|
||||||
#define _COM_DisplaceNode_h
|
#define _COM_DisplaceNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_DistanceMatteNODE_H
|
#ifndef _COM_DistanceMatteNode_h_
|
||||||
#define COM_DistanceMatteNODE_H
|
#define _COM_DistanceMatteNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@
|
|||||||
* @brief DistanceMatteNode
|
* @brief DistanceMatteNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class DistanceMatteNode : public Node
|
class DistanceMatteNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
DistanceMatteNode(bNode *editorNode);
|
DistanceMatteNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_FILTERNODE_H
|
#ifndef _COM_FilterNode_h_
|
||||||
#define COM_FILTERNODE_H
|
#define _COM_FilterNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -29,11 +29,10 @@
|
|||||||
* @brief FilterNode
|
* @brief FilterNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class FilterNode : public Node
|
class FilterNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
FilterNode(bNode *editorNode);
|
FilterNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COM_FILTERNODE_H
|
#endif // _COM_FilterNode_h_
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_HueSaturationValueCorrectNode_h
|
#ifndef _COM_HueSaturationValueCorrectNode_h_
|
||||||
#define _COM_HueSaturationValueCorrectNode_h
|
#define _COM_HueSaturationValueCorrectNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_HueSaturationValueNode_h
|
#ifndef _COM_HueSaturationValueNode_h_
|
||||||
#define _COM_HueSaturationValueNode_h
|
#define _COM_HueSaturationValueNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -34,7 +34,6 @@ extern "C" {
|
|||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class ImageNode : public Node {
|
class ImageNode : public Node {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype);
|
NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype);
|
||||||
public:
|
public:
|
||||||
|
@@ -144,7 +144,7 @@ OutputSocket *KeyingNode::setupFeather(ExecutionSystem *graph, CompositorContext
|
|||||||
CompositorQuality quality = context->getQuality();
|
CompositorQuality quality = context->getQuality();
|
||||||
|
|
||||||
/* initialize node data */
|
/* initialize node data */
|
||||||
NodeBlurData *data = (NodeBlurData *)&this->alpha_blur;
|
NodeBlurData *data = (NodeBlurData *)&this->m_alpha_blur;
|
||||||
memset(data, 0, sizeof(*data));
|
memset(data, 0, sizeof(*data));
|
||||||
data->filtertype = R_FILTER_GAUSS;
|
data->filtertype = R_FILTER_GAUSS;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
class KeyingNode : public Node {
|
class KeyingNode : public Node {
|
||||||
protected:
|
protected:
|
||||||
NodeBlurData alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
|
NodeBlurData m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
|
||||||
|
|
||||||
OutputSocket *setupPreBlur(ExecutionSystem *graph, InputSocket *inputImage, int size, OutputSocket **originalImage);
|
OutputSocket *setupPreBlur(ExecutionSystem *graph, InputSocket *inputImage, int size, OutputSocket **originalImage);
|
||||||
OutputSocket *setupPostBlur(ExecutionSystem *graph, OutputSocket *postBlurInput, int size);
|
OutputSocket *setupPostBlur(ExecutionSystem *graph, OutputSocket *postBlurInput, int size);
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_LuminanceMatteNODE_H
|
#ifndef _COM_LuminanceMatteNode_h_
|
||||||
#define COM_LuminanceMatteNODE_H
|
#define _COM_LuminanceMatteNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -28,11 +28,10 @@
|
|||||||
* @brief LuminanceMatteNode
|
* @brief LuminanceMatteNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class LuminanceMatteNode : public Node
|
class LuminanceMatteNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
LuminanceMatteNode(bNode *editorNode);
|
LuminanceMatteNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COM_LuminanceMatteNODE_H
|
#endif // _COM_LuminanceMatteNode_h_
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_MapUVNode_h
|
#ifndef _COM_MapUVNode_h_
|
||||||
#define _COM_MapUVNode_h
|
#define _COM_MapUVNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_MapValueNode_h
|
#ifndef _COM_MapValueNode_h_
|
||||||
#define _COM_MapValueNode_h
|
#define _COM_MapValueNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
@@ -34,4 +34,5 @@ public:
|
|||||||
MapValueNode(bNode *editorNode);
|
MapValueNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
#endif // _COM_MapValueNode_h_
|
||||||
|
@@ -21,6 +21,9 @@
|
|||||||
* Sergey Sharybin
|
* Sergey Sharybin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _COM_MaskNode_h_
|
||||||
|
#define _COM_MaskNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
|
||||||
@@ -29,10 +32,10 @@
|
|||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class MaskNode : public Node {
|
class MaskNode : public Node {
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MaskNode(bNode *editorNode);
|
MaskNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // _COM_MaskNode_h_
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_MathNode_h
|
#ifndef _COM_MathNode_h_
|
||||||
#define _COM_MathNode_h
|
#define _COM_MathNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_MixNode_h
|
#ifndef _COM_MixNode_h_
|
||||||
#define _COM_MixNode_h
|
#define _COM_MixNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,6 +20,9 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _COM_MovieClipNode_h_
|
||||||
|
#define _COM_MovieClipNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
|
||||||
@@ -28,10 +31,9 @@
|
|||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class MovieClipNode : public Node {
|
class MovieClipNode : public Node {
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MovieClipNode(bNode *editorNode);
|
MovieClipNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // _COM_MovieClipNode_h_
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COM_NORMALNODE_H
|
#ifndef _COM_NormalNode_h_
|
||||||
#define COM_NORMALNODE_H
|
#define _COM_NormalNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@
|
|||||||
* @brief NormalNode
|
* @brief NormalNode
|
||||||
* @ingroup Node
|
* @ingroup Node
|
||||||
*/
|
*/
|
||||||
class NormalNode : public Node
|
class NormalNode : public Node {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
NormalNode(bNode *editorNode);
|
NormalNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
|
@@ -21,8 +21,8 @@
|
|||||||
* Lukas Tönne
|
* Lukas Tönne
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_OutputFileNode_h
|
#ifndef _COM_OutputFileNode_h_
|
||||||
#define _COM_OutputFileNode_h
|
#define _COM_OutputFileNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SeparateHSVANode_h
|
#ifndef _COM_SeparateHSVANode_h_
|
||||||
#define _COM_SeparateHSVANode_h
|
#define _COM_SeparateHSVANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SeparateRGBANode_h
|
#ifndef _COM_SeparateRGBANode_h_
|
||||||
#define _COM_SeparateRGBANode_h
|
#define _COM_SeparateRGBANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SeparateYCCANode_h
|
#ifndef _COM_SeparateYCCANode_h_
|
||||||
#define _COM_SeparateYCCANode_h
|
#define _COM_SeparateYCCANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* Dalai Felinto
|
* Dalai Felinto
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SeparateYUVANode_h
|
#ifndef _COM_SeparateYUVANode_h_
|
||||||
#define _COM_SeparateYUVANode_h
|
#define _COM_SeparateYUVANode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SetAlphaNode_h
|
#ifndef _COM_SetAlphaNode_h_
|
||||||
#define _COM_SetAlphaNode_h
|
#define _COM_SetAlphaNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SplitViewerNode_h
|
#ifndef _COM_SplitViewerNode_h_
|
||||||
#define _COM_SplitViewerNode_h
|
#define _COM_SplitViewerNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,6 +20,9 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _COM_Stabilize2dNode_h_
|
||||||
|
#define _COM_Stabilize2dNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
|
||||||
@@ -32,3 +35,5 @@ public:
|
|||||||
Stabilize2dNode(bNode *editorNode);
|
Stabilize2dNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_SwitchNode_h
|
#ifndef _COM_SwitchNode_h_
|
||||||
#define _COM_SwitchNode_h
|
#define _COM_SwitchNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "COM_NodeOperation.h"
|
#include "COM_NodeOperation.h"
|
||||||
|
@@ -20,6 +20,9 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _COM_TransformNode_h_
|
||||||
|
#define _COM_TransformNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
|
||||||
@@ -32,3 +35,5 @@ public:
|
|||||||
TransformNode(bNode *editorNode);
|
TransformNode(bNode *editorNode);
|
||||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // _COM_TransformNode_h_
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ViewerNode_h
|
#ifndef _COM_ViewerNode_h_
|
||||||
#define _COM_ViewerNode_h
|
#define _COM_ViewerNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
#include "DNA_node_types.h"
|
#include "DNA_node_types.h"
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Monique Dewanchand
|
* Monique Dewanchand
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_ZCombineNode_h
|
#ifndef _COM_ZCombineNode_h_
|
||||||
#define _COM_ZCombineNode_h
|
#define _COM_ZCombineNode_h_
|
||||||
|
|
||||||
#include "COM_Node.h"
|
#include "COM_Node.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user