diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-10 18:42:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-10 18:42:37 +0400 |
commit | a41dc719bf52f462ddabbb8cb1f8fb882f4affc9 (patch) | |
tree | 1d9162b679979f026d312980dfa46863b5ca83ee /source/blender/compositor/operations | |
parent | 21f81ee279702441a398c6b592b25da9aee27d09 (diff) | |
parent | 9ac9040cfdea0ac30aa4e6f4e9adac0567f7e934 (diff) |
Movie Clip Node: skip putting frame to cache when rendering animation
This helps keeping memory usage low and have cached segments untouched
when mixing stuff like tracking and rendering -- now you wouldn't be
need to re-cache segment you're working on after rendering.
---
svn merge -r48550:48552 ^/branches/soc-2011-tomato
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieClipOperation.cpp | 11 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MovieClipOperation.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp index f53bb66d478..a5cc7196f62 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp @@ -48,7 +48,16 @@ void MovieClipOperation::initExecution() if (this->m_movieClip) { BKE_movieclip_user_set_frame(this->m_movieClipUser, this->m_framenumber); ImBuf *ibuf; - ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, this->m_movieClipUser); + + if (this->m_cacheFrame) { + ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, this->m_movieClipUser); + } + else { + int flag = this->m_movieClip->flag & MCLIP_TIMECODE_FLAGS; + + ibuf = BKE_movieclip_get_ibuf_flag(this->m_movieClip, this->m_movieClipUser, flag, MOVIECLIP_CACHE_SKIP); + } + if (ibuf) { this->m_movieClipBuffer = ibuf; if (ibuf->rect_float == NULL || ibuf->userflags & IB_RECT_INVALID) { diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h b/source/blender/compositor/operations/COM_MovieClipOperation.h index 2e824009ab6..50d79213428 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.h +++ b/source/blender/compositor/operations/COM_MovieClipOperation.h @@ -43,6 +43,7 @@ protected: int m_movieClipheight; int m_movieClipwidth; int m_framenumber; + bool m_cacheFrame; /** * Determine the output resolution. The resolution is retrieved from the Renderer @@ -56,6 +57,7 @@ public: void deinitExecution(); void setMovieClip(MovieClip *image) { this->m_movieClip = image; } void setMovieClipUser(MovieClipUser *imageuser) { this->m_movieClipUser = imageuser; } + void setCacheFrame(bool value) { this->m_cacheFrame = value; } void setFramenumber(int framenumber) { this->m_framenumber = framenumber; } void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]); |