diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 15 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index bb8e420451f..c90faa7e0ca 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -631,7 +631,8 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u return postproc_ibuf; } -static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int flag, int postprocess_flag) +static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int flag, + int postprocess_flag, int cache_flag) { ImBuf *ibuf= NULL; int framenr= user->framenr, need_postprocess= 0; @@ -664,7 +665,7 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u ibuf= movieclip_load_movie_file(clip, user, framenr, flag); } - if(ibuf) + if(ibuf && (cache_flag & MOVIECLIP_CACHE_SKIP) == 0) put_imbuf_cache(clip, user, ibuf, flag); } @@ -687,17 +688,17 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u ImBuf *BKE_movieclip_get_ibuf(MovieClip *clip, MovieClipUser *user) { - return BKE_movieclip_get_ibuf_flag(clip, user, clip->flag); + return BKE_movieclip_get_ibuf_flag(clip, user, clip->flag, 0); } -ImBuf *BKE_movieclip_get_ibuf_flag(MovieClip *clip, MovieClipUser *user, int flag) +ImBuf *BKE_movieclip_get_ibuf_flag(MovieClip *clip, MovieClipUser *user, int flag, int cache_flag) { - return movieclip_get_postprocessed_ibuf(clip, user, flag, 0); + return movieclip_get_postprocessed_ibuf(clip, user, flag, 0, cache_flag); } ImBuf *BKE_movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int postprocess_flag) { - return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag); + return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag, 0); } static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr) @@ -1021,7 +1022,7 @@ void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct Movi user.render_flag= 0; user.render_size= MCLIP_PROXY_RENDER_SIZE_FULL; - ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag); + ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag, MOVIECLIP_CACHE_SKIP); if(ibuf) { ImBuf *tmpibuf= ibuf; diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 9bff5e3003d..e6032a50854 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -1226,7 +1226,7 @@ static ImBuf *get_frame_ibuf(MovieTrackingContext *context, int framenr) user.framenr= framenr; - ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &user, context->clip_flag); + ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &user, context->clip_flag, MOVIECLIP_CACHE_SKIP); return ibuf; } @@ -1330,7 +1330,7 @@ int BKE_tracking_next(MovieTrackingContext *context) if(context->backwards) context->user.framenr--; else context->user.framenr++; - ibuf_new= BKE_movieclip_get_ibuf_flag(context->clip, &context->user, context->clip_flag); + ibuf_new= BKE_movieclip_get_ibuf_flag(context->clip, &context->user, context->clip_flag, MOVIECLIP_CACHE_SKIP); if(!ibuf_new) return 0; |