Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-10 18:07:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-10 18:07:24 +0400
commit94a3945cf9de0913b75f83b26e2e62b3bc1b0c07 (patch)
tree89aeabd20d883137b69815d9580f3bc108531a7e /source/blender/compositor/operations
parente8772477894a6fd8c09488b488fdcc1af432da1b (diff)
code cleanup: compositor - define size for executePixel function output float array
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToBWOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToValueProg.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToColorProg.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp29
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceMatteOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DistanceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.cpp32
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp9
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp15
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp114
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.h36
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixBlendOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixBlendOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixBurnOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_MixBurnOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp27
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.cpp5
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp2
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAlphaProg.h2
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp2
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersBaseProg.h2
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp15
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.h4
248 files changed, 845 insertions, 867 deletions
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
index 406a98f81e9..6cc9aae4553 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
@@ -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];
}
}
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
index 5f430efb98e..fa884bacf49 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
@@ -39,6 +39,6 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
index b94486b5b4f..111dc899e1d 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
@@ -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];
}
}
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
index 308f139884d..91128454783 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
@@ -41,7 +41,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *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; }
};
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
index dad43f3b179..ac7906f2f98 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
@@ -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];
}
}
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
index 37ddc6dcda5..d6e9e31c35f 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
@@ -39,7 +39,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
index 27ba2ef51f6..12bf651992e 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
@@ -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;
}
}
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.h b/source/blender/compositor/operations/COM_AntiAliasOperation.h
index 7489d2e393a..385d59fec3c 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.h
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
index 1db3ecb2db8..5f5eca96378 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
@@ -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;
}
}
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.h b/source/blender/compositor/operations/COM_BilateralBlurOperation.h
index c1b5f764f01..8def90941ab 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 7d126eb0539..b31974487ed 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -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);
}
}
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.h b/source/blender/compositor/operations/COM_BokehBlurOperation.h
index 646587197a9..37483d3dc69 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index 979d08390c1..b87be33eca1 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -85,7 +85,7 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
}
return insideBokeh;
}
-void BokehImageOperation::executePixel(float *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()
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h
index 5be4e033ea0..fe86e162eb2 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.h
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index a0fb37f4310..52f84462761 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -44,7 +44,7 @@ void BoxMaskOperation::initExecution()
this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
}
-void BoxMaskOperation::executePixel(float *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;
}
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.h b/source/blender/compositor/operations/COM_BoxMaskOperation.h
index 5a6745d9a9b..f39d74829d4 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.h
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.h
@@ -45,7 +45,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cpp b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
index 9a6a930c7c9..0613540250c 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.h b/source/blender/compositor/operations/COM_BrightnessOperation.h
index 2a6200ad9df..1c8eda63e94 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.h
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.h
@@ -40,7 +40,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
index b0cfdb44736..a2954a20e90 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.h b/source/blender/compositor/operations/COM_CalculateMeanOperation.h
index 09727533306..53edea4977e 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.h
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
index de602ba1dd6..e8268adff7a 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
@@ -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)
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
index 311cedd7d32..92c4b7fa4a0 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
@@ -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);
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
index 7a6a22e5c05..e6e93774685 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -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];
}
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.h b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
index e5660e44f73..57e5dc991e9 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
@@ -49,7 +49,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *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; }
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
index e0e68f90289..234a1c7b1e5 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
@@ -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]);
}
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
index a02d0618a4c..17f84965f63 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
@@ -59,7 +59,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
index 4be03e9d914..c2406abaa65 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
@@ -44,7 +44,7 @@ void ChromaMatteOperation::deinitExecution()
this->m_inputKeyProgram = NULL;
}
-void ChromaMatteOperation::executePixel(float *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 */
}
}
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.h b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
index 37b58fa45ed..adebb7a30c2 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
@@ -42,7 +42,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
index 33e6db22ef4..dfbbef8c56e 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -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];
}
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
index d6361ea16ba..17fb5f67be9 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
@@ -49,7 +49,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
index b0691925361..7e9c10df0a9 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
@@ -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];
}
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
index c3d44c53e53..edc824475c2 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
@@ -50,7 +50,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index ebc818b0f7e..b7a3f43237a 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -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];
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
index 685413741fa..018e67b7ada 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 88bd673a19f..44784837301 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -58,7 +58,7 @@ void ColorCurveOperation::initExecution()
}
-void ColorCurveOperation::executePixel(float *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()
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.h b/source/blender/compositor/operations/COM_ColorCurveOperation.h
index beb2e16298a..063873c6443 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.h
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.h
@@ -41,7 +41,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *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
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
index 26fbd99b43a..d73196e42f5 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
@@ -44,7 +44,7 @@ void ColorMatteOperation::deinitExecution()
this->m_inputKeyProgram = NULL;
}
-void ColorMatteOperation::executePixel(float *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 */
}
}
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.h b/source/blender/compositor/operations/COM_ColorMatteOperation.h
index de7c4dd8ce2..582a94e1873 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.h
@@ -42,7 +42,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
index edd7df89c81..1618c83aece 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.h b/source/blender/compositor/operations/COM_ColorRampOperation.h
index c5f3fe449de..96d9a525e1e 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.h
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.h
@@ -38,7 +38,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
index 2c0bfc10bb0..152b10709fb 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
@@ -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)
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.h b/source/blender/compositor/operations/COM_ColorSpillOperation.h
index ea443f2a5a1..94ff78c37b2 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.h
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.h
@@ -46,7 +46,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
index 354fe51c068..ded686bb5de 100644
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
+++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
@@ -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];
}
}
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.h b/source/blender/compositor/operations/COM_CombineChannelsOperation.h
index ff1251a3949..460eb9bdcb1 100644
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.h
+++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.h
@@ -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();
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
index c7272d461d6..79ce149e790 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
index 09d96a92d95..a8cbc613fb8 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
@@ -59,7 +59,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
index 4da09a69a15..9cff5e8eaa6 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
index a9951af2e3b..963bd32a2f6 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp b/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp
index 17bd34d51b0..3a65519864a 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorToValueProg.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertColorToValueProg.h b/source/blender/compositor/operations/COM_ConvertColorToValueProg.h
index 6a20d4bf27a..5c25d5d0540 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToValueProg.h
+++ b/source/blender/compositor/operations/COM_ConvertColorToValueProg.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
index ec1f0fd37e4..a9b8cbb4272 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
index 861807db8db..93644cb5d1c 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
index efe641b1fe5..88289f12ebb 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
index 4f80ef69f43..d5a1fd72cbf 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
@@ -54,7 +54,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
index 4b42de26f59..65907a8e537 100644
--- a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
index 28ce70170a0..17419ca2a05 100644
--- a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
index 787b1a4547c..4497db52a0f 100644
--- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
index a1a8836a690..502674e26db 100644
--- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
@@ -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();
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
index 22cfdd2f572..b92da4c324f 100644
--- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
index fb83a06c25d..04a9965858d 100644
--- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
@@ -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();
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
index 8478eac75b0..3c7a9d5fd50 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
index 09f6c7e48a6..fdc8dfed31b 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
index 52aa1d7a123..6f6dffdc72b 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
index 7f4eb6d7318..3f85555f3bb 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
index 2206a066a37..8ce9e150080 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
index f7b3da800b3..97d57f657ec 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp b/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp
index 330ffd00acb..98e7650aa56 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp
+++ b/source/blender/compositor/operations/COM_ConvertValueToColorProg.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertValueToColorProg.h b/source/blender/compositor/operations/COM_ConvertValueToColorProg.h
index 2fa5edcf09b..f0f6cfb8fd2 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToColorProg.h
+++ b/source/blender/compositor/operations/COM_ConvertValueToColorProg.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
index 54a5b0dbd0e..411409d263c 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
index c0936a32eb5..da45848ca34 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
index 9fb9a2e0705..78cb706c32d 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
index a062c452a91..9ef5f8fece3 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
index 23b552f1dbe..a3612414029 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
index b662f3eed6c..e42f235a12b 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
index 88a7e7dedd9..8f9eaf49ea4 100644
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
index a8e03bcb807..0a8b67e0bee 100644
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
index 1a5e7cbf2a6..197c7f9f043 100644
--- a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
index 80321ae37d2..ee11ef8df60 100644
--- a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
index 90bda5c8d2c..657126d458c 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
@@ -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];
}
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
index b96b8785524..c666dc2cd42 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
index 6c1e434ab41..fd593b39dcd 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -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)
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
index 88455730c0e..4c192481ba1 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
@@ -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();
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp
index aa10b0f522d..c33bd2544ac 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_CropOperation.h b/source/blender/compositor/operations/COM_CropOperation.h
index 6817635243d..ddc7f855bf1 100644
--- a/source/blender/compositor/operations/COM_CropOperation.h
+++ b/source/blender/compositor/operations/COM_CropOperation.h
@@ -48,7 +48,7 @@ class CropOperation : public CropBaseOperation {
private:
public:
CropOperation();
- void executePixel(float *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
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index a95d1eec290..e23eb26f527 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -44,7 +44,7 @@ void DifferenceMatteOperation::deinitExecution()
this->m_inputImage2Program = NULL;
}
-void DifferenceMatteOperation::executePixel(float *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];
}
}
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
index acec6ebf193..e7d881cbbd5 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
@@ -43,7 +43,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 0890bc75049..5e70187557b 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.h b/source/blender/compositor/operations/COM_DilateErodeOperation.h
index bd044e79fbe..47480d47c3b 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.h
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index 34bf9db77ce..23289429bfd 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -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,
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
index 4de435a1418..e13a13116db 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 018df78cb65..39f0ac7874b 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.h b/source/blender/compositor/operations/COM_DisplaceOperation.h
index 0e5b042aea5..daf54294aa1 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.h
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
index a93e39085c5..560bbbdd244 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
@@ -53,7 +53,7 @@ void DisplaceSimpleOperation::initExecution()
* in order to take effect */
#define DISPLACE_EPSILON 0.01f
-void DisplaceSimpleOperation::executePixel(float *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()
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
index 81adc7be366..989cf8a1f67 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
@@ -48,7 +48,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
index 197e8b07918..b65b5e0f224 100644
--- a/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
@@ -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];
}
}
diff --git a/source/blender/compositor/operations/COM_DistanceMatteOperation.h b/source/blender/compositor/operations/COM_DistanceMatteOperation.h
index 6fe16c7fdff..a176e5da888 100644
--- a/source/blender/compositor/operations/COM_DistanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceMatteOperation.h
@@ -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();
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp
index 559d97d6056..1439dfa404a 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cpp
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp
@@ -45,11 +45,11 @@ void DotproductOperation::deinitExecution()
/** @todo: current implementation is the inverse of a dotproduct. not 'logically' correct
*/
-void DotproductOperation::executePixel(float *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]);
}
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.h b/source/blender/compositor/operations/COM_DotproductOperation.h
index 6ff6f622a50..31588207504 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.h
+++ b/source/blender/compositor/operations/COM_DotproductOperation.h
@@ -31,7 +31,7 @@ private:
SocketReader *m_input2Operation;
public:
DotproductOperation();
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index 847e5817675..d5daace059d 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
index 32e5a07cfdc..528aae7218f 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index c3cbaaaf2fc..9ab21e2d5bd 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -44,7 +44,7 @@ void EllipseMaskOperation::initExecution()
this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
}
-void EllipseMaskOperation::executePixel(float *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;
}
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.h b/source/blender/compositor/operations/COM_EllipseMaskOperation.h
index fce3c93bba6..ed74e6b43db 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.h
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.h
@@ -45,7 +45,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index a7b5b5de6b5..2b2928c98db 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -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)
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
index 32dc428c21c..58bf1d4f596 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
@@ -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();
diff --git a/source/blender/compositor/operations/COM_FlipOperation.cpp b/source/blender/compositor/operations/COM_FlipOperation.cpp
index 939d05fffbf..526eba34d86 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.cpp
+++ b/source/blender/compositor/operations/COM_FlipOperation.cpp
@@ -42,12 +42,12 @@ void FlipOperation::deinitExecution()
}
-void FlipOperation::executePixel(float *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)
diff --git a/source/blender/compositor/operations/COM_FlipOperation.h b/source/blender/compositor/operations/COM_FlipOperation.h
index a13f7ecf752..018617cea8a 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.h
+++ b/source/blender/compositor/operations/COM_FlipOperation.h
@@ -33,7 +33,7 @@ private:
public:
FlipOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
index a4cc03ac380..af990f4f3e0 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.h b/source/blender/compositor/operations/COM_GammaCorrectOperation.h
index 2d4f2ea89d9..514855b4f56 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.h
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.h
@@ -38,7 +38,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *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
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index 40c2ee0a1d4..326031c5984 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_GammaOperation.h b/source/blender/compositor/operations/COM_GammaOperation.h
index 8fc2599cba9..4482f7be34a 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.h
+++ b/source/blender/compositor/operations/COM_GammaOperation.h
@@ -39,7 +39,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
index 9865c87cb07..935bfcac6c7 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
index 6ea8b7e4371..21e80c5daf5 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
index 323a381c869..375f1bcf07c 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
index 050b0c384cb..cb8b2e048ce 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index 74043e187bc..d97d2f15ded 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -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;
}
}
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
index 45140855464..9fcf1e10e6a 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 1cf675a769a..01c85738822 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.h b/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
index a4a0dc655e2..4c3786b0810 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index 135dcf60872..298b4660c6a 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
index e3e0d8891d3..69dcb7e48fb 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index bb4e224c720..1c7d2659c39 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -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);
}
}
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.h b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
index 8db2fc5c72e..44f9db6a483 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.h
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
@@ -42,7 +42,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index df3d00278c3..57d43f67c9b 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -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;
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
index ba565a9f752..5e57d09a51e 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
@@ -37,7 +37,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *Vector, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.cpp b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
index daa2ac9299e..4b9bcb118e7 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.h b/source/blender/compositor/operations/COM_IDMaskOperation.h
index 9d356536499..68c5cf4c1dc 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.h
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.h
@@ -39,7 +39,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index c15bb1dc5e6..4ec5643c0bb 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -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];
}
}
diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h
index 1398b30cbcf..e75e7daa186 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.h
+++ b/source/blender/compositor/operations/COM_ImageOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 6e198f223f9..e586dded8db 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.h b/source/blender/compositor/operations/COM_InpaintOperation.h
index 2f066e19065..59465ed3432 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.h
+++ b/source/blender/compositor/operations/COM_InpaintOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp
index 0802d2d2523..9c2dd825709 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_InvertOperation.cpp
@@ -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];
}
diff --git a/source/blender/compositor/operations/COM_InvertOperation.h b/source/blender/compositor/operations/COM_InvertOperation.h
index 46a5d80b04a..7fded7bb1e4 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.h
+++ b/source/blender/compositor/operations/COM_InvertOperation.h
@@ -42,7 +42,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
index 00ea5877d63..9fb9efe4fc7 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
@@ -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)
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.h b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
index aaacf66a656..a1c56cc9c07 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
@@ -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);
};
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
index d8afaceb37b..909eeed8937 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
@@ -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);
}
}
}
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.h b/source/blender/compositor/operations/COM_KeyingClipOperation.h
index eacbccc0818..d79bd14b900 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.h
@@ -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);
};
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
index 2f3fa2bd72a..4426666f100 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
@@ -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;
}
}
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.h b/source/blender/compositor/operations/COM_KeyingDespillOperation.h
index c6e489057c3..18e771b14f1 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.h
@@ -45,7 +45,7 @@ public:
void setDespillFactor(float value) {this->m_despillFactor = value;}
void setColorBalance(float value) {this->m_colorBalance = value;}
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index ed9e4f1df16..35138cf0b92 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -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;
}
}
}
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.h b/source/blender/compositor/operations/COM_KeyingOperation.h
index 5ca4db7fc75..fcff9243dfc 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingOperation.h
@@ -49,7 +49,7 @@ public:
void setScreenBalance(float value) {this->m_screenBalance = value;}
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
index bf49e7a0e89..c9b129d8dcf 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
@@ -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;
}
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.h b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
index a766c369532..8b1128a4da3 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index 31aae18992b..4c65113ee70 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -40,7 +40,7 @@ void LuminanceMatteOperation::deinitExecution()
this->m_inputImageProgram = NULL;
}
-void LuminanceMatteOperation::executePixel(float *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];
}
}
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
index c1ab628f787..009a1e8825e 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
@@ -41,7 +41,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index a5f503a669b..1a441b0ac9a 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -40,7 +40,7 @@ void MapUVOperation::initExecution()
this->m_inputUVProgram = this->getInputSocketReader(1);
}
-void MapUVOperation::executePixel(float *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);
}
}
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.h b/source/blender/compositor/operations/COM_MapUVOperation.h
index ae042f60789..c8356c1a7ad 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.h
+++ b/source/blender/compositor/operations/COM_MapUVOperation.h
@@ -45,7 +45,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp
index 96e586ccef8..7acc431f7b5 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.h b/source/blender/compositor/operations/COM_MapValueOperation.h
index a2664c32a4e..418d6d9bf4d 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.h
+++ b/source/blender/compositor/operations/COM_MapValueOperation.h
@@ -45,7 +45,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index 46d31eeabf7..a156dfc1d99 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -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;
}
}
diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h
index f57ed27f8e3..2de71afcfa7 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.h
+++ b/source/blender/compositor/operations/COM_MaskOperation.h
@@ -83,7 +83,7 @@ public:
void setMotionBlurSamples(int samples) { this->m_rasterMaskHandleTot = min(max(1, samples), CMP_NODE_MASK_MBLUR_SAMPLES_MAX); }
void setMotionBlurShutter(float shutter) { this->m_frame_shutter = shutter; }
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index 89d7bd48d9e..7039689aa5f 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.h b/source/blender/compositor/operations/COM_MathBaseOperation.h
index 5d28831e18b..b492d06a697 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.h
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.h
@@ -50,7 +50,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *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
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.cpp b/source/blender/compositor/operations/COM_MixAddOperation.cpp
index b49c65cc010..be737f22280 100644
--- a/source/blender/compositor/operations/COM_MixAddOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixAddOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.h b/source/blender/compositor/operations/COM_MixAddOperation.h
index 8fc41706073..5a52846e847 100644
--- a/source/blender/compositor/operations/COM_MixAddOperation.h
+++ b/source/blender/compositor/operations/COM_MixAddOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.cpp b/source/blender/compositor/operations/COM_MixBaseOperation.cpp
index 8a43e4275b1..2d40629e764 100644
--- a/source/blender/compositor/operations/COM_MixBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixBaseOperation.cpp
@@ -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()
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.h b/source/blender/compositor/operations/COM_MixBaseOperation.h
index c3e171c5c22..4b466d193d6 100644
--- a/source/blender/compositor/operations/COM_MixBaseOperation.h
+++ b/source/blender/compositor/operations/COM_MixBaseOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.cpp b/source/blender/compositor/operations/COM_MixBlendOperation.cpp
index 090343e8450..0ca7d460064 100644
--- a/source/blender/compositor/operations/COM_MixBlendOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixBlendOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.h b/source/blender/compositor/operations/COM_MixBlendOperation.h
index 6073ca1fc52..ce3f187a5e2 100644
--- a/source/blender/compositor/operations/COM_MixBlendOperation.h
+++ b/source/blender/compositor/operations/COM_MixBlendOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.cpp b/source/blender/compositor/operations/COM_MixBurnOperation.cpp
index fbb3cb7b27b..5cfe38766bc 100644
--- a/source/blender/compositor/operations/COM_MixBurnOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixBurnOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.h b/source/blender/compositor/operations/COM_MixBurnOperation.h
index 88435f05503..131ccfa2130 100644
--- a/source/blender/compositor/operations/COM_MixBurnOperation.h
+++ b/source/blender/compositor/operations/COM_MixBurnOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.cpp b/source/blender/compositor/operations/COM_MixColorOperation.cpp
index 378cfbd9b6c..f8aca92abc7 100644
--- a/source/blender/compositor/operations/COM_MixColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixColorOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.h b/source/blender/compositor/operations/COM_MixColorOperation.h
index fb91a426f40..1409d726f03 100644
--- a/source/blender/compositor/operations/COM_MixColorOperation.h
+++ b/source/blender/compositor/operations/COM_MixColorOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp b/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
index 68f9c023733..5b79f4c95ac 100644
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.h b/source/blender/compositor/operations/COM_MixDarkenOperation.h
index 8b5afaecbd5..f9c35fa364b 100644
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.h
+++ b/source/blender/compositor/operations/COM_MixDarkenOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp b/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
index 48964e8b78b..d2c1e5e428f 100644
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.h b/source/blender/compositor/operations/COM_MixDifferenceOperation.h
index f4ad5d07586..7e4bf3c675c 100644
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.h
+++ b/source/blender/compositor/operations/COM_MixDifferenceOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.cpp b/source/blender/compositor/operations/COM_MixDivideOperation.cpp
index d9d2383001b..fdb1618b6e6 100644
--- a/source/blender/compositor/operations/COM_MixDivideOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDivideOperation.cpp
@@ -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);
}
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.h b/source/blender/compositor/operations/COM_MixDivideOperation.h
index 8f94fc2d510..f543265075b 100644
--- a/source/blender/compositor/operations/COM_MixDivideOperation.h
+++ b/source/blender/compositor/operations/COM_MixDivideOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp b/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
index 34c6e4043f2..87f60df8e1b 100644
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
@@ -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];
@@ -45,50 +45,50 @@ void MixDodgeOperation::executePixel(float *outputValue, float x, float y, Pixel
if (inputColor1[0] != 0.0f) {
tmp = 1.0f - value * inputColor2[0];
if (tmp <= 0.0f)
- outputValue[0] = 1.0f;
+ output[0] = 1.0f;
else {
tmp = inputColor1[0] / tmp;
if (tmp > 1.0f)
- outputValue[0] = 1.0f;
+ output[0] = 1.0f;
else
- outputValue[0] = tmp;
+ output[0] = tmp;
}
}
else
- outputValue[0] = 0.0f;
+ output[0] = 0.0f;
if (inputColor1[1] != 0.0f) {
tmp = 1.0f - value * inputColor2[1];
if (tmp <= 0.0f)
- outputValue[1] = 1.0f;
+ output[1] = 1.0f;
else {
tmp = inputColor1[1] / tmp;
if (tmp > 1.0f)
- outputValue[1] = 1.0f;
+ output[1] = 1.0f;
else
- outputValue[1] = tmp;
+ output[1] = tmp;
}
}
else
- outputValue[1] = 0.0f;
+ output[1] = 0.0f;
if (inputColor1[2] != 0.0f) {
tmp = 1.0f - value * inputColor2[2];
if (tmp <= 0.0f)
- outputValue[2] = 1.0f;
+ output[2] = 1.0f;
else {
tmp = inputColor1[2] / tmp;
if (tmp > 1.0f)
- outputValue[2] = 1.0f;
+ output[2] = 1.0f;
else
- outputValue[2] = tmp;
+ output[2] = tmp;
}
}
else
- outputValue[2] = 0.0f;
+ output[2] = 0.0f;
- outputValue[3] = inputColor1[3];
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.h b/source/blender/compositor/operations/COM_MixDodgeOperation.h
index f99a82dca8d..9a285c675c5 100644
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.h
+++ b/source/blender/compositor/operations/COM_MixDodgeOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.cpp b/source/blender/compositor/operations/COM_MixGlareOperation.cpp
index 4a569404ddc..b6a9aa3da3c 100644
--- a/source/blender/compositor/operations/COM_MixGlareOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixGlareOperation.cpp
@@ -27,7 +27,7 @@ MixGlareOperation::MixGlareOperation() : MixBaseOperation()
/* pass */
}
-void MixGlareOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixGlareOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -40,10 +40,10 @@ void MixGlareOperation::executePixel(float *outputValue, float x, float y, Pixel
value = inputValue[0];
float mf = 2.f - 2.f * fabsf(value - 0.5f);
- outputValue[0] = mf * ((inputColor1[0]) + value * (inputColor2[0] - inputColor1[0]));
- outputValue[1] = mf * ((inputColor1[1]) + value * (inputColor2[1] - inputColor1[1]));
- outputValue[2] = mf * ((inputColor1[2]) + value * (inputColor2[2] - inputColor1[2]));
- outputValue[3] = inputColor1[3];
+ output[0] = mf * ((inputColor1[0]) + value * (inputColor2[0] - inputColor1[0]));
+ output[1] = mf * ((inputColor1[1]) + value * (inputColor2[1] - inputColor1[1]));
+ output[2] = mf * ((inputColor1[2]) + value * (inputColor2[2] - inputColor1[2]));
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.h b/source/blender/compositor/operations/COM_MixGlareOperation.h
index 23b9f2420a0..99d478e347d 100644
--- a/source/blender/compositor/operations/COM_MixGlareOperation.h
+++ b/source/blender/compositor/operations/COM_MixGlareOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.cpp b/source/blender/compositor/operations/COM_MixHueOperation.cpp
index 3745f502709..5688d6b26f0 100644
--- a/source/blender/compositor/operations/COM_MixHueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixHueOperation.cpp
@@ -31,7 +31,7 @@ MixHueOperation::MixHueOperation() : MixBaseOperation()
/* pass */
}
-void MixHueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -53,11 +53,11 @@ void MixHueOperation::executePixel(float *outputValue, float x, float y, PixelSa
float tmpr, tmpg, tmpb;
rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
hsv_to_rgb(colH, rS, 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);
}
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.h b/source/blender/compositor/operations/COM_MixHueOperation.h
index 1c8eadabbbd..d9864bbe3dc 100644
--- a/source/blender/compositor/operations/COM_MixHueOperation.h
+++ b/source/blender/compositor/operations/COM_MixHueOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.cpp b/source/blender/compositor/operations/COM_MixLightenOperation.cpp
index 868459db8bf..9eb45a783f8 100644
--- a/source/blender/compositor/operations/COM_MixLightenOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixLightenOperation.cpp
@@ -27,7 +27,7 @@ MixLightenOperation::MixLightenOperation() : MixBaseOperation()
/* pass */
}
-void MixLightenOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixLightenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -42,16 +42,16 @@ void MixLightenOperation::executePixel(float *outputValue, float x, float y, Pix
}
float tmp;
tmp = value * inputColor2[0];
- 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 = value * inputColor2[1];
- 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 = value * inputColor2[2];
- if (tmp > inputColor1[2]) outputValue[2] = tmp;
- else outputValue[2] = inputColor1[2];
- outputValue[3] = inputColor1[3];
+ if (tmp > inputColor1[2]) output[2] = tmp;
+ else output[2] = inputColor1[2];
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.h b/source/blender/compositor/operations/COM_MixLightenOperation.h
index d03ab317035..5f08a067e11 100644
--- a/source/blender/compositor/operations/COM_MixLightenOperation.h
+++ b/source/blender/compositor/operations/COM_MixLightenOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp b/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
index 2fff05fbbc9..ee7dcc9fe28 100644
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
@@ -27,7 +27,7 @@ MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation()
/* pass */
}
-void MixLinearLightOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixLinearLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -41,19 +41,19 @@ void MixLinearLightOperation::executePixel(float *outputValue, float x, float y,
value *= inputColor2[3];
}
if (inputColor2[0] > 0.5f)
- outputValue[0] = inputColor1[0] + value * (2.0f * (inputColor2[0] - 0.5f));
+ output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0] - 0.5f));
else
- outputValue[0] = inputColor1[0] + value * (2.0f * (inputColor2[0]) - 1.0f);
+ output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0]) - 1.0f);
if (inputColor2[1] > 0.5f)
- outputValue[1] = inputColor1[1] + value * (2.0f * (inputColor2[1] - 0.5f));
+ output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1] - 0.5f));
else
- outputValue[1] = inputColor1[1] + value * (2.0f * (inputColor2[1]) - 1.0f);
+ output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1]) - 1.0f);
if (inputColor2[2] > 0.5f)
- outputValue[2] = inputColor1[2] + value * (2.0f * (inputColor2[2] - 0.5f));
+ output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2] - 0.5f));
else
- outputValue[2] = inputColor1[2] + value * (2.0f * (inputColor2[2]) - 1.0f);
+ output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2]) - 1.0f);
- outputValue[3] = inputColor1[3];
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.h b/source/blender/compositor/operations/COM_MixLinearLightOperation.h
index 7a9acbe00b0..35451a9f3db 100644
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.h
+++ b/source/blender/compositor/operations/COM_MixLinearLightOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp b/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
index 911c0c83b90..e53addb7041 100644
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
@@ -27,7 +27,7 @@ MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation()
/* pass */
}
-void MixMultiplyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -42,11 +42,11 @@ void MixMultiplyOperation::executePixel(float *outputValue, float x, float y, Pi
value *= inputColor2[3];
}
float valuem = 1.0f - value;
- outputValue[0] = inputColor1[0] * (valuem + value * inputColor2[0]);
- outputValue[1] = inputColor1[1] * (valuem + value * inputColor2[1]);
- outputValue[2] = inputColor1[2] * (valuem + value * inputColor2[2]);
- outputValue[3] = inputColor1[3];
+ output[0] = inputColor1[0] * (valuem + value * inputColor2[0]);
+ output[1] = inputColor1[1] * (valuem + value * inputColor2[1]);
+ output[2] = inputColor1[2] * (valuem + value * inputColor2[2]);
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.h b/source/blender/compositor/operations/COM_MixMultiplyOperation.h
index ab7d06aecf6..cdd56bd2f39 100644
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.h
+++ b/source/blender/compositor/operations/COM_MixMultiplyOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp b/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
index ba7a86a80a7..09a9d3cbc4f 100644
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
@@ -27,7 +27,7 @@ MixOverlayOperation::MixOverlayOperation() : MixBaseOperation()
/* pass */
}
-void MixOverlayOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixOverlayOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -44,25 +44,25 @@ void MixOverlayOperation::executePixel(float *outputValue, float x, float y, Pix
float valuem = 1.0f - value;
if (inputColor1[0] < 0.5f) {
- outputValue[0] = inputColor1[0] * (valuem + 2.0f * value * inputColor2[0]);
+ output[0] = inputColor1[0] * (valuem + 2.0f * value * inputColor2[0]);
}
else {
- outputValue[0] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
+ output[0] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
}
if (inputColor1[1] < 0.5f) {
- outputValue[1] = inputColor1[1] * (valuem + 2.0f * value * inputColor2[1]);
+ output[1] = inputColor1[1] * (valuem + 2.0f * value * inputColor2[1]);
}
else {
- outputValue[1] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
+ output[1] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
}
if (inputColor1[2] < 0.5f) {
- outputValue[2] = inputColor1[2] * (valuem + 2.0f * value * inputColor2[2]);
+ output[2] = inputColor1[2] * (valuem + 2.0f * value * inputColor2[2]);
}
else {
- outputValue[2] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
+ output[2] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
}
- outputValue[3] = inputColor1[3];
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.h b/source/blender/compositor/operations/COM_MixOverlayOperation.h
index d31396f471b..4f2c08ce95f 100644
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.h
+++ b/source/blender/compositor/operations/COM_MixOverlayOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp b/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
index 403dac57615..401ad8d4247 100644
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
@@ -31,7 +31,7 @@ MixSaturationOperation::MixSaturationOperation() : MixBaseOperation()
/* pass */
}
-void MixSaturationOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixSaturationOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -51,9 +51,9 @@ void MixSaturationOperation::executePixel(float *outputValue, float x, float y,
if (rS != 0.0f) {
float colH, colS, colV;
rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &outputValue[0], &outputValue[1], &outputValue[2]);
+ hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
}
- outputValue[3] = inputColor1[3];
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.h b/source/blender/compositor/operations/COM_MixSaturationOperation.h
index f89f03c0e18..c690db38daf 100644
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.h
+++ b/source/blender/compositor/operations/COM_MixSaturationOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.cpp b/source/blender/compositor/operations/COM_MixScreenOperation.cpp
index 781bc87ece7..671ffd3303c 100644
--- a/source/blender/compositor/operations/COM_MixScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixScreenOperation.cpp
@@ -27,7 +27,7 @@ MixScreenOperation::MixScreenOperation() : MixBaseOperation()
/* pass */
}
-void MixScreenOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixScreenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -43,11 +43,11 @@ void MixScreenOperation::executePixel(float *outputValue, float x, float y, Pixe
}
float valuem = 1.0f - value;
- outputValue[0] = 1.0f - (valuem + value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
- outputValue[1] = 1.0f - (valuem + value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
- outputValue[2] = 1.0f - (valuem + value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
- outputValue[3] = inputColor1[3];
+ output[0] = 1.0f - (valuem + value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
+ output[1] = 1.0f - (valuem + value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
+ output[2] = 1.0f - (valuem + value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.h b/source/blender/compositor/operations/COM_MixScreenOperation.h
index 843adc870f8..5ba3cf769bb 100644
--- a/source/blender/compositor/operations/COM_MixScreenOperation.h
+++ b/source/blender/compositor/operations/COM_MixScreenOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp b/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
index b1374aa7f32..604881ae47f 100644
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
@@ -27,7 +27,7 @@ MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation()
/* pass */
}
-void MixSoftLightOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler) \
+void MixSoftLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) \
{
float inputColor1[4];
float inputColor2[4];
@@ -48,11 +48,11 @@ void MixSoftLightOperation::executePixel(float *outputValue, float x, float y, P
scg = 1.0f - (1.0f - inputColor2[1]) * (1.0f - inputColor1[1]);
scb = 1.0f - (1.0f - inputColor2[2]) * (1.0f - inputColor1[2]);
- outputValue[0] = valuem * (inputColor1[0]) + value * (((1.0f - inputColor1[0]) * inputColor2[0] * (inputColor1[0])) + (inputColor1[0] * scr));
- outputValue[1] = valuem * (inputColor1[1]) + value * (((1.0f - inputColor1[1]) * inputColor2[1] * (inputColor1[1])) + (inputColor1[1] * scg));
- outputValue[2] = valuem * (inputColor1[2]) + value * (((1.0f - inputColor1[2]) * inputColor2[2] * (inputColor1[2])) + (inputColor1[2] * scb));
- outputValue[3] = inputColor1[3];
+ output[0] = valuem * (inputColor1[0]) + value * (((1.0f - inputColor1[0]) * inputColor2[0] * (inputColor1[0])) + (inputColor1[0] * scr));
+ output[1] = valuem * (inputColor1[1]) + value * (((1.0f - inputColor1[1]) * inputColor2[1] * (inputColor1[1])) + (inputColor1[1] * scg));
+ output[2] = valuem * (inputColor1[2]) + value * (((1.0f - inputColor1[2]) * inputColor2[2] * (inputColor1[2])) + (inputColor1[2] * scb));
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.h b/source/blender/compositor/operations/COM_MixSoftLightOperation.h
index 570cf2cb6ef..55f6a70791a 100644
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.h
+++ b/source/blender/compositor/operations/COM_MixSoftLightOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp b/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
index f7b558e5c7a..a446dfe4e54 100644
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
@@ -27,7 +27,7 @@ MixSubtractOperation::MixSubtractOperation() : MixBaseOperation()
/* pass */
}
-void MixSubtractOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -40,11 +40,11 @@ void MixSubtractOperation::executePixel(float *outputValue, float x, float y, Pi
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);
}
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.h b/source/blender/compositor/operations/COM_MixSubtractOperation.h
index a9198cf3400..046d8d4949b 100644
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.h
+++ b/source/blender/compositor/operations/COM_MixSubtractOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.cpp b/source/blender/compositor/operations/COM_MixValueOperation.cpp
index 8f8d3305ee9..caefdf024cc 100644
--- a/source/blender/compositor/operations/COM_MixValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixValueOperation.cpp
@@ -31,7 +31,7 @@ MixValueOperation::MixValueOperation() : MixBaseOperation()
/* pass */
}
-void MixValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MixValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inputColor1[4];
float inputColor2[4];
@@ -50,8 +50,8 @@ void MixValueOperation::executePixel(float *outputValue, float x, float y, Pixel
float colH, colS, colV;
rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- hsv_to_rgb(rH, rS, (valuem * rV + value * colV), &outputValue[0], &outputValue[1], &outputValue[2]);
- outputValue[3] = inputColor1[3];
+ hsv_to_rgb(rH, rS, (valuem * rV + value * colV), &output[0], &output[1], &output[2]);
+ output[3] = inputColor1[3];
- clampIfNeeded(outputValue);
+ clampIfNeeded(output);
}
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.h b/source/blender/compositor/operations/COM_MixValueOperation.h
index 06316afcd73..6c3f3ce8072 100644
--- a/source/blender/compositor/operations/COM_MixValueOperation.h
+++ b/source/blender/compositor/operations/COM_MixValueOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
index a4d9a28e895..0d2de47bc4f 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
@@ -33,7 +33,7 @@ MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation()
this->m_attribute = MCA_X;
}
-void MovieClipAttributeOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void MovieClipAttributeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
if (!this->m_valueSet) {
float loc[2], scale, angle;
@@ -61,7 +61,7 @@ void MovieClipAttributeOperation::executePixel(float *outputValue, float x, floa
}
this->m_valueSet = true;
}
- outputValue[0] = this->m_value;
+ output[0] = this->m_value;
}
void MovieClipAttributeOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
index d9b1888ebe9..f894626d534 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
@@ -51,7 +51,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
void setMovieClip(MovieClip *clip) { this->m_clip = clip; }
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
index 2c319d9bfd5..b73db74b061 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
@@ -91,21 +91,21 @@ void MovieClipOperation::determineResolution(unsigned int resolution[2], unsigne
}
}
-void MovieClipOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MovieClipOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
if (this->m_movieClipBuffer == 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_movieClipBuffer, NULL, color, x, y);
+ neareast_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->m_movieClipBuffer, NULL, color, x, y);
+ bilinear_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->m_movieClipBuffer, NULL, color, x, y);
+ bicubic_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y);
break;
}
}
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h b/source/blender/compositor/operations/COM_MovieClipOperation.h
index 1b297408bb8..7cce42f6727 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.h
@@ -59,7 +59,7 @@ public:
void setCacheFrame(bool value) { this->m_cacheFrame = value; }
void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index 964d4352bc0..8150e3eda75 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -78,16 +78,16 @@ void MovieDistortionOperation::deinitExecution()
}
-void MovieDistortionOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MovieDistortionOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
if (this->m_cache != NULL) {
float u, v;
this->m_cache->getUV(&this->m_movieClip->tracking, x, y, &u, &v);
- this->m_inputOperation->read(color, u, v, sampler);
+ this->m_inputOperation->read(output, u, v, sampler);
}
else {
- this->m_inputOperation->read(color, x, y, sampler);
+ this->m_inputOperation->read(output, x, y, sampler);
}
}
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
index 8cd9e98da2d..a58349f9324 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
@@ -130,7 +130,7 @@ protected:
public:
MovieDistortionOperation(bool distortion);
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();
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
index 27214acd0d4..af0d5161835 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -43,59 +43,56 @@ ImBuf *MultilayerBaseOperation::getImBuf()
return NULL;
}
-void MultilayerColorOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MultilayerColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
int yi = y;
int xi = x;
if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
- color[0] = 0.0f;
- color[1] = 0.0f;
- color[2] = 0.0f;
- color[3] = 0.0f;
+ zero_v4(output);
}
else {
if (this->m_numberOfChannels == 4) {
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;
}
}
else {
int offset = (yi * this->getWidth() + xi) * 3;
- copy_v3_v3(color, &this->m_imageBuffer[offset]);
+ copy_v3_v3(output, &this->m_imageBuffer[offset]);
}
}
}
-void MultilayerValueOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MultilayerValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
int yi = y;
int xi = x;
if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
- color[0] = 0.0f;
+ output[0] = 0.0f;
}
else {
float result = this->m_imageBuffer[yi * this->getWidth() + xi];
- color[0] = result;
+ output[0] = result;
}
}
-void MultilayerVectorOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void MultilayerVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
int yi = y;
int xi = x;
if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
- color[0] = 0.0f;
+ output[0] = 0.0f;
}
else {
int offset = (yi * this->getWidth() + xi) * 3;
- copy_v3_v3(color, &this->m_imageBuffer[offset]);
+ copy_v3_v3(output, &this->m_imageBuffer[offset]);
}
}
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.h b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
index 82bd8c455df..3c498e962b5 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.h
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
@@ -46,7 +46,7 @@ public:
MultilayerColorOperation(int pass) : MultilayerBaseOperation(pass) {
this->addOutputSocket(COM_DT_COLOR);
}
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
class MultilayerValueOperation : public MultilayerBaseOperation {
@@ -54,7 +54,7 @@ public:
MultilayerValueOperation(int pass) : MultilayerBaseOperation(pass) {
this->addOutputSocket(COM_DT_VALUE);
}
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
class MultilayerVectorOperation : public MultilayerBaseOperation {
@@ -62,7 +62,7 @@ public:
MultilayerVectorOperation(int pass) : MultilayerBaseOperation(pass) {
this->addOutputSocket(COM_DT_VECTOR);
}
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cpp b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
index 02ea7f2b257..5f7ac6bb9ca 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
@@ -35,15 +35,14 @@ void NormalizeOperation::initExecution()
NodeOperation::initMutex();
}
-void NormalizeOperation::executePixel(float *color, int x, int y, void *data)
+void NormalizeOperation::executePixel(float output[4], int x, int y, void *data)
{
/* using generic two floats struct to store x: min y: mult */
NodeTwoFloats *minmult = (NodeTwoFloats *)data;
- float output[4];
this->m_imageReader->read(output, x, y, NULL);
- color[0] = (output[0] - minmult->x) * minmult->y;
+ output[0] = (output[0] - minmult->x) * minmult->y;
}
void NormalizeOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.h b/source/blender/compositor/operations/COM_NormalizeOperation.h
index f36d69a3018..32f39a4d9ca 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.h
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 00ad319e3b7..7e854f01213 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -47,7 +47,7 @@ void *ProjectorLensDistortionOperation::initializeTileData(rcti *rect)
return buffer;
}
-void ProjectorLensDistortionOperation::executePixel(float *color, int x, int y, void *data)
+void ProjectorLensDistortionOperation::executePixel(float output[4], int x, int y, void *data)
{
float inputValue[4];
const float height = this->getHeight();
@@ -56,12 +56,12 @@ void ProjectorLensDistortionOperation::executePixel(float *color, int x, int y,
const float u = (x + 0.5f) / width;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
inputBuffer->readCubic(inputValue, (u * width + this->m_kr2) - 0.5f, v * height - 0.5f);
- color[0] = inputValue[0];
+ output[0] = inputValue[0];
inputBuffer->read(inputValue, x, y);
- color[1] = inputValue[1];
+ output[1] = inputValue[1];
inputBuffer->readCubic(inputValue, (u * width - this->m_kr2) - 0.5f, v * height - 0.5f);
- color[2] = inputValue[2];
- color[3] = 1.0f;
+ output[2] = inputValue[2];
+ output[3] = 1.0f;
}
void ProjectorLensDistortionOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
index ac64b35ed32..3c910815efc 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
@@ -44,7 +44,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
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 677d5abafef..a2385f79c04 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -49,19 +49,19 @@ void ReadBufferOperation::determineResolution(unsigned int resolution[2], unsign
}
}
}
-void ReadBufferOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ReadBufferOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
if (sampler == COM_PS_NEAREST) {
- m_buffer->read(color, x, y);
+ m_buffer->read(output, x, y);
}
else {
- m_buffer->readCubic(color, x, y);
+ m_buffer->readCubic(output, x, y);
}
}
-void ReadBufferOperation::executePixel(float *color, float x, float y, float dx, float dy)
+void ReadBufferOperation::executePixel(float output[4], float x, float y, float dx, float dy)
{
- m_buffer->readEWA(color, x, y, dx, dy);
+ m_buffer->readEWA(output, x, y, dx, dy);
}
bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index f5a76070609..7958a4aee6b 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -39,8 +39,8 @@ public:
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
void *initializeTileData(rcti *rect);
- void executePixel(float *color, float x, float y, PixelSampler sampler);
- void executePixel(float *color, float x, float y, float dx, float dy);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, float dx, float dy);
const bool isReadBufferOperation() const { return true; }
void setOffset(unsigned int offset) { this->m_offset = offset; }
unsigned int getOffset() { return this->m_offset; }
diff --git a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
index 908c3d11b06..74cb506d264 100644
--- a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
@@ -27,7 +27,7 @@ RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_C
this->addOutputSocket(COM_DT_VALUE);
}
-void RenderLayersAlphaProg::executePixel(float *output, float x, float y, PixelSampler sampler)
+void RenderLayersAlphaProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
int ix = x;
int iy = y;
diff --git a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
index 1733f3bd3ba..36668bc9338 100644
--- a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
@@ -28,7 +28,7 @@
class RenderLayersAlphaProg : public RenderLayersBaseProg {
public:
RenderLayersAlphaProg();
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
index 6b2e1f919d1..a4015c6283f 100644
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
@@ -69,7 +69,7 @@ void RenderLayersBaseProg::initExecution()
}
}
-void RenderLayersBaseProg::executePixel(float *output, float x, float y, PixelSampler sampler)
+void RenderLayersBaseProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
int ix = x;
int iy = y;
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h b/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
index bef8a8d4407..ea57d4bc421 100644
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
@@ -92,7 +92,7 @@ public:
short getLayerId() { return this->m_layerId; }
void initExecution();
void deinitExecution();
- void executePixel(float *output, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp
index a39828e4560..422c5b93484 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -68,14 +68,14 @@ inline void RotateOperation::ensureDegree()
}
-void RotateOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void RotateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
ensureDegree();
const float dy = y - this->m_centerY;
const float dx = x - this->m_centerX;
const float nx = this->m_centerX + (this->m_cosine * dx + this->m_sine * dy);
const float ny = this->m_centerY + (-this->m_sine * dx + this->m_cosine * dy);
- this->m_imageSocket->read(color, nx, ny, sampler);
+ this->m_imageSocket->read(output, nx, ny, sampler);
}
bool RotateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_RotateOperation.h b/source/blender/compositor/operations/COM_RotateOperation.h
index d011ac0ecc9..292f0743a44 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.h
+++ b/source/blender/compositor/operations/COM_RotateOperation.h
@@ -38,7 +38,7 @@ private:
public:
RotateOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
void setDoDegree2RadConversion(bool abool) { this->m_doDegree2RadConversion = abool; }
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp
index 9fab427b36e..276b2f54b6e 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp
@@ -57,7 +57,7 @@ void ScaleOperation::deinitExecution()
}
-void ScaleOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ScaleOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
#ifdef USE_FORCE_BILINEAR
sampler = COM_PS_BILINEAR;
@@ -74,7 +74,7 @@ void ScaleOperation::executePixel(float *color, float x, float y, PixelSampler s
float nx = this->m_centerX + (x - this->m_centerX) / scx;
float ny = this->m_centerY + (y - this->m_centerY) / scy;
- this->m_inputOperation->read(color, nx, ny, sampler);
+ this->m_inputOperation->read(output, nx, ny, sampler);
}
bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -127,7 +127,7 @@ void ScaleAbsoluteOperation::deinitExecution()
}
-void ScaleAbsoluteOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ScaleAbsoluteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
#ifdef USE_FORCE_BILINEAR
sampler = COM_PS_BILINEAR;
@@ -151,7 +151,7 @@ void ScaleAbsoluteOperation::executePixel(float *color, float x, float y, PixelS
float nx = this->m_centerX + (x - this->m_centerX) / relativeXScale;
float ny = this->m_centerY + (y - this->m_centerY) / relativeYScale;
- this->m_inputOperation->read(color, nx, ny, sampler);
+ this->m_inputOperation->read(output, nx, ny, sampler);
}
bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -248,7 +248,7 @@ void ScaleFixedSizeOperation::deinitExecution()
}
-void ScaleFixedSizeOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ScaleFixedSizeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
#ifdef USE_FORCE_BILINEAR
sampler = COM_PS_BILINEAR;
@@ -257,10 +257,10 @@ void ScaleFixedSizeOperation::executePixel(float *color, float x, float y, Pixel
if (this->m_is_offset) {
float nx = ((x - this->m_offsetX) * this->m_relX);
float ny = ((y - this->m_offsetY) * this->m_relY);
- this->m_inputOperation->read(color, nx, ny, sampler);
+ this->m_inputOperation->read(output, nx, ny, sampler);
}
else {
- this->m_inputOperation->read(color, x * this->m_relX, y * this->m_relY, sampler);
+ this->m_inputOperation->read(output, x * this->m_relX, y * this->m_relY, sampler);
}
}
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.h b/source/blender/compositor/operations/COM_ScaleOperation.h
index ab63966c3fc..4239ff063fb 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.h
+++ b/source/blender/compositor/operations/COM_ScaleOperation.h
@@ -35,7 +35,7 @@ private:
public:
ScaleOperation();
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();
@@ -51,7 +51,7 @@ class ScaleAbsoluteOperation : public NodeOperation {
public:
ScaleAbsoluteOperation();
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();
@@ -76,7 +76,7 @@ public:
ScaleFixedSizeOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
- 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();
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index f8628be3ff8..584d3049f6b 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -55,7 +55,7 @@ void *ScreenLensDistortionOperation::initializeTileData(rcti *rect)
return buffer;
}
-void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int y, void *data)
+void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y, void *data)
{
const float height = this->getHeight();
const float width = this->getWidth();
@@ -126,18 +126,15 @@ void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int
}
}
- if (dr) outputColor[0] = 2.0f * tc[0] / (float)dr;
- if (dg) outputColor[1] = 2.0f * tc[1] / (float)dg;
- if (db) outputColor[2] = 2.0f * tc[2] / (float)db;
+ if (dr) output[0] = 2.0f * tc[0] / (float)dr;
+ if (dg) output[1] = 2.0f * tc[1] / (float)dg;
+ if (db) output[2] = 2.0f * tc[2] / (float)db;
/* set alpha */
- outputColor[3] = 1.0f;
+ output[3] = 1.0f;
}
else {
- outputColor[0] = 0.0f;
- outputColor[1] = 0.0f;
- outputColor[2] = 0.0f;
- outputColor[3] = 0.0f;
+ zero_v4(output);
}
}
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
index a88717a116e..cfbdaacb41e 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
@@ -49,7 +49,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
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
index 0b080dcc426..9fc266cce86 100644
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
+++ b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
@@ -39,9 +39,9 @@ void SeparateChannelOperation::deinitExecution()
}
-void SeparateChannelOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void SeparateChannelOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float input[4];
this->m_inputOperation->read(input, x, y, sampler);
- color[0] = input[this->m_channel];
+ output[0] = input[this->m_channel];
}
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.h b/source/blender/compositor/operations/COM_SeparateChannelOperation.h
index 01fee3ca57d..f964df5df02 100644
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.h
+++ b/source/blender/compositor/operations/COM_SeparateChannelOperation.h
@@ -31,7 +31,7 @@ private:
int m_channel;
public:
SeparateChannelOperation();
- 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();
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
index 0f707473f9d..fc6cfa455f3 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -38,14 +38,14 @@ void SetAlphaOperation::initExecution()
this->m_inputAlpha = getInputSocketReader(1);
}
-void SetAlphaOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void SetAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float alphaInput[4];
- this->m_inputColor->read(outputValue, x, y, sampler);
+ this->m_inputColor->read(output, x, y, sampler);
this->m_inputAlpha->read(alphaInput, x, y, sampler);
- outputValue[3] = alphaInput[0];
+ output[3] = alphaInput[0];
}
void SetAlphaOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.h b/source/blender/compositor/operations/COM_SetAlphaOperation.h
index 3d8eb5b9493..1ec4a7aeacf 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.h
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.h
@@ -43,7 +43,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.cpp b/source/blender/compositor/operations/COM_SetColorOperation.cpp
index 4b6b7cf50c5..7aa2a8a27cd 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetColorOperation.cpp
@@ -27,12 +27,12 @@ SetColorOperation::SetColorOperation() : NodeOperation()
this->addOutputSocket(COM_DT_COLOR);
}
-void SetColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void SetColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- outputValue[0] = this->m_channel1;
- outputValue[1] = this->m_channel2;
- outputValue[2] = this->m_channel3;
- outputValue[3] = this->m_channel4;
+ output[0] = this->m_channel1;
+ output[1] = this->m_channel2;
+ output[2] = this->m_channel3;
+ output[3] = this->m_channel4;
}
void SetColorOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.h b/source/blender/compositor/operations/COM_SetColorOperation.h
index b82cdffe475..374390b45a4 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.h
+++ b/source/blender/compositor/operations/COM_SetColorOperation.h
@@ -61,7 +61,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 determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
const bool isSetOperation() const { return true; }
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
index f7c1ef8f6f5..343b5973f7e 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
@@ -37,7 +37,7 @@ void SetSamplerOperation::deinitExecution()
this->m_reader = NULL;
}
-void SetSamplerOperation::executePixel(float *output, float x, float y, PixelSampler sampler)
+void SetSamplerOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
this->m_reader->read(output, x, y, this->m_sampler);
}
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.h b/source/blender/compositor/operations/COM_SetSamplerOperation.h
index 7b53cd8d38e..c94e174fc81 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.h
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.h
@@ -44,7 +44,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
};
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.cpp b/source/blender/compositor/operations/COM_SetValueOperation.cpp
index 4a6bb3b4e53..c5ce3e4c09c 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetValueOperation.cpp
@@ -27,9 +27,9 @@ SetValueOperation::SetValueOperation() : NodeOperation()
this->addOutputSocket(COM_DT_VALUE);
}
-void SetValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void SetValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- outputValue[0] = this->m_value;
+ output[0] = this->m_value;
}
void SetValueOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h
index 55d190c40f0..3ddc667bc7e 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.h
+++ b/source/blender/compositor/operations/COM_SetValueOperation.h
@@ -46,7 +46,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
const bool isSetOperation() const { return true; }
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.cpp b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
index c368c19bf4c..d5c665e81f5 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
@@ -28,12 +28,12 @@ SetVectorOperation::SetVectorOperation() : NodeOperation()
this->addOutputSocket(COM_DT_VECTOR);
}
-void SetVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void SetVectorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- outputValue[0] = this->m_x;
- outputValue[1] = this->m_y;
- outputValue[2] = this->m_z;
- outputValue[3] = this->m_w;
+ output[0] = this->m_x;
+ output[1] = this->m_y;
+ output[2] = this->m_z;
+ output[3] = this->m_w;
}
void SetVectorOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.h b/source/blender/compositor/operations/COM_SetVectorOperation.h
index 36174e4e408..e9d6a163e9f 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.h
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.h
@@ -54,7 +54,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
const bool isSetOperation() const { return true; }
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
index 0e670d9268e..ac2cee8eb44 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
@@ -39,9 +39,9 @@ void SocketProxyOperation::deinitExecution()
this->m_inputOperation = NULL;
}
-void SocketProxyOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void SocketProxyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
if (this->m_inputOperation) {
- this->m_inputOperation->read(color, x, y, sampler);
+ this->m_inputOperation->read(output, x, y, sampler);
}
}
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.h b/source/blender/compositor/operations/COM_SocketProxyOperation.h
index 219483aa92d..a37384455ca 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.h
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.h
@@ -30,7 +30,7 @@ private:
SocketReader *m_inputOperation;
public:
SocketProxyOperation(DataType type);
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index caf0bba741f..f8d6c0cfc01 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -67,16 +67,16 @@ void TextureBaseOperation::determineResolution(unsigned int resolution[2], unsig
}
}
-void TextureAlphaOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void TextureAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- TextureBaseOperation::executePixel(color, x, y, sampler);
- color[0] = color[3];
- color[1] = 0.0f;
- color[2] = 0.0f;
- color[3] = 0.0f;
+ TextureBaseOperation::executePixel(output, x, y, sampler);
+ output[0] = output[3];
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
}
-void TextureBaseOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void TextureBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
float textureSize[4];
@@ -98,14 +98,16 @@ void TextureBaseOperation::executePixel(float *color, float x, float y, PixelSam
retval = multitex_ext(this->m_texture, vec, NULL, NULL, 0, &texres);
if (texres.talpha)
- color[3] = texres.ta;
+ output[3] = texres.ta;
else
- color[3] = texres.tin;
+ output[3] = texres.tin;
if ((retval & TEX_RGB)) {
- color[0] = texres.tr;
- color[1] = texres.tg;
- color[2] = texres.tb;
+ output[0] = texres.tr;
+ output[1] = texres.tg;
+ output[2] = texres.tb;
+ }
+ else {
+ output[0] = output[1] = output[2] = output[3];
}
- else color[0] = color[1] = color[2] = color[3];
}
diff --git a/source/blender/compositor/operations/COM_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h
index ef46b5307be..f8435ecdaa2 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.h
+++ b/source/blender/compositor/operations/COM_TextureOperation.h
@@ -59,7 +59,7 @@ protected:
TextureBaseOperation();
public:
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
void setTexture(Tex *texture) { this->m_texture = texture; }
void initExecution();
@@ -75,7 +75,7 @@ public:
class TextureAlphaOperation : public TextureBaseOperation {
public:
TextureAlphaOperation();
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index 0dc30ebfcb9..2d944b70f75 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -41,11 +41,10 @@ void TonemapOperation::initExecution()
NodeOperation::initMutex();
}
-void TonemapOperation::executePixel(float *color, int x, int y, void *data)
+void TonemapOperation::executePixel(float output[4], int x, int y, void *data)
{
AvgLogLum *avg = (AvgLogLum *)data;
- float output[4];
this->m_imageReader->read(output, x, y, NULL);
mul_v3_fl(output, avg->al);
float dr = output[0] + this->m_data->offset;
@@ -56,14 +55,12 @@ void TonemapOperation::executePixel(float *color, int x, int y, void *data)
output[2] /= ((db == 0.f) ? 1.0f : db);
const float igm = avg->igm;
if (igm != 0.0f) {
- output[0] = powf(MAX2(output[0], 0.0f), igm);
- output[1] = powf(MAX2(output[1], 0.0f), igm);
- output[2] = powf(MAX2(output[2], 0.0f), igm);
+ output[0] = powf(max(output[0], 0.0f), igm);
+ output[1] = powf(max(output[1], 0.0f), igm);
+ output[2] = powf(max(output[2], 0.0f), igm);
}
-
- copy_v4_v4(color, output);
}
-void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, void *data)
+void PhotoreceptorTonemapOperation::executePixel(float output[4], int x, int y, void *data)
{
AvgLogLum *avg = (AvgLogLum *)data;
NodeTonemap *ntm = this->m_data;
@@ -72,7 +69,6 @@ void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, voi
const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f));
const float ic = 1.0f - ntm->c, ia = 1.0f - ntm->a;
- float output[4];
this->m_imageReader->read(output, x, y, NULL);
const float L = rgb_to_luma_y(output);
@@ -88,8 +84,6 @@ void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, voi
I_g = avg->cav[2] + ic * (avg->lav - avg->cav[2]);
I_a = I_l + ia * (I_g - I_l);
output[2] /= (output[2] + powf(f * I_a, m));
-
- copy_v4_v4(color, output);
}
void TonemapOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.h b/source/blender/compositor/operations/COM_TonemapOperation.h
index 4e591276c76..843bf89dc92 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.h
+++ b/source/blender/compositor/operations/COM_TonemapOperation.h
@@ -64,7 +64,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
@@ -97,7 +97,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);
};
#endif
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
index 3092d4622e5..d41d1c128da 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
@@ -101,14 +101,14 @@ void TrackPositionOperation::initExecution()
}
}
-void TrackPositionOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void TrackPositionOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- outputValue[0] = this->m_markerPos[this->m_axis] - this->m_relativePos[this->m_axis];
+ output[0] = this->m_markerPos[this->m_axis] - this->m_relativePos[this->m_axis];
if (this->m_axis == 0)
- outputValue[0] *= this->m_width;
+ output[0] *= this->m_width;
else
- outputValue[0] *= this->m_height;
+ output[0] *= this->m_height;
}
void TrackPositionOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.h b/source/blender/compositor/operations/COM_TrackPositionOperation.h
index eec12ff8241..3a9e6f25cd9 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.h
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.h
@@ -75,7 +75,7 @@ public:
void initExecution();
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
const bool isSetOperation() const { return true; }
};
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index fda50ac24d1..761f55a1455 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -50,10 +50,10 @@ void TranslateOperation::deinitExecution()
}
-void TranslateOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void TranslateOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
ensureDelta();
- this->m_inputOperation->read(color, x - this->getDeltaX(), y - this->getDeltaY(), sampler);
+ this->m_inputOperation->read(output, x - this->getDeltaX(), y - this->getDeltaY(), sampler);
}
bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h
index 83e3befdfeb..faaadb1ced2 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.h
+++ b/source/blender/compositor/operations/COM_TranslateOperation.h
@@ -36,7 +36,7 @@ private:
public:
TranslateOperation();
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();
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index a3245507994..e4f88dc7659 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -90,7 +90,7 @@ void VariableSizeBokehBlurOperation::deinitializeTileData(rcti *rect, void *data
delete result;
}
-void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, void *data)
+void VariableSizeBokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
{
VariableSizeBokehBlurTileData *tileData = (VariableSizeBokehBlurTileData *)data;
MemoryBuffer *inputProgramBuffer = tileData->color;
@@ -153,10 +153,10 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, vo
}
}
- color[0] = color_accum[0] / multiplier_accum[0];
- color[1] = color_accum[1] / multiplier_accum[1];
- color[2] = color_accum[2] / multiplier_accum[2];
- color[3] = color_accum[3] / multiplier_accum[3];
+ output[0] = color_accum[0] / multiplier_accum[0];
+ output[1] = color_accum[1] / multiplier_accum[1];
+ output[2] = color_accum[2] / multiplier_accum[2];
+ output[3] = color_accum[3] / multiplier_accum[3];
/* blend in out values over the threshold, otherwise we get sharp, ugly transitions */
if ((size_center > this->m_threshold) &&
@@ -164,7 +164,7 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, vo
{
/* factor from 0-1 */
float fac = (size_center - this->m_threshold) / this->m_threshold;
- interp_v4_v4v4(color, readColor, color, fac);
+ interp_v4_v4v4(output, readColor, output, fac);
}
}
@@ -318,7 +318,7 @@ voi *InverseSearchRadiusOperation::initializeTileData(rcti *rect)
return data;
}
-void InverseSearchRadiusOperation::executePixel(float *color, int x, int y, void *data)
+void InverseSearchRadiusOperation::executePixel(float output[4], int x, int y, void *data)
{
MemoryBuffer *buffer = (MemoryBuffer *)data;
buffer->readNoCheck(color, x, y);
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
index d2b2668848a..1cab4a60af0 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
@@ -44,7 +44,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
@@ -82,7 +82,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data);
+ void executePixel(float output[4], int x, int y, MemoryBuffer *inputBuffers[], void *data);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index 134597531c2..ebf3b772b3b 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -52,11 +52,11 @@ void VectorBlurOperation::initExecution()
}
-void VectorBlurOperation::executePixel(float *color, int x, int y, void *data)
+void VectorBlurOperation::executePixel(float output[4], int x, int y, void *data)
{
float *buffer = (float *) data;
int index = (y * this->getWidth() + x) * COM_NUMBER_OF_CHANNELS;
- copy_v4_v4(color, &buffer[index]);
+ copy_v4_v4(output, &buffer[index]);
}
void VectorBlurOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.h b/source/blender/compositor/operations/COM_VectorBlurOperation.h
index 2743baf8500..4c6fca3cf83 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.h
@@ -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
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
index ed86c842fc9..d0a077fed61 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -43,7 +43,7 @@ void VectorCurveOperation::initExecution()
this->m_inputProgram = this->getInputSocketReader(0);
}
-void VectorCurveOperation::executePixel(float *output, float x, float y, PixelSampler sampler)
+void VectorCurveOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float input[4];
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.h b/source/blender/compositor/operations/COM_VectorCurveOperation.h
index b76f8880fc6..6a1f916c60b 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.h
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.h
@@ -37,7 +37,7 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *Vector, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
/**
* Initialize the execution
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 06ec5b51efd..273c10b60ac 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -40,9 +40,9 @@ WriteBufferOperation::~WriteBufferOperation()
}
}
-void WriteBufferOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void WriteBufferOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
- this->m_input->read(color, x, y, sampler);
+ this->m_input->read(output, x, y, sampler);
}
void WriteBufferOperation::initExecution()
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.h b/source/blender/compositor/operations/COM_WriteBufferOperation.h
index f1632689dbe..d89444045d4 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.h
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.h
@@ -38,7 +38,7 @@ public:
~WriteBufferOperation();
int isBufferOperation() { return true; }
MemoryProxy *getMemoryProxy() { return this->m_memoryProxy; }
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
const bool isWriteBufferOperation() const { return true; }
void executeRegion(rcti *rect, unsigned int tileNumber);
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
index 28dbcd9f017..7e23e7290f8 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -46,7 +46,7 @@ void ZCombineOperation::initExecution()
this->m_depth2Reader = this->getInputSocketReader(3);
}
-void ZCombineOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ZCombineOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float depth1[4];
float depth2[4];
@@ -54,13 +54,13 @@ void ZCombineOperation::executePixel(float *color, float x, float y, PixelSample
this->m_depth1Reader->read(depth1, x, y, sampler);
this->m_depth2Reader->read(depth2, x, y, sampler);
if (depth1[0] < depth2[0]) {
- this->m_image1Reader->read(color, x, y, sampler);
+ this->m_image1Reader->read(output, x, y, sampler);
}
else {
- this->m_image2Reader->read(color, x, y, sampler);
+ this->m_image2Reader->read(output, x, y, sampler);
}
}
-void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelSampler sampler)
+void ZCombineAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float depth1[4];
float depth2[4];
@@ -79,10 +79,10 @@ void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelS
}
float fac = color1[3];
float ifac = 1.0f - fac;
- color[0] = color1[0] + ifac * color2[0];
- color[1] = color1[1] + ifac * color2[1];
- color[2] = color1[2] + ifac * color2[2];
- color[3] = MAX2(color1[3], color2[3]);
+ output[0] = color1[0] + ifac * color2[0];
+ output[1] = color1[1] + ifac * color2[1];
+ output[2] = color1[2] + ifac * color2[2];
+ output[3] = MAX2(color1[3], color2[3]);
}
void ZCombineOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.h b/source/blender/compositor/operations/COM_ZCombineOperation.h
index 9ee0899ee28..61ceca340f7 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.h
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.h
@@ -47,11 +47,11 @@ public:
/**
* the inner loop of this program
*/
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
class ZCombineAlphaOperation : public ZCombineOperation {
- void executePixel(float *color, float x, float y, PixelSampler sampler);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
#endif