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:
authorPeter Schlaile <peter@schlaile.de>2010-11-21 23:00:31 +0300
committerPeter Schlaile <peter@schlaile.de>2010-11-21 23:00:31 +0300
commita0517e63381822651d6dc1582bdddebb141ef936 (patch)
treee02dc79865ffc5f5a7d69f0bb9bd255e76f9a7c4 /source/blender/blenkernel/intern/seqcache.c
parenta2dc1fe4b0d011dba00ae685a59985a69d50d736 (diff)
== Sequencer ==
* documented and rewrote the render interface of the sequencer. (now, the geometry / render_type / etc. settings are stored within a seperate structure called SeqRenderData that is passed within the code.) * that fixes * cache problems, since the caching system didn't keep track of proxy files vs. final renders. * is a necessary step, to bring back frame blending in speed effect (the SeqRenderData structure elements are already there) * will make motion blur render options available within the sequencer! * this patch also fixes: * "easy retiming" using speed effects. (in Blender 2.49, you could add a speed effect and resize the source track to retime it to that length) * adds labels for the Original dimensions for Image + Movie tracks (worked in 2.49, too)
Diffstat (limited to 'source/blender/blenkernel/intern/seqcache.c')
-rw-r--r--source/blender/blenkernel/intern/seqcache.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c
index 487ec78b2bd..73351edbdd5 100644
--- a/source/blender/blenkernel/intern/seqcache.c
+++ b/source/blender/blenkernel/intern/seqcache.c
@@ -42,8 +42,7 @@
typedef struct seqCacheKey
{
struct Sequence * seq;
- int rectx;
- int recty;
+ SeqRenderData context;
float cfra;
seq_stripelem_ibuf_t type;
} seqCacheKey;
@@ -64,7 +63,7 @@ static int ibufs_rem = 0;
static unsigned int HashHash(void *key_)
{
seqCacheKey * key = (seqCacheKey*) key_;
- unsigned int rval = key->rectx + key->recty;
+ unsigned int rval = seq_hash_render_data(&key->context);
rval ^= *(unsigned int*) &key->cfra;
rval += key->type;
@@ -99,21 +98,7 @@ static int HashCmp(void *a_, void *b_)
return 1;
}
- if (a->rectx < b->rectx) {
- return -1;
- }
- if (a->rectx > b->rectx) {
- return 1;
- }
-
- if (a->recty < b->recty) {
- return -1;
- }
- if (a->recty > b->recty) {
- return 1;
- }
-
- return 0;
+ return seq_cmp_render_data(&a->context, &b->context);
}
static void HashKeyFree(void *key)
@@ -192,7 +177,7 @@ void seq_stripelem_cache_cleanup()
}
struct ImBuf * seq_stripelem_cache_get(
- struct Sequence * seq, int rectx, int recty,
+ SeqRenderData context, struct Sequence * seq,
float cfra, seq_stripelem_ibuf_t type)
{
seqCacheKey key;
@@ -207,8 +192,7 @@ struct ImBuf * seq_stripelem_cache_get(
}
key.seq = seq;
- key.rectx = rectx;
- key.recty = recty;
+ key.context = context;
key.cfra = cfra - seq->start;
key.type = type;
@@ -224,7 +208,7 @@ struct ImBuf * seq_stripelem_cache_get(
}
void seq_stripelem_cache_put(
- struct Sequence * seq, int rectx, int recty,
+ SeqRenderData context, struct Sequence * seq,
float cfra, seq_stripelem_ibuf_t type, struct ImBuf * i)
{
seqCacheKey * key;
@@ -243,8 +227,7 @@ void seq_stripelem_cache_put(
key = (seqCacheKey*) BLI_mempool_alloc(keypool);
key->seq = seq;
- key->rectx = rectx;
- key->recty = recty;
+ key->context = context;
key->cfra = cfra - seq->start;
key->type = type;