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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user