stule cleanup: node headers

This commit is contained in:
Campbell Barton 2012-06-13 23:31:47 +00:00
parent 906b9e0584
commit bde7e6c96b
226 changed files with 3184 additions and 3192 deletions

View File

@ -21,256 +21,256 @@
*/
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
#include "DNA_node_types.h"
/**
* @defgroup Model The data model of the compositor
* @defgroup Memory The memory management stuff
* @defgroup Execution The execution logic
* @defgroup Conversion Conversion logic
* @defgroup Node All nodes of the compositor
* @defgroup Operation All operations of the compositor
*
* @mainpage Introduction of the Blender Compositor
*
* @section bcomp Blender compositor
* This project redesigns the interals of Blender's compositor. The project has been executed in 2011 by At Mind.
* At Mind is a technology company located in Amsterdam, The Netherlands.
* The project has been crowdfunded. This code has been released under GPL2 to be used in Blender.
*
* @section goals The goals of the project
* the new compositor has 2 goals.
* - Make a faster compositor (speed of calculation)
* - Make the compositor work faster for you (workflow)
*
* @section speed Faster compositor
* The speedup has been done by making better use of the hardware Blenders is working on. The previous compositor only
* used a single threaded model to calculate a node. The only exception to this is the Defocus node.
* Only when it is possible to calculate two full nodes in parallel a second thread was used.
* Current workstations have 8-16 threads available, and most of the time these are idle.
*
* In the new compositor we want to use as much of threads as possible. Even new OpenCL capable GPU-hardware can be
* used for calculation.
*
* @section workflow Work faster
* The previous compositor only showed the final image. The compositor could wait a long time before seeing the result
* of his work. The new compositor will work in a way that it will focus on getting information back to the user.
* It will prioritise its work to get earlier user feedback.
*
* @page memory Memory model
* The main issue is the type of memory model to use. Blender is used by consumers and professionals.
* Ranging from low-end machines to very high-end machines.
* The system should work on high-end machines and on low-end machines.
*
*
* @page executing Executing
* @section prepare Prepare execution
*
* during the preparation of the execution All ReadBufferOperation will receive an offset.
* This offset is used during execution as an optimization trick
* Next all operations will be initialized for execution @see NodeOperation.initExecution
* Next all ExecutionGroup's will be initialized for execution @see ExecutionGroup.initExecution
* this all is controlled from @see ExecutionSystem.execute
*
* @section priority Render priority
* Render priority is an priority of an output node. A user has a different need of Render priorities of output nodes
* than during editing.
* for example. the Active ViewerNode has top priority during editing, but during rendering a CompositeNode has.
* All NodeOperation has a setting for their renderpriority, but only for output NodeOperation these have effect.
* In ExecutionSystem.execute all priorities are checked. For every priority the ExecutionGroup's are check if the
* priority do match.
* When match the ExecutionGroup will be executed (this happens in serial)
*
* @see ExecutionSystem.execute control of the Render priority
* @see NodeOperation.getRenderPriority receive the render priority
* @see ExecutionGroup.execute the main loop to execute a whole ExecutionGroup
*
* @section order Chunk order
*
* When a ExecutionGroup is executed, first the order of chunks are determined.
* The settings are stored in the ViewerNode inside the ExecutionGroup. ExecutionGroups that have no viewernode,
* will use a default one.
* There are several possible chunk orders
* - [@ref OrderOfChunks.COM_TO_CENTER_OUT]: Start calculating from a configurable point and order by nearest chunk
* - [@ref OrderOfChunks.COM_TO_RANDOM]: Randomize all chunks.
* - [@ref OrderOfChunks.COM_TO_TOP_DOWN]: Start calculation from the bottom to the top of the image
* - [@ref OrderOfChunks.COM_TO_RULE_OF_THIRDS]: Experimental order based on 9 hotspots in the image
*
* When the chunkorder is determined, the first few chunks will be checked if they can be scheduled.
* Chunks can have three states:
* - [@ref ChunkExecutionState.COM_ES_NOT_SCHEDULED]: Chunk is not yet scheduled, or dependacies are not met
* - [@ref ChunkExecutionState.COM_ES_SCHEDULED]: All dependacies are met, chunk is scheduled, but not finished
* - [@ref ChunkExecutionState.COM_ES_EXECUTED]: Chunk is finished
*
* @see ExecutionGroup.execute
* @see ViewerBaseOperation.getChunkOrder
* @see OrderOfChunks
*
* @section interest Area of interest
* An ExecutionGroup can have dependancies to other ExecutionGroup's. Data passing from one ExecutionGroup to another
* one are stored in 'chunks'.
* If not all input chunks are available the chunk execution will not be scheduled.
* <pre>
* +-------------------------------------+ +--------------------------------------+
* | ExecutionGroup A | | ExecutionGroup B |
* | +----------------+ +-------------+ | | +------------+ +-----------------+ |
* | | NodeOperation a| | WriteBuffer | | | | ReadBuffer | | ViewerOperation | |
* | | *==* Operation | | | | Operation *===* | |
* | | | | | | | | | | | |
* | +----------------+ +-------------+ | | +------------+ +-----------------+ |
* | | | | | |
* +--------------------------------|----+ +---|----------------------------------+
* | |
* | |
* +---------------------------+
* | MemoryProxy |
* | +----------+ +---------+ |
* | | Chunk a | | Chunk b | |
* | | | | | |
* | +----------+ +---------+ |
* | |
* +---------------------------+
* </pre>
*
* In the above example ExecutionGroup B has an outputoperation (ViewerOperation) and is being executed.
* The first chunk is evaluated [@ref ExecutionGroup.scheduleChunkWhenPossible],
* but not all input chunks are available. The relevant ExecutionGroup (that can calculate the missing chunks;
* ExecutionGroup A) is asked to calculate the area ExecutionGroup B is missing.
* [@ref ExecutionGroup.scheduleAreaWhenPossible]
* ExecutionGroup B checks what chunks the area spans, and tries to schedule these chunks.
* If all input data is available these chunks are scheduled [@ref ExecutionGroup.scheduleChunk]
*
* <pre>
*
* +-------------------------+ +----------------+ +----------------+
* | ExecutionSystem.execute | | ExecutionGroup | | ExecutionGroup |
* +-------------------------+ | (B) | | (A) |
* O +----------------+ +----------------+
* O | |
* O ExecutionGroup.execute | |
* O------------------------------->O |
* . O |
* . O-------\ |
* . . | ExecutionGroup.scheduleChunkWhenPossible
* . . O----/ (*) |
* . . O |
* . . O |
* . . O ExecutionGroup.scheduleAreaWhenPossible|
* . . O---------------------------------------->O
* . . . O----------\ ExecutionGroup.scheduleChunkWhenPossible
* . . . . | (*)
* . . . . O-------/
* . . . . O
* . . . . O
* . . . . O-------\ ExecutionGroup.scheduleChunk
* . . . . . |
* . . . . . O----/
* . . . . O<=O
* . . . O<=O
* . . . O
* . . O<========================================O
* . . O |
* . O<=O |
* . O |
* . O |
* </pre>
*
* This happens until all chunks of (ExecutionGroup B) are finished executing or the user break's the process.
*
* NodeOperation like the ScaleOperation can influence the area of interest by reimplementing the
* [@ref NodeOperation.determineAreaOfInterest] method
*
* <pre>
*
* +--------------------------+ +---------------------------------+
* | ExecutionGroup A | | ExecutionGroup B |
* | | | |
* +--------------------------+ +---------------------------------+
* Needed chunks from ExecutionGroup A | Chunk of ExecutionGroup B (to be evaluated)
* +-------+ +-------+ | +--------+
* |Chunk 1| |Chunk 2| +----------------+ |Chunk 1 |
* | | | | | ScaleOperation | | |
* +-------+ +-------+ +----------------+ +--------+
*
* +-------+ +-------+
* |Chunk 3| |Chunk 4|
* | | | |
* +-------+ +-------+
*
* </pre>
*
* @see ExecutionGroup.execute Execute a complete ExecutionGroup. Halts until finished or breaked by user
* @see ExecutionGroup.scheduleChunkWhenPossible Tries to schedule a single chunk,
* checks if all input data is available. Can trigger dependant chunks to be calculated
* @see ExecutionGroup.scheduleAreaWhenPossible Tries to schedule an area. This can be multiple chunks
* (is called from [@ref ExecutionGroup.scheduleChunkWhenPossible])
* @see ExecutionGroup.scheduleChunk Schedule a chunk on the WorkScheduler
* @see NodeOperation.determineDependingAreaOfInterest Influence the area of interest of a chunk.
* @see WriteBufferOperation NodeOperation to write to a MemoryProxy/MemoryBuffer
* @see ReadBufferOperation NodeOperation to read from a MemoryProxy/MemoryBuffer
* @see MemoryProxy proxy for information about memory image (a image consist out of multiple chunks)
* @see MemoryBuffer Allocated memory for a single chunk
*
* @section workscheduler WorkScheduler
* the WorkScheduler is implemented as a static class. the responsibility of the WorkScheduler is to balance
* WorkPackages to the available and free devices.
* the workscheduler can work in 2 states. For witching these between the state you need to recompile blender
*
* @subsection multithread Multi threaded
* Default the workscheduler will place all work as WorkPackage in a queue.
* For every CPUcore a working thread is created. These working threads will ask the WorkScheduler if there is work
* for a specific Device.
* the workscheduler will find work for the device and the device will be asked to execute the WorkPackage
* @defgroup Model The data model of the compositor
* @defgroup Memory The memory management stuff
* @defgroup Execution The execution logic
* @defgroup Conversion Conversion logic
* @defgroup Node All nodes of the compositor
* @defgroup Operation All operations of the compositor
*
* @mainpage Introduction of the Blender Compositor
*
* @section bcomp Blender compositor
* This project redesigns the interals of Blender's compositor. The project has been executed in 2011 by At Mind.
* At Mind is a technology company located in Amsterdam, The Netherlands.
* The project has been crowdfunded. This code has been released under GPL2 to be used in Blender.
*
* @section goals The goals of the project
* the new compositor has 2 goals.
* - Make a faster compositor (speed of calculation)
* - Make the compositor work faster for you (workflow)
*
* @section speed Faster compositor
* The speedup has been done by making better use of the hardware Blenders is working on. The previous compositor only
* used a single threaded model to calculate a node. The only exception to this is the Defocus node.
* Only when it is possible to calculate two full nodes in parallel a second thread was used.
* Current workstations have 8-16 threads available, and most of the time these are idle.
*
* In the new compositor we want to use as much of threads as possible. Even new OpenCL capable GPU-hardware can be
* used for calculation.
*
* @section workflow Work faster
* The previous compositor only showed the final image. The compositor could wait a long time before seeing the result
* of his work. The new compositor will work in a way that it will focus on getting information back to the user.
* It will prioritise its work to get earlier user feedback.
*
* @page memory Memory model
* The main issue is the type of memory model to use. Blender is used by consumers and professionals.
* Ranging from low-end machines to very high-end machines.
* The system should work on high-end machines and on low-end machines.
*
*
* @page executing Executing
* @section prepare Prepare execution
*
* during the preparation of the execution All ReadBufferOperation will receive an offset.
* This offset is used during execution as an optimization trick
* Next all operations will be initialized for execution @see NodeOperation.initExecution
* Next all ExecutionGroup's will be initialized for execution @see ExecutionGroup.initExecution
* this all is controlled from @see ExecutionSystem.execute
*
* @section priority Render priority
* Render priority is an priority of an output node. A user has a different need of Render priorities of output nodes
* than during editing.
* for example. the Active ViewerNode has top priority during editing, but during rendering a CompositeNode has.
* All NodeOperation has a setting for their renderpriority, but only for output NodeOperation these have effect.
* In ExecutionSystem.execute all priorities are checked. For every priority the ExecutionGroup's are check if the
* priority do match.
* When match the ExecutionGroup will be executed (this happens in serial)
*
* @see ExecutionSystem.execute control of the Render priority
* @see NodeOperation.getRenderPriority receive the render priority
* @see ExecutionGroup.execute the main loop to execute a whole ExecutionGroup
*
* @section order Chunk order
*
* When a ExecutionGroup is executed, first the order of chunks are determined.
* The settings are stored in the ViewerNode inside the ExecutionGroup. ExecutionGroups that have no viewernode,
* will use a default one.
* There are several possible chunk orders
* - [@ref OrderOfChunks.COM_TO_CENTER_OUT]: Start calculating from a configurable point and order by nearest chunk
* - [@ref OrderOfChunks.COM_TO_RANDOM]: Randomize all chunks.
* - [@ref OrderOfChunks.COM_TO_TOP_DOWN]: Start calculation from the bottom to the top of the image
* - [@ref OrderOfChunks.COM_TO_RULE_OF_THIRDS]: Experimental order based on 9 hotspots in the image
*
* When the chunkorder is determined, the first few chunks will be checked if they can be scheduled.
* Chunks can have three states:
* - [@ref ChunkExecutionState.COM_ES_NOT_SCHEDULED]: Chunk is not yet scheduled, or dependacies are not met
* - [@ref ChunkExecutionState.COM_ES_SCHEDULED]: All dependacies are met, chunk is scheduled, but not finished
* - [@ref ChunkExecutionState.COM_ES_EXECUTED]: Chunk is finished
*
* @see ExecutionGroup.execute
* @see ViewerBaseOperation.getChunkOrder
* @see OrderOfChunks
*
* @section interest Area of interest
* An ExecutionGroup can have dependancies to other ExecutionGroup's. Data passing from one ExecutionGroup to another
* one are stored in 'chunks'.
* If not all input chunks are available the chunk execution will not be scheduled.
* <pre>
* +-------------------------------------+ +--------------------------------------+
* | ExecutionGroup A | | ExecutionGroup B |
* | +----------------+ +-------------+ | | +------------+ +-----------------+ |
* | | NodeOperation a| | WriteBuffer | | | | ReadBuffer | | ViewerOperation | |
* | | *==* Operation | | | | Operation *===* | |
* | | | | | | | | | | | |
* | +----------------+ +-------------+ | | +------------+ +-----------------+ |
* | | | | | |
* +--------------------------------|----+ +---|----------------------------------+
* | |
* | |
* +---------------------------+
* | MemoryProxy |
* | +----------+ +---------+ |
* | | Chunk a | | Chunk b | |
* | | | | | |
* | +----------+ +---------+ |
* | |
* +---------------------------+
* </pre>
*
* In the above example ExecutionGroup B has an outputoperation (ViewerOperation) and is being executed.
* The first chunk is evaluated [@ref ExecutionGroup.scheduleChunkWhenPossible],
* but not all input chunks are available. The relevant ExecutionGroup (that can calculate the missing chunks;
* ExecutionGroup A) is asked to calculate the area ExecutionGroup B is missing.
* [@ref ExecutionGroup.scheduleAreaWhenPossible]
* ExecutionGroup B checks what chunks the area spans, and tries to schedule these chunks.
* If all input data is available these chunks are scheduled [@ref ExecutionGroup.scheduleChunk]
*
* <pre>
*
* +-------------------------+ +----------------+ +----------------+
* | ExecutionSystem.execute | | ExecutionGroup | | ExecutionGroup |
* +-------------------------+ | (B) | | (A) |
* O +----------------+ +----------------+
* O | |
* O ExecutionGroup.execute | |
* O------------------------------->O |
* . O |
* . O-------\ |
* . . | ExecutionGroup.scheduleChunkWhenPossible
* . . O----/ (*) |
* . . O |
* . . O |
* . . O ExecutionGroup.scheduleAreaWhenPossible|
* . . O---------------------------------------->O
* . . . O----------\ ExecutionGroup.scheduleChunkWhenPossible
* . . . . | (*)
* . . . . O-------/
* . . . . O
* . . . . O
* . . . . O-------\ ExecutionGroup.scheduleChunk
* . . . . . |
* . . . . . O----/
* . . . . O<=O
* . . . O<=O
* . . . O
* . . O<========================================O
* . . O |
* . O<=O |
* . O |
* . O |
* </pre>
*
* This happens until all chunks of (ExecutionGroup B) are finished executing or the user break's the process.
*
* NodeOperation like the ScaleOperation can influence the area of interest by reimplementing the
* [@ref NodeOperation.determineAreaOfInterest] method
*
* <pre>
*
* +--------------------------+ +---------------------------------+
* | ExecutionGroup A | | ExecutionGroup B |
* | | | |
* +--------------------------+ +---------------------------------+
* Needed chunks from ExecutionGroup A | Chunk of ExecutionGroup B (to be evaluated)
* +-------+ +-------+ | +--------+
* |Chunk 1| |Chunk 2| +----------------+ |Chunk 1 |
* | | | | | ScaleOperation | | |
* +-------+ +-------+ +----------------+ +--------+
*
* +-------+ +-------+
* |Chunk 3| |Chunk 4|
* | | | |
* +-------+ +-------+
*
* </pre>
*
* @see ExecutionGroup.execute Execute a complete ExecutionGroup. Halts until finished or breaked by user
* @see ExecutionGroup.scheduleChunkWhenPossible Tries to schedule a single chunk,
* checks if all input data is available. Can trigger dependant chunks to be calculated
* @see ExecutionGroup.scheduleAreaWhenPossible Tries to schedule an area. This can be multiple chunks
* (is called from [@ref ExecutionGroup.scheduleChunkWhenPossible])
* @see ExecutionGroup.scheduleChunk Schedule a chunk on the WorkScheduler
* @see NodeOperation.determineDependingAreaOfInterest Influence the area of interest of a chunk.
* @see WriteBufferOperation NodeOperation to write to a MemoryProxy/MemoryBuffer
* @see ReadBufferOperation NodeOperation to read from a MemoryProxy/MemoryBuffer
* @see MemoryProxy proxy for information about memory image (a image consist out of multiple chunks)
* @see MemoryBuffer Allocated memory for a single chunk
*
* @section workscheduler WorkScheduler
* the WorkScheduler is implemented as a static class. the responsibility of the WorkScheduler is to balance
* WorkPackages to the available and free devices.
* the workscheduler can work in 2 states. For witching these between the state you need to recompile blender
*
* @subsection multithread Multi threaded
* Default the workscheduler will place all work as WorkPackage in a queue.
* For every CPUcore a working thread is created. These working threads will ask the WorkScheduler if there is work
* for a specific Device.
* the workscheduler will find work for the device and the device will be asked to execute the WorkPackage
* @subsection singlethread Single threaded
* For debugging reasons the multi-threading can be disabled. This is done by changing the COM_CURRENT_THREADING_MODEL
* to COM_TM_NOTHREAD. When compiling the workscheduler
* will be changes to support no threading and run everything on the CPU.
*
* @section devices Devices
* A Device within the compositor context is a Hardware component that can used to calculate chunks.
* This chunk is encapseled in a WorkPackage.
* the WorkScheduler controls the devices and selects the device where a WorkPackage will be calculated.
*
* @subsection WS_Devices Workscheduler
* The WorkScheduler controls all Devices. When initializing the compositor the WorkScheduler selects
* all devices that will be used during compositor.
* There are two types of Devices, CPUDevice and OpenCLDevice.
* When an ExecutionGroup schedules a Chunk the schedule method of the WorkScheduler
* The Workscheduler determines if the chunk can be run on an OpenCLDevice
* (and that there are available OpenCLDevice). If this is the case the chunk will be added to the worklist for
* OpenCLDevice's
* otherwise the chunk will be added to the worklist of CPUDevices.
*
* A thread will read the work-list and sends a workpackage to its device.
*
* @see WorkScheduler.schedule method that is called to schedule a chunk
* @see Device.execute method called to execute a chunk
*
* @subsection CPUDevice CPUDevice
* When a CPUDevice gets a WorkPackage the Device will get the inputbuffer that is needed to calculate the chunk.
* Allocation is already done by the ExecutionGroup.
* The outputbuffer of the chunk is being created.
* The OutputOperation of the ExecutionGroup is called to execute the area of the outputbuffer.
*
* @see ExecutionGroup
* @see NodeOperation.executeRegion executes a single chunk of a NodeOperation
* @see CPUDevice.execute
*
* @subsection GPUDevice OpenCLDevice
*
* To be completed!
* @see NodeOperation.executeOpenCLRegion
* @see OpenCLDevice.execute
*
* @section executePixel executing a pixel
* Finally the last step, the node functionality :)
* @subsection singlethread Single threaded
* For debugging reasons the multi-threading can be disabled. This is done by changing the COM_CURRENT_THREADING_MODEL
* to COM_TM_NOTHREAD. When compiling the workscheduler
* will be changes to support no threading and run everything on the CPU.
*
* @section devices Devices
* A Device within the compositor context is a Hardware component that can used to calculate chunks.
* This chunk is encapseled in a WorkPackage.
* the WorkScheduler controls the devices and selects the device where a WorkPackage will be calculated.
*
* @subsection WS_Devices Workscheduler
* The WorkScheduler controls all Devices. When initializing the compositor the WorkScheduler selects
* all devices that will be used during compositor.
* There are two types of Devices, CPUDevice and OpenCLDevice.
* When an ExecutionGroup schedules a Chunk the schedule method of the WorkScheduler
* The Workscheduler determines if the chunk can be run on an OpenCLDevice
* (and that there are available OpenCLDevice). If this is the case the chunk will be added to the worklist for
* OpenCLDevice's
* otherwise the chunk will be added to the worklist of CPUDevices.
*
* A thread will read the work-list and sends a workpackage to its device.
*
* @see WorkScheduler.schedule method that is called to schedule a chunk
* @see Device.execute method called to execute a chunk
*
* @subsection CPUDevice CPUDevice
* When a CPUDevice gets a WorkPackage the Device will get the inputbuffer that is needed to calculate the chunk.
* Allocation is already done by the ExecutionGroup.
* The outputbuffer of the chunk is being created.
* The OutputOperation of the ExecutionGroup is called to execute the area of the outputbuffer.
*
* @see ExecutionGroup
* @see NodeOperation.executeRegion executes a single chunk of a NodeOperation
* @see CPUDevice.execute
*
* @subsection GPUDevice OpenCLDevice
*
* To be completed!
* @see NodeOperation.executeOpenCLRegion
* @see OpenCLDevice.execute
*
* @section executePixel executing a pixel
* Finally the last step, the node functionality :)
* @page newnode Creating new nodes
*/
* @page newnode Creating new nodes
*/
/**
* @brief The main method that is used to execute the compositor tree.

View File

@ -24,9 +24,9 @@
#define _COM_defines_h_
/**
* @brief possible data types for SocketConnection
* @ingroup Model
*/
* @brief possible data types for SocketConnection
* @ingroup Model
*/
typedef enum DataType {
/** @brief Unknown data type (or not yet known) */
COM_DT_UNKNOWN = 0,
@ -39,13 +39,13 @@ typedef enum DataType {
} DataType;
/**
* @brief Possible quality settings
* @see CompositorContext.quality
* @ingroup Execution
*/
* @brief Possible quality settings
* @see CompositorContext.quality
* @ingroup Execution
*/
typedef enum CompositorQuality {
/** @brief High quality setting */
COM_QUALITY_HIGH = 0 ,
COM_QUALITY_HIGH = 0,
/** @brief Medium quality setting */
COM_QUALITY_MEDIUM = 1,
/** @brief Low quality setting */
@ -53,12 +53,12 @@ typedef enum CompositorQuality {
} CompositorQuality;
/**
* @brief Possible priority settings
* @ingroup Execution
*/
* @brief Possible priority settings
* @ingroup Execution
*/
typedef enum CompositorPriority {
/** @brief High quality setting */
COM_PRIORITY_HIGH = 2 ,
COM_PRIORITY_HIGH = 2,
/** @brief Medium quality setting */
COM_PRIORITY_MEDIUM = 1,
/** @brief Low quality setting */
@ -74,24 +74,24 @@ typedef enum CompositorPriority {
// workscheduler threading models
/**
* COM_TM_QUEUE is a multithreaded model, which uses the BLI_thread_queue pattern. This is the default option.
*/
* COM_TM_QUEUE is a multithreaded model, which uses the BLI_thread_queue pattern. This is the default option.
*/
#define COM_TM_QUEUE 1
/**
* COM_TM_NOTHREAD is a single threading model, everything is executed in the caller thread. easy for debugging
*/
* COM_TM_NOTHREAD is a single threading model, everything is executed in the caller thread. easy for debugging
*/
#define COM_TM_NOTHREAD 0
/**
* COM_CURRENT_THREADING_MODEL can be one of the above, COM_TM_QUEUE is currently default.
*/
* COM_CURRENT_THREADING_MODEL can be one of the above, COM_TM_QUEUE is currently default.
*/
#define COM_CURRENT_THREADING_MODEL COM_TM_QUEUE
// chunk order
/**
* @brief The order of chunks to be scheduled
* @ingroup Execution
*/
* @brief The order of chunks to be scheduled
* @ingroup Execution
*/
typedef enum OrderOfChunks {
/** @brief order from a distance to centerX/centerY */
COM_TO_CENTER_OUT = 0,

View File

@ -26,15 +26,15 @@
#include "COM_Device.h"
/**
* @brief class representing a CPU device.
* @note for every hardware thread in the system a CPUDevice instance will exist in the workscheduler
*/
class CPUDevice: public Device {
* @brief class representing a CPU device.
* @note for every hardware thread in the system a CPUDevice instance will exist in the workscheduler
*/
class CPUDevice : public Device {
public:
/**
* @brief execute a WorkPackage
* @param work the WorkPackage to execute
*/
* @brief execute a WorkPackage
* @param work the WorkPackage to execute
*/
void execute(WorkPackage *work);
};

View File

@ -32,9 +32,9 @@
using namespace std;
/**
* @brief List of possible channel types
* @ingroup Model
*/
* @brief List of possible channel types
* @ingroup Model
*/
typedef enum ChannelType {
COM_CT_ColorComponent /** @brief this channel is contains color information. Specific used is determined by channelnumber, and in the future color space */,
COM_CT_Alpha /** @brief this channel is contains transparency value */,
@ -47,31 +47,31 @@ typedef enum ChannelType {
} ChannelType;
/**
* @brief ChannelInfo holds information about a channel.
*
* Channels are transported from node to node via a SocketConnection.
* ChannelInfo holds specific setting of these channels in order that the to-node of the connection
* Can handle specific logic per channel setting.
*
* @note currently this is not used, but a future place to implement color spacing and other things.
* @ingroup Model
*/
* @brief ChannelInfo holds information about a channel.
*
* Channels are transported from node to node via a SocketConnection.
* ChannelInfo holds specific setting of these channels in order that the to-node of the connection
* Can handle specific logic per channel setting.
*
* @note currently this is not used, but a future place to implement color spacing and other things.
* @ingroup Model
*/
class ChannelInfo {
private:
/**
* @brief the channel number, in the connection. [0-3]
*/
* @brief the channel number, in the connection. [0-3]
*/
int number;
/**
* @brief type of channel
*/
* @brief type of channel
*/
ChannelType type;
/**
* @brieg Is this value in this channel premultiplied with its alpha
* @note only valid if type = ColorComponent;
*/
* @brieg Is this value in this channel premultiplied with its alpha
* @note only valid if type = ColorComponent;
*/
bool premultiplied;
// /**
@ -82,39 +82,39 @@ private:
public:
/**
* @brief creates a new ChannelInfo and set default values
*/
* @brief creates a new ChannelInfo and set default values
*/
ChannelInfo();
/**
* @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; }
/**
* @brief get the index of this channel in the SocketConnection
*/
const int getNumber() const {return this->number; }
* @brief get the index of this channel in the SocketConnection
*/
const int getNumber() const { return this->number; }
/**
* @brief set the type of channel
*/
* @brief set the type of channel
*/
void setType(const ChannelType type) { this->type = type; }
/**
* @brief get the type of channel
*/
const ChannelType getType() const {return this->type; }
* @brief get the type of channel
*/
const ChannelType getType() const { return this->type; }
/**
* @brief set the premultiplicatioin of this channel
*/
* @brief set the premultiplicatioin of this channel
*/
void setPremultiplied(const bool premultiplied) { this->premultiplied = premultiplied; }
/**
* @brief is this channel premultiplied
*/
const bool isPremultiplied() const {return this->premultiplied;}
* @brief is this channel premultiplied
*/
const bool isPremultiplied() const { return this->premultiplied; }
};

View File

@ -35,11 +35,11 @@ public:
void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots);
friend bool operator<(const ChunkOrder& a, const ChunkOrder& b);
void setChunkNumber(unsigned int chunknumber) {this->number = chunknumber;}
void setX(int x) {this->x = x;}
void setY(int y) {this->y = y;}
unsigned int getChunkNumber() {return this->number;}
double getDistance() {return this->distance;}
void setChunkNumber(unsigned int chunknumber) { this->number = chunknumber; }
void setX(int x) { this->x = x; }
void setY(int y) { this->y = y; }
unsigned int getChunkNumber() { return this->number; }
double getDistance() { return this->distance; }
};
#endif

View File

@ -32,36 +32,36 @@
#include "COM_defines.h"
/**
* @brief Overall context of the compositor
*/
* @brief Overall context of the compositor
*/
class CompositorContext {
private:
/**
* @brief The rendering field describes if we are rendering (F12) or if we are editing (Node editor)
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
* @brief The rendering field describes if we are rendering (F12) or if we are editing (Node editor)
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
bool rendering;
/**
* @brief The quality of the composite.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
* @brief The quality of the composite.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
CompositorQuality quality;
/**
* @brief Reference to the scene that is being composited.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
* @brief Reference to the scene that is being composited.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
Scene *scene;
/**
* @brief reference to the bNodeTree
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
* @brief reference to the bNodeTree
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
bNodeTree *bnodetree;
/**
@ -70,90 +70,90 @@ private:
bNode *activegNode;
/**
* @brief does this system have active opencl devices?
*/
* @brief does this system have active opencl devices?
*/
bool hasActiveOpenCLDevices;
public:
/**
* @brief constructor initializes the context with default values.
*/
* @brief constructor initializes the context with default values.
*/
CompositorContext();
/**
* @brief set the rendering field of the context
*/
* @brief set the rendering field of the context
*/
void setRendering(bool rendering) { this->rendering = rendering; }
/**
* @brief get the rendering field of the context
*/
bool isRendering() const {return this->rendering;}
* @brief get the rendering field of the context
*/
bool isRendering() const { return this->rendering; }
/**
* @brief set the scene of the context
*/
void setScene(Scene *scene) {this->scene = scene;}
* @brief set the scene of the context
*/
void setScene(Scene *scene) { this->scene = scene; }
/**
* @brief set the bnodetree of the context
*/
void setbNodeTree(bNodeTree *bnodetree) {this->bnodetree = bnodetree;}
* @brief set the bnodetree of the context
*/
void setbNodeTree(bNodeTree *bnodetree) { this->bnodetree = bnodetree; }
/**
* @brief get the bnodetree of the context
*/
const bNodeTree * getbNodeTree() const {return this->bnodetree;}
* @brief get the bnodetree of the context
*/
const bNodeTree *getbNodeTree() const { return this->bnodetree; }
/**
* @brief set the active groupnode of the context
*/
void setActivegNode(bNode *gnode) {this->activegNode = gnode;}
* @brief set the active groupnode of the context
*/
void setActivegNode(bNode *gnode) { this->activegNode = gnode; }
/**
* @brief get the active groupnode of the context
*/
const bNode * getActivegNode() const {return this->activegNode;}
* @brief get the active groupnode of the context
*/
const bNode *getActivegNode() const { return this->activegNode; }
/**
* @brief get the scene of the context
*/
const Scene *getScene() const {return this->scene;}
* @brief get the scene of the context
*/
const Scene *getScene() const { return this->scene; }
/**
* @brief set the quality
*/
* @brief set the quality
*/
void setQuality(CompositorQuality quality) {
this->quality = quality;
}
/**
* @brief get the quality
*/
* @brief get the quality
*/
const CompositorQuality getQuality() const {
return quality;
}
/**
* @brief get the current framenumber of the scene in this context
*/
* @brief get the current framenumber of the scene in this context
*/
const int getFramenumber() const;
/**
* @brief has this system active openclDevices?
*/
* @brief has this system active openclDevices?
*/
const bool getHasActiveOpenCLDevices() const {
return this->hasActiveOpenCLDevices;
}
/**
* @brief set has this system active openclDevices?
*/
* @brief set has this system active openclDevices?
*/
void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) {
this->hasActiveOpenCLDevices = hasAvtiveOpenCLDevices;
}
int getChunksize() {return this->getbNodeTree()->chunksize;}
int getChunksize() { return this->getbNodeTree()->chunksize; }
const int isColorManaged() const;
};

View File

@ -32,39 +32,39 @@
class Converter {
public:
/**
* @brief Convert/wraps a bNode in its Node instance.
*
* For all nodetypes a wrapper class is created.
* Muted nodes are wrapped with MuteNode.
*
* @note When adding a new node to blender, this method needs to be changed to return the correct Node instance.
*
* @see Node
* @see MuteNode
*/
* @brief Convert/wraps a bNode in its Node instance.
*
* For all nodetypes a wrapper class is created.
* Muted nodes are wrapped with MuteNode.
*
* @note When adding a new node to blender, this method needs to be changed to return the correct Node instance.
*
* @see Node
* @see MuteNode
*/
static Node *convert(bNode *bNode);
/**
* @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type.
*
* @note this method is called when conversion is needed.
*
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets
*/
* @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type.
*
* @note this method is called when conversion is needed.
*
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets
*/
static void convertDataType(SocketConnection *connection, ExecutionSystem *system);
/**
* @brief This method will add a resolution rule based on the settings of the InputSocket.
*
* @note Conversion logic is implemented in this method
* @see InputSocketResizeMode for the possible conversions.
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets
*/
* @brief This method will add a resolution rule based on the settings of the InputSocket.
*
* @note Conversion logic is implemented in this method
* @see InputSocketResizeMode for the possible conversions.
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets
*/
static void convertResolution(SocketConnection *connection, ExecutionSystem *system);
};
#endif

View File

@ -30,26 +30,26 @@
#include "COM_MemoryBuffer.h"
/**
* @brief Abstract class for device implementations to be used by the Compositor.
* devices are queried, initialized and used by the WorkScheduler.
* work are packaged as a WorkPackage instance.
*/
* @brief Abstract class for device implementations to be used by the Compositor.
* devices are queried, initialized and used by the WorkScheduler.
* work are packaged as a WorkPackage instance.
*/
class Device {
public:
/**
* @brief initialize the device
*/
virtual bool initialize() {return true;}
* @brief initialize the device
*/
virtual bool initialize() { return true; }
/**
* @brief deinitialize the device
*/
* @brief deinitialize the device
*/
virtual void deinitialize() {}
/**
* @brief execute a WorkPackage
* @param work the WorkPackage to execute
*/
* @brief execute a WorkPackage
* @param work the WorkPackage to execute
*/
virtual void execute(WorkPackage *work) = 0;
};

View File

@ -33,21 +33,21 @@
/**
* @brief the execution state of a chunk in an ExecutionGroup
* @ingroup Execution
*/
* @brief the execution state of a chunk in an ExecutionGroup
* @ingroup Execution
*/
typedef enum ChunkExecutionState {
/**
* @brief chunk is not yet scheduled
*/
* @brief chunk is not yet scheduled
*/
COM_ES_NOT_SCHEDULED = 0,
/**
* @brief chunk is scheduled, but not yet executed
*/
* @brief chunk is scheduled, but not yet executed
*/
COM_ES_SCHEDULED = 1,
/**
* @brief chunk is executed.
*/
* @brief chunk is executed.
*/
COM_ES_EXECUTED = 2
} ChunkExecutionState;
@ -56,64 +56,64 @@ class ReadBufferOperation;
class Device;
/**
* @brief Class ExecutionGroup is a group of NodeOperations that are executed as one.
* This grouping is used to combine Operations that can be executed as one whole when multi-processing.
* @ingroup Execution
*/
* @brief Class ExecutionGroup is a group of NodeOperations that are executed as one.
* This grouping is used to combine Operations that can be executed as one whole when multi-processing.
* @ingroup Execution
*/
class ExecutionGroup {
private:
// fields
/**
* @brief list of operations in this ExecutionGroup
*/
vector<NodeOperation*> operations;
* @brief list of operations in this ExecutionGroup
*/
vector<NodeOperation *> operations;
/**
* @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)
*/
* @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)
*/
int isOutput;
/**
* @brief Width of the output
*/
* @brief Width of the output
*/
unsigned int width;
/**
* @brief Height of the output
*/
* @brief Height of the output
*/
unsigned int 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
*/
* @brief size of a single chunk, being Width or of height
* a chunk is always a square, except at the edges of the MemoryBuffer
*/
unsigned int chunkSize;
/**
* @brief number of chunks in the x-axis
*/
* @brief number of chunks in the x-axis
*/
unsigned int numberOfXChunks;
/**
* @brief number of chunks in the y-axis
*/
* @brief number of chunks in the y-axis
*/
unsigned int numberOfYChunks;
/**
* @brief total number of chunks
*/
* @brief total number of chunks
*/
unsigned int numberOfChunks;
/**
* @brief contains this ExecutionGroup a complex NodeOperation.
*/
* @brief contains this ExecutionGroup a complex NodeOperation.
*/
bool complex;
/**
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
*/
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
*/
bool openCL;
/**
@ -122,113 +122,113 @@ private:
bool singleThreaded;
/**
* @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.
*/
* @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.
*/
unsigned int cachedMaxReadBufferOffset;
/**
* @brief a cached vector of all read operations in the execution group.
*/
vector<NodeOperation*> cachedReadOperations;
* @brief a cached vector of all read operations in the execution group.
*/
vector<NodeOperation *> cachedReadOperations;
/**
* @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
*/
const bNodeTree * bTree;
* @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
*/
const bNodeTree *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;
/**
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be
* - COM_ES_NOT_SCHEDULED: not scheduled
* - COM_ES_SCHEDULED: scheduled
* - COM_ES_EXECUTED: executed
*/
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be
* - COM_ES_NOT_SCHEDULED: not scheduled
* - COM_ES_SCHEDULED: scheduled
* - COM_ES_EXECUTED: executed
*/
ChunkExecutionState *chunkExecutionStates;
/**
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
* @note When building the ExecutionGroup NodeOperations are added via recursion. First a WriteBufferOperations is added, then the
* @note Operation containing the settings that is important for the ExecutiongGroup is added,
* @note When this occurs, these settings are copied over from the node to the ExecutionGroup
* @note and the Initialized flag is set to true.
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
* @note When building the ExecutionGroup NodeOperations are added via recursion. First a WriteBufferOperations is added, then the
* @note Operation containing the settings that is important for the ExecutiongGroup is added,
* @note When this occurs, these settings are copied over from the node to the ExecutionGroup
* @note and the Initialized flag is set to true.
* @see complex
* @see openCL
*/
* @see openCL
*/
bool initialized;
// methods
/**
* @brief check whether parameter operation can be added to the execution group
* @param operation the operation to be added
*/
* @brief check whether parameter operation can be added to the execution group
* @param operation the operation to be added
*/
bool canContainOperation(NodeOperation *operation);
/**
* @brief calculate the actual chunk size of this execution group.
* @note A chunk size is an unsigned int that is both the height and width of a chunk.
* @note The chunk size will not be stored in the chunkSize field. This needs to be done
* @note by the calling method.
*/
* @brief calculate the actual chunk size of this execution group.
* @note A chunk size is an unsigned int that is both the height and width of a chunk.
* @note The chunk size will not be stored in the chunkSize field. This needs to be done
* @note by the calling method.
*/
unsigned int determineChunkSize();
/**
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk at a position.
* @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize()
*/
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk at a position.
* @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize()
*/
void determineChunkRect(rcti *rect, const unsigned int xChunk, const unsigned int yChunk) const;
/**
* @brief determine the number of chunks, based on the chunkSize, width and height.
* @note The result are stored in the fields numberOfChunks, numberOfXChunks, numberOfYChunks
*/
* @brief determine the number of chunks, based on the chunkSize, width and height.
* @note The result are stored in the fields numberOfChunks, numberOfXChunks, numberOfYChunks
*/
void determineNumberOfChunks();
/**
* @brief try to schedule a specific chunk.
* @note scheduling succeeds when all input requirements are met and the chunks hasen't been scheduled yet.
* @param graph
* @param xChunk
* @param yChunk
* @return [true:false]
* true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled)
*/
bool scheduleChunkWhenPossible(ExecutionSystem * graph, int xChunk, int yChunk);
* @brief try to schedule a specific chunk.
* @note scheduling succeeds when all input requirements are met and the chunks hasen't been scheduled yet.
* @param graph
* @param xChunk
* @param yChunk
* @return [true:false]
* true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled)
*/
bool scheduleChunkWhenPossible(ExecutionSystem *graph, int xChunk, int yChunk);
/**
* @brief try to schedule a specific area.
* @note Check if a certain area is available, when not available this are will be checked.
* @note This method is called from other ExecutionGroup's.
* @param graph
* @param rect
* @return [true:false]
* true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled)
*/
bool scheduleAreaWhenPossible(ExecutionSystem * graph, rcti * rect);
* @brief try to schedule a specific area.
* @note Check if a certain area is available, when not available this are will be checked.
* @note This method is called from other ExecutionGroup's.
* @param graph
* @param rect
* @return [true:false]
* true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled)
*/
bool scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *rect);
/**
* @brief add a chunk to the WorkScheduler.
* @param chunknumber
*/
* @brief add a chunk to the WorkScheduler.
* @param chunknumber
*/
bool scheduleChunk(unsigned int chunkNumber);
/**
* @brief determine the area of interest of a certain input area
* @note This method only evaluates a single ReadBufferOperation
* @param input the input area
* @param readOperation The ReadBufferOperation where the area needs to be evaluated
* @param output the area needed of the ReadBufferOperation. Result
*/
void determineDependingAreaOfInterest(rcti * input, ReadBufferOperation *readOperation, rcti *output);
* @brief determine the area of interest of a certain input area
* @note This method only evaluates a single ReadBufferOperation
* @param input the input area
* @param readOperation The ReadBufferOperation where the area needs to be evaluated
* @param output the area needed of the ReadBufferOperation. Result
*/
void determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
public:
@ -237,162 +237,162 @@ public:
// methods
/**
* @brief check to see if a NodeOperation is already inside this execution group
* @param operation the NodeOperation to check
* @return [true,false]
*/
* @brief check to see if a NodeOperation is already inside this execution group
* @param operation the NodeOperation to check
* @return [true,false]
*/
bool containsOperation(NodeOperation *operation);
/**
* @brief add an operation to this ExecutionGroup
* @note this method will add input of the operations recursivly
* @note this method can create multiple ExecutionGroup's
* @param system
* @param operation
*/
* @brief add an operation to this ExecutionGroup
* @note this method will add input of the operations recursivly
* @note this method can create multiple ExecutionGroup's
* @param system
* @param operation
*/
void addOperation(ExecutionSystem *system, NodeOperation *operation);
/**
* @brief is this ExecutionGroup an output ExecutionGroup
* @note An OutputExecution group are groups containing a
* @note ViewerOperation, CompositeOperation, PreviewOperation.
* @see NodeOperation.isOutputOperation
*/
const int isOutputExecutionGroup() const {return this->isOutput;}
* @brief is this ExecutionGroup an output ExecutionGroup
* @note An OutputExecution group are groups containing a
* @note ViewerOperation, CompositeOperation, PreviewOperation.
* @see NodeOperation.isOutputOperation
*/
const int isOutputExecutionGroup() const { return this->isOutput; }
/**
* @brief set whether this ExecutionGroup is an output
* @param isOutput
*/
void setOutputExecutionGroup(int isOutput) {this->isOutput = isOutput;}
* @brief set whether this ExecutionGroup is an output
* @param isOutput
*/
void setOutputExecutionGroup(int isOutput) { this->isOutput = isOutput; }
/**
* @brief determine the resolution of this ExecutionGroup
* @param resolution
*/
* @brief determine the resolution of this ExecutionGroup
* @param resolution
*/
void determineResolution(unsigned int resolution[]);
/**
* @brief set the resolution of this executiongroup
* @param resolution
*/
void setResolution(unsigned int resolution[]) {this->width = resolution[0];this->height = resolution[1];}
* @brief set the resolution of this executiongroup
* @param resolution
*/
void setResolution(unsigned int resolution[]) { this->width = resolution[0]; this->height = resolution[1]; }
/**
* @brief get the width of this execution group
*/
const unsigned int getWidth() {return this->width;}
* @brief get the width of this execution group
*/
const unsigned int getWidth() { return this->width; }
/**
* @brief get the height of this execution group
*/
const unsigned int getHeight() {return this->height;}
* @brief get the height of this execution group
*/
const unsigned int getHeight() { return this->height; }
/**
* @brief does this ExecutionGroup contains a complex NodeOperation
*/
* @brief does this ExecutionGroup contains a complex NodeOperation
*/
const bool isComplex() const;
/**
* @brief get the output operation of this ExecutionGroup
* @return NodeOperation *output operation
*/
NodeOperation *getOutputNodeOperation() const;
* @brief get the output operation of this ExecutionGroup
* @return NodeOperation *output operation
*/
NodeOperation *getOutputNodeOperation() const;
/**
* @brief compose multiple chunks into a single chunk
* @return Memorybuffer *consolidated chunk
*/
* @brief compose multiple chunks into a single chunk
* @return Memorybuffer *consolidated chunk
*/
MemoryBuffer *constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *output);
/**
* @brief initExecution is called just before the execution of the whole graph will be done.
* @note The implementation will calculate the chunkSize of this execution group.
*/
* @brief initExecution is called just before the execution of the whole graph will be done.
* @note The implementation will calculate the chunkSize of this execution group.
*/
void initExecution();
/**
* @brief get all inputbuffers needed to calculate an chunk
* @note all inputbuffers must be executed
* @param chunkNumber the chunk to be calculated
* @return MemoryBuffer** the inputbuffers
*/
MemoryBuffer** getInputBuffersCPU();
* @brief get all inputbuffers needed to calculate an chunk
* @note all inputbuffers must be executed
* @param chunkNumber the chunk to be calculated
* @return MemoryBuffer** the inputbuffers
*/
MemoryBuffer **getInputBuffersCPU();
/**
* @brief get all inputbuffers needed to calculate an chunk
* @note all inputbuffers must be executed
* @param chunkNumber the chunk to be calculated
* @return MemoryBuffer** the inputbuffers
*/
MemoryBuffer** getInputBuffersOpenCL(int chunkNumber);
* @brief get all inputbuffers needed to calculate an chunk
* @note all inputbuffers must be executed
* @param chunkNumber the chunk to be calculated
* @return MemoryBuffer** the inputbuffers
*/
MemoryBuffer **getInputBuffersOpenCL(int chunkNumber);
/**
* @brief allocate the outputbuffer of a chunk
* @param chunkNumber the number of the chunk in the ExecutionGroup
* @param rect the rect of that chunk
* @see determineChunkRect
*/
* @brief allocate the outputbuffer of a chunk
* @param chunkNumber the number of the chunk in the ExecutionGroup
* @param rect the rect of that chunk
* @see determineChunkRect
*/
MemoryBuffer *allocateOutputBuffer(int chunkNumber, rcti *rect);
/**
* @brief after a chunk is executed the needed resources can be freed or unlocked.
* @param chunknumber
* @param memorybuffers
*/
void finalizeChunkExecution(int chunkNumber, MemoryBuffer** memoryBuffers);
* @brief after a chunk is executed the needed resources can be freed or unlocked.
* @param chunknumber
* @param memorybuffers
*/
void finalizeChunkExecution(int chunkNumber, MemoryBuffer **memoryBuffers);
/**
* @brief deinitExecution is called just after execution the whole graph.
* @note It will release all needed resources
*/
* @brief deinitExecution is called just after execution the whole graph.
* @note It will release all needed resources
*/
void deinitExecution();
/**
* @brief schedule an ExecutionGroup
* @note this method will return when all chunks have been calculated, or the execution has breaked (by user)
*
* first the order of the chunks will be determined. This is determined by finding the ViewerOperation and get the relevant information from it.
* - ChunkOrdering
* - CenterX
* - CenterY
*
* After determining the order of the chunks the chunks will be scheduled
*
* @see ViewerOperation
* @param system
*/
* @brief schedule an ExecutionGroup
* @note this method will return when all chunks have been calculated, or the execution has breaked (by user)
*
* first the order of the chunks will be determined. This is determined by finding the ViewerOperation and get the relevant information from it.
* - ChunkOrdering
* - CenterX
* - CenterY
*
* After determining the order of the chunks the chunks will be scheduled
*
* @see ViewerOperation
* @param system
*/
void execute(ExecutionSystem *system);
/**
* @brief this method determines the MemoryProxy's where this execution group depends on.
* @note After this method determineDependingAreaOfInterest can be called to determine
* @note the area of the MemoryProxy.creator thas has to be executed.
* @param memoryProxies result
*/
void determineDependingMemoryProxies(vector<MemoryProxy*> *memoryProxies);
* @brief this method determines the MemoryProxy's where this execution group depends on.
* @note After this method determineDependingAreaOfInterest can be called to determine
* @note the area of the MemoryProxy.creator thas has to be executed.
* @param memoryProxies result
*/
void determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies);
/**
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk.
* @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize()
*/
* @brief Determine the rect (minx, maxx, miny, maxy) of a chunk.
* @note Only gives usefull results ater the determination of the chunksize
* @see determineChunkSize()
*/
void determineChunkRect(rcti *rect, const unsigned int chunkNumber) const;
/**
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
* @see WorkScheduler.schedule
*/
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
* @see WorkScheduler.schedule
*/
bool isOpenCL();
void setChunksize(int chunksize) {this->chunkSize = chunksize;}
void setChunksize(int chunksize) { this->chunkSize = chunksize; }
/**
* @brief get the Render priority of this ExecutionGroup
* @see ExecutionSystem.execute
*/
* @brief get the Render priority of this ExecutionGroup
* @see ExecutionSystem.execute
*/
CompositorPriority getRenderPriotrity();
};

View File

@ -36,69 +36,69 @@ class ExecutionGroup;
using namespace std;
/**
* @page execution Execution model
* In order to get to an efficient model for execution, serveral steps are being done. these steps are explained below.
*
* @section EM_Step1 Step 1: translating blender node system to the new compsitor system
* Blenders node structure is based on C structs (DNA). These structs are not efficient in the new architecture. We want to use classes in order to simplify the system.
* during this step the blender node_tree is evaluated and converted to a CPP node system.
*
* @see ExecutionSystem
* @see Converter.convert
* @see Node
*
* @section EM_Step2 Step2: translating nodes to operations
* Ungrouping the GroupNodes. Group nodes are node_tree's in node_tree's. The new system only supports a single level of node_tree. We will 'flatten' the system in a single level.
* @see GroupNode
* @see ExecutionSystemHelper.ungroup
*
* Every node has the ability to convert itself to operations. The node itself is responsible to create a correct NodeOperation setup based on its internal settings.
* Most Node only need to convert it to its NodeOperation. Like a ColorToBWNode doesn't check anything, but replaces itself with a ConvertColorToBWOperation.
* More complex nodes can use different NodeOperation based on settings; like MixNode. based on the selected Mixtype a different operation will be used.
* for more information see the page about creating new Nodes. [@subpage newnode]
*
* @see ExecutionSystem.convertToOperations
* @see Node.convertToOperations
* @see NodeOperation base class for all operations in the system
*
* @section EM_Step3 Step3: add additional conversions to the operation system
* - Data type conversions: the system has 3 data types COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR. The user can connect a Value socket to a color socket. As values are ordered differently than colors a conversion happens.
*
* - Image size conversions: the system can automatically convert when resolutions do not match. An InputSocket has a resize mode. This can be any of the folowing settings.
* - [@ref InputSocketResizeMode.COM_SC_CENTER]: The center of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]: The width of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]: the height of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT]: The width, or the height of both images are aligned to make sure that it fits.
* - [@ref InputSocketResizeMode.COM_SC_STRETCH]: The width and the height of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]: bottom left of the images are aligned.
*
* @see Converter.convertDataType Datatype conversions
* @see Converter.convertResolution Image size conversions
*
* @section EM_Step4 Step4: group operations in executions groups
* ExecutionGroup are groups of operations that are calculated as being one bigger operation. All operations will be part of an ExecutionGroup.
* Complex nodes will be added to separate groups. Between ExecutionGroup's the data will be stored in MemoryBuffers. ReadBufferOperations and WriteBufferOperations are added where needed.
*
* <pre>
*
* +------------------------------+ +----------------+
* | ExecutionGroup A | |ExecutionGroup B| ExecutionGroup
* | +----------+ +----------+| |+----------+ |
* /----->| Operation|---->| Operation|-\ /--->| Operation|-\ | NodeOperation
* | | | A | | B ||| | || C | | |
* | | | cFFA | /->| cFFA ||| | || cFFA | | |
* | | +----------+ | +----------+|| | |+----------+ | |
* | +---------------|--------------+v | +-------------v--+
* +-*----+ +---*--+ +--*-*--+ +--*----+
* |inputA| |inputB| |outputA| |outputB| MemoryBuffer
* |cFAA | |cFAA | |cFAA | |cFAA |
* +------+ +------+ +-------+ +-------+
* </pre>
* @see ExecutionSystem.groupOperations method doing this step
* @see ExecutionSystem.addReadWriteBufferOperations
* @see NodeOperation.isComplex
* @see ExecutionGroup class representing the ExecutionGroup
*/
* @page execution Execution model
* In order to get to an efficient model for execution, serveral steps are being done. these steps are explained below.
*
* @section EM_Step1 Step 1: translating blender node system to the new compsitor system
* Blenders node structure is based on C structs (DNA). These structs are not efficient in the new architecture. We want to use classes in order to simplify the system.
* during this step the blender node_tree is evaluated and converted to a CPP node system.
*
* @see ExecutionSystem
* @see Converter.convert
* @see Node
*
* @section EM_Step2 Step2: translating nodes to operations
* Ungrouping the GroupNodes. Group nodes are node_tree's in node_tree's. The new system only supports a single level of node_tree. We will 'flatten' the system in a single level.
* @see GroupNode
* @see ExecutionSystemHelper.ungroup
*
* Every node has the ability to convert itself to operations. The node itself is responsible to create a correct NodeOperation setup based on its internal settings.
* Most Node only need to convert it to its NodeOperation. Like a ColorToBWNode doesn't check anything, but replaces itself with a ConvertColorToBWOperation.
* More complex nodes can use different NodeOperation based on settings; like MixNode. based on the selected Mixtype a different operation will be used.
* for more information see the page about creating new Nodes. [@subpage newnode]
*
* @see ExecutionSystem.convertToOperations
* @see Node.convertToOperations
* @see NodeOperation base class for all operations in the system
*
* @section EM_Step3 Step3: add additional conversions to the operation system
* - Data type conversions: the system has 3 data types COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR. The user can connect a Value socket to a color socket. As values are ordered differently than colors a conversion happens.
*
* - Image size conversions: the system can automatically convert when resolutions do not match. An InputSocket has a resize mode. This can be any of the folowing settings.
* - [@ref InputSocketResizeMode.COM_SC_CENTER]: The center of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]: The width of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]: the height of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_FIT]: The width, or the height of both images are aligned to make sure that it fits.
* - [@ref InputSocketResizeMode.COM_SC_STRETCH]: The width and the height of both images are aligned
* - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]: bottom left of the images are aligned.
*
* @see Converter.convertDataType Datatype conversions
* @see Converter.convertResolution Image size conversions
*
* @section EM_Step4 Step4: group operations in executions groups
* ExecutionGroup are groups of operations that are calculated as being one bigger operation. All operations will be part of an ExecutionGroup.
* Complex nodes will be added to separate groups. Between ExecutionGroup's the data will be stored in MemoryBuffers. ReadBufferOperations and WriteBufferOperations are added where needed.
*
* <pre>
*
* +------------------------------+ +----------------+
* | ExecutionGroup A | |ExecutionGroup B| ExecutionGroup
* | +----------+ +----------+| |+----------+ |
* /----->| Operation|---->| Operation|-\ /--->| Operation|-\ | NodeOperation
* | | | A | | B ||| | || C | | |
* | | | cFFA | /->| cFFA ||| | || cFFA | | |
* | | +----------+ | +----------+|| | |+----------+ | |
* | +---------------|--------------+v | +-------------v--+
* +-*----+ +---*--+ +--*-*--+ +--*----+
* |inputA| |inputB| |outputA| |outputB| MemoryBuffer
* |cFAA | |cFAA | |cFAA | |cFAA |
* +------+ +------+ +-------+ +-------+
* </pre>
* @see ExecutionSystem.groupOperations method doing this step
* @see ExecutionSystem.addReadWriteBufferOperations
* @see NodeOperation.isComplex
* @see ExecutionGroup class representing the ExecutionGroup
*/
/**
* @brief the ExecutionSystem contains the whole compositor tree.
@ -106,129 +106,129 @@ using namespace std;
class ExecutionSystem {
private:
/**
* @brief the context used during execution
*/
* @brief the context used during execution
*/
CompositorContext context;
/**
* @brief vector of nodes
*/
vector<Node*> nodes;
* @brief vector of nodes
*/
vector<Node *> nodes;
/**
* @brief vector of operations
*/
vector<NodeOperation*> operations;
* @brief vector of operations
*/
vector<NodeOperation *> operations;
/**
* @brief vector of groups
*/
vector<ExecutionGroup*> groups
* @brief vector of groups
*/
vector<ExecutionGroup *> groups
/**
* @brief vector of connections
*/;
vector<SocketConnection*> connections;
* @brief vector of connections
*/;
vector<SocketConnection *> connections;
private: //methods
/**
* @brief add ReadBufferOperation and WriteBufferOperation around an operation
* @param operation the operation to add the bufferoperations around.
*/
* @brief add ReadBufferOperation and WriteBufferOperation around an operation
* @param operation the operation to add the bufferoperations around.
*/
void addReadWriteBufferOperations(NodeOperation *operation);
/**
* find all execution group with output nodes
*/
void findOutputExecutionGroup(vector<ExecutionGroup*> *result, CompositorPriority priority) const;
* find all execution group with output nodes
*/
void findOutputExecutionGroup(vector<ExecutionGroup *> *result, CompositorPriority priority) const;
/**
* find all execution group with output nodes
*/
void findOutputExecutionGroup(vector<ExecutionGroup*> *result) const;
* find all execution group with output nodes
*/
void findOutputExecutionGroup(vector<ExecutionGroup *> *result) const;
public:
/**
* @brief Create a new ExecutionSystem and initialize it with the
* editingtree.
*
* @param editingtree [bNodeTree*]
* @param rendering [true false]
*/
* @brief Create a new ExecutionSystem and initialize it with the
* editingtree.
*
* @param editingtree [bNodeTree*]
* @param rendering [true false]
*/
ExecutionSystem(bNodeTree *editingtree, bool rendering);
/**
* Destructor
*/
* Destructor
*/
~ExecutionSystem();
/**
* @brief execute this system
* - initialize the NodeOperation's and ExecutionGroup's
* - schedule the output ExecutionGroup's based on their priority
* - deinitialize the ExecutionGroup's and NodeOperation's
*/
* @brief execute this system
* - initialize the NodeOperation's and ExecutionGroup's
* - schedule the output ExecutionGroup's based on their priority
* - deinitialize the ExecutionGroup's and NodeOperation's
*/
void execute();
/**
* @brief Add an operation to the operation list
*
* @param operation the operation to add
*/
* @brief Add an operation to the operation list
*
* @param operation the operation to add
*/
void addOperation(NodeOperation *operation);
/**
* Add an editor link to the system. convert it to an socketconnection (CPP-representative)
* this converted socket is returned.
*/
* Add an editor link to the system. convert it to an socketconnection (CPP-representative)
* this converted socket is returned.
*/
SocketConnection *addNodeLink(bNodeLink *bNodeLink);
void addSocketConnection(SocketConnection *connection);
/**
* @brief Convert all nodes to operations
*/
* @brief Convert all nodes to operations
*/
void convertToOperations();
/**
* @brief group operations in ExecutionGroup's
* @see ExecutionGroup
*/
* @brief group operations in ExecutionGroup's
* @see ExecutionGroup
*/
void groupOperations();
/**
* @brief get the reference to the compositor context
*/
CompositorContext& getContext() {return this->context;}
* @brief get the reference to the compositor context
*/
CompositorContext& getContext() { return this->context; }
/**
* @brief get the reference to the compositor nodes
*/
vector<Node*>& getNodes() {return this->nodes;}
* @brief get the reference to the compositor nodes
*/
vector<Node *>& getNodes() { return this->nodes; }
/**
* @brief get the reference to the compositor connections
*/
vector<SocketConnection*>& getConnections() {return this->connections;}
* @brief get the reference to the compositor connections
*/
vector<SocketConnection *>& getConnections() { return this->connections; }
/**
* @brief get the reference to the list of execution groups
*/
vector<ExecutionGroup*>& getExecutionGroups() {return this->groups;}
* @brief get the reference to the list of execution groups
*/
vector<ExecutionGroup *>& getExecutionGroups() { return this->groups; }
/**
* @brief get the reference to the list of operations
*/
vector<NodeOperation*>& getOperations() {return this->operations;}
* @brief get the reference to the list of operations
*/
vector<NodeOperation *>& getOperations() { return this->operations; }
private:
/**
* @brief determine the actual data types of all sockets
* @param nodes list of nodes or operations to do the data type determination
*/
void determineActualSocketDataTypes(vector<NodeBase*> &nodes);
* @brief determine the actual data types of all sockets
* @param nodes list of nodes or operations to do the data type determination
*/
void determineActualSocketDataTypes(vector<NodeBase *> &nodes);
void executeGroups(CompositorPriority priority);

View File

@ -42,86 +42,86 @@ class ExecutionSystemHelper {
public:
/**
* @brief add an bNodeTree to the nodes list and connections
* @param system Execution system
* @param nodes_start Starting index in the system's nodes list for nodes in this tree.
* @param tree bNodeTree to add
* @return Node representing the "Compositor node" of the maintree. or NULL when a subtree is added
*/
static Node *addbNodeTree(ExecutionSystem &system, int nodes_start, bNodeTree* tree, bNode *groupnode);
* @brief add an bNodeTree to the nodes list and connections
* @param system Execution system
* @param nodes_start Starting index in the system's nodes list for nodes in this tree.
* @param tree bNodeTree to add
* @return Node representing the "Compositor node" of the maintree. or NULL when a subtree is added
*/
static Node *addbNodeTree(ExecutionSystem &system, int nodes_start, bNodeTree *tree, bNode *groupnode);
/**
* @brief add an editor node to the system.
* this node is converted to a Node instance.
* and the converted node is returned
*
* @param bNode node to add
* @return Node that represents the bNode or null when not able to convert.
*/
static Node *addNode(vector<Node*>& nodes, bNode *bNode, bool isInActiveGroup);
* @brief add an editor node to the system.
* this node is converted to a Node instance.
* and the converted node is returned
*
* @param bNode node to add
* @return Node that represents the bNode or null when not able to convert.
*/
static Node *addNode(vector<Node *>& nodes, bNode *bNode, bool isInActiveGroup);
/**
* @brief Add a Node to a list
*
* @param nodes the list where the node needs to be added to
* @param node the node to be added
*/
static void addNode(vector<Node*>& nodes, Node *node);
* @brief Add a Node to a list
*
* @param nodes the list where the node needs to be added to
* @param node the node to be added
*/
static void addNode(vector<Node *>& nodes, Node *node);
/**
* @brief Add an operation to the operation list
*
* The id of the operation is updated.
*
* @param operations the list where the operation need to be added to
* @param operation the operation to add
*/
static void addOperation(vector<NodeOperation*> &operations, NodeOperation *operation);
* @brief Add an operation to the operation list
*
* The id of the operation is updated.
*
* @param operations the list where the operation need to be added to
* @param operation the operation to add
*/
static void addOperation(vector<NodeOperation *> &operations, NodeOperation *operation);
/**
* @brief Add an ExecutionGroup to a list
*
* The id of the ExecutionGroup is updated.
*
* @param executionGroups the list where the executionGroup need to be added to
* @param executionGroup the ExecutionGroup to add
*/
static void addExecutionGroup(vector<ExecutionGroup*>& executionGroups, ExecutionGroup *executionGroup);
* @brief Add an ExecutionGroup to a list
*
* The id of the ExecutionGroup is updated.
*
* @param executionGroups the list where the executionGroup need to be added to
* @param executionGroup the ExecutionGroup to add
*/
static void addExecutionGroup(vector<ExecutionGroup *>& executionGroups, ExecutionGroup *executionGroup);
/**
* Find all Node Operations that needs to be executed.
* @param rendering
* the rendering parameter will tell what type of execution we are doing
* FALSE is editing, TRUE is rendering
*/
static void findOutputNodeOperations(vector<NodeOperation*>* result, vector<NodeOperation*>& operations , bool rendering);
* Find all Node Operations that needs to be executed.
* @param rendering
* the rendering parameter will tell what type of execution we are doing
* FALSE is editing, TRUE is rendering
*/
static void findOutputNodeOperations(vector<NodeOperation *> *result, vector<NodeOperation *>& operations, bool rendering);
/**
* @brief add a bNodeLink to the list of links
* the bNodeLink will be wrapped in a SocketConnection
*
* @note Cyclic links will be ignored
*
* @param node_range list of possible nodes for lookup.
* @param links list of links to add the bNodeLink to
* @param bNodeLink the link to be added
* @return the created SocketConnection or NULL
*/
static SocketConnection *addNodeLink(NodeRange &node_range, vector<SocketConnection*>& links, bNodeLink *bNodeLink);
* @brief add a bNodeLink to the list of links
* the bNodeLink will be wrapped in a SocketConnection
*
* @note Cyclic links will be ignored
*
* @param node_range list of possible nodes for lookup.
* @param links list of links to add the bNodeLink to
* @param bNodeLink the link to be added
* @return the created SocketConnection or NULL
*/
static SocketConnection *addNodeLink(NodeRange &node_range, vector<SocketConnection *>& links, bNodeLink *bNodeLink);
/**
* @brief create a new SocketConnection and add to a vector of links
* @param links the vector of links
* @param fromSocket the startpoint of the connection
* @param toSocket the endpoint of the connection
* @return the new created SocketConnection
*/
static SocketConnection *addLink(vector<SocketConnection*>& links, OutputSocket *fromSocket, InputSocket *toSocket);
* @brief create a new SocketConnection and add to a vector of links
* @param links the vector of links
* @param fromSocket the startpoint of the connection
* @param toSocket the endpoint of the connection
* @return the new created SocketConnection
*/
static SocketConnection *addLink(vector<SocketConnection *>& links, OutputSocket *fromSocket, InputSocket *toSocket);
/**
* @brief dumps the content of the execution system to standard out
* @param system the execution system to dump
*/
* @brief dumps the content of the execution system to standard out
* @param system the execution system to dump
*/
static void debugDump(ExecutionSystem *system);
};
#endif

View File

@ -36,10 +36,10 @@ class ChannelInfo;
class NodeOperation;
/**
* @brief Resize modes of inputsockets
* How are the input and working resolutions matched
* @ingroup Model
*/
* @brief Resize modes of inputsockets
* How are the input and working resolutions matched
* @ingroup Model
*/
typedef enum InputSocketResizeMode {
/** @brief Center the input image to the center of the working area of the node, no resizing occurs */
COM_SC_CENTER = NS_CR_CENTER,
@ -56,34 +56,34 @@ typedef enum InputSocketResizeMode {
} InputSocketResizeMode;
/**
* @brief InputSocket are sockets that can receive data/input
* @ingroup Model
*/
* @brief InputSocket are sockets that can receive data/input
* @ingroup Model
*/
class InputSocket : public Socket {
private:
/**
* @brief connection connected to this InputSocket.
* An input socket can only have a single connection
*/
* @brief connection connected to this InputSocket.
* An input socket can only have a single connection
*/
SocketConnection *connection;
/**
* @brief resize mode of this socket
*/
* @brief resize mode of this socket
*/
InputSocketResizeMode resizeMode;
/**
* @brief convert a data type to a by the socket supported data type.
*
* @param datatype the datatype that needs to be checked
* @section data-conversion
*/
* @brief convert a data type to a by the socket supported data type.
*
* @param datatype the datatype that needs to be checked
* @section data-conversion
*/
DataType convertToSupportedDataType(DataType datatype);
/**
* @brief called when the ActualDataType is set. notifies other parties
*/
* @brief called when the ActualDataType is set. notifies other parties
*/
void fireActualDataTypeSet();
public:
@ -98,55 +98,59 @@ public:
int isInputSocket() const;
/**
* @brief determine the resolution of this data going through this socket
* @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined
*/
void determineResolution(unsigned int resolution[],unsigned int preferredResolution[]);
* @brief determine the resolution of this data going through this socket
* @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined
*/
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
void determineActualDataType();
/**
* @brief Notifies the Input of the data type (via a SocketConnection)
* @param datatype the datatype to evaluate
*/
* @brief Notifies the Input of the data type (via a SocketConnection)
* @param datatype the datatype to evaluate
*/
void notifyActualInputType(DataType datatype);
/**
* @brief move all connections of this input socket to another socket
* only use this method when already checked the availability of a SocketConnection
* @param relinkToSocket the socket to move to connections to
*/
* @brief move all connections of this input socket to another socket
* only use this method when already checked the availability of a SocketConnection
* @param relinkToSocket the socket to move to connections to
*/
void relinkConnections(InputSocket *relinkToSocket);
/**
* @brief move all connections of this input socket to another socket
* @param relinkToSocket the socket to move to connections to
* @param autoconnect will a set operation be added when no connections exist
* @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection)
* @param system ExecutionSystem to update to
*/
* @brief move all connections of this input socket to another socket
* @param relinkToSocket the socket to move to connections to
* @param autoconnect will a set operation be added when no connections exist
* @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection)
* @param system ExecutionSystem to update to
*/
void relinkConnections(InputSocket *relinkToSocket, int editorNodeInputSocketIndex, ExecutionSystem *system);
/**
* @brief move all connections of this input socket to another socket
* @param relinkToSocket the socket to move to connections to
* @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection)
* @param system ExecutionSystem to update to
*/
* @brief move all connections of this input socket to another socket
* @param relinkToSocket the socket to move to connections to
* @param editorNodeInputSocketIndex index of the socket number of the bNode (used to retrieve the value for autoconnection)
* @param system ExecutionSystem to update to
*/
void relinkConnectionsDuplicate(InputSocket *relinkToSocket, int editorNodeInputSocketIndex, ExecutionSystem *system);
/**
* @brief set the resize mode
* @param resizeMode the new resize mode.
*/
void setResizeMode(InputSocketResizeMode resizeMode) {this->resizeMode = resizeMode;}
* @brief set the resize mode
* @param resizeMode the new resize mode.
*/
void setResizeMode(InputSocketResizeMode resizeMode) {
this->resizeMode = resizeMode;
}
/**
* @brief get the resize mode of this socket
* @return InputSocketResizeMode
*/
InputSocketResizeMode getResizeMode() const {return this->resizeMode;}
* @brief get the resize mode of this socket
* @return InputSocketResizeMode
*/
InputSocketResizeMode getResizeMode() const {
return this->resizeMode;
}
const ChannelInfo *getChannelInfo(const int channelnumber);

View File

@ -34,9 +34,9 @@ extern "C" {
#include <vector>
/**
* @brief state of a memory buffer
* @ingroup Memory
*/
* @brief state of a memory buffer
* @ingroup Memory
*/
typedef enum MemoryBufferState {
/** @brief memory has been allocated on creator device and CPU machine, but kernel has not been executed */
COM_MB_ALLOCATED = 1,
@ -49,77 +49,77 @@ typedef enum MemoryBufferState {
class MemoryProxy;
/**
* @brief a MemoryBuffer contains access to the data of a chunk
*/
* @brief a MemoryBuffer contains access to the data of a chunk
*/
class MemoryBuffer {
private:
/**
* @brief proxy of the memory (same for all chunks in the same buffer)
*/
MemoryProxy * memoryProxy;
* @brief proxy of the memory (same for all chunks in the same buffer)
*/
MemoryProxy *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;
/**
* @brief region of this buffer inside reative to the MemoryProxy
*/
* @brief region of this buffer inside reative to the MemoryProxy
*/
rcti rect;
/**
* brief refers to the chunknumber within the executiongroup where related to the MemoryProxy
* @see memoryProxy
*/
* brief refers to the chunknumber within the executiongroup where related to the MemoryProxy
* @see memoryProxy
*/
unsigned int chunkNumber;
/**
* @brief width of the chunk
*/
* @brief width of the chunk
*/
unsigned int chunkWidth;
/**
* @brief state of the buffer
*/
* @brief state of the buffer
*/
MemoryBufferState state;
/**
* @brief the actual float buffer/data
*/
* @brief the actual float buffer/data
*/
float *buffer;
public:
/**
* @brief construct new MemoryBuffer for a chunk
*/
* @brief construct new MemoryBuffer for a chunk
*/
MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti *rect);
/**
* @brief construct new temporarily MemoryBuffer for an area
*/
* @brief construct new temporarily MemoryBuffer for an area
*/
MemoryBuffer(MemoryProxy *memoryProxy, rcti *rect);
/**
* @brief destructor
*/
* @brief destructor
*/
~MemoryBuffer();
/**
* @brief read the ChunkNumber of this MemoryBuffer
*/
unsigned int getChunkNumber() {return this->chunkNumber;}
* @brief read the ChunkNumber of this MemoryBuffer
*/
unsigned int getChunkNumber() { return this->chunkNumber; }
/**
* @brief get the data of this MemoryBuffer
* @note buffer should already be available in memory
*/
float *getBuffer() {return this->buffer;}
* @brief get the data of this MemoryBuffer
* @note buffer should already be available in memory
*/
float *getBuffer() { return this->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() {
this->state = COM_MB_AVAILABLE;
}
@ -130,34 +130,34 @@ public:
void readEWA(float result[4], float fx, float fy, float dx, float dy);
/**
* @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;}
* @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; }
/**
* @brief add the content from otherBuffer to this MemoryBuffer
* @param otherBuffer source buffer
*/
* @brief add the content from otherBuffer to this MemoryBuffer
* @param otherBuffer source buffer
*/
void copyContentFrom(MemoryBuffer *otherBuffer);
/**
* @brief get the rect of this MemoryBuffer
*/
rcti *getRect() {return &this->rect;}
* @brief get the rect of this MemoryBuffer
*/
rcti *getRect() { return &this->rect; }
/**
* @brief get the width of this MemoryBuffer
*/
* @brief get the width of this MemoryBuffer
*/
int getWidth() const;
/**
* @brief get the height of this MemoryBuffer
*/
* @brief get the height of this MemoryBuffer
*/
int getHeight() const;
/**
* @brief clear the buffer. Make all pixels black transparant.
*/
* @brief clear the buffer. Make all pixels black transparant.
*/
void clear();
MemoryBuffer *duplicate();

View File

@ -30,78 +30,78 @@ class MemoryProxy;
class ExecutionGroup;
/**
* @brief A MemoryProxy is a unique identifier for a memory buffer.
* A single MemoryProxy is used among all chunks of the same buffer,
* the MemoryBuffer only stores the data of a single chunk.
* @ingroup Memory
*/
* @brief A MemoryProxy is a unique identifier for a memory buffer.
* A single MemoryProxy is used among all chunks of the same buffer,
* the MemoryBuffer only stores the data of a single chunk.
* @ingroup Memory
*/
class MemoryProxy {
private:
/**
* @brief reference to the ouput operation of the executiongroup
*/
* @brief reference to the ouput operation of the executiongroup
*/
WriteBufferOperation *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;
/**
* @brief datatype of this MemoryProxy
*/
* @brief datatype of this MemoryProxy
*/
DataType datatype;
/**
* @brief channel information of this buffer
*/
* @brief channel information of this buffer
*/
ChannelInfo channelInfo[COM_NUMBER_OF_CHANNELS];
/**
* @brief the allocated memory
*/
MemoryBuffer* buffer;
* @brief the allocated memory
*/
MemoryBuffer *buffer;
public:
MemoryProxy();
/**
* @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk.
* @param group the ExecutionGroup to set
*/
void setExecutor(ExecutionGroup *executor) {this->executor = executor;}
/**
* @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
*/
ExecutionGroup *getExecutor() {return this->executor;}
/**
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @param operation
*/
void setWriteBufferOperation(WriteBufferOperation *operation) {this->writeBufferOperation = operation;}
/**
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @return WriteBufferOperation
*/
WriteBufferOperation *getWriteBufferOperation() {return this->writeBufferOperation;}
* @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk.
* @param group the ExecutionGroup to set
*/
void setExecutor(ExecutionGroup *executor) { this->executor = executor; }
/**
* @brief allocate memory of size widht x height
*/
* @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
*/
ExecutionGroup *getExecutor() { return this->executor; }
/**
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @param operation
*/
void setWriteBufferOperation(WriteBufferOperation *operation) { this->writeBufferOperation = operation; }
/**
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @return WriteBufferOperation
*/
WriteBufferOperation *getWriteBufferOperation() { return this->writeBufferOperation; }
/**
* @brief allocate memory of size widht x height
*/
void allocate(unsigned int width, unsigned int height);
/**
* @brief free the allocated memory
*/
* @brief free the allocated memory
*/
void free();
/**
* @brief get the allocated memory
*/
inline MemoryBuffer* getBuffer() {return this->buffer;}
* @brief get the allocated memory
*/
inline MemoryBuffer *getBuffer() { return this->buffer; }
};
#endif

View File

@ -38,18 +38,18 @@ class Node;
class NodeOperation;
class ExecutionSystem;
typedef vector<Node*> NodeList;
typedef vector<Node *> NodeList;
typedef NodeList::iterator NodeIterator;
typedef pair<NodeIterator, NodeIterator> NodeRange;
/**
* My node documentation.
*/
class Node:public NodeBase {
* My node documentation.
*/
class Node : public NodeBase {
private:
/**
* @brief stores the reference to the SDNA bNode struct
*/
* @brief stores the reference to the SDNA bNode struct
*/
bNode *editorNode;
/**
@ -58,18 +58,18 @@ private:
bool inActiveGroup;
public:
Node(bNode *editorNode, bool create_sockets=true);
Node(bNode *editorNode, bool create_sockets = true);
/**
* @brief get the reference to the SDNA bNode struct
*/
* @brief get the reference to the SDNA bNode struct
*/
bNode *getbNode();
/**
* @brief Is this node in the active group (the group that is being edited)
* @param isInActiveGroup
*/
void setIsInActiveGroup(bool isInActiveGroup) {this->inActiveGroup = isInActiveGroup; }
void setIsInActiveGroup(bool isInActiveGroup) { this->inActiveGroup = isInActiveGroup; }
/**
* @brief Is this node part of the active group
@ -77,63 +77,63 @@ public:
* the active group will be the main tree (all nodes that are not part of a group will be active)
* @return bool [false:true]
*/
inline bool isInActiveGroup() {return this->inActiveGroup;}
inline bool isInActiveGroup() { return this->inActiveGroup; }
/**
* @brief convert node to operation
*
* @todo this must be described furter
*
* @param system the ExecutionSystem where the operations need to be added
* @param context reference to the CompositorContext
*/
virtual void convertToOperations(ExecutionSystem *system, CompositorContext *context) = 0;
/**
* @brief convert node to operation
*
* @todo this must be described furter
*
* @param system the ExecutionSystem where the operations need to be added
* @param context reference to the CompositorContext
*/
virtual void convertToOperations(ExecutionSystem *system, CompositorContext * context) =0;
/**
* this method adds a SetValueOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
* this method adds a SetValueOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
void addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex);
/**
* this method adds a SetColorOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
* this method adds a SetColorOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
void addSetColorOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex);
/**
* this method adds a SetVectorOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
* this method adds a SetVectorOperation as input of the input socket.
* This can only be used from the convertToOperation method. all other usages are not allowed
*/
void addSetVectorOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex);
/**
* Creates a new link between an outputSocket and inputSocket and registrates the link to the graph
* @return the new created link
*/
* Creates a new link between an outputSocket and inputSocket and registrates the link to the graph
* @return the new created link
*/
SocketConnection *addLink(ExecutionSystem *graph, OutputSocket *outputSocket, InputSocket *inputsocket);
/**
* is this node a group node.
*/
* is this node a group node.
*/
virtual bool isGroupNode() const { return false; }
/**
* is this node a proxy node.
*/
* is this node a proxy node.
*/
virtual bool isProxyNode() const { return false; }
/**
* @brief find the InputSocket by bNodeSocket
*
* @param socket
*/
* @brief find the InputSocket by bNodeSocket
*
* @param socket
*/
InputSocket *findInputSocketBybNodeSocket(bNodeSocket *socket);
/**
* @brief find the OutputSocket by bNodeSocket
*
* @param socket
*/
* @brief find the OutputSocket by bNodeSocket
*
* @param socket
*/
OutputSocket *findOutputSocketBybNodeSocket(bNodeSocket *socket);
protected:

View File

@ -37,136 +37,136 @@ class NodeOperation;
class ExecutionSystem;
/**
* @brief The NodeBase class is the super-class of all node related objects like @see Node @see NodeOperation
* the reason for the existence of this class is to support graph-nodes when using ExecutionSystem
* the NodeBase also contains the reference to InputSocket and OutputSocket.
* @ingroup Model
*/
* @brief The NodeBase class is the super-class of all node related objects like @see Node @see NodeOperation
* the reason for the existence of this class is to support graph-nodes when using ExecutionSystem
* the NodeBase also contains the reference to InputSocket and OutputSocket.
* @ingroup Model
*/
class NodeBase {
private:
/**
* @brief the list of actual inputsockets @see InputSocket
*/
vector<InputSocket*> inputsockets;
* @brief the list of actual inputsockets @see InputSocket
*/
vector<InputSocket *> inputsockets;
/**
* @brief the list of actual outputsockets @see OutputSocket
*/
vector<OutputSocket*> outputsockets;
* @brief the list of actual outputsockets @see OutputSocket
*/
vector<OutputSocket *> outputsockets;
protected:
/**
* @brief get access to the vector of input sockets
*/
inline vector<InputSocket*>& getInputSockets() {return this->inputsockets;}
* @brief get access to the vector of input sockets
*/
inline vector<InputSocket *>& getInputSockets() { return this->inputsockets; }
/**
* @brief get access to the vector of input sockets
*/
inline vector<OutputSocket*>& getOutputSockets() {return this->outputsockets;}
* @brief get access to the vector of input sockets
*/
inline vector<OutputSocket *>& getOutputSockets() { return this->outputsockets; }
public:
/**
* @brief destructor
* clean up memory related to this NodeBase.
*/
* @brief destructor
* clean up memory related to this NodeBase.
*/
virtual ~NodeBase();
/**
* @brief determine the actual socket data types that will go through the system
*/
* @brief determine the actual socket data types that will go through the system
*/
virtual void determineActualSocketDataTypes();
/**
* @brief determine the actual socket data types of a specific outputsocket
*
* @param outputsocket
* a reference to the actual outputsocket where the datatype must be determined from
*
* @return
* COM_DT_VALUE if it is a value (1 float buffer)
* COM_DT_COLOR if it is a value (4 float buffer)
* COM_DT_VECTOR if it is a value (3 float buffer)
*/
* @brief determine the actual socket data types of a specific outputsocket
*
* @param outputsocket
* a reference to the actual outputsocket where the datatype must be determined from
*
* @return
* COM_DT_VALUE if it is a value (1 float buffer)
* COM_DT_COLOR if it is a value (4 float buffer)
* COM_DT_VECTOR if it is a value (3 float buffer)
*/
virtual DataType determineActualDataType(OutputSocket *outputsocket);
/**
* @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation.
* @return [true:false]
* @see NodeOperation
*/
virtual const int isOperation() const {return false;}
* @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation.
* @return [true:false]
* @see NodeOperation
*/
virtual const int isOperation() const { return false; }
/**
* @brief check if this is an input node
* An input node is a node that only has output sockets and no input sockets
* @return [false..true]
*/
* @brief check if this is an input node
* An input node is a node that only has output sockets and no input sockets
* @return [false..true]
*/
const bool isInputNode() const;
/**
* @brief Return the number of input sockets of this node.
*/
const unsigned int getNumberOfInputSockets() const {return this->inputsockets.size();}
* @brief Return the number of input sockets of this node.
*/
const unsigned int getNumberOfInputSockets() const { return this->inputsockets.size(); }
/**
* @brief Return the number of output sockets of this node.
*/
const unsigned int getNumberOfOutputSockets() const {return this->outputsockets.size();}
* @brief Return the number of output sockets of this node.
*/
const unsigned int getNumberOfOutputSockets() const { return this->outputsockets.size(); }
/**
* after the data has been determined of an outputsocket that has a connection with an inputsocket this method is called on the
* node that contains the inputsocket.
* @param socket
* the reference of the inputsocket where connected data type is found
* @param actualType [COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR]
* the actual data type that is coming from the connected output socket
*/
* after the data has been determined of an outputsocket that has a connection with an inputsocket this method is called on the
* node that contains the inputsocket.
* @param socket
* the reference of the inputsocket where connected data type is found
* @param actualType [COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR]
* the actual data type that is coming from the connected output socket
*/
virtual void notifyActualDataTypeSet(InputSocket *socket, const DataType actualType);
/**
* get the reference to a certain outputsocket
* @param index
* the index of the needed outputsocket
*/
* get the reference to a certain outputsocket
* @param index
* the index of the needed outputsocket
*/
OutputSocket *getOutputSocket(const int index);
/**
* get the reference to the first outputsocket
* @param index
* the index of the needed outputsocket
*/
inline OutputSocket *getOutputSocket() {return getOutputSocket(0);}
* get the reference to the first outputsocket
* @param index
* the index of the needed outputsocket
*/
inline OutputSocket *getOutputSocket() { return getOutputSocket(0); }
/**
* get the reference to a certain inputsocket
* @param index
* the index of the needed inputsocket
*/
* get the reference to a certain inputsocket
* @param index
* the index of the needed inputsocket
*/
InputSocket *getInputSocket(const int index);
virtual bool isStatic() const {return false;}
void getStaticValues(float *result) const {}
virtual bool isStatic() const { return false; }
void getStaticValues(float *result) const { }
protected:
NodeBase();
/**
* @brief add an InputSocket to the collection of inputsockets
* @note may only be called in an constructor
* @param socket the InputSocket to add
*/
* @brief add an InputSocket to the collection of inputsockets
* @note may only be called in an constructor
* @param socket the InputSocket to add
*/
void addInputSocket(DataType datatype);
void addInputSocket(DataType datatype, InputSocketResizeMode resizeMode);
void addInputSocket(DataType datatype, InputSocketResizeMode resizeMode, bNodeSocket *socket);
/**
* @brief add an OutputSocket to the collection of outputsockets
* @note may only be called in an constructor
* @param socket the OutputSocket to add
*/
* @brief add an OutputSocket to the collection of outputsockets
* @note may only be called in an constructor
* @param socket the OutputSocket to add
*/
void addOutputSocket(DataType datatype);
void addOutputSocket(DataType datatype, bNodeSocket *socket);
};

View File

@ -41,41 +41,41 @@ class NodeOperation;
class ReadBufferOperation;
/**
* @brief NodeOperation are contains calculation logic
*
* Subclasses needs to implement the execution method (defined in SocketReader) to implement logic.
* @ingroup Model
*/
* @brief NodeOperation are contains calculation logic
*
* Subclasses needs to implement the execution method (defined in SocketReader) to implement logic.
* @ingroup Model
*/
class NodeOperation : public NodeBase, public SocketReader {
private:
/**
* @brief the index of the input socket that will be used to determine the resolution
*/
* @brief the index of the input socket that will be used to determine the resolution
*/
unsigned int resolutionInputSocketIndex;
/**
* @brief is this operation a complex one.
*
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
* @brief is this operation a complex one.
*
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
bool complex;
/**
* @brief can this operation be scheduled on an OpenCL device.
* @note Only applicable if complex is True
*/
* @brief can this operation be scheduled on an OpenCL device.
* @note Only applicable if complex is True
*/
bool openCL;
/**
* @brief mutex reference for very special node initializations
* @note only use when you really know what you are doing.
* this mutex is used to share data among chunks in the same operation
* @see TonemapOperation for an example of usage
* @see NodeOperation.initMutex initializes this mutex
* @see NodeOperation.deinitMutex deinitializes this mutex
* @see NodeOperation.getMutex retrieve a pointer to this mutex.
*/
* @brief mutex reference for very special node initializations
* @note only use when you really know what you are doing.
* this mutex is used to share data among chunks in the same operation
* @see TonemapOperation for an example of usage
* @see NodeOperation.initMutex initializes this mutex
* @see NodeOperation.deinitMutex deinitializes this mutex
* @see NodeOperation.getMutex retrieve a pointer to this mutex.
*/
ThreadMutex mutex;
/**
@ -85,87 +85,87 @@ private:
public:
/**
* @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation.
* @return [true:false]
* @see NodeBase
*/
const int isOperation() const {return true;}
* @brief is this node an operation?
* This is true when the instance is of the subclass NodeOperation.
* @return [true:false]
* @see NodeBase
*/
const int isOperation() const { return true; }
/**
* @brief determine the resolution of this node
* @note this method will not set the resolution, this is the responsibility of the caller
* @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined
*/
* @brief determine the resolution of this node
* @note this method will not set the resolution, this is the responsibility of the caller
* @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined
*/
virtual void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
/**
* @brief isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing.
*
* Default behaviour if not overriden, this operation will not be evaluated as being an output of the ExecutionSystem.
*
* @see ExecutionSystem
* @group check
* @param rendering [true false]
* true: rendering
* false: editing
*
* @return bool the result of this method
*/
virtual bool isOutputOperation(bool rendering) const {return false;}
* @brief isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing.
*
* Default behaviour if not overriden, this operation will not be evaluated as being an output of the ExecutionSystem.
*
* @see ExecutionSystem
* @group check
* @param rendering [true false]
* true: rendering
* false: editing
*
* @return bool the result of this method
*/
virtual bool isOutputOperation(bool rendering) const { return false; }
/**
* isBufferOperation returns if this is an operation that work directly on buffers.
*
* there are only 2 implementation where this is true:
* @see ReadBufferOperation
* @see WriteBufferOperation
* for all other operations this will result in false.
*/
virtual int isBufferOperation() {return false;}
virtual int isSingleThreaded() {return false;}
* isBufferOperation returns if this is an operation that work directly on buffers.
*
* there are only 2 implementation where this is true:
* @see ReadBufferOperation
* @see WriteBufferOperation
* for all other operations this will result in false.
*/
virtual int isBufferOperation() { return false; }
virtual int isSingleThreaded() { return false; }
void setbNodeTree(const bNodeTree * tree) {this->btree = tree;}
void setbNodeTree(const bNodeTree *tree) { this->btree = tree; }
virtual void initExecution();
/**
* @brief when a chunk is executed by a CPUDevice, this method is called
* @ingroup execution
* @param rect the rectangle of the chunk (location and size)
* @param chunkNumber the chunkNumber to be calculated
* @param memoryBuffers all input MemoryBuffer's needed
*/
virtual void executeRegion(rcti *rect, unsigned int chunkNumber, MemoryBuffer** memoryBuffers) {}
* @brief when a chunk is executed by a CPUDevice, this method is called
* @ingroup execution
* @param rect the rectangle of the chunk (location and size)
* @param chunkNumber the chunkNumber to be calculated
* @param memoryBuffers all input MemoryBuffer's needed
*/
virtual void executeRegion(rcti *rect, unsigned int chunkNumber, MemoryBuffer **memoryBuffers) {}
/**
* @brief when a chunk is executed by an OpenCLDevice, this method is called
* @ingroup execution
* @note this method is only implemented in WriteBufferOperation
* @param context the OpenCL context
* @param program the OpenCL program containing all compositor kernels
* @param queue the OpenCL command queue of the device the chunk is executed on
* @param rect the rectangle of the chunk (location and size)
* @param chunkNumber the chunkNumber to be calculated
* @param memoryBuffers all input MemoryBuffer's needed
* @param outputBuffer the outputbuffer to write to
*/
* @brief when a chunk is executed by an OpenCLDevice, this method is called
* @ingroup execution
* @note this method is only implemented in WriteBufferOperation
* @param context the OpenCL context
* @param program the OpenCL program containing all compositor kernels
* @param queue the OpenCL command queue of the device the chunk is executed on
* @param rect the rectangle of the chunk (location and size)
* @param chunkNumber the chunkNumber to be calculated
* @param memoryBuffers all input MemoryBuffer's needed
* @param outputBuffer the outputbuffer to write to
*/
virtual void executeOpenCLRegion(cl_context context, cl_program program, cl_command_queue queue, rcti *rect,
unsigned int chunkNumber, MemoryBuffer** memoryBuffers, MemoryBuffer* outputBuffer) {}
unsigned int chunkNumber, MemoryBuffer **memoryBuffers, MemoryBuffer *outputBuffer) {}
/**
* @brief custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice
* @ingroup execution
* @param context the OpenCL context
* @param program the OpenCL program containing all compositor kernels
* @param queue the OpenCL command queue of the device the chunk is executed on
* @param outputMemoryBuffer the allocated memory buffer in main CPU memory
* @param clOutputBuffer the allocated memory buffer in OpenCLDevice memory
* @param inputMemoryBuffers all input MemoryBuffer's needed
* @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution
* @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution
*/
virtual void executeOpenCL(cl_context context,cl_program program, cl_command_queue queue, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer** inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) {}
* @brief custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice
* @ingroup execution
* @param context the OpenCL context
* @param program the OpenCL program containing all compositor kernels
* @param queue the OpenCL command queue of the device the chunk is executed on
* @param outputMemoryBuffer the allocated memory buffer in main CPU memory
* @param clOutputBuffer the allocated memory buffer in OpenCLDevice memory
* @param inputMemoryBuffers all input MemoryBuffer's needed
* @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution
* @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution
*/
virtual void executeOpenCL(cl_context context, cl_program program, cl_command_queue queue, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp) {}
virtual void deinitExecution();
bool isResolutionSet() {
@ -173,9 +173,9 @@ public:
}
/**
* @brief set the resolution
* @param resolution the resolution to set
*/
* @brief set the resolution
* @param resolution the resolution to set
*/
void setResolution(unsigned int resolution[]) {
if (!isResolutionSet()) {
this->width = resolution[0];
@ -184,63 +184,63 @@ public:
}
void getConnectedInputSockets(vector<InputSocket*> *sockets);
void getConnectedInputSockets(vector<InputSocket *> *sockets);
/**
* @brief is this operation complex
*
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
const bool isComplex() const {return this->complex;}
virtual const bool isSetOperation() const {return false;}
* @brief is this operation complex
*
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
const bool isComplex() const { return this->complex; }
virtual const bool isSetOperation() const { return false; }
/**
* @brief is this operation of type ReadBufferOperation
* @return [true:false]
* @see ReadBufferOperation
*/
virtual const bool isReadBufferOperation() const {return false;}
* @brief is this operation of type ReadBufferOperation
* @return [true:false]
* @see ReadBufferOperation
*/
virtual const bool isReadBufferOperation() const { return false; }
/**
* @brief is this operation of type WriteBufferOperation
* @return [true:false]
* @see WriteBufferOperation
*/
virtual const bool isWriteBufferOperation() const {return false;}
* @brief is this operation of type WriteBufferOperation
* @return [true:false]
* @see WriteBufferOperation
*/
virtual const bool isWriteBufferOperation() const { return false; }
/**
* @brief is this operation the active viewer output
* user can select an ViewerNode to be active (the result of this node will be drawn on the backdrop)
* @return [true:false]
* @see BaseViewerOperation
*/
virtual const bool isActiveViewerOutput() const {return false;}
* @brief is this operation the active viewer output
* user can select an ViewerNode to be active (the result of this node will be drawn on the backdrop)
* @return [true:false]
* @see BaseViewerOperation
*/
virtual const bool isActiveViewerOutput() const { return false; }
virtual bool determineDependingAreaOfInterest(rcti * input, ReadBufferOperation *readOperation, rcti *output);
virtual bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
/**
* @brief set the index of the input socket that will determine the resolution of this operation
* @param index the index to set
*/
* @brief set the index of the input socket that will determine the resolution of this operation
* @param index the index to set
*/
void setResolutionInputSocketIndex(unsigned int index);
/**
* @brief get the render priority of this node.
* @note only applicable for output operations like ViewerOperation
* @return CompositorPriority
*/
virtual const CompositorPriority getRenderPriority() const {return COM_PRIORITY_LOW;}
* @brief get the render priority of this node.
* @note only applicable for output operations like ViewerOperation
* @return CompositorPriority
*/
virtual const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; }
/**
* @brief can this NodeOperation be scheduled on an OpenCLDevice
* @see WorkScheduler.schedule
* @see ExecutionGroup.addOperation
*/
* @brief can this NodeOperation be scheduled on an OpenCLDevice
* @see WorkScheduler.schedule
* @see ExecutionGroup.addOperation
*/
bool isOpenCL() { return this->openCL; }
virtual bool isViewerOperation() {return false;}
virtual bool isPreviewOperation() {return false;}
virtual bool isViewerOperation() { return false; }
virtual bool isPreviewOperation() { return false; }
inline bool isBreaked() {
return btree->test_break(btree->tbh);
@ -249,8 +249,8 @@ public:
protected:
NodeOperation();
void setWidth(unsigned int width) {this->width = width;}
void setHeight(unsigned int height) {this->height = height;}
void setWidth(unsigned int width) { this->width = width; }
void setHeight(unsigned int height) { this->height = height; }
SocketReader *getInputSocketReader(unsigned int inputSocketindex);
NodeOperation *getInputOperation(unsigned int inputSocketindex);
@ -261,25 +261,25 @@ protected:
/**
* @brief set whether this operation is complex
*
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
void setComplex(bool complex) {this->complex = complex;}
* @brief set whether this operation is complex
*
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
void setComplex(bool complex) { this->complex = complex; }
/**
* @brief set if this NodeOperation can be scheduled on a OpenCLDevice
*/
void setOpenCL(bool openCL) {this->openCL = openCL;}
* @brief set if this NodeOperation can be scheduled on a OpenCLDevice
*/
void setOpenCL(bool openCL) { this->openCL = openCL; }
static cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_context context, cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader* reader);
static cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_context context, cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader);
static void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers);
static void COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, cl_mem clOutputMemoryBuffer);
void COM_clAttachSizeToKernelParameter(cl_kernel kernel, int offsetIndex);
static void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer* outputMemoryBuffer);
static void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer *outputMemoryBuffer);
void COM_clEnqueueRange(cl_command_queue queue, cl_kernel kernel, MemoryBuffer *outputMemoryBuffer, int offsetIndex);
cl_kernel COM_clCreateKernel(cl_program program, const char* kernelname, list<cl_kernel> *clKernelsToCleanUp);
cl_kernel COM_clCreateKernel(cl_program program, const char *kernelname, list<cl_kernel> *clKernelsToCleanUp);
};

View File

@ -31,57 +31,57 @@ class OpenCLDevice;
/**
* @brief device representing an GPU OpenCL device.
* an instance of this class represents a single cl_device
*/
class OpenCLDevice: public Device {
* @brief device representing an GPU OpenCL device.
* an instance of this class represents a single cl_device
*/
class OpenCLDevice : public Device {
private:
/**
*@brief opencl context
*/
*@brief opencl context
*/
cl_context context;
/**
*@brief opencl device
*/
*@brief opencl device
*/
cl_device_id device;
/**
*@brief opencl program
*/
*@brief opencl program
*/
cl_program program;
/**
*@brief opencl command queue
*/
*@brief opencl command queue
*/
cl_command_queue queue;
public:
/**
*@brief constructor with opencl device
*@param context
*@param device
*/
*@brief constructor with opencl device
*@param context
*@param device
*/
OpenCLDevice(cl_context context, cl_device_id device, cl_program program);
/**
* @brief initialize the device
* During initialization the OpenCL cl_command_queue is created
* the command queue is stored in the field queue.
* @see queue
*/
* @brief initialize the device
* During initialization the OpenCL cl_command_queue is created
* the command queue is stored in the field queue.
* @see queue
*/
bool initialize();
/**
* @brief deinitialize the device
* During deintiialization the command queue is cleared
*/
* @brief deinitialize the device
* During deintiialization the command queue is cleared
*/
void deinitialize();
/**
* @brief execute a WorkPackage
* @param work the WorkPackage to execute
*/
* @brief execute a WorkPackage
* @param work the WorkPackage to execute
*/
void execute(WorkPackage *work);
};

View File

@ -37,18 +37,18 @@ class WriteBufferOperation;
//#define COM_ST_OUTPUT 1
/**
* @brief OutputSocket are sockets that can send data/input
* @ingroup Model
*/
* @brief OutputSocket are sockets that can send data/input
* @ingroup Model
*/
class OutputSocket : public Socket {
private:
vector<SocketConnection*> connections;
vector<SocketConnection *> connections;
/**
* @brief index of the inputsocket that determines the datatype of this outputsocket
* -1 will not use any inputsocket to determine the datatype, but use the outputsocket
* default datatype.
*/
* @brief index of the inputsocket that determines the datatype of this outputsocket
* -1 will not use any inputsocket to determine the datatype, but use the outputsocket
* default datatype.
*/
int inputSocketDataTypeDeterminatorIndex;
ChannelInfo channelinfo[4];
@ -56,47 +56,47 @@ private:
public:
OutputSocket(DataType datatype);
OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex);
OutputSocket(OutputSocket * from);
OutputSocket(OutputSocket *from);
void addConnection(SocketConnection *connection);
SocketConnection *getConnection(unsigned int index) {return this->connections[index];}
SocketConnection *getConnection(unsigned int index) { return this->connections[index]; }
const int isConnected() const;
int isOutputSocket() const;
/**
* @brief determine the resolution of this socket
* @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined
*/
* @brief determine the resolution of this socket
* @param resolution the result of this operation
* @param preferredResolution the preferrable resolution as no resolution could be determined
*/
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
/**
* @brief determine the actual data type and channel info.
*/
* @brief determine the actual data type and channel info.
*/
void determineActualDataType();
void relinkConnections(OutputSocket *relinkToSocket) {this->relinkConnections(relinkToSocket, false);};
void relinkConnections(OutputSocket *relinkToSocket) { this->relinkConnections(relinkToSocket, false); };
void relinkConnections(OutputSocket *relinkToSocket, bool single);
bool isActualDataTypeDeterminedByInputSocket() {
return this->inputSocketDataTypeDeterminatorIndex>-1;
return this->inputSocketDataTypeDeterminatorIndex > -1;
}
const int getNumberOfConnections() {return connections.size();}
const int getNumberOfConnections() { return connections.size(); }
/**
* @brief get the index of the inputsocket that determines the datatype of this outputsocket
*/
int getInputSocketDataTypeDeterminatorIndex() {return this->inputSocketDataTypeDeterminatorIndex;}
* @brief get the index of the inputsocket that determines the datatype of this outputsocket
*/
int getInputSocketDataTypeDeterminatorIndex() { return this->inputSocketDataTypeDeterminatorIndex; }
void clearConnections();
/**
* @brief find a connected write buffer operation to this OutputSocket
* @return WriteBufferOperation or NULL
*/
* @brief find a connected write buffer operation to this OutputSocket
* @return WriteBufferOperation or NULL
*/
WriteBufferOperation *findAttachedWriteBufferOperation() const;
ChannelInfo *getChannelInfo(const int channelnumber);
/**
* @brief trigger determine actual data type to all connected sockets
* @note will only be triggered just after the actual data type is set.
*/
* @brief trigger determine actual data type to all connected sockets
* @note will only be triggered just after the actual data type is set.
*/
void fireActualDataType();
private:

View File

@ -37,24 +37,24 @@ public:
SingleThreadedNodeOperation();
/**
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data);
* the inner loop of this program
*/
void executePixel(float *color, int x, int y, MemoryBuffer * inputBuffers[], void *data);
/**
* Initialize the execution
*/
* Initialize the execution
*/
void initExecution();
/**
* Deinitialize the execution
*/
* Deinitialize the execution
*/
void deinitExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
virtual MemoryBuffer* createMemoryBuffer(rcti *rect, MemoryBuffer **memoryBuffers) = 0;
virtual MemoryBuffer *createMemoryBuffer(rcti *rect, MemoryBuffer **memoryBuffers) = 0;
int isSingleThreaded() {return true;}
int isSingleThreaded() { return true; }
};
#endif

View File

@ -34,33 +34,33 @@ class SocketConnection;
class NodeBase;
/**
* @brief Base class for InputSocket and OutputSocket.
*
* A socket are the points on an node where the user can make a connection between.
* Sockets are always part of a node or an operation.
*
* @see InputSocket
* @see OutputSocket
* @see SocketConnection - a connection between an InputSocket and an OutputSocket
* @ingroup Model
*/
* @brief Base class for InputSocket and OutputSocket.
*
* A socket are the points on an node where the user can make a connection between.
* Sockets are always part of a node or an operation.
*
* @see InputSocket
* @see OutputSocket
* @see SocketConnection - a connection between an InputSocket and an OutputSocket
* @ingroup Model
*/
class Socket {
private:
/**
* Reference to the node where this Socket belongs to
*/
* Reference to the node where this Socket belongs to
*/
NodeBase *node;
/**
* the datatype of this socket. Is used for automatically data transformation.
* @section data-conversion
*/
* the datatype of this socket. Is used for automatically data transformation.
* @section data-conversion
*/
DataType datatype;
/**
* the actual data type during execution. This can be different than the field datatype, based on the conversion rules of the node
* @section data-conversion
*/
* the actual data type during execution. This can be different than the field datatype, based on the conversion rules of the node
* @section data-conversion
*/
DataType actualType;
bNodeSocket *editorSocket;
@ -72,17 +72,17 @@ public:
NodeBase *getNode() const;
/**
* @brief get the actual data type
*
* @note The actual data type can differ from the data type this socket expects.
* @return actual DataType
*/
* @brief get the actual data type
*
* @note The actual data type can differ from the data type this socket expects.
* @return actual DataType
*/
DataType getActualDataType() const;
/**
* @brief set the actual data type
* @param actualType the new actual type
*/
* @brief set the actual data type
* @param actualType the new actual type
*/
void setActualDataType(DataType actualType);
const virtual int isConnected() const;
@ -90,9 +90,9 @@ public:
int isOutputSocket() const;
virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {}
virtual void determineActualDataType() {}
void setEditorSocket(bNodeSocket *editorSocket) {this->editorSocket = editorSocket;}
bNodeSocket *getbNodeSocket() const {return this->editorSocket;}
void setEditorSocket(bNodeSocket *editorSocket) { this->editorSocket = editorSocket; }
bNodeSocket *getbNodeSocket() const { return this->editorSocket; }
};

View File

@ -29,94 +29,94 @@
#include "COM_ChannelInfo.h"
/**
* @brief An SocketConnection is an connection between an InputSocket and an OutputSocket.
*
* <pre>
* +----------+ To InputSocket +----------+
* | From | SocketConnection \| To Node |
* | Node *====================* |
* | |\ | |
* | | From OutputSocket +----------+
* +----------+
* </pre>
* @ingroup Model
* @see InputSocket
* @see OutputSocket
*/
* @brief An SocketConnection is an connection between an InputSocket and an OutputSocket.
*
* <pre>
* +----------+ To InputSocket +----------+
* | From | SocketConnection \| To Node |
* | Node *====================* |
* | |\ | |
* | | From OutputSocket +----------+
* +----------+
* </pre>
* @ingroup Model
* @see InputSocket
* @see OutputSocket
*/
class SocketConnection {
private:
/**
* @brief Startpoint of the connection
*/
* @brief Startpoint of the connection
*/
OutputSocket *fromSocket;
/**
* @brief Endpoint of the connection
*/
* @brief Endpoint of the connection
*/
InputSocket *toSocket;
/**
* @brief has the resize already been done for this connection
*/
* @brief has the resize already been done for this connection
*/
bool ignoreResizeCheck;
public:
SocketConnection();
/**
* @brief set the startpoint of the connection
* @param fromsocket
*/
* @brief set the startpoint of the connection
* @param fromsocket
*/
void setFromSocket(OutputSocket *fromsocket);
/**
* @brief get the startpoint of the connection
* @return from OutputSocket
*/
* @brief get the startpoint of the connection
* @return from OutputSocket
*/
OutputSocket *getFromSocket() const;
/**
* @brief set the endpoint of the connection
* @param tosocket
*/
* @brief set the endpoint of the connection
* @param tosocket
*/
void setToSocket(InputSocket *tosocket);
/**
* @brief get the endpoint of the connection
* @return to InputSocket
*/
* @brief get the endpoint of the connection
* @return to InputSocket
*/
InputSocket *getToSocket() const;
/**
* @brief check if this connection is valid
*/
* @brief check if this connection is valid
*/
bool isValid() const;
/**
* @brief return the Node where this connection is connected from
*/
NodeBase * getFromNode() const;
* @brief return the Node where this connection is connected from
*/
NodeBase *getFromNode() const;
/**
* @brief return the Node where this connection is connected to
*/
NodeBase * getToNode() const;
* @brief return the Node where this connection is connected to
*/
NodeBase *getToNode() const;
/**
* @brief set, whether the resize has already been done for this SocketConnection
*/
void setIgnoreResizeCheck(bool check) {this->ignoreResizeCheck = check;}
* @brief set, whether the resize has already been done for this SocketConnection
*/
void setIgnoreResizeCheck(bool check) { this->ignoreResizeCheck = check; }
/**
* @brief has the resize already been done for this SocketConnection
*/
bool isIgnoreResizeCheck() const { return this->ignoreResizeCheck;}
* @brief has the resize already been done for this SocketConnection
*/
bool isIgnoreResizeCheck() const { return this->ignoreResizeCheck; }
/**
* @brief does this SocketConnection need resolution conversion
* @note PreviewOperation's will be ignored
* @note Already converted SocketConnection's will be ignored
* @return needs conversion [true:false]
*/
* @brief does this SocketConnection need resolution conversion
* @note PreviewOperation's will be ignored
* @note Already converted SocketConnection's will be ignored
* @return needs conversion [true:false]
*/
bool needsResolutionConversion() const;
};

View File

@ -33,43 +33,43 @@ typedef enum PixelSampler {
class MemoryBuffer;
/**
* @brief Helper class for reading socket data.
* Only use this class for dispatching (un-ary and n-ary) executions.
* @ingroup Execution
*/
* @brief Helper class for reading socket data.
* Only use this class for dispatching (un-ary and n-ary) executions.
* @ingroup Execution
*/
class SocketReader {
private:
protected:
/**
* @brief Holds the width of the output of this operation.
*/
* @brief Holds the width of the output of this operation.
*/
unsigned int width;
/**
* @brief Holds the height of the output of this operation.
*/
* @brief Holds the height of the output of this operation.
*/
unsigned int height;
/**
* @brief calculate a single pixel
* @note this method is called for non-complex
* @param result is a float[4] array to store the result
* @param x the x-coordinate of the pixel to calculate in image space
* @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
*/
* @brief calculate a single pixel
* @note this method is called for non-complex
* @param result is a float[4] array to store the result
* @param x the x-coordinate of the pixel to calculate in image space
* @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
*/
virtual void executePixel(float *result, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {}
/**
* @brief calculate a single pixel
* @note this method is called for complex
* @param result is a float[4] array to store the result
* @param x the x-coordinate of the pixel to calculate in image space
* @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
* @param chunkData chunk specific data a during execution time.
*/
* @brief calculate a single pixel
* @note this method is called for complex
* @param result is a float[4] array to store the result
* @param x the x-coordinate of the pixel to calculate in image space
* @param y the y-coordinate of the pixel to calculate in image space
* @param inputBuffers chunks that can be read by their ReadBufferOperation.
* @param chunkData chunk specific data a during execution time.
*/
virtual void executePixel(float *result, int x, int y, MemoryBuffer *inputBuffers[], void *chunkData) {
executePixel(result, x, y, COM_PS_NEAREST, inputBuffers);
}
@ -97,17 +97,15 @@ public:
executePixel(result, x, y, dx, dy, inputBuffers);
}
virtual void *initializeTileData(rcti *rect, MemoryBuffer** memoryBuffers) {
return 0;
}
virtual void deinitializeTileData(rcti *rect, MemoryBuffer** memoryBuffers, void *data) {
virtual void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers) { return 0; }
virtual void deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data) {
}
virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer** memoryBuffers) {return 0;}
virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; }
inline const unsigned int getWidth() const {return this->width;}
inline const unsigned int getHeight() const {return this->height;}
inline const unsigned int getWidth() const { return this->width; }
inline const unsigned int getHeight() const { return this->height; }
};
#endif

View File

@ -28,37 +28,37 @@ class WorkPackage;
#include "COM_ExecutionGroup.h"
/**
* @brief contains data about work that can be scheduled
* @see WorkScheduler
*/
* @brief contains data about work that can be scheduled
* @see WorkScheduler
*/
class WorkPackage {
private:
/**
* @brief executionGroup with the operations-setup to be evaluated
*/
* @brief executionGroup with the operations-setup to be evaluated
*/
ExecutionGroup *executionGroup;
/**
* @brief number of the chunk to be executed
*/
* @brief number of the chunk to be executed
*/
unsigned int chunkNumber;
public:
/**
* @constructor
* @param group the ExecutionGroup
* @param chunkNumber the number of the chunk
*/
* @constructor
* @param group the ExecutionGroup
* @param chunkNumber the number of the chunk
*/
WorkPackage(ExecutionGroup *group, unsigned int chunkNumber);
/**
* @brief get the ExecutionGroup
*/
ExecutionGroup *getExecutionGroup() const {return this->executionGroup;}
* @brief get the ExecutionGroup
*/
ExecutionGroup *getExecutionGroup() const { return this->executionGroup; }
/**
* @brief get the number of the chunk
*/
unsigned int getChunkNumber() const {return this->chunkNumber;}
* @brief get the number of the chunk
*/
unsigned int getChunkNumber() const { return this->chunkNumber; }
};
#endif

View File

@ -32,83 +32,83 @@ extern "C" {
#include "COM_Device.h"
/** @brief the workscheduler
* @ingroup execution
*/
* @ingroup execution
*/
class WorkScheduler {
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
/**
* @brief are we being stopped.
*/
* @brief are we being stopped.
*/
static bool isStopping();
/**
* @brief main thread loop for cpudevices
* inside this loop new work is queried and being executed
*/
* @brief main thread loop for cpudevices
* inside this loop new work is queried and being executed
*/
static void *thread_execute_cpu(void *data);
/**
* @brief main thread loop for gpudevices
* inside this loop new work is queried and being executed
*/
* @brief main thread loop for gpudevices
* inside this loop new work is queried and being executed
*/
static void *thread_execute_gpu(void *data);
#endif
public:
/**
* @brief schedule a chunk of a group to be calculated.
* An execution group schedules a chunk in the WorkScheduler
* when ExecutionGroup.isOpenCL is set the work will be handled by a OpenCLDevice
* otherwide the work is scheduled for an CPUDevice
* @see ExecutionGroup.execute
* @param group the execution group
* @param chunkNumber the number of the chunk in the group to be executed
*/
* @brief schedule a chunk of a group to be calculated.
* An execution group schedules a chunk in the WorkScheduler
* when ExecutionGroup.isOpenCL is set the work will be handled by a OpenCLDevice
* otherwide the work is scheduled for an CPUDevice
* @see ExecutionGroup.execute
* @param group the execution group
* @param chunkNumber the number of the chunk in the group to be executed
*/
static void schedule(ExecutionGroup *group, int chunkNumber);
/**
* @brief initialize the WorkScheduler
*
* during initialization the mutexes are initialized.
* there are two mutexes (for every device type one)
* After mutex initialization the system is queried in order to count the number of CPUDevices and GPUDevices to be created.
* For every hardware thread a CPUDevice and for every OpenCL GPU device a OpenCLDevice is created.
* these devices are stored in a separate list (cpudevices & gpudevices)
*/
* @brief initialize the WorkScheduler
*
* during initialization the mutexes are initialized.
* there are two mutexes (for every device type one)
* After mutex initialization the system is queried in order to count the number of CPUDevices and GPUDevices to be created.
* For every hardware thread a CPUDevice and for every OpenCL GPU device a OpenCLDevice is created.
* these devices are stored in a separate list (cpudevices & gpudevices)
*/
static void initialize();
/**
* @brief deinitialize the WorkScheduler
* free all allocated resources
*/
* @brief deinitialize the WorkScheduler
* free all allocated resources
*/
static void deinitialize();
/**
* @brief Start the execution
* this methods will start the WorkScheduler. Inside this method all threads are initialized.
* for every device a thread is created.
* @see initialize Initialization and query of the number of devices
*/
* @brief Start the execution
* this methods will start the WorkScheduler. Inside this method all threads are initialized.
* for every device a thread is created.
* @see initialize Initialization and query of the number of devices
*/
static void start(CompositorContext &context);
/**
* @brief stop the execution
* All created thread by the start method are destroyed.
* @see start
*/
* @brief stop the execution
* All created thread by the start method are destroyed.
* @see start
*/
static void stop();
/**
* @brief wait for all work to be completed.
*/
* @brief wait for all work to be completed.
*/
static void finish();
/**
* @brief Are there OpenCL capable GPU devices initialized?
* the result of this method is stored in the CompositorContext
* A node can generate a different operation tree when OpenCLDevices exists.
* @see CompositorContext.getHasActiveOpenCLDevices
*/
* @brief Are there OpenCL capable GPU devices initialized?
* the result of this method is stored in the CompositorContext
* A node can generate a different operation tree when OpenCLDevices exists.
* @see CompositorContext.getHasActiveOpenCLDevices
*/
static bool hasGPUDevices();
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief AlphaOverNode
* @ingroup Node
*/
class AlphaOverNode: public Node {
* @brief AlphaOverNode
* @ingroup Node
*/
class AlphaOverNode : public Node {
public:
AlphaOverNode(bNode *editorNode) :Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
AlphaOverNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief BilateralBlurNode
* @ingroup Node
*/
class BilateralBlurNode: public Node {
* @brief BilateralBlurNode
* @ingroup Node
*/
class BilateralBlurNode : public Node {
public:
BilateralBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief BlurNode
* @ingroup Node
*/
* @brief BlurNode
* @ingroup Node
*/
class BlurNode: public Node {
class BlurNode : public Node {
public:
BlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief BokehBlurNode
* @ingroup Node
*/
* @brief BokehBlurNode
* @ingroup Node
*/
class BokehBlurNode: public Node {
class BokehBlurNode : public Node {
public:
BokehBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief BokehImageNode
* @ingroup Node
*/
class BokehImageNode: public Node {
* @brief BokehImageNode
* @ingroup Node
*/
class BokehImageNode : public Node {
public:
BokehImageNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief BoxMaskNode
* @ingroup Node
*/
class BoxMaskNode: public Node {
* @brief BoxMaskNode
* @ingroup Node
*/
class BoxMaskNode : public Node {
public:
BoxMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief BrightnessNode
* @ingroup Node
*/
class BrightnessNode: public Node {
* @brief BrightnessNode
* @ingroup Node
*/
class BrightnessNode : public Node {
public:
BrightnessNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h"
/**
* @brief ChannelMatteNode
* @ingroup Node
*/
* @brief ChannelMatteNode
* @ingroup Node
*/
class ChannelMatteNode : public Node
{
public:

View File

@ -25,9 +25,9 @@
#include "COM_Node.h"
/**
* @brief ChromaMatteNode
* @ingroup Node
*/
* @brief ChromaMatteNode
* @ingroup Node
*/
class ChromaMatteNode : public Node
{
public:

View File

@ -26,9 +26,9 @@
#include "COM_Node.h"
/**
* @brief ColorBalanceNode
* @ingroup Node
*/
* @brief ColorBalanceNode
* @ingroup Node
*/
class ColorBalanceNode : public Node
{
public:

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief ColorCorrectionNode
* @ingroup Node
*/
class ColorCorrectionNode: public Node {
* @brief ColorCorrectionNode
* @ingroup Node
*/
class ColorCorrectionNode : public Node {
public:
ColorCorrectionNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief ColorCurveNode
* @ingroup Node
*/
class ColorCurveNode: public Node {
* @brief ColorCurveNode
* @ingroup Node
*/
class ColorCurveNode : public Node {
public:
ColorCurveNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h"
/**
* @brief ColorMatteNode
* @ingroup Node
*/
* @brief ColorMatteNode
* @ingroup Node
*/
class ColorMatteNode : public Node
{
public:

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief ColorNode
* @ingroup Node
*/
class ColorNode: public Node {
* @brief ColorNode
* @ingroup Node
*/
class ColorNode : public Node {
public:
ColorNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief ColorRampNode
* @ingroup Node
*/
* @brief ColorRampNode
* @ingroup Node
*/
class ColorRampNode : public Node
{
public:
ColorRampNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif // COM_ColorRampNODE_H

View File

@ -26,9 +26,9 @@
#include "COM_Node.h"
/**
* @brief ColorSpillNode
* @ingroup Node
*/
* @brief ColorSpillNode
* @ingroup Node
*/
class ColorSpillNode : public Node
{
public:

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief ColourToBWNode
* @ingroup Node
*/
* @brief ColourToBWNode
* @ingroup Node
*/
class ColourToBWNode : public Node {
public:
ColourToBWNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -27,12 +27,12 @@
#include "DNA_node_types.h"
#include "COM_CombineRGBANode.h"
/**
* @brief CombineHSVANode
* @ingroup Node
*/
* @brief CombineHSVANode
* @ingroup Node
*/
class CombineHSVANode : public CombineRGBANode {
public:
CombineHSVANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief CombineRGBANode
* @ingroup Node
*/
* @brief CombineRGBANode
* @ingroup Node
*/
class CombineRGBANode : public Node {
public:
CombineRGBANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,9 +26,9 @@
#include "DNA_node_types.h"
#include "COM_CombineRGBANode.h"
/**
* @brief CombineYCCANode
* @ingroup Node
*/
* @brief CombineYCCANode
* @ingroup Node
*/
class CombineYCCANode : public CombineRGBANode {
public:
CombineYCCANode(bNode *editorNode);

View File

@ -26,9 +26,9 @@
#include "DNA_node_types.h"
#include "COM_CombineRGBANode.h"
/**
* @brief CombineYUVANode
* @ingroup Node
*/
* @brief CombineYUVANode
* @ingroup Node
*/
class CombineYUVANode : public CombineRGBANode {
public:
CombineYUVANode(bNode *editorNode);

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief CompositorNode
* @ingroup Node
*/
* @brief CompositorNode
* @ingroup Node
*/
class CompositorNode : public Node {
public:
CompositorNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,13 +25,13 @@
#include "COM_Node.h"
/**
* @brief ConvertAlphaNode
* @ingroup Node
*/
class ConvertAlphaNode: public Node {
* @brief ConvertAlphaNode
* @ingroup Node
*/
class ConvertAlphaNode : public Node {
public:
ConvertAlphaNode(bNode *editorNode) :Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
ConvertAlphaNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,10 +25,10 @@
#include "COM_Node.h"
class CropNode: public Node {
class CropNode : public Node {
public:
CropNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief DefocusNode
* @ingroup Node
*/
* @brief DefocusNode
* @ingroup Node
*/
class DefocusNode: public Node {
class DefocusNode : public Node {
public:
DefocusNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief DifferenceMatteNode
* @ingroup Node
*/
* @brief DifferenceMatteNode
* @ingroup Node
*/
class DifferenceMatteNode : public Node
{
public:
DifferenceMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif // COM_DifferenceMatteNODE_H

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief DilateErodeNode
* @ingroup Node
*/
class DilateErodeNode: public Node {
* @brief DilateErodeNode
* @ingroup Node
*/
class DilateErodeNode : public Node {
public:
DilateErodeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief DirectionalBlurNode
* @ingroup Node
*/
class DirectionalBlurNode: public Node {
* @brief DirectionalBlurNode
* @ingroup Node
*/
class DirectionalBlurNode : public Node {
public:
DirectionalBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -31,6 +31,6 @@
class DisplaceNode : public Node {
public:
DisplaceNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h"
/**
* @brief DistanceMatteNode
* @ingroup Node
*/
* @brief DistanceMatteNode
* @ingroup Node
*/
class DistanceMatteNode : public Node
{
public:

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief DoubleEdgeMaskNode
* @ingroup Node
*/
class DoubleEdgeMaskNode: public Node {
* @brief DoubleEdgeMaskNode
* @ingroup Node
*/
class DoubleEdgeMaskNode : public Node {
public:
DoubleEdgeMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief EllipseMaskNode
* @ingroup Node
*/
class EllipseMaskNode: public Node {
* @brief EllipseMaskNode
* @ingroup Node
*/
class EllipseMaskNode : public Node {
public:
EllipseMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief FilterNode
* @ingroup Node
*/
* @brief FilterNode
* @ingroup Node
*/
class FilterNode : public Node
{
public:
FilterNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif // COM_FILTERNODE_H

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief FlipNode
* @ingroup Node
*/
class FlipNode: public Node {
* @brief FlipNode
* @ingroup Node
*/
class FlipNode : public Node {
public:
FlipNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief GammaNode
* @ingroup Node
*/
class GammaNode: public Node {
* @brief GammaNode
* @ingroup Node
*/
class GammaNode : public Node {
public:
GammaNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief GlareNode
* @ingroup Node
*/
class GlareNode: public Node {
* @brief GlareNode
* @ingroup Node
*/
class GlareNode : public Node {
public:
GlareNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -27,30 +27,30 @@
#include "COM_ExecutionSystem.h"
/**
* @brief Represents a group node
* @ingroup Node
*/
class GroupNode: public Node {
* @brief Represents a group node
* @ingroup Node
*/
class GroupNode : public Node {
public:
GroupNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
/**
* @brief check if this node a group node.
* @returns true
*/
* @brief check if this node a group node.
* @returns true
*/
bool isGroupNode() const { return true; }
/**
* @brief ungroup this group node.
* during ungroup the subtree (internal nodes and links) of the group node
* are added to the ExecutionSystem.
*
* Between the main tree and the subtree proxy nodes will be added
* to translate between InputSocket and OutputSocket
*
* @param system the ExecutionSystem where to add the subtree
*/
* @brief ungroup this group node.
* during ungroup the subtree (internal nodes and links) of the group node
* are added to the ExecutionSystem.
*
* Between the main tree and the subtree proxy nodes will be added
* to translate between InputSocket and OutputSocket
*
* @param system the ExecutionSystem where to add the subtree
*/
void ungroup(ExecutionSystem &system);
};

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
/**
* @brief HueSaturationValueCorrectNode
* @ingroup Node
*/
* @brief HueSaturationValueCorrectNode
* @ingroup Node
*/
class HueSaturationValueCorrectNode : public Node {
public:
HueSaturationValueCorrectNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
/**
* @brief HueSaturationValueNode
* @ingroup Node
*/
* @brief HueSaturationValueNode
* @ingroup Node
*/
class HueSaturationValueNode : public Node {
public:
HueSaturationValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief IDMaskNode
* @ingroup Node
*/
class IDMaskNode: public Node {
* @brief IDMaskNode
* @ingroup Node
*/
class IDMaskNode : public Node {
public:
IDMaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -30,15 +30,15 @@ extern "C" {
}
/**
* @brief ImageNode
* @ingroup Node
*/
* @brief ImageNode
* @ingroup Node
*/
class ImageNode : public Node {
private:
NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype);
public:
ImageNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief InvertNode
* @ingroup Node
*/
class InvertNode: public Node {
* @brief InvertNode
* @ingroup Node
*/
class InvertNode : public Node {
public:
InvertNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief LensDistortionNode
* @ingroup Node
*/
class LensDistortionNode: public Node {
* @brief LensDistortionNode
* @ingroup Node
*/
class LensDistortionNode : public Node {
public:
LensDistortionNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,9 +25,9 @@
#include "COM_Node.h"
/**
* @brief LuminanceMatteNode
* @ingroup Node
*/
* @brief LuminanceMatteNode
* @ingroup Node
*/
class LuminanceMatteNode : public Node
{
public:

View File

@ -31,6 +31,6 @@
class MapUVNode : public Node {
public:
MapUVNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief MapValueNode
* @ingroup Node
*/
* @brief MapValueNode
* @ingroup Node
*/
class MapValueNode : public Node {
public:
MapValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,9 +25,9 @@
#include "DNA_node_types.h"
/**
* @brief MaskNode
* @ingroup Node
*/
* @brief MaskNode
* @ingroup Node
*/
class MaskNode : public Node {

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief MathNode
* @ingroup Node
*/
class MathNode: public Node {
* @brief MathNode
* @ingroup Node
*/
class MathNode : public Node {
public:
MathNode(bNode *editorNode) :Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
MathNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief MixNode
* @ingroup Node
*/
* @brief MixNode
* @ingroup Node
*/
class MixNode : public Node {
public:
MixNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -24,14 +24,14 @@
#include "DNA_node_types.h"
/**
* @brief MovieClipNode
* @ingroup Node
*/
* @brief MovieClipNode
* @ingroup Node
*/
class MovieClipNode : public Node {
public:
MovieClipNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief MovieDistortionNode
* @ingroup Node
*/
class MovieDistortionNode: public Node {
* @brief MovieDistortionNode
* @ingroup Node
*/
class MovieDistortionNode : public Node {
public:
MovieDistortionNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,15 +26,15 @@
#include "COM_Node.h"
/**
* @brief MuteNode
* @ingroup Node
*/
class MuteNode: public Node {
* @brief MuteNode
* @ingroup Node
*/
class MuteNode : public Node {
public:
MuteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
private:
void reconnect(ExecutionSystem *graph, OutputSocket * output);
void reconnect(ExecutionSystem *graph, OutputSocket *output);
};
#endif

View File

@ -26,14 +26,14 @@
#include "COM_Node.h"
/**
* @brief NormalNode
* @ingroup Node
*/
* @brief NormalNode
* @ingroup Node
*/
class NormalNode : public Node
{
public:
NormalNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif // COM_NormalNODE_H

View File

@ -25,13 +25,13 @@
#include "COM_Node.h"
/**
* @brief NormalizeNode
* @ingroup Node
*/
class NormalizeNode: public Node {
* @brief NormalizeNode
* @ingroup Node
*/
class NormalizeNode : public Node {
public:
NormalizeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -28,13 +28,13 @@
#include "DNA_node_types.h"
/**
* @brief OutputFileNode
* @ingroup Node
*/
* @brief OutputFileNode
* @ingroup Node
*/
class OutputFileNode : public Node {
public:
OutputFileNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -25,13 +25,13 @@
#include "COM_RenderLayersBaseProg.h"
/**
* @brief RenderLayersNode
* @ingroup Node
*/
* @brief RenderLayersNode
* @ingroup Node
*/
class RenderLayersNode : public Node {
public:
RenderLayersNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
private:
void testSocketConnection(ExecutionSystem *graph, int outputSocketNumber, RenderLayersBaseProg * operation);
void testSocketConnection(ExecutionSystem *graph, int outputSocketNumber, RenderLayersBaseProg *operation);
};

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief RotateNode
* @ingroup Node
*/
class RotateNode: public Node {
* @brief RotateNode
* @ingroup Node
*/
class RotateNode : public Node {
public:
RotateNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief ScaleNode
* @ingroup Node
*/
class ScaleNode: public Node {
* @brief ScaleNode
* @ingroup Node
*/
class ScaleNode : public Node {
public:
ScaleNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -28,12 +28,12 @@
#include "COM_SeparateRGBANode.h"
/**
* @brief SeparateHSVANode
* @ingroup Node
*/
* @brief SeparateHSVANode
* @ingroup Node
*/
class SeparateHSVANode : public SeparateRGBANode {
public:
SeparateHSVANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief SeparateRGBANode
* @ingroup Node
*/
* @brief SeparateRGBANode
* @ingroup Node
*/
class SeparateRGBANode : public Node {
public:
SeparateRGBANode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -27,9 +27,9 @@
#include "COM_SeparateRGBANode.h"
/**
* @brief SeparateYCCANode
* @ingroup Node
*/
* @brief SeparateYCCANode
* @ingroup Node
*/
class SeparateYCCANode : public SeparateRGBANode {
public:
SeparateYCCANode(bNode *editorNode);

View File

@ -27,9 +27,9 @@
#include "COM_SeparateRGBANode.h"
/**
* @brief SeparateYUVANode
* @ingroup Node
*/
* @brief SeparateYUVANode
* @ingroup Node
*/
class SeparateYUVANode : public SeparateRGBANode {
public:
SeparateYUVANode(bNode *editorNode);

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief SetAlphaNode
* @ingroup Node
*/
class SetAlphaNode: public Node {
* @brief SetAlphaNode
* @ingroup Node
*/
class SetAlphaNode : public Node {
public:
SetAlphaNode(bNode *editorNode) :Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
SetAlphaNode(bNode *editorNode) : Node(editorNode) {}
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief SocketProxyNode
* @ingroup Node
*/
class SocketProxyNode: public Node {
* @brief SocketProxyNode
* @ingroup Node
*/
class SocketProxyNode : public Node {
public:
SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bNodeSocket *editorOutput);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
virtual bool isProxyNode() const { return true; }
};

View File

@ -26,12 +26,12 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
/**
* @brief SplitViewerNode
* @ingroup Node
*/
* @brief SplitViewerNode
* @ingroup Node
*/
class SplitViewerNode : public Node {
public:
SplitViewerNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -24,11 +24,11 @@
#include "DNA_node_types.h"
/**
* @brief Stabilize2dNode
* @ingroup Node
*/
* @brief Stabilize2dNode
* @ingroup Node
*/
class Stabilize2dNode : public Node {
public:
Stabilize2dNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};

View File

@ -27,12 +27,12 @@
#include "COM_NodeOperation.h"
#include "DNA_node_types.h"
/**
* @brief SwitchNode
* @ingroup Node
*/
* @brief SwitchNode
* @ingroup Node
*/
class SwitchNode : public Node {
public:
SwitchNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -24,11 +24,11 @@
#include "DNA_node_types.h"
/**
* @brief TextureNode
* @ingroup Node
*/
* @brief TextureNode
* @ingroup Node
*/
class TextureNode : public Node {
public:
TextureNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief TimeNode
* @ingroup Node
*/
class TimeNode: public Node {
* @brief TimeNode
* @ingroup Node
*/
class TimeNode : public Node {
public:
TimeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief TonemapNode
* @ingroup Node
*/
class TonemapNode: public Node {
* @brief TonemapNode
* @ingroup Node
*/
class TonemapNode : public Node {
public:
TonemapNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -24,11 +24,11 @@
#include "DNA_node_types.h"
/**
* @brief TransformNode
* @ingroup Node
*/
* @brief TransformNode
* @ingroup Node
*/
class TransformNode : public Node {
public:
TransformNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief TranslateNode
* @ingroup Node
*/
class TranslateNode: public Node {
* @brief TranslateNode
* @ingroup Node
*/
class TranslateNode : public Node {
public:
TranslateNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief ValueNode
* @ingroup Node
*/
class ValueNode: public Node {
* @brief ValueNode
* @ingroup Node
*/
class ValueNode : public Node {
public:
ValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief VectorBlurNode
* @ingroup Node
*/
class VectorBlurNode: public Node {
* @brief VectorBlurNode
* @ingroup Node
*/
class VectorBlurNode : public Node {
public:
VectorBlurNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

View File

@ -26,13 +26,13 @@
#include "COM_Node.h"
/**
* @brief VectorCurveNode
* @ingroup Node
*/
class VectorCurveNode: public Node {
* @brief VectorCurveNode
* @ingroup Node
*/
class VectorCurveNode : public Node {
public:
VectorCurveNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext * context);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
#endif

Some files were not shown because too many files have changed in this diff Show More