Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_MovieClipOperation.h
| Show All 13 Lines | |||||
| * 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 "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "COM_NodeOperation.h" | #include "COM_MultiThreadedOperation.h" | ||||
| #include "DNA_movieclip_types.h" | #include "DNA_movieclip_types.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| namespace blender::compositor { | namespace blender::compositor { | ||||
| /** | /** | ||||
| * Base class for movie clip | * Base class for movie clip | ||||
| */ | */ | ||||
| class MovieClipBaseOperation : public NodeOperation { | class MovieClipBaseOperation : public MultiThreadedOperation { | ||||
| protected: | protected: | ||||
| MovieClip *m_movieClip; | MovieClip *m_movieClip; | ||||
| MovieClipUser *m_movieClipUser; | MovieClipUser *m_movieClipUser; | ||||
| ImBuf *m_movieClipBuffer; | ImBuf *m_movieClipBuffer; | ||||
| int m_movieClipheight; | int m_movieClipheight; | ||||
| int m_movieClipwidth; | int m_movieClipwidth; | ||||
| int m_framenumber; | int m_framenumber; | ||||
| bool m_cacheFrame; | bool m_cacheFrame; | ||||
| Show All 22 Lines | void setCacheFrame(bool value) | ||||
| this->m_cacheFrame = value; | this->m_cacheFrame = value; | ||||
| } | } | ||||
| void setFramenumber(int framenumber) | void setFramenumber(int framenumber) | ||||
| { | { | ||||
| this->m_framenumber = framenumber; | this->m_framenumber = framenumber; | ||||
| } | } | ||||
| void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; | void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; | ||||
| void update_memory_buffer_partial(MemoryBuffer *output, | |||||
| const rcti &area, | |||||
| Span<MemoryBuffer *> inputs) override; | |||||
| }; | }; | ||||
| class MovieClipOperation : public MovieClipBaseOperation { | class MovieClipOperation : public MovieClipBaseOperation { | ||||
| public: | public: | ||||
| MovieClipOperation(); | MovieClipOperation(); | ||||
| }; | }; | ||||
| class MovieClipAlphaOperation : public MovieClipBaseOperation { | class MovieClipAlphaOperation : public MovieClipBaseOperation { | ||||
| public: | public: | ||||
| MovieClipAlphaOperation(); | MovieClipAlphaOperation(); | ||||
| void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; | void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; | ||||
| void update_memory_buffer_partial(MemoryBuffer *output, | |||||
| const rcti &area, | |||||
| Span<MemoryBuffer *> inputs) override; | |||||
| }; | }; | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||