diff options
Diffstat (limited to 'source/blender')
147 files changed, 552 insertions, 552 deletions
diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h index b7aae8b92f0..2eaeb664c67 100644 --- a/source/blender/compositor/intern/COM_SocketReader.h +++ b/source/blender/compositor/intern/COM_SocketReader.h @@ -63,7 +63,7 @@ protected: * @param y the y-coordinate of the pixel to calculate in image space * @param inputBuffers chunks that can be read by their ReadBufferOperation. */ - virtual void executePixel(float output[4], float x, float y, PixelSampler sampler) {} + virtual void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) {} /** * @brief calculate a single pixel @@ -75,7 +75,7 @@ protected: * @param chunkData chunk specific data a during execution time. */ virtual void executePixel(float output[4], int x, int y, void *chunkData) { - executePixel(output, x, y, COM_PS_NEAREST); + executePixelSampled(output, x, y, COM_PS_NEAREST); } /** @@ -88,17 +88,17 @@ protected: * @param dy * @param inputBuffers chunks that can be read by their ReadBufferOperation. */ - virtual void executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler) {} + virtual void executePixelFiltered(float output[4], float x, float y, float dx, float dy, PixelSampler sampler) {} public: - inline void read(float result[4], float x, float y, PixelSampler sampler) { - executePixel(result, x, y, sampler); + inline void readSampled(float result[4], float x, float y, PixelSampler sampler) { + executePixelSampled(result, x, y, sampler); } inline void read(float result[4], int x, int y, void *chunkData) { executePixel(result, x, y, chunkData); } - inline void read(float result[4], float x, float y, float dx, float dy, PixelSampler sampler) { - executePixel(result, x, y, dx, dy, sampler); + inline void readFiltered(float result[4], float x, float y, float dx, float dy, PixelSampler sampler) { + executePixelFiltered(result, x, y, dx, dy, sampler); } virtual void *initializeTileData(rcti *rect) { return 0; } diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp index 6cc9aae4553..d4103a61685 100644 --- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp +++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp @@ -27,15 +27,15 @@ AlphaOverKeyOperation::AlphaOverKeyOperation() : MixBaseOperation() /* pass */ } -void AlphaOverKeyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void AlphaOverKeyOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputOverColor[4]; float value[4]; - this->m_inputValueOperation->read(value, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputOverColor, x, y, sampler); + this->m_inputValueOperation->readSampled(value, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputOverColor, x, y, sampler); if (inputOverColor[3] <= 0.0f) { copy_v4_v4(output, inputColor1); diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h index 31b0422918a..eceee43e600 100644 --- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h +++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h @@ -39,6 +39,6 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp index 111dc899e1d..1dba542e142 100644 --- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp +++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp @@ -27,15 +27,15 @@ AlphaOverMixedOperation::AlphaOverMixedOperation() : MixBaseOperation() this->m_x = 0.0f; } -void AlphaOverMixedOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void AlphaOverMixedOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputOverColor[4]; float value[4]; - this->m_inputValueOperation->read(value, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputOverColor, x, y, sampler); + this->m_inputValueOperation->readSampled(value, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputOverColor, x, y, sampler); if (inputOverColor[3] <= 0.0f) { copy_v4_v4(output, inputColor1); diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h index 14e7325ec1d..ff6d1a978b8 100644 --- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h +++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h @@ -41,7 +41,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void setX(float x) { this->m_x = x; } }; diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp index ac7906f2f98..60a2fd6a442 100644 --- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp +++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp @@ -27,15 +27,15 @@ AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() : MixBaseOperatio /* pass */ } -void AlphaOverPremultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void AlphaOverPremultiplyOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputOverColor[4]; float value[4]; - this->m_inputValueOperation->read(value, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputOverColor, x, y, sampler); + this->m_inputValueOperation->readSampled(value, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputOverColor, x, y, sampler); /* Zero alpha values should still permit an add of RGB data */ if (inputOverColor[3] < 0.0f) { diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h index 16bd2aeaeed..db68583baa6 100644 --- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h +++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h @@ -39,7 +39,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp index cc91210a385..dfff2bfeafb 100644 --- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp @@ -152,7 +152,7 @@ void BlurBaseOperation::updateSize() { if (!this->m_sizeavailable) { float result[4]; - this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST); + this->getInputSocketReader(1)->readSampled(result, 0, 0, COM_PS_NEAREST); this->m_size = result[0]; this->m_sizeavailable = true; } diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp index 1c91af2a7a3..7f17db1d31b 100644 --- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp @@ -80,7 +80,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data) float tempBoundingBox[4]; float bokeh[4]; - this->m_inputBoundingBoxReader->read(tempBoundingBox, x, y, COM_PS_NEAREST); + this->m_inputBoundingBoxReader->readSampled(tempBoundingBox, x, y, COM_PS_NEAREST); if (tempBoundingBox[0] > 0.0f) { float multiplier_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f}; MemoryBuffer *inputBuffer = (MemoryBuffer *)data; @@ -93,7 +93,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data) zero_v4(color_accum); if (pixelSize < 2) { - this->m_inputProgram->read(color_accum, x, y, COM_PS_NEAREST); + this->m_inputProgram->readSampled(color_accum, x, y, COM_PS_NEAREST); multiplier_accum[0] = 1.0f; multiplier_accum[1] = 1.0f; multiplier_accum[2] = 1.0f; @@ -118,7 +118,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data) for (int nx = minx; nx < maxx; nx += step) { float u = this->m_bokehMidX - (nx - x) * m; float v = this->m_bokehMidY - (ny - y) * m; - this->m_inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST); + this->m_inputBokehProgram->readSampled(bokeh, u, v, COM_PS_NEAREST); madd_v4_v4v4(color_accum, bokeh, &buffer[bufferindex]); add_v4_v4(multiplier_accum, bokeh); bufferindex += offsetadd; @@ -130,7 +130,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data) output[3] = color_accum[3] * (1.0f / multiplier_accum[3]); } else { - this->m_inputProgram->read(output, x, y, COM_PS_NEAREST); + this->m_inputProgram->readSampled(output, x, y, COM_PS_NEAREST); } } @@ -220,7 +220,7 @@ void BokehBlurOperation::updateSize() { if (!this->m_sizeavailable) { float result[4]; - this->getInputSocketReader(3)->read(result, 0, 0, COM_PS_NEAREST); + this->getInputSocketReader(3)->readSampled(result, 0, 0, COM_PS_NEAREST); this->m_size = result[0]; CLAMP(this->m_size, 0.0f, 10.0f); this->m_sizeavailable = true; diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp index b87be33eca1..82de750de72 100644 --- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp +++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp @@ -85,7 +85,7 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y) } return insideBokeh; } -void BokehImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void BokehImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float shift = this->m_data->lensshift; float shift2 = shift / 2.0f; diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h index 44c4c0cfe27..f1f0f1ed11c 100644 --- a/source/blender/compositor/operations/COM_BokehImageOperation.h +++ b/source/blender/compositor/operations/COM_BokehImageOperation.h @@ -111,7 +111,7 @@ public: /** * @brief the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * @brief Initialize the execution diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp index 52f84462761..4dd92aec4c8 100644 --- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp @@ -44,7 +44,7 @@ void BoxMaskOperation::initExecution() this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight(); } -void BoxMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void BoxMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputMask[4]; float inputValue[4]; @@ -57,8 +57,8 @@ void BoxMaskOperation::executePixel(float output[4], float x, float y, PixelSamp rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy); ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy); - this->m_inputMask->read(inputMask, x, y, sampler); - this->m_inputValue->read(inputValue, x, y, sampler); + this->m_inputMask->readSampled(inputMask, x, y, sampler); + this->m_inputValue->readSampled(inputValue, x, y, sampler); float halfHeight = this->m_data->height / 2.0f; float halfWidth = this->m_data->width / 2.0f; diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.h b/source/blender/compositor/operations/COM_BoxMaskOperation.h index f39d74829d4..04dc8a90fd7 100644 --- a/source/blender/compositor/operations/COM_BoxMaskOperation.h +++ b/source/blender/compositor/operations/COM_BoxMaskOperation.h @@ -45,7 +45,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cpp b/source/blender/compositor/operations/COM_BrightnessOperation.cpp index 0613540250c..33e35c3fe3b 100644 --- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp +++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp @@ -37,15 +37,15 @@ void BrightnessOperation::initExecution() this->m_inputContrastProgram = this->getInputSocketReader(2); } -void BrightnessOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void BrightnessOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float a, b; float inputBrightness[4]; float inputContrast[4]; - this->m_inputProgram->read(inputValue, x, y, sampler); - this->m_inputBrightnessProgram->read(inputBrightness, x, y, sampler); - this->m_inputContrastProgram->read(inputContrast, x, y, sampler); + this->m_inputProgram->readSampled(inputValue, x, y, sampler); + this->m_inputBrightnessProgram->readSampled(inputBrightness, x, y, sampler); + this->m_inputContrastProgram->readSampled(inputContrast, x, y, sampler); float brightness = inputBrightness[0]; float contrast = inputContrast[0]; brightness /= 100.0f; diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.h b/source/blender/compositor/operations/COM_BrightnessOperation.h index 1c8eda63e94..22086ae11e8 100644 --- a/source/blender/compositor/operations/COM_BrightnessOperation.h +++ b/source/blender/compositor/operations/COM_BrightnessOperation.h @@ -40,7 +40,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp index e6e93774685..964f1d64667 100644 --- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp +++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp @@ -39,11 +39,11 @@ void ChangeHSVOperation::deinitExecution() this->m_inputOperation = NULL; } -void ChangeHSVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ChangeHSVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; - this->m_inputOperation->read(inputColor1, x, y, sampler); + this->m_inputOperation->readSampled(inputColor1, x, y, sampler); output[0] = inputColor1[0] + (this->m_hue - 0.5f); if (output[0] > 1.0f) output[0] -= 1.0f; diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.h b/source/blender/compositor/operations/COM_ChangeHSVOperation.h index 01852084e41..76025e86b7a 100644 --- a/source/blender/compositor/operations/COM_ChangeHSVOperation.h +++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.h @@ -49,7 +49,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void setHue(float hue) { this->m_hue = hue; } void setSaturation(float saturation) { this->m_saturation = saturation; } diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp index 84cc8aad950..14494841c49 100644 --- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp @@ -88,7 +88,7 @@ void ChannelMatteOperation::deinitExecution() this->m_inputImageProgram = NULL; } -void ChannelMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ChannelMatteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inColor[4]; float alpha; @@ -97,7 +97,7 @@ void ChannelMatteOperation::executePixel(float output[4], float x, float y, Pixe const float limit_min = this->m_limit_min; const float limit_range = this->m_limit_range; - this->m_inputImageProgram->read(inColor, x, y, sampler); + this->m_inputImageProgram->readSampled(inColor, x, y, sampler); /* matte operation */ alpha = inColor[this->m_ids[0]] - max(inColor[this->m_ids[1]], inColor[this->m_ids[2]]); diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h index efb4f7427ca..58b467e7892 100644 --- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h +++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h @@ -59,7 +59,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp index c2406abaa65..3329093882d 100644 --- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp @@ -44,7 +44,7 @@ void ChromaMatteOperation::deinitExecution() this->m_inputKeyProgram = NULL; } -void ChromaMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ChromaMatteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inKey[4]; float inImage[4]; @@ -57,8 +57,8 @@ void ChromaMatteOperation::executePixel(float output[4], float x, float y, Pixel float theta, beta; float kfg; - this->m_inputKeyProgram->read(inKey, x, y, sampler); - this->m_inputImageProgram->read(inImage, x, y, sampler); + this->m_inputKeyProgram->readSampled(inKey, x, y, sampler); + this->m_inputImageProgram->readSampled(inImage, x, y, sampler); /* store matte(alpha) value in [0] to go with * COM_SetAlphaOperation and the Value output diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.h b/source/blender/compositor/operations/COM_ChromaMatteOperation.h index 9557faec855..a68790838c0 100644 --- a/source/blender/compositor/operations/COM_ChromaMatteOperation.h +++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.h @@ -42,7 +42,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp index 1456aaf6a55..2846642570c 100644 --- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp @@ -49,13 +49,13 @@ void ColorBalanceASCCDLOperation::initExecution() this->m_inputColorOperation = this->getInputSocketReader(1); } -void ColorBalanceASCCDLOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorBalanceASCCDLOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; float value[4]; - this->m_inputValueOperation->read(value, x, y, sampler); - this->m_inputColorOperation->read(inputColor, x, y, sampler); + this->m_inputValueOperation->readSampled(value, x, y, sampler); + this->m_inputColorOperation->readSampled(inputColor, x, y, sampler); float fac = value[0]; fac = min(1.0f, fac); diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h index ee0b89f7f70..bf3495869b0 100644 --- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h +++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h @@ -49,7 +49,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp index 7e9c10df0a9..9588687372e 100644 --- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp @@ -54,13 +54,13 @@ void ColorBalanceLGGOperation::initExecution() this->m_inputColorOperation = this->getInputSocketReader(1); } -void ColorBalanceLGGOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorBalanceLGGOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; float value[4]; - this->m_inputValueOperation->read(value, x, y, sampler); - this->m_inputColorOperation->read(inputColor, x, y, sampler); + this->m_inputValueOperation->readSampled(value, x, y, sampler); + this->m_inputColorOperation->readSampled(inputColor, x, y, sampler); float fac = value[0]; fac = min(1.0f, fac); diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h index edc824475c2..da3a141e3c2 100644 --- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h +++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h @@ -50,7 +50,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp index b7a3f43237a..19209951005 100644 --- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp @@ -40,12 +40,12 @@ void ColorCorrectionOperation::initExecution() this->m_inputMask = this->getInputSocketReader(1); } -void ColorCorrectionOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorCorrectionOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputImageColor[4]; float inputMask[4]; - this->m_inputImage->read(inputImageColor, x, y, sampler); - this->m_inputMask->read(inputMask, x, y, sampler); + this->m_inputImage->readSampled(inputImageColor, x, y, sampler); + this->m_inputMask->readSampled(inputMask, x, y, sampler); float level = (inputImageColor[0] + inputImageColor[1] + inputImageColor[2]) / 3.0f; float contrast = this->m_data->master.contrast; diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h index 018e67b7ada..2b47d6a8034 100644 --- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h +++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h @@ -44,7 +44,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp index 2f13a90c072..1115b2ab239 100644 --- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp @@ -58,7 +58,7 @@ void ColorCurveOperation::initExecution() } -void ColorCurveOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorCurveOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { CurveMapping *cumap = this->m_curveMapping; @@ -70,15 +70,15 @@ void ColorCurveOperation::executePixel(float output[4], float x, float y, PixelS float white[4]; float bwmul[3]; - this->m_inputBlackProgram->read(black, x, y, sampler); - this->m_inputWhiteProgram->read(white, x, y, sampler); + this->m_inputBlackProgram->readSampled(black, x, y, sampler); + this->m_inputWhiteProgram->readSampled(white, x, y, sampler); /* get our own local bwmul value, * since we can't be threadsafe and use cumap->bwmul & friends */ curvemapping_set_black_white_ex(black, white, bwmul); - this->m_inputFacProgram->read(fac, x, y, sampler); - this->m_inputImageProgram->read(image, x, y, sampler); + this->m_inputFacProgram->readSampled(fac, x, y, sampler); + this->m_inputImageProgram->readSampled(image, x, y, sampler); if (*fac >= 1.0f) { curvemapping_evaluate_premulRGBF_ex(cumap, output, image, @@ -130,13 +130,13 @@ void ConstantLevelColorCurveOperation::initExecution() curvemapping_set_black_white(this->m_curveMapping, this->m_black, this->m_white); } -void ConstantLevelColorCurveOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConstantLevelColorCurveOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float fac[4]; float image[4]; - this->m_inputFacProgram->read(fac, x, y, sampler); - this->m_inputImageProgram->read(image, x, y, sampler); + this->m_inputFacProgram->readSampled(fac, x, y, sampler); + this->m_inputImageProgram->readSampled(image, x, y, sampler); if (*fac >= 1.0f) { curvemapping_evaluate_premulRGBF(this->m_curveMapping, output, image); diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.h b/source/blender/compositor/operations/COM_ColorCurveOperation.h index 7dc1913b85a..1eb77553953 100644 --- a/source/blender/compositor/operations/COM_ColorCurveOperation.h +++ b/source/blender/compositor/operations/COM_ColorCurveOperation.h @@ -41,7 +41,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution @@ -70,7 +70,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp index d73196e42f5..b928141f41d 100644 --- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp @@ -44,7 +44,7 @@ void ColorMatteOperation::deinitExecution() this->m_inputKeyProgram = NULL; } -void ColorMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorMatteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inColor[4]; float inKey[4]; @@ -55,8 +55,8 @@ void ColorMatteOperation::executePixel(float output[4], float x, float y, PixelS float h_wrap; - this->m_inputImageProgram->read(inColor, x, y, sampler); - this->m_inputKeyProgram->read(inKey, x, y, sampler); + this->m_inputImageProgram->readSampled(inColor, x, y, sampler); + this->m_inputKeyProgram->readSampled(inKey, x, y, sampler); /* store matte(alpha) value in [0] to go with diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.h b/source/blender/compositor/operations/COM_ColorMatteOperation.h index f065a5f7e89..53bbe8f6466 100644 --- a/source/blender/compositor/operations/COM_ColorMatteOperation.h +++ b/source/blender/compositor/operations/COM_ColorMatteOperation.h @@ -42,7 +42,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp index 1618c83aece..fd3380d594e 100644 --- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp @@ -43,11 +43,11 @@ void ColorRampOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void ColorRampOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorRampOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float values[4]; - this->m_inputProgram->read(values, x, y, sampler); + this->m_inputProgram->readSampled(values, x, y, sampler); do_colorband(this->m_colorBand, values[0], output); } diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.h b/source/blender/compositor/operations/COM_ColorRampOperation.h index 96d9a525e1e..333e6c36d97 100644 --- a/source/blender/compositor/operations/COM_ColorRampOperation.h +++ b/source/blender/compositor/operations/COM_ColorRampOperation.h @@ -38,7 +38,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp index a8e8cb98564..873ec72d9e9 100644 --- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp @@ -84,12 +84,12 @@ void ColorSpillOperation::deinitExecution() this->m_inputFacReader = NULL; } -void ColorSpillOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ColorSpillOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float fac[4]; float input[4]; - this->m_inputFacReader->read(fac, x, y, sampler); - this->m_inputImageReader->read(input, x, y, sampler); + this->m_inputFacReader->readSampled(fac, x, y, sampler); + this->m_inputImageReader->readSampled(input, x, y, sampler); float rfac = min(1.0f, fac[0]); float map = calculateMapValue(rfac, input); if (map > 0.0f) { diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.h b/source/blender/compositor/operations/COM_ColorSpillOperation.h index 94ff78c37b2..f9dc9ef7e25 100644 --- a/source/blender/compositor/operations/COM_ColorSpillOperation.h +++ b/source/blender/compositor/operations/COM_ColorSpillOperation.h @@ -46,7 +46,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index 383682b1474..3d4b771fecc 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -188,20 +188,20 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber) for (x = x1; x < x2 && (!breaked); x++) { int input_x = x + dx, input_y = y + dy; - this->m_imageInput->read(color, input_x, input_y, COM_PS_NEAREST); + this->m_imageInput->readSampled(color, input_x, input_y, COM_PS_NEAREST); if (this->m_ignoreAlpha) { color[3] = 1.0f; } else { if (this->m_alphaInput != NULL) { - this->m_alphaInput->read(&(color[3]), input_x, input_y, COM_PS_NEAREST); + this->m_alphaInput->readSampled(&(color[3]), input_x, input_y, COM_PS_NEAREST); } } copy_v4_v4(buffer + offset4, color); if (this->m_depthInput != NULL) { - this->m_depthInput->read(color, input_x, input_y, COM_PS_NEAREST); + this->m_depthInput->readSampled(color, input_x, input_y, COM_PS_NEAREST); zbuffer[offset] = color[0]; } offset4 += COM_NUMBER_OF_CHANNELS; diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp index 79ce149e790..cb269b16bf4 100644 --- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp @@ -38,10 +38,10 @@ void ConvertColorProfileOperation::initExecution() this->m_inputOperation = this->getInputSocketReader(0); } -void ConvertColorProfileOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertColorProfileOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float color[4]; - this->m_inputOperation->read(color, x, y, sampler); + this->m_inputOperation->readSampled(color, x, y, sampler); IMB_buffer_float_from_float(output, color, 4, this->m_toProfile, this->m_fromProfile, this->m_predivided, 1, 1, 0, 0); } diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h index a8cbc613fb8..e68a9bdf7c1 100644 --- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h +++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h @@ -59,7 +59,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp index f39a28b87a8..ea1443598a9 100644 --- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp @@ -72,12 +72,12 @@ void ConvertDepthToRadiusOperation::initExecution() } } -void ConvertDepthToRadiusOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertDepthToRadiusOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float z; float radius; - this->m_inputOperation->read(inputValue, x, y, sampler); + this->m_inputOperation->readSampled(inputValue, x, y, sampler); z = inputValue[0]; if (z != 0.f) { float iZ = (1.f / z); diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h index d5a1fd72cbf..b92eb65d01e 100644 --- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h +++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h @@ -54,7 +54,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp index d72aabb078e..6b3e4067b18 100644 --- a/source/blender/compositor/operations/COM_ConvertOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp @@ -47,10 +47,10 @@ ConvertValueToColorOperation::ConvertValueToColorOperation() : ConvertBaseOperat this->addOutputSocket(COM_DT_COLOR); } -void ConvertValueToColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertValueToColorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; - this->m_inputOperation->read(inputValue, x, y, sampler); + this->m_inputOperation->readSampled(inputValue, x, y, sampler); output[0] = output[1] = output[2] = inputValue[0]; output[3] = 1.0f; } @@ -64,10 +64,10 @@ ConvertColorToValueOperation::ConvertColorToValueOperation() : ConvertBaseOperat this->addOutputSocket(COM_DT_VALUE); } -void ConvertColorToValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertColorToValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); output[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f; } @@ -80,10 +80,10 @@ ConvertColorToBWOperation::ConvertColorToBWOperation() : ConvertBaseOperation() this->addOutputSocket(COM_DT_VALUE); } -void ConvertColorToBWOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertColorToBWOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); output[0] = rgb_to_bw(inputColor); } @@ -96,9 +96,9 @@ ConvertColorToVectorOperation::ConvertColorToVectorOperation() : ConvertBaseOper this->addOutputSocket(COM_DT_VECTOR); } -void ConvertColorToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertColorToVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - this->m_inputOperation->read(output, x, y, sampler); + this->m_inputOperation->readSampled(output, x, y, sampler); } @@ -110,10 +110,10 @@ ConvertValueToVectorOperation::ConvertValueToVectorOperation() : ConvertBaseOper this->addOutputSocket(COM_DT_VECTOR); } -void ConvertValueToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertValueToVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float input[4]; - this->m_inputOperation->read(input, x, y, sampler); + this->m_inputOperation->readSampled(input, x, y, sampler); output[0] = input[0]; output[1] = input[0]; output[2] = input[0]; @@ -129,9 +129,9 @@ ConvertVectorToColorOperation::ConvertVectorToColorOperation() : ConvertBaseOper this->addOutputSocket(COM_DT_COLOR); } -void ConvertVectorToColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertVectorToColorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - this->m_inputOperation->read(output, x, y, sampler); + this->m_inputOperation->readSampled(output, x, y, sampler); output[3] = 1.0f; } @@ -144,10 +144,10 @@ ConvertVectorToValueOperation::ConvertVectorToValueOperation() : ConvertBaseOper this->addOutputSocket(COM_DT_VALUE); } -void ConvertVectorToValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertVectorToValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float input[4]; - this->m_inputOperation->read(input, x, y, sampler); + this->m_inputOperation->readSampled(input, x, y, sampler); output[0] = (input[0] + input[1] + input[2]) / 3.0f; } @@ -176,12 +176,12 @@ void ConvertRGBToYCCOperation::setMode(int mode) } } -void ConvertRGBToYCCOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertRGBToYCCOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; float color[3]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); rgb_to_ycc(inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->m_mode); /* divided by 255 to normalize for viewing in */ @@ -214,10 +214,10 @@ void ConvertYCCToRGBOperation::setMode(int mode) } } -void ConvertYCCToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertYCCToRGBOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); /* need to un-normalize the data */ /* R,G,B --> Y,Cb,Cr */ @@ -236,10 +236,10 @@ ConvertRGBToYUVOperation::ConvertRGBToYUVOperation() : ConvertBaseOperation() this->addOutputSocket(COM_DT_COLOR); } -void ConvertRGBToYUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertRGBToYUVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]); output[3] = inputColor[3]; } @@ -253,10 +253,10 @@ ConvertYUVToRGBOperation::ConvertYUVToRGBOperation() : ConvertBaseOperation() this->addOutputSocket(COM_DT_COLOR); } -void ConvertYUVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertYUVToRGBOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]); output[3] = inputColor[3]; } @@ -270,10 +270,10 @@ ConvertRGBToHSVOperation::ConvertRGBToHSVOperation() : ConvertBaseOperation() this->addOutputSocket(COM_DT_COLOR); } -void ConvertRGBToHSVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertRGBToHSVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); rgb_to_hsv_v(inputColor, output); output[3] = inputColor[3]; } @@ -287,10 +287,10 @@ ConvertHSVToRGBOperation::ConvertHSVToRGBOperation() : ConvertBaseOperation() this->addOutputSocket(COM_DT_COLOR); } -void ConvertHSVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertHSVToRGBOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputOperation->read(inputColor, x, y, sampler); + this->m_inputOperation->readSampled(inputColor, x, y, sampler); hsv_to_rgb_v(inputColor, output); output[3] = inputColor[3]; } @@ -304,12 +304,12 @@ ConvertPremulToStraightOperation::ConvertPremulToStraightOperation() : ConvertBa this->addOutputSocket(COM_DT_COLOR); } -void ConvertPremulToStraightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertPremulToStraightOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float alpha; - this->m_inputOperation->read(inputValue, x, y, sampler); + this->m_inputOperation->readSampled(inputValue, x, y, sampler); alpha = inputValue[3]; if (fabsf(alpha) < 1e-5f) { @@ -332,12 +332,12 @@ ConvertStraightToPremulOperation::ConvertStraightToPremulOperation() : ConvertBa this->addOutputSocket(COM_DT_COLOR); } -void ConvertStraightToPremulOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ConvertStraightToPremulOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float alpha; - this->m_inputOperation->read(inputValue, x, y, sampler); + this->m_inputOperation->readSampled(inputValue, x, y, sampler); alpha = inputValue[3]; mul_v3_v3fl(output, inputValue, alpha); @@ -366,10 +366,10 @@ void SeparateChannelOperation::deinitExecution() } -void SeparateChannelOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SeparateChannelOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float input[4]; - this->m_inputOperation->read(input, x, y, sampler); + this->m_inputOperation->readSampled(input, x, y, sampler); output[0] = input[this->m_channel]; } @@ -407,23 +407,23 @@ void CombineChannelsOperation::deinitExecution() } -void CombineChannelsOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void CombineChannelsOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float input[4]; if (this->m_inputChannel1Operation) { - this->m_inputChannel1Operation->read(input, x, y, sampler); + this->m_inputChannel1Operation->readSampled(input, x, y, sampler); output[0] = input[0]; } if (this->m_inputChannel2Operation) { - this->m_inputChannel2Operation->read(input, x, y, sampler); + this->m_inputChannel2Operation->readSampled(input, x, y, sampler); output[1] = input[0]; } if (this->m_inputChannel3Operation) { - this->m_inputChannel3Operation->read(input, x, y, sampler); + this->m_inputChannel3Operation->readSampled(input, x, y, sampler); output[2] = input[0]; } if (this->m_inputChannel4Operation) { - this->m_inputChannel4Operation->read(input, x, y, sampler); + this->m_inputChannel4Operation->readSampled(input, x, y, sampler); output[3] = input[0]; } } diff --git a/source/blender/compositor/operations/COM_ConvertOperation.h b/source/blender/compositor/operations/COM_ConvertOperation.h index 06aeb2e52d7..957df812a2e 100644 --- a/source/blender/compositor/operations/COM_ConvertOperation.h +++ b/source/blender/compositor/operations/COM_ConvertOperation.h @@ -42,7 +42,7 @@ class ConvertValueToColorOperation : public ConvertBaseOperation { public: ConvertValueToColorOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -50,7 +50,7 @@ class ConvertColorToValueOperation : public ConvertBaseOperation { public: ConvertColorToValueOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -58,7 +58,7 @@ class ConvertColorToBWOperation : public ConvertBaseOperation { public: ConvertColorToBWOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -66,7 +66,7 @@ class ConvertColorToVectorOperation : public ConvertBaseOperation { public: ConvertColorToVectorOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -74,7 +74,7 @@ class ConvertValueToVectorOperation : public ConvertBaseOperation { public: ConvertValueToVectorOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -82,7 +82,7 @@ class ConvertVectorToColorOperation : public ConvertBaseOperation { public: ConvertVectorToColorOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -90,7 +90,7 @@ class ConvertVectorToValueOperation : public ConvertBaseOperation { public: ConvertVectorToValueOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -101,7 +101,7 @@ private: public: ConvertRGBToYCCOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** Set the YCC mode */ void setMode(int mode); @@ -115,7 +115,7 @@ private: public: ConvertYCCToRGBOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** Set the YCC mode */ void setMode(int mode); @@ -126,7 +126,7 @@ class ConvertRGBToYUVOperation : public ConvertBaseOperation { public: ConvertRGBToYUVOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -134,7 +134,7 @@ class ConvertYUVToRGBOperation : public ConvertBaseOperation { public: ConvertYUVToRGBOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -142,7 +142,7 @@ class ConvertRGBToHSVOperation : public ConvertBaseOperation { public: ConvertRGBToHSVOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -150,7 +150,7 @@ class ConvertHSVToRGBOperation : public ConvertBaseOperation { public: ConvertHSVToRGBOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -158,7 +158,7 @@ class ConvertPremulToStraightOperation : public ConvertBaseOperation { public: ConvertPremulToStraightOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -166,7 +166,7 @@ class ConvertStraightToPremulOperation : public ConvertBaseOperation { public: ConvertStraightToPremulOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; @@ -176,7 +176,7 @@ private: int m_channel; public: SeparateChannelOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); @@ -193,7 +193,7 @@ private: SocketReader *m_inputChannel4Operation; public: CombineChannelsOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp index 844d23db2ac..c514b576dcf 100644 --- a/source/blender/compositor/operations/COM_CropOperation.cpp +++ b/source/blender/compositor/operations/COM_CropOperation.cpp @@ -82,10 +82,10 @@ CropOperation::CropOperation() : CropBaseOperation() /* pass */ } -void CropOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void CropOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if ((x < this->m_xmax && x >= this->m_xmin) && (y < this->m_ymax && y >= this->m_ymin)) { - this->m_inputOperation->read(output, x, y, sampler); + this->m_inputOperation->readSampled(output, x, y, sampler); } else { zero_v4(output); @@ -117,10 +117,10 @@ void CropImageOperation::determineResolution(unsigned int resolution[2], unsigne resolution[1] = this->m_ymax - this->m_ymin; } -void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void CropImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) { - this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler); + this->m_inputOperation->readSampled(output, (x + this->m_xmin), (y + this->m_ymin), sampler); } else { zero_v4(output); diff --git a/source/blender/compositor/operations/COM_CropOperation.h b/source/blender/compositor/operations/COM_CropOperation.h index d2f2b15aa36..4890ede18a9 100644 --- a/source/blender/compositor/operations/COM_CropOperation.h +++ b/source/blender/compositor/operations/COM_CropOperation.h @@ -48,7 +48,7 @@ class CropOperation : public CropBaseOperation { private: public: CropOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class CropImageOperation : public CropBaseOperation { @@ -57,7 +57,7 @@ public: CropImageOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); void determineResolution(unsigned int resolution[2], unsigned int preferedResolution[2]); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp index e23eb26f527..325ef83a529 100644 --- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp @@ -44,7 +44,7 @@ void DifferenceMatteOperation::deinitExecution() this->m_inputImage2Program = NULL; } -void DifferenceMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void DifferenceMatteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inColor1[4]; float inColor2[4]; @@ -54,8 +54,8 @@ void DifferenceMatteOperation::executePixel(float output[4], float x, float y, P float difference; float alpha; - this->m_inputImage1Program->read(inColor1, x, y, sampler); - this->m_inputImage2Program->read(inColor2, x, y, sampler); + this->m_inputImage1Program->readSampled(inColor1, x, y, sampler); + this->m_inputImage2Program->readSampled(inColor2, x, y, sampler); difference = (fabsf(inColor2[0] - inColor1[0]) + fabsf(inColor2[1] - inColor1[1]) + diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h index e0a38f703ed..a3647e1e5db 100644 --- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h +++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h @@ -43,7 +43,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp index 23289429bfd..d6c25574d01 100644 --- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp @@ -71,7 +71,7 @@ void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void const int iterations = pow(2.0f, this->m_data->iter); float col[4] = {0, 0, 0, 0}; float col2[4] = {0, 0, 0, 0}; - this->m_inputProgram->read(col2, x, y, COM_PS_NEAREST); + this->m_inputProgram->readSampled(col2, x, y, COM_PS_NEAREST); float ltx = this->m_tx; float lty = this->m_ty; float lsc = this->m_sc; @@ -84,7 +84,7 @@ void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void const float v = isc * (y - this->m_center_y_pix) + lty; const float u = isc * (x - this->m_center_x_pix) + ltx; - this->m_inputProgram->read(col, + this->m_inputProgram->readSampled(col, cs * u + ss * v + this->m_center_x_pix, cs * v - ss * u + this->m_center_y_pix, COM_PS_NEAREST); diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp index 1723da11f21..17692bd18ef 100644 --- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp +++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp @@ -64,9 +64,9 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) float dxt, dyt; float u, v; - this->m_inputScaleXProgram->read(inScale, x, y, COM_PS_NEAREST); + this->m_inputScaleXProgram->readSampled(inScale, x, y, COM_PS_NEAREST); float xs = inScale[0]; - this->m_inputScaleYProgram->read(inScale, x, y, COM_PS_NEAREST); + this->m_inputScaleYProgram->readSampled(inScale, x, y, COM_PS_NEAREST); float ys = inScale[0]; /* clamp x and y displacement to triple image resolution - @@ -74,7 +74,7 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) CLAMP(xs, -this->m_width_x4, this->m_width_x4); CLAMP(ys, -this->m_height_x4, this->m_height_x4); - this->m_inputVectorProgram->read(inVector, x, y, COM_PS_NEAREST); + this->m_inputVectorProgram->readSampled(inVector, x, y, COM_PS_NEAREST); p_dx = inVector[0] * xs; p_dy = inVector[1] * ys; @@ -83,9 +83,9 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) v = y - p_dy + 0.5f; /* calc derivatives */ - this->m_inputVectorProgram->read(inVector, x + 1, y, COM_PS_NEAREST); + this->m_inputVectorProgram->readSampled(inVector, x + 1, y, COM_PS_NEAREST); d_dx = inVector[0] * xs; - this->m_inputVectorProgram->read(inVector, x, y + 1, COM_PS_NEAREST); + this->m_inputVectorProgram->readSampled(inVector, x, y + 1, COM_PS_NEAREST); d_dy = inVector[1] * ys; /* clamp derivatives to minimum displacement distance in UV space */ @@ -96,7 +96,7 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) dyt = signf(dyt) * max_ff(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight(); /* EWA filtering (without nearest it gets blurry with NO distortion) */ - this->m_inputColorProgram->read(output, u, v, dxt, dyt, COM_PS_NEAREST); + this->m_inputColorProgram->readFiltered(output, u, v, dxt, dyt, COM_PS_NEAREST); } void DisplaceOperation::deinitExecution() diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp index c8ebb845bb6..48160d5db2c 100644 --- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp +++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp @@ -53,7 +53,7 @@ void DisplaceSimpleOperation::initExecution() * in order to take effect */ // #define DISPLACE_EPSILON 0.01f -void DisplaceSimpleOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void DisplaceSimpleOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inVector[4]; float inScale[4]; @@ -61,9 +61,9 @@ void DisplaceSimpleOperation::executePixel(float output[4], float x, float y, Pi float p_dx, p_dy; /* main displacement in pixel space */ float u, v; - this->m_inputScaleXProgram->read(inScale, x, y, sampler); + this->m_inputScaleXProgram->readSampled(inScale, x, y, sampler); float xs = inScale[0]; - this->m_inputScaleYProgram->read(inScale, x, y, sampler); + this->m_inputScaleYProgram->readSampled(inScale, x, y, sampler); float ys = inScale[0]; /* clamp x and y displacement to triple image resolution - @@ -71,7 +71,7 @@ void DisplaceSimpleOperation::executePixel(float output[4], float x, float y, Pi CLAMP(xs, -this->m_width_x4, this->m_width_x4); CLAMP(ys, -this->m_height_x4, this->m_height_x4); - this->m_inputVectorProgram->read(inVector, x, y, sampler); + this->m_inputVectorProgram->readSampled(inVector, x, y, sampler); p_dx = inVector[0] * xs; p_dy = inVector[1] * ys; @@ -82,7 +82,7 @@ void DisplaceSimpleOperation::executePixel(float output[4], float x, float y, Pi CLAMP(u, 0.f, this->getWidth() - 1.f); CLAMP(v, 0.f, this->getHeight() - 1.f); - this->m_inputColorProgram->read(output, u, v, sampler); + this->m_inputColorProgram->readSampled(output, u, v, sampler); } void DisplaceSimpleOperation::deinitExecution() diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h index 989cf8a1f67..6e52dfe86e9 100644 --- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h +++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h @@ -48,7 +48,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp index d3309e0c978..072ca1022e7 100644 --- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp @@ -49,7 +49,7 @@ float DistanceRGBMatteOperation::calculateDistance(float key[4], float image[4]) return len_v3v3(key, image); } -void DistanceRGBMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void DistanceRGBMatteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inKey[4]; float inImage[4]; @@ -60,8 +60,8 @@ void DistanceRGBMatteOperation::executePixel(float output[4], float x, float y, float distance; float alpha; - this->m_inputKeyProgram->read(inKey, x, y, sampler); - this->m_inputImageProgram->read(inImage, x, y, sampler); + this->m_inputKeyProgram->readSampled(inKey, x, y, sampler); + this->m_inputImageProgram->readSampled(inImage, x, y, sampler); distance = this->calculateDistance(inKey, inImage); diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h index 43299486f60..a815caa5ef5 100644 --- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h +++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h @@ -45,7 +45,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp index 1439dfa404a..368db185adc 100644 --- a/source/blender/compositor/operations/COM_DotproductOperation.cpp +++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp @@ -45,11 +45,11 @@ void DotproductOperation::deinitExecution() /** @todo: current implementation is the inverse of a dotproduct. not 'logically' correct */ -void DotproductOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void DotproductOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float input1[4]; float input2[4]; - this->m_input1Operation->read(input1, x, y, sampler); - this->m_input2Operation->read(input2, x, y, sampler); + this->m_input1Operation->readSampled(input1, x, y, sampler); + this->m_input2Operation->readSampled(input2, x, y, sampler); output[0] = -(input1[0] * input2[0] + input1[1] * input2[1] + input1[2] * input2[2]); } diff --git a/source/blender/compositor/operations/COM_DotproductOperation.h b/source/blender/compositor/operations/COM_DotproductOperation.h index 31588207504..4378e280d17 100644 --- a/source/blender/compositor/operations/COM_DotproductOperation.h +++ b/source/blender/compositor/operations/COM_DotproductOperation.h @@ -31,7 +31,7 @@ private: SocketReader *m_input2Operation; public: DotproductOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp index 9ab21e2d5bd..d7cc2ec9272 100644 --- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp @@ -44,7 +44,7 @@ void EllipseMaskOperation::initExecution() this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight(); } -void EllipseMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void EllipseMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputMask[4]; float inputValue[4]; @@ -57,8 +57,8 @@ void EllipseMaskOperation::executePixel(float output[4], float x, float y, Pixel rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy); ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy); - this->m_inputMask->read(inputMask, x, y, sampler); - this->m_inputValue->read(inputValue, x, y, sampler); + this->m_inputMask->readSampled(inputMask, x, y, sampler); + this->m_inputValue->readSampled(inputValue, x, y, sampler); const float halfHeight = (this->m_data->height) / 2.0f; const float halfWidth = this->m_data->width / 2.0f; diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.h b/source/blender/compositor/operations/COM_EllipseMaskOperation.h index ed74e6b43db..753615df370 100644 --- a/source/blender/compositor/operations/COM_EllipseMaskOperation.h +++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.h @@ -45,7 +45,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_FlipOperation.cpp b/source/blender/compositor/operations/COM_FlipOperation.cpp index 526eba34d86..3de2ae9dabc 100644 --- a/source/blender/compositor/operations/COM_FlipOperation.cpp +++ b/source/blender/compositor/operations/COM_FlipOperation.cpp @@ -42,12 +42,12 @@ void FlipOperation::deinitExecution() } -void FlipOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void FlipOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float nx = this->m_flipX ? this->getWidth() - 1 - x : x; float ny = this->m_flipY ? this->getHeight() - 1 - y : y; - this->m_inputOperation->read(output, nx, ny, sampler); + this->m_inputOperation->readSampled(output, nx, ny, sampler); } bool FlipOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) diff --git a/source/blender/compositor/operations/COM_FlipOperation.h b/source/blender/compositor/operations/COM_FlipOperation.h index 018617cea8a..a1fcde19876 100644 --- a/source/blender/compositor/operations/COM_FlipOperation.h +++ b/source/blender/compositor/operations/COM_FlipOperation.h @@ -33,7 +33,7 @@ private: public: FlipOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp index 8f92dc02a57..357677d6832 100644 --- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp +++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp @@ -34,10 +34,10 @@ void GammaCorrectOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void GammaCorrectOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void GammaCorrectOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputProgram->read(inputColor, x, y, sampler); + this->m_inputProgram->readSampled(inputColor, x, y, sampler); if (inputColor[3] > 0.0f) { inputColor[0] /= inputColor[3]; inputColor[1] /= inputColor[3]; @@ -73,10 +73,10 @@ void GammaUncorrectOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void GammaUncorrectOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void GammaUncorrectOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor[4]; - this->m_inputProgram->read(inputColor, x, y, sampler); + this->m_inputProgram->readSampled(inputColor, x, y, sampler); if (inputColor[3] > 0.0f) { inputColor[0] /= inputColor[3]; diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.h b/source/blender/compositor/operations/COM_GammaCorrectOperation.h index 514855b4f56..68eaab83c99 100644 --- a/source/blender/compositor/operations/COM_GammaCorrectOperation.h +++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.h @@ -38,7 +38,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution @@ -64,7 +64,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp index 326031c5984..d98f2c4663f 100644 --- a/source/blender/compositor/operations/COM_GammaOperation.cpp +++ b/source/blender/compositor/operations/COM_GammaOperation.cpp @@ -37,13 +37,13 @@ void GammaOperation::initExecution() this->m_inputGammaProgram = this->getInputSocketReader(1); } -void GammaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void GammaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float inputGamma[4]; - this->m_inputProgram->read(inputValue, x, y, sampler); - this->m_inputGammaProgram->read(inputGamma, x, y, sampler); + this->m_inputProgram->readSampled(inputValue, x, y, sampler); + this->m_inputGammaProgram->readSampled(inputGamma, x, y, sampler); const float gamma = inputGamma[0]; /* check for negative to avoid nan's */ output[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0]; diff --git a/source/blender/compositor/operations/COM_GammaOperation.h b/source/blender/compositor/operations/COM_GammaOperation.h index 4482f7be34a..d8e08457812 100644 --- a/source/blender/compositor/operations/COM_GammaOperation.h +++ b/source/blender/compositor/operations/COM_GammaOperation.h @@ -39,7 +39,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp index 1c7d2659c39..78e1e80cafc 100644 --- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp @@ -42,11 +42,11 @@ void GlareThresholdOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void GlareThresholdOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void GlareThresholdOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { const float threshold = this->m_settings->threshold; - this->m_inputProgram->read(output, x, y, sampler); + this->m_inputProgram->readSampled(output, x, y, sampler); if (rgb_to_luma_y(output) >= threshold) { output[0] -= threshold, output[1] -= threshold, output[2] -= threshold; output[0] = max(output[0], 0.0f); diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.h b/source/blender/compositor/operations/COM_GlareThresholdOperation.h index 44f9db6a483..7760a19251b 100644 --- a/source/blender/compositor/operations/COM_GlareThresholdOperation.h +++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.h @@ -42,7 +42,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp index 8f58942fbe2..6bbaac8e303 100644 --- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp +++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp @@ -45,11 +45,11 @@ void HueSaturationValueCorrectOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void HueSaturationValueCorrectOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void HueSaturationValueCorrectOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float hsv[4], f; - this->m_inputProgram->read(hsv, x, y, sampler); + this->m_inputProgram->readSampled(hsv, x, y, sampler); /* adjust hue, scaling returned default 0.5 up to 1 */ f = curvemapping_evaluateF(this->m_curveMapping, 0, hsv[0]); diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h index 5e57d09a51e..0a0e82bf168 100644 --- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h +++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h @@ -37,7 +37,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.cpp b/source/blender/compositor/operations/COM_IDMaskOperation.cpp index 4b9bcb118e7..a021f07d2a7 100644 --- a/source/blender/compositor/operations/COM_IDMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_IDMaskOperation.cpp @@ -33,11 +33,11 @@ void IDMaskOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void IDMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void IDMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; - this->m_inputProgram->read(inputValue, x, y, sampler); + this->m_inputProgram->readSampled(inputValue, x, y, sampler); const float a = (inputValue[0] == this->m_objectIndex) ? 1.0f : 0.0f; output[0] = a; } diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.h b/source/blender/compositor/operations/COM_IDMaskOperation.h index 68c5cf4c1dc..dfddc489ca4 100644 --- a/source/blender/compositor/operations/COM_IDMaskOperation.h +++ b/source/blender/compositor/operations/COM_IDMaskOperation.h @@ -39,7 +39,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index cface29fdca..adc325de377 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -146,7 +146,7 @@ static void sampleImageAtLocation(ImBuf *ibuf, float x, float y, PixelSampler sa } } -void ImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if ((this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { zero_v4(output); @@ -156,7 +156,7 @@ void ImageOperation::executePixel(float output[4], float x, float y, PixelSample } } -void ImageAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ImageAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float tempcolor[4]; @@ -170,7 +170,7 @@ void ImageAlphaOperation::executePixel(float output[4], float x, float y, PixelS } } -void ImageDepthOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ImageDepthOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if (this->m_depthBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { output[0] = 0.0f; diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h index b51f11edd04..a9e2ed9ff64 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.h +++ b/source/blender/compositor/operations/COM_ImageOperation.h @@ -73,7 +73,7 @@ public: * Constructor */ ImageOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class ImageAlphaOperation : public BaseImageOperation { public: @@ -81,7 +81,7 @@ public: * Constructor */ ImageAlphaOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class ImageDepthOperation : public BaseImageOperation { public: @@ -89,6 +89,6 @@ public: * Constructor */ ImageDepthOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp index 9c2dd825709..dc5a2653129 100644 --- a/source/blender/compositor/operations/COM_InvertOperation.cpp +++ b/source/blender/compositor/operations/COM_InvertOperation.cpp @@ -39,12 +39,12 @@ void InvertOperation::initExecution() this->m_inputColorProgram = this->getInputSocketReader(1); } -void InvertOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void InvertOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float inputColor[4]; - this->m_inputValueProgram->read(inputValue, x, y, sampler); - this->m_inputColorProgram->read(inputColor, x, y, sampler); + this->m_inputValueProgram->readSampled(inputValue, x, y, sampler); + this->m_inputColorProgram->readSampled(inputColor, x, y, sampler); const float value = inputValue[0]; const float invertedValue = 1.0f - value; diff --git a/source/blender/compositor/operations/COM_InvertOperation.h b/source/blender/compositor/operations/COM_InvertOperation.h index 7fded7bb1e4..be1e933f1e9 100644 --- a/source/blender/compositor/operations/COM_InvertOperation.h +++ b/source/blender/compositor/operations/COM_InvertOperation.h @@ -42,7 +42,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp index 01f5c032730..c4b821f998f 100644 --- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp @@ -53,13 +53,13 @@ void KeyingDespillOperation::deinitExecution() this->m_screenReader = NULL; } -void KeyingDespillOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void KeyingDespillOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float pixelColor[4]; float screenColor[4]; - this->m_pixelReader->read(pixelColor, x, y, sampler); - this->m_screenReader->read(screenColor, x, y, sampler); + this->m_pixelReader->readSampled(pixelColor, x, y, sampler); + this->m_screenReader->readSampled(screenColor, x, y, sampler); const int screen_primary_channel = max_axis_v3(screenColor); const int other_1 = (screen_primary_channel + 1) % 3; diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.h b/source/blender/compositor/operations/COM_KeyingDespillOperation.h index 18e771b14f1..da9924d5b4b 100644 --- a/source/blender/compositor/operations/COM_KeyingDespillOperation.h +++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.h @@ -45,7 +45,7 @@ public: void setDespillFactor(float value) {this->m_despillFactor = value;} void setColorBalance(float value) {this->m_colorBalance = value;} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp index baeacb56744..e2566d2f4f0 100644 --- a/source/blender/compositor/operations/COM_KeyingOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp @@ -65,13 +65,13 @@ void KeyingOperation::deinitExecution() this->m_screenReader = NULL; } -void KeyingOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void KeyingOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float pixelColor[4]; float screenColor[4]; - this->m_pixelReader->read(pixelColor, x, y, sampler); - this->m_screenReader->read(screenColor, x, y, sampler); + this->m_pixelReader->readSampled(pixelColor, x, y, sampler); + this->m_screenReader->readSampled(screenColor, x, y, sampler); const int primary_channel = max_axis_v3(screenColor); diff --git a/source/blender/compositor/operations/COM_KeyingOperation.h b/source/blender/compositor/operations/COM_KeyingOperation.h index fcff9243dfc..e4542e2c6dd 100644 --- a/source/blender/compositor/operations/COM_KeyingOperation.h +++ b/source/blender/compositor/operations/COM_KeyingOperation.h @@ -49,7 +49,7 @@ public: void setScreenBalance(float value) {this->m_screenBalance = value;} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp index 4c65113ee70..0e48d5963c6 100644 --- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp @@ -40,7 +40,7 @@ void LuminanceMatteOperation::deinitExecution() this->m_inputImageProgram = NULL; } -void LuminanceMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void LuminanceMatteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inColor[4]; @@ -49,7 +49,7 @@ void LuminanceMatteOperation::executePixel(float output[4], float x, float y, Pi float alpha; - this->m_inputImageProgram->read(inColor, x, y, sampler); + this->m_inputImageProgram->readSampled(inColor, x, y, sampler); /* one line thread-friend algorithm: * output[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low)))) diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h index cb8cc01efea..93051f52228 100644 --- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h +++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h @@ -41,7 +41,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cpp b/source/blender/compositor/operations/COM_MapRangeOperation.cpp index 1fe74ade0fc..2e80d4f1ba3 100644 --- a/source/blender/compositor/operations/COM_MapRangeOperation.cpp +++ b/source/blender/compositor/operations/COM_MapRangeOperation.cpp @@ -46,18 +46,18 @@ void MapRangeOperation::initExecution() /* The code below assumes all data is inside range +- this, and that input buffer is single channel */ #define BLENDER_ZMAX 10000.0f -void MapRangeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MapRangeOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputs[8]; /* includes the 5 inputs + 3 pads */ float value; float source_min, source_max; float dest_min, dest_max; - this->m_inputOperation->read(inputs, x, y, sampler); - this->m_sourceMinOperation->read(inputs + 1, x, y, sampler); - this->m_sourceMaxOperation->read(inputs + 2, x, y, sampler); - this->m_destMinOperation->read(inputs + 3, x, y, sampler); - this->m_destMaxOperation->read(inputs + 4, x, y, sampler); + this->m_inputOperation->readSampled(inputs, x, y, sampler); + this->m_sourceMinOperation->readSampled(inputs + 1, x, y, sampler); + this->m_sourceMaxOperation->readSampled(inputs + 2, x, y, sampler); + this->m_destMinOperation->readSampled(inputs + 3, x, y, sampler); + this->m_destMaxOperation->readSampled(inputs + 4, x, y, sampler); value = inputs[0]; source_min = inputs[1]; diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.h b/source/blender/compositor/operations/COM_MapRangeOperation.h index 00dfc68168c..a232f89ea9d 100644 --- a/source/blender/compositor/operations/COM_MapRangeOperation.h +++ b/source/blender/compositor/operations/COM_MapRangeOperation.h @@ -50,7 +50,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index a9b6ad3edc1..289b447dec7 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -40,7 +40,7 @@ void MapUVOperation::initExecution() this->m_inputUVProgram = this->getInputSocketReader(1); } -void MapUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MapUVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputUV[4]; float uv_a[4], uv_b[4]; @@ -50,22 +50,22 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample float uv_l, uv_r; float uv_u, uv_d; - this->m_inputUVProgram->read(inputUV, x, y, sampler); + this->m_inputUVProgram->readSampled(inputUV, x, y, sampler); if (inputUV[2] == 0.f) { zero_v4(output); return; } /* adaptive sampling, red (U) channel */ - this->m_inputUVProgram->read(uv_a, x - 1, y, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x + 1, y, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_a, x - 1, y, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_b, x + 1, y, COM_PS_NEAREST); uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; dx = 0.5f * (uv_l + uv_r); /* adaptive sampling, green (V) channel */ - this->m_inputUVProgram->read(uv_a, x, y - 1, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x, y + 1, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_a, x, y - 1, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_b, x, y + 1, COM_PS_NEAREST); uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; @@ -81,7 +81,7 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample u = inputUV[0] * this->m_inputColorProgram->getWidth(); v = inputUV[1] * this->m_inputColorProgram->getHeight(); - this->m_inputColorProgram->read(output, u, v, dx, dy, COM_PS_NEAREST); + this->m_inputColorProgram->readFiltered(output, u, v, dx, dy, COM_PS_NEAREST); /* "premul" */ if (alpha < 1.0f) { diff --git a/source/blender/compositor/operations/COM_MapUVOperation.h b/source/blender/compositor/operations/COM_MapUVOperation.h index c8356c1a7ad..fe8bfd2a9ac 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.h +++ b/source/blender/compositor/operations/COM_MapUVOperation.h @@ -45,7 +45,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp index 7acc431f7b5..d6aaf560fce 100644 --- a/source/blender/compositor/operations/COM_MapValueOperation.cpp +++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp @@ -34,10 +34,10 @@ void MapValueOperation::initExecution() this->m_inputOperation = this->getInputSocketReader(0); } -void MapValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MapValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float src[4]; - this->m_inputOperation->read(src, x, y, sampler); + this->m_inputOperation->readSampled(src, x, y, sampler); TexMapping *texmap = this->m_settings; float value = (src[0] + texmap->loc[0]) * texmap->size[0]; if (texmap->flag & TEXMAP_CLIP_MIN) diff --git a/source/blender/compositor/operations/COM_MapValueOperation.h b/source/blender/compositor/operations/COM_MapValueOperation.h index 418d6d9bf4d..a9a59d6633a 100644 --- a/source/blender/compositor/operations/COM_MapValueOperation.h +++ b/source/blender/compositor/operations/COM_MapValueOperation.h @@ -45,7 +45,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index 85df691ee29..a5b1987d4b3 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -127,7 +127,7 @@ void MaskOperation::determineResolution(unsigned int resolution[2], unsigned int } } -void MaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { const float xy[2] = {x * this->m_maskWidthInv, y * this->m_maskHeightInv}; diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h index 2de71afcfa7..18d7e594104 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.h +++ b/source/blender/compositor/operations/COM_MaskOperation.h @@ -83,7 +83,7 @@ public: void setMotionBlurSamples(int samples) { this->m_rasterMaskHandleTot = min(max(1, samples), CMP_NODE_MASK_MBLUR_SAMPLES_MAX); } void setMotionBlurShutter(float shutter) { this->m_frame_shutter = shutter; } - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp index fa0c480eb70..cc7511bb9fc 100644 --- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp @@ -72,52 +72,52 @@ void MathBaseOperation::clampIfNeeded(float *color) } } -void MathAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathAddOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = inputValue1[0] + inputValue2[0]; clampIfNeeded(output); } -void MathSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathSubtractOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = inputValue1[0] - inputValue2[0]; clampIfNeeded(output); } -void MathMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathMultiplyOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = inputValue1[0] * inputValue2[0]; clampIfNeeded(output); } -void MathDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathDivideOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); if (inputValue2[0] == 0) /* We don't want to divide by zero. */ output[0] = 0.0; @@ -127,52 +127,52 @@ void MathDivideOperation::executePixel(float output[4], float x, float y, PixelS clampIfNeeded(output); } -void MathSineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathSineOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = sin(inputValue1[0]); clampIfNeeded(output); } -void MathCosineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathCosineOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = cos(inputValue1[0]); clampIfNeeded(output); } -void MathTangentOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathTangentOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = tan(inputValue1[0]); clampIfNeeded(output); } -void MathArcSineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathArcSineOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); if (inputValue1[0] <= 1 && inputValue1[0] >= -1) output[0] = asin(inputValue1[0]); @@ -182,13 +182,13 @@ void MathArcSineOperation::executePixel(float output[4], float x, float y, Pixel clampIfNeeded(output); } -void MathArcCosineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathArcCosineOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); if (inputValue1[0] <= 1 && inputValue1[0] >= -1) output[0] = acos(inputValue1[0]); @@ -198,26 +198,26 @@ void MathArcCosineOperation::executePixel(float output[4], float x, float y, Pix clampIfNeeded(output); } -void MathArcTangentOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathArcTangentOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = atan(inputValue1[0]); clampIfNeeded(output); } -void MathPowerOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathPowerOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); if (inputValue1[0] >= 0) { output[0] = pow(inputValue1[0], inputValue2[0]); @@ -236,13 +236,13 @@ void MathPowerOperation::executePixel(float output[4], float x, float y, PixelSa clampIfNeeded(output); } -void MathLogarithmOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathLogarithmOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); if (inputValue1[0] > 0 && inputValue2[0] > 0) output[0] = log(inputValue1[0]) / log(inputValue2[0]); @@ -252,78 +252,78 @@ void MathLogarithmOperation::executePixel(float output[4], float x, float y, Pix clampIfNeeded(output); } -void MathMinimumOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathMinimumOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = min(inputValue1[0], inputValue2[0]); clampIfNeeded(output); } -void MathMaximumOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathMaximumOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = max(inputValue1[0], inputValue2[0]); clampIfNeeded(output); } -void MathRoundOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathRoundOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = round(inputValue1[0]); clampIfNeeded(output); } -void MathLessThanOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathLessThanOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = inputValue1[0] < inputValue2[0] ? 1.0f : 0.0f; clampIfNeeded(output); } -void MathGreaterThanOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathGreaterThanOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); output[0] = inputValue1[0] > inputValue2[0] ? 1.0f : 0.0f; clampIfNeeded(output); } -void MathModuloOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MathModuloOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputValue1[4]; float inputValue2[4]; - this->m_inputValue1Operation->read(inputValue1, x, y, sampler); - this->m_inputValue2Operation->read(inputValue2, x, y, sampler); + this->m_inputValue1Operation->readSampled(inputValue1, x, y, sampler); + this->m_inputValue2Operation->readSampled(inputValue2, x, y, sampler); if (inputValue2[0] == 0) output[0] = 0.0; diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.h b/source/blender/compositor/operations/COM_MathBaseOperation.h index 649a9688037..4ea7c43a67d 100644 --- a/source/blender/compositor/operations/COM_MathBaseOperation.h +++ b/source/blender/compositor/operations/COM_MathBaseOperation.h @@ -50,7 +50,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler) = 0; + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) = 0; /** * Initialize the execution @@ -73,94 +73,94 @@ public: class MathAddOperation : public MathBaseOperation { public: MathAddOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathSubtractOperation : public MathBaseOperation { public: MathSubtractOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathMultiplyOperation : public MathBaseOperation { public: MathMultiplyOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathDivideOperation : public MathBaseOperation { public: MathDivideOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathSineOperation : public MathBaseOperation { public: MathSineOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathCosineOperation : public MathBaseOperation { public: MathCosineOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathTangentOperation : public MathBaseOperation { public: MathTangentOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcSineOperation : public MathBaseOperation { public: MathArcSineOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcCosineOperation : public MathBaseOperation { public: MathArcCosineOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcTangentOperation : public MathBaseOperation { public: MathArcTangentOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathPowerOperation : public MathBaseOperation { public: MathPowerOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathLogarithmOperation : public MathBaseOperation { public: MathLogarithmOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathMinimumOperation : public MathBaseOperation { public: MathMinimumOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathMaximumOperation : public MathBaseOperation { public: MathMaximumOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathRoundOperation : public MathBaseOperation { public: MathRoundOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathLessThanOperation : public MathBaseOperation { public: MathLessThanOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathGreaterThanOperation : public MathBaseOperation { public: MathGreaterThanOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathModuloOperation : public MathBaseOperation { public: MathModuloOperation() : MathBaseOperation() {} - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp index f094e93f147..9781cb4e162 100644 --- a/source/blender/compositor/operations/COM_MixOperation.cpp +++ b/source/blender/compositor/operations/COM_MixOperation.cpp @@ -48,15 +48,15 @@ void MixBaseOperation::initExecution() this->m_inputColor2Operation = this->getInputSocketReader(2); } -void MixBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixBaseOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -107,15 +107,15 @@ MixAddOperation::MixAddOperation() : MixBaseOperation() /* pass */ } -void MixAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixAddOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -136,16 +136,16 @@ MixBlendOperation::MixBlendOperation() : MixBaseOperation() /* pass */ } -void MixBlendOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixBlendOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; float value; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -167,16 +167,16 @@ MixBurnOperation::MixBurnOperation() : MixBaseOperation() /* pass */ } -void MixBurnOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixBurnOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; float tmp; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -235,15 +235,15 @@ MixColorOperation::MixColorOperation() : MixBaseOperation() /* pass */ } -void MixColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixColorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -277,15 +277,15 @@ MixDarkenOperation::MixDarkenOperation() : MixBaseOperation() /* pass */ } -void MixDarkenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixDarkenOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -315,15 +315,15 @@ MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation() /* pass */ } -void MixDifferenceOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixDifferenceOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -345,15 +345,15 @@ MixDivideOperation::MixDivideOperation() : MixBaseOperation() /* pass */ } -void MixDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixDivideOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -386,16 +386,16 @@ MixDodgeOperation::MixDodgeOperation() : MixBaseOperation() /* pass */ } -void MixDodgeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixDodgeOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; float tmp; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -459,16 +459,16 @@ MixGlareOperation::MixGlareOperation() : MixBaseOperation() /* pass */ } -void MixGlareOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixGlareOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; float value; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); value = inputValue[0]; float mf = 2.f - 2.f * fabsf(value - 0.5f); @@ -491,15 +491,15 @@ MixHueOperation::MixHueOperation() : MixBaseOperation() /* pass */ } -void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixHueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -533,15 +533,15 @@ MixLightenOperation::MixLightenOperation() : MixBaseOperation() /* pass */ } -void MixLightenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixLightenOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -569,15 +569,15 @@ MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation() /* pass */ } -void MixLinearLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixLinearLightOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -608,15 +608,15 @@ MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation() /* pass */ } -void MixMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixMultiplyOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -638,15 +638,15 @@ MixOverlayOperation::MixOverlayOperation() : MixBaseOperation() /* pass */ } -void MixOverlayOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixOverlayOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -685,15 +685,15 @@ MixSaturationOperation::MixSaturationOperation() : MixBaseOperation() /* pass */ } -void MixSaturationOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixSaturationOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -724,15 +724,15 @@ MixScreenOperation::MixScreenOperation() : MixBaseOperation() /* pass */ } -void MixScreenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixScreenOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -755,15 +755,15 @@ MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation() /* pass */ } -void MixSoftLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) \ +void MixSoftLightOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) \ { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -792,15 +792,15 @@ MixSubtractOperation::MixSubtractOperation() : MixBaseOperation() /* pass */ } -void MixSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixSubtractOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { @@ -821,15 +821,15 @@ MixValueOperation::MixValueOperation() : MixBaseOperation() /* pass */ } -void MixValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MixValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputColor1[4]; float inputColor2[4]; float inputValue[4]; - this->m_inputValueOperation->read(inputValue, x, y, sampler); - this->m_inputColor1Operation->read(inputColor1, x, y, sampler); - this->m_inputColor2Operation->read(inputColor2, x, y, sampler); + this->m_inputValueOperation->readSampled(inputValue, x, y, sampler); + this->m_inputColor1Operation->readSampled(inputColor1, x, y, sampler); + this->m_inputColor2Operation->readSampled(inputColor2, x, y, sampler); float value = inputValue[0]; if (this->useValueAlphaMultiply()) { diff --git a/source/blender/compositor/operations/COM_MixOperation.h b/source/blender/compositor/operations/COM_MixOperation.h index 93dbe6f36a6..479ce161eea 100644 --- a/source/blender/compositor/operations/COM_MixOperation.h +++ b/source/blender/compositor/operations/COM_MixOperation.h @@ -60,7 +60,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution @@ -83,115 +83,115 @@ public: class MixAddOperation : public MixBaseOperation { public: MixAddOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixBlendOperation : public MixBaseOperation { public: MixBlendOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixBurnOperation : public MixBaseOperation { public: MixBurnOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixColorOperation : public MixBaseOperation { public: MixColorOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixDarkenOperation : public MixBaseOperation { public: MixDarkenOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixDifferenceOperation : public MixBaseOperation { public: MixDifferenceOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixDivideOperation : public MixBaseOperation { public: MixDivideOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixDodgeOperation : public MixBaseOperation { public: MixDodgeOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixGlareOperation : public MixBaseOperation { public: MixGlareOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixHueOperation : public MixBaseOperation { public: MixHueOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixLightenOperation : public MixBaseOperation { public: MixLightenOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixLinearLightOperation : public MixBaseOperation { public: MixLinearLightOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixMultiplyOperation : public MixBaseOperation { public: MixMultiplyOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixOverlayOperation : public MixBaseOperation { public: MixOverlayOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixSaturationOperation : public MixBaseOperation { public: MixSaturationOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixScreenOperation : public MixBaseOperation { public: MixScreenOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixSoftLightOperation : public MixBaseOperation { public: MixSoftLightOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixSubtractOperation : public MixBaseOperation { public: MixSubtractOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MixValueOperation : public MixBaseOperation { public: MixValueOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp index 0d2de47bc4f..fbbfa8fd65e 100644 --- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp @@ -33,7 +33,7 @@ MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation() this->m_attribute = MCA_X; } -void MovieClipAttributeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MovieClipAttributeOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if (!this->m_valueSet) { float loc[2], scale, angle; diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h index f894626d534..49c86c7fafc 100644 --- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h +++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h @@ -51,7 +51,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); void setMovieClip(MovieClip *clip) { this->m_clip = clip; } diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp index 76dc093035c..5b75113e7f3 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp @@ -86,7 +86,7 @@ void MovieClipBaseOperation::determineResolution(unsigned int resolution[2], uns } } -void MovieClipBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MovieClipBaseOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { ImBuf *ibuf = this->m_movieClipBuffer; @@ -122,9 +122,9 @@ MovieClipAlphaOperation::MovieClipAlphaOperation() : MovieClipBaseOperation() this->addOutputSocket(COM_DT_VALUE); } -void MovieClipAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MovieClipAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - MovieClipBaseOperation::executePixel(output, x, y, sampler); + MovieClipBaseOperation::executePixelSampled(output, x, y, sampler); output[0] = output[3]; output[1] = 0.0f; output[2] = 0.0f; diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h b/source/blender/compositor/operations/COM_MovieClipOperation.h index a368dca423c..c16262cbd02 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.h +++ b/source/blender/compositor/operations/COM_MovieClipOperation.h @@ -57,7 +57,7 @@ public: void setCacheFrame(bool value) { this->m_cacheFrame = value; } void setFramenumber(int framenumber) { this->m_framenumber = framenumber; } - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MovieClipOperation : public MovieClipBaseOperation { @@ -68,7 +68,7 @@ public: class MovieClipAlphaOperation : public MovieClipBaseOperation { public: MovieClipAlphaOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index 863a404ba67..a8c7728160d 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -122,16 +122,16 @@ void MovieDistortionOperation::deinitExecution() } -void MovieDistortionOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MovieDistortionOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if (this->m_cache != NULL) { float u, v; this->m_cache->getUV(&this->m_movieClip->tracking, x, y, &u, &v); - this->m_inputOperation->read(output, u, v, COM_PS_BILINEAR); + this->m_inputOperation->readSampled(output, u, v, COM_PS_BILINEAR); } else { - this->m_inputOperation->read(output, x, y, COM_PS_BILINEAR); + this->m_inputOperation->readSampled(output, x, y, COM_PS_BILINEAR); } } diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h index c9629451992..42c4a84f9b2 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h @@ -156,7 +156,7 @@ protected: public: MovieDistortionOperation(bool distortion); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp index e2a95b2e33b..84c1fdfb6f5 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp @@ -42,7 +42,7 @@ ImBuf *MultilayerBaseOperation::getImBuf() return NULL; } -void MultilayerColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MultilayerColorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int yi = y; int xi = x; @@ -70,7 +70,7 @@ void MultilayerColorOperation::executePixel(float output[4], float x, float y, P } } -void MultilayerValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MultilayerValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int yi = y; int xi = x; @@ -83,7 +83,7 @@ void MultilayerValueOperation::executePixel(float output[4], float x, float y, P } } -void MultilayerVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MultilayerVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int yi = y; int xi = x; diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.h b/source/blender/compositor/operations/COM_MultilayerImageOperation.h index 065bcc7da1e..37bee1b6a8c 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.h +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.h @@ -46,7 +46,7 @@ public: MultilayerColorOperation(int passindex) : MultilayerBaseOperation(passindex) { this->addOutputSocket(COM_DT_COLOR); } - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MultilayerValueOperation : public MultilayerBaseOperation { @@ -54,7 +54,7 @@ public: MultilayerValueOperation(int passindex) : MultilayerBaseOperation(passindex) { this->addOutputSocket(COM_DT_VALUE); } - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MultilayerVectorOperation : public MultilayerBaseOperation { @@ -62,7 +62,7 @@ public: MultilayerVectorOperation(int passindex) : MultilayerBaseOperation(passindex) { this->addOutputSocket(COM_DT_VECTOR); } - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index a5be993f241..c94387337c3 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -79,7 +79,7 @@ static void write_buffer_rect(rcti *rect, const bNodeTree *tree, for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2 && (!breaked); x++) { - reader->read(color, x, y, COM_PS_NEAREST); + reader->readSampled(color, x, y, COM_PS_NEAREST); for (i = 0; i < size; ++i) buffer[offset + i] = color[i]; diff --git a/source/blender/compositor/operations/COM_PixelateOperation.cpp b/source/blender/compositor/operations/COM_PixelateOperation.cpp index 89e7f0093a1..eed6d1d01b9 100644 --- a/source/blender/compositor/operations/COM_PixelateOperation.cpp +++ b/source/blender/compositor/operations/COM_PixelateOperation.cpp @@ -40,10 +40,10 @@ void PixelateOperation::deinitExecution() this->m_inputOperation = NULL; } -void PixelateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void PixelateOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float nx = round(x); float ny = round(y); - this->m_inputOperation->read(output, nx, ny, sampler); + this->m_inputOperation->readSampled(output, nx, ny, sampler); } diff --git a/source/blender/compositor/operations/COM_PixelateOperation.h b/source/blender/compositor/operations/COM_PixelateOperation.h index 83603a59331..8e60baf7f05 100644 --- a/source/blender/compositor/operations/COM_PixelateOperation.h +++ b/source/blender/compositor/operations/COM_PixelateOperation.h @@ -62,7 +62,7 @@ public: * @param y y-coordinate * @param sampler sampler */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp index 8aa1324d8e2..58fa4bd08dc 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp @@ -50,7 +50,7 @@ void PlaneTrackMaskOperation::initExecution() BLI_jitter_init(this->m_jitter[0], this->m_osa); } -void PlaneTrackMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void PlaneTrackMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float point[2]; diff --git a/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h b/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h index db32f9830e0..7f763954079 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h +++ b/source/blender/compositor/operations/COM_PlaneTrackMaskOperation.h @@ -43,7 +43,7 @@ public: void initExecution(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif diff --git a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp index df487a766f3..e3788f89b2d 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp @@ -125,7 +125,7 @@ void PlaneTrackWarpImageOperation::deinitExecution() this->m_pixelReader = NULL; } -void PlaneTrackWarpImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void PlaneTrackWarpImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float color_accum[4]; @@ -142,7 +142,7 @@ void PlaneTrackWarpImageOperation::executePixel(float output[4], float x, float u *= this->m_pixelReader->getWidth(); v *= this->m_pixelReader->getHeight(); - this->m_pixelReader->read(current_color, u, v, dx, dy, COM_PS_NEAREST); + this->m_pixelReader->readFiltered(current_color, u, v, dx, dy, COM_PS_NEAREST); add_v4_v4(color_accum, current_color); } } diff --git a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h index a92ff3f9ddf..4d73a01cad0 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h +++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.h @@ -45,7 +45,7 @@ public: void initExecution(); void deinitExecution(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); }; diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp index ba158fb2509..add9e8b959e 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.cpp +++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp @@ -104,7 +104,7 @@ void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber) color[1] = 0.0f; color[2] = 0.0f; color[3] = 1.0f; - this->m_input->read(color, rx, ry, COM_PS_NEAREST); + this->m_input->readSampled(color, rx, ry, COM_PS_NEAREST); IMB_colormanagement_processor_apply_v4(cm_processor, color); F4TOCHAR4(color, this->m_outputBuffer + offset); offset += 4; diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp index e8b900b9a85..7f6079c55aa 100644 --- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp @@ -102,7 +102,7 @@ void ProjectorLensDistortionOperation::updateDispersion() this->lockMutex(); if (!this->m_dispersionAvailable) { float result[4]; - this->getInputSocketReader(1)->read(result, 1, 1, COM_PS_NEAREST); + this->getInputSocketReader(1)->readSampled(result, 1, 1, COM_PS_NEAREST); this->m_dispersion = result[0]; this->m_kr = 0.25f * max_ff(min_ff(this->m_dispersion, 1.0f), 0.0f); this->m_kr2 = this->m_kr * 20; diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp index 3aeef6bf409..b93e338ad6c 100644 --- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp @@ -52,7 +52,7 @@ void ReadBufferOperation::determineResolution(unsigned int resolution[2], unsign m_single_value = operation->isSingleValue(); } } -void ReadBufferOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ReadBufferOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if (m_single_value) { /* write buffer has a single value stored at (0,0) */ @@ -81,7 +81,7 @@ void ReadBufferOperation::executePixelExtend(float output[4], float x, float y, } } -void ReadBufferOperation::executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler) +void ReadBufferOperation::executePixelFiltered(float output[4], float x, float y, float dx, float dy, PixelSampler sampler) { if (m_single_value) { /* write buffer has a single value stored at (0,0) */ diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h index 7a67056eda6..cdc6e50f6d4 100644 --- a/source/blender/compositor/operations/COM_ReadBufferOperation.h +++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h @@ -40,10 +40,10 @@ public: void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); void *initializeTileData(rcti *rect); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void executePixelExtend(float output[4], float x, float y, PixelSampler sampler, MemoryBufferExtend extend_x, MemoryBufferExtend extend_y); - void executePixel(float output[4], float x, float y, float dx, float dy, PixelSampler sampler); + void executePixelFiltered(float output[4], float x, float y, float dx, float dy, PixelSampler sampler); const bool isReadBufferOperation() const { return true; } void setOffset(unsigned int offset) { this->m_offset = offset; } unsigned int getOffset() const { return this->m_offset; } diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index a8382dd1746..2c2a4c6f180 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -112,7 +112,7 @@ void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, Pi } } -void RenderLayersBaseProg::executePixel(float output[4], float x, float y, PixelSampler sampler) +void RenderLayersBaseProg::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { #if 0 const RenderData *rd = this->m_rd; @@ -192,7 +192,7 @@ RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_C this->addOutputSocket(COM_DT_VALUE); } -void RenderLayersAlphaProg::executePixel(float output[4], float x, float y, PixelSampler sampler) +void RenderLayersAlphaProg::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int ix = x; int iy = y; @@ -234,7 +234,7 @@ RenderLayersDepthProg::RenderLayersDepthProg() : RenderLayersBaseProg(SCE_PASS_Z this->addOutputSocket(COM_DT_VALUE); } -void RenderLayersDepthProg::executePixel(float output[4], float x, float y, PixelSampler sampler) +void RenderLayersDepthProg::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int ix = x; int iy = y; diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h index 04861174387..b76a8621b19 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.h +++ b/source/blender/compositor/operations/COM_RenderLayersProg.h @@ -99,7 +99,7 @@ public: short getLayerId() { return this->m_layerId; } void initExecution(); void deinitExecution(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class RenderLayersAOOperation : public RenderLayersBaseProg { @@ -110,7 +110,7 @@ public: class RenderLayersAlphaProg : public RenderLayersBaseProg { public: RenderLayersAlphaProg(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class RenderLayersColorOperation : public RenderLayersBaseProg { @@ -126,7 +126,7 @@ public: class RenderLayersDepthProg : public RenderLayersBaseProg { public: RenderLayersDepthProg(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class RenderLayersDiffuseOperation : public RenderLayersBaseProg { diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp index 422c5b93484..c6ad87bbf97 100644 --- a/source/blender/compositor/operations/COM_RotateOperation.cpp +++ b/source/blender/compositor/operations/COM_RotateOperation.cpp @@ -52,7 +52,7 @@ inline void RotateOperation::ensureDegree() { if (!this->m_isDegreeSet) { float degree[4]; - this->m_degreeSocket->read(degree, 0, 0, COM_PS_NEAREST); + this->m_degreeSocket->readSampled(degree, 0, 0, COM_PS_NEAREST); double rad; if (this->m_doDegree2RadConversion) { rad = DEG2RAD((double)degree[0]); @@ -68,14 +68,14 @@ inline void RotateOperation::ensureDegree() } -void RotateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void RotateOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { ensureDegree(); const float dy = y - this->m_centerY; const float dx = x - this->m_centerX; const float nx = this->m_centerX + (this->m_cosine * dx + this->m_sine * dy); const float ny = this->m_centerY + (-this->m_sine * dx + this->m_cosine * dy); - this->m_imageSocket->read(output, nx, ny, sampler); + this->m_imageSocket->readSampled(output, nx, ny, sampler); } bool RotateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) diff --git a/source/blender/compositor/operations/COM_RotateOperation.h b/source/blender/compositor/operations/COM_RotateOperation.h index 292f0743a44..40acad1abe6 100644 --- a/source/blender/compositor/operations/COM_RotateOperation.h +++ b/source/blender/compositor/operations/COM_RotateOperation.h @@ -38,7 +38,7 @@ private: public: RotateOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); void setDoDegree2RadConversion(bool abool) { this->m_doDegree2RadConversion = abool; } diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp index 9e8f5af0ef0..452765a5ab7 100644 --- a/source/blender/compositor/operations/COM_ScaleOperation.cpp +++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp @@ -66,22 +66,22 @@ void ScaleOperation::deinitExecution() } -void ScaleOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ScaleOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { PixelSampler effective_sampler = getEffectiveSampler(sampler); float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, x, y, effective_sampler); - this->m_inputYOperation->read(scaleY, x, y, effective_sampler); + this->m_inputXOperation->readSampled(scaleX, x, y, effective_sampler); + this->m_inputYOperation->readSampled(scaleY, x, y, effective_sampler); const float scx = scaleX[0]; const float scy = scaleY[0]; float nx = this->m_centerX + (x - this->m_centerX) / scx; float ny = this->m_centerY + (y - this->m_centerY) / scy; - this->m_inputOperation->read(output, nx, ny, effective_sampler); + this->m_inputOperation->readSampled(output, nx, ny, effective_sampler); } bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) @@ -90,8 +90,8 @@ bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOpe float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST); - this->m_inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST); + this->m_inputXOperation->readSampled(scaleX, 0, 0, COM_PS_NEAREST); + this->m_inputYOperation->readSampled(scaleY, 0, 0, COM_PS_NEAREST); const float scx = scaleX[0]; const float scy = scaleY[0]; @@ -134,15 +134,15 @@ void ScaleAbsoluteOperation::deinitExecution() } -void ScaleAbsoluteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ScaleAbsoluteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { PixelSampler effective_sampler = getEffectiveSampler(sampler); float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, x, y, effective_sampler); - this->m_inputYOperation->read(scaleY, x, y, effective_sampler); + this->m_inputXOperation->readSampled(scaleX, x, y, effective_sampler); + this->m_inputYOperation->readSampled(scaleY, x, y, effective_sampler); const float scx = scaleX[0]; // target absolute scale const float scy = scaleY[0]; // target absolute scale @@ -156,7 +156,7 @@ void ScaleAbsoluteOperation::executePixel(float output[4], float x, float y, Pix float nx = this->m_centerX + (x - this->m_centerX) / relativeXScale; float ny = this->m_centerY + (y - this->m_centerY) / relativeYScale; - this->m_inputOperation->read(output, nx, ny, effective_sampler); + this->m_inputOperation->readSampled(output, nx, ny, effective_sampler); } bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) @@ -165,8 +165,8 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST); - this->m_inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST); + this->m_inputXOperation->readSampled(scaleX, 0, 0, COM_PS_NEAREST); + this->m_inputYOperation->readSampled(scaleY, 0, 0, COM_PS_NEAREST); const float scx = scaleX[0]; const float scy = scaleY[0]; @@ -253,17 +253,17 @@ void ScaleFixedSizeOperation::deinitExecution() } -void ScaleFixedSizeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ScaleFixedSizeOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { PixelSampler effective_sampler = getEffectiveSampler(sampler); if (this->m_is_offset) { float nx = ((x - this->m_offsetX) * this->m_relX); float ny = ((y - this->m_offsetY) * this->m_relY); - this->m_inputOperation->read(output, nx, ny, effective_sampler); + this->m_inputOperation->readSampled(output, nx, ny, effective_sampler); } else { - this->m_inputOperation->read(output, x * this->m_relX, y * this->m_relY, effective_sampler); + this->m_inputOperation->readSampled(output, x * this->m_relX, y * this->m_relY, effective_sampler); } } diff --git a/source/blender/compositor/operations/COM_ScaleOperation.h b/source/blender/compositor/operations/COM_ScaleOperation.h index f42cdbd78ed..706a5898027 100644 --- a/source/blender/compositor/operations/COM_ScaleOperation.h +++ b/source/blender/compositor/operations/COM_ScaleOperation.h @@ -47,7 +47,7 @@ private: public: ScaleOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); @@ -63,7 +63,7 @@ class ScaleAbsoluteOperation : public BaseScaleOperation { public: ScaleAbsoluteOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); @@ -88,7 +88,7 @@ public: ScaleFixedSizeOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index d1060224444..5d2977d361b 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -291,9 +291,9 @@ void ScreenLensDistortionOperation::updateDispersionAndDistortion() this->lockMutex(); if (!this->m_valuesAvailable) { float result[4]; - this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST); + this->getInputSocketReader(1)->readSampled(result, 0, 0, COM_PS_NEAREST); this->m_distortion = result[0]; - this->getInputSocketReader(2)->read(result, 0, 0, COM_PS_NEAREST); + this->getInputSocketReader(2)->readSampled(result, 0, 0, COM_PS_NEAREST); this->m_dispersion = result[0]; updateVariables(this->m_distortion, this->m_dispersion); this->m_valuesAvailable = true; diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp index fc6cfa455f3..efdc844704a 100644 --- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp +++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp @@ -38,12 +38,12 @@ void SetAlphaOperation::initExecution() this->m_inputAlpha = getInputSocketReader(1); } -void SetAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SetAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float alphaInput[4]; - this->m_inputColor->read(output, x, y, sampler); - this->m_inputAlpha->read(alphaInput, x, y, sampler); + this->m_inputColor->readSampled(output, x, y, sampler); + this->m_inputAlpha->readSampled(alphaInput, x, y, sampler); output[3] = alphaInput[0]; } diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.h b/source/blender/compositor/operations/COM_SetAlphaOperation.h index 1ec4a7aeacf..a0869ec90b2 100644 --- a/source/blender/compositor/operations/COM_SetAlphaOperation.h +++ b/source/blender/compositor/operations/COM_SetAlphaOperation.h @@ -43,7 +43,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_SetColorOperation.cpp b/source/blender/compositor/operations/COM_SetColorOperation.cpp index 44c29b3befd..94a863e628b 100644 --- a/source/blender/compositor/operations/COM_SetColorOperation.cpp +++ b/source/blender/compositor/operations/COM_SetColorOperation.cpp @@ -27,7 +27,7 @@ SetColorOperation::SetColorOperation() : NodeOperation() this->addOutputSocket(COM_DT_COLOR); } -void SetColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SetColorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { copy_v4_v4(output, this->m_color); } diff --git a/source/blender/compositor/operations/COM_SetColorOperation.h b/source/blender/compositor/operations/COM_SetColorOperation.h index 8377decdd7b..7dfed6b570b 100644 --- a/source/blender/compositor/operations/COM_SetColorOperation.h +++ b/source/blender/compositor/operations/COM_SetColorOperation.h @@ -55,7 +55,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); bool isSetOperation() const { return true; } diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp index 343b5973f7e..be72ffd0336 100644 --- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp +++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp @@ -37,7 +37,7 @@ void SetSamplerOperation::deinitExecution() this->m_reader = NULL; } -void SetSamplerOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SetSamplerOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - this->m_reader->read(output, x, y, this->m_sampler); + this->m_reader->readSampled(output, x, y, this->m_sampler); } diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.h b/source/blender/compositor/operations/COM_SetSamplerOperation.h index c94e174fc81..145d82bd407 100644 --- a/source/blender/compositor/operations/COM_SetSamplerOperation.h +++ b/source/blender/compositor/operations/COM_SetSamplerOperation.h @@ -44,7 +44,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); }; diff --git a/source/blender/compositor/operations/COM_SetValueOperation.cpp b/source/blender/compositor/operations/COM_SetValueOperation.cpp index c5ce3e4c09c..51e09a63051 100644 --- a/source/blender/compositor/operations/COM_SetValueOperation.cpp +++ b/source/blender/compositor/operations/COM_SetValueOperation.cpp @@ -27,7 +27,7 @@ SetValueOperation::SetValueOperation() : NodeOperation() this->addOutputSocket(COM_DT_VALUE); } -void SetValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SetValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { output[0] = this->m_value; } diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h index b88b85d66f2..7cb914ffa48 100644 --- a/source/blender/compositor/operations/COM_SetValueOperation.h +++ b/source/blender/compositor/operations/COM_SetValueOperation.h @@ -46,7 +46,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); bool isSetOperation() const { return true; } diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.cpp b/source/blender/compositor/operations/COM_SetVectorOperation.cpp index d5c665e81f5..17212d78e15 100644 --- a/source/blender/compositor/operations/COM_SetVectorOperation.cpp +++ b/source/blender/compositor/operations/COM_SetVectorOperation.cpp @@ -28,7 +28,7 @@ SetVectorOperation::SetVectorOperation() : NodeOperation() this->addOutputSocket(COM_DT_VECTOR); } -void SetVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SetVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { output[0] = this->m_x; output[1] = this->m_y; diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.h b/source/blender/compositor/operations/COM_SetVectorOperation.h index d15da58e58e..6fd1b9768fc 100644 --- a/source/blender/compositor/operations/COM_SetVectorOperation.h +++ b/source/blender/compositor/operations/COM_SetVectorOperation.h @@ -54,7 +54,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); bool isSetOperation() const { return true; } diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp index ac2cee8eb44..d047198ac93 100644 --- a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp +++ b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp @@ -39,9 +39,9 @@ void SocketProxyOperation::deinitExecution() this->m_inputOperation = NULL; } -void SocketProxyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SocketProxyOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { if (this->m_inputOperation) { - this->m_inputOperation->read(output, x, y, sampler); + this->m_inputOperation->readSampled(output, x, y, sampler); } } diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.h b/source/blender/compositor/operations/COM_SocketProxyOperation.h index a37384455ca..6a6a0b351b0 100644 --- a/source/blender/compositor/operations/COM_SocketProxyOperation.h +++ b/source/blender/compositor/operations/COM_SocketProxyOperation.h @@ -30,7 +30,7 @@ private: SocketReader *m_inputOperation; public: SocketProxyOperation(DataType type); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp index a7dbccfc2f7..210095f3bf1 100644 --- a/source/blender/compositor/operations/COM_SplitOperation.cpp +++ b/source/blender/compositor/operations/COM_SplitOperation.cpp @@ -57,15 +57,15 @@ void SplitOperation::deinitExecution() this->m_image2Input = NULL; } -void SplitOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void SplitOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int perc = this->m_xSplit ? this->m_splitPercentage * this->getWidth() / 100.0f : this->m_splitPercentage * this->getHeight() / 100.0f; bool image1 = this->m_xSplit ? x > perc : y > perc; if (image1) { - this->m_image1Input->read(output, x, y, COM_PS_NEAREST); + this->m_image1Input->readSampled(output, x, y, COM_PS_NEAREST); } else { - this->m_image2Input->read(output, x, y, COM_PS_NEAREST); + this->m_image2Input->readSampled(output, x, y, COM_PS_NEAREST); } } diff --git a/source/blender/compositor/operations/COM_SplitOperation.h b/source/blender/compositor/operations/COM_SplitOperation.h index 5a042b789d8..2853c845d03 100644 --- a/source/blender/compositor/operations/COM_SplitOperation.h +++ b/source/blender/compositor/operations/COM_SplitOperation.h @@ -35,7 +35,7 @@ public: SplitOperation(); void initExecution(); void deinitExecution(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); void setSplitPercentage(float splitPercentage) { this->m_splitPercentage = splitPercentage; } void setXSplit(bool xsplit) { this->m_xSplit = xsplit; } diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp index bbb7c8b5289..96aea56050f 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.cpp +++ b/source/blender/compositor/operations/COM_TextureOperation.cpp @@ -75,16 +75,16 @@ void TextureBaseOperation::determineResolution(unsigned int resolution[2], unsig } } -void TextureAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void TextureAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - TextureBaseOperation::executePixel(output, x, y, sampler); + TextureBaseOperation::executePixelSampled(output, x, y, sampler); output[0] = output[3]; output[1] = 0.0f; output[2] = 0.0f; output[3] = 0.0f; } -void TextureBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void TextureBaseOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL}; float textureSize[4]; @@ -96,8 +96,8 @@ void TextureBaseOperation::executePixel(float output[4], float x, float y, Pixel const float u = (x - cx) / this->getWidth() * 2; const float v = (y - cy) / this->getHeight() * 2; - this->m_inputSize->read(textureSize, x, y, sampler); - this->m_inputOffset->read(textureOffset, x, y, sampler); + this->m_inputSize->readSampled(textureSize, x, y, sampler); + this->m_inputOffset->readSampled(textureOffset, x, y, sampler); vec[0] = textureSize[0] * (u + textureOffset[0]); vec[1] = textureSize[1] * (v + textureOffset[1]); @@ -136,7 +136,7 @@ MemoryBuffer *TextureBaseOperation::createMemoryBuffer(rcti *rect2) for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++, data += 4) { - this->executePixel(data, x, y, COM_PS_NEAREST); + this->executePixelSampled(data, x, y, COM_PS_NEAREST); } } diff --git a/source/blender/compositor/operations/COM_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h index b776f6f2493..064e63c025a 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.h +++ b/source/blender/compositor/operations/COM_TextureOperation.h @@ -62,7 +62,7 @@ protected: MemoryBuffer *createMemoryBuffer(rcti *rect2); public: - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void setTexture(Tex *texture) { this->m_texture = texture; } void initExecution(); @@ -79,7 +79,7 @@ public: class TextureAlphaOperation : public TextureBaseOperation { public: TextureAlphaOperation(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp index 4f00358633a..721b17bcff0 100644 --- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp +++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp @@ -102,7 +102,7 @@ void TrackPositionOperation::initExecution() } } -void TrackPositionOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void TrackPositionOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { output[0] = this->m_markerPos[this->m_axis] - this->m_relativePos[this->m_axis]; diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.h b/source/blender/compositor/operations/COM_TrackPositionOperation.h index 7a4ce9f9213..10dbaf96646 100644 --- a/source/blender/compositor/operations/COM_TrackPositionOperation.h +++ b/source/blender/compositor/operations/COM_TrackPositionOperation.h @@ -70,7 +70,7 @@ public: void initExecution(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); bool isSetOperation() const { return true; } }; diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp index e2582c3b67b..64da954a2e1 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.cpp +++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp @@ -52,14 +52,14 @@ void TranslateOperation::deinitExecution() } -void TranslateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void TranslateOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { ensureDelta(); float originalXPos = x - this->getDeltaX(); float originalYPos = y - this->getDeltaY(); - this->m_inputOperation->read(output, originalXPos, originalYPos, sampler); + this->m_inputOperation->readSampled(output, originalXPos, originalYPos, sampler); } bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h index a638ae7ce69..f2ae976e2ef 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.h +++ b/source/blender/compositor/operations/COM_TranslateOperation.h @@ -38,7 +38,7 @@ private: public: TranslateOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void initExecution(); void deinitExecution(); @@ -49,9 +49,9 @@ public: inline void ensureDelta() { if (!this->m_isDeltaSet) { float tempDelta[4]; - this->m_inputXOperation->read(tempDelta, 0, 0, COM_PS_NEAREST); + this->m_inputXOperation->readSampled(tempDelta, 0, 0, COM_PS_NEAREST); this->m_deltaX = tempDelta[0]; - this->m_inputYOperation->read(tempDelta, 0, 0, COM_PS_NEAREST); + this->m_inputYOperation->readSampled(tempDelta, 0, 0, COM_PS_NEAREST); this->m_deltaY = tempDelta[0]; this->m_isDeltaSet = true; } diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp index 03031e0f764..8bdaa0f486e 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp @@ -338,7 +338,7 @@ voi *InverseSearchRadiusOperation::initializeTileData(rcti *rect) return data; } -void InverseSearchRadiusOperation::executePixel(float output[4], int x, int y, void *data) +void InverseSearchRadiusOperation::executePixelChunk(float output[4], int x, int y, void *data) { MemoryBuffer *buffer = (MemoryBuffer *)data; buffer->readNoCheck(color, x, y); diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h index 7ba8df16795..cab38698296 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h @@ -85,7 +85,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], int x, int y, MemoryBuffer *inputBuffers[], void *data); + void executePixelChunk(float output[4], int x, int y, void *data); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp index 6450b0716a3..204b0f2011b 100644 --- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp +++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp @@ -43,12 +43,12 @@ void VectorCurveOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void VectorCurveOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void VectorCurveOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float input[4]; - this->m_inputProgram->read(input, x, y, sampler); + this->m_inputProgram->readSampled(input, x, y, sampler); curvemapping_evaluate_premulRGBF(this->m_curveMapping, output, input); output[3] = input[3]; diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.h b/source/blender/compositor/operations/COM_VectorCurveOperation.h index 6a1f916c60b..677af77b05e 100644 --- a/source/blender/compositor/operations/COM_VectorCurveOperation.h +++ b/source/blender/compositor/operations/COM_VectorCurveOperation.h @@ -37,7 +37,7 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); /** * Initialize the execution diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp index 97be44e2be0..13b50910b50 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.cpp +++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp @@ -101,18 +101,18 @@ void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber) for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2; x++) { - this->m_imageInput->read(&(buffer[offset4]), x, y, COM_PS_NEAREST); + this->m_imageInput->readSampled(&(buffer[offset4]), x, y, COM_PS_NEAREST); if (this->m_ignoreAlpha) { buffer[offset4 + 3] = 1.0f; } else { if (this->m_alphaInput != NULL) { - this->m_alphaInput->read(alpha, x, y, COM_PS_NEAREST); + this->m_alphaInput->readSampled(alpha, x, y, COM_PS_NEAREST); buffer[offset4 + 3] = alpha[0]; } } if (m_depthInput) { - this->m_depthInput->read(depth, x, y, COM_PS_NEAREST); + this->m_depthInput->readSampled(depth, x, y, COM_PS_NEAREST); depthbuffer[offset] = depth[0]; } diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp index ea19952f60c..e6cde05eae2 100644 --- a/source/blender/compositor/operations/COM_WrapOperation.cpp +++ b/source/blender/compositor/operations/COM_WrapOperation.cpp @@ -42,7 +42,7 @@ inline float WrapOperation::getWrappedOriginalYPos(float y) return fmodf(y, this->getHeight()); } -void WrapOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void WrapOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float nx, ny; nx = x; diff --git a/source/blender/compositor/operations/COM_WrapOperation.h b/source/blender/compositor/operations/COM_WrapOperation.h index ddd5fa8032d..33ea1280564 100644 --- a/source/blender/compositor/operations/COM_WrapOperation.h +++ b/source/blender/compositor/operations/COM_WrapOperation.h @@ -31,7 +31,7 @@ private: public: WrapOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); void setWrapping(int wrapping_type); float getWrappedOriginalXPos(float x); diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp index c73cb3ae325..832864b399d 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp @@ -40,9 +40,9 @@ WriteBufferOperation::~WriteBufferOperation() } } -void WriteBufferOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void WriteBufferOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - this->m_input->read(output, x, y, sampler); + this->m_input->readSampled(output, x, y, sampler); } void WriteBufferOperation::initExecution() @@ -98,7 +98,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber) for (y = y1; y < y2 && (!breaked); y++) { int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS; for (x = x1; x < x2; x++) { - this->m_input->read(&(buffer[offset4]), x, y, COM_PS_NEAREST); + this->m_input->readSampled(&(buffer[offset4]), x, y, COM_PS_NEAREST); offset4 += COM_NUMBER_OF_CHANNELS; } if (isBreaked()) { diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.h b/source/blender/compositor/operations/COM_WriteBufferOperation.h index 157543fcb72..1f1f58b18f1 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.h +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.h @@ -39,7 +39,7 @@ public: ~WriteBufferOperation(); int isBufferOperation() { return true; } MemoryProxy *getMemoryProxy() { return this->m_memoryProxy; } - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); const bool isWriteBufferOperation() const { return true; } bool isSingleValue() const { return m_single_value; } diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp index 7db91a40fb7..6cb88919b1b 100644 --- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp +++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp @@ -46,36 +46,36 @@ void ZCombineOperation::initExecution() this->m_depth2Reader = this->getInputSocketReader(3); } -void ZCombineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ZCombineOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float depth1[4]; float depth2[4]; - this->m_depth1Reader->read(depth1, x, y, sampler); - this->m_depth2Reader->read(depth2, x, y, sampler); + this->m_depth1Reader->readSampled(depth1, x, y, sampler); + this->m_depth2Reader->readSampled(depth2, x, y, sampler); if (depth1[0] < depth2[0]) { - this->m_image1Reader->read(output, x, y, sampler); + this->m_image1Reader->readSampled(output, x, y, sampler); } else { - this->m_image2Reader->read(output, x, y, sampler); + this->m_image2Reader->readSampled(output, x, y, sampler); } } -void ZCombineAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ZCombineAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float depth1[4]; float depth2[4]; float color1[4]; float color2[4]; - this->m_depth1Reader->read(depth1, x, y, sampler); - this->m_depth2Reader->read(depth2, x, y, sampler); + this->m_depth1Reader->readSampled(depth1, x, y, sampler); + this->m_depth2Reader->readSampled(depth2, x, y, sampler); if (depth1[0] <= depth2[0]) { - this->m_image1Reader->read(color1, x, y, sampler); - this->m_image2Reader->read(color2, x, y, sampler); + this->m_image1Reader->readSampled(color1, x, y, sampler); + this->m_image2Reader->readSampled(color2, x, y, sampler); } else { - this->m_image1Reader->read(color2, x, y, sampler); - this->m_image2Reader->read(color1, x, y, sampler); + this->m_image1Reader->readSampled(color2, x, y, sampler); + this->m_image2Reader->readSampled(color1, x, y, sampler); } float fac = color1[3]; float ifac = 1.0f - fac; @@ -113,28 +113,28 @@ void ZCombineMaskOperation::initExecution() this->m_image2Reader = this->getInputSocketReader(2); } -void ZCombineMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ZCombineMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float mask[4]; float color1[4]; float color2[4]; - this->m_maskReader->read(mask, x, y, sampler); - this->m_image1Reader->read(color1, x, y, sampler); - this->m_image2Reader->read(color2, x, y, sampler); + this->m_maskReader->readSampled(mask, x, y, sampler); + this->m_image1Reader->readSampled(color1, x, y, sampler); + this->m_image2Reader->readSampled(color2, x, y, sampler); interp_v4_v4v4(output, color1, color2, 1.0f - mask[0]); } -void ZCombineMaskAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ZCombineMaskAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float mask[4]; float color1[4]; float color2[4]; - this->m_maskReader->read(mask, x, y, sampler); - this->m_image1Reader->read(color1, x, y, sampler); - this->m_image2Reader->read(color2, x, y, sampler); + this->m_maskReader->readSampled(mask, x, y, sampler); + this->m_image1Reader->readSampled(color1, x, y, sampler); + this->m_image2Reader->readSampled(color2, x, y, sampler); float fac = (1.0f - mask[0]) * (1.0f - color1[3]) + mask[0] * color2[3]; float mfac = 1.0f - fac; diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.h b/source/blender/compositor/operations/COM_ZCombineOperation.h index eeeb29d330f..199120fa3be 100644 --- a/source/blender/compositor/operations/COM_ZCombineOperation.h +++ b/source/blender/compositor/operations/COM_ZCombineOperation.h @@ -47,11 +47,11 @@ public: /** * the inner loop of this program */ - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class ZCombineAlphaOperation : public ZCombineOperation { - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class ZCombineMaskOperation : public NodeOperation { @@ -64,10 +64,10 @@ public: void initExecution(); void deinitExecution(); - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class ZCombineMaskAlphaOperation : public ZCombineMaskOperation { - void executePixel(float output[4], float x, float y, PixelSampler sampler); + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif |