Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2019-04-29 00:13:41 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-04-29 00:50:48 +0300
commit337cac760ba9d198fc45459f4274a94a87558528 (patch)
treed9f1c3cb901547ef4434c38c2a390795d0fff8f1 /source/blender/blenkernel/BKE_sequencer.h
parent1b65ec0a9b9be2aef7db88be3c6deaaa135ab382 (diff)
VSE: Cache rewrite
This patch implements new cache system. Aim is to give user more control over cache, so it can be maximally utilized. This is done through sequencer timeline side panel in category proxy & cache. Cached images are also visualized in timeline, controled by sequencer timeline view->cache menu Functional changes: - NOT use IMB_moviecache API - refactor names of cached image types - each scene owns 1 sequencer cache - merge preprocess cache into per-sequencer cache - cache links images rendered per frame in order as they are created - add cache content visualization tool - add RNA properties to control the cache More info can be found in design notes in blenkernel/intern/seqcache.c and in https://developer.blender.org/D4443 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4443
Diffstat (limited to 'source/blender/blenkernel/BKE_sequencer.h')
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h53
1 files changed, 20 insertions, 33 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 820f28fb363..5485b2d3619 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -302,46 +302,33 @@ void BKE_sequencer_proxy_set(struct Sequence *seq, bool value);
* Sequencer memory cache management functions
* ********************************************************************** */
-typedef enum {
- SEQ_STRIPELEM_IBUF,
- SEQ_STRIPELEM_IBUF_COMP,
- SEQ_STRIPELEM_IBUF_STARTSTILL,
- SEQ_STRIPELEM_IBUF_ENDSTILL,
-} eSeqStripElemIBuf;
+#define SEQ_CACHE_COST_MAX 10.0f
-void BKE_sequencer_cache_destruct(void);
-void BKE_sequencer_cache_cleanup(void);
-
-/* returned ImBuf is properly refed and has to be freed */
struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context,
struct Sequence *seq,
float cfra,
- eSeqStripElemIBuf type);
-
-/* passed ImBuf is properly refed, so ownership is *not*
- * transferred to the cache.
- * you can pass the same ImBuf multiple times to the cache without problems.
- */
-
+ int type);
void BKE_sequencer_cache_put(const SeqRenderData *context,
struct Sequence *seq,
float cfra,
- eSeqStripElemIBuf type,
- struct ImBuf *nval);
-
-void BKE_sequencer_cache_cleanup_sequence(struct Sequence *seq);
-
-struct ImBuf *BKE_sequencer_preprocessed_cache_get(const SeqRenderData *context,
- struct Sequence *seq,
- float cfra,
- eSeqStripElemIBuf type);
-void BKE_sequencer_preprocessed_cache_put(const SeqRenderData *context,
- struct Sequence *seq,
- float cfra,
- eSeqStripElemIBuf type,
- struct ImBuf *ibuf);
-void BKE_sequencer_preprocessed_cache_cleanup(void);
-void BKE_sequencer_preprocessed_cache_cleanup_sequence(struct Sequence *seq);
+ int type,
+ struct ImBuf *nval,
+ float cost);
+bool BKE_sequencer_cache_put_if_possible(const SeqRenderData *context,
+ struct Sequence *seq,
+ float cfra,
+ int type,
+ struct ImBuf *nval,
+ float cost);
+void BKE_sequencer_cache_free_temp_cache(struct Scene *scene, short id, int cfra);
+void BKE_sequencer_cache_destruct(struct Scene *scene);
+void BKE_sequencer_cache_cleanup_all(struct Main *bmain);
+void BKE_sequencer_cache_cleanup(struct Scene *scene);
+void BKE_sequencer_cache_cleanup_sequence(struct Scene *scene, struct Sequence *seq);
+void BKE_sequencer_cache_iterate(
+ struct Scene *scene,
+ void *userdata,
+ bool callback(void *userdata, struct Sequence *seq, int cfra, int cache_type, float cost));
/* **********************************************************************
* seqeffects.c