code cleanup: compositor - define size for executePixel function output float array
authorCampbell Barton <ideasman42@gmail.com>
Fri, 10 Aug 2012 14:07:24 +0000 (14:07 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 10 Aug 2012 14:07:24 +0000 (14:07 +0000)
251 files changed:
source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp
source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h
source/blender/compositor/intern/COM_SocketReader.h
source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
source/blender/compositor/operations/COM_AntiAliasOperation.cpp
source/blender/compositor/operations/COM_AntiAliasOperation.h
source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
source/blender/compositor/operations/COM_BilateralBlurOperation.h
source/blender/compositor/operations/COM_BokehBlurOperation.cpp
source/blender/compositor/operations/COM_BokehBlurOperation.h
source/blender/compositor/operations/COM_BokehImageOperation.cpp
source/blender/compositor/operations/COM_BokehImageOperation.h
source/blender/compositor/operations/COM_BoxMaskOperation.cpp
source/blender/compositor/operations/COM_BoxMaskOperation.h
source/blender/compositor/operations/COM_BrightnessOperation.cpp
source/blender/compositor/operations/COM_BrightnessOperation.h
source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
source/blender/compositor/operations/COM_CalculateMeanOperation.h
source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
source/blender/compositor/operations/COM_ChangeHSVOperation.h
source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
source/blender/compositor/operations/COM_ChannelMatteOperation.h
source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
source/blender/compositor/operations/COM_ChromaMatteOperation.h
source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
source/blender/compositor/operations/COM_ColorCorrectionOperation.h
source/blender/compositor/operations/COM_ColorCurveOperation.cpp
source/blender/compositor/operations/COM_ColorCurveOperation.h
source/blender/compositor/operations/COM_ColorMatteOperation.cpp
source/blender/compositor/operations/COM_ColorMatteOperation.h
source/blender/compositor/operations/COM_ColorRampOperation.cpp
source/blender/compositor/operations/COM_ColorRampOperation.h
source/blender/compositor/operations/COM_ColorSpillOperation.cpp
source/blender/compositor/operations/COM_ColorSpillOperation.h
source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
source/blender/compositor/operations/COM_CombineChannelsOperation.h
source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp
source/blender/compositor/operations/COM_ConvertColorToValueProg.h
source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp
source/blender/compositor/operations/COM_ConvertValueToColorProg.h
source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
source/blender/compositor/operations/COM_CropOperation.cpp
source/blender/compositor/operations/COM_CropOperation.h
source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
source/blender/compositor/operations/COM_DifferenceMatteOperation.h
source/blender/compositor/operations/COM_DilateErodeOperation.cpp
source/blender/compositor/operations/COM_DilateErodeOperation.h
source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
source/blender/compositor/operations/COM_DirectionalBlurOperation.h
source/blender/compositor/operations/COM_DisplaceOperation.cpp
source/blender/compositor/operations/COM_DisplaceOperation.h
source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
source/blender/compositor/operations/COM_DistanceMatteOperation.h
source/blender/compositor/operations/COM_DotproductOperation.cpp
source/blender/compositor/operations/COM_DotproductOperation.h
source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
source/blender/compositor/operations/COM_EllipseMaskOperation.h
source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
source/blender/compositor/operations/COM_FlipOperation.cpp
source/blender/compositor/operations/COM_FlipOperation.h
source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
source/blender/compositor/operations/COM_GammaCorrectOperation.h
source/blender/compositor/operations/COM_GammaOperation.cpp
source/blender/compositor/operations/COM_GammaOperation.h
source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
source/blender/compositor/operations/COM_GaussianXBlurOperation.h
source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
source/blender/compositor/operations/COM_GaussianYBlurOperation.h
source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
source/blender/compositor/operations/COM_GlareThresholdOperation.h
source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
source/blender/compositor/operations/COM_IDMaskOperation.cpp
source/blender/compositor/operations/COM_IDMaskOperation.h
source/blender/compositor/operations/COM_ImageOperation.cpp
source/blender/compositor/operations/COM_ImageOperation.h
source/blender/compositor/operations/COM_InpaintOperation.cpp
source/blender/compositor/operations/COM_InpaintOperation.h
source/blender/compositor/operations/COM_InvertOperation.cpp
source/blender/compositor/operations/COM_InvertOperation.h
source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
source/blender/compositor/operations/COM_KeyingBlurOperation.h
source/blender/compositor/operations/COM_KeyingClipOperation.cpp
source/blender/compositor/operations/COM_KeyingClipOperation.h
source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
source/blender/compositor/operations/COM_KeyingDespillOperation.h
source/blender/compositor/operations/COM_KeyingOperation.cpp
source/blender/compositor/operations/COM_KeyingOperation.h
source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
source/blender/compositor/operations/COM_KeyingScreenOperation.h
source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
source/blender/compositor/operations/COM_LuminanceMatteOperation.h
source/blender/compositor/operations/COM_MapUVOperation.cpp
source/blender/compositor/operations/COM_MapUVOperation.h
source/blender/compositor/operations/COM_MapValueOperation.cpp
source/blender/compositor/operations/COM_MapValueOperation.h
source/blender/compositor/operations/COM_MaskOperation.cpp
source/blender/compositor/operations/COM_MaskOperation.h
source/blender/compositor/operations/COM_MathBaseOperation.cpp
source/blender/compositor/operations/COM_MathBaseOperation.h
source/blender/compositor/operations/COM_MixAddOperation.cpp
source/blender/compositor/operations/COM_MixAddOperation.h
source/blender/compositor/operations/COM_MixBaseOperation.cpp
source/blender/compositor/operations/COM_MixBaseOperation.h
source/blender/compositor/operations/COM_MixBlendOperation.cpp
source/blender/compositor/operations/COM_MixBlendOperation.h
source/blender/compositor/operations/COM_MixBurnOperation.cpp
source/blender/compositor/operations/COM_MixBurnOperation.h
source/blender/compositor/operations/COM_MixColorOperation.cpp
source/blender/compositor/operations/COM_MixColorOperation.h
source/blender/compositor/operations/COM_MixDarkenOperation.cpp
source/blender/compositor/operations/COM_MixDarkenOperation.h
source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
source/blender/compositor/operations/COM_MixDifferenceOperation.h
source/blender/compositor/operations/COM_MixDivideOperation.cpp
source/blender/compositor/operations/COM_MixDivideOperation.h
source/blender/compositor/operations/COM_MixDodgeOperation.cpp
source/blender/compositor/operations/COM_MixDodgeOperation.h
source/blender/compositor/operations/COM_MixGlareOperation.cpp
source/blender/compositor/operations/COM_MixGlareOperation.h
source/blender/compositor/operations/COM_MixHueOperation.cpp
source/blender/compositor/operations/COM_MixHueOperation.h
source/blender/compositor/operations/COM_MixLightenOperation.cpp
source/blender/compositor/operations/COM_MixLightenOperation.h
source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
source/blender/compositor/operations/COM_MixLinearLightOperation.h
source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
source/blender/compositor/operations/COM_MixMultiplyOperation.h
source/blender/compositor/operations/COM_MixOverlayOperation.cpp
source/blender/compositor/operations/COM_MixOverlayOperation.h
source/blender/compositor/operations/COM_MixSaturationOperation.cpp
source/blender/compositor/operations/COM_MixSaturationOperation.h
source/blender/compositor/operations/COM_MixScreenOperation.cpp
source/blender/compositor/operations/COM_MixScreenOperation.h
source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
source/blender/compositor/operations/COM_MixSoftLightOperation.h
source/blender/compositor/operations/COM_MixSubtractOperation.cpp
source/blender/compositor/operations/COM_MixSubtractOperation.h
source/blender/compositor/operations/COM_MixValueOperation.cpp
source/blender/compositor/operations/COM_MixValueOperation.h
source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
source/blender/compositor/operations/COM_MovieClipOperation.cpp
source/blender/compositor/operations/COM_MovieClipOperation.h
source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
source/blender/compositor/operations/COM_MovieDistortionOperation.h
source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
source/blender/compositor/operations/COM_MultilayerImageOperation.h
source/blender/compositor/operations/COM_NormalizeOperation.cpp
source/blender/compositor/operations/COM_NormalizeOperation.h
source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
source/blender/compositor/operations/COM_ReadBufferOperation.cpp
source/blender/compositor/operations/COM_ReadBufferOperation.h
source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
source/blender/compositor/operations/COM_RenderLayersBaseProg.h
source/blender/compositor/operations/COM_RotateOperation.cpp
source/blender/compositor/operations/COM_RotateOperation.h
source/blender/compositor/operations/COM_ScaleOperation.cpp
source/blender/compositor/operations/COM_ScaleOperation.h
source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
source/blender/compositor/operations/COM_SeparateChannelOperation.h
source/blender/compositor/operations/COM_SetAlphaOperation.cpp
source/blender/compositor/operations/COM_SetAlphaOperation.h
source/blender/compositor/operations/COM_SetColorOperation.cpp
source/blender/compositor/operations/COM_SetColorOperation.h
source/blender/compositor/operations/COM_SetSamplerOperation.cpp
source/blender/compositor/operations/COM_SetSamplerOperation.h
source/blender/compositor/operations/COM_SetValueOperation.cpp
source/blender/compositor/operations/COM_SetValueOperation.h
source/blender/compositor/operations/COM_SetVectorOperation.cpp
source/blender/compositor/operations/COM_SetVectorOperation.h
source/blender/compositor/operations/COM_SocketProxyOperation.cpp
source/blender/compositor/operations/COM_SocketProxyOperation.h
source/blender/compositor/operations/COM_TextureOperation.cpp
source/blender/compositor/operations/COM_TextureOperation.h
source/blender/compositor/operations/COM_TonemapOperation.cpp
source/blender/compositor/operations/COM_TonemapOperation.h
source/blender/compositor/operations/COM_TrackPositionOperation.cpp
source/blender/compositor/operations/COM_TrackPositionOperation.h
source/blender/compositor/operations/COM_TranslateOperation.cpp
source/blender/compositor/operations/COM_TranslateOperation.h
source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
source/blender/compositor/operations/COM_VectorBlurOperation.cpp
source/blender/compositor/operations/COM_VectorBlurOperation.h
source/blender/compositor/operations/COM_VectorCurveOperation.cpp
source/blender/compositor/operations/COM_VectorCurveOperation.h
source/blender/compositor/operations/COM_WriteBufferOperation.cpp
source/blender/compositor/operations/COM_WriteBufferOperation.h
source/blender/compositor/operations/COM_ZCombineOperation.cpp
source/blender/compositor/operations/COM_ZCombineOperation.h

index d14b8c48c89b2e602222d5dfe04741f61bfad7b2..7d1184cb356d1f5621a19e2ca62d65ad13f64b11 100644 (file)
@@ -33,9 +33,9 @@ void SingleThreadedNodeOperation::initExecution()
        initMutex();
 }
 
-void SingleThreadedNodeOperation::executePixel(float *color, int x, int y, void *data)
+void SingleThreadedNodeOperation::executePixel(float output[4], int x, int y, void *data)
 {
-       this->m_cachedInstance->readNoCheck(color, x, y);
+       this->m_cachedInstance->readNoCheck(output, x, y);
 }
 
 void SingleThreadedNodeOperation::deinitExecution()
index 68951eab5070f857e8550eb5b718386b5aac4419..45325be18a9969c39f6f5eb122f0a2ff5ab09200 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 736dd2fc8b6befe602e10f878779c70f9c089a02..279ca8ebdb83b6361fe9f78438a0f802d1513172 100644 (file)
@@ -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 *result, float x, float y, PixelSampler sampler) {}
+       virtual void executePixel(float output[4], float x, float y, PixelSampler sampler) {}
 
        /**
         * @brief calculate a single pixel
@@ -74,8 +74,8 @@ protected:
         * @param inputBuffers chunks that can be read by their ReadBufferOperation.
         * @param chunkData chunk specific data a during execution time.
         */
-       virtual void executePixel(float *result, int x, int y, void *chunkData) {
-               executePixel(result, x, y, COM_PS_NEAREST);
+       virtual void executePixel(float output[4], int x, int y, void *chunkData) {
+               executePixel(output, x, y, COM_PS_NEAREST);
        }
 
        /**
@@ -88,7 +88,7 @@ protected:
         * @param dy
         * @param inputBuffers chunks that can be read by their ReadBufferOperation.
         */
-       virtual void executePixel(float *result, float x, float y, float dx, float dy) {}
+       virtual void executePixel(float output[4], float x, float y, float dx, float dy) {}
 
 public:
        inline void read(float *result, float x, float y, PixelSampler sampler) {
index 406a98f81e9be1cededb24ae3d40785267249e01..6cc9aae4553b89ea181a698c9d8d5247bc001df2 100644 (file)
@@ -27,7 +27,7 @@ AlphaOverKeyOperation::AlphaOverKeyOperation() : MixBaseOperation()
        /* pass */
 }
 
-void AlphaOverKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void AlphaOverKeyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputOverColor[4];
@@ -38,18 +38,18 @@ void AlphaOverKeyOperation::executePixel(float *outputValue, float x, float y, P
        this->m_inputColor2Operation->read(inputOverColor, x, y, sampler);
        
        if (inputOverColor[3] <= 0.0f) {
-               copy_v4_v4(outputValue, inputColor1);
+               copy_v4_v4(output, inputColor1);
        }
        else if (value[0] == 1.0f && inputOverColor[3] >= 1.0f) {
-               copy_v4_v4(outputValue, inputOverColor);
+               copy_v4_v4(output, inputOverColor);
        }
        else {
                float premul = value[0] * inputOverColor[3];
                float mul = 1.0f - premul;
        
-               outputValue[0] = (mul * inputColor1[0]) + premul * inputOverColor[0];
-               outputValue[1] = (mul * inputColor1[1]) + premul * inputOverColor[1];
-               outputValue[2] = (mul * inputColor1[2]) + premul * inputOverColor[2];
-               outputValue[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
+               output[0] = (mul * inputColor1[0]) + premul * inputOverColor[0];
+               output[1] = (mul * inputColor1[1]) + premul * inputOverColor[1];
+               output[2] = (mul * inputColor1[2]) + premul * inputOverColor[2];
+               output[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
        }
 }
index 5f430efb98e717834102e5989aa74c68dc886f5f..fa884bacf4912bc07924d192bdc2a498dfbcd881 100644 (file)
@@ -39,6 +39,6 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 #endif
index b94486b5b4f06a2719a33b53ae54170c984959fc..111dc899e1d08659a22c499a4a6852f747046d91 100644 (file)
@@ -27,7 +27,7 @@ AlphaOverMixedOperation::AlphaOverMixedOperation() : MixBaseOperation()
        this->m_x = 0.0f;
 }
 
-void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float y, PixelSampler sampler)
+void AlphaOverMixedOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputOverColor[4];
@@ -38,20 +38,20 @@ void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float
        this->m_inputColor2Operation->read(inputOverColor, x, y, sampler);
        
        if (inputOverColor[3] <= 0.0f) {
-               copy_v4_v4(outputValue, inputColor1);
+               copy_v4_v4(output, inputColor1);
        }
        else if (value[0] == 1.0f && inputOverColor[3] >= 1.0f) {
-               copy_v4_v4(outputValue, inputOverColor);
+               copy_v4_v4(output, inputOverColor);
        }
        else {
                float addfac = 1.0f - this->m_x + inputOverColor[3] * this->m_x;
                float premul = value[0] * addfac;
                float mul = 1.0f - value[0] * inputOverColor[3];
 
-               outputValue[0] = (mul * inputColor1[0]) + premul * inputOverColor[0];
-               outputValue[1] = (mul * inputColor1[1]) + premul * inputOverColor[1];
-               outputValue[2] = (mul * inputColor1[2]) + premul * inputOverColor[2];
-               outputValue[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
+               output[0] = (mul * inputColor1[0]) + premul * inputOverColor[0];
+               output[1] = (mul * inputColor1[1]) + premul * inputOverColor[1];
+               output[2] = (mul * inputColor1[2]) + premul * inputOverColor[2];
+               output[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
        }
 }
 
index 308f139884d67639fe90a41a8ace8a692cd6a301..911284547832704215d2d6aa9aa80ac541901e92 100644 (file)
@@ -41,7 +41,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void setX(float x) { this->m_x = x; }
 };
index dad43f3b1792cea7e813ce6fdbd54378b97127ee..ac7906f2f9814e59a8177fae5c81d151835d3cc5 100644 (file)
@@ -27,7 +27,7 @@ AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() : MixBaseOperatio
        /* pass */
 }
 
-void AlphaOverPremultiplyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void AlphaOverPremultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputOverColor[4];
@@ -39,18 +39,18 @@ void AlphaOverPremultiplyOperation::executePixel(float *outputValue, float x, fl
        
        /* Zero alpha values should still permit an add of RGB data */
        if (inputOverColor[3] < 0.0f) {
-               copy_v4_v4(outputValue, inputColor1);
+               copy_v4_v4(output, inputColor1);
        }
        else if (value[0] == 1.0f && inputOverColor[3] >= 1.0f) {
-               copy_v4_v4(outputValue, inputOverColor);
+               copy_v4_v4(output, inputOverColor);
        }
        else {
                float mul = 1.0f - value[0] * inputOverColor[3];
        
-               outputValue[0] = (mul * inputColor1[0]) + value[0] * inputOverColor[0];
-               outputValue[1] = (mul * inputColor1[1]) + value[0] * inputOverColor[1];
-               outputValue[2] = (mul * inputColor1[2]) + value[0] * inputOverColor[2];
-               outputValue[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
+               output[0] = (mul * inputColor1[0]) + value[0] * inputOverColor[0];
+               output[1] = (mul * inputColor1[1]) + value[0] * inputOverColor[1];
+               output[2] = (mul * inputColor1[2]) + value[0] * inputOverColor[2];
+               output[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3];
        }
 }
 
index 37ddc6dcda5db3aa2757de81303043a50693a519..d6e9e31c35fcb6696035e2aade3f34c520bd7f47 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index 27ba2ef51f62b1466d83cefa1f247649f3fa8265..12bf651992e205259922d79f5ec5bb8ff84557f0 100644 (file)
@@ -42,14 +42,14 @@ void AntiAliasOperation::initExecution()
        NodeOperation::initMutex();
 }
 
-void AntiAliasOperation::executePixel(float *color, int x, int y, void *data)
+void AntiAliasOperation::executePixel(float output[4], int x, int y, void *data)
 {
        if (y < 0 || (unsigned int)y >= this->m_height || x < 0 || (unsigned int)x >= this->m_width) {
-               color[0] = 0.0f;
+               output[0] = 0.0f;
        }
        else {
                int offset = y * this->m_width + x;
-               color[0] = this->m_buffer[offset] / 255.0f;
+               output[0] = this->m_buffer[offset] / 255.0f;
        }
        
 }
index 7489d2e393a74ee2396bc773b2e5d901ad4ff0e1..385d59fec3c58daf5eb6e34831106bb5ca450307 100644 (file)
@@ -43,7 +43,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 1db3ecb2db85638f96cf9ed5fd0afd6ef4e19e73..5f5eca963785f9365ec1e20a8d924ed29140a07a 100644 (file)
@@ -46,7 +46,7 @@ void BilateralBlurOperation::initExecution()
        QualityStepHelper::initExecution(COM_QH_INCREASE);
 }
 
-void BilateralBlurOperation::executePixel(float *color, int x, int y, void *data)
+void BilateralBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        // read the determinator color at x, y, this will be used as the reference color for the determinator
        float determinatorReferenceColor[4];
@@ -82,13 +82,13 @@ void BilateralBlurOperation::executePixel(float *color, int x, int y, void *data
        }
        
        if (blurDivider > 0.0f) {
-               mul_v4_v4fl(color, blurColor, 1.0f / blurDivider);
+               mul_v4_v4fl(output, blurColor, 1.0f / blurDivider);
        }
        else {
-               color[0] = 0.0f;
-               color[1] = 0.0f;
-               color[2] = 0.0f;
-               color[3] = 1.0f;
+               output[0] = 0.0f;
+               output[1] = 0.0f;
+               output[2] = 0.0f;
+               output[3] = 1.0f;
        }
 }
 
index c1b5f764f0198ac4815289fe83f54a24cff3df61..8def90941abcf47047ac7875a0f51cb0f793fdfe 100644 (file)
@@ -38,7 +38,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 7d126eb0539bf2c9565671985e2e1dcb6437b8f9..b31974487edf9c55d0797dcdcaa80248c754aa80 100644 (file)
@@ -74,7 +74,7 @@ void BokehBlurOperation::initExecution()
        QualityStepHelper::initExecution(COM_QH_INCREASE);
 }
 
-void BokehBlurOperation::executePixel(float *color, int x, int y, void *data)
+void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float color_accum[4];
        float tempBoundingBox[4];
@@ -124,13 +124,13 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, void *data)
                                bufferindex += offsetadd;
                        }
                }
-               color[0] = color_accum[0] * (1.0f / multiplier_accum[0]);
-               color[1] = color_accum[1] * (1.0f / multiplier_accum[1]);
-               color[2] = color_accum[2] * (1.0f / multiplier_accum[2]);
-               color[3] = color_accum[3] * (1.0f / multiplier_accum[3]);
+               output[0] = color_accum[0] * (1.0f / multiplier_accum[0]);
+               output[1] = color_accum[1] * (1.0f / multiplier_accum[1]);
+               output[2] = color_accum[2] * (1.0f / multiplier_accum[2]);
+               output[3] = color_accum[3] * (1.0f / multiplier_accum[3]);
        }
        else {
-               this->m_inputProgram->read(color, x, y, COM_PS_NEAREST);
+               this->m_inputProgram->read(output, x, y, COM_PS_NEAREST);
        }
 }
 
index 646587197a9517893d01f0fe5196d06f7ba05ac9..37483d3dc69e754089307a475631420388a04844 100644 (file)
@@ -43,7 +43,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 979d08390c13dc9f19db347bd795b31d59c39648..b87be33eca19929ea926f3a26161e7fb086303f0 100644 (file)
@@ -85,7 +85,7 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
        }
        return insideBokeh;
 }
-void BokehImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void BokehImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float shift = this->m_data->lensshift;
        float shift2 = shift / 2.0f;
@@ -94,16 +94,16 @@ void BokehImageOperation::executePixel(float *color, float x, float y, PixelSamp
        float insideBokehMed = isInsideBokeh(distance - fabsf(shift2 * distance), x, y);
        float insideBokehMin = isInsideBokeh(distance - fabsf(shift * distance), x, y);
        if (shift < 0) {
-               color[0] = insideBokehMax;
-               color[1] = insideBokehMed;
-               color[2] = insideBokehMin;
+               output[0] = insideBokehMax;
+               output[1] = insideBokehMed;
+               output[2] = insideBokehMin;
        }
        else {
-               color[0] = insideBokehMin;
-               color[1] = insideBokehMed;
-               color[2] = insideBokehMax;
+               output[0] = insideBokehMin;
+               output[1] = insideBokehMed;
+               output[2] = insideBokehMax;
        }
-       color[3] = (insideBokehMax + insideBokehMed + insideBokehMin) / 3.0f;
+       output[3] = (insideBokehMax + insideBokehMed + insideBokehMin) / 3.0f;
 }
 
 void BokehImageOperation::deinitExecution()
index 5be4e033ea0a20056fba169b344c828af416cc06..fe86e162eb236edb2d449cf75d15565d80d6a7b8 100644 (file)
@@ -45,7 +45,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index a0fb37f4310eaf940717705774cf7fec3be58df1..52f844627618a294ec83da66375b4c2c52ed9e3e 100644 (file)
@@ -44,7 +44,7 @@ void BoxMaskOperation::initExecution()
        this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
 }
 
-void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void BoxMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputMask[4];
        float inputValue[4];
@@ -70,40 +70,40 @@ void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler
        switch (this->m_maskType) {
                case CMP_NODE_MASKTYPE_ADD:
                        if (inside) {
-                               color[0] = max(inputMask[0], inputValue[0]);
+                               output[0] = max(inputMask[0], inputValue[0]);
                        }
                        else {
-                               color[0] = inputMask[0];
+                               output[0] = inputMask[0];
                        }
                        break;
                case CMP_NODE_MASKTYPE_SUBTRACT:
                        if (inside) {
-                               color[0] = inputMask[0] - inputValue[0];
-                               CLAMP(color[0], 0, 1);
+                               output[0] = inputMask[0] - inputValue[0];
+                               CLAMP(output[0], 0, 1);
                        }
                        else {
-                               color[0] = inputMask[0];
+                               output[0] = inputMask[0];
                        }
                        break;
                case CMP_NODE_MASKTYPE_MULTIPLY:
                        if (inside) {
-                               color[0] = inputMask[0] * inputValue[0];
+                               output[0] = inputMask[0] * inputValue[0];
                        }
                        else {
-                               color[0] = 0;
+                               output[0] = 0;
                        }
                        break;
                case CMP_NODE_MASKTYPE_NOT:
                        if (inside) {
                                if (inputMask[0] > 0.0f) {
-                                       color[0] = 0;
+                                       output[0] = 0;
                                }
                                else {
-                                       color[0] = inputValue[0];
+                                       output[0] = inputValue[0];
                                }
                        }
                        else {
-                               color[0] = inputMask[0];
+                               output[0] = inputMask[0];
                        }
                        break;
        }
index 5a6745d9a9b8f0e818efe6e96e63c88a51593686..f39d74829d4e48d867f88becca11ca02c09850a3 100644 (file)
@@ -45,7 +45,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 9a6a930c7c9c4a820831b58054394f4daa2a91e8..0613540250c222b8c8f5dbee3b6fff297457ed98 100644 (file)
@@ -37,7 +37,7 @@ void BrightnessOperation::initExecution()
        this->m_inputContrastProgram = this->getInputSocketReader(2);
 }
 
-void BrightnessOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void BrightnessOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        float a, b;
@@ -65,10 +65,10 @@ void BrightnessOperation::executePixel(float *color, float x, float y, PixelSamp
                b = a * (brightness + delta);
        }
        
-       color[0] = a * inputValue[0] + b;
-       color[1] = a * inputValue[1] + b;
-       color[2] = a * inputValue[2] + b;
-       color[3] = inputValue[3];
+       output[0] = a * inputValue[0] + b;
+       output[1] = a * inputValue[1] + b;
+       output[2] = a * inputValue[2] + b;
+       output[3] = inputValue[3];
 }
 
 void BrightnessOperation::deinitExecution()
index 2a6200ad9df8c40d5839716a006433d9fa4c0cac..1c8eda63e940d4eb2630a82676696952aa45052b 100644 (file)
@@ -40,7 +40,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index b0cfdb44736b85e09428ca19a8df1e18c4630110..a2954a20e90da1f6a1465c64f6cca8e19f898a78 100644 (file)
@@ -42,9 +42,9 @@ void CalculateMeanOperation::initExecution()
        NodeOperation::initMutex();
 }
 
-void CalculateMeanOperation::executePixel(float *color, int x, int y, void *data)
+void CalculateMeanOperation::executePixel(float output[4], int x, int y, void *data)
 {
-       color[0] = this->m_result;
+       output[0] = this->m_result;
 }
 
 void CalculateMeanOperation::deinitExecution()
index 097275333060753446494a5a140de3ba5cf5ccb1..53edea4977e2dc7442d2152c820dcec135c9e730 100644 (file)
@@ -46,7 +46,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index de602ba1dd6d48d995b5d177c3c7be47e580171f..e8268adff7a0f8c781e5b12a29e9570a44c2021a 100644 (file)
@@ -31,9 +31,9 @@ CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : Cal
        /* pass */
 }
 
-void CalculateStandardDeviationOperation::executePixel(float *color, int x, int y, void *data)
+void CalculateStandardDeviationOperation::executePixel(float output[4], int x, int y, void *data)
 {
-       color[0] = this->m_standardDeviation;
+       output[0] = this->m_standardDeviation;
 }
 
 void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect)
index 311cedd7d32999dc74690a12110d1044bc21cca2..92c4b7fa4a06e2e861ad66ddf0e4d618cf92691c 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
 
        void *initializeTileData(rcti *rect);
 
index 7a6a22e5c051d21ac56627583fc5b5413b49f3fb..e6e93774685091c8ea29e75964ace9ec51d8d113 100644 (file)
@@ -39,17 +39,17 @@ void ChangeHSVOperation::deinitExecution()
        this->m_inputOperation = NULL;
 }
 
-void ChangeHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ChangeHSVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        
        this->m_inputOperation->read(inputColor1, x, y, sampler);
        
-       outputValue[0] = inputColor1[0] + (this->m_hue - 0.5f);
-       if      (outputValue[0] > 1.0f) outputValue[0] -= 1.0f;
-       else if (outputValue[0] < 0.0f) outputValue[0] += 1.0f;
-       outputValue[1] = inputColor1[1] * this->m_saturation;
-       outputValue[2] = inputColor1[2] * this->m_value;
-       outputValue[3] = inputColor1[3];
+       output[0] = inputColor1[0] + (this->m_hue - 0.5f);
+       if      (output[0] > 1.0f) output[0] -= 1.0f;
+       else if (output[0] < 0.0f) output[0] += 1.0f;
+       output[1] = inputColor1[1] * this->m_saturation;
+       output[2] = inputColor1[2] * this->m_value;
+       output[3] = inputColor1[3];
 }
 
index e5660e44f7306db16a007d740e5b4a2199ca1c2f..57e5dc991e9483861f9f06daf1d4150c6bbde416 100644 (file)
@@ -49,7 +49,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(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; }
index e0e68f902891335b124f05c2ebfe87ec0a404c02..234a1c7b1e5ccbd6377a5d59aa8cb584ae059190 100644 (file)
@@ -83,7 +83,7 @@ void ChannelMatteOperation::deinitExecution()
        this->m_inputImageProgram = NULL;
 }
 
-void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ChannelMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inColor[4];
        float alpha;
@@ -116,6 +116,6 @@ void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, P
         */
        
        /* don't make something that was more transparent less transparent */
-       outputValue[0] = min(alpha, inColor[3]);
+       output[0] = min(alpha, inColor[3]);
 }
 
index a02d0618a4c7553146b17529b74e0d00573f77a9..17f84965f63c22eb5b38f177bab5194282df3f1a 100644 (file)
@@ -59,7 +59,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        void initExecution();
        void deinitExecution();
index 4be03e9d9149224142bec81e86cebcdcf6498717..c2406abaa65dedb97e22a05008781cca75dad899 100644 (file)
@@ -44,7 +44,7 @@ void ChromaMatteOperation::deinitExecution()
        this->m_inputKeyProgram = NULL;
 }
 
-void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ChromaMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inKey[4];
        float inImage[4];
@@ -88,14 +88,14 @@ void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, Pi
 
                /* don't make something that was more transparent less transparent */
                if (alpha < inImage[3]) {
-                       outputValue[0] = alpha;
+                       output[0] = alpha;
                }
                else {
-                       outputValue[0] = inImage[3];
+                       output[0] = inImage[3];
                }
        }
        else { /*pixel is outside key color */
-               outputValue[0] = inImage[3]; /* make pixel just as transparent as it was before */
+               output[0] = inImage[3]; /* make pixel just as transparent as it was before */
        }
 }
 
index 37b58fa45ed380e840965f24351f0a91fd3f9b46..adebb7a30c261ee9b6bfbedc074f1cc78d6f8f67 100644 (file)
@@ -42,7 +42,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        void initExecution();
        void deinitExecution();
index 33e6db22ef4d86eb82a84f662e8da471eb50acba..dfbbef8c56e3a0be0aa6ac8a9d392fff35c76089 100644 (file)
@@ -49,7 +49,7 @@ void ColorBalanceASCCDLOperation::initExecution()
        this->m_inputColorOperation = this->getInputSocketReader(1);
 }
 
-void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler)
+void ColorBalanceASCCDLOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        float value[4];
@@ -61,10 +61,10 @@ void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, floa
        fac = min(1.0f, fac);
        const float mfac = 1.0f - fac;
        
-       outputColor[0] = mfac * inputColor[0] + fac *colorbalance_cdl(inputColor[0], this->m_lift[0], this->m_gamma[0], this->m_gain[0]);
-       outputColor[1] = mfac * inputColor[1] + fac *colorbalance_cdl(inputColor[1], this->m_lift[1], this->m_gamma[1], this->m_gain[1]);
-       outputColor[2] = mfac * inputColor[2] + fac *colorbalance_cdl(inputColor[2], this->m_lift[2], this->m_gamma[2], this->m_gain[2]);
-       outputColor[3] = inputColor[3];
+       output[0] = mfac * inputColor[0] + fac *colorbalance_cdl(inputColor[0], this->m_lift[0], this->m_gamma[0], this->m_gain[0]);
+       output[1] = mfac * inputColor[1] + fac *colorbalance_cdl(inputColor[1], this->m_lift[1], this->m_gamma[1], this->m_gain[1]);
+       output[2] = mfac * inputColor[2] + fac *colorbalance_cdl(inputColor[2], this->m_lift[2], this->m_gamma[2], this->m_gain[2]);
+       output[3] = inputColor[3];
 
 }
 
index d6361ea16ba24a56c1b773d5041aa9a9fbdb1d2a..17fb5f67be9072cba5237739c75862e6ebb7c055 100644 (file)
@@ -49,7 +49,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index b0691925361a8a94e844a101d9d454edb04fd0ac..7e9c10df0a91c5d6cf494ef2e9ed4a80609b534a 100644 (file)
@@ -54,7 +54,7 @@ void ColorBalanceLGGOperation::initExecution()
        this->m_inputColorOperation = this->getInputSocketReader(1);
 }
 
-void ColorBalanceLGGOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler)
+void ColorBalanceLGGOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        float value[4];
@@ -66,10 +66,10 @@ void ColorBalanceLGGOperation::executePixel(float *outputColor, float x, float y
        fac = min(1.0f, fac);
        const float mfac = 1.0f - fac;
        
-       outputColor[0] = mfac * inputColor[0] + fac *colorbalance_lgg(inputColor[0], this->m_lift[0], this->m_gamma_inv[0], this->m_gain[0]);
-       outputColor[1] = mfac * inputColor[1] + fac *colorbalance_lgg(inputColor[1], this->m_lift[1], this->m_gamma_inv[1], this->m_gain[1]);
-       outputColor[2] = mfac * inputColor[2] + fac *colorbalance_lgg(inputColor[2], this->m_lift[2], this->m_gamma_inv[2], this->m_gain[2]);
-       outputColor[3] = inputColor[3];
+       output[0] = mfac * inputColor[0] + fac * colorbalance_lgg(inputColor[0], this->m_lift[0], this->m_gamma_inv[0], this->m_gain[0]);
+       output[1] = mfac * inputColor[1] + fac * colorbalance_lgg(inputColor[1], this->m_lift[1], this->m_gamma_inv[1], this->m_gain[1]);
+       output[2] = mfac * inputColor[2] + fac * colorbalance_lgg(inputColor[2], this->m_lift[2], this->m_gamma_inv[2], this->m_gain[2]);
+       output[3] = inputColor[3];
 
 }
 
index c3d44c53e5310a7a815cc17b4e186acff21d88ac..edc824475c28ca4cc21c2478aff117779b3157d9 100644 (file)
@@ -50,7 +50,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index ebc818b0f7e48ca7ac9341f76124abdce53c8926..b7a3f43237a385f7c353e6ce3ae44c373ff10e0f 100644 (file)
@@ -40,7 +40,7 @@ void ColorCorrectionOperation::initExecution()
        this->m_inputMask = this->getInputSocketReader(1);
 }
 
-void ColorCorrectionOperation::executePixel(float *output, float x, float y, PixelSampler sampler)
+void ColorCorrectionOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputImageColor[4];
        float inputMask[4];
index 685413741fa4abaa9f9d14068e9f0cb7f22f163a..018e67b7adabb7c4fbd4bbd34b972e8cd033e72d 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 88bd673a19fbf0f759168e062bfc986b95869687..44784837301f5630e85f05d80fe5f974703e4fbc 100644 (file)
@@ -58,7 +58,7 @@ void ColorCurveOperation::initExecution()
 
 }
 
-void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ColorCurveOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        CurveMapping *cumap = this->m_curveMapping;
        CurveMapping *workingCopy = (CurveMapping *)MEM_dupallocN(cumap);
@@ -77,18 +77,18 @@ void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSamp
        this->m_inputImageProgram->read(image, x, y, sampler);
 
        if (*fac >= 1.0f)
-               curvemapping_evaluate_premulRGBF(workingCopy, color, image);
+               curvemapping_evaluate_premulRGBF(workingCopy, output, image);
        else if (*fac <= 0.0f) {
-               copy_v3_v3(color, image);
+               copy_v3_v3(output, image);
        }
        else {
                float col[4], mfac = 1.0f - *fac;
                curvemapping_evaluate_premulRGBF(workingCopy, col, image);
-               color[0] = mfac * image[0] + *fac * col[0];
-               color[1] = mfac * image[1] + *fac * col[1];
-               color[2] = mfac * image[2] + *fac * col[2];
+               output[0] = mfac * image[0] + *fac * col[0];
+               output[1] = mfac * image[1] + *fac * col[1];
+               output[2] = mfac * image[2] + *fac * col[2];
        }
-       color[3] = image[3];
+       output[3] = image[3];
        MEM_freeN(workingCopy);
 }
 
@@ -126,7 +126,7 @@ void ConstantLevelColorCurveOperation::initExecution()
        curvemapping_set_black_white(this->m_curveMapping, this->m_black, this->m_white);
 }
 
-void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ConstantLevelColorCurveOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float fac[4];
        float image[4];
@@ -136,18 +136,18 @@ void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float
        this->m_inputImageProgram->read(image, x, y, sampler);
 
        if (*fac >= 1.0f)
-               curvemapping_evaluate_premulRGBF(this->m_curveMapping, color, image);
+               curvemapping_evaluate_premulRGBF(this->m_curveMapping, output, image);
        else if (*fac <= 0.0f) {
-               copy_v3_v3(color, image);
+               copy_v3_v3(output, image);
        }
        else {
                float col[4], mfac = 1.0f - *fac;
                curvemapping_evaluate_premulRGBF(this->m_curveMapping, col, image);
-               color[0] = mfac * image[0] + *fac * col[0];
-               color[1] = mfac * image[1] + *fac * col[1];
-               color[2] = mfac * image[2] + *fac * col[2];
+               output[0] = mfac * image[0] + *fac * col[0];
+               output[1] = mfac * image[1] + *fac * col[1];
+               output[2] = mfac * image[2] + *fac * col[2];
        }
-       color[3] = image[3];
+       output[3] = image[3];
 }
 
 void ConstantLevelColorCurveOperation::deinitExecution()
index beb2e16298a5e0667f9947eae32cbcb4127d98eb..063873c6443e431c1f8604efa370ec731dad5bfa 100644 (file)
@@ -41,7 +41,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(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 *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 26fbd99b43aeca73da9376239470ede2897fdf69..d73196e42f564c762e41fd0306faad4fa4b41bab 100644 (file)
@@ -44,7 +44,7 @@ void ColorMatteOperation::deinitExecution()
        this->m_inputKeyProgram = NULL;
 }
 
-void ColorMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ColorMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inColor[4];
        float inKey[4];
@@ -75,11 +75,11 @@ void ColorMatteOperation::executePixel(float *outputValue, float x, float y, Pix
            /* hue */ ((h_wrap = 2.f * fabsf(inColor[0] - inKey[0])) < hue || (2.f - h_wrap) < hue)
            )
        {
-               outputValue[0] = 0.0f; /* make transparent */
+               output[0] = 0.0f; /* make transparent */
        }
 
        else { /*pixel is outside key color */
-               outputValue[0] = inColor[3]; /* make pixel just as transparent as it was before */
+               output[0] = inColor[3]; /* make pixel just as transparent as it was before */
        }
 }
 
index de7c4dd8ce2d8e26e19d4e3d8832ded8c8ab34fa..582a94e1873864765d7cbb7f8289982f8a1405b2 100644 (file)
@@ -42,7 +42,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        void initExecution();
        void deinitExecution();
index edd7df89c818e67f5e1a79f4331dd6249e04d8ab..1618c83aecefdaa45bca9a4fa764e1da4becbfb4 100644 (file)
@@ -43,12 +43,12 @@ void ColorRampOperation::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void ColorRampOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ColorRampOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float values[4];
 
        this->m_inputProgram->read(values, x, y, sampler);
-       do_colorband(this->m_colorBand, values[0], color);
+       do_colorband(this->m_colorBand, values[0], output);
 }
 
 void ColorRampOperation::deinitExecution()
index c5f3fe449debc691d1498cda13eeddeb915d68f5..96d9a525e1ef1d5b325801dd2c06ad1e7cf96283 100644 (file)
@@ -38,7 +38,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 2c0bfc10bb04229c2ec0f972d42d9c99b7f9abc3..152b10709fb5eab8872c6b4eb78805c9f8fa872e 100644 (file)
@@ -84,7 +84,7 @@ void ColorSpillOperation::deinitExecution()
        this->m_inputFacReader = NULL;
 }
 
-void ColorSpillOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ColorSpillOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float fac[4];
        float input[4];
@@ -93,13 +93,13 @@ void ColorSpillOperation::executePixel(float *outputValue, float x, float y, Pix
        float rfac = min(1.0f, fac[0]);
        float map = calculateMapValue(rfac, input);
        if (map > 0.0f) {
-               outputValue[0] = input[0] + this->m_rmut * (this->m_settings->uspillr * map);
-               outputValue[1] = input[1] + this->m_gmut * (this->m_settings->uspillg * map);
-               outputValue[2] = input[2] + this->m_bmut * (this->m_settings->uspillb * map);
-               outputValue[3] = input[3];
+               output[0] = input[0] + this->m_rmut * (this->m_settings->uspillr * map);
+               output[1] = input[1] + this->m_gmut * (this->m_settings->uspillg * map);
+               output[2] = input[2] + this->m_bmut * (this->m_settings->uspillb * map);
+               output[3] = input[3];
        }
        else {
-               copy_v4_v4(outputValue, input);
+               copy_v4_v4(output, input);
        }       
 }
 float ColorSpillOperation::calculateMapValue(float fac, float *input)
index ea443f2a5a1f796d265e8d068d176b057459f610..94ff78c37b24ce6bb9924c531b39254dbaea9665 100644 (file)
@@ -46,7 +46,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        void initExecution();
        void deinitExecution();
index 354fe51c068c6572684f6ac0970b81a8162057ee..ded686bb5de0ed8477da07b09ee10ed9a7b9b061 100644 (file)
@@ -79,24 +79,24 @@ void CombineChannelsOperation::deinitExecution()
 }
 
 
-void CombineChannelsOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void CombineChannelsOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float input[4];
        /// @todo: remove if statements
        if (this->m_inputChannel1Operation) {
                this->m_inputChannel1Operation->read(input, x, y, sampler);
-               color[0] = input[0];
+               output[0] = input[0];
        }
        if (this->m_inputChannel2Operation) {
                this->m_inputChannel2Operation->read(input, x, y, sampler);
-               color[1] = input[0];
+               output[1] = input[0];
        }
        if (this->m_inputChannel3Operation) {
                this->m_inputChannel3Operation->read(input, x, y, sampler);
-               color[2] = input[0];
+               output[2] = input[0];
        }
        if (this->m_inputChannel4Operation) {
                this->m_inputChannel4Operation->read(input, x, y, sampler);
-               color[3] = input[0];
+               output[3] = input[0];
        }
 }
index ff1251a3949a7812c40600250cf78c6fd00b17cc..460eb9bdcb13316756700eb566f4b6789afc644d 100644 (file)
@@ -33,7 +33,7 @@ private:
        SocketReader *m_inputChannel4Operation;
 public:
        CombineChannelsOperation();
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void initExecution();
        void deinitExecution();
index c7272d461d62c292bddc54377fddd560aaeadaf4..79ce149e79033c92f9c3856c9546a52ec1fedae8 100644 (file)
@@ -38,11 +38,11 @@ void ConvertColorProfileOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertColorProfileOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertColorProfileOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float color[4];
        this->m_inputOperation->read(color, x, y, sampler);
-       IMB_buffer_float_from_float(outputValue, color, 4, this->m_toProfile, this->m_fromProfile, this->m_predivided, 1, 1, 0, 0);
+       IMB_buffer_float_from_float(output, color, 4, this->m_toProfile, this->m_fromProfile, this->m_predivided, 1, 1, 0, 0);
 }
 
 void ConvertColorProfileOperation::deinitExecution()
index 09d96a92d95c279578e78b55ea0c3d9abd7a32fa..a8cbc613fb8d52f9bcf013e8f15a7c95fc32ed9d 100644 (file)
@@ -59,7 +59,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 4da09a69a15bf9255e6e0f2f1cffb884b8929b18..9cff5e8eaa655fbdea3e3f656d44e207baa70bcc 100644 (file)
@@ -34,11 +34,11 @@ void ConvertColorToBWOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertColorToBWOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertColorToBWOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(&inputColor[0], x, y, sampler);
-       outputValue[0] = rgb_to_bw(inputColor);
+       output[0] = rgb_to_bw(inputColor);
 }
 
 void ConvertColorToBWOperation::deinitExecution()
index a9951af2e3b207558f2c65da471ef11a3e088047..963bd32a2f6e5a43d0053740d5e1c5d84a40ab31 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 17bd34d51b019280db29db92f31ae444ac4712c2..3a65519864a18a2f126076fffe6a3014920845a6 100644 (file)
@@ -34,11 +34,11 @@ void ConvertColorToValueProg::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertColorToValueProg::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertColorToValueProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(&inputColor[0], x, y, sampler);
-       outputValue[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
+       output[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
 }
 
 void ConvertColorToValueProg::deinitExecution()
index 6a20d4bf27afa740f3ca622f00d2798f210fc134..5c25d5d05400e31880145277d082d9f694d3bb32 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index ec1f0fd37e4a423edc986da959d2a49a15619251..a9b8cbb42725c1f8571d2130b84ea82c37fe1d76 100644 (file)
@@ -34,9 +34,9 @@ void ConvertColorToVectorOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertColorToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertColorToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
-       this->m_inputOperation->read(outputValue, x, y, sampler);
+       this->m_inputOperation->read(output, x, y, sampler);
 }
 
 void ConvertColorToVectorOperation::deinitExecution()
index 861807db8dbc70592e20c297f317318354f5ec86..93644cb5d1c0dc1d966b3244fca33a28df268544 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index efe641b1fe50ec7e889d1a314ca049d2c7eaca11..88289f12ebbf8a602187cd9054a13e99cfe60fa5 100644 (file)
@@ -72,7 +72,7 @@ void ConvertDepthToRadiusOperation::initExecution()
        }
 }
 
-void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertDepthToRadiusOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        float z;
@@ -94,9 +94,11 @@ void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, fl
                if (radius > this->m_maxRadius) {
                        radius = this->m_maxRadius;
                }
-               outputValue[0] = radius;
+               output[0] = radius;
+       }
+       else {
+               output[0] = 0.0f;
        }
-       else outputValue[0] = 0.0f;
 }
 
 void ConvertDepthToRadiusOperation::deinitExecution()
index 4f80ef69f437c53c00918364c7c95a2aa937799f..d5a1fd72cbfd691220386d06ed19a299b2a6cf17 100644 (file)
@@ -54,7 +54,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 4b42de26f59b9104e0140456298ea83a31466e5b..65907a8e537e4111b3c73a3c9ab5bf9617da0b96 100644 (file)
@@ -35,12 +35,12 @@ void ConvertHSVToRGBOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertHSVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertHSVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(inputColor, x, y, sampler);
-       hsv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
-       outputValue[3] = inputColor[3];
+       hsv_to_rgb_v(inputColor, output);
+       output[3] = inputColor[3];
 }
 
 void ConvertHSVToRGBOperation::deinitExecution()
index 28ce70170a0f8c69d8c3f539a3eee5bd74fc8284..17419ca2a0538b5d7c5e7fdd83533814b454f058 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 787b1a4547cc8bf1b52fc5bcf234bc3702548731..4497db52a0f99c37911fb36a61af76b68b74c539 100644 (file)
@@ -35,7 +35,7 @@ void ConvertKeyToPremulOperation::initExecution()
        this->m_inputColor = getInputSocketReader(0);
 }
 
-void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertKeyToPremulOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        float alpha;
@@ -43,10 +43,10 @@ void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, floa
        this->m_inputColor->read(inputValue, x, y, sampler);
        alpha = inputValue[3];
 
-       mul_v3_v3fl(outputValue, inputValue, alpha);
+       mul_v3_v3fl(output, inputValue, alpha);
 
        /* never touches the alpha */
-       outputValue[3] = alpha;
+       output[3] = alpha;
 }
 
 void ConvertKeyToPremulOperation::deinitExecution()
index a1a8836a69099458e32e2c7cbe4774dfac5319e6..502674e26dbac6729f7be9fcf22e8acddc5a945e 100644 (file)
@@ -40,7 +40,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        void initExecution();
        void deinitExecution();
index 22cfdd2f5724b0d67615ec0522f220e7711a4e06..b92da4c324f7eec01f6e900540a77acb41002493 100644 (file)
@@ -35,7 +35,7 @@ void ConvertPremulToKeyOperation::initExecution()
        this->m_inputColor = getInputSocketReader(0);
 }
 
-void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertPremulToKeyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        float alpha;
@@ -44,14 +44,14 @@ void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, floa
        alpha = inputValue[3];
 
        if (fabsf(alpha) < 1e-5f) {
-               zero_v3(outputValue);
+               zero_v3(output);
        }
        else {
-               mul_v3_v3fl(outputValue, inputValue, 1.0f / alpha);
+               mul_v3_v3fl(output, inputValue, 1.0f / alpha);
        }
 
        /* never touches the alpha */
-       outputValue[3] = alpha;
+       output[3] = alpha;
 }
 
 void ConvertPremulToKeyOperation::deinitExecution()
index fb83a06c25d53891bb8b0323dd84e9998890ee5f..04a9965858df94927e571b85739a7b388b797e76 100644 (file)
@@ -40,7 +40,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        void initExecution();
        void deinitExecution();
index 8478eac75b0c6c49ed56d8c8a2567a2bacf4c415..3c7a9d5fd50ec395b733a2f43e716bb8aa72ff6a 100644 (file)
@@ -35,12 +35,12 @@ void ConvertRGBToHSVOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertRGBToHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertRGBToHSVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(inputColor, x, y, sampler);
-       rgb_to_hsv(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
-       outputValue[3] = inputColor[3];
+       rgb_to_hsv_v(inputColor, output);
+       output[3] = inputColor[3];
 }
 
 void ConvertRGBToHSVOperation::deinitExecution()
index 09f6c7e48a65ecf75de529fcd2a875e773c5eb61..fdc8dfed31b8bb57c2fa7037ca8ff1690186d356 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 52aa1d7a12367f84117e338e550b827a7cfd4ce6..6f6dffdc72b98f1aafc83a0565b6286065e8a62d 100644 (file)
@@ -50,7 +50,7 @@ void ConvertRGBToYCCOperation::setMode(int mode)
        }
 }
 
-void ConvertRGBToYCCOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertRGBToYCCOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        float color[3];
@@ -60,8 +60,8 @@ void ConvertRGBToYCCOperation::executePixel(float *outputValue, float x, float y
 
        /* divided by 255 to normalize for viewing in */
        /* R,G,B --> Y,Cb,Cr */
-       mul_v3_v3fl(outputValue, color, 1.0f / 255.0f);
-       outputValue[3] = inputColor[3];
+       mul_v3_v3fl(output, color, 1.0f / 255.0f);
+       output[3] = inputColor[3];
 }
 
 void ConvertRGBToYCCOperation::deinitExecution()
index 7f4eb6d73183be8c57b87b967674ebbe1d62ed1c..3f85555f3bbc264ab86d48cd53575af79e39d7c6 100644 (file)
@@ -48,7 +48,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        /**
         * Initialize the execution
index 2206a066a3716e31ec55817fc2ca9248de535326..8ce9e1500806f6f6e886fe083f2c9bf5af168778 100644 (file)
@@ -34,12 +34,12 @@ void ConvertRGBToYUVOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertRGBToYUVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertRGBToYUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(inputColor, x, y, sampler);
-       rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
-       outputValue[3] = inputColor[3];
+       rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]);
+       output[3] = inputColor[3];
 }
 
 void ConvertRGBToYUVOperation::deinitExecution()
index f7b3da800b3019260f36477e33cb503b35243180..97d57f657ec7801dfb47de6b8a97f155fb39e9cd 100644 (file)
@@ -43,7 +43,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 330ffd00acbcc66f55bb5604cd71a7960c957f06..98e7650aa563a7db2f08d77467cf488ea8bba234 100644 (file)
@@ -33,14 +33,12 @@ void ConvertValueToColorProg::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void ConvertValueToColorProg::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ConvertValueToColorProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        this->m_inputProgram->read(inputValue, x, y, sampler);
-       color[0] = inputValue[0];
-       color[1] = inputValue[0];
-       color[2] = inputValue[0];
-       color[3] = 1.0f;
+       output[0] = output[1] = output[2] = inputValue[0];
+       output[3] = 1.0f;
 }
 
 void ConvertValueToColorProg::deinitExecution()
index 2fa5edcf09b1d6bf7fe2f1647a9d26b0ad717aeb..f0f6cfb8fd2a88b3bd27c9bb171db151f1c92935 100644 (file)
@@ -37,7 +37,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 54a5b0dbd0e5fba818f85b44b361468122246082..411409d263cb6792c89151656b351bced8ddf2cf 100644 (file)
@@ -34,14 +34,14 @@ void ConvertValueToVectorOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertValueToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertValueToVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float input[4];
        this->m_inputOperation->read(input, x, y, sampler);
-       outputValue[0] = input[0];
-       outputValue[1] = input[0];
-       outputValue[2] = input[0];
-       outputValue[3] = 0.0f;
+       output[0] = input[0];
+       output[1] = input[0];
+       output[2] = input[0];
+       output[3] = 0.0f;
 }
 
 void ConvertValueToVectorOperation::deinitExecution()
index c0936a32eb5c180260648cb005d19ea2a57a94df..da45848ca341270949a29d0686be67ff56ab05e5 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 9fb9a2e0705d567a7166241b0ed7145691a1757c..78cb706c32d7c670e2131e20c376ec6a6bb79679 100644 (file)
@@ -34,10 +34,10 @@ void ConvertVectorToColorOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertVectorToColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertVectorToColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
-       this->m_inputOperation->read(outputValue, x, y, sampler);
-       outputValue[3] = 1.0f;
+       this->m_inputOperation->read(output, x, y, sampler);
+       output[3] = 1.0f;
 }
 
 void ConvertVectorToColorOperation::deinitExecution()
index a062c452a917eeec63c5b9752f4c6c7fdd077b9f..9ef5f8fece3c7a715f95061415c17ccdd9ac99f0 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 23b552f1dbe9882bb1d2d811bd107d3e3e4ddddb..a361241402956c1c0b851baf402e5cccea6cb88c 100644 (file)
@@ -34,11 +34,11 @@ void ConvertVectorToValueOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertVectorToValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertVectorToValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float input[4];
        this->m_inputOperation->read(input, x, y, sampler);
-       outputValue[0] = (input[0] + input[1] + input[2]) / 3.0f;
+       output[0] = (input[0] + input[1] + input[2]) / 3.0f;
 }
 
 void ConvertVectorToValueOperation::deinitExecution()
index b662f3eed6c07270035d28258a3a47f4f340e3b3..e42f235a12bd2990fc90efc764a33c05df9eac20 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 88a7e7dedd9215f445dd1cde11dad9fa186a265d..8f9eaf49ea4039fb346f77a280e594302f0f2ded 100644 (file)
@@ -50,7 +50,7 @@ void ConvertYCCToRGBOperation::setMode(int mode)
        }
 }
 
-void ConvertYCCToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertYCCToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(inputColor, x, y, sampler);
@@ -59,8 +59,8 @@ void ConvertYCCToRGBOperation::executePixel(float *outputValue, float x, float y
        /* R,G,B --> Y,Cb,Cr */
        mul_v3_fl(inputColor, 255.0f);
 
-       ycc_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2], this->m_mode);
-       outputValue[3] = inputColor[3];
+       ycc_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2], this->m_mode);
+       output[3] = inputColor[3];
 }
 
 void ConvertYCCToRGBOperation::deinitExecution()
index a8e03bcb807810233d371842aa7711ffceaa772f..0a8b67e0beef06de8e75e6bcb2c43f0c29614e67 100644 (file)
@@ -48,7 +48,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        /**
         * Initialize the execution
index 1a5e7cbf2a66dc1a36e1588dc48f92eaf9ebe4fb..197c7f9f0436bf3380c3e2d53323054dfd41c9b4 100644 (file)
@@ -34,12 +34,12 @@ void ConvertYUVToRGBOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void ConvertYUVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void ConvertYUVToRGBOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputOperation->read(inputColor, x, y, sampler);
-       yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
-       outputValue[3] = inputColor[3];
+       yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &output[0], &output[1], &output[2]);
+       output[3] = inputColor[3];
 }
 
 void ConvertYUVToRGBOperation::deinitExecution()
index 80321ae37d26ff0a27b0c9ec636abf45b634db9c..ee11ef8df60fcb9a37adfc271d19401aca730f12 100644 (file)
@@ -43,7 +43,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 90bda5c8d2cdad84d977163fab3e6e5aa244cc12..657126d458c2566a549fae471211cddc6d959ab3 100644 (file)
@@ -28,9 +28,9 @@ ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation() : ConvolutionFi
        /* pass */
 }
 
-void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, void *data)
+void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y, void *data)
 {
-       float in1[4], in2[4], res1[4], res2[4];
+       float in1[4], in2[4], res1[4] = {0.0}, res2[4] = {0.0};
 
        int x1 = x - 1;
        int x2 = x;
@@ -48,16 +48,7 @@ void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, vo
        float value[4];
        this->m_inputValueOperation->read(value, x2, y2, NULL);
        float mval = 1.0f - value[0];
-       
-       res1[0] = 0.0f;
-       res1[1] = 0.0f;
-       res1[2] = 0.0f;
-       res1[3] = 0.0f;
-       res2[0] = 0.0f;
-       res2[1] = 0.0f;
-       res2[2] = 0.0f;
-       res2[3] = 0.0f;
-       
+
        this->m_inputOperation->read(in1, x1, y1, NULL);
        madd_v3_v3fl(res1, in1, this->m_filter[0]);
        madd_v3_v3fl(res2, in1, this->m_filter[0]);
@@ -94,13 +85,13 @@ void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, vo
        madd_v3_v3fl(res1, in1, this->m_filter[8]);
        madd_v3_v3fl(res2, in1, this->m_filter[8]);
        
-       color[0] = sqrt(res1[0] * res1[0] + res2[0] * res2[0]);
-       color[1] = sqrt(res1[1] * res1[1] + res2[1] * res2[1]);
-       color[2] = sqrt(res1[2] * res1[2] + res2[2] * res2[2]);
+       output[0] = sqrt(res1[0] * res1[0] + res2[0] * res2[0]);
+       output[1] = sqrt(res1[1] * res1[1] + res2[1] * res2[1]);
+       output[2] = sqrt(res1[2] * res1[2] + res2[2] * res2[2]);
        
-       color[0] = color[0] * value[0] + in2[0] * mval;
-       color[1] = color[1] * value[0] + in2[1] * mval;
-       color[2] = color[2] * value[0] + in2[2] * mval;
+       output[0] = output[0] * value[0] + in2[0] * mval;
+       output[1] = output[1] * value[0] + in2[1] * mval;
+       output[2] = output[2] * value[0] + in2[2] * mval;
        
-       color[3] = in2[3];
+       output[3] = in2[3];
 }
index b96b8785524c995bebe161bb0088e44647a4968f..c666dc2cd428edef3ce0f2e47cddf286c000584c 100644 (file)
@@ -28,7 +28,7 @@
 class ConvolutionEdgeFilterOperation : public ConvolutionFilterOperation {
 public:
        ConvolutionEdgeFilterOperation();
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
 };
 
 #endif
index 6c1e434ab41368b602bb2c8c3d1adf9839daff11..fd593b39dcdbd8df8cfa71e49ceff595c200ee87 100644 (file)
@@ -67,7 +67,7 @@ void ConvolutionFilterOperation::deinitExecution()
 }
 
 
-void ConvolutionFilterOperation::executePixel(float *color, int x, int y, void *data)
+void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float in1[4];
        float in2[4];
@@ -87,30 +87,30 @@ void ConvolutionFilterOperation::executePixel(float *color, int x, int y, void *
        this->m_inputValueOperation->read(value, x2, y2, NULL);
        const float mval = 1.0f - value[0];
 
-       zero_v4(color);
+       zero_v4(output);
        this->m_inputOperation->read(in1, x1, y1, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[0]);
+       madd_v4_v4fl(output, in1, this->m_filter[0]);
        this->m_inputOperation->read(in1, x2, y1, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[1]);
+       madd_v4_v4fl(output, in1, this->m_filter[1]);
        this->m_inputOperation->read(in1, x3, y1, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[2]);
+       madd_v4_v4fl(output, in1, this->m_filter[2]);
        this->m_inputOperation->read(in1, x1, y2, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[3]);
+       madd_v4_v4fl(output, in1, this->m_filter[3]);
        this->m_inputOperation->read(in2, x2, y2, NULL);
-       madd_v4_v4fl(color, in2, this->m_filter[4]);
+       madd_v4_v4fl(output, in2, this->m_filter[4]);
        this->m_inputOperation->read(in1, x3, y2, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[5]);
+       madd_v4_v4fl(output, in1, this->m_filter[5]);
        this->m_inputOperation->read(in1, x1, y3, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[6]);
+       madd_v4_v4fl(output, in1, this->m_filter[6]);
        this->m_inputOperation->read(in1, x2, y3, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[7]);
+       madd_v4_v4fl(output, in1, this->m_filter[7]);
        this->m_inputOperation->read(in1, x3, y3, NULL);
-       madd_v4_v4fl(color, in1, this->m_filter[8]);
+       madd_v4_v4fl(output, in1, this->m_filter[8]);
        
-       color[0] = color[0] * value[0] + in2[0] * mval;
-       color[1] = color[1] * value[0] + in2[1] * mval;
-       color[2] = color[2] * value[0] + in2[2] * mval;
-       color[3] = color[3] * value[0] + in2[3] * mval;
+       output[0] = output[0] * value[0] + in2[0] * mval;
+       output[1] = output[1] * value[0] + in2[1] * mval;
+       output[2] = output[2] * value[0] + in2[2] * mval;
+       output[3] = output[3] * value[0] + in2[3] * mval;
 }
 
 bool ConvolutionFilterOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
index 88455730c0ed321d79e344648a74c18009bc5847..4c192481ba1ec9792dfa86152333b3bae7acbb59 100644 (file)
@@ -39,7 +39,7 @@ public:
        ConvolutionFilterOperation();
        void set3x3Filter(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9);
        bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        void initExecution();
        void deinitExecution();
index aa10b0f522dcb63eee789159c7acc3105f7f1d02..c33bd2544acc2150852a3be6d813d1ab6839f394 100644 (file)
@@ -73,13 +73,13 @@ CropOperation::CropOperation() : CropBaseOperation()
        /* pass */
 }
 
-void CropOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void CropOperation::executePixel(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(color, x, y, sampler);
+               this->m_inputOperation->read(output, x, y, sampler);
        }
        else {
-               zero_v4(color);
+               zero_v4(output);
        }
 }
 
@@ -108,7 +108,7 @@ void CropImageOperation::determineResolution(unsigned int resolution[2], unsigne
        resolution[1] = this->m_ymax - this->m_ymin;
 }
 
-void CropImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
-       this->m_inputOperation->read(color, (x + this->m_xmin), (y + this->m_ymin), sampler);
+       this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler);
 }
index 6817635243dec567a223b9ab5e76b90d937008b0..ddc7f855bf1a06133f414b6520391914c4944327 100644 (file)
@@ -48,7 +48,7 @@ class CropOperation : public CropBaseOperation {
 private:
 public:
        CropOperation();
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(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 *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index a95d1eec2903e388071fa8c06a8775d7b3d8e577..e23eb26f52708e21ceac823f9640f54e5555069a 100644 (file)
@@ -44,7 +44,7 @@ void DifferenceMatteOperation::deinitExecution()
        this->m_inputImage2Program = NULL;
 }
 
-void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void DifferenceMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inColor1[4];
        float inColor2[4];
@@ -66,7 +66,7 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
 
        /* make 100% transparent */
        if (difference < tolerance) {
-               outputValue[0] = 0.0f;
+               output[0] = 0.0f;
        }
        /*in the falloff region, make partially transparent */
        else if (difference < falloff + tolerance) {
@@ -74,15 +74,15 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
                alpha = difference / falloff;
                /*only change if more transparent than before */
                if (alpha < inColor1[3]) {
-                       outputValue[0] = alpha;
+                       output[0] = alpha;
                }
                else { /* leave as before */
-                       outputValue[0] = inColor1[3];
+                       output[0] = inColor1[3];
                }
        }
        else {
                /* foreground object */
-               outputValue[0] = inColor1[3];
+               output[0] = inColor1[3];
        }
 }
 
index acec6ebf193cff5077a70dd8cf7b1463b7c916d4..e7d881cbbd5ad695faff65b69e3173d6d0ce5f7f 100644 (file)
@@ -43,7 +43,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void initExecution();
        void deinitExecution();
index 0890bc750492ddee4905a6f2ba00fb5b34e29fe0..5e70187557b7552cff0913c698cf77a90f48e507 100644 (file)
@@ -60,7 +60,7 @@ void *DilateErodeThresholdOperation::initializeTileData(rcti *rect)
        return buffer;
 }
 
-void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, void *data)
+void DilateErodeThresholdOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float inputValue[4];
        const float sw = this->m__switch;
@@ -117,28 +117,28 @@ void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, voi
                const float delta = distance - pixelvalue;
                if (delta >= 0.0f) {
                        if (delta >= inset) {
-                               color[0] = 1.0f;
+                               output[0] = 1.0f;
                        }
                        else {
-                               color[0] = delta / inset;
+                               output[0] = delta / inset;
                        }
                }
                else {
-                       color[0] = 0.0f;
+                       output[0] = 0.0f;
                }
        }
        else {
                const float delta = -distance + pixelvalue;
                if (delta < 0.0f) {
                        if (delta < -inset) {
-                               color[0] = 1.0f;
+                               output[0] = 1.0f;
                        }
                        else {
-                               color[0] = (-delta) / inset;
+                               output[0] = (-delta) / inset;
                        }
                }
                else {
-                       color[0] = 0.0f;
+                       output[0] = 0.0f;
                }
        }
 }
@@ -185,7 +185,7 @@ void *DilateDistanceOperation::initializeTileData(rcti *rect)
        return buffer;
 }
 
-void DilateDistanceOperation::executePixel(float *color, int x, int y, void *data)
+void DilateDistanceOperation::executePixel(float output[4], int x, int y, void *data)
 {
        const float distance = this->m_distance;
        const float mindist = distance * distance;
@@ -214,7 +214,7 @@ void DilateDistanceOperation::executePixel(float *color, int x, int y, void *dat
                        offset += 4;
                }
        }
-       color[0] = value;
+       output[0] = value;
 }
 
 void DilateDistanceOperation::deinitExecution()
@@ -259,7 +259,7 @@ ErodeDistanceOperation::ErodeDistanceOperation() : DilateDistanceOperation()
        /* pass */
 }
 
-void ErodeDistanceOperation::executePixel(float *color, int x, int y, void *data)
+void ErodeDistanceOperation::executePixel(float output[4], int x, int y, void *data)
 {
        const float distance = this->m_distance;
        const float mindist = distance * distance;
@@ -288,7 +288,7 @@ void ErodeDistanceOperation::executePixel(float *color, int x, int y, void *data
                        offset += 4;
                }
        }
-       color[0] = value;
+       output[0] = value;
 }
 
 void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device,
@@ -374,9 +374,9 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
 }
 
 
-void DilateStepOperation::executePixel(float *color, int x, int y, void *data)
+void DilateStepOperation::executePixel(float output[4], int x, int y, void *data)
 {
-       color[0] = this->m_cached_buffer[y * this->getWidth() + x];
+       output[0] = this->m_cached_buffer[y * this->getWidth() + x];
 }
 
 void DilateStepOperation::deinitExecution()
index bd044e79fbe6fbece99cdbd305897192d50b474f..47480d47c3b0dbc471f5e581c2c84135edfc0ec2 100644 (file)
@@ -47,7 +47,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
@@ -83,7 +83,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
@@ -111,7 +111,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
 
        void executeOpenCL(OpenCLDevice *device,
                           MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, 
@@ -135,7 +135,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 34bf9db77cef585bf8e831948834b934fe136400..23289429bfd0794d40faf7575707f9772da9242b 100644 (file)
@@ -66,7 +66,7 @@ void DirectionalBlurOperation::initExecution()
 
 }
 
-void DirectionalBlurOperation::executePixel(float *color, int x, int y, void *data)
+void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        const int iterations = pow(2.0f, this->m_data->iter);
        float col[4] = {0, 0, 0, 0};
@@ -98,7 +98,7 @@ void DirectionalBlurOperation::executePixel(float *color, int x, int y, void *da
                lsc += this->m_sc;
        }
 
-       mul_v4_v4fl(color, col2, 1.0f / (iterations+1));
+       mul_v4_v4fl(output, col2, 1.0f / (iterations + 1));
 }
 
 void DirectionalBlurOperation::executeOpenCL(OpenCLDevice *device,
index 4de435a14181dd6728edbc6e98070a1542179ba5..e13a13116db7edcfccb0a90d383a763fa1c15d23 100644 (file)
@@ -40,7 +40,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 018df78cb656b025c8ed0e0dac416cf83b209e32..39f0ac7874b521eaa29f3f14ab4823fa59ca27f5 100644 (file)
@@ -54,7 +54,7 @@ void DisplaceOperation::initExecution()
  * in order to take effect */
 #define DISPLACE_EPSILON    0.01f
 
-void DisplaceOperation::executePixel(float *color, int x, int y, void *data)
+void DisplaceOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float inVector[4];
        float inScale[4];
@@ -96,7 +96,7 @@ void DisplaceOperation::executePixel(float *color, int x, int y, void *data)
        dyt = signf(dyt) * maxf(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight();
 
        /* EWA filtering */
-       this->m_inputColorProgram->read(color, u, v, dxt, dyt);
+       this->m_inputColorProgram->read(output, u, v, dxt, dyt);
 }
 
 void DisplaceOperation::deinitExecution()
index 0e5b042aea5cd85c1dc6dbc8e4d0374c1731767d..daf54294aa18e97d0d557b7e062a4ece02b2549a 100644 (file)
@@ -48,7 +48,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index a93e39085c5069c9cd511631ea338e297a6f91a7..560bbbdd244d24a31c909ca87cc26ab016c3633e 100644 (file)
@@ -53,7 +53,7 @@ void DisplaceSimpleOperation::initExecution()
  * in order to take effect */
 #define DISPLACE_EPSILON    0.01f
 
-void DisplaceSimpleOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void DisplaceSimpleOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inVector[4];
        float inScale[4];
@@ -82,7 +82,7 @@ void DisplaceSimpleOperation::executePixel(float *color, float x, float y, Pixel
        CLAMP(u, 0.f, this->getWidth() - 1.f);
        CLAMP(v, 0.f, this->getHeight() - 1.f);
 
-       this->m_inputColorProgram->read(color, u, v, sampler);
+       this->m_inputColorProgram->read(output, u, v, sampler);
 }
 
 void DisplaceSimpleOperation::deinitExecution()
index 81adc7be3663b81cdc0e235295a51bfcdea7519d..989cf8a1f67076fec7bd19539b9a84db8837c7f9 100644 (file)
@@ -48,7 +48,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 197e8b07918c0f589c4ebc65594a8c200e21067f..b65b5e0f224d8810c1ec444968dc56ad21f43e81 100644 (file)
@@ -44,7 +44,7 @@ void DistanceMatteOperation::deinitExecution()
        this->m_inputKeyProgram = NULL;
 }
 
-void DistanceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void DistanceMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inKey[4];
        float inImage[4];
@@ -68,7 +68,7 @@ void DistanceMatteOperation::executePixel(float *outputValue, float x, float y,
  
        /*make 100% transparent */
        if (distance < tolerance) {
-               outputValue[0] = 0.f;
+               output[0] = 0.f;
        }
        /*in the falloff region, make partially transparent */
        else if (distance < falloff + tolerance) {
@@ -76,15 +76,15 @@ void DistanceMatteOperation::executePixel(float *outputValue, float x, float y,
                alpha = distance / falloff;
                /*only change if more transparent than before */
                if (alpha < inImage[3]) {
-                       outputValue[0] = alpha;
+                       output[0] = alpha;
                }
                else { /* leave as before */
-                       outputValue[0] = inImage[3];
+                       output[0] = inImage[3];
                }
        }
        else {
                /* leave as before */
-               outputValue[0] = inImage[3];
+               output[0] = inImage[3];
        }
 }
 
index 6fe16c7fdff307fcef410a028557d91a00d63d25..a176e5da888cfb23e49e94bd20e9ebeaf80fa4d1 100644 (file)
@@ -42,7 +42,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void initExecution();
        void deinitExecution();
index 559d97d6056b8f4e6a793ff8662010adb9d5fb44..1439dfa404a360b7b3b8c3ddb91c0357ed17c9b6 100644 (file)
@@ -45,11 +45,11 @@ void DotproductOperation::deinitExecution()
 
 /** @todo: current implementation is the inverse of a dotproduct. not 'logically' correct
  */
-void DotproductOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void DotproductOperation::executePixel(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);
-       color[0] = -(input1[0] * input2[0] + input1[1] * input2[1] + input1[2] * input2[2]);
+       output[0] = -(input1[0] * input2[0] + input1[1] * input2[1] + input1[2] * input2[2]);
 }
index 6ff6f622a50bc63073904c13749f933892ae9a6d..31588207504c55e1541677b35d50c17bb356a5e4 100644 (file)
@@ -31,7 +31,7 @@ private:
        SocketReader *m_input2Operation;
 public:
        DotproductOperation();
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void initExecution();
        void deinitExecution();
index 847e58176755a4acf057d21f4f5870ed46d4aed0..d5daace059dddc062fe9865dfbd16b5356da7a43 100644 (file)
@@ -1280,11 +1280,11 @@ void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
        unlockMutex();
        return this->m_cachedInstance;
 }
-void DoubleEdgeMaskOperation::executePixel(float *color, int x, int y, void *data)
+void DoubleEdgeMaskOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float *buffer = (float *)data;
        int index = (y * this->getWidth() + x);
-       copy_v4_v4(color, buffer + index);
+       copy_v4_v4(output, buffer + index);
 }
 
 void DoubleEdgeMaskOperation::deinitExecution()
index 32e5a07cfdca007faf6c69366d25b0c919ccd1af..528aae7218f7338f7d8c4306beab87ddec60e052 100644 (file)
@@ -42,7 +42,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index c3cbaaaf2fc456374a9d0ac577289c1bf9e3fb6b..9ab21e2d5bdc5bd4a6af3a855f176ff0a73e4add 100644 (file)
@@ -44,7 +44,7 @@ void EllipseMaskOperation::initExecution()
        this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
 }
 
-void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void EllipseMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputMask[4];
        float inputValue[4];
@@ -74,40 +74,40 @@ void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSam
        switch (this->m_maskType) {
                case CMP_NODE_MASKTYPE_ADD:
                        if (inside) {
-                               color[0] = max(inputMask[0], inputValue[0]);
+                               output[0] = max(inputMask[0], inputValue[0]);
                        }
                        else {
-                               color[0] = inputMask[0];
+                               output[0] = inputMask[0];
                        }
                        break;
                case CMP_NODE_MASKTYPE_SUBTRACT:
                        if (inside) {
-                               color[0] = inputMask[0] - inputValue[0];
-                               CLAMP(color[0], 0, 1);
+                               output[0] = inputMask[0] - inputValue[0];
+                               CLAMP(output[0], 0, 1);
                        }
                        else {
-                               color[0] = inputMask[0];
+                               output[0] = inputMask[0];
                        }
                        break;
                case CMP_NODE_MASKTYPE_MULTIPLY:
                        if (inside) {
-                               color[0] = inputMask[0] * inputValue[0];
+                               output[0] = inputMask[0] * inputValue[0];
                        }
                        else {
-                               color[0] = 0;
+                               output[0] = 0;
                        }
                        break;
                case CMP_NODE_MASKTYPE_NOT:
                        if (inside) {
                                if (inputMask[0] > 0.0f) {
-                                       color[0] = 0;
+                                       output[0] = 0;
                                }
                                else {
-                                       color[0] = inputValue[0];
+                                       output[0] = inputValue[0];
                                }
                        }
                        else {
-                               color[0] = inputMask[0];
+                               output[0] = inputMask[0];
                        }
                        break;
        }
index fce3c93bba65faba18b32cde7932257f3459ed8f..ed74e6b43db8ca5937ac79d38f7498f06d02ee94 100644 (file)
@@ -45,7 +45,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index a7b5b5de6b5a614baa86b93d9fb2c54a0aaebf0f..2b2928c98dbe924bd91720c0d9d64f964969d789 100644 (file)
@@ -31,10 +31,10 @@ FastGaussianBlurOperation::FastGaussianBlurOperation() : BlurBaseOperation(COM_D
        this->m_iirgaus = NULL;
 }
 
-void FastGaussianBlurOperation::executePixel(float *color, int x, int y, void *data)
+void FastGaussianBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        MemoryBuffer *newData = (MemoryBuffer *)data;
-       newData->read(color, x, y);     
+       newData->read(output, x, y);
 }
 
 bool FastGaussianBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -233,10 +233,10 @@ FastGaussianBlurValueOperation::FastGaussianBlurValueOperation() : NodeOperation
        setComplex(true);
 }
 
-void FastGaussianBlurValueOperation::executePixel(float *color, int x, int y, void *data)
+void FastGaussianBlurValueOperation::executePixel(float output[4], int x, int y, void *data)
 {
        MemoryBuffer *newData = (MemoryBuffer *)data;
-       newData->read(color, x, y);     
+       newData->read(output, x, y);
 }
 
 bool FastGaussianBlurValueOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
index 32dc428c21c3df76fa2dd948ffcaf5b7020190fd..58bf1d4f596201ef5ba3cccc3d4191856fb4c0cf 100644 (file)
@@ -34,7 +34,7 @@ private:
 public:
        FastGaussianBlurOperation();
        bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        static void IIR_gauss(MemoryBuffer *src, float sigma, unsigned int channel, unsigned int xy);
        void *initializeTileData(rcti *rect);
@@ -62,7 +62,7 @@ private:
 public:
        FastGaussianBlurValueOperation();
        bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        void *initializeTileData(rcti *rect);
        void deinitExecution();
index 939d05fffbf2caf18f18bc87c13faea4d8db9059..526eba34d867cf7b33145efaba42c2d757ca7ec3 100644 (file)
@@ -42,12 +42,12 @@ void FlipOperation::deinitExecution()
 }
 
 
-void FlipOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void FlipOperation::executePixel(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(color, nx, ny, sampler);
+       this->m_inputOperation->read(output, nx, ny, sampler);
 }
 
 bool FlipOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
index a13f7ecf752ccdb93305c85923c0df73538b7c4e..018617cea8a28a9163d1a131964b32f3b6c7e1ff 100644 (file)
@@ -33,7 +33,7 @@ private:
 public:
        FlipOperation();
        bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void initExecution();
        void deinitExecution();
index a4cc03ac380bfc49ca38f5ccc02029758516071b..af990f4f3e07f670038ad1e74eab2dcbdb94de3c 100644 (file)
@@ -34,7 +34,7 @@ void GammaCorrectOperation::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void GammaCorrectOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void GammaCorrectOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputProgram->read(inputColor, x, y, sampler);
@@ -45,18 +45,18 @@ void GammaCorrectOperation::executePixel(float *color, float x, float y, PixelSa
        }
 
        /* check for negative to avoid nan's */
-       color[0] = inputColor[0] > 0.0f ? inputColor[0] * inputColor[0] : 0.0f;
-       color[1] = inputColor[1] > 0.0f ? inputColor[1] * inputColor[1] : 0.0f;
-       color[2] = inputColor[2] > 0.0f ? inputColor[2] * inputColor[2] : 0.0f;
+       output[0] = inputColor[0] > 0.0f ? inputColor[0] * inputColor[0] : 0.0f;
+       output[1] = inputColor[1] > 0.0f ? inputColor[1] * inputColor[1] : 0.0f;
+       output[2] = inputColor[2] > 0.0f ? inputColor[2] * inputColor[2] : 0.0f;
 
        inputColor[0] *= inputColor[3];
        inputColor[1] *= inputColor[3];
        inputColor[2] *= inputColor[3];
 
-       color[0] = inputColor[0];
-       color[1] = inputColor[1];
-       color[2] = inputColor[2];
-       color[3] = inputColor[3];
+       output[0] = inputColor[0];
+       output[1] = inputColor[1];
+       output[2] = inputColor[2];
+       output[3] = inputColor[3];
 }
 
 void GammaCorrectOperation::deinitExecution()
@@ -75,7 +75,7 @@ void GammaUncorrectOperation::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void GammaUncorrectOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void GammaUncorrectOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor[4];
        this->m_inputProgram->read(inputColor, x, y, sampler);
@@ -86,18 +86,18 @@ void GammaUncorrectOperation::executePixel(float *color, float x, float y, Pixel
                inputColor[2] /= inputColor[3];
        }
 
-       color[0] = inputColor[0] > 0.0f ? sqrtf(inputColor[0]) : 0.0f;
-       color[1] = inputColor[1] > 0.0f ? sqrtf(inputColor[1]) : 0.0f;
-       color[2] = inputColor[2] > 0.0f ? sqrtf(inputColor[2]) : 0.0f;
+       output[0] = inputColor[0] > 0.0f ? sqrtf(inputColor[0]) : 0.0f;
+       output[1] = inputColor[1] > 0.0f ? sqrtf(inputColor[1]) : 0.0f;
+       output[2] = inputColor[2] > 0.0f ? sqrtf(inputColor[2]) : 0.0f;
 
        inputColor[0] *= inputColor[3];
        inputColor[1] *= inputColor[3];
        inputColor[2] *= inputColor[3];
 
-       color[0] = inputColor[0];
-       color[1] = inputColor[1];
-       color[2] = inputColor[2];
-       color[3] = inputColor[3];
+       output[0] = inputColor[0];
+       output[1] = inputColor[1];
+       output[2] = inputColor[2];
+       output[3] = inputColor[3];
 }
 
 void GammaUncorrectOperation::deinitExecution()
index 2d4f2ea89d9aa0759136a0f0106f446d0181bb7d..514855b4f569438bed5f9c74d43c8f7161a0537e 100644 (file)
@@ -38,7 +38,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(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 *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 40c2ee0a1d486fc0e3dd87ed2d8bf8284989a895..326031c598435035ceba6d1b836a576b2d1c7500 100644 (file)
@@ -37,7 +37,7 @@ void GammaOperation::initExecution()
        this->m_inputGammaProgram = this->getInputSocketReader(1);
 }
 
-void GammaOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void GammaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        float inputGamma[4];
@@ -46,11 +46,11 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s
        this->m_inputGammaProgram->read(inputGamma, x, y, sampler);
        const float gamma = inputGamma[0];
        /* check for negative to avoid nan's */
-       color[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
-       color[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1];
-       color[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2];
+       output[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
+       output[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1];
+       output[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2];
        
-       color[3] = inputValue[3];
+       output[3] = inputValue[3];
 }
 
 void GammaOperation::deinitExecution()
index 8fc2599cba93ba8e5f7a75f34a34ca43bacf464f..4482f7be34a54f105a7286cc9244970c41cbb587 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 9865c87cb071245316fab10908d83bff80489c67..935bfcac6c7f438083fe9a0551d6a1a026a98819 100644 (file)
@@ -90,7 +90,7 @@ BLI_INLINE float finv_test(const float f, const bool test)
        return (LIKELY(test == false)) ? f : 1.0f - f;
 }
 
-void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, void *data)
+void GaussianAlphaXBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        const bool do_invert = this->m_do_subtract;
        MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
@@ -148,7 +148,7 @@ void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, void
        /* blend between the max value and gauss blue - gives nice feather */
        const float value_blur  = alpha_accum / multiplier_accum;
        const float value_final = (value_max * distfacinv_max) + (value_blur * (1.0f - distfacinv_max));
-       color[0] = finv_test(value_final, do_invert);
+       output[0] = finv_test(value_final, do_invert);
 }
 
 void GaussianAlphaXBlurOperation::deinitExecution()
index 6ea8b7e4371192cb3dc523548027e48a8767afa0..21e80c5daf554133b17a017c1ccd0962c1d4b6a6 100644 (file)
@@ -40,7 +40,7 @@ public:
        /**
         * @brief the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * @brief initialize the execution
index 323a381c86972c85fdcf08d7b8c2eff57a1f3622..375f1bcf07c776c92a32412e17228693994c0200 100644 (file)
@@ -90,7 +90,7 @@ BLI_INLINE float finv_test(const float f, const bool test)
        return (LIKELY(test == false)) ? f : 1.0f - f;
 }
 
-void GaussianAlphaYBlurOperation::executePixel(float *color, int x, int y, void *data)
+void GaussianAlphaYBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        const bool do_invert = this->m_do_subtract;
        MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
@@ -148,7 +148,7 @@ void GaussianAlphaYBlurOperation::executePixel(float *color, int x, int y, void
        /* blend between the max value and gauss blue - gives nice feather */
        const float value_blur  = alpha_accum / multiplier_accum;
        const float value_final = (value_max * distfacinv_max) + (value_blur * (1.0f - distfacinv_max));
-       color[0] = finv_test(value_final, do_invert);
+       output[0] = finv_test(value_final, do_invert);
 }
 
 void GaussianAlphaYBlurOperation::deinitExecution()
index 050b0c384cb9d888230e62349dacbdcb6af86e13..cb8b2e048ce9068b182eca9795a704b058a96804 100644 (file)
@@ -40,7 +40,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * @brief initialize the execution
index 74043e187bcb993891db045d6ae20c8e0fdb06cf..d97d2f15ded220af536086b2dab18278799f79c2 100644 (file)
@@ -112,7 +112,7 @@ void GaussianBokehBlurOperation::updateGauss()
        }
 }
 
-void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, void *data)
+void GaussianBokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float tempColor[4];
        tempColor[0] = 0;
@@ -152,7 +152,7 @@ void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, void *
                }
        }
 
-       mul_v4_v4fl(color, tempColor, 1.0f / multiplier_accum);
+       mul_v4_v4fl(output, tempColor, 1.0f / multiplier_accum);
 }
 
 void GaussianBokehBlurOperation::deinitExecution()
@@ -262,7 +262,7 @@ void GaussianBlurReferenceOperation::updateGauss()
                m_maintabs[i] = make_gausstab(i + 1);
 }
 
-void GaussianBlurReferenceOperation::executePixel(float *color, int x, int y, void *data)
+void GaussianBlurReferenceOperation::executePixel(float output[4], int x, int y, void *data)
 {
        MemoryBuffer *memorybuffer = (MemoryBuffer *)data;
        float *buffer = memorybuffer->getBuffer();
@@ -285,7 +285,7 @@ void GaussianBlurReferenceOperation::executePixel(float *color, int x, int y, vo
        else if (refrady < 1) refrady = 1;
 
        if (refradx == 1 && refrady == 1) {
-               memorybuffer->readNoCheck(color, x, y);
+               memorybuffer->readNoCheck(output, x, y);
        }
        else {
                int minxr = x - refradx < 0 ? -x : -refradx;
@@ -314,10 +314,10 @@ void GaussianBlurReferenceOperation::executePixel(float *color, int x, int y, vo
                        }
                }
                sum = 1.0f / sum;
-               color[0] = rval * sum;
-               color[1] = gval * sum;
-               color[2] = bval * sum;
-               color[3] = aval * sum;
+               output[0] = rval * sum;
+               output[1] = gval * sum;
+               output[2] = bval * sum;
+               output[3] = aval * sum;
        }
 
 }
index 4514085546487a177b293ef85f9445c4b9a287c6..9fcf1e10e6ad25222fb5a3e248f691c08f7b4e70 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Deinitialize the execution
@@ -66,7 +66,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Deinitialize the execution
index 1cf675a769ac0e1e12cf6a94c9a1bc255aba1f05..01c8573882265778626a494d2949ccfa6574a896 100644 (file)
@@ -73,7 +73,7 @@ void GaussianXBlurOperation::updateGauss()
        }
 }
 
-void GaussianXBlurOperation::executePixel(float *color, int x, int y, void *data)
+void GaussianXBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
        float multiplier_accum = 0.0f;
@@ -101,7 +101,7 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, void *data
                multiplier_accum += multiplier;
                bufferindex += offsetadd;
        }
-       mul_v4_v4fl(color, color_accum, 1.0f / multiplier_accum);
+       mul_v4_v4fl(output, color_accum, 1.0f / multiplier_accum);
 }
 
 void GaussianXBlurOperation::deinitExecution()
index a4a0dc655e261a9c3f70e22ddf890a668bddc266..4c3786b081048ede91d870e5ce5086bb23d11ef3 100644 (file)
@@ -36,7 +36,7 @@ public:
        /**
         * @brief the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * @brief initialize the execution
index 135dcf608728828ce836a86b36cb3c4e1297283e..298b4660c6a5b5345445c4bfaa5ad610688a4566 100644 (file)
@@ -73,7 +73,7 @@ void GaussianYBlurOperation::updateGauss()
        }
 }
 
-void GaussianYBlurOperation::executePixel(float *color, int x, int y, void *data)
+void GaussianYBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        float color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
        float multiplier_accum = 0.0f;
@@ -102,7 +102,7 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, void *data
                madd_v4_v4fl(color_accum, &buffer[bufferindex], multiplier);
                multiplier_accum += multiplier;
        }
-       mul_v4_v4fl(color, color_accum, 1.0f / multiplier_accum);
+       mul_v4_v4fl(output, color_accum, 1.0f / multiplier_accum);
 }
 
 void GaussianYBlurOperation::deinitExecution()
index e3e0d8891d31104e807a01475e0a6eb952b2e2d2..69dcb7e48fbe078789c6d23924fe048dc5ae6090 100644 (file)
@@ -36,7 +36,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * @brief initialize the execution
index bb4e224c720f7cac9858502ea25dc33c4f752293..1c7d2659c390a6e6cc1c9c6ed254a5d420ccf1df 100644 (file)
@@ -42,19 +42,19 @@ void GlareThresholdOperation::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void GlareThresholdOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void GlareThresholdOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        const float threshold = this->m_settings->threshold;
        
-       this->m_inputProgram->read(color, x, y, sampler);
-       if (rgb_to_luma_y(color) >= threshold) {
-               color[0] -= threshold, color[1] -= threshold, color[2] -= threshold;
-               color[0] = MAX2(color[0], 0.0f);
-               color[1] = MAX2(color[1], 0.0f);
-               color[2] = MAX2(color[2], 0.0f);
+       this->m_inputProgram->read(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);
+               output[1] = max(output[1], 0.0f);
+               output[2] = max(output[2], 0.0f);
        }
        else {
-               zero_v3(color);
+               zero_v3(output);
        }
 }
 
index 8db2fc5c72e1475d89e3b98327f07a98c1648200..44f9db6a4830c6e3dde51e4da21b58271e9367e6 100644 (file)
@@ -42,7 +42,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
        /**
         * Initialize the execution
index df3d00278c301d9bc798803df23ebafa56a9a5ef..57d43f67c9b13cfb7a43f3f20abb4173b781825d 100644 (file)
@@ -45,7 +45,7 @@ void HueSaturationValueCorrectOperation::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void HueSaturationValueCorrectOperation::executePixel(float *output, float x, float y, PixelSampler sampler)
+void HueSaturationValueCorrectOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float hsv[4], f;
 
index ba565a9f7528411ade90fa1e09b14450fa0bf0ec..5e57d09a51e7abf13baa017f41088209890bca35 100644 (file)
@@ -37,7 +37,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *Vector, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index daa2ac9299e9caba38a2e75eb9daa2c382609a07..4b9bcb118e7a5560cfe02944108476fe1f8ae4bf 100644 (file)
@@ -33,13 +33,13 @@ void IDMaskOperation::initExecution()
        this->m_inputProgram = this->getInputSocketReader(0);
 }
 
-void IDMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void IDMaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        
        this->m_inputProgram->read(inputValue, x, y, sampler);
        const float a = (inputValue[0] == this->m_objectIndex) ? 1.0f : 0.0f;
-       color[0] = a;
+       output[0] = a;
 }
 
 void IDMaskOperation::deinitExecution()
index 9d356536499fcb74b3795bd53933f17760b12e9f..68c5cf4c1dc52331607d796c7c29839ed7ebe904 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index c15bb1dc5e61b26fe5d2a6ad31c1dc7bb8e0d7ab..4ec5643c0bbbc46e40d2b07a4bd062a7bd62abc6 100644 (file)
@@ -107,32 +107,32 @@ void BaseImageOperation::determineResolution(unsigned int resolution[2], unsigne
        }
 }
 
-void ImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        if (this->m_imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
-               zero_v4(color);
+               zero_v4(output);
        }
        else {
                switch (sampler) {
                        case COM_PS_NEAREST:
-                               neareast_interpolation_color(this->m_buffer, NULL, color, x, y);
+                               neareast_interpolation_color(this->m_buffer, NULL, output, x, y);
                                break;
                        case COM_PS_BILINEAR:
-                               bilinear_interpolation_color(this->m_buffer, NULL, color, x, y);
+                               bilinear_interpolation_color(this->m_buffer, NULL, output, x, y);
                                break;
                        case COM_PS_BICUBIC:
-                               bicubic_interpolation_color(this->m_buffer, NULL, color, x, y);
+                               bicubic_interpolation_color(this->m_buffer, NULL, output, x, y);
                                break;
                }
        }
 }
 
-void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ImageAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float tempcolor[4];
 
        if (this->m_imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
-               color[0] = 0.0f;
+               output[0] = 0.0f;
        }
        else {
                tempcolor[3] = 1.0f;
@@ -147,17 +147,17 @@ void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSamp
                                bicubic_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
                                break;
                }
-               color[0] = tempcolor[3];
+               output[0] = tempcolor[3];
        }
 }
 
-void ImageDepthOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ImageDepthOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        if (this->m_depthBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
-               color[0] = 0.0f;
+               output[0] = 0.0f;
        }
        else {
                int offset = y * this->m_width + x;
-               color[0] = this->m_depthBuffer[offset];
+               output[0] = this->m_depthBuffer[offset];
        }
 }
index 1398b30cbcf5b3763dd7a4889fe9ab0b61acb249..e75e7daa186153985059547159cbce08bb354e18 100644 (file)
@@ -72,7 +72,7 @@ public:
         * Constructor
         */
        ImageOperation();
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class ImageAlphaOperation : public BaseImageOperation {
 public:
@@ -80,7 +80,7 @@ public:
         * Constructor
         */
        ImageAlphaOperation();
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class ImageDepthOperation : public BaseImageOperation {
 public:
@@ -88,6 +88,6 @@ public:
         * Constructor
         */
        ImageDepthOperation();
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 #endif
index 6e198f223f98d0a1baf56c2afc004fd5cd430cde..e586dded8db964e09c645a97c20978f56401e237 100644 (file)
@@ -240,11 +240,11 @@ void *InpaintSimpleOperation::initializeTileData(rcti *rect)
        return this->m_cached_buffer;
 }
 
-void InpaintSimpleOperation::executePixel(float *color, int x, int y, void *data)
+void InpaintSimpleOperation::executePixel(float output[4], int x, int y, void *data)
 {
        this->clamp_xy(x, y);
-       copy_v3_v3(color, this->get_pixel(x, y));
-       color[3] = 1.0f;
+       copy_v3_v3(output, this->get_pixel(x, y));
+       output[3] = 1.0f;
 }
 
 void InpaintSimpleOperation::deinitExecution()
index 2f066e19065c44c261e33f200fe1d11e70e377aa..59465ed3432f25ba982da45f8a73da8bca29f635 100644 (file)
@@ -45,7 +45,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
        
        /**
         * Initialize the execution
index 0802d2d2523999db0ee7dd746d87dd6c9f929f3e..9c2dd82570973668a071fd1013cfc3c97f84a62c 100644 (file)
@@ -39,7 +39,7 @@ void InvertOperation::initExecution()
        this->m_inputColorProgram = this->getInputSocketReader(1);
 }
 
-void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sampler)
+void InvertOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue[4];
        float inputColor[4];
@@ -50,18 +50,18 @@ void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sa
        const float invertedValue = 1.0f - value;
        
        if (this->m_color) {
-               out[0] = (1.0f - inputColor[0]) * value + inputColor[0] * invertedValue;
-               out[1] = (1.0f - inputColor[1]) * value + inputColor[1] * invertedValue;
-               out[2] = (1.0f - inputColor[2]) * value + inputColor[2] * invertedValue;
+               output[0] = (1.0f - inputColor[0]) * value + inputColor[0] * invertedValue;
+               output[1] = (1.0f - inputColor[1]) * value + inputColor[1] * invertedValue;
+               output[2] = (1.0f - inputColor[2]) * value + inputColor[2] * invertedValue;
        }
        else {
-               copy_v3_v3(out, inputColor);
+               copy_v3_v3(output, inputColor);
        }
        
        if (this->m_alpha)
-               out[3] = (1.0f - inputColor[3]) * value + inputColor[3] * invertedValue;
+               output[3] = (1.0f - inputColor[3]) * value + inputColor[3] * invertedValue;
        else
-               out[3] = inputColor[3];
+               output[3] = inputColor[3];
 
 }
 
index 46a5d80b04a192db3080d5c67f43667840d906a5..7fded7bb1e4200098d6fab15fa662c7460f04940 100644 (file)
@@ -42,7 +42,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 00ea5877d630e6222bc327571ec7958a30ffb28b..9fb9efe4fc76677a585f257fa61a3f0cd869f579 100644 (file)
@@ -46,7 +46,7 @@ void *KeyingBlurOperation::initializeTileData(rcti *rect)
        return buffer;
 }
 
-void KeyingBlurOperation::executePixel(float *color, int x, int y, void *data)
+void KeyingBlurOperation::executePixel(float output[4], int x, int y, void *data)
 {
        MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
        float *buffer = inputBuffer->getBuffer();
@@ -85,7 +85,7 @@ void KeyingBlurOperation::executePixel(float *color, int x, int y, void *data)
 
        average /= (float) count;
 
-       color[0] = average;
+       output[0] = average;
 }
 
 bool KeyingBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
index aaacf66a65655fc6a7a4a59b8e5a2440a59b53cf..a1c56cc9c07929c7e4fe54d8dc17cbc51292a2c5 100644 (file)
@@ -47,7 +47,7 @@ public:
 
        void *initializeTileData(rcti *rect);
 
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
 
        bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
 };
index d8afaceb37bfde6638f791642bdefb3b9a1cee77..909eeed89371301057433d3b2855a34098cf0c64 100644 (file)
@@ -51,7 +51,7 @@ void *KeyingClipOperation::initializeTileData(rcti *rect)
        return buffer;
 }
 
-void KeyingClipOperation::executePixel(float *color, int x, int y, void *data)
+void KeyingClipOperation::executePixel(float output[4], int x, int y, void *data)
 {
        const int delta = this->m_kernelRadius;
        const float tolerance = this->m_kernelTolerance;
@@ -92,20 +92,20 @@ void KeyingClipOperation::executePixel(float *color, int x, int y, void *data)
 
        if (this->m_isEdgeMatte) {
                if (ok)
-                       color[0] = 0.0f;
+                       output[0] = 0.0f;
                else
-                       color[0] = 1.0f;
+                       output[0] = 1.0f;
        }
        else {
-               color[0] = value;
+               output[0] = value;
 
                if (ok) {
-                       if (color[0] < this->m_clipBlack)
-                               color[0] = 0.0f;
-                       else if (color[0] >= this->m_clipWhite)
-                               color[0] = 1.0f;
+                       if (output[0] < this->m_clipBlack)
+                               output[0] = 0.0f;
+                       else if (output[0] >= this->m_clipWhite)
+                               output[0] = 1.0f;
                        else
-                               color[0] = (color[0] - this->m_clipBlack) / (this->m_clipWhite - this->m_clipBlack);
+                               output[0] = (output[0] - this->m_clipBlack) / (this->m_clipWhite - this->m_clipBlack);
                }
        }
 }
index eacbccc081890d6f47346d3aaac0abfe2773b268..d79bd14b900ce78acfd8288225f853e9a47c5ac4 100644 (file)
@@ -51,7 +51,7 @@ public:
 
        void *initializeTileData(rcti *rect);
 
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
 
        bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
 };
index 2f3fa2bd72a86f2cf4f1de12c9ecd40ad2fb0f37..4426666f100b847284072fadc979e4f6fc6b36b9 100644 (file)
@@ -65,7 +65,7 @@ void KeyingDespillOperation::deinitExecution()
        this->m_screenReader = NULL;
 }
 
-void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void KeyingDespillOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float pixelColor[4];
        float screenColor[4];
@@ -85,12 +85,9 @@ void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelS
        average_value = this->m_colorBalance * pixelColor[min_channel] + (1.0f - this->m_colorBalance) * pixelColor[max_channel];
        amount = (pixelColor[screen_primary_channel] - average_value);
 
-       color[0] = pixelColor[0];
-       color[1] = pixelColor[1];
-       color[2] = pixelColor[2];
-       color[3] = pixelColor[3];
+       copy_v4_v4(output, pixelColor);
 
        if (this->m_despillFactor * amount > 0) {
-               color[screen_primary_channel] = pixelColor[screen_primary_channel] - this->m_despillFactor * amount;
+               output[screen_primary_channel] = pixelColor[screen_primary_channel] - this->m_despillFactor * amount;
        }
 }
index c6e489057c33ec53ad3cedb539eb21255eb2f815..18e771b14f186140af726219d51ae1e55971f8f8 100644 (file)
@@ -45,7 +45,7 @@ public:
        void setDespillFactor(float value) {this->m_despillFactor = value;}
        void setColorBalance(float value) {this->m_colorBalance = value;}
 
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 
 #endif
index ed9e4f1df160a7dc1172b7292cf714752781ff9e..35138cf0b92a5913d092ac3b0b2cd2c93b8212a6 100644 (file)
@@ -77,7 +77,7 @@ void KeyingOperation::deinitExecution()
        this->m_screenReader = NULL;
 }
 
-void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void KeyingOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float pixelColor[4];
        float screenColor[4];
@@ -93,7 +93,7 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
                 * because saturation and falloff calculation is based on the fact
                 * that pixels are not overexposured
                 */
-               color[0] = 1.0f;
+               output[0] = 1.0f;
        }
        else {
                float saturation = get_pixel_saturation(pixelColor, this->m_screenBalance, primary_channel);
@@ -103,19 +103,19 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
                        /* means main channel of pixel is different from screen,
                         * assume this is completely a foreground
                         */
-                       color[0] = 1.0f;
+                       output[0] = 1.0f;
                }
                else if (saturation >= screen_saturation) {
                        /* matched main channels and higher saturation on pixel
                         * is treated as completely background
                         */
-                       color[0] = 0.0f;
+                       output[0] = 0.0f;
                }
                else {
                        /* nice alpha falloff on edges */
                        float distance = 1.0f - saturation / screen_saturation;
 
-                       color[0] = distance;
+                       output[0] = distance;
                }
        }
 }
index 5ca4db7fc75d4d1513958edbccdf7e3c788dd66f..fcff9243dfcc59e688be9503011e137f85c3db9b 100644 (file)
@@ -49,7 +49,7 @@ public:
 
        void setScreenBalance(float value) {this->m_screenBalance = value;}
 
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 
 #endif
index bf49e7a0e8926263b76e1029959f3c44c3d31a29..c9b129d8dcfdaca3b98c3bb5031f2301bcb26bce 100644 (file)
@@ -298,12 +298,12 @@ void KeyingScreenOperation::determineResolution(unsigned int resolution[2], unsi
        }
 }
 
-void KeyingScreenOperation::executePixel(float *color, int x, int y, void *data)
+void KeyingScreenOperation::executePixel(float output[4], int x, int y, void *data)
 {
-       color[0] = 0.0f;
-       color[1] = 0.0f;
-       color[2] = 0.0f;
-       color[3] = 1.0f;
+       output[0] = 0.0f;
+       output[1] = 0.0f;
+       output[2] = 0.0f;
+       output[3] = 1.0f;
 
        if (this->m_movieClip && data) {
                TriangulationData *triangulation = this->m_cachedTriangulation;
@@ -324,9 +324,9 @@ void KeyingScreenOperation::executePixel(float *color, int x, int y, void *data)
 
                                if (barycentric_coords_v2(a->co, b->co, c->co, co, w)) {
                                        if (barycentric_inside_triangle_v2(w)) {
-                                               color[0] = a->color[0] * w[0] + b->color[0] * w[1] + c->color[0] * w[2];
-                                               color[1] = a->color[1] * w[0] + b->color[1] * w[1] + c->color[1] * w[2];
-                                               color[2] = a->color[2] * w[0] + b->color[2] * w[1] + c->color[2] * w[2];
+                                               output[0] = a->color[0] * w[0] + b->color[0] * w[1] + c->color[0] * w[2];
+                                               output[1] = a->color[1] * w[0] + b->color[1] * w[1] + c->color[1] * w[2];
+                                               output[2] = a->color[2] * w[0] + b->color[2] * w[1] + c->color[2] * w[2];
 
                                                break;
                                        }
index a766c369532c03d03bd9d02f8ad4744d8eb5e073..8b1128a4da30cdc1b381b96b39cccbfc5c51da65 100644 (file)
@@ -79,7 +79,7 @@ public:
        void setTrackingObject(const char *object) {strncpy(this->m_trackingObject, object, sizeof(this->m_trackingObject));}
        void setFramenumber(int framenumber) {this->m_framenumber = framenumber;}
 
-       void executePixel(float *color, int x, int y, void *data);
+       void executePixel(float output[4], int x, int y, void *data);
 };
 
 #endif
index 31aae18992b7170b6b985d1145afb9b45e4211dd..4c65113ee709101dcd0dbe64ebee81fe92c4ba8c 100644 (file)
@@ -40,7 +40,7 @@ void LuminanceMatteOperation::deinitExecution()
        this->m_inputImageProgram = NULL;
 }
 
-void LuminanceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void LuminanceMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inColor[4];
 
@@ -52,7 +52,7 @@ void LuminanceMatteOperation::executePixel(float *outputValue, float x, float y,
        this->m_inputImageProgram->read(inColor, x, y, sampler);
        
        /* one line thread-friend algorithm:
-        * outputValue[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low))))
+        * output[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low))))
         */
                
        /* test range */
@@ -73,11 +73,11 @@ void LuminanceMatteOperation::executePixel(float *outputValue, float x, float y,
 
        /* don't make something that was more transparent less transparent */
        if (alpha < inColor[3]) {
-               outputValue[0] = alpha;
+               output[0] = alpha;
        }
        else {
                /* leave now it was before */
-               outputValue[0] = inColor[3];
+               output[0] = inColor[3];
        }
 }
 
index c1ab628f78737c798baa7563533d13a90a75ddf2..009a1e8825e010619c88cc78b0b7b6d4deeeb7e9 100644 (file)
@@ -41,7 +41,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        void initExecution();
        void deinitExecution();
index a5f503a669b828bfa3e735bcf80b544472c3cc0a..1a441b0ac9a99e0bc5e3eb4b73770608079c362d 100644 (file)
@@ -40,7 +40,7 @@ void MapUVOperation::initExecution()
        this->m_inputUVProgram = this->getInputSocketReader(1);
 }
 
-void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MapUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputUV[4];
        float uv_a[4], uv_b[4];
@@ -52,7 +52,7 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
 
        this->m_inputUVProgram->read(inputUV, x, y, sampler);
        if (inputUV[2] == 0.f) {
-               zero_v4(color);
+               zero_v4(output);
                return;
        }
        /* adaptive sampling, red (U) channel */
@@ -107,11 +107,11 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
        u = inputUV[0] * this->m_inputColorProgram->getWidth();
        v = inputUV[1] * this->m_inputColorProgram->getHeight();
 
-       this->m_inputColorProgram->read(color, u, v, dx, dy);
+       this->m_inputColorProgram->read(output, u, v, dx, dy);
 
        /* "premul" */
        if (alpha < 1.0f) {
-               mul_v4_fl(color, alpha);
+               mul_v4_fl(output, alpha);
        }
 }
 
index ae042f6078935e9afb04750ccaa8f3fea8ed3e73..c8356c1a7ad7d30b77f62e18b3b4e41648053d63 100644 (file)
@@ -45,7 +45,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 96e586ccef888b9b0a876886f59e121f22067da8..7acc431f7b5cdf6386d392d75b1ddc19c61f02f3 100644 (file)
@@ -34,7 +34,7 @@ void MapValueOperation::initExecution()
        this->m_inputOperation = this->getInputSocketReader(0);
 }
 
-void MapValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MapValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float src[4];
        this->m_inputOperation->read(src, x, y, sampler);
@@ -47,7 +47,7 @@ void MapValueOperation::executePixel(float *outputValue, float x, float y, Pixel
                if (value > texmap->max[0])
                        value = texmap->max[0];
        
-       outputValue[0] = value;
+       output[0] = value;
 }
 
 void MapValueOperation::deinitExecution()
index a2664c32a4e4067eb82ac0b96ebe552a98d8f2f4..418d6d9bf4d6e7aa0e91b059e0662e6fb891ca2b 100644 (file)
@@ -45,7 +45,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 46d31eeabf72333ab2007e4c076fc267ff3df588..a156dfc1d99d57c7c12f0a280c55420b62c23ef8 100644 (file)
@@ -127,29 +127,30 @@ void MaskOperation::determineResolution(unsigned int resolution[2], unsigned int
        }
 }
 
-void MaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MaskOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
-       const float xy[2] = {x * this->m_maskWidthInv, y * this->m_maskHeightInv};
+       const float xy[2] = {x * this->m_maskWidthInv,
+                            y * this->m_maskHeightInv};
 
        if (this->m_rasterMaskHandleTot == 1) {
                if (this->m_rasterMaskHandles[0]) {
-                       color[0] = BKE_maskrasterize_handle_sample(this->m_rasterMaskHandles[0], xy);
+                       output[0] = BKE_maskrasterize_handle_sample(this->m_rasterMaskHandles[0], xy);
                }
                else {
-                       color[0] = 0.0f;
+                       output[0] = 0.0f;
                }
        }
        else {
                /* incase loop below fails */
-               color[0] = 0.0f;
+               output[0] = 0.0f;
 
                for (unsigned int i = 0; i < this->m_rasterMaskHandleTot; i++) {
                        if (this->m_rasterMaskHandles[i]) {
-                               color[0] += BKE_maskrasterize_handle_sample(this->m_rasterMaskHandles[i], xy);
+                               output[0] += BKE_maskrasterize_handle_sample(this->m_rasterMaskHandles[i], xy);
                        }
                }
 
                /* until we get better falloff */
-               color[0] /= this->m_rasterMaskHandleTot;
+               output[0] /= this->m_rasterMaskHandleTot;
        }
 }
index f57ed27f8e3a022296fa819dd852f2679dae5a35..2de71afcfa7b1ae588839a92fe221b1e4d398794 100644 (file)
@@ -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 *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 
 #endif
index 89d7bd48d9e4123f173dc9cab9b69ea575f9646d..7039689aa5fa6ecaa63ec7079f96156367e7ace5 100644 (file)
@@ -72,7 +72,7 @@ void MathBaseOperation::clampIfNeeded(float *color)
        }
 }
 
-void MathAddOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -80,12 +80,12 @@ void MathAddOperation::executePixel(float *outputValue, float x, float y, PixelS
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = inputValue1[0] + inputValue2[0];
+       output[0] = inputValue1[0] + inputValue2[0];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathSubtractOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -93,12 +93,12 @@ void MathSubtractOperation::executePixel(float *outputValue, float x, float y, P
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = inputValue1[0] - inputValue2[0];
+       output[0] = inputValue1[0] - inputValue2[0];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathMultiplyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -106,12 +106,12 @@ void MathMultiplyOperation::executePixel(float *outputValue, float x, float y, P
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = inputValue1[0] * inputValue2[0];
+       output[0] = inputValue1[0] * inputValue2[0];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathDivideOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -120,14 +120,14 @@ void MathDivideOperation::executePixel(float *outputValue, float x, float y, Pix
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
        if (inputValue2[0] == 0) /* We don't want to divide by zero. */
-               outputValue[0] = 0.0;
+               output[0] = 0.0;
        else
-               outputValue[0] = inputValue1[0] / inputValue2[0];
+               output[0] = inputValue1[0] / inputValue2[0];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathSineOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathSineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -135,12 +135,12 @@ void MathSineOperation::executePixel(float *outputValue, float x, float y, Pixel
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = sin(inputValue1[0]);
+       output[0] = sin(inputValue1[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathCosineOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathCosineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -148,12 +148,12 @@ void MathCosineOperation::executePixel(float *outputValue, float x, float y, Pix
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = cos(inputValue1[0]);
+       output[0] = cos(inputValue1[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathTangentOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathTangentOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -161,12 +161,12 @@ void MathTangentOperation::executePixel(float *outputValue, float x, float y, Pi
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = tan(inputValue1[0]);
+       output[0] = tan(inputValue1[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathArcSineOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathArcSineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -175,14 +175,14 @@ void MathArcSineOperation::executePixel(float *outputValue, float x, float y, Pi
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
        if (inputValue1[0] <= 1 && inputValue1[0] >= -1)
-               outputValue[0] = asin(inputValue1[0]);
+               output[0] = asin(inputValue1[0]);
        else
-               outputValue[0] = 0.0;
+               output[0] = 0.0;
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathArcCosineOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathArcCosineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -191,14 +191,14 @@ void MathArcCosineOperation::executePixel(float *outputValue, float x, float y,
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
        if (inputValue1[0] <= 1 && inputValue1[0] >= -1)
-               outputValue[0] = acos(inputValue1[0]);
+               output[0] = acos(inputValue1[0]);
        else
-               outputValue[0] = 0.0;
+               output[0] = 0.0;
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathArcTangentOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathArcTangentOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -206,12 +206,12 @@ void MathArcTangentOperation::executePixel(float *outputValue, float x, float y,
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = atan(inputValue1[0]);
+       output[0] = atan(inputValue1[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathPowerOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathPowerOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -220,23 +220,23 @@ void MathPowerOperation::executePixel(float *outputValue, float x, float y, Pixe
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
        if (inputValue1[0] >= 0) {
-               outputValue[0] = pow(inputValue1[0], inputValue2[0]);
+               output[0] = pow(inputValue1[0], inputValue2[0]);
        }
        else {
                float y_mod_1 = fmod(inputValue2[0], 1);
                /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */
                if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
-                       outputValue[0] = pow(inputValue1[0], floorf(inputValue2[0] + 0.5f));
+                       output[0] = pow(inputValue1[0], floorf(inputValue2[0] + 0.5f));
                }
                else {
-                       outputValue[0] = 0.0;
+                       output[0] = 0.0;
                }
        }
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathLogarithmOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathLogarithmOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -245,14 +245,14 @@ void MathLogarithmOperation::executePixel(float *outputValue, float x, float y,
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
        if (inputValue1[0] > 0  && inputValue2[0] > 0)
-               outputValue[0] = log(inputValue1[0]) / log(inputValue2[0]);
+               output[0] = log(inputValue1[0]) / log(inputValue2[0]);
        else
-               outputValue[0] = 0.0;
+               output[0] = 0.0;
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathMinimumOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathMinimumOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -260,12 +260,12 @@ void MathMinimumOperation::executePixel(float *outputValue, float x, float y, Pi
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = min(inputValue1[0], inputValue2[0]);
+       output[0] = min(inputValue1[0], inputValue2[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathMaximumOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathMaximumOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -273,12 +273,12 @@ void MathMaximumOperation::executePixel(float *outputValue, float x, float y, Pi
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = max(inputValue1[0], inputValue2[0]);
+       output[0] = max(inputValue1[0], inputValue2[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathRoundOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathRoundOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -286,12 +286,12 @@ void MathRoundOperation::executePixel(float *outputValue, float x, float y, Pixe
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = round(inputValue1[0]);
+       output[0] = round(inputValue1[0]);
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathLessThanOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathLessThanOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -299,12 +299,12 @@ void MathLessThanOperation::executePixel(float *outputValue, float x, float y, P
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = inputValue1[0] < inputValue2[0] ? 1.0f : 0.0f;
+       output[0] = inputValue1[0] < inputValue2[0] ? 1.0f : 0.0f;
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
-void MathGreaterThanOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MathGreaterThanOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputValue1[4];
        float inputValue2[4];
@@ -312,9 +312,9 @@ void MathGreaterThanOperation::executePixel(float *outputValue, float x, float y
        this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler);
        this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler);
        
-       outputValue[0] = inputValue1[0] > inputValue2[0] ? 1.0f : 0.0f;
+       output[0] = inputValue1[0] > inputValue2[0] ? 1.0f : 0.0f;
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
 
index 5d28831e18bd787dd455d88feb1d160eb75b9d22..b492d06a697f1d28dceccb7df1e935bb4ee41abc 100644 (file)
@@ -50,7 +50,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler) = 0;
+       void executePixel(float output[4], float x, float y, PixelSampler sampler) = 0;
        
        /**
         * Initialize the execution
@@ -73,88 +73,88 @@ public:
 class MathAddOperation : public MathBaseOperation {
 public:
        MathAddOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathSubtractOperation : public MathBaseOperation {
 public:
        MathSubtractOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathMultiplyOperation : public MathBaseOperation {
 public:
        MathMultiplyOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathDivideOperation : public MathBaseOperation {
 public:
        MathDivideOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathSineOperation : public MathBaseOperation {
 public:
        MathSineOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathCosineOperation : public MathBaseOperation {
 public:
        MathCosineOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathTangentOperation : public MathBaseOperation {
 public:
        MathTangentOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 
 class MathArcSineOperation : public MathBaseOperation {
 public:
        MathArcSineOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathArcCosineOperation : public MathBaseOperation {
 public:
        MathArcCosineOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathArcTangentOperation : public MathBaseOperation {
 public:
        MathArcTangentOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathPowerOperation : public MathBaseOperation {
 public:
        MathPowerOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathLogarithmOperation : public MathBaseOperation {
 public:
        MathLogarithmOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathMinimumOperation : public MathBaseOperation {
 public:
        MathMinimumOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathMaximumOperation : public MathBaseOperation {
 public:
        MathMaximumOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathRoundOperation : public MathBaseOperation {
 public:
        MathRoundOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathLessThanOperation : public MathBaseOperation {
 public:
        MathLessThanOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 class MathGreaterThanOperation : public MathBaseOperation {
 public:
        MathGreaterThanOperation() : MathBaseOperation() {}
-       void executePixel(float *outputValue, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 };
 
 #endif
index b49c65cc010d15228b897091cca11462f84b622c..be737f222809a1f38fa23486d3a8924e92426399 100644 (file)
@@ -27,7 +27,7 @@ MixAddOperation::MixAddOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixAddOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -42,11 +42,11 @@ void MixAddOperation::executePixel(float *outputValue, float x, float y, PixelSa
        if (this->useValueAlphaMultiply()) {
                value *= inputColor2[3];
        }
-       outputValue[0] = inputColor1[0] + value * inputColor2[0];
-       outputValue[1] = inputColor1[1] + value * inputColor2[1];
-       outputValue[2] = inputColor1[2] + value * inputColor2[2];
-       outputValue[3] = inputColor1[3];
+       output[0] = inputColor1[0] + value * inputColor2[0];
+       output[1] = inputColor1[1] + value * inputColor2[1];
+       output[2] = inputColor1[2] + value * inputColor2[2];
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
index 8fc417060738340c53b7c130d8d8c5a53ca5e9a3..5a52846e84766971eec85866c8e0af34c6b7bbc8 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index 8a43e4275b1866d1a56d0b457e2e6eb3709c9abb..2d40629e7645755637bd232b16c8ca384a2be9cd 100644 (file)
@@ -42,7 +42,7 @@ void MixBaseOperation::initExecution()
        this->m_inputColor2Operation = this->getInputSocketReader(2);
 }
 
-void MixBaseOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler)
+void MixBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -57,10 +57,10 @@ void MixBaseOperation::executePixel(float *outputColor, float x, float y, PixelS
                value *= inputColor2[3];
        }
        float valuem = 1.0f - value;
-       outputColor[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
-       outputColor[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
-       outputColor[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
-       outputColor[3] = inputColor1[3];
+       output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
+       output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
+       output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
+       output[3] = inputColor1[3];
 }
 
 void MixBaseOperation::deinitExecution()
index c3e171c5c224052b6a0221adf8cdfe31e2f71ac2..4b466d193d6dde9eae3705a3b7bcd37315ce6f1c 100644 (file)
@@ -59,7 +59,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
        
        /**
         * Initialize the execution
index 090343e8450e82248e30dfd1f67c92fde8ed63db..0ca7d460064ace83825608a2de075c19c9d34a78 100644 (file)
@@ -27,7 +27,7 @@ MixBlendOperation::MixBlendOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixBlendOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixBlendOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -43,10 +43,10 @@ void MixBlendOperation::executePixel(float *outputValue, float x, float y, Pixel
                value *= inputColor2[3];
        }
        float valuem = 1.0f - value;
-       outputValue[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
-       outputValue[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
-       outputValue[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
-       outputValue[3] = inputColor1[3];
+       output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
+       output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
+       output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
index 6073ca1fc52a49ab2f7c51c29f0bf82f8b3a6629..ce3f187a5e2ce10d96567b88c15d538852342ec1 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index fbb3cb7b27b0d9a9e895c903cc0607ce5a139ef6..5cfe38766bcf45eae464e1f12de7adfccf829503 100644 (file)
@@ -27,7 +27,7 @@ MixBurnOperation::MixBurnOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixBurnOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixBurnOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -45,45 +45,45 @@ void MixBurnOperation::executePixel(float *outputValue, float x, float y, PixelS
        
        tmp = valuem + value * inputColor2[0];
        if (tmp <= 0.0f)
-               outputValue[0] = 0.0f;
+               output[0] = 0.0f;
        else {
                tmp = 1.0f - (1.0f - inputColor1[0]) / tmp;
                if (tmp < 0.0f)
-                       outputValue[0] = 0.0f;
+                       output[0] = 0.0f;
                else if (tmp > 1.0f)
-                       outputValue[0] = 1.0f;
+                       output[0] = 1.0f;
                else
-                       outputValue[0] = tmp;
+                       output[0] = tmp;
        }
        
        tmp = valuem + value * inputColor2[1];
        if (tmp <= 0.0f)
-               outputValue[1] = 0.0f;
+               output[1] = 0.0f;
        else {
                tmp = 1.0f - (1.0f - inputColor1[1]) / tmp;
                if (tmp < 0.0f)
-                       outputValue[1] = 0.0f;
+                       output[1] = 0.0f;
                else if (tmp > 1.0f)
-                       outputValue[1] = 1.0f;
+                       output[1] = 1.0f;
                else
-                       outputValue[1] = tmp;
+                       output[1] = tmp;
        }
        
        tmp = valuem + value * inputColor2[2];
        if (tmp <= 0.0f)
-               outputValue[2] = 0.0f;
+               output[2] = 0.0f;
        else {
                tmp = 1.0f - (1.0f - inputColor1[2]) / tmp;
                if (tmp < 0.0f)
-                       outputValue[2] = 0.0f;
+                       output[2] = 0.0f;
                else if (tmp > 1.0f)
-                       outputValue[2] = 1.0f;
+                       output[2] = 1.0f;
                else
-                       outputValue[2] = tmp;
+                       output[2] = tmp;
        }
        
-       outputValue[3] = inputColor1[3];
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
index 88435f05503101ef7396d55715d3ee5f324b6421..131ccfa2130aa7151eec432a96f46e8d976378e2 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index 378cfbd9b6cc4e97d5e1d47912b94959452daccc..f8aca92abc784c9b397cc122087234aa97877da3 100644 (file)
@@ -31,7 +31,7 @@ MixColorOperation::MixColorOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -53,12 +53,12 @@ void MixColorOperation::executePixel(float *outputValue, float x, float y, Pixel
                float tmpr, tmpg, tmpb;
                rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
                hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
-               outputValue[0] = valuem * (inputColor1[0]) + value * tmpr;
-               outputValue[1] = valuem * (inputColor1[1]) + value * tmpg;
-               outputValue[2] = valuem * (inputColor1[2]) + value * tmpb;
+               output[0] = valuem * (inputColor1[0]) + value * tmpr;
+               output[1] = valuem * (inputColor1[1]) + value * tmpg;
+               output[2] = valuem * (inputColor1[2]) + value * tmpb;
        }
-       outputValue[3] = inputColor1[3];
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
index fb91a426f40bcb49985383450d8cfd86eb26bb34..1409d726f03233961828afbdcffac593537de2b3 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index 68f9c02373328fd320b4cb9f88cc9e1c011c807b..5b79f4c95ac7d5e16d35089a8b7445a73311fa9b 100644 (file)
@@ -27,7 +27,7 @@ MixDarkenOperation::MixDarkenOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixDarkenOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixDarkenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -43,17 +43,17 @@ void MixDarkenOperation::executePixel(float *outputValue, float x, float y, Pixe
        float valuem = 1.0f - value;
        float tmp;
        tmp = inputColor2[0] + ((1.0f - inputColor2[0]) * valuem);
-       if (tmp < inputColor1[0]) outputValue[0] = tmp;
-       else outputValue[0] = inputColor1[0];
+       if (tmp < inputColor1[0]) output[0] = tmp;
+       else output[0] = inputColor1[0];
        tmp = inputColor2[1] + ((1.0f - inputColor2[1]) * valuem);
-       if (tmp < inputColor1[1]) outputValue[1] = tmp;
-       else outputValue[1] = inputColor1[1];
+       if (tmp < inputColor1[1]) output[1] = tmp;
+       else output[1] = inputColor1[1];
        tmp = inputColor2[2] + ((1.0f - inputColor2[2]) * valuem);
-       if (tmp < inputColor1[2]) outputValue[2] = tmp;
-       else outputValue[2] = inputColor1[2];
+       if (tmp < inputColor1[2]) output[2] = tmp;
+       else output[2] = inputColor1[2];
        
-       outputValue[3] = inputColor1[3];
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
index 8b5afaecbd5ad337c7b040440f5480bba5e6383f..f9c35fa364b41f0e557951fdcf7c1d379dcd48c3 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index 48964e8b78bc550d3b2139ff2636f86a8d9d85ee..d2c1e5e428fb66b07c15c65f1748e6bca469b335 100644 (file)
@@ -28,7 +28,7 @@ MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixDifferenceOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixDifferenceOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -42,11 +42,11 @@ void MixDifferenceOperation::executePixel(float *outputValue, float x, float y,
                value *= inputColor2[3];
        }
        float valuem = 1.0f - value;
-       outputValue[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
-       outputValue[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
-       outputValue[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
-       outputValue[3] = inputColor1[3];
+       output[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
+       output[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
+       output[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
index f4ad5d07586bbfe199b60ba3d6b5b2b36e64a66a..7e4bf3c675c71ded9b1aa2645cee6f01d62be19a 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index d9d2383001bb68add9b4769792d54424e0156435..fdb1618b6e62457de2a5a7f2fe161a00c9a74883 100644 (file)
@@ -27,7 +27,7 @@ MixDivideOperation::MixDivideOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixDivideOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@ -43,20 +43,20 @@ void MixDivideOperation::executePixel(float *outputValue, float x, float y, Pixe
        float valuem = 1.0f - value;
        
        if (inputColor2[0] != 0.0f)
-               outputValue[0] = valuem * (inputColor1[0]) + value * (inputColor1[0]) / inputColor2[0];
+               output[0] = valuem * (inputColor1[0]) + value * (inputColor1[0]) / inputColor2[0];
        else
-               outputValue[0] = 0.0f;
+               output[0] = 0.0f;
        if (inputColor2[1] != 0.0f)
-               outputValue[1] = valuem * (inputColor1[1]) + value * (inputColor1[1]) / inputColor2[1];
+               output[1] = valuem * (inputColor1[1]) + value * (inputColor1[1]) / inputColor2[1];
        else
-               outputValue[1] = 0.0f;
+               output[1] = 0.0f;
        if (inputColor2[2] != 0.0f)
-               outputValue[2] = valuem * (inputColor1[2]) + value * (inputColor1[2]) / inputColor2[2];
+               output[2] = valuem * (inputColor1[2]) + value * (inputColor1[2]) / inputColor2[2];
        else
-               outputValue[2] = 0.0f;
+               output[2] = 0.0f;
        
-       outputValue[3] = inputColor1[3];
+       output[3] = inputColor1[3];
 
-       clampIfNeeded(outputValue);
+       clampIfNeeded(output);
 }
 
index 8f94fc2d510b1993b311a7cb3580d0c2db84a919..f543265075b55e1b17fd3f8704b32f5e23a0bd50 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * the inner loop of this program
         */
-       void executePixel(float *color, float x, float y, PixelSampler sampler);
+       void executePixel(float output[4], float x, float y, PixelSampler sampler);
 
 };
 #endif
index 34c6e4043f2b75f98a4b9d1223979658c16d7596..87f60df8e1b71102eaca9e6bab6882280924de43 100644 (file)
@@ -27,7 +27,7 @@ MixDodgeOperation::MixDodgeOperation() : MixBaseOperation()
        /* pass */
 }
 
-void MixDodgeOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixDodgeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
 {
        float inputColor1[4];
        float inputColor2[4];
@@