diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingOperation.cpp | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp index ae2913350f9..e92e5c84c2d 100644 --- a/source/blender/compositor/operations/COM_KeyingOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp @@ -60,28 +60,28 @@ KeyingOperation::KeyingOperation() : NodeOperation() this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_VALUE); - this->screenBalance = 0.5f; + this->m_screenBalance = 0.5f; - this->pixelReader = NULL; - this->screenReader = NULL; - this->garbageReader = NULL; - this->coreReader = NULL; + this->m_pixelReader = NULL; + this->m_screenReader = NULL; + this->m_garbageReader = NULL; + this->m_coreReader = NULL; } void KeyingOperation::initExecution() { - this->pixelReader = this->getInputSocketReader(0); - this->screenReader = this->getInputSocketReader(1); - this->garbageReader = this->getInputSocketReader(2); - this->coreReader = this->getInputSocketReader(3); + this->m_pixelReader = this->getInputSocketReader(0); + this->m_screenReader = this->getInputSocketReader(1); + this->m_garbageReader = this->getInputSocketReader(2); + this->m_coreReader = this->getInputSocketReader(3); } void KeyingOperation::deinitExecution() { - this->pixelReader = NULL; - this->screenReader = NULL; - this->garbageReader = NULL; - this->coreReader = NULL; + this->m_pixelReader = NULL; + this->m_screenReader = NULL; + this->m_garbageReader = NULL; + this->m_coreReader = NULL; } void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) @@ -91,10 +91,10 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler float garbageValue[4]; float coreValue[4]; - this->pixelReader->read(pixelColor, x, y, sampler, inputBuffers); - this->screenReader->read(screenColor, x, y, sampler, inputBuffers); - this->garbageReader->read(garbageValue, x, y, sampler, inputBuffers); - this->coreReader->read(coreValue, x, y, sampler, inputBuffers); + this->m_pixelReader->read(pixelColor, x, y, sampler, inputBuffers); + this->m_screenReader->read(screenColor, x, y, sampler, inputBuffers); + this->m_garbageReader->read(garbageValue, x, y, sampler, inputBuffers); + this->m_coreReader->read(coreValue, x, y, sampler, inputBuffers); int primary_channel = get_pixel_primary_channel(screenColor); @@ -107,8 +107,8 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler color[0] = 1.0f; } else { - float saturation = get_pixel_saturation(pixelColor, this->screenBalance, primary_channel); - float screen_saturation = get_pixel_saturation(screenColor, this->screenBalance, primary_channel); + float saturation = get_pixel_saturation(pixelColor, this->m_screenBalance, primary_channel); + float screen_saturation = get_pixel_saturation(screenColor, this->m_screenBalance, primary_channel); if (saturation < 0) { /* means main channel of pixel is different from screen, @@ -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); -} |