Commit: 389b4feec16e8fba071fd890eef107ce207a76ff
Author: Sergey Sharybin
Date:   Wed Aug 24 11:20:13 2016 +0200
Branches: master
https://developer.blender.org/rB389b4feec16e8fba071fd890eef107ce207a76ff

Fix T49128: Ghost of Previous Mask appears in Double Edge Mask

Patch by Ted Schundler (tschundler), thanks!

Differential Revision: https://developer.blender.org/D2163

===================================================================

M       source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp

===================================================================

diff --git 
a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp 
b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index 76afedf..ca3c5f7 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -20,6 +20,8 @@
  *             Monique Dewanchand
  */
 
+#include <stdlib.h>
+
 #include "COM_DoubleEdgeMaskOperation.h"
 #include "BLI_math.h"
 #include "DNA_node_types.h"
@@ -1151,12 +1153,13 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float 
*imask, float *omask, float
        
        if (true) {                    // if both input sockets have some data 
coming in...
                
-               t = (this->getWidth() * this->getHeight()) - 1;                 
               // determine size of the frame
+               rw = this->getWidth();                   // width of a row of 
pixels
+               t = (rw * this->getHeight()) - 1;        // determine size of 
the frame
+               memset(res, 0, sizeof(float) * (t + 1)); // clear output buffer 
(not all pixels will be written later)
                
                lres = (unsigned int *)res;      // unsigned int pointer to 
output buffer (for bit level ops)
                limask = (unsigned int *)imask;   // unsigned int pointer to 
input mask (for bit level ops)
                lomask = (unsigned int *)omask;   // unsigned int pointer to 
output mask (for bit level ops)
-               rw = this->getWidth();                   // width of a row of 
pixels
                
                
                /*

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to