Fix for [#34182] Movie Distortion and Bilateral Blur doesn't work together

* added area of interest based on a radius around the input tile.
If someone can implement a correct formula (based on K1, K2 and K3) and send it to me, I will be happy to apply it!

 - At Mind -
This commit is contained in:
Jeroen Bakker
2013-02-16 21:21:04 +00:00
parent 9cd01c6a5c
commit 772a3b1e1e
2 changed files with 15 additions and 0 deletions

View File

@@ -112,3 +112,16 @@ void MovieDistortionOperation::executePixel(float output[4], float x, float y, P
this->m_inputOperation->read(output, x, y, COM_PS_BILINEAR);
}
}
bool MovieDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
const int marginX = this->m_width*0.15;
const int marginY = this->m_height*0.15;
rcti newInput;
newInput.xmin = input->xmin - marginX;
newInput.ymin = input->ymin - marginY;
newInput.xmax = input->xmax + marginX;
newInput.ymax = input->ymax + marginY;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}

View File

@@ -162,6 +162,8 @@ public:
void setMovieClip(MovieClip *clip) { this->m_movieClip = clip; }
void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
};
void deintializeDistortionCache(void);