[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34540] trunk/blender/source/blender/ blenkernel/intern: Fix for [#25713] VSE shows and renders wrong straight alpha gradient even after convert to premul is checked
Janne Karhu
jhkarh at gmail.com
Fri Jan 28 01:59:42 CET 2011
Revision: 34540
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34540
Author: jhk
Date: 2011-01-28 00:59:42 +0000 (Fri, 28 Jan 2011)
Log Message:
-----------
Fix for [#25713] VSE shows and renders wrong straight alpha gradient even after convert to premul is checked
* Caching of the start and end stills were just referencing the original imbuf (which got premultiplied after the caching), so as a result most of the time the premul was applied twice.
* Now the start and end stills are stored in the cache as duplicates of the original (non modified) imbuf.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/seqcache.c
trunk/blender/source/blender/blenkernel/intern/sequencer.c
Modified: trunk/blender/source/blender/blenkernel/intern/seqcache.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/seqcache.c 2011-01-28 00:52:31 UTC (rev 34539)
+++ trunk/blender/source/blender/blenkernel/intern/seqcache.c 2011-01-28 00:59:42 UTC (rev 34540)
@@ -232,8 +232,9 @@
key->cfra = cfra - seq->start;
key->type = type;
- /* we want our own version */
- IMB_refImBuf(i);
+ /* Normally we want our own version, but start and end stills are duplicates of the original. */
+ if(ELEM(type, SEQ_STRIPELEM_IBUF_STARTSTILL, SEQ_STRIPELEM_IBUF_ENDSTILL)==0)
+ IMB_refImBuf(i);
e = (seqCacheEntry*) BLI_mempool_alloc(entrypool);
Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c 2011-01-28 00:52:31 UTC (rev 34539)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c 2011-01-28 00:59:42 UTC (rev 34540)
@@ -1705,13 +1705,13 @@
if (nr == 0) {
seq_stripelem_cache_put(
context, seq, seq->start,
- SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf);
+ SEQ_STRIPELEM_IBUF_STARTSTILL, IMB_dupImBuf(ibuf));
}
if (nr == seq->len - 1) {
seq_stripelem_cache_put(
context, seq, seq->start,
- SEQ_STRIPELEM_IBUF_ENDSTILL, ibuf);
+ SEQ_STRIPELEM_IBUF_ENDSTILL, IMB_dupImBuf(ibuf));
}
}
More information about the Bf-blender-cvs
mailing list