diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-01-28 03:59:42 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-01-28 03:59:42 +0300 |
commit | 53b83262c5ee5a2e71c23a3702cef8eef604f94b (patch) | |
tree | c6b546ff25924aae6ceb9430ad41de15d5e67888 /source/blender/blenkernel/intern | |
parent | b445467f15f32597df536039737cbb1aeca3b707 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/seqcache.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c index 122e186bcd7..78cd4bb51fe 100644 --- a/source/blender/blenkernel/intern/seqcache.c +++ b/source/blender/blenkernel/intern/seqcache.c @@ -232,8 +232,9 @@ void seq_stripelem_cache_put( 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); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 9ffc04c5191..973f14d690c 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1705,13 +1705,13 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, 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)); } } |