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>2012-06-24 14:31:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-24 14:31:48 +0400
commitd71d41755efa526b55f1196618e4dc0f03988d07 (patch)
tree5f80bcb46d5e7ce1c614976bfd362f6ecf81a7ff /source/blender
parent49a9d8d4ae7a4b024e054e2880306cd3e4cfd956 (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.h2
4 files changed, 8 insertions, 22 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
index 9c7a33c1327..fd80b6b5ccf 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
@@ -79,10 +79,10 @@ bool KeyingBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
{
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);
}
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
index 2c9949f2b4b..1d7ae1372b0 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
@@ -114,10 +114,10 @@ bool KeyingClipOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
{
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);
}
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index ae2913350f9..d5d477a5385 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -136,15 +136,3 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
/* 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);
-}
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.h b/source/blender/compositor/operations/COM_KeyingOperation.h
index 8d0e7851ee5..6e8ada927bd 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingOperation.h
@@ -52,8 +52,6 @@ public:
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