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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-09-04 15:46:17 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-09-08 12:51:19 +0300
commita8bd08ffdd743cdf7b43453bcb4c0b4660864904 (patch)
tree805218d13e5b662c6f1a13a134c3f55c7a7865a0
parente91f9f664d08508faae22b5bbcd52022f1f5ff98 (diff)
Fix T52522: VSE renders with alpha transparent PNG image incorrectly
Need some extra checks and should be probably end up in 2.79 since that's a regression.
-rw-r--r--source/blender/blenkernel/intern/sequencer.c3
-rw-r--r--source/blender/imbuf/intern/colormanagement.c17
2 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 861dc7b7cf5..8e36abd3ca6 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -480,9 +480,12 @@ void BKE_sequencer_editing_free(Scene *scene)
static void sequencer_imbuf_assign_spaces(Scene *scene, ImBuf *ibuf)
{
+#if 0
+ /* Bute buffer is supposed to be in sequencer working space already. */
if (ibuf->rect != NULL) {
IMB_colormanagement_assign_rect_colorspace(ibuf, scene->sequencer_colorspace_settings.name);
}
+#endif
if (ibuf->rect_float != NULL) {
IMB_colormanagement_assign_float_colorspace(ibuf, scene->sequencer_colorspace_settings.name);
}
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 1f3be8d73bb..f510ded6b60 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -47,6 +47,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_filetype.h"
+#include "IMB_filter.h"
#include "IMB_moviecache.h"
#include "MEM_guardedalloc.h"
@@ -1635,12 +1636,13 @@ static void *do_processor_transform_thread(void *handle_v)
if (float_from_byte) {
IMB_buffer_float_from_byte(float_buffer, byte_buffer,
IB_PROFILE_SRGB, IB_PROFILE_SRGB,
- true,
+ false,
width, height, width, width);
- IMB_colormanagement_processor_apply(handle->cm_processor,
- float_buffer,
- width, height, channels,
- predivide);
+ IMB_colormanagement_processor_apply(handle->cm_processor,
+ float_buffer,
+ width, height, channels,
+ predivide);
+ IMB_premultiply_rect_float(float_buffer, 4, width, height);
}
else {
if (byte_buffer != NULL) {
@@ -1776,14 +1778,15 @@ void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer, unsig
*/
IMB_buffer_float_from_byte(float_buffer, byte_buffer,
IB_PROFILE_SRGB, IB_PROFILE_SRGB,
- true,
+ false,
width, height, width, width);
+ IMB_premultiply_rect_float(float_buffer, 4, width, height);
return;
}
cm_processor = IMB_colormanagement_colorspace_processor_new(from_colorspace, to_colorspace);
processor_transform_apply_threaded(byte_buffer, float_buffer,
width, height, channels,
- cm_processor, true, true);
+ cm_processor, false, true);
IMB_colormanagement_processor_free(cm_processor);
}