|
Blender
V2.93
|
#include <COM_VariableSizeBokehBlurOperation.h>
Inherits blender::compositor::NodeOperation, and blender::compositor::QualityStepHelper.
Public Member Functions | |
| VariableSizeBokehBlurOperation () | |
| void | executePixel (float output[4], int x, int y, void *data) override |
| void | initExecution () override |
| void * | initializeTileData (rcti *rect) override |
| void | deinitializeTileData (rcti *rect, void *data) override |
| void | deinitExecution () override |
| bool | determineDependingAreaOfInterest (rcti *input, ReadBufferOperation *readOperation, rcti *output) override |
| void | setMaxBlur (int maxRadius) |
| void | setThreshold (float threshold) |
| void | setDoScaleSize (bool scale_size) |
| void | executeOpenCL (OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, std::list< cl_mem > *clMemToCleanUp, std::list< cl_kernel > *clKernelsToCleanUp) override |
| custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice. More... | |
Public Member Functions inherited from blender::compositor::NodeOperation | |
| virtual | ~NodeOperation () |
| void | set_name (const std::string name) |
| const std::string | get_name () const |
| void | set_id (const int id) |
| const int | get_id () const |
| const NodeOperationFlags | get_flags () const |
| unsigned int | getNumberOfInputSockets () const |
| unsigned int | getNumberOfOutputSockets () const |
| NodeOperationOutput * | getOutputSocket (unsigned int index=0) |
| NodeOperationInput * | getInputSocket (unsigned int index) |
| virtual void | determineResolution (unsigned int resolution[2], unsigned int preferredResolution[2]) |
| determine the resolution of this node More... | |
| virtual bool | isOutputOperation (bool) const |
| isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing. More... | |
| void | setbNodeTree (const bNodeTree *tree) |
| virtual void | executeRegion (rcti *, unsigned int) |
| when a chunk is executed by a CPUDevice, this method is called More... | |
| virtual void | executeOpenCLRegion (OpenCLDevice *, rcti *, unsigned int, MemoryBuffer **, MemoryBuffer *) |
| when a chunk is executed by an OpenCLDevice, this method is called More... | |
| void | setResolution (unsigned int resolution[2]) |
| set the resolution More... | |
| virtual bool | isActiveViewerOutput () const |
| 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). More... | |
| void | setResolutionInputSocketIndex (unsigned int index) |
| set the index of the input socket that will determine the resolution of this operation More... | |
| virtual eCompositorPriority | getRenderPriority () const |
| get the render priority of this node. More... | |
| bool | isBraked () const |
| void | updateDraw () |
| unsigned int | getWidth () const |
| unsigned int | getHeight () const |
| void | readSampled (float result[4], float x, float y, PixelSampler sampler) |
| void | readFiltered (float result[4], float x, float y, float dx[2], float dy[2]) |
| void | read (float result[4], int x, int y, void *chunkData) |
| virtual MemoryBuffer * | getInputMemoryBuffer (MemoryBuffer **) |
| virtual std::unique_ptr< MetaData > | getMetaData () |
Public Member Functions inherited from blender::compositor::QualityStepHelper | |
| QualityStepHelper () | |
| void | setQuality (eCompositorQuality quality) |
Additional Inherited Members | |
Protected Member Functions inherited from blender::compositor::NodeOperation | |
| NodeOperation () | |
| void | addInputSocket (DataType datatype, ResizeMode resize_mode=ResizeMode::Center) |
| void | addOutputSocket (DataType datatype) |
| void | setWidth (unsigned int width) |
| void | setHeight (unsigned int height) |
| SocketReader * | getInputSocketReader (unsigned int inputSocketindex) |
| NodeOperation * | getInputOperation (unsigned int inputSocketindex) |
| void | deinitMutex () |
| void | initMutex () |
| void | lockMutex () |
| void | unlockMutex () |
| void | setComplex (bool complex) |
| set whether this operation is complex More... | |
| virtual void | executePixelSampled (float[4], float, float, PixelSampler) |
| calculate a single pixel More... | |
| virtual void | executePixelFiltered (float[4], float, float, float[2], float[2]) |
| calculate a single pixel using an EWA filter More... | |
Protected Member Functions inherited from blender::compositor::QualityStepHelper | |
| void | initExecution (QualityHelper helper) |
| int | getStep () const |
| int | getOffsetAdd () const |
Protected Attributes inherited from blender::compositor::NodeOperation | |
| unsigned int | m_width |
| unsigned int | m_height |
| NodeOperationFlags | flags |
Definition at line 28 of file COM_VariableSizeBokehBlurOperation.h.
| blender::compositor::VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation | ( | ) |
Definition at line 27 of file COM_VariableSizeBokehBlurOperation.cc.
References blender::compositor::NodeOperation::addInputSocket(), blender::compositor::NodeOperation::addOutputSocket(), blender::compositor::Color, blender::compositor::NodeOperationFlags::complex, blender::compositor::NodeOperation::flags, blender::compositor::None, blender::compositor::NodeOperationFlags::open_cl, and blender::compositor::Value.
|
overridevirtual |
Deinitialize the execution
Reimplemented from blender::compositor::NodeOperation.
Definition at line 224 of file COM_VariableSizeBokehBlurOperation.cc.
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 87 of file COM_VariableSizeBokehBlurOperation.cc.
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 234 of file COM_VariableSizeBokehBlurOperation.cc.
References blender::compositor::COM_BLUR_BOKEH_PIXELS, blender::compositor::NodeOperation::determineDependingAreaOfInterest(), blender::compositor::NodeOperation::getInputOperation(), blender::compositor::NodeOperation::m_height, blender::compositor::NodeOperation::m_width, MAX2, output, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by initializeTileData().
|
overridevirtual |
custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice.
| context | the OpenCL context |
| program | the OpenCL program containing all compositor kernels |
| queue | the OpenCL command queue of the device the chunk is executed on |
| outputMemoryBuffer | the allocated memory buffer in main CPU memory |
| clOutputBuffer | the allocated memory buffer in OpenCLDevice memory |
| inputMemoryBuffers | all input MemoryBuffer's needed |
| clMemToCleanUp | all created cl_mem references must be added to this list. Framework will clean this after execution |
| clKernelsToCleanUp | all created cl_kernel references must be added to this list. Framework will clean this after execution |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 186 of file COM_VariableSizeBokehBlurOperation.cc.
References blender::compositor::OpenCLDevice::COM_clAttachMemoryBufferOffsetToKernelParameter(), blender::compositor::OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(), blender::compositor::OpenCLDevice::COM_clAttachOutputMemoryBufferToKernelParameter(), blender::compositor::OpenCLDevice::COM_clAttachSizeToKernelParameter(), blender::compositor::OpenCLDevice::COM_clCreateKernel(), blender::compositor::OpenCLDevice::COM_clEnqueueRange(), float(), blender::compositor::MemoryBuffer::get_max_value(), blender::compositor::NodeOperation::getInputMemoryBuffer(), blender::compositor::QualityStepHelper::getStep(), blender::compositor::NodeOperation::m_height, blender::compositor::NodeOperation::m_width, MAX2, and min_ff().
|
overridevirtual |
The inner loop of this operation.
Reimplemented from blender::compositor::NodeOperation.
Definition at line 93 of file COM_VariableSizeBokehBlurOperation.cc.
References add_v4_v4(), BLI_assert, blender::compositor::VariableSizeBokehBlurTileData::bokeh, blender::compositor::VariableSizeBokehBlurTileData::color, blender::compositor::COM_BLUR_BOKEH_PIXELS, blender::compositor::COM_DATA_TYPE_COLOR_CHANNELS, copy_v4_fl(), copy_v4_v4(), data, fabsf, float(), blender::compositor::MemoryBuffer::getBuffer(), blender::compositor::MemoryBuffer::getHeight(), blender::compositor::QualityStepHelper::getStep(), blender::compositor::MemoryBuffer::getWidth(), interp_v4_v4v4(), blender::compositor::NodeOperation::m_height, blender::compositor::NodeOperation::m_width, madd_v4_v4v4(), MAX2, blender::compositor::VariableSizeBokehBlurTileData::maxBlurScalar, MIN2, ny, output, blender::compositor::MemoryBuffer::read(), blender::compositor::MemoryBuffer::readNoCheck(), size(), blender::compositor::VariableSizeBokehBlurTileData::size, x, and y.
|
overridevirtual |
Initialize the execution
Reimplemented from blender::compositor::NodeOperation.
Definition at line 51 of file COM_VariableSizeBokehBlurOperation.cc.
References blender::compositor::COM_QH_INCREASE, blender::compositor::NodeOperation::getInputSocketReader(), and blender::compositor::QualityStepHelper::initExecution().
|
overridevirtual |
Reimplemented from blender::compositor::NodeOperation.
Definition at line 68 of file COM_VariableSizeBokehBlurOperation.cc.
References CLAMP, data, determineDependingAreaOfInterest(), blender::compositor::NodeOperation::initializeTileData(), blender::compositor::NodeOperation::m_height, blender::compositor::NodeOperation::m_width, and MAX2.
|
inline |
Definition at line 76 of file COM_VariableSizeBokehBlurOperation.h.
Referenced by blender::compositor::BokehBlurNode::convertToOperations().
|
inline |
Definition at line 66 of file COM_VariableSizeBokehBlurOperation.h.
Referenced by blender::compositor::BokehBlurNode::convertToOperations(), and blender::compositor::DefocusNode::convertToOperations().
|
inline |
Definition at line 71 of file COM_VariableSizeBokehBlurOperation.h.
Referenced by blender::compositor::BokehBlurNode::convertToOperations(), and blender::compositor::DefocusNode::convertToOperations().