Revision: 48232
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48232
Author:   nazgul
Date:     2012-06-24 10:31:48 +0000 (Sun, 24 Jun 2012)
Log Message:
-----------
Fixes for area of interest in keying nodes: no need to wait for the whole
input image to be calculated in some cases, use only actual area which is
needed to calculate current tile.

Seems to be giving some % of speedup. Verified result of keying before
this patch and after this patch and they were identical, so hopefully
now area of interest is indeed correct.

Modified Paths:
--------------
    
trunk/blender/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.h

Modified: 
trunk/blender/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp  
    2012-06-24 10:29:26 UTC (rev 48231)
+++ 
trunk/blender/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp  
    2012-06-24 10:31:48 UTC (rev 48232)
@@ -79,10 +79,10 @@
 {
        rcti newInput;
 
-       newInput.xmin = 0;
-       newInput.ymin = 0;
-       newInput.xmax = this->getWidth();
-       newInput.ymax = this->getHeight();
+       newInput.xmin = input->xmin - this->size;
+       newInput.ymin = input->ymin - this->size;
+       newInput.xmax = input->xmax + this->size;
+       newInput.ymax = input->ymax + this->size;
 
        return NodeOperation::determineDependingAreaOfInterest(&newInput, 
readOperation, output);
 }

Modified: 
trunk/blender/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_KeyingClipOperation.cpp  
    2012-06-24 10:29:26 UTC (rev 48231)
+++ 
trunk/blender/source/blender/compositor/operations/COM_KeyingClipOperation.cpp  
    2012-06-24 10:31:48 UTC (rev 48232)
@@ -114,10 +114,10 @@
 {
        rcti newInput;
 
-       newInput.xmin = 0;
-       newInput.ymin = 0;
-       newInput.xmax = this->getWidth();
-       newInput.ymax = this->getHeight();
+       newInput.xmin = input->xmin - this->kernelRadius;
+       newInput.ymin = input->ymin - this->kernelRadius;
+       newInput.xmax = input->xmax + this->kernelRadius;
+       newInput.ymax = input->ymax + this->kernelRadius;
 
        return NodeOperation::determineDependingAreaOfInterest(&newInput, 
readOperation, output);
 }

Modified: 
trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.cpp  
2012-06-24 10:29:26 UTC (rev 48231)
+++ trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.cpp  
2012-06-24 10:31:48 UTC (rev 48232)
@@ -136,15 +136,3 @@
        /* apply core matte */
        color[0] = MAX2(color[0], coreValue[0]);
 }
-
-bool KeyingOperation::determineDependingAreaOfInterest(rcti *input, 
ReadBufferOperation *readOperation, rcti *output)
-{
-       rcti newInput;
-
-       newInput.xmin = 0;
-       newInput.ymin = 0;
-       newInput.xmax = this->getWidth();
-       newInput.ymax = this->getHeight();
-
-       return NodeOperation::determineDependingAreaOfInterest(&newInput, 
readOperation, output);
-}

Modified: 
trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.h    
2012-06-24 10:29:26 UTC (rev 48231)
+++ trunk/blender/source/blender/compositor/operations/COM_KeyingOperation.h    
2012-06-24 10:31:48 UTC (rev 48232)
@@ -52,8 +52,6 @@
        void setScreenBalance(float value) {this->screenBalance = value;}
 
        void executePixel(float *color, float x, float y, PixelSampler sampler, 
MemoryBuffer *inputBuffers[]);
-
-       bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation 
*readOperation, rcti *output);
 };
 
 #endif

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

Reply via email to