Resolve issues with color balance not updating properly in sequencer
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Aug 2012 18:38:01 +0000 (18:38 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Aug 2012 18:38:01 +0000 (18:38 +0000)
when float images are used.

source/blender/blenkernel/intern/sequencer.c

index cee8a4d..0432e7a 100644 (file)
@@ -1640,6 +1640,13 @@ static void color_balance(SeqRenderData context, Sequence *seq, ImBuf *ibuf, flo
        IMB_processor_apply_threaded(ibuf->y, sizeof(ColorBalanceThread), &init_data,
                                  color_balance_init_handle, color_balance_do_thread);
 
+       /* color balance either happens on float buffer or byte buffer, but never on both,
+        * free byte buffer if there's float buffer since float buffer would be used for
+        * color balance in favor of byte buffer
+        */
+       if (ibuf->rect_float && ibuf->rect)
+               imb_freerectImBuf(ibuf);
+
        if (init_data.mask)
                IMB_freeImBuf(init_data.mask);
 }