Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_DespeckleOperation.h
| Show All 12 Lines | |||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * Copyright 2011, Blender Foundation. | * Copyright 2011, Blender Foundation. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "COM_NodeOperation.h" | #include "COM_MultiThreadedOperation.h" | ||||
| namespace blender::compositor { | namespace blender::compositor { | ||||
| class DespeckleOperation : public NodeOperation { | class DespeckleOperation : public MultiThreadedOperation { | ||||
| private: | private: | ||||
| constexpr static int IMAGE_INPUT_INDEX = 0; | |||||
| constexpr static int FACTOR_INPUT_INDEX = 1; | |||||
| float m_threshold; | float m_threshold; | ||||
| float m_threshold_neighbor; | float m_threshold_neighbor; | ||||
| // int m_filterWidth; | // int m_filterWidth; | ||||
| // int m_filterHeight; | // int m_filterHeight; | ||||
| protected: | protected: | ||||
| SocketReader *m_inputOperation; | SocketReader *m_inputOperation; | ||||
| Show All 12 Lines | public: | ||||
| } | } | ||||
| void setThresholdNeighbor(float threshold) | void setThresholdNeighbor(float threshold) | ||||
| { | { | ||||
| this->m_threshold_neighbor = threshold; | this->m_threshold_neighbor = threshold; | ||||
| } | } | ||||
| void initExecution() override; | void initExecution() override; | ||||
| void deinitExecution() override; | void deinitExecution() override; | ||||
| void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override; | |||||
| void update_memory_buffer_partial(MemoryBuffer *output, | |||||
| const rcti &area, | |||||
| Span<MemoryBuffer *> inputs) override; | |||||
| }; | }; | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||