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-06-26 05:22:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-26 05:22:05 +0400
commit6a1d82490e49d1f5d73b5082516b087d44010fb8 (patch)
tree0650cce3c1d47db6c5de1f4f2ba05b619c412f09 /source/blender/compositor
parent7a0ab62d3f65f3b28da2a6ba9916c21132f8ea0d (diff)
use m_ prefix for compositor class members (all compositor operations).
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp26
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h32
-rw-r--r--source/blender/compositor/intern/COM_SocketReader.h8
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.h10
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.h29
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.h16
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.h22
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp50
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.cpp29
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.h10
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp17
-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.h14
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.h28
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h16
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h28
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.h20
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp64
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.h20
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.cpp86
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_CombineChannelsOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.h10
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToBWOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertColourToValueProg.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp36
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp8
-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.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToColourProg.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp56
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp84
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.h10
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp65
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp156
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.h32
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp63
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_DistanceMatteOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_DistanceMatteOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp45
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp46
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp34
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.h10
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp50
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_GlareSimpleStarOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_GlareStreaksOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp61
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.h20
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp38
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp46
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.h26
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp80
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_MixBlendOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixBurnOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.h16
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cpp43
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp42
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.h123
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp32
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp82
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.cpp64
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.h10
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp34
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_QualityStepHelper.cpp34
-rw-r--r--source/blender/compositor/operations/COM_QualityStepHelper.h12
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp38
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersBaseProg.h20
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMistOperation.h22
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp66
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cpp160
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.h50
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp82
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_SeparateChannelOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.h32
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_SplitViewerOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_SplitViewerOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.h8
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.h28
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h16
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp63
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ViewerBaseOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_ViewerBaseOperation.h46
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp36
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.h8
247 files changed, 2628 insertions, 2626 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp
index 33989fa5787..6ef8a5ff078 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperation.cpp
@@ -30,12 +30,12 @@
NodeOperation::NodeOperation()
{
- this->resolutionInputSocketIndex = 0;
- this->complex = false;
- this->width = 0;
- this->height = 0;
- this->openCL = false;
- this->btree = NULL;
+ this->m_resolutionInputSocketIndex = 0;
+ this->m_complex = false;
+ this->m_width = 0;
+ this->m_height = 0;
+ this->m_openCL = false;
+ this->m_btree = NULL;
}
void NodeOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
@@ -47,7 +47,7 @@ void NodeOperation::determineResolution(unsigned int resolution[], unsigned int
for (unsigned int index = 0; index < inputsockets.size(); index++) {
InputSocket *inputSocket = inputsockets[index];
if (inputSocket->isConnected()) {
- if (index == this->resolutionInputSocketIndex) {
+ if (index == this->m_resolutionInputSocketIndex) {
inputSocket->determineResolution(resolution, preferredResolution);
temp2[0] = resolution[0];
temp2[1] = resolution[1];
@@ -58,7 +58,7 @@ void NodeOperation::determineResolution(unsigned int resolution[], unsigned int
for (unsigned int index = 0; index < inputsockets.size(); index++) {
InputSocket *inputSocket = inputsockets[index];
if (inputSocket->isConnected()) {
- if (index != resolutionInputSocketIndex) {
+ if (index != this->m_resolutionInputSocketIndex) {
inputSocket->determineResolution(temp, temp2);
}
}
@@ -66,7 +66,7 @@ void NodeOperation::determineResolution(unsigned int resolution[], unsigned int
}
void NodeOperation::setResolutionInputSocketIndex(unsigned int index)
{
- this->resolutionInputSocketIndex = index;
+ this->m_resolutionInputSocketIndex = index;
}
void NodeOperation::initExecution()
{
@@ -75,22 +75,22 @@ void NodeOperation::initExecution()
void NodeOperation::initMutex()
{
- BLI_mutex_init(&mutex);
+ BLI_mutex_init(&this->m_mutex);
}
void NodeOperation::lockMutex()
{
- BLI_mutex_lock(&mutex);
+ BLI_mutex_lock(&this->m_mutex);
}
void NodeOperation::unlockMutex()
{
- BLI_mutex_unlock(&mutex);
+ BLI_mutex_unlock(&this->m_mutex);
}
void NodeOperation::deinitMutex()
{
- BLI_mutex_end(&mutex);
+ BLI_mutex_end(&this->m_mutex);
}
void NodeOperation::deinitExecution()
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index bf2dbd8c9c0..d316cfa0aa4 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -49,7 +49,7 @@ private:
/**
* @brief the index of the input socket that will be used to determine the resolution
*/
- unsigned int resolutionInputSocketIndex;
+ unsigned int m_resolutionInputSocketIndex;
/**
* @brief is this operation a complex one.
@@ -57,13 +57,13 @@ private:
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
- bool complex;
+ bool m_complex;
/**
* @brief can this operation be scheduled on an OpenCL device.
* @note Only applicable if complex is True
*/
- bool openCL;
+ bool m_openCL;
/**
* @brief mutex reference for very special node initializations
@@ -74,12 +74,12 @@ private:
* @see NodeOperation.deinitMutex deinitializes this mutex
* @see NodeOperation.getMutex retrieve a pointer to this mutex.
*/
- ThreadMutex mutex;
+ ThreadMutex m_mutex;
/**
* @brief reference to the editing bNodeTree only used for break callback
*/
- const bNodeTree *btree;
+ const bNodeTree *m_btree;
public:
/**
@@ -124,7 +124,7 @@ public:
virtual int isBufferOperation() { return false; }
virtual int isSingleThreaded() { return false; }
- void setbNodeTree(const bNodeTree *tree) { this->btree = tree; }
+ void setbNodeTree(const bNodeTree *tree) { this->m_btree = tree; }
virtual void initExecution();
/**
@@ -167,7 +167,7 @@ public:
virtual void deinitExecution();
bool isResolutionSet() {
- return this->width != 0 && height != 0;
+ return this->m_width != 0 && this->m_height != 0;
}
/**
@@ -176,8 +176,8 @@ public:
*/
void setResolution(unsigned int resolution[]) {
if (!isResolutionSet()) {
- this->width = resolution[0];
- this->height = resolution[1];
+ this->m_width = resolution[0];
+ this->m_height = resolution[1];
}
}
@@ -190,7 +190,7 @@ public:
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
- const bool isComplex() const { return this->complex; }
+ const bool isComplex() const { return this->m_complex; }
virtual const bool isSetOperation() const { return false; }
/**
@@ -235,20 +235,20 @@ public:
* @see WorkScheduler.schedule
* @see ExecutionGroup.addOperation
*/
- bool isOpenCL() { return this->openCL; }
+ bool isOpenCL() { return this->m_openCL; }
virtual bool isViewerOperation() { return false; }
virtual bool isPreviewOperation() { return false; }
inline bool isBreaked() {
- return btree->test_break(btree->tbh);
+ return this->m_btree->test_break(this->m_btree->tbh);
}
protected:
NodeOperation();
- void setWidth(unsigned int width) { this->width = width; }
- void setHeight(unsigned int height) { this->height = height; }
+ void setWidth(unsigned int width) { this->m_width = width; }
+ void setHeight(unsigned int height) { this->m_height = height; }
SocketReader *getInputSocketReader(unsigned int inputSocketindex);
NodeOperation *getInputOperation(unsigned int inputSocketindex);
@@ -264,12 +264,12 @@ protected:
* Complex operations are typically doing many reads to calculate the output of a single pixel.
* Mostly Filter types (Blurs, Convolution, Defocus etc) need this to be set to true.
*/
- void setComplex(bool complex) { this->complex = complex; }
+ void setComplex(bool complex) { this->m_complex = complex; }
/**
* @brief set if this NodeOperation can be scheduled on a OpenCLDevice
*/
- void setOpenCL(bool openCL) { this->openCL = openCL; }
+ void setOpenCL(bool openCL) { this->m_openCL = openCL; }
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeOperation")
diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h
index df8899e8eea..0f35fcfb0df 100644
--- a/source/blender/compositor/intern/COM_SocketReader.h
+++ b/source/blender/compositor/intern/COM_SocketReader.h
@@ -47,12 +47,12 @@ protected:
/**
* @brief Holds the width of the output of this operation.
*/
- unsigned int width;
+ unsigned int m_width;
/**
* @brief Holds the height of the output of this operation.
*/
- unsigned int height;
+ unsigned int m_height;
/**
@@ -108,8 +108,8 @@ public:
virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; }
- inline const unsigned int getWidth() const { return this->width; }
- inline const unsigned int getHeight() const { return this->height; }
+ inline const unsigned int getWidth() const { return this->m_width; }
+ inline const unsigned int getHeight() const { return this->m_height; }
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:SocketReader")
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
index e614e1fa15a..e688332a039 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
@@ -33,9 +33,9 @@ void AlphaOverKeyOperation::executePixel(float *outputValue, float x, float y, P
float inputOverColor[4];
float value[4];
- inputValueOperation->read(value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
if (inputOverColor[3] <= 0.0f) {
copy_v4_v4(outputValue, inputColor1);
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
index 81c1e4d2587..b521a2a5415 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
@@ -33,9 +33,9 @@ void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float
float inputOverColor[4];
float value[4];
- inputValueOperation->read(value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
if (inputOverColor[3] <= 0.0f) {
copy_v4_v4(outputValue, inputColor1);
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
index a6bf8b8834c..b2c40a058ba 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
@@ -33,9 +33,9 @@ void AlphaOverPremultiplyOperation::executePixel(float *outputValue, float x, fl
float inputOverColor[4];
float value[4];
- inputValueOperation->read(value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputOverColor, x, y, sampler, inputBuffers);
/* Zero alpha values should still permit an add of RGB data */
if (inputOverColor[3] < 0.0f) {
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
index 458d11f2616..46fa07893e8 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
@@ -32,33 +32,33 @@ AntiAliasOperation::AntiAliasOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->valueReader = NULL;
- this->buffer = NULL;
+ this->m_valueReader = NULL;
+ this->m_buffer = NULL;
this->setComplex(true);
}
void AntiAliasOperation::initExecution()
{
- this->valueReader = this->getInputSocketReader(0);
+ this->m_valueReader = this->getInputSocketReader(0);
NodeOperation::initMutex();
}
void AntiAliasOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- if (y < 0 || (unsigned int)y >= this->height || x < 0 || (unsigned int)x >= this->width) {
+ if (y < 0 || (unsigned int)y >= this->m_height || x < 0 || (unsigned int)x >= this->m_width) {
color[0] = 0.0f;
}
else {
- int offset = y * this->width + x;
- color[0] = buffer[offset] / 255.0f;
+ int offset = y * this->m_width + x;
+ color[0] = this->m_buffer[offset] / 255.0f;
}
}
void AntiAliasOperation::deinitExecution()
{
- this->valueReader = NULL;
- if (this->buffer) {
- delete buffer;
+ this->m_valueReader = NULL;
+ if (this->m_buffer) {
+ delete this->m_buffer;
}
NodeOperation::deinitMutex();
}
@@ -66,7 +66,7 @@ void AntiAliasOperation::deinitExecution()
bool AntiAliasOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti imageInput;
- if (this->buffer) {
+ if (this->m_buffer) {
return false;
}
else {
@@ -84,10 +84,10 @@ bool AntiAliasOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
void *AntiAliasOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->buffer) {return buffer; }
+ if (this->m_buffer) { return this->m_buffer; }
lockMutex();
- if (this->buffer == NULL) {
- MemoryBuffer *tile = (MemoryBuffer *)valueReader->initializeTileData(rect, memoryBuffers);
+ if (this->m_buffer == NULL) {
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_valueReader->initializeTileData(rect, memoryBuffers);
int size = tile->getHeight() * tile->getWidth();
float *input = tile->getBuffer();
char *valuebuffer = new char[size];
@@ -98,8 +98,8 @@ void *AntiAliasOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBu
valuebuffer[i] = in * 255;
}
antialias_tagbuf(tile->getWidth(), tile->getHeight(), valuebuffer);
- this->buffer = valuebuffer;
+ this->m_buffer = valuebuffer;
}
unlockMutex();
- return this->buffer;
+ return this->m_buffer;
}
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.h b/source/blender/compositor/operations/COM_AntiAliasOperation.h
index 906da598da1..3d9bcf6d90a 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.h
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.h
@@ -35,8 +35,8 @@ protected:
/**
* @brief Cached reference to the reader
*/
- SocketReader *valueReader;
- char *buffer;
+ SocketReader *m_valueReader;
+ char *m_buffer;
public:
AntiAliasOperation();
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
index 3628c399581..4f7f5eea8a0 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
@@ -34,15 +34,15 @@ BilateralBlurOperation::BilateralBlurOperation() : NodeOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputColorProgram = NULL;
- this->inputDeterminatorProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_inputDeterminatorProgram = NULL;
}
void BilateralBlurOperation::initExecution()
{
- this->inputColorProgram = getInputSocketReader(0);
- this->inputDeterminatorProgram = getInputSocketReader(1);
- this->space = this->data->sigma_space + this->data->iter;
+ this->m_inputColorProgram = getInputSocketReader(0);
+ this->m_inputDeterminatorProgram = getInputSocketReader(1);
+ this->m_space = this->m_data->sigma_space + this->m_data->iter;
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -54,27 +54,27 @@ void BilateralBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
float tempColor[4];
float blurColor[4];
float blurDivider;
- float space = this->space;
- float sigmacolor = this->data->sigma_color;
+ float space = this->m_space;
+ float sigmacolor = this->m_data->sigma_color;
int minx = floor(x - space);
int maxx = ceil(x + space);
int miny = floor(y - space);
int maxy = ceil(y + space);
float deltaColor;
- this->inputDeterminatorProgram->read(determinatorReferenceColor, x, y, inputBuffers, data);
+ this->m_inputDeterminatorProgram->read(determinatorReferenceColor, x, y, inputBuffers, data);
zero_v4(blurColor);
blurDivider = 0.0f;
for (int yi = miny; yi < maxy; yi += QualityStepHelper::getStep()) {
for (int xi = minx; xi < maxx; xi += QualityStepHelper::getStep()) {
// read determinator
- this->inputDeterminatorProgram->read(determinator, xi, yi, inputBuffers, data);
+ this->m_inputDeterminatorProgram->read(determinator, xi, yi, inputBuffers, data);
deltaColor = (fabsf(determinatorReferenceColor[0] - determinator[0]) +
fabsf(determinatorReferenceColor[1] - determinator[1]) +
fabsf(determinatorReferenceColor[2] - determinator[2])); // do not take the alpha channel into account
if (deltaColor < sigmacolor) {
// add this to the blur
- this->inputColorProgram->read(tempColor, xi, yi, inputBuffers, data);
+ this->m_inputColorProgram->read(tempColor, xi, yi, inputBuffers, data);
add_v4_v4(blurColor, tempColor);
blurDivider += 1.0f;
}
@@ -94,14 +94,14 @@ void BilateralBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
void BilateralBlurOperation::deinitExecution()
{
- this->inputColorProgram = NULL;
- this->inputDeterminatorProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_inputDeterminatorProgram = NULL;
}
bool BilateralBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- int add = ceil(this->space) + 1;
+ int add = ceil(this->m_space) + 1;
newInput.xmax = input->xmax + (add);
newInput.xmin = input->xmin - (add);
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.h b/source/blender/compositor/operations/COM_BilateralBlurOperation.h
index 08b379dc4ea..be6ce7a221e 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.h
@@ -27,10 +27,10 @@
class BilateralBlurOperation : public NodeOperation, public QualityStepHelper {
private:
- SocketReader *inputColorProgram;
- SocketReader *inputDeterminatorProgram;
- NodeBilateralBlurData *data;
- float space;
+ SocketReader *m_inputColorProgram;
+ SocketReader *m_inputDeterminatorProgram;
+ NodeBilateralBlurData *m_data;
+ float m_space;
public:
BilateralBlurOperation();
@@ -52,6 +52,6 @@ public:
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void setData(NodeBilateralBlurData *data) { this->data = data; }
+ void setData(NodeBilateralBlurData *data) { this->m_data = data; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index df64b7c8ddc..d1ddecc0df6 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -33,31 +33,31 @@ BlurBaseOperation::BlurBaseOperation(DataType data_type=COM_DT_COLOR) : NodeOper
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(data_type);
this->setComplex(true);
- this->inputProgram = NULL;
- this->data = NULL;
- this->size = 1.0f;
- this->deleteData = false;
- this->sizeavailable = false;
+ this->m_inputProgram = NULL;
+ this->m_data = NULL;
+ this->m_size = 1.0f;
+ this->m_deleteData = false;
+ this->m_sizeavailable = false;
}
void BlurBaseOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
- this->inputSize = this->getInputSocketReader(1);
- this->data->image_in_width = this->getWidth();
- this->data->image_in_height = this->getHeight();
- if (this->data->relative) {
- switch (this->data->aspect) {
+ this->m_inputProgram = this->getInputSocketReader(0);
+ this->m_inputSize = this->getInputSocketReader(1);
+ this->m_data->image_in_width = this->getWidth();
+ this->m_data->image_in_height = this->getHeight();
+ if (this->m_data->relative) {
+ switch (this->m_data->aspect) {
case CMP_NODE_BLUR_ASPECT_NONE:
- this->data->sizex = (int)(this->data->percentx * 0.01f * this->data->image_in_width);
- this->data->sizey = (int)(this->data->percenty * 0.01f * this->data->image_in_height);
+ this->m_data->sizex = (int)(this->m_data->percentx * 0.01f * this->m_data->image_in_width);
+ this->m_data->sizey = (int)(this->m_data->percenty * 0.01f * this->m_data->image_in_height);
break;
case CMP_NODE_BLUR_ASPECT_Y:
- this->data->sizex = (int)(this->data->percentx * 0.01f * this->data->image_in_width);
- this->data->sizey = (int)(this->data->percenty * 0.01f * this->data->image_in_width);
+ this->m_data->sizex = (int)(this->m_data->percentx * 0.01f * this->m_data->image_in_width);
+ this->m_data->sizey = (int)(this->m_data->percenty * 0.01f * this->m_data->image_in_width);
break;
case CMP_NODE_BLUR_ASPECT_X:
- this->data->sizex = (int)(this->data->percentx * 0.01f * this->data->image_in_height);
- this->data->sizey = (int)(this->data->percenty * 0.01f * this->data->image_in_height);
+ this->m_data->sizex = (int)(this->m_data->percentx * 0.01f * this->m_data->image_in_height);
+ this->m_data->sizey = (int)(this->m_data->percenty * 0.01f * this->m_data->image_in_height);
break;
}
}
@@ -77,7 +77,7 @@ float *BlurBaseOperation::make_gausstab(int rad)
sum = 0.0f;
for (i = -rad; i <= rad; i++) {
- val = RE_filter_value(this->data->filtertype, (float)i / (float)rad);
+ val = RE_filter_value(this->m_data->filtertype, (float)i / (float)rad);
sum += val;
gausstab[i + rad] = val;
}
@@ -131,20 +131,20 @@ float *BlurBaseOperation::make_dist_fac_inverse(int rad, int falloff)
void BlurBaseOperation::deinitExecution()
{
- this->inputProgram = NULL;
- this->inputSize = NULL;
- if (this->deleteData) {
- delete this->data;
+ this->m_inputProgram = NULL;
+ this->m_inputSize = NULL;
+ if (this->m_deleteData) {
+ delete this->m_data;
}
- this->data = NULL;
+ this->m_data = NULL;
}
void BlurBaseOperation::updateSize(MemoryBuffer **memoryBuffers)
{
- if (!this->sizeavailable) {
+ if (!this->m_sizeavailable) {
float result[4];
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST, memoryBuffers);
- this->size = result[0];
- this->sizeavailable = true;
+ this->m_size = result[0];
+ this->m_sizeavailable = true;
}
}
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.h b/source/blender/compositor/operations/COM_BlurBaseOperation.h
index 8f7208274db..6d60abf09bf 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.h
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.h
@@ -29,19 +29,24 @@ class BlurBaseOperation : public NodeOperation, public QualityStepHelper {
private:
protected:
- /**
- * Cached reference to the inputProgram
- */
- SocketReader *inputProgram;
- SocketReader *inputSize;
- NodeBlurData *data;
+
BlurBaseOperation(DataType data_type);
float *make_gausstab(int rad);
float *make_dist_fac_inverse(int rad, int falloff);
- float size;
- bool deleteData;
- bool sizeavailable;
+
void updateSize(MemoryBuffer **memoryBuffers);
+
+ /**
+ * Cached reference to the inputProgram
+ */
+ SocketReader *m_inputProgram;
+ SocketReader *m_inputSize;
+ NodeBlurData *m_data;
+
+ float m_size;
+ bool m_deleteData;
+ bool m_sizeavailable;
+
public:
/**
* Initialize the execution
@@ -53,10 +58,10 @@ public:
*/
void deinitExecution();
- void setData(NodeBlurData *data) { this->data = data; }
+ void setData(NodeBlurData *data) { this->m_data = data; }
- void deleteDataWhenFinished() { this->deleteData = true; }
+ void deleteDataWhenFinished() { this->m_deleteData = true; }
- void setSize(float size) { this->size = size; sizeavailable = true; }
+ void setSize(float size) { this->m_size = size; this->m_sizeavailable = true; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 9fe5abcb075..fb06f6d3761 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -37,11 +37,11 @@ BokehBlurOperation::BokehBlurOperation() : NodeOperation()
this->setComplex(true);
this->setOpenCL(true);
- this->size = 1.0f;
+ this->m_size = 1.0f;
- this->inputProgram = NULL;
- this->inputBokehProgram = NULL;
- this->inputBoundingBoxReader = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputBokehProgram = NULL;
+ this->m_inputBoundingBoxReader = NULL;
}
void *BokehBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
@@ -52,12 +52,12 @@ void *BokehBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBu
void BokehBlurOperation::initExecution()
{
- this->inputProgram = getInputSocketReader(0);
- this->inputBokehProgram = getInputSocketReader(1);
- this->inputBoundingBoxReader = getInputSocketReader(2);
+ this->m_inputProgram = getInputSocketReader(0);
+ this->m_inputBokehProgram = getInputSocketReader(1);
+ this->m_inputBoundingBoxReader = getInputSocketReader(2);
- int width = inputBokehProgram->getWidth();
- int height = inputBokehProgram->getHeight();
+ int width = this->m_inputBokehProgram->getWidth();
+ int height = this->m_inputBokehProgram->getHeight();
float dimension;
if (width < height) {
@@ -66,9 +66,9 @@ void BokehBlurOperation::initExecution()
else {
dimension = height;
}
- this->bokehMidX = width / 2.0f;
- this->bokehMidY = height / 2.0f;
- this->bokehDimension = dimension / 2.0f;
+ this->m_bokehMidX = width / 2.0f;
+ this->m_bokehMidY = height / 2.0f;
+ this->m_bokehDimension = dimension / 2.0f;
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -78,7 +78,7 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
float tempBoundingBox[4];
float bokeh[4];
- inputBoundingBoxReader->read(tempBoundingBox, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputBoundingBoxReader->read(tempBoundingBox, x, y, COM_PS_NEAREST, inputBuffers);
if (tempBoundingBox[0] > 0.0f) {
float multiplier_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
@@ -86,7 +86,7 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
int bufferwidth = inputBuffer->getWidth();
int bufferstartx = inputBuffer->getRect()->xmin;
int bufferstarty = inputBuffer->getRect()->ymin;
- int pixelSize = this->size * this->getWidth() / 100.0f;
+ int pixelSize = this->m_size * this->getWidth() / 100.0f;
int miny = y - pixelSize;
int maxy = y + pixelSize;
@@ -102,13 +102,13 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
int step = getStep();
int offsetadd = getOffsetAdd();
- float m = this->bokehDimension / pixelSize;
+ float m = this->m_bokehDimension / pixelSize;
for (int ny = miny; ny < maxy; ny += step) {
int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
for (int nx = minx; nx < maxx; nx += step) {
- float u = this->bokehMidX - (nx - x) * m;
- float v = this->bokehMidY - (ny - y) * m;
- inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
+ float u = this->m_bokehMidX - (nx - x) * m;
+ float v = this->m_bokehMidY - (ny - y) * m;
+ this->m_inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
madd_v4_v4v4(color_accum, bokeh, &buffer[bufferindex]);
add_v4_v4(multiplier_accum, bokeh);
bufferindex += offsetadd;
@@ -120,15 +120,15 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
color[3] = color_accum[3] * (1.0f / multiplier_accum[3]);
}
else {
- inputProgram->read(color, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputProgram->read(color, x, y, COM_PS_NEAREST, inputBuffers);
}
}
void BokehBlurOperation::deinitExecution()
{
- this->inputProgram = NULL;
- this->inputBokehProgram = NULL;
- this->inputBoundingBoxReader = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputBokehProgram = NULL;
+ this->m_inputBoundingBoxReader = NULL;
}
bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -136,10 +136,10 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
rcti newInput;
rcti bokehInput;
- newInput.xmax = input->xmax + (size * this->getWidth() / 100.0f);
- newInput.xmin = input->xmin - (size * this->getWidth() / 100.0f);
- newInput.ymax = input->ymax + (size * this->getWidth() / 100.0f);
- newInput.ymin = input->ymin - (size * this->getWidth() / 100.0f);
+ newInput.xmax = input->xmax + (this->m_size * this->getWidth() / 100.0f);
+ newInput.xmin = input->xmin - (this->m_size * this->getWidth() / 100.0f);
+ newInput.ymax = input->ymax + (this->m_size * this->getWidth() / 100.0f);
+ newInput.ymin = input->ymin - (this->m_size * this->getWidth() / 100.0f);
NodeOperation *operation = getInputOperation(1);
bokehInput.xmax = operation->getWidth();
@@ -169,12 +169,12 @@ void BokehBlurOperation::executeOpenCL(OpenCLDevice* device,
if (!kernel) {
kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
}
- cl_int radius = this->getWidth() * this->size / 100.0f;
+ cl_int radius = this->getWidth() * this->m_size / 100.0f;
cl_int step = this->getStep();
- device->COM_clAttachMemoryBufferToKernelParameter(kernel, 0, -1, clMemToCleanUp, inputMemoryBuffers, this->inputBoundingBoxReader);
- device->COM_clAttachMemoryBufferToKernelParameter(kernel, 1, 4, clMemToCleanUp, inputMemoryBuffers, this->inputProgram);
- device->COM_clAttachMemoryBufferToKernelParameter(kernel, 2, -1, clMemToCleanUp, inputMemoryBuffers, this->inputBokehProgram);
+ device->COM_clAttachMemoryBufferToKernelParameter(kernel, 0, -1, clMemToCleanUp, inputMemoryBuffers, this->m_inputBoundingBoxReader);
+ device->COM_clAttachMemoryBufferToKernelParameter(kernel, 1, 4, clMemToCleanUp, inputMemoryBuffers, this->m_inputProgram);
+ device->COM_clAttachMemoryBufferToKernelParameter(kernel, 2, -1, clMemToCleanUp, inputMemoryBuffers, this->m_inputBokehProgram);
device->COM_clAttachOutputMemoryBufferToKernelParameter(kernel, 3, clOutputBuffer);
device->COM_clAttachMemoryBufferOffsetToKernelParameter(kernel, 5, outputMemoryBuffer);
clSetKernelArg(kernel, 6, sizeof(cl_int), &radius);
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.h b/source/blender/compositor/operations/COM_BokehBlurOperation.h
index 853855d5c34..0433a4156a8 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.h
@@ -27,13 +27,13 @@
class BokehBlurOperation : public NodeOperation, public QualityStepHelper {
private:
- SocketReader *inputProgram;
- SocketReader *inputBokehProgram;
- SocketReader *inputBoundingBoxReader;
- float size;
- float bokehMidX;
- float bokehMidY;
- float bokehDimension;
+ SocketReader *m_inputProgram;
+ SocketReader *m_inputBokehProgram;
+ SocketReader *m_inputBoundingBoxReader;
+ float m_size;
+ float m_bokehMidX;
+ float m_bokehMidY;
+ float m_bokehDimension;
public:
BokehBlurOperation();
@@ -55,7 +55,7 @@ public:
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void setSize(float size) { this->size = size; }
+ void setSize(float size) { this->m_size = size; }
void executeOpenCL(OpenCLDevice* device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, list<cl_kernel> *clKernelsToCleanUp);
};
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index abb378e2adb..90e272438d6 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -26,35 +26,35 @@
BokehImageOperation::BokehImageOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_COLOR);
- this->deleteData = false;
+ this->m_deleteData = false;
}
void BokehImageOperation::initExecution()
{
- this->centerX = getWidth() / 2;
- this->centerY = getHeight() / 2;
- this->center[0] = this->centerX;
- this->center[1] = this->centerY;
- this->inverseRounding = 1.0f - this->data->rounding;
- this->circularDistance = getWidth() / 2;
- this->flapRad = (float)(M_PI * 2) / this->data->flaps;
- this->flapRadAdd = (this->data->angle / 360.0f) * (float)(M_PI * 2.0);
- while (this->flapRadAdd < 0.0f) {
- this->flapRadAdd += (float)(M_PI * 2.0);
+ this->m_centerX = getWidth() / 2;
+ this->m_centerY = getHeight() / 2;
+ this->m_center[0] = this->m_centerX;
+ this->m_center[1] = this->m_centerY;
+ this->m_inverseRounding = 1.0f - this->m_data->rounding;
+ this->m_circularDistance = getWidth() / 2;
+ this->m_flapRad = (float)(M_PI * 2) / this->m_data->flaps;
+ this->m_flapRadAdd = (this->m_data->angle / 360.0f) * (float)(M_PI * 2.0);
+ while (this->m_flapRadAdd < 0.0f) {
+ this->m_flapRadAdd += (float)(M_PI * 2.0);
}
- while (this->flapRadAdd > (float)M_PI) {
- this->flapRadAdd -= (float)(M_PI * 2.0);
+ while (this->m_flapRadAdd > (float)M_PI) {
+ this->m_flapRadAdd -= (float)(M_PI * 2.0);
}
}
void BokehImageOperation::detemineStartPointOfFlap(float r[2], int flapNumber, float distance)
{
- r[0] = sinf(flapRad * flapNumber + flapRadAdd) * distance + centerX;
- r[1] = cosf(flapRad * flapNumber + flapRadAdd) * distance + centerY;
+ r[0] = sinf(this->m_flapRad * flapNumber + this->m_flapRadAdd) * distance + this->m_centerX;
+ r[1] = cosf(this->m_flapRad * flapNumber + this->m_flapRadAdd) * distance + this->m_centerY;
}
float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
{
float insideBokeh = 0.0f;
- const float deltaX = x - centerX;
- const float deltaY = y - centerY;
+ const float deltaX = x - this->m_centerX;
+ const float deltaY = y - this->m_centerY;
float closestPoint[2];
float lineP1[2];
float lineP2[2];
@@ -62,23 +62,23 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
point[0] = x;
point[1] = y;
- const float distanceToCenter = len_v2v2(point, center);
+ const float distanceToCenter = len_v2v2(point, this->m_center);
const float bearing = (atan2f(deltaX, deltaY) + (float)(M_PI * 2.0));
- int flapNumber = (int)((bearing - flapRadAdd) / flapRad);
+ int flapNumber = (int)((bearing - this->m_flapRadAdd) / this->m_flapRad);
detemineStartPointOfFlap(lineP1, flapNumber, distance);
detemineStartPointOfFlap(lineP2, flapNumber + 1, distance);
closest_to_line_v2(closestPoint, point, lineP1, lineP2);
- const float distanceLineToCenter = len_v2v2(center, closestPoint);
- const float distanceRoundingToCenter = inverseRounding * distanceLineToCenter + this->data->rounding * distance;
+ const float distanceLineToCenter = len_v2v2(this->m_center, closestPoint);
+ const float distanceRoundingToCenter = this->m_inverseRounding * distanceLineToCenter + this->m_data->rounding * distance;
- const float catadioptricDistanceToCenter = distanceRoundingToCenter * this->data->catadioptric;
+ const float catadioptricDistanceToCenter = distanceRoundingToCenter * this->m_data->catadioptric;
if (distanceRoundingToCenter >= distanceToCenter && catadioptricDistanceToCenter <= distanceToCenter) {
if (distanceRoundingToCenter - distanceToCenter < 1.0f) {
insideBokeh = (distanceRoundingToCenter - distanceToCenter);
}
- else if (this->data->catadioptric != 0.0f && distanceToCenter - catadioptricDistanceToCenter < 1.0f) {
+ else if (this->m_data->catadioptric != 0.0f && distanceToCenter - catadioptricDistanceToCenter < 1.0f) {
insideBokeh = (distanceToCenter - catadioptricDistanceToCenter);
}
else {
@@ -89,9 +89,9 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
}
void BokehImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- float shift = this->data->lensshift;
+ float shift = this->m_data->lensshift;
float shift2 = shift / 2.0f;
- float distance = this->circularDistance;
+ float distance = this->m_circularDistance;
float insideBokehMax = isInsideBokeh(distance, x, y);
float insideBokehMed = isInsideBokeh(distance - fabsf(shift2 * distance), x, y);
float insideBokehMin = isInsideBokeh(distance - fabsf(shift * distance), x, y);
@@ -110,10 +110,10 @@ void BokehImageOperation::executePixel(float *color, float x, float y, PixelSamp
void BokehImageOperation::deinitExecution()
{
- if (deleteData) {
- if (data) {
- delete data;
- data = NULL;
+ if (this->m_deleteData) {
+ if (this->m_data) {
+ delete this->m_data;
+ this->m_data = NULL;
}
}
}
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h
index 8edd32a4f77..085aaa471f0 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.h
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.h
@@ -27,17 +27,17 @@
class BokehImageOperation : public NodeOperation {
private:
- NodeBokehImage *data;
+ NodeBokehImage *m_data;
- float center[2];
- float centerX;
- float centerY;
- float inverseRounding;
- float circularDistance;
- float flapRad;
- float flapRadAdd;
+ float m_center[2];
+ float m_centerX;
+ float m_centerY;
+ float m_inverseRounding;
+ float m_circularDistance;
+ float m_flapRad;
+ float m_flapRadAdd;
- bool deleteData;
+ bool m_deleteData;
void detemineStartPointOfFlap(float r[2], int flapNumber, float distance);
float isInsideBokeh(float distance, float x, float y);
@@ -61,7 +61,7 @@ public:
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
- void setData(NodeBokehImage *data) { this->data = data; }
- void deleteDataOnFinish() { this->deleteData = true; }
+ void setData(NodeBokehImage *data) { this->m_data = data; }
+ void deleteDataOnFinish() { this->m_deleteData = true; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index 3b99fc9a2a0..96738a2920a 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -29,19 +29,19 @@ BoxMaskOperation::BoxMaskOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputMask = NULL;
- this->inputValue = NULL;
- this->cosine = 0.0f;
- this->sine = 0.0f;
+ this->m_inputMask = NULL;
+ this->m_inputValue = NULL;
+ this->m_cosine = 0.0f;
+ this->m_sine = 0.0f;
}
void BoxMaskOperation::initExecution()
{
- this->inputMask = this->getInputSocketReader(0);
- this->inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD((double)this->data->rotation);
- this->cosine = cos(rad);
- this->sine = sin(rad);
- this->aspectRatio = ((float)this->getWidth()) / this->getHeight();
+ this->m_inputMask = this->getInputSocketReader(0);
+ this->m_inputValue = this->getInputSocketReader(1);
+ const double rad = DEG2RAD((double)this->m_data->rotation);
+ this->m_cosine = cos(rad);
+ this->m_sine = sin(rad);
+ this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
}
void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -52,22 +52,22 @@ void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler
float rx = x / this->getWidth();
float ry = y / this->getHeight();
- const float dy = (ry - this->data->y) / this->aspectRatio;
- const float dx = rx - this->data->x;
- rx = this->data->x + (this->cosine * dx + this->sine * dy);
- ry = this->data->y + (-this->sine * dx + this->cosine * dy);
+ const float dy = (ry - this->m_data->y) / this->m_aspectRatio;
+ const float dx = rx - this->m_data->x;
+ rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy);
+ ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy);
- this->inputMask->read(inputMask, x, y, sampler, inputBuffers);
- this->inputValue->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputMask->read(inputMask, x, y, sampler, inputBuffers);
+ this->m_inputValue->read(inputValue, x, y, sampler, inputBuffers);
- float halfHeight = this->data->height / 2.0f;
- float halfWidth = this->data->width / 2.0f;
- bool inside = (rx > this->data->x - halfWidth &&
- rx < this->data->x + halfWidth &&
- ry > this->data->y - halfHeight &&
- ry < this->data->y + halfHeight);
+ float halfHeight = this->m_data->height / 2.0f;
+ float halfWidth = this->m_data->width / 2.0f;
+ bool inside = (rx > this->m_data->x - halfWidth &&
+ rx < this->m_data->x + halfWidth &&
+ ry > this->m_data->y - halfHeight &&
+ ry < this->m_data->y + halfHeight);
- switch (this->maskType) {
+ switch (this->m_maskType) {
case CMP_NODE_MASKTYPE_ADD:
if (inside) {
color[0] = max(inputMask[0], inputValue[0]);
@@ -113,7 +113,7 @@ void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler
void BoxMaskOperation::deinitExecution()
{
- this->inputMask = NULL;
- this->inputValue = NULL;
+ this->m_inputMask = NULL;
+ this->m_inputValue = NULL;
}
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.h b/source/blender/compositor/operations/COM_BoxMaskOperation.h
index 65327abc9a6..cec680ef6c3 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.h
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.h
@@ -30,15 +30,15 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputMask;
- SocketReader *inputValue;
+ SocketReader *m_inputMask;
+ SocketReader *m_inputValue;
- float sine;
- float cosine;
- float aspectRatio;
- int maskType;
+ float m_sine;
+ float m_cosine;
+ float m_aspectRatio;
+ int m_maskType;
- NodeBoxMask *data;
+ NodeBoxMask *m_data;
public:
BoxMaskOperation();
@@ -57,9 +57,9 @@ public:
*/
void deinitExecution();
- void setData(NodeBoxMask *data) { this->data = data; }
+ void setData(NodeBoxMask *data) { this->m_data = data; }
- void setMaskType(int maskType) { this->maskType = maskType; }
+ void setMaskType(int maskType) { this->m_maskType = maskType; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cpp b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
index 95862a1fd83..8c9fb6394a7 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
@@ -28,13 +28,13 @@ BrightnessOperation::BrightnessOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void BrightnessOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
- this->inputBrightnessProgram = this->getInputSocketReader(1);
- this->inputContrastProgram = this->getInputSocketReader(2);
+ this->m_inputProgram = this->getInputSocketReader(0);
+ this->m_inputBrightnessProgram = this->getInputSocketReader(1);
+ this->m_inputContrastProgram = this->getInputSocketReader(2);
}
void BrightnessOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -43,9 +43,9 @@ void BrightnessOperation::executePixel(float *color, float x, float y, PixelSamp
float a, b;
float inputBrightness[4];
float inputContrast[4];
- this->inputProgram->read(inputValue, x, y, sampler, inputBuffers);
- this->inputBrightnessProgram->read(inputBrightness, x, y, sampler, inputBuffers);
- this->inputContrastProgram->read(inputContrast, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputBrightnessProgram->read(inputBrightness, x, y, sampler, inputBuffers);
+ this->m_inputContrastProgram->read(inputContrast, x, y, sampler, inputBuffers);
float brightness = inputBrightness[0];
float contrast = inputContrast[0];
brightness /= 100.0f;
@@ -73,8 +73,8 @@ void BrightnessOperation::executePixel(float *color, float x, float y, PixelSamp
void BrightnessOperation::deinitExecution()
{
- this->inputProgram = NULL;
- this->inputBrightnessProgram = NULL;
- this->inputContrastProgram = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputBrightnessProgram = NULL;
+ this->m_inputContrastProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.h b/source/blender/compositor/operations/COM_BrightnessOperation.h
index 74c648fd8fb..61f667aa1be 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.h
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.h
@@ -30,9 +30,9 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
- SocketReader *inputBrightnessProgram;
- SocketReader *inputContrastProgram;
+ SocketReader *m_inputProgram;
+ SocketReader *m_inputBrightnessProgram;
+ SocketReader *m_inputContrastProgram;
public:
BrightnessOperation();
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
index fe6be55e237..a1c679b3e15 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
@@ -30,33 +30,33 @@ CalculateMeanOperation::CalculateMeanOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_VALUE);
- this->imageReader = NULL;
- this->iscalculated = false;
- this->setting = 1;
+ this->m_imageReader = NULL;
+ this->m_iscalculated = false;
+ this->m_setting = 1;
this->setComplex(true);
}
void CalculateMeanOperation::initExecution()
{
- this->imageReader = this->getInputSocketReader(0);
- this->iscalculated = false;
+ this->m_imageReader = this->getInputSocketReader(0);
+ this->m_iscalculated = false;
NodeOperation::initMutex();
}
void CalculateMeanOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- color[0] = this->result;
+ color[0] = this->m_result;
}
void CalculateMeanOperation::deinitExecution()
{
- this->imageReader = NULL;
+ this->m_imageReader = NULL;
NodeOperation::deinitMutex();
}
bool CalculateMeanOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti imageInput;
- if (iscalculated) {
+ if (this->m_iscalculated) {
return false;
}
NodeOperation *operation = getInputOperation(0);
@@ -73,10 +73,10 @@ bool CalculateMeanOperation::determineDependingAreaOfInterest(rcti *input, ReadB
void *CalculateMeanOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!this->iscalculated) {
- MemoryBuffer *tile = (MemoryBuffer *)imageReader->initializeTileData(rect, memoryBuffers);
+ if (!this->m_iscalculated) {
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers);
calculateMean(tile);
- this->iscalculated = true;
+ this->m_iscalculated = true;
}
unlockMutex();
return NULL;
@@ -84,7 +84,7 @@ void *CalculateMeanOperation::initializeTileData(rcti *rect, MemoryBuffer **memo
void CalculateMeanOperation::calculateMean(MemoryBuffer *tile)
{
- this->result = 0.0f;
+ this->m_result = 0.0f;
float *buffer = tile->getBuffer();
int size = tile->getWidth() * tile->getHeight();
int pixels = 0;
@@ -93,8 +93,7 @@ void CalculateMeanOperation::calculateMean(MemoryBuffer *tile)
if (buffer[offset + 3] > 0) {
pixels++;
- switch (this->setting)
- {
+ switch (this->m_setting) {
case 1:
{
sum += rgb_to_bw(&buffer[offset]);
@@ -125,5 +124,5 @@ void CalculateMeanOperation::calculateMean(MemoryBuffer *tile)
}
}
}
- this->result = sum / pixels;
+ this->m_result = sum / pixels;
}
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.h b/source/blender/compositor/operations/COM_CalculateMeanOperation.h
index 7a28eb3774a..2bd723c40a3 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.h
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.h
@@ -34,11 +34,11 @@ protected:
/**
* @brief Cached reference to the reader
*/
- SocketReader *imageReader;
+ SocketReader *m_imageReader;
- bool iscalculated;
- float result;
- int setting;
+ bool m_iscalculated;
+ float m_result;
+ int m_setting;
public:
CalculateMeanOperation();
@@ -61,7 +61,7 @@ public:
void deinitExecution();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void setSetting(int setting) { this->setting = setting; }
+ void setSetting(int setting) { this->m_setting = setting; }
protected:
void calculateMean(MemoryBuffer *tile);
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
index 811975c5e13..2d860df449c 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
@@ -33,27 +33,26 @@ CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : Cal
void CalculateStandardDeviationOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- color[0] = this->standardDeviation;
+ color[0] = this->m_standardDeviation;
}
void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!this->iscalculated) {
- MemoryBuffer *tile = (MemoryBuffer *)imageReader->initializeTileData(rect, memoryBuffers);
+ if (!this->m_iscalculated) {
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers);
CalculateMeanOperation::calculateMean(tile);
- this->standardDeviation = 0.0f;
+ this->m_standardDeviation = 0.0f;
float *buffer = tile->getBuffer();
int size = tile->getWidth() * tile->getHeight();
int pixels = 0;
float sum = 0.0f;
- float mean = this->result;
+ float mean = this->m_result;
for (int i = 0, offset = 0; i < size; i++, offset += 4) {
if (buffer[offset + 3] > 0) {
pixels++;
- switch (this->setting)
- {
+ switch (this->m_setting) {
case 1:
{
float value = rgb_to_bw(&buffer[offset]);
@@ -90,8 +89,8 @@ void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect, Memory
}
}
}
- this->standardDeviation = sqrt(sum / (float)(pixels - 1));
- this->iscalculated = true;
+ this->m_standardDeviation = sqrt(sum / (float)(pixels - 1));
+ this->m_iscalculated = true;
}
unlockMutex();
return NULL;
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
index d3163d4cc32..506c5d6fe3a 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.h
@@ -31,7 +31,7 @@
*/
class CalculateStandardDeviationOperation : public CalculateMeanOperation {
protected:
- float standardDeviation;
+ float m_standardDeviation;
public:
CalculateStandardDeviationOperation();
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
index 487c1869782..0812dd45bf6 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -26,30 +26,30 @@ ChangeHSVOperation::ChangeHSVOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ChangeHSVOperation::initExecution()
{
- this->inputOperation = getInputSocketReader(0);
+ this->m_inputOperation = getInputSocketReader(0);
}
void ChangeHSVOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ChangeHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor1[4];
- inputOperation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputColor1, x, y, sampler, inputBuffers);
- outputValue[0] = inputColor1[0] + (this->hue - 0.5f);
+ 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->saturation;
- outputValue[2] = inputColor1[2] * this->value;
+ outputValue[1] = inputColor1[1] * this->m_saturation;
+ outputValue[2] = inputColor1[2] * this->m_value;
outputValue[3] = inputColor1[3];
}
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.h b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
index a2a6c034a82..9c343db9c3c 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
@@ -31,11 +31,11 @@
*/
class ChangeHSVOperation : public NodeOperation {
private:
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
- float hue;
- float saturation;
- float value;
+ float m_hue;
+ float m_saturation;
+ float m_value;
public:
/**
@@ -51,9 +51,9 @@ public:
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
- void setHue(float hue) { this->hue = hue; }
- void setSaturation(float saturation) { this->saturation = saturation; }
- void setValue(float value) { this->value = value; }
+ void setHue(float hue) { this->m_hue = hue; }
+ void setSaturation(float saturation) { this->m_saturation = saturation; }
+ void setValue(float value) { this->m_value = value; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
index 24af1a3aa53..b2de934e6d8 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
@@ -27,45 +27,45 @@ ChannelMatteOperation::ChannelMatteOperation() : NodeOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- inputImageProgram = NULL;
+ this->m_inputImageProgram = NULL;
}
void ChannelMatteOperation::initExecution()
{
- this->inputImageProgram = this->getInputSocketReader(0);
+ this->m_inputImageProgram = this->getInputSocketReader(0);
- this->limit_range = this->limit_max - this->limit_min;
+ this->m_limit_range = this->m_limit_max - this->m_limit_min;
- switch (this->limit_method) {
+ switch (this->m_limit_method) {
/* SINGLE */
case 0: {
/* 123 / RGB / HSV / YUV / YCC */
- const int matte_channel = this->matte_channel - 1;
- const int limit_channel = this->limit_channel - 1;
- this->ids[0] = matte_channel;
- this->ids[1] = limit_channel;
- this->ids[2] = limit_channel;
+ const int matte_channel = this->m_matte_channel - 1;
+ const int limit_channel = this->m_limit_channel - 1;
+ this->m_ids[0] = matte_channel;
+ this->m_ids[1] = limit_channel;
+ this->m_ids[2] = limit_channel;
break;
}
/* MAX */
case 1: {
- switch (this->matte_channel) {
+ switch (this->m_matte_channel) {
case 1: {
- this->ids[0] = 0;
- this->ids[1] = 1;
- this->ids[2] = 2;
+ this->m_ids[0] = 0;
+ this->m_ids[1] = 1;
+ this->m_ids[2] = 2;
break;
}
case 2: {
- this->ids[0] = 1;
- this->ids[1] = 0;
- this->ids[2] = 2;
+ this->m_ids[0] = 1;
+ this->m_ids[1] = 0;
+ this->m_ids[2] = 2;
break;
}
case 3: {
- this->ids[0] = 2;
- this->ids[1] = 0;
- this->ids[2] = 1;
+ this->m_ids[0] = 2;
+ this->m_ids[1] = 0;
+ this->m_ids[2] = 1;
break;
}
default:
@@ -80,7 +80,7 @@ void ChannelMatteOperation::initExecution()
void ChannelMatteOperation::deinitExecution()
{
- this->inputImageProgram = NULL;
+ this->m_inputImageProgram = NULL;
}
void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -88,17 +88,17 @@ void ChannelMatteOperation::executePixel(float *outputValue, float x, float y, P
float inColor[4];
float alpha;
- const float limit_max = this->limit_max;
- const float limit_min = this->limit_min;
- const float limit_range = this->limit_range;
+ const float limit_max = this->m_limit_max;
+ const float limit_min = this->m_limit_min;
+ const float limit_range = this->m_limit_range;
- this->inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
/* matte operation */
- alpha = inColor[this->ids[0]] - max(inColor[this->ids[1]], inColor[this->ids[2]]);
+ alpha = inColor[this->m_ids[0]] - max(inColor[this->m_ids[1]], inColor[this->m_ids[2]]);
/* flip because 0.0 is transparent, not 1.0 */
- alpha = 1.f - alpha;
+ alpha = 1.0f - alpha;
/* test range*/
if (alpha > limit_max) {
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
index 17db0f9ffe2..859df200020 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
@@ -30,16 +30,16 @@
*/
class ChannelMatteOperation : public NodeOperation {
private:
- SocketReader *inputImageProgram;
+ SocketReader *m_inputImageProgram;
- int color_space; /* node->custom1 */
- int matte_channel; /* node->custom2 */
- int limit_method; /* node->algorithm */
- int limit_channel; /* node->channel */
- float limit_max; /* node->storage->t1 */
- float limit_min; /* node->storage->t2 */
+ int m_color_space; /* node->custom1 */
+ int m_matte_channel; /* node->custom2 */
+ int m_limit_method; /* node->algorithm */
+ int m_limit_channel; /* node->channel */
+ float m_limit_max; /* node->storage->t1 */
+ float m_limit_min; /* node->storage->t2 */
- float limit_range;
+ float m_limit_range;
/** ids to use for the operations (max and simple)
* alpha = in[ids[0]] - max(in[ids[1]], in[ids[2]])
@@ -49,7 +49,7 @@ private:
* ids[2] = ids[1]
* alpha = in[ids[0]] - max(in[ids[1]], in[ids[2]])
*/
- int ids[3];
+ int m_ids[3];
public:
/**
* Default constructor
@@ -66,11 +66,11 @@ public:
void setSettings(NodeChroma *nodeChroma, const int custom2)
{
- this->limit_max = nodeChroma->t1;
- this->limit_min = nodeChroma->t2;
- this->limit_method = nodeChroma->algorithm;
- this->limit_channel = nodeChroma->channel;
- this->matte_channel = custom2;
+ this->m_limit_max = nodeChroma->t1;
+ this->m_limit_min = nodeChroma->t2;
+ this->m_limit_method = nodeChroma->algorithm;
+ this->m_limit_channel = nodeChroma->channel;
+ this->m_matte_channel = custom2;
}
};
#endif
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
index 0ce1a585598..e88feb6db9c 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
@@ -28,20 +28,20 @@ ChromaMatteOperation::ChromaMatteOperation() : NodeOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- inputImageProgram = NULL;
- inputKeyProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputKeyProgram = NULL;
}
void ChromaMatteOperation::initExecution()
{
- this->inputImageProgram = this->getInputSocketReader(0);
- this->inputKeyProgram = this->getInputSocketReader(1);
+ this->m_inputImageProgram = this->getInputSocketReader(0);
+ this->m_inputKeyProgram = this->getInputSocketReader(1);
}
void ChromaMatteOperation::deinitExecution()
{
- this->inputImageProgram = NULL;
- this->inputKeyProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputKeyProgram = NULL;
}
void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -49,16 +49,16 @@ void ChromaMatteOperation::executePixel(float *outputValue, float x, float y, Pi
float inKey[4];
float inImage[4];
- const float acceptance = this->settings->t1; /* in radians */
- const float cutoff = this->settings->t2; /* in radians */
- const float gain = this->settings->fstrength;
+ const float acceptance = this->m_settings->t1; /* in radians */
+ const float cutoff = this->m_settings->t2; /* in radians */
+ const float gain = this->m_settings->fstrength;
float x_angle, z_angle, alpha;
float theta, beta;
float kfg;
- this->inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
- this->inputImageProgram->read(inImage, x, y, sampler, inputBuffers);
+ this->m_inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(inImage, x, y, sampler, inputBuffers);
/* store matte(alpha) value in [0] to go with
* COM_SetAlphaOperation and the Value output
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.h b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
index a09203f29b3..472a797fa28 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
@@ -30,9 +30,9 @@
*/
class ChromaMatteOperation : public NodeOperation {
private:
- NodeChroma *settings;
- SocketReader *inputImageProgram;
- SocketReader *inputKeyProgram;
+ NodeChroma *m_settings;
+ SocketReader *m_inputImageProgram;
+ SocketReader *m_inputKeyProgram;
public:
/**
* Default constructor
@@ -47,6 +47,6 @@ public:
void initExecution();
void deinitExecution();
- void setSettings(NodeChroma *nodeChroma) { this->settings = nodeChroma; }
+ void setSettings(NodeChroma *nodeChroma) { this->m_settings = nodeChroma; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
index a48fe169fd7..66ce86234b7 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -38,15 +38,15 @@ ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputValueOperation = NULL;
- this->inputColorOperation = NULL;
+ this->m_inputValueOperation = NULL;
+ this->m_inputColorOperation = NULL;
this->setResolutionInputSocketIndex(1);
}
void ColorBalanceASCCDLOperation::initExecution()
{
- this->inputValueOperation = this->getInputSocketReader(0);
- this->inputColorOperation = this->getInputSocketReader(1);
+ this->m_inputValueOperation = this->getInputSocketReader(0);
+ this->m_inputColorOperation = this->getInputSocketReader(1);
}
void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -54,22 +54,22 @@ void ColorBalanceASCCDLOperation::executePixel(float *outputColor, float x, floa
float inputColor[4];
float value[4];
- inputValueOperation->read(value, x, y, sampler, inputBuffers);
- inputColorOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
+ this->m_inputColorOperation->read(inputColor, x, y, sampler, inputBuffers);
float fac = value[0];
fac = min(1.0f, fac);
const float mfac = 1.0f - fac;
- outputColor[0] = mfac * inputColor[0] + fac *colorbalance_cdl(inputColor[0], this->lift[0], this->gamma[0], this->gain[0]);
- outputColor[1] = mfac * inputColor[1] + fac *colorbalance_cdl(inputColor[1], this->lift[1], this->gamma[1], this->gain[1]);
- outputColor[2] = mfac * inputColor[2] + fac *colorbalance_cdl(inputColor[2], this->lift[2], this->gamma[2], this->gain[2]);
+ 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];
}
void ColorBalanceASCCDLOperation::deinitExecution()
{
- this->inputValueOperation = NULL;
- this->inputColorOperation = NULL;
+ this->m_inputValueOperation = NULL;
+ this->m_inputColorOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
index 9e7db59d99d..479927d30d1 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.h
@@ -33,12 +33,12 @@ protected:
/**
* Prefetched reference to the inputProgram
*/
- SocketReader *inputValueOperation;
- SocketReader *inputColorOperation;
+ SocketReader *m_inputValueOperation;
+ SocketReader *m_inputColorOperation;
- float gain[3];
- float lift[3];
- float gamma[3];
+ float m_gain[3];
+ float m_lift[3];
+ float m_gamma[3];
public:
/**
@@ -61,8 +61,8 @@ public:
*/
void deinitExecution();
- void setGain(float gain[3]) { copy_v3_v3(this->gain, gain); }
- void setLift(float lift[3]) { copy_v3_v3(this->lift, lift); }
- void setGamma(float gamma[3]) { copy_v3_v3(this->gamma, gamma); }
+ void setGain(float gain[3]) { copy_v3_v3(this->m_gain, gain); }
+ void setLift(float lift[3]) { copy_v3_v3(this->m_lift, lift); }
+ void setGamma(float gamma[3]) { copy_v3_v3(this->m_gamma, gamma); }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
index 7a8d62dfe21..13863a9ec5a 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
@@ -43,15 +43,15 @@ ColorBalanceLGGOperation::ColorBalanceLGGOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputValueOperation = NULL;
- this->inputColorOperation = NULL;
+ this->m_inputValueOperation = NULL;
+ this->m_inputColorOperation = NULL;
this->setResolutionInputSocketIndex(1);
}
void ColorBalanceLGGOperation::initExecution()
{
- this->inputValueOperation = this->getInputSocketReader(0);
- this->inputColorOperation = this->getInputSocketReader(1);
+ this->m_inputValueOperation = this->getInputSocketReader(0);
+ this->m_inputColorOperation = this->getInputSocketReader(1);
}
void ColorBalanceLGGOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -59,22 +59,22 @@ void ColorBalanceLGGOperation::executePixel(float *outputColor, float x, float y
float inputColor[4];
float value[4];
- inputValueOperation->read(value, x, y, sampler, inputBuffers);
- inputColorOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(value, x, y, sampler, inputBuffers);
+ this->m_inputColorOperation->read(inputColor, x, y, sampler, inputBuffers);
float fac = value[0];
fac = min(1.0f, fac);
const float mfac = 1.0f - fac;
- outputColor[0] = mfac * inputColor[0] + fac *colorbalance_lgg(inputColor[0], this->lift[0], this->gamma_inv[0], this->gain[0]);
- outputColor[1] = mfac * inputColor[1] + fac *colorbalance_lgg(inputColor[1], this->lift[1], this->gamma_inv[1], this->gain[1]);
- outputColor[2] = mfac * inputColor[2] + fac *colorbalance_lgg(inputColor[2], this->lift[2], this->gamma_inv[2], this->gain[2]);
+ 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];
}
void ColorBalanceLGGOperation::deinitExecution()
{
- this->inputValueOperation = NULL;
- this->inputColorOperation = NULL;
+ this->m_inputValueOperation = NULL;
+ this->m_inputColorOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
index 54cfb49327f..ec3652da09e 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.h
@@ -34,12 +34,12 @@ protected:
/**
* Prefetched reference to the inputProgram
*/
- SocketReader *inputValueOperation;
- SocketReader *inputColorOperation;
+ SocketReader *m_inputValueOperation;
+ SocketReader *m_inputColorOperation;
- float gain[3];
- float lift[3];
- float gamma_inv[3];
+ float m_gain[3];
+ float m_lift[3];
+ float m_gamma_inv[3];
public:
/**
@@ -62,20 +62,8 @@ public:
*/
void deinitExecution();
- void setGain(float gain[3]) {
- this->gain[0] = gain[0];
- this->gain[1] = gain[1];
- this->gain[2] = gain[2];
- }
- void setLift(float lift[3]) {
- this->lift[0] = lift[0];
- this->lift[1] = lift[1];
- this->lift[2] = lift[2];
- }
- void setGammaInv(float gamma_inv[3]) {
- this->gamma_inv[0] = gamma_inv[0];
- this->gamma_inv[1] = gamma_inv[1];
- this->gamma_inv[2] = gamma_inv[2];
- }
+ void setGain(const float gain[3]) { copy_v3_v3(this->m_gain, gain); }
+ void setLift(const float lift[3]) { copy_v3_v3(this->m_lift, lift); }
+ void setGammaInv(const float gamma_inv[3]) { copy_v3_v3(this->m_gamma_inv, gamma_inv); }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index 5f62f9ec403..8008866752f 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -28,31 +28,31 @@ ColorCorrectionOperation::ColorCorrectionOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputImage = NULL;
- this->inputMask = NULL;
- this->redChannelEnabled = true;
- this->greenChannelEnabled = true;
- this->blueChannelEnabled = true;
+ this->m_inputImage = NULL;
+ this->m_inputMask = NULL;
+ this->m_redChannelEnabled = true;
+ this->m_greenChannelEnabled = true;
+ this->m_blueChannelEnabled = true;
}
void ColorCorrectionOperation::initExecution()
{
- this->inputImage = this->getInputSocketReader(0);
- this->inputMask = this->getInputSocketReader(1);
+ this->m_inputImage = this->getInputSocketReader(0);
+ this->m_inputMask = this->getInputSocketReader(1);
}
void ColorCorrectionOperation::executePixel(float *output, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputImageColor[4];
float inputMask[4];
- this->inputImage->read(inputImageColor, x, y, sampler, inputBuffers);
- this->inputMask->read(inputMask, x, y, sampler, inputBuffers);
+ this->m_inputImage->read(inputImageColor, x, y, sampler, inputBuffers);
+ this->m_inputMask->read(inputMask, x, y, sampler, inputBuffers);
float level = (inputImageColor[0] + inputImageColor[1] + inputImageColor[2]) / 3.0f;
- float contrast = this->data->master.contrast;
- float saturation = this->data->master.saturation;
- float gamma = this->data->master.gamma;
- float gain = this->data->master.gain;
- float lift = this->data->master.lift;
+ float contrast = this->m_data->master.contrast;
+ float saturation = this->m_data->master.saturation;
+ float gamma = this->m_data->master.gamma;
+ float gain = this->m_data->master.gain;
+ float lift = this->m_data->master.lift;
float r, g, b;
float value = inputMask[0];
@@ -64,18 +64,18 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix
float levelHighlights = 0.0;
#define MARGIN 0.10f
#define MARGIN_DIV (0.5f / MARGIN)
- if (level < this->data->startmidtones - MARGIN) {
+ if (level < this->m_data->startmidtones - MARGIN) {
levelShadows = 1.0f;
}
- else if (level < this->data->startmidtones + MARGIN) {
- levelMidtones = ((level - this->data->startmidtones) * MARGIN_DIV) + 0.5f;
+ else if (level < this->m_data->startmidtones + MARGIN) {
+ levelMidtones = ((level - this->m_data->startmidtones) * MARGIN_DIV) + 0.5f;
levelShadows = 1.0f - levelMidtones;
}
- else if (level < this->data->endmidtones - MARGIN) {
+ else if (level < this->m_data->endmidtones - MARGIN) {
levelMidtones = 1.0f;
}
- else if (level < this->data->endmidtones + MARGIN) {
- levelHighlights = ((level - this->data->endmidtones) * MARGIN_DIV) + 0.5f;
+ else if (level < this->m_data->endmidtones + MARGIN) {
+ levelHighlights = ((level - this->m_data->endmidtones) * MARGIN_DIV) + 0.5f;
levelMidtones = 1.0f - levelHighlights;
}
else {
@@ -83,11 +83,11 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix
}
#undef MARGIN
#undef MARGIN_DIV
- contrast *= (levelShadows * this->data->shadows.contrast) + (levelMidtones * this->data->midtones.contrast) + (levelHighlights * this->data->highlights.contrast);
- saturation *= (levelShadows * this->data->shadows.saturation) + (levelMidtones * this->data->midtones.saturation) + (levelHighlights * this->data->highlights.saturation);
- gamma *= (levelShadows * this->data->shadows.gamma) + (levelMidtones * this->data->midtones.gamma) + (levelHighlights * this->data->highlights.gamma);
- gain *= (levelShadows * this->data->shadows.gain) + (levelMidtones * this->data->midtones.gain) + (levelHighlights * this->data->highlights.gain);
- lift += (levelShadows * this->data->shadows.lift) + (levelMidtones * this->data->midtones.lift) + (levelHighlights * this->data->highlights.lift);
+ contrast *= (levelShadows * this->m_data->shadows.contrast) + (levelMidtones * this->m_data->midtones.contrast) + (levelHighlights * this->m_data->highlights.contrast);
+ saturation *= (levelShadows * this->m_data->shadows.saturation) + (levelMidtones * this->m_data->midtones.saturation) + (levelHighlights * this->m_data->highlights.saturation);
+ gamma *= (levelShadows * this->m_data->shadows.gamma) + (levelMidtones * this->m_data->midtones.gamma) + (levelHighlights * this->m_data->highlights.gamma);
+ gain *= (levelShadows * this->m_data->shadows.gain) + (levelMidtones * this->m_data->midtones.gain) + (levelHighlights * this->m_data->highlights.gain);
+ lift += (levelShadows * this->m_data->shadows.lift) + (levelMidtones * this->m_data->midtones.lift) + (levelHighlights * this->m_data->highlights.lift);
float invgamma = 1.0f / gamma;
float luma = rgb_to_luma_y(inputImageColor);
@@ -114,19 +114,19 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix
g = mvalue * inputImageColor[1] + value * g;
b = mvalue * inputImageColor[2] + value * b;
- if (this->redChannelEnabled) {
+ if (this->m_redChannelEnabled) {
output[0] = r;
}
else {
output[0] = inputImageColor[0];
}
- if (this->greenChannelEnabled) {
+ if (this->m_greenChannelEnabled) {
output[1] = g;
}
else {
output[1] = inputImageColor[1];
}
- if (this->blueChannelEnabled) {
+ if (this->m_blueChannelEnabled) {
output[2] = b;
}
else {
@@ -137,7 +137,7 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix
void ColorCorrectionOperation::deinitExecution()
{
- this->inputImage = NULL;
- this->inputMask = NULL;
+ this->m_inputImage = NULL;
+ this->m_inputMask = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
index c0c33f7f2fa..8db3870709e 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.h
@@ -30,13 +30,13 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputImage;
- SocketReader *inputMask;
- NodeColorCorrection *data;
+ SocketReader *m_inputImage;
+ SocketReader *m_inputMask;
+ NodeColorCorrection *m_data;
- bool redChannelEnabled;
- bool greenChannelEnabled;
- bool blueChannelEnabled;
+ bool m_redChannelEnabled;
+ bool m_greenChannelEnabled;
+ bool m_blueChannelEnabled;
public:
ColorCorrectionOperation();
@@ -56,9 +56,9 @@ public:
*/
void deinitExecution();
- void setData(NodeColorCorrection *data) { this->data = data; }
- void setRedChannelEnabled(bool enabled) { this->redChannelEnabled = enabled; }
- void setGreenChannelEnabled(bool enabled) { this->greenChannelEnabled = enabled; }
- void setBlueChannelEnabled(bool enabled) { this->blueChannelEnabled = enabled; }
+ void setData(NodeColorCorrection *data) { this->m_data = data; }
+ void setRedChannelEnabled(bool enabled) { this->m_redChannelEnabled = enabled; }
+ void setGreenChannelEnabled(bool enabled) { this->m_greenChannelEnabled = enabled; }
+ void setBlueChannelEnabled(bool enabled) { this->m_blueChannelEnabled = enabled; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 4feac3e7273..9848d191c04 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -39,28 +39,28 @@ ColorCurveOperation::ColorCurveOperation() : CurveBaseOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputFacProgram = NULL;
- this->inputImageProgram = NULL;
- this->inputBlackProgram = NULL;
- this->inputWhiteProgram = NULL;
+ this->m_inputFacProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputBlackProgram = NULL;
+ this->m_inputWhiteProgram = NULL;
this->setResolutionInputSocketIndex(1);
}
void ColorCurveOperation::initExecution()
{
CurveBaseOperation::initExecution();
- this->inputFacProgram = this->getInputSocketReader(0);
- this->inputImageProgram = this->getInputSocketReader(1);
- this->inputBlackProgram = this->getInputSocketReader(2);
- this->inputWhiteProgram = this->getInputSocketReader(3);
+ this->m_inputFacProgram = this->getInputSocketReader(0);
+ this->m_inputImageProgram = this->getInputSocketReader(1);
+ this->m_inputBlackProgram = this->getInputSocketReader(2);
+ this->m_inputWhiteProgram = this->getInputSocketReader(3);
- curvemapping_premultiply(this->curveMapping, 0);
+ curvemapping_premultiply(this->m_curveMapping, 0);
}
void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- CurveMapping *cumap = this->curveMapping;
+ CurveMapping *cumap = this->m_curveMapping;
CurveMapping *workingCopy = (CurveMapping *)MEM_dupallocN(cumap);
float black[4];
@@ -68,13 +68,13 @@ void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSamp
float fac[4];
float image[4];
- this->inputBlackProgram->read(black, x, y, sampler, inputBuffers);
- this->inputWhiteProgram->read(white, x, y, sampler, inputBuffers);
+ this->m_inputBlackProgram->read(black, x, y, sampler, inputBuffers);
+ this->m_inputWhiteProgram->read(white, x, y, sampler, inputBuffers);
curvemapping_set_black_white(workingCopy, black, white);
- this->inputFacProgram->read(fac, x, y, sampler, inputBuffers);
- this->inputImageProgram->read(image, x, y, sampler, inputBuffers);
+ this->m_inputFacProgram->read(fac, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(image, x, y, sampler, inputBuffers);
if (*fac >= 1.0f)
curvemapping_evaluate_premulRGBF(workingCopy, color, image);
@@ -94,11 +94,11 @@ void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSamp
void ColorCurveOperation::deinitExecution()
{
- this->inputFacProgram = NULL;
- this->inputImageProgram = NULL;
- this->inputBlackProgram = NULL;
- this->inputWhiteProgram = NULL;
- curvemapping_premultiply(this->curveMapping, 1);
+ this->m_inputFacProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputBlackProgram = NULL;
+ this->m_inputWhiteProgram = NULL;
+ curvemapping_premultiply(this->m_curveMapping, 1);
}
@@ -110,20 +110,20 @@ ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation() : CurveBase
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputFacProgram = NULL;
- this->inputImageProgram = NULL;
+ this->m_inputFacProgram = NULL;
+ this->m_inputImageProgram = NULL;
this->setResolutionInputSocketIndex(1);
}
void ConstantLevelColorCurveOperation::initExecution()
{
CurveBaseOperation::initExecution();
- this->inputFacProgram = this->getInputSocketReader(0);
- this->inputImageProgram = this->getInputSocketReader(1);
+ this->m_inputFacProgram = this->getInputSocketReader(0);
+ this->m_inputImageProgram = this->getInputSocketReader(1);
- curvemapping_premultiply(this->curveMapping, 0);
+ curvemapping_premultiply(this->m_curveMapping, 0);
- curvemapping_set_black_white(this->curveMapping, this->black, this->white);
+ curvemapping_set_black_white(this->m_curveMapping, this->m_black, this->m_white);
}
void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -132,17 +132,17 @@ void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float
float image[4];
- this->inputFacProgram->read(fac, x, y, sampler, inputBuffers);
- this->inputImageProgram->read(image, x, y, sampler, inputBuffers);
+ this->m_inputFacProgram->read(fac, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(image, x, y, sampler, inputBuffers);
if (*fac >= 1.0f)
- curvemapping_evaluate_premulRGBF(this->curveMapping, color, image);
+ curvemapping_evaluate_premulRGBF(this->m_curveMapping, color, image);
else if (*fac <= 0.0f) {
copy_v3_v3(color, image);
}
else {
float col[4], mfac = 1.0f - *fac;
- curvemapping_evaluate_premulRGBF(this->curveMapping, col, image);
+ 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];
@@ -152,7 +152,7 @@ void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float
void ConstantLevelColorCurveOperation::deinitExecution()
{
- this->inputFacProgram = NULL;
- this->inputImageProgram = NULL;
- curvemapping_premultiply(this->curveMapping, 1);
+ this->m_inputFacProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ curvemapping_premultiply(this->m_curveMapping, 1);
}
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.h b/source/blender/compositor/operations/COM_ColorCurveOperation.h
index fcd78be8372..3bcbc31650c 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.h
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.h
@@ -31,10 +31,10 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputFacProgram;
- SocketReader *inputImageProgram;
- SocketReader *inputBlackProgram;
- SocketReader *inputWhiteProgram;
+ SocketReader *m_inputFacProgram;
+ SocketReader *m_inputImageProgram;
+ SocketReader *m_inputBlackProgram;
+ SocketReader *m_inputWhiteProgram;
public:
ColorCurveOperation();
@@ -59,10 +59,10 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputFacProgram;
- SocketReader *inputImageProgram;
- float black[3];
- float white[3];
+ SocketReader *m_inputFacProgram;
+ SocketReader *m_inputImageProgram;
+ float m_black[3];
+ float m_white[3];
public:
ConstantLevelColorCurveOperation();
@@ -82,8 +82,8 @@ public:
*/
void deinitExecution();
- void setBlackLevel(float black[3]) { this->black[0] = black[0]; this->black[1] = black[1]; this->black[2] = black[2]; }
- void setWhiteLevel(float white[3]) { this->white[0] = white[0]; this->white[1] = white[1]; this->white[2] = white[2]; }
+ void setBlackLevel(float black[3]) { this->m_black[0] = black[0]; this->m_black[1] = black[1]; this->m_black[2] = black[2]; }
+ void setWhiteLevel(float white[3]) { this->m_white[0] = white[0]; this->m_white[1] = white[1]; this->m_white[2] = white[2]; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
index afb362dbdcd..4a01499b060 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
@@ -28,20 +28,20 @@ ColorMatteOperation::ColorMatteOperation() : NodeOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- inputImageProgram = NULL;
- inputKeyProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputKeyProgram = NULL;
}
void ColorMatteOperation::initExecution()
{
- this->inputImageProgram = this->getInputSocketReader(0);
- this->inputKeyProgram = this->getInputSocketReader(1);
+ this->m_inputImageProgram = this->getInputSocketReader(0);
+ this->m_inputKeyProgram = this->getInputSocketReader(1);
}
void ColorMatteOperation::deinitExecution()
{
- this->inputImageProgram = NULL;
- this->inputKeyProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputKeyProgram = NULL;
}
void ColorMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -49,14 +49,14 @@ void ColorMatteOperation::executePixel(float *outputValue, float x, float y, Pix
float inColor[4];
float inKey[4];
- const float hue = this->settings->t1;
- const float sat = this->settings->t2;
- const float val = this->settings->t3;
+ const float hue = this->m_settings->t1;
+ const float sat = this->m_settings->t2;
+ const float val = this->m_settings->t3;
float h_wrap;
- this->inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
- this->inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
+ this->m_inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
/* store matte(alpha) value in [0] to go with
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.h b/source/blender/compositor/operations/COM_ColorMatteOperation.h
index e5dd9efd820..ae904f8f938 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.h
@@ -30,9 +30,9 @@
*/
class ColorMatteOperation : public NodeOperation {
private:
- NodeChroma *settings;
- SocketReader *inputImageProgram;
- SocketReader *inputKeyProgram;
+ NodeChroma *m_settings;
+ SocketReader *m_inputImageProgram;
+ SocketReader *m_inputKeyProgram;
public:
/**
* Default constructor
@@ -47,6 +47,6 @@ public:
void initExecution();
void deinitExecution();
- void setSettings(NodeChroma *nodeChroma) { this->settings = nodeChroma; }
+ void setSettings(NodeChroma *nodeChroma) { this->m_settings = nodeChroma; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
index 9af70ddc5a7..95dca0dc410 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
@@ -35,23 +35,23 @@ ColorRampOperation::ColorRampOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
- this->colorBand = NULL;
+ this->m_inputProgram = NULL;
+ this->m_colorBand = NULL;
}
void ColorRampOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void ColorRampOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float values[4];
- this->inputProgram->read(values, x, y, sampler, inputBuffers);
- do_colorband(this->colorBand, values[0], color);
+ this->m_inputProgram->read(values, x, y, sampler, inputBuffers);
+ do_colorband(this->m_colorBand, values[0], color);
}
void ColorRampOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.h b/source/blender/compositor/operations/COM_ColorRampOperation.h
index eef5321eb19..42bc6b943b7 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.h
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.h
@@ -30,8 +30,8 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
- ColorBand *colorBand;
+ SocketReader *m_inputProgram;
+ ColorBand *m_colorBand;
public:
ColorRampOperation();
@@ -51,7 +51,7 @@ public:
void deinitExecution();
void setColorBand(ColorBand *colorBand) {
- this->colorBand = colorBand;
+ this->m_colorBand = colorBand;
}
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
index 1a534d778c0..e2773f3a6b4 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
@@ -30,72 +30,72 @@ ColorSpillOperation::ColorSpillOperation() : NodeOperation()
addInputSocket(COM_DT_VALUE);
addOutputSocket(COM_DT_COLOR);
- inputImageReader = NULL;
- inputFacReader = NULL;
- this->spillChannel = 1; // GREEN
+ this->m_inputImageReader = NULL;
+ this->m_inputFacReader = NULL;
+ this->m_spillChannel = 1; // GREEN
}
void ColorSpillOperation::initExecution()
{
- this->inputImageReader = this->getInputSocketReader(0);
- this->inputFacReader = this->getInputSocketReader(1);
- if (spillChannel == 0) {
- this->rmut = -1.0f;
- this->gmut = 1.0f;
- this->bmut = 1.0f;
- this->channel2 = 1;
- this->channel3 = 2;
- if (this->settings->unspill == 0) {
- this->settings->uspillr = 1.0f;
- this->settings->uspillg = 0.0f;
- this->settings->uspillb = 0.0f;
+ this->m_inputImageReader = this->getInputSocketReader(0);
+ this->m_inputFacReader = this->getInputSocketReader(1);
+ if (this->m_spillChannel == 0) {
+ this->m_rmut = -1.0f;
+ this->m_gmut = 1.0f;
+ this->m_bmut = 1.0f;
+ this->m_channel2 = 1;
+ this->m_channel3 = 2;
+ if (this->m_settings->unspill == 0) {
+ this->m_settings->uspillr = 1.0f;
+ this->m_settings->uspillg = 0.0f;
+ this->m_settings->uspillb = 0.0f;
}
}
- else if (spillChannel == 1) {
- this->rmut = 1.0f;
- this->gmut = -1.0f;
- this->bmut = 1.0f;
- this->channel2 = 0;
- this->channel3 = 2;
- if (this->settings->unspill == 0) {
- this->settings->uspillr = 0.0f;
- this->settings->uspillg = 1.0f;
- this->settings->uspillb = 0.0f;
+ else if (this->m_spillChannel == 1) {
+ this->m_rmut = 1.0f;
+ this->m_gmut = -1.0f;
+ this->m_bmut = 1.0f;
+ this->m_channel2 = 0;
+ this->m_channel3 = 2;
+ if (this->m_settings->unspill == 0) {
+ this->m_settings->uspillr = 0.0f;
+ this->m_settings->uspillg = 1.0f;
+ this->m_settings->uspillb = 0.0f;
}
}
else {
- this->rmut = 1.0f;
- this->gmut = 1.0f;
- this->bmut = -1.0f;
+ this->m_rmut = 1.0f;
+ this->m_gmut = 1.0f;
+ this->m_bmut = -1.0f;
- this->channel2 = 0;
- this->channel3 = 1;
- if (this->settings->unspill == 0) {
- this->settings->uspillr = 0.0f;
- this->settings->uspillg = 0.0f;
- this->settings->uspillb = 1.0f;
+ this->m_channel2 = 0;
+ this->m_channel3 = 1;
+ if (this->m_settings->unspill == 0) {
+ this->m_settings->uspillr = 0.0f;
+ this->m_settings->uspillg = 0.0f;
+ this->m_settings->uspillb = 1.0f;
}
}
}
void ColorSpillOperation::deinitExecution()
{
- this->inputImageReader = NULL;
- this->inputFacReader = NULL;
+ this->m_inputImageReader = NULL;
+ this->m_inputFacReader = NULL;
}
void ColorSpillOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float fac[4];
float input[4];
- this->inputFacReader->read(fac, x, y, sampler, inputBuffers);
- this->inputImageReader->read(input, x, y, sampler, inputBuffers);
+ this->m_inputFacReader->read(fac, x, y, sampler, inputBuffers);
+ this->m_inputImageReader->read(input, x, y, sampler, inputBuffers);
float rfac = min(1.0f, fac[0]);
float map = calculateMapValue(rfac, input);
if (map > 0.0f) {
- outputValue[0] = input[0] + this->rmut * (this->settings->uspillr * map);
- outputValue[1] = input[1] + this->gmut * (this->settings->uspillg * map);
- outputValue[2] = input[2] + this->bmut * (this->settings->uspillb * map);
+ 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];
}
else {
@@ -104,11 +104,11 @@ void ColorSpillOperation::executePixel(float *outputValue, float x, float y, Pix
}
float ColorSpillOperation::calculateMapValue(float fac, float *input)
{
- return fac * (input[this->spillChannel] - (this->settings->limscale * input[this->settings->limchan]));
+ return fac * (input[this->m_spillChannel] - (this->m_settings->limscale * input[this->m_settings->limchan]));
}
float ColorSpillAverageOperation::calculateMapValue(float fac, float *input)
{
- return fac * (input[this->spillChannel] - (this->settings->limscale * AVG(input[this->channel2], input[this->channel3])));
+ return fac * (input[this->m_spillChannel] - (this->m_settings->limscale * AVG(input[this->m_channel2], input[this->m_channel3])));
}
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.h b/source/blender/compositor/operations/COM_ColorSpillOperation.h
index e890a1e1564..6e3156819b2 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.h
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.h
@@ -30,13 +30,13 @@
*/
class ColorSpillOperation : public NodeOperation {
protected:
- NodeColorspill *settings;
- SocketReader *inputImageReader;
- SocketReader *inputFacReader;
- int spillChannel;
- int channel2;
- int channel3;
- float rmut, gmut, bmut;
+ NodeColorspill *m_settings;
+ SocketReader *m_inputImageReader;
+ SocketReader *m_inputFacReader;
+ int m_spillChannel;
+ int m_channel2;
+ int m_channel3;
+ float m_rmut, m_gmut, m_bmut;
public:
/**
* Default constructor
@@ -51,8 +51,8 @@ public:
void initExecution();
void deinitExecution();
- void setSettings(NodeColorspill *nodeColorSpill) { this->settings = nodeColorSpill; }
- void setSpillChannel(int channel) { this->spillChannel = channel; }
+ void setSettings(NodeColorspill *nodeColorSpill) { this->m_settings = nodeColorSpill; }
+ void setSpillChannel(int channel) { this->m_spillChannel = channel; }
float calculateMapValue(float fac, float *input);
};
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
index fb4e6f03e76..9f175a381a4 100644
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
+++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
@@ -31,10 +31,10 @@ CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputChannel1Operation = NULL;
- this->inputChannel2Operation = NULL;
- this->inputChannel3Operation = NULL;
- this->inputChannel4Operation = NULL;
+ this->m_inputChannel1Operation = NULL;
+ this->m_inputChannel2Operation = NULL;
+ this->m_inputChannel3Operation = NULL;
+ this->m_inputChannel4Operation = NULL;
}
bool CombineChannelsOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -63,18 +63,18 @@ bool CombineChannelsOperation::determineDependingAreaOfInterest(rcti *input, Rea
void CombineChannelsOperation::initExecution()
{
- this->inputChannel1Operation = this->getInputSocketReader(0);
- this->inputChannel2Operation = this->getInputSocketReader(1);
- this->inputChannel3Operation = this->getInputSocketReader(2);
- this->inputChannel4Operation = this->getInputSocketReader(3);
+ this->m_inputChannel1Operation = this->getInputSocketReader(0);
+ this->m_inputChannel2Operation = this->getInputSocketReader(1);
+ this->m_inputChannel3Operation = this->getInputSocketReader(2);
+ this->m_inputChannel4Operation = this->getInputSocketReader(3);
}
void CombineChannelsOperation::deinitExecution()
{
- this->inputChannel1Operation = NULL;
- this->inputChannel2Operation = NULL;
- this->inputChannel3Operation = NULL;
- this->inputChannel4Operation = NULL;
+ this->m_inputChannel1Operation = NULL;
+ this->m_inputChannel2Operation = NULL;
+ this->m_inputChannel3Operation = NULL;
+ this->m_inputChannel4Operation = NULL;
}
@@ -82,20 +82,20 @@ void CombineChannelsOperation::executePixel(float *color, float x, float y, Pixe
{
float input[4];
/// @todo: remove if statements
- if (this->inputChannel1Operation) {
- this->inputChannel1Operation->read(input, x, y, sampler, inputBuffers);
+ if (this->m_inputChannel1Operation) {
+ this->m_inputChannel1Operation->read(input, x, y, sampler, inputBuffers);
color[0] = input[0];
}
- if (this->inputChannel2Operation) {
- this->inputChannel2Operation->read(input, x, y, sampler, inputBuffers);
+ if (this->m_inputChannel2Operation) {
+ this->m_inputChannel2Operation->read(input, x, y, sampler, inputBuffers);
color[1] = input[0];
}
- if (this->inputChannel3Operation) {
- this->inputChannel3Operation->read(input, x, y, sampler, inputBuffers);
+ if (this->m_inputChannel3Operation) {
+ this->m_inputChannel3Operation->read(input, x, y, sampler, inputBuffers);
color[2] = input[0];
}
- if (this->inputChannel4Operation) {
- this->inputChannel4Operation->read(input, x, y, sampler, inputBuffers);
+ if (this->m_inputChannel4Operation) {
+ this->m_inputChannel4Operation->read(input, x, y, sampler, inputBuffers);
color[3] = input[0];
}
}
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.h b/source/blender/compositor/operations/COM_CombineChannelsOperation.h
index cc71f44b4f5..8e4c2120614 100644
--- a/source/blender/compositor/operations/COM_CombineChannelsOperation.h
+++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.h
@@ -27,10 +27,10 @@
class CombineChannelsOperation : public NodeOperation {
private:
- SocketReader *inputChannel1Operation;
- SocketReader *inputChannel2Operation;
- SocketReader *inputChannel3Operation;
- SocketReader *inputChannel4Operation;
+ SocketReader *m_inputChannel1Operation;
+ SocketReader *m_inputChannel2Operation;
+ SocketReader *m_inputChannel3Operation;
+ SocketReader *m_inputChannel4Operation;
public:
CombineChannelsOperation();
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp
index 936cbaadd84..717b6ce76cc 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -42,36 +42,36 @@ CompositorOperation::CompositorOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->setRenderData(NULL);
- this->outputBuffer = NULL;
- this->imageInput = NULL;
- this->alphaInput = NULL;
+ this->m_outputBuffer = NULL;
+ this->m_imageInput = NULL;
+ this->m_alphaInput = NULL;
}
void CompositorOperation::initExecution()
{
// When initializing the tree during initial load the width and height can be zero.
- this->imageInput = getInputSocketReader(0);
- this->alphaInput = getInputSocketReader(1);
+ this->m_imageInput = getInputSocketReader(0);
+ this->m_alphaInput = getInputSocketReader(1);
if (this->getWidth() * this->getHeight() != 0) {
- this->outputBuffer = (float *) MEM_callocN(this->getWidth() * this->getHeight() * 4 * sizeof(float), "CompositorOperation");
+ this->m_outputBuffer = (float *) MEM_callocN(this->getWidth() * this->getHeight() * 4 * sizeof(float), "CompositorOperation");
}
}
void CompositorOperation::deinitExecution()
{
if (!isBreaked()) {
- const RenderData *rd = this->rd;
+ const RenderData *rd = this->m_rd;
Render *re = RE_GetRender_FromData(rd);
RenderResult *rr = RE_AcquireResultWrite(re);
if (rr) {
if (rr->rectf != NULL) {
MEM_freeN(rr->rectf);
}
- rr->rectf = outputBuffer;
+ rr->rectf = this->m_outputBuffer;
}
else {
- if (this->outputBuffer) {
- MEM_freeN(this->outputBuffer);
+ if (this->m_outputBuffer) {
+ MEM_freeN(this->m_outputBuffer);
}
}
@@ -83,21 +83,21 @@ void CompositorOperation::deinitExecution()
}
}
else {
- if (this->outputBuffer) {
- MEM_freeN(this->outputBuffer);
+ if (this->m_outputBuffer) {
+ MEM_freeN(this->m_outputBuffer);
}
}
- this->outputBuffer = NULL;
- this->imageInput = NULL;
- this->alphaInput = NULL;
+ this->m_outputBuffer = NULL;
+ this->m_imageInput = NULL;
+ this->m_alphaInput = NULL;
}
void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
{
float color[8]; // 7 is enough
- float *buffer = this->outputBuffer;
+ float *buffer = this->m_outputBuffer;
if (!buffer) return;
int x1 = rect->xmin;
@@ -111,9 +111,9 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, Mem
for (y = y1; y < y2 && (!breaked); y++) {
for (x = x1; x < x2 && (!breaked); x++) {
- imageInput->read(color, x, y, COM_PS_NEAREST, memoryBuffers);
- if (alphaInput != NULL) {
- alphaInput->read(&(color[3]), x, y, COM_PS_NEAREST, memoryBuffers);
+ this->m_imageInput->read(color, x, y, COM_PS_NEAREST, memoryBuffers);
+ if (this->m_alphaInput != NULL) {
+ this->m_alphaInput->read(&(color[3]), x, y, COM_PS_NEAREST, memoryBuffers);
}
copy_v4_v4(buffer + offset, color);
offset += COM_NUMBER_OF_CHANNELS;
@@ -127,12 +127,12 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, Mem
void CompositorOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
- int width = this->rd->xsch * this->rd->size / 100;
- int height = this->rd->ysch * this->rd->size / 100;
+ int width = this->m_rd->xsch * this->m_rd->size / 100;
+ int height = this->m_rd->ysch * this->m_rd->size / 100;
// check actual render resolution with cropping it may differ with cropped border.rendering
// FIX for: [31777] Border Crop gives black (easy)
- Render *re = RE_GetRender_FromData(this->rd);
+ Render *re = RE_GetRender_FromData(this->m_rd);
if (re) {
RenderResult *rr = RE_AcquireResultRead(re);
if (rr) {
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.h b/source/blender/compositor/operations/COM_CompositorOperation.h
index 280f39b7729..2719d376339 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.h
+++ b/source/blender/compositor/operations/COM_CompositorOperation.h
@@ -34,26 +34,26 @@ private:
/**
* @brief local reference to the scene
*/
- const RenderData *rd;
+ const RenderData *m_rd;
/**
* @brief reference to the output float buffer
*/
- float *outputBuffer;
+ float *m_outputBuffer;
/**
* @brief local reference to the input image operation
*/
- SocketReader *imageInput;
+ SocketReader *m_imageInput;
/**
* @brief local reference to the input alpha operation
*/
- SocketReader *alphaInput;
+ SocketReader *m_alphaInput;
public:
CompositorOperation();
void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers);
- void setRenderData(const RenderData *rd) { this->rd = rd; }
+ void setRenderData(const RenderData *rd) { this->m_rd = rd; }
bool isOutputOperation(bool rendering) const { return true; }
void initExecution();
void deinitExecution();
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
index 2e8fc9005b8..4d829eae7a0 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
@@ -29,23 +29,23 @@ ConvertColorProfileOperation::ConvertColorProfileOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
- this->predivided = false;
+ this->m_inputOperation = NULL;
+ this->m_predivided = false;
}
void ConvertColorProfileOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorProfileOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float color[4];
- inputOperation->read(color, x, y, sampler, inputBuffers);
- IMB_buffer_float_from_float(outputValue, color, 4, this->toProfile, this->fromProfile, this->predivided, 1, 1, 0, 0);
+ this->m_inputOperation->read(color, x, y, sampler, inputBuffers);
+ IMB_buffer_float_from_float(outputValue, color, 4, this->m_toProfile, this->m_fromProfile, this->m_predivided, 1, 1, 0, 0);
}
void ConvertColorProfileOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
index b11a06f7749..0b9a07a57ca 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.h
@@ -34,22 +34,22 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
/**
* @brief color profile where to convert from
*/
- int fromProfile;
+ int m_fromProfile;
/**
* @brief color profile where to convert to
*/
- int toProfile;
+ int m_toProfile;
/**
* @brief is color predivided
*/
- bool predivided;
+ bool m_predivided;
public:
/**
* Default constructor
@@ -71,8 +71,8 @@ public:
*/
void deinitExecution();
- void setFromColorProfile(int colorProfile) { this->fromProfile = colorProfile; }
- void setToColorProfile(int colorProfile) { this->toProfile = colorProfile; }
- void setPredivided(bool predivided) { this->predivided = predivided; }
+ void setFromColorProfile(int colorProfile) { this->m_fromProfile = colorProfile; }
+ void setToColorProfile(int colorProfile) { this->m_toProfile = colorProfile; }
+ void setPredivided(bool predivided) { this->m_predivided = predivided; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
index 0e2c1e29a1d..a8c57449a2e 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
@@ -26,22 +26,22 @@ ConvertColorToBWOperation::ConvertColorToBWOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertColorToBWOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorToBWOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
outputValue[0] = rgb_to_bw(inputColor);
}
void ConvertColorToBWOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
index 814c0c2e808..2a57c997196 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
index 613bfe68fbb..6c79c4ea6a3 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.cpp
@@ -26,20 +26,20 @@ ConvertColorToVectorOperation::ConvertColorToVectorOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VECTOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertColorToVectorOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColorToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- inputOperation->read(outputValue, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(outputValue, x, y, sampler, inputBuffers);
}
void ConvertColorToVectorOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
index 1167b565a8e..f9170dfc7aa 100644
--- a/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertColorToVectorOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp b/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
index 2c8caec6f61..c872f3e85bb 100644
--- a/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
@@ -26,22 +26,22 @@ ConvertColourToValueProg::ConvertColourToValueProg() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertColourToValueProg::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertColourToValueProg::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
outputValue[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
}
void ConvertColourToValueProg::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertColourToValueProg.h b/source/blender/compositor/operations/COM_ConvertColourToValueProg.h
index 9c43ec47604..ebd4bcbd59b 100644
--- a/source/blender/compositor/operations/COM_ConvertColourToValueProg.h
+++ b/source/blender/compositor/operations/COM_ConvertColourToValueProg.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
index 1746afea713..91b68a90126 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
@@ -28,27 +28,27 @@ ConvertDepthToRadiusOperation::ConvertDepthToRadiusOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputOperation = NULL;
- this->fStop = 128.0f;
- this->cameraObject = NULL;
- this->maxRadius = 32.0f;
+ this->m_inputOperation = NULL;
+ this->m_fStop = 128.0f;
+ this->m_cameraObject = NULL;
+ this->m_maxRadius = 32.0f;
}
float ConvertDepthToRadiusOperation::determineFocalDistance()
{
- if (cameraObject == NULL || cameraObject->type != OB_CAMERA) {
+ if (this->m_cameraObject == NULL || this->m_cameraObject->type != OB_CAMERA) {
return 10.0f;
}
else {
- Camera *camera = (Camera *)this->cameraObject->data;
- cam_lens = camera->lens;
+ Camera *camera = (Camera *)this->m_cameraObject->data;
+ this->m_cam_lens = camera->lens;
if (camera->dof_ob) {
/* too simple, better to return the distance on the view axis only
* return len_v3v3(ob->obmat[3], cam->dof_ob->obmat[3]); */
float mat[4][4], imat[4][4], obmat[4][4];
- copy_m4_m4(obmat, cameraObject->obmat);
+ copy_m4_m4(obmat, this->m_cameraObject->obmat);
normalize_m4(obmat);
invert_m4_m4(imat, obmat);
mult_m4_m4m4(mat, imat, camera->dof_ob->obmat);
@@ -60,14 +60,14 @@ float ConvertDepthToRadiusOperation::determineFocalDistance()
void ConvertDepthToRadiusOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
float focalDistance = determineFocalDistance();
if (focalDistance == 0.0f) focalDistance = 1e10f; /* if the dof is 0.0 then set it be be far away */
- inverseFocalDistance = 1.f / focalDistance;
- this->aspect = (this->getWidth() > this->getHeight()) ? (this->getHeight() / (float)this->getWidth()) : (this->getWidth() / (float)this->getHeight());
- this->aperture = 0.5f * (this->cam_lens / (this->aspect * 32.f)) / this->fStop;
+ this->m_inverseFocalDistance = 1.f / focalDistance;
+ this->m_aspect = (this->getWidth() > this->getHeight()) ? (this->getHeight() / (float)this->getWidth()) : (this->getWidth() / (float)this->getHeight());
+ this->m_aperture = 0.5f * (this->m_cam_lens / (this->m_aspect * 32.0f)) / this->m_fStop;
float minsz = MIN2(getWidth(), getHeight());
- this->dof_sp = (float)minsz / (16.f / cam_lens); // <- == aspect * MIN2(img->x, img->y) / tan(0.5f * fov);
+ this->m_dof_sp = (float)minsz / (16.f / this->m_cam_lens); // <- == aspect * MIN2(img->x, img->y) / tan(0.5f * fov);
}
void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -75,7 +75,7 @@ void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, fl
float inputValue[4];
float z;
float radius;
- inputOperation->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputValue, x, y, sampler, inputBuffers);
z = inputValue[0];
if (z != 0.f) {
float iZ = (1.f / z);
@@ -86,11 +86,11 @@ void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, fl
// scale crad back to original maximum and blend
crad->rect[px] = bcrad + wts->rect[px]*(scf*crad->rect[px] - bcrad);
#endif
- radius = 0.5f * fabsf(this->aperture * (dof_sp * (inverseFocalDistance - iZ) - 1.f));
+ radius = 0.5f * fabsf(this->m_aperture * (this->m_dof_sp * (this->m_inverseFocalDistance - iZ) - 1.f));
// 'bug' #6615, limit minimum radius to 1 pixel, not really a solution, but somewhat mitigates the problem
if (radius < 0.5f) radius = 0.5f;
- if (radius > maxRadius) {
- radius = maxRadius;
+ if (radius > this->m_maxRadius) {
+ radius = this->m_maxRadius;
}
outputValue[0] = radius;
}
@@ -99,5 +99,5 @@ void ConvertDepthToRadiusOperation::executePixel(float *outputValue, float x, fl
void ConvertDepthToRadiusOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
index c6da6bc94a9..966a74c04ad 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.h
@@ -34,15 +34,15 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
- float fStop;
- float aspect;
- float maxRadius;
- float inverseFocalDistance;
- float aperture;
- float cam_lens;
- float dof_sp;
- Object *cameraObject;
+ SocketReader *m_inputOperation;
+ float m_fStop;
+ float m_aspect;
+ float m_maxRadius;
+ float m_inverseFocalDistance;
+ float m_aperture;
+ float m_cam_lens;
+ float m_dof_sp;
+ Object *m_cameraObject;
public:
/**
* Default constructor
@@ -64,9 +64,9 @@ public:
*/
void deinitExecution();
- void setfStop(float fStop) { this->fStop = fStop; }
- void setMaxRadius(float maxRadius) { this->maxRadius = maxRadius; }
- void setCameraObject(Object *camera) { this->cameraObject = camera; }
+ void setfStop(float fStop) { this->m_fStop = fStop; }
+ void setMaxRadius(float maxRadius) { this->m_maxRadius = maxRadius; }
+ void setCameraObject(Object *camera) { this->m_cameraObject = camera; }
float determineFocalDistance();
};
#endif
diff --git a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
index e8c0061319c..5149e370208 100644
--- a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.cpp
@@ -27,24 +27,24 @@ ConvertHSVToRGBOperation::ConvertHSVToRGBOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertHSVToRGBOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertHSVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
hsv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}
void ConvertHSVToRGBOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
index 29c82361d12..f8b6a4c11fa 100644
--- a/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertHSVToRGBOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
index 842546a2755..b7db0a6a2c7 100644
--- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.cpp
@@ -27,12 +27,12 @@ ConvertKeyToPremulOperation::ConvertKeyToPremulOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputColor = NULL;
+ this->m_inputColor = NULL;
}
void ConvertKeyToPremulOperation::initExecution()
{
- this->inputColor = getInputSocketReader(0);
+ this->m_inputColor = getInputSocketReader(0);
}
void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -40,7 +40,7 @@ void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, floa
float inputValue[4];
float alpha;
- this->inputColor->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColor->read(inputValue, x, y, sampler, inputBuffers);
alpha = inputValue[3];
mul_v3_v3fl(outputValue, inputValue, alpha);
@@ -51,5 +51,5 @@ void ConvertKeyToPremulOperation::executePixel(float *outputValue, float x, floa
void ConvertKeyToPremulOperation::deinitExecution()
{
- this->inputColor = NULL;
+ this->m_inputColor = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
index fe0586f7a88..2b5e1871972 100644
--- a/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertKeyToPremulOperation.h
@@ -30,7 +30,7 @@
*/
class ConvertKeyToPremulOperation : public NodeOperation {
private:
- SocketReader *inputColor;
+ SocketReader *m_inputColor;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
index 3554be53e3f..0ba23b2ec2e 100644
--- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
@@ -27,12 +27,12 @@ ConvertPremulToKeyOperation::ConvertPremulToKeyOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputColor = NULL;
+ this->m_inputColor = NULL;
}
void ConvertPremulToKeyOperation::initExecution()
{
- this->inputColor = getInputSocketReader(0);
+ this->m_inputColor = getInputSocketReader(0);
}
void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -40,7 +40,7 @@ void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, floa
float inputValue[4];
float alpha;
- this->inputColor->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColor->read(inputValue, x, y, sampler, inputBuffers);
alpha = inputValue[3];
if (fabsf(alpha) < 1e-5f) {
@@ -56,5 +56,5 @@ void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, floa
void ConvertPremulToKeyOperation::deinitExecution()
{
- this->inputColor = NULL;
+ this->m_inputColor = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
index 093f28df3e5..05c6b26b171 100644
--- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.h
@@ -30,7 +30,7 @@
*/
class ConvertPremulToKeyOperation : public NodeOperation {
private:
- SocketReader *inputColor;
+ SocketReader *m_inputColor;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
index 051d9d2b8f9..dd5e9907642 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.cpp
@@ -27,23 +27,23 @@ ConvertRGBToHSVOperation::ConvertRGBToHSVOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertRGBToHSVOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertRGBToHSVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
rgb_to_hsv(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}
void ConvertRGBToHSVOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
index 61270539e70..af8a7f78a61 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertRGBToHSVOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
index d984a1ab943..e4322ae728f 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
@@ -26,12 +26,12 @@ ConvertRGBToYCCOperation::ConvertRGBToYCCOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertRGBToYCCOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertRGBToYCCOperation::setMode(int mode)
@@ -39,14 +39,14 @@ void ConvertRGBToYCCOperation::setMode(int mode)
switch (mode)
{
case 1:
- this->mode = BLI_YCC_ITU_BT709;
+ this->m_mode = BLI_YCC_ITU_BT709;
break;
case 2:
- this->mode = BLI_YCC_JFIF_0_255;
+ this->m_mode = BLI_YCC_JFIF_0_255;
break;
case 0:
default:
- this->mode = BLI_YCC_ITU_BT601;
+ this->m_mode = BLI_YCC_ITU_BT601;
break;
}
}
@@ -56,8 +56,8 @@ void ConvertRGBToYCCOperation::executePixel(float *outputValue, float x, float y
float inputColor[4];
float color[3];
- inputOperation->read(inputColor, x, y, sampler, inputBuffers);
- rgb_to_ycc(inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->mode);
+ this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
+ rgb_to_ycc(inputColor[0], inputColor[1], inputColor[2], &color[0], &color[1], &color[2], this->m_mode);
/* divided by 255 to normalize for viewing in */
/* R,G,B --> Y,Cb,Cr */
@@ -67,5 +67,5 @@ void ConvertRGBToYCCOperation::executePixel(float *outputValue, float x, float y
void ConvertRGBToYCCOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
index 33075cda509..97fbdb29874 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.h
@@ -33,12 +33,12 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
/**
* YCbCr mode (Jpeg, ITU601, ITU709)
*/
- int mode;
+ int m_mode;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
index e5a8e7de1bb..e87a765f2eb 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.cpp
@@ -26,23 +26,23 @@ ConvertRGBToYUVOperation::ConvertRGBToYUVOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertRGBToYUVOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertRGBToYUVOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
rgb_to_yuv(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}
void ConvertRGBToYUVOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
index 4fc525456f8..89998897782 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYUVOperation.h
@@ -33,7 +33,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp b/source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp
index 9d95c51a546..a29a381938f 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp
+++ b/source/blender/compositor/operations/COM_ConvertValueToColourProg.cpp
@@ -26,17 +26,17 @@ ConvertValueToColourProg::ConvertValueToColourProg() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void ConvertValueToColourProg::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void ConvertValueToColourProg::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputValue[4];
- this->inputProgram->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
color[0] = inputValue[0];
color[1] = inputValue[0];
color[2] = inputValue[0];
@@ -45,5 +45,5 @@ void ConvertValueToColourProg::executePixel(float *color, float x, float y, Pixe
void ConvertValueToColourProg::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertValueToColourProg.h b/source/blender/compositor/operations/COM_ConvertValueToColourProg.h
index ff1d1aaeae7..69ce7e9afea 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToColourProg.h
+++ b/source/blender/compositor/operations/COM_ConvertValueToColourProg.h
@@ -30,7 +30,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
public:
ConvertValueToColourProg();
diff --git a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
index 5ba3f6ef4a9..37760fe26d7 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.cpp
@@ -26,18 +26,18 @@ ConvertValueToVectorOperation::ConvertValueToVectorOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VECTOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertValueToVectorOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertValueToVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float input[4];
- inputOperation->read(input, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(input, x, y, sampler, inputBuffers);
outputValue[0] = input[0];
outputValue[1] = input[0];
outputValue[2] = input[0];
@@ -46,5 +46,5 @@ void ConvertValueToVectorOperation::executePixel(float *outputValue, float x, fl
void ConvertValueToVectorOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
index fbb294d6a26..781b31f7fce 100644
--- a/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertValueToVectorOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
index f6a2072932c..395b96e8b25 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.cpp
@@ -26,21 +26,21 @@ ConvertVectorToColorOperation::ConvertVectorToColorOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertVectorToColorOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertVectorToColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- inputOperation->read(outputValue, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(outputValue, x, y, sampler, inputBuffers);
outputValue[3] = 1.0f;
}
void ConvertVectorToColorOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
index c26adc5a6b1..2f1173ba4e8 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertVectorToColorOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
index ef2d45eea03..68842c5a055 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.cpp
@@ -26,22 +26,22 @@ ConvertVectorToValueOperation::ConvertVectorToValueOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VALUE);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertVectorToValueOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertVectorToValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float input[4];
- inputOperation->read(input, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(input, x, y, sampler, inputBuffers);
outputValue[0] = (input[0] + input[1] + input[2]) / 3.0f;
}
void ConvertVectorToValueOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
index dd29d1bb9a9..8770992c69c 100644
--- a/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertVectorToValueOperation.h
@@ -34,7 +34,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
index 373de25a276..11f4dd5a2d6 100644
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
@@ -26,12 +26,12 @@ ConvertYCCToRGBOperation::ConvertYCCToRGBOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertYCCToRGBOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertYCCToRGBOperation::setMode(int mode)
@@ -39,14 +39,14 @@ void ConvertYCCToRGBOperation::setMode(int mode)
switch (mode)
{
case 1:
- this->mode = BLI_YCC_ITU_BT709;
+ this->m_mode = BLI_YCC_ITU_BT709;
break;
case 2:
- this->mode = BLI_YCC_JFIF_0_255;
+ this->m_mode = BLI_YCC_JFIF_0_255;
break;
case 0:
default:
- this->mode = BLI_YCC_ITU_BT601;
+ this->m_mode = BLI_YCC_ITU_BT601;
break;
}
}
@@ -54,18 +54,18 @@ void ConvertYCCToRGBOperation::setMode(int mode)
void ConvertYCCToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
/* need to un-normalize the data */
/* 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->mode);
+ ycc_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2], this->m_mode);
outputValue[3] = inputColor[3];
}
void ConvertYCCToRGBOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
index d7ddd910ed7..a595fc19bc7 100644
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.h
@@ -33,12 +33,12 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
/**
* YCbCr mode (Jpeg, ITU601, ITU709)
*/
- int mode;
+ int m_mode;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
index a77806d16d0..b4393c53b92 100644
--- a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.cpp
@@ -26,24 +26,24 @@ ConvertYUVToRGBOperation::ConvertYUVToRGBOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ConvertYUVToRGBOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void ConvertYUVToRGBOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- inputOperation->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(inputColor, x, y, sampler, inputBuffers);
yuv_to_rgb(inputColor[0], inputColor[1], inputColor[2], &outputValue[0], &outputValue[1], &outputValue[2]);
outputValue[3] = inputColor[3];
}
void ConvertYUVToRGBOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
index f77954606cf..e89f1500d69 100644
--- a/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
+++ b/source/blender/compositor/operations/COM_ConvertYUVToRGBOperation.h
@@ -33,7 +33,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
/**
* Default constructor
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
index 5ac8c2254dc..cf3ffe6d8f4 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
@@ -46,7 +46,7 @@ void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, Me
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
float mval = 1.0f - value[0];
res1[0] = 0.0f;
@@ -58,41 +58,41 @@ void ConvolutionEdgeFilterOperation::executePixel(float *color, int x, int y, Me
res2[2] = 0.0f;
res2[3] = 0.0f;
- this->inputOperation->read(in1, x1, y1, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[0]);
- madd_v3_v3fl(res2, in1, this->filter[0]);
+ this->m_inputOperation->read(in1, x1, y1, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[0]);
+ madd_v3_v3fl(res2, in1, this->m_filter[0]);
- this->inputOperation->read(in1, x2, y1, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[1]);
- madd_v3_v3fl(res2, in1, this->filter[3]);
+ this->m_inputOperation->read(in1, x2, y1, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[1]);
+ madd_v3_v3fl(res2, in1, this->m_filter[3]);
- this->inputOperation->read(in1, x3, y1, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[2]);
- madd_v3_v3fl(res2, in1, this->filter[6]);
+ this->m_inputOperation->read(in1, x3, y1, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[2]);
+ madd_v3_v3fl(res2, in1, this->m_filter[6]);
- this->inputOperation->read(in1, x1, y2, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[3]);
- madd_v3_v3fl(res2, in1, this->filter[1]);
+ this->m_inputOperation->read(in1, x1, y2, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[3]);
+ madd_v3_v3fl(res2, in1, this->m_filter[1]);
- this->inputOperation->read(in2, x2, y2, inputBuffers, NULL);
- madd_v3_v3fl(res1, in2, this->filter[4]);
- madd_v3_v3fl(res2, in2, this->filter[4]);
+ this->m_inputOperation->read(in2, x2, y2, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in2, this->m_filter[4]);
+ madd_v3_v3fl(res2, in2, this->m_filter[4]);
- this->inputOperation->read(in1, x3, y2, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[5]);
- madd_v3_v3fl(res2, in1, this->filter[7]);
+ this->m_inputOperation->read(in1, x3, y2, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[5]);
+ madd_v3_v3fl(res2, in1, this->m_filter[7]);
- this->inputOperation->read(in1, x1, y3, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[6]);
- madd_v3_v3fl(res2, in1, this->filter[2]);
+ this->m_inputOperation->read(in1, x1, y3, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[6]);
+ madd_v3_v3fl(res2, in1, this->m_filter[2]);
- this->inputOperation->read(in1, x2, y3, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[7]);
- madd_v3_v3fl(res2, in1, this->filter[5]);
+ this->m_inputOperation->read(in1, x2, y3, inputBuffers, NULL);
+ madd_v3_v3fl(res1, in1, this->m_filter[7]);
+ madd_v3_v3fl(res2, in1, this->m_filter[5]);
- this->inputOperation->read(in1, x3, y3, inputBuffers, NULL);
- madd_v3_v3fl(res1, in1, this->filter[8]);
- madd_v3_v3fl(res2, in1, this->filter[8]);
+ this->m_inputOperation->read(in1, x3, y3, inputBuffers, NULL);
+ 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]);
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
index b4f2714360e..3840e775fe3 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -30,39 +30,39 @@ ConvolutionFilterOperation::ConvolutionFilterOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->filter = NULL;
+ this->m_inputOperation = NULL;
+ this->m_filter = NULL;
this->setComplex(true);
}
void ConvolutionFilterOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- this->inputValueOperation = this->getInputSocketReader(1);
+ this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_inputValueOperation = this->getInputSocketReader(1);
}
void ConvolutionFilterOperation::set3x3Filter(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9)
{
- this->filter = new float[9];
- this->filter[0] = f1;
- this->filter[1] = f2;
- this->filter[2] = f3;
- this->filter[3] = f4;
- this->filter[4] = f5;
- this->filter[5] = f6;
- this->filter[6] = f7;
- this->filter[7] = f8;
- this->filter[8] = f9;
- this->filterHeight = 3;
- this->filterWidth = 3;
+ this->m_filter = new float[9];
+ this->m_filter[0] = f1;
+ this->m_filter[1] = f2;
+ this->m_filter[2] = f3;
+ this->m_filter[3] = f4;
+ this->m_filter[4] = f5;
+ this->m_filter[5] = f6;
+ this->m_filter[6] = f7;
+ this->m_filter[7] = f8;
+ this->m_filter[8] = f9;
+ this->m_filterHeight = 3;
+ this->m_filterWidth = 3;
}
void ConvolutionFilterOperation::deinitExecution()
{
- this->inputOperation = NULL;
- this->inputValueOperation = NULL;
- if (this->filter) {
- delete[] this->filter;
- this->filter = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputValueOperation = NULL;
+ if (this->m_filter) {
+ delete[] this->m_filter;
+ this->m_filter = NULL;
}
}
@@ -84,28 +84,28 @@ void ConvolutionFilterOperation::executePixel(float *color, int x, int y, Memory
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, inputBuffers, NULL);
const float mval = 1.0f - value[0];
zero_v4(color);
- this->inputOperation->read(in1, x1, y1, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[0]);
- this->inputOperation->read(in1, x2, y1, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[1]);
- this->inputOperation->read(in1, x3, y1, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[2]);
- this->inputOperation->read(in1, x1, y2, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[3]);
- this->inputOperation->read(in2, x2, y2, inputBuffers, NULL);
- madd_v4_v4fl(color, in2, this->filter[4]);
- this->inputOperation->read(in1, x3, y2, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[5]);
- this->inputOperation->read(in1, x1, y3, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[6]);
- this->inputOperation->read(in1, x2, y3, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[7]);
- this->inputOperation->read(in1, x3, y3, inputBuffers, NULL);
- madd_v4_v4fl(color, in1, this->filter[8]);
+ this->m_inputOperation->read(in1, x1, y1, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[0]);
+ this->m_inputOperation->read(in1, x2, y1, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[1]);
+ this->m_inputOperation->read(in1, x3, y1, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[2]);
+ this->m_inputOperation->read(in1, x1, y2, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[3]);
+ this->m_inputOperation->read(in2, x2, y2, inputBuffers, NULL);
+ madd_v4_v4fl(color, in2, this->m_filter[4]);
+ this->m_inputOperation->read(in1, x3, y2, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[5]);
+ this->m_inputOperation->read(in1, x1, y3, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[6]);
+ this->m_inputOperation->read(in1, x2, y3, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[7]);
+ this->m_inputOperation->read(in1, x3, y3, inputBuffers, NULL);
+ madd_v4_v4fl(color, in1, this->m_filter[8]);
color[0] = color[0] * value[0] + in2[0] * mval;
color[1] = color[1] * value[0] + in2[1] * mval;
@@ -116,8 +116,8 @@ void ConvolutionFilterOperation::executePixel(float *color, int x, int y, Memory
bool ConvolutionFilterOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- int addx = (this->filterWidth - 1) / 2 + 1;
- int addy = (this->filterHeight - 1) / 2 + 1;
+ int addx = (this->m_filterWidth - 1) / 2 + 1;
+ int addy = (this->m_filterHeight - 1) / 2 + 1;
newInput.xmax = input->xmax + addx;
newInput.xmin = input->xmin - addx;
newInput.ymax = input->ymax + addy;
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
index f3347eb583a..0b5dfb4d75a 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.h
@@ -27,13 +27,13 @@
class ConvolutionFilterOperation : public NodeOperation {
private:
- int filterWidth;
- int filterHeight;
+ int m_filterWidth;
+ int m_filterHeight;
protected:
- SocketReader *inputOperation;
- SocketReader *inputValueOperation;
- float *filter;
+ SocketReader *m_inputOperation;
+ SocketReader *m_inputValueOperation;
+ float *m_filter;
public:
ConvolutionFilterOperation();
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp
index 0bdd2cfcb51..0a40f2370c8 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -27,8 +27,8 @@ CropBaseOperation::CropBaseOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputOperation = NULL;
- this->settings = NULL;
+ this->m_inputOperation = NULL;
+ this->m_settings = NULL;
}
void CropBaseOperation::updateArea()
@@ -36,36 +36,36 @@ void CropBaseOperation::updateArea()
SocketReader *inputReference = this->getInputSocketReader(0);
float width = inputReference->getWidth();
float height = inputReference->getHeight();
- if (this->relative) {
- settings->x1 = width * settings->fac_x1;
- settings->x2 = width * settings->fac_x2;
- settings->y1 = height * settings->fac_y1;
- settings->y2 = height * settings->fac_y2;
+ if (this->m_relative) {
+ this->m_settings->x1 = width * this->m_settings->fac_x1;
+ this->m_settings->x2 = width * this->m_settings->fac_x2;
+ this->m_settings->y1 = height * this->m_settings->fac_y1;
+ this->m_settings->y2 = height * this->m_settings->fac_y2;
}
- if (width <= settings->x1 + 1)
- settings->x1 = width - 1;
- if (height <= settings->y1 + 1)
- settings->y1 = height - 1;
- if (width <= settings->x2 + 1)
- settings->x2 = width - 1;
- if (height <= settings->y2 + 1)
- settings->y2 = height - 1;
+ if (width <= this->m_settings->x1 + 1)
+ this->m_settings->x1 = width - 1;
+ if (height <= this->m_settings->y1 + 1)
+ this->m_settings->y1 = height - 1;
+ if (width <= this->m_settings->x2 + 1)
+ this->m_settings->x2 = width - 1;
+ if (height <= this->m_settings->y2 + 1)
+ this->m_settings->y2 = height - 1;
- this->xmax = MAX2(settings->x1, settings->x2) + 1;
- this->xmin = MIN2(settings->x1, settings->x2);
- this->ymax = MAX2(settings->y1, settings->y2) + 1;
- this->ymin = MIN2(settings->y1, settings->y2);
+ this->m_xmax = MAX2(this->m_settings->x1, this->m_settings->x2) + 1;
+ this->m_xmin = MIN2(this->m_settings->x1, this->m_settings->x2);
+ this->m_ymax = MAX2(this->m_settings->y1, this->m_settings->y2) + 1;
+ this->m_ymin = MIN2(this->m_settings->y1, this->m_settings->y2);
}
void CropBaseOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
updateArea();
}
void CropBaseOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
CropOperation::CropOperation() : CropBaseOperation()
@@ -75,14 +75,11 @@ CropOperation::CropOperation() : CropBaseOperation()
void CropOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if ((x < this->xmax && x >= xmin) && (y < ymax && y >= ymin)) {
- inputOperation->read(color, x, y, sampler, inputBuffers);
+ 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, inputBuffers);
}
else {
- color[0] = 0.0f;
- color[1] = 0.0f;
- color[2] = 0.0f;
- color[3] = 0.0f;
+ zero_v4(color);
}
}
@@ -95,10 +92,10 @@ bool CropImageOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
{
rcti newInput;
- newInput.xmax = input->xmax + this->xmin;
- newInput.xmin = input->xmin + this->xmin;
- newInput.ymax = input->ymax + this->ymin;
- newInput.ymin = input->ymin + this->ymin;
+ newInput.xmax = input->xmax + this->m_xmin;
+ newInput.xmin = input->xmin + this->m_xmin;
+ newInput.ymax = input->ymax + this->m_ymin;
+ newInput.ymin = input->ymin + this->m_ymin;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -107,11 +104,11 @@ void CropImageOperation::determineResolution(unsigned int resolution[], unsigned
{
NodeOperation::determineResolution(resolution, preferedResolution);
updateArea();
- resolution[0] = this->xmax - this->xmin;
- resolution[1] = this->ymax - this->ymin;
+ resolution[0] = this->m_xmax - this->m_xmin;
+ resolution[1] = this->m_ymax - this->m_ymin;
}
void CropImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- this->inputOperation->read(color, (x + this->xmin), (y + this->ymin), sampler, inputBuffers);
+ this->m_inputOperation->read(color, (x + this->m_xmin), (y + this->m_ymin), sampler, inputBuffers);
}
diff --git a/source/blender/compositor/operations/COM_CropOperation.h b/source/blender/compositor/operations/COM_CropOperation.h
index 48e5ab7f75b..39dbb8aa873 100644
--- a/source/blender/compositor/operations/COM_CropOperation.h
+++ b/source/blender/compositor/operations/COM_CropOperation.h
@@ -27,21 +27,21 @@
class CropBaseOperation : public NodeOperation {
protected:
- SocketReader *inputOperation;
- NodeTwoXYs *settings;
- bool relative;
- int xmax;
- int xmin;
- int ymax;
- int ymin;
+ SocketReader *m_inputOperation;
+ NodeTwoXYs *m_settings;
+ bool m_relative;
+ int m_xmax;
+ int m_xmin;
+ int m_ymax;
+ int m_ymin;
void updateArea();
public:
CropBaseOperation();
void initExecution();
void deinitExecution();
- void setCropSettings(NodeTwoXYs *settings) { this->settings = settings; }
- void setRelative(bool rel) { this->relative = rel; }
+ void setCropSettings(NodeTwoXYs *settings) { this->m_settings = settings; }
+ void setRelative(bool rel) { this->m_relative = rel; }
};
class CropOperation : public CropBaseOperation {
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
index 6aa8bc2a0df..48d2bcd0ef9 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
@@ -32,9 +32,9 @@ extern "C" {
CurveBaseOperation::CurveBaseOperation() : NodeOperation()
{
- this->curveMapping = NULL;
+ this->m_curveMapping = NULL;
}
void CurveBaseOperation::initExecution()
{
- curvemapping_initialize(this->curveMapping);
+ curvemapping_initialize(this->m_curveMapping);
}
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.h b/source/blender/compositor/operations/COM_CurveBaseOperation.h
index 9cddb3be46b..1636c13a571 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.h
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.h
@@ -30,7 +30,7 @@ protected:
/**
* Cached reference to the inputProgram
*/
- CurveMapping *curveMapping;
+ CurveMapping *m_curveMapping;
public:
CurveBaseOperation();
@@ -39,6 +39,6 @@ public:
*/
void initExecution();
- void setCurveMapping(CurveMapping *mapping) { this->curveMapping = mapping; }
+ void setCurveMapping(CurveMapping *mapping) { this->m_curveMapping = mapping; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index c27e699f627..75f909e2198 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -29,19 +29,19 @@ DifferenceMatteOperation::DifferenceMatteOperation() : NodeOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- inputImage1Program = NULL;
- inputImage2Program = NULL;
+ this->m_inputImage1Program = NULL;
+ this->m_inputImage2Program = NULL;
}
void DifferenceMatteOperation::initExecution()
{
- this->inputImage1Program = this->getInputSocketReader(0);
- this->inputImage2Program = this->getInputSocketReader(1);
+ this->m_inputImage1Program = this->getInputSocketReader(0);
+ this->m_inputImage2Program = this->getInputSocketReader(1);
}
void DifferenceMatteOperation::deinitExecution()
{
- this->inputImage1Program = NULL;
- this->inputImage2Program = NULL;
+ this->m_inputImage1Program = NULL;
+ this->m_inputImage2Program = NULL;
}
void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -49,13 +49,13 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
float inColor1[4];
float inColor2[4];
- const float tolerence = this->settings->t1;
- const float falloff = this->settings->t2;
+ const float tolerence = this->m_settings->t1;
+ const float falloff = this->m_settings->t2;
float difference;
float alpha;
- this->inputImage1Program->read(inColor1, x, y, sampler, inputBuffers);
- this->inputImage2Program->read(inColor2, x, y, sampler, inputBuffers);
+ this->m_inputImage1Program->read(inColor1, x, y, sampler, inputBuffers);
+ this->m_inputImage2Program->read(inColor2, x, y, sampler, inputBuffers);
difference = (fabsf(inColor2[0] - inColor1[0]) +
fabsf(inColor2[1] - inColor1[1]) +
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
index 3bdc3384556..48eb2626f02 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
@@ -31,9 +31,9 @@
*/
class DifferenceMatteOperation : public NodeOperation {
private:
- NodeChroma *settings;
- SocketReader *inputImage1Program;
- SocketReader *inputImage2Program;
+ NodeChroma *m_settings;
+ SocketReader *m_inputImage1Program;
+ SocketReader *m_inputImage2Program;
public:
/**
* Default constructor
@@ -48,6 +48,6 @@ public:
void initExecution();
void deinitExecution();
- void setSettings(NodeChroma *nodeChroma) { this->settings = nodeChroma; }
+ void setSettings(NodeChroma *nodeChroma) { this->m_settings = nodeChroma; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 80d1c6444eb..338a3a0b59b 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -30,57 +30,57 @@ DilateErodeThresholdOperation::DilateErodeThresholdOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->inputProgram = NULL;
- this->inset = 0.0f;
- this->_switch = 0.5f;
- this->distance = 0.0f;
+ this->m_inputProgram = NULL;
+ this->m_inset = 0.0f;
+ this->m__switch = 0.5f;
+ this->m_distance = 0.0f;
}
void DilateErodeThresholdOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
- if (this->distance < 0.0f) {
- this->scope = -this->distance + this->inset;
+ this->m_inputProgram = this->getInputSocketReader(0);
+ if (this->m_distance < 0.0f) {
+ this->m_scope = -this->m_distance + this->m_inset;
}
else {
- if (this->inset * 2 > this->distance) {
- this->scope = max(this->inset * 2 - this->distance, this->distance);
+ if (this->m_inset * 2 > this->m_distance) {
+ this->m_scope = max(this->m_inset * 2 - this->m_distance, this->m_distance);
}
else {
- this->scope = distance;
+ this->m_scope = this->m_distance;
}
}
- if (scope < 3) {
- scope = 3;
+ if (this->m_scope < 3) {
+ this->m_scope = 3;
}
}
void *DilateErodeThresholdOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- void *buffer = inputProgram->initializeTileData(NULL, memoryBuffers);
+ void *buffer = this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
return buffer;
}
void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
float inputValue[4];
- const float sw = this->_switch;
- const float distance = this->distance;
+ const float sw = this->m__switch;
+ const float distance = this->m_distance;
float pixelvalue;
- const float rd = scope * scope;
- const float inset = this->inset;
+ const float rd = this->m_scope * this->m_scope;
+ const float inset = this->m_inset;
float mindist = rd * 2;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
rcti *rect = inputBuffer->getRect();
- const int minx = max(x - scope, rect->xmin);
- const int miny = max(y - scope, rect->ymin);
- const int maxx = min(x + scope, rect->xmax);
- const int maxy = min(y + scope, rect->ymax);
+ const int minx = max(x - this->m_scope, rect->xmin);
+ const int miny = max(y - this->m_scope, rect->ymin);
+ const int maxx = min(x + this->m_scope, rect->xmax);
+ const int maxy = min(y + this->m_scope, rect->ymax);
const int bufferWidth = rect->xmax - rect->xmin;
int offset;
- this->inputProgram->read(inputValue, x, y, inputBuffers, NULL);
+ this->m_inputProgram->read(inputValue, x, y, inputBuffers, NULL);
if (inputValue[0] > sw) {
for (int yi = miny; yi < maxy; yi++) {
const float dy = yi - y;
@@ -145,17 +145,17 @@ void DilateErodeThresholdOperation::executePixel(float *color, int x, int y, Mem
void DilateErodeThresholdOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
bool DilateErodeThresholdOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- newInput.xmax = input->xmax + scope;
- newInput.xmin = input->xmin - scope;
- newInput.ymax = input->ymax + scope;
- newInput.ymin = input->ymin - scope;
+ newInput.xmax = input->xmax + this->m_scope;
+ newInput.xmin = input->xmin - this->m_scope;
+ newInput.ymax = input->ymax + this->m_scope;
+ newInput.ymin = input->ymin - this->m_scope;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -166,37 +166,37 @@ DilateDistanceOperation::DilateDistanceOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->inputProgram = NULL;
- this->distance = 0.0f;
+ this->m_inputProgram = NULL;
+ this->m_distance = 0.0f;
this->setOpenCL(true);
}
void DilateDistanceOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
- this->scope = distance;
- if (scope < 3) {
- scope = 3;
+ this->m_inputProgram = this->getInputSocketReader(0);
+ this->m_scope = this->m_distance;
+ if (this->m_scope < 3) {
+ this->m_scope = 3;
}
}
void *DilateDistanceOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- void *buffer = inputProgram->initializeTileData(NULL, memoryBuffers);
+ void *buffer = this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
return buffer;
}
void DilateDistanceOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- const float distance = this->distance;
+ const float distance = this->m_distance;
const float mindist = distance * distance;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
rcti *rect = inputBuffer->getRect();
- const int minx = max(x - scope, rect->xmin);
- const int miny = max(y - scope, rect->ymin);
- const int maxx = min(x + scope, rect->xmax);
- const int maxy = min(y + scope, rect->ymax);
+ const int minx = max(x - this->m_scope, rect->xmin);
+ const int miny = max(y - this->m_scope, rect->ymin);
+ const int maxx = min(x + this->m_scope, rect->xmax);
+ const int maxy = min(y + this->m_scope, rect->ymax);
const int bufferWidth = rect->xmax - rect->xmin;
int offset;
@@ -219,17 +219,17 @@ void DilateDistanceOperation::executePixel(float *color, int x, int y, MemoryBuf
void DilateDistanceOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
bool DilateDistanceOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- newInput.xmax = input->xmax + scope;
- newInput.xmin = input->xmin - scope;
- newInput.ymax = input->ymax + scope;
- newInput.ymin = input->ymin - scope;
+ newInput.xmax = input->xmax + this->m_scope;
+ newInput.xmin = input->xmin - this->m_scope;
+ newInput.ymax = input->ymax + this->m_scope;
+ newInput.ymin = input->ymin - this->m_scope;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -243,10 +243,10 @@ void DilateDistanceOperation::executeOpenCL(OpenCLDevice* device,
if (!dilateKernel) {
dilateKernel = device->COM_clCreateKernel("dilateKernel", NULL);
}
- cl_int distanceSquared = this->distance * this->distance;
- cl_int scope = this->scope;
+ cl_int distanceSquared = this->m_distance * this->m_distance;
+ cl_int scope = this->m_scope;
- device->COM_clAttachMemoryBufferToKernelParameter(dilateKernel, 0, 2, clMemToCleanUp, inputMemoryBuffers, this->inputProgram);
+ device->COM_clAttachMemoryBufferToKernelParameter(dilateKernel, 0, 2, clMemToCleanUp, inputMemoryBuffers, this->m_inputProgram);
device->COM_clAttachOutputMemoryBufferToKernelParameter(dilateKernel, 1, clOutputBuffer);
device->COM_clAttachMemoryBufferOffsetToKernelParameter(dilateKernel, 3, outputMemoryBuffer);
clSetKernelArg(dilateKernel, 4, sizeof(cl_int), &scope);
@@ -263,16 +263,16 @@ ErodeDistanceOperation::ErodeDistanceOperation() : DilateDistanceOperation()
void ErodeDistanceOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- const float distance = this->distance;
+ const float distance = this->m_distance;
const float mindist = distance * distance;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
rcti *rect = inputBuffer->getRect();
- const int minx = max(x - scope, rect->xmin);
- const int miny = max(y - scope, rect->ymin);
- const int maxx = min(x + scope, rect->xmax);
- const int maxy = min(y + scope, rect->ymax);
+ const int minx = max(x - this->m_scope, rect->xmin);
+ const int miny = max(y - this->m_scope, rect->ymin);
+ const int maxx = min(x + this->m_scope, rect->xmax);
+ const int maxy = min(y + this->m_scope, rect->ymax);
const int bufferWidth = rect->xmax - rect->xmin;
int offset;
@@ -302,10 +302,10 @@ void ErodeDistanceOperation::executeOpenCL(OpenCLDevice* device,
if (!erodeKernel) {
erodeKernel = device->COM_clCreateKernel("erodeKernel", NULL);
}
- cl_int distanceSquared = this->distance * this->distance;
- cl_int scope = this->scope;
+ cl_int distanceSquared = this->m_distance * this->m_distance;
+ cl_int scope = this->m_scope;
- device->COM_clAttachMemoryBufferToKernelParameter(erodeKernel, 0, 2, clMemToCleanUp, inputMemoryBuffers, this->inputProgram);
+ device->COM_clAttachMemoryBufferToKernelParameter(erodeKernel, 0, 2, clMemToCleanUp, inputMemoryBuffers, this->m_inputProgram);
device->COM_clAttachOutputMemoryBufferToKernelParameter(erodeKernel, 1, clOutputBuffer);
device->COM_clAttachMemoryBufferOffsetToKernelParameter(erodeKernel, 3, outputMemoryBuffer);
clSetKernelArg(erodeKernel, 4, sizeof(cl_int), &scope);
@@ -320,29 +320,29 @@ DilateStepOperation::DilateStepOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void DilateStepOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
- this->cached_buffer = NULL;
+ this->m_inputProgram = this->getInputSocketReader(0);
+ this->m_cached_buffer = NULL;
this->initMutex();
}
void *DilateStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->cached_buffer != NULL) {
- return this->cached_buffer;
+ if (this->m_cached_buffer != NULL) {
+ return this->m_cached_buffer;
}
lockMutex();
- if (this->cached_buffer == NULL) {
- MemoryBuffer *buffer = (MemoryBuffer *)inputProgram->initializeTileData(NULL, memoryBuffers);
+ if (this->m_cached_buffer == NULL) {
+ MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
float *rectf = buffer->convertToValueBuffer();
int x, y, i;
float *p;
int bwidth = buffer->getWidth();
int bheight = buffer->getHeight();
- for (i = 0; i < this->iterations; i++) {
+ for (i = 0; i < this->m_iterations; i++) {
for (y = 0; y < bheight; y++) {
for (x = 0; x < bwidth - 1; x++) {
p = rectf + (bwidth * y + x);
@@ -371,31 +371,31 @@ void *DilateStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryB
}
}
}
- this->cached_buffer = rectf;
+ this->m_cached_buffer = rectf;
}
unlockMutex();
- return this->cached_buffer;
+ return this->m_cached_buffer;
}
void DilateStepOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- color[0] = this->cached_buffer[y * this->getWidth() + x];
+ color[0] = this->m_cached_buffer[y * this->getWidth() + x];
}
void DilateStepOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
this->deinitMutex();
- if (this->cached_buffer) {
- delete cached_buffer;
- this->cached_buffer = NULL;
+ if (this->m_cached_buffer) {
+ delete this->m_cached_buffer;
+ this->m_cached_buffer = NULL;
}
}
bool DilateStepOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
- if (this->cached_buffer) {
+ if (this->m_cached_buffer) {
return false;
}
else {
@@ -418,18 +418,18 @@ ErodeStepOperation::ErodeStepOperation() : DilateStepOperation()
void *ErodeStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->cached_buffer != NULL) {
- return this->cached_buffer;
+ if (this->m_cached_buffer != NULL) {
+ return this->m_cached_buffer;
}
lockMutex();
- if (this->cached_buffer == NULL) {
- MemoryBuffer *buffer = (MemoryBuffer *)inputProgram->initializeTileData(NULL, memoryBuffers);
+ if (this->m_cached_buffer == NULL) {
+ MemoryBuffer *buffer = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
float *rectf = buffer->convertToValueBuffer();
int x, y, i;
float *p;
int bwidth = buffer->getWidth();
int bheight = buffer->getHeight();
- for (i = 0; i < this->iterations; i++) {
+ for (i = 0; i < this->m_iterations; i++) {
for (y = 0; y < bheight; y++) {
for (x = 0; x < bwidth - 1; x++) {
p = rectf + (bwidth * y + x);
@@ -458,8 +458,8 @@ void *ErodeStepOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBu
}
}
}
- this->cached_buffer = rectf;
+ this->m_cached_buffer = rectf;
}
unlockMutex();
- return this->cached_buffer;
+ return this->m_cached_buffer;
}
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.h b/source/blender/compositor/operations/COM_DilateErodeOperation.h
index 4d0bf9de0ec..bc6049bf992 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.h
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.h
@@ -30,17 +30,17 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
- float distance;
- float _switch;
- float inset;
+ float m_distance;
+ float m__switch;
+ float m_inset;
/**
* determines the area of interest to track pixels
* keep this one as small as possible for speed gain.
*/
- int scope;
+ int m_scope;
public:
DilateErodeThresholdOperation();
@@ -60,9 +60,9 @@ public:
*/
void deinitExecution();
- void setDistance(float distance) { this->distance = distance; }
- void setSwitch(float sw) { this->_switch = sw; }
- void setInset(float inset) { this->inset = inset; }
+ void setDistance(float distance) { this->m_distance = distance; }
+ void setSwitch(float sw) { this->m__switch = sw; }
+ void setInset(float inset) { this->m_inset = inset; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
@@ -74,9 +74,9 @@ protected:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
- float distance;
- int scope;
+ SocketReader *m_inputProgram;
+ float m_distance;
+ int m_scope;
public:
DilateDistanceOperation();
@@ -96,7 +96,7 @@ public:
*/
void deinitExecution();
- void setDistance(float distance) { this->distance = distance; }
+ void setDistance(float distance) { this->m_distance = distance; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void executeOpenCL(OpenCLDevice* device,
@@ -124,11 +124,11 @@ protected:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
- int iterations;
+ int m_iterations;
- float *cached_buffer;
+ float *m_cached_buffer;
public:
DilateStepOperation();
@@ -148,7 +148,7 @@ public:
*/
void deinitExecution();
- void setIterations(int iterations) { this->iterations = iterations; }
+ void setIterations(int iterations) { this->m_iterations = iterations; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
};
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index 271a165f0ff..da7336afc07 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -33,20 +33,20 @@ DirectionalBlurOperation::DirectionalBlurOperation() : NodeOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void DirectionalBlurOperation::initExecution()
{
- this->inputProgram = getInputSocketReader(0);
+ this->m_inputProgram = getInputSocketReader(0);
QualityStepHelper::initExecution(COM_QH_INCREASE);
- const float angle = this->data->angle;
- const float zoom = this->data->zoom;
- const float spin = this->data->spin;
- const float iterations = this->data->iter;
- const float distance = this->data->distance;
- const float center_x = this->data->center_x;
- const float center_y = this->data->center_y;
+ const float angle = this->m_data->angle;
+ const float zoom = this->m_data->zoom;
+ const float spin = this->m_data->spin;
+ const float iterations = this->m_data->iter;
+ const float distance = this->m_data->distance;
+ const float center_x = this->m_data->center_x;
+ const float center_y = this->m_data->center_y;
const float width = getWidth();
const float height = getHeight();
@@ -55,43 +55,46 @@ void DirectionalBlurOperation::initExecution()
float D;
D = distance * sqrtf(width * width + height * height);
- center_x_pix = center_x * width;
- center_y_pix = center_y * height;
+ this->m_center_x_pix = center_x * width;
+ this->m_center_y_pix = center_y * height;
- tx = itsc * D * cosf(a);
- ty = -itsc *D *sinf(a);
- sc = itsc * zoom;
- rot = itsc * spin;
+ this->m_tx = itsc * D * cosf(a);
+ this->m_ty = -itsc *D *sinf(a);
+ this->m_sc = itsc * zoom;
+ this->m_rot = itsc * spin;
}
void DirectionalBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- const int iterations = pow(2.f, this->data->iter);
+ const int iterations = pow(2.0f, this->m_data->iter);
float col[4] = {0, 0, 0, 0};
float col2[4] = {0, 0, 0, 0};
- this->inputProgram->read(col2, x, y, COM_PS_NEAREST, inputBuffers);
- float ltx = tx;
- float lty = ty;
- float lsc = sc;
- float lrot = rot;
+ this->m_inputProgram->read(col2, x, y, COM_PS_NEAREST, inputBuffers);
+ float ltx = this->m_tx;
+ float lty = this->m_ty;
+ float lsc = this->m_sc;
+ float lrot = this->m_rot;
/* blur the image */
for (int i = 0; i < iterations; ++i) {
const float cs = cos(lrot), ss = sin(lrot);
- const float isc = 1.f / (1.f + lsc);
+ const float isc = 1.0f / (1.0f + lsc);
- const float v = isc * (y - center_y_pix) + lty;
- const float u = isc * (x - center_x_pix) + ltx;
+ const float v = isc * (y - this->m_center_y_pix) + lty;
+ const float u = isc * (x - this->m_center_x_pix) + ltx;
- this->inputProgram->read(col, cs * u + ss * v + center_x_pix, cs * v - ss * u + center_y_pix, COM_PS_NEAREST, inputBuffers);
+ this->m_inputProgram->read(col,
+ cs * u + ss * v + this->m_center_x_pix,
+ cs * v - ss * u + this->m_center_y_pix,
+ COM_PS_NEAREST, inputBuffers);
add_v4_v4(col2, col);
/* double transformations */
- ltx += tx;
- lty += ty;
- lrot += rot;
- lsc += sc;
+ ltx += this->m_tx;
+ lty += this->m_ty;
+ lrot += this->m_rot;
+ lsc += this->m_sc;
}
mul_v4_v4fl(color, col2, 1.0f / iterations);
@@ -99,7 +102,7 @@ void DirectionalBlurOperation::executePixel(float *color, int x, int y, MemoryBu
void DirectionalBlurOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
bool DirectionalBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
index 9cc0a4361f1..329f855871e 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.h
@@ -27,12 +27,12 @@
class DirectionalBlurOperation : public NodeOperation, public QualityStepHelper {
private:
- SocketReader *inputProgram;
- NodeDBlurData *data;
+ SocketReader *m_inputProgram;
+ NodeDBlurData *m_data;
- float center_x_pix, center_y_pix;
- float tx, ty;
- float sc, rot;
+ float m_center_x_pix, m_center_y_pix;
+ float m_tx, m_ty;
+ float m_sc, m_rot;
public:
DirectionalBlurOperation();
@@ -54,6 +54,6 @@ public:
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void setData(NodeDBlurData *data) { this->data = data; }
+ void setData(NodeDBlurData *data) { this->m_data = data; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index be50641a125..c7df53770c5 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -32,21 +32,21 @@ DisplaceOperation::DisplaceOperation() : NodeOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputColorProgram = NULL;
- this->inputVectorProgram = NULL;
- this->inputScaleXProgram = NULL;
- this->inputScaleYProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_inputVectorProgram = NULL;
+ this->m_inputScaleXProgram = NULL;
+ this->m_inputScaleYProgram = NULL;
}
void DisplaceOperation::initExecution()
{
- this->inputColorProgram = this->getInputSocketReader(0);
- this->inputVectorProgram = this->getInputSocketReader(1);
- this->inputScaleXProgram = this->getInputSocketReader(2);
- this->inputScaleYProgram = this->getInputSocketReader(3);
+ this->m_inputColorProgram = this->getInputSocketReader(0);
+ this->m_inputVectorProgram = this->getInputSocketReader(1);
+ this->m_inputScaleXProgram = this->getInputSocketReader(2);
+ this->m_inputScaleYProgram = this->getInputSocketReader(3);
- width_x4 = this->getWidth() * 4;
- height_x4 = this->getHeight() * 4;
+ this->m_width_x4 = this->getWidth() * 4;
+ this->m_height_x4 = this->getHeight() * 4;
}
@@ -64,17 +64,17 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
float dxt, dyt;
float u, v;
- this->inputScaleXProgram->read(inScale, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputScaleXProgram->read(inScale, x, y, COM_PS_NEAREST, inputBuffers);
float xs = inScale[0];
- this->inputScaleYProgram->read(inScale, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputScaleYProgram->read(inScale, x, y, COM_PS_NEAREST, inputBuffers);
float ys = inScale[0];
/* clamp x and y displacement to triple image resolution -
* to prevent hangs from huge values mistakenly plugged in eg. z buffers */
- CLAMP(xs, -width_x4, width_x4);
- CLAMP(ys, -height_x4, height_x4);
+ CLAMP(xs, -this->m_width_x4, this->m_width_x4);
+ CLAMP(ys, -this->m_height_x4, this->m_height_x4);
- this->inputVectorProgram->read(inVector, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputVectorProgram->read(inVector, x, y, COM_PS_NEAREST, inputBuffers);
p_dx = inVector[0] * xs;
p_dy = inVector[1] * ys;
@@ -83,9 +83,9 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
v = y - p_dy + 0.5f;
/* calc derivatives */
- this->inputVectorProgram->read(inVector, x + 1, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputVectorProgram->read(inVector, x + 1, y, COM_PS_NEAREST, inputBuffers);
d_dx = inVector[0] * xs;
- this->inputVectorProgram->read(inVector, x, y + 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputVectorProgram->read(inVector, x, y + 1, COM_PS_NEAREST, inputBuffers);
d_dy = inVector[0] * ys;
/* clamp derivatives to minimum displacement distance in UV space */
@@ -96,15 +96,15 @@ void DisplaceOperation::executePixel(float *color, int x, int y, MemoryBuffer *i
dyt = signf(dyt) * maxf(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight();
/* EWA filtering */
- this->inputColorProgram->read(color, u, v, dxt, dyt, inputBuffers);
+ this->m_inputColorProgram->read(color, u, v, dxt, dyt, inputBuffers);
}
void DisplaceOperation::deinitExecution()
{
- this->inputColorProgram = NULL;
- this->inputVectorProgram = NULL;
- this->inputScaleXProgram = NULL;
- this->inputScaleYProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_inputVectorProgram = NULL;
+ this->m_inputScaleXProgram = NULL;
+ this->m_inputScaleYProgram = NULL;
}
bool DisplaceOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.h b/source/blender/compositor/operations/COM_DisplaceOperation.h
index 82788e37e3a..e01c9190396 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.h
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.h
@@ -29,13 +29,13 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputColorProgram;
- SocketReader *inputVectorProgram;
- SocketReader *inputScaleXProgram;
- SocketReader *inputScaleYProgram;
+ SocketReader *m_inputColorProgram;
+ SocketReader *m_inputVectorProgram;
+ SocketReader *m_inputScaleXProgram;
+ SocketReader *m_inputScaleYProgram;
- float width_x4;
- float height_x4;
+ float m_width_x4;
+ float m_height_x4;
public:
DisplaceOperation();
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
index 716646e9c36..d21fc62abd7 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
@@ -31,21 +31,21 @@ DisplaceSimpleOperation::DisplaceSimpleOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputColorProgram = NULL;
- this->inputVectorProgram = NULL;
- this->inputScaleXProgram = NULL;
- this->inputScaleYProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_inputVectorProgram = NULL;
+ this->m_inputScaleXProgram = NULL;
+ this->m_inputScaleYProgram = NULL;
}
void DisplaceSimpleOperation::initExecution()
{
- this->inputColorProgram = this->getInputSocketReader(0);
- this->inputVectorProgram = this->getInputSocketReader(1);
- this->inputScaleXProgram = this->getInputSocketReader(2);
- this->inputScaleYProgram = this->getInputSocketReader(3);
+ this->m_inputColorProgram = this->getInputSocketReader(0);
+ this->m_inputVectorProgram = this->getInputSocketReader(1);
+ this->m_inputScaleXProgram = this->getInputSocketReader(2);
+ this->m_inputScaleYProgram = this->getInputSocketReader(3);
- width_x4 = this->getWidth() * 4;
- height_x4 = this->getHeight() * 4;
+ this->m_width_x4 = this->getWidth() * 4;
+ this->m_height_x4 = this->getHeight() * 4;
}
@@ -61,17 +61,17 @@ void DisplaceSimpleOperation::executePixel(float *color, float x, float y, Pixel
float p_dx, p_dy; /* main displacement in pixel space */
float u, v;
- this->inputScaleXProgram->read(inScale, x, y, sampler, inputBuffers);
+ this->m_inputScaleXProgram->read(inScale, x, y, sampler, inputBuffers);
float xs = inScale[0];
- this->inputScaleYProgram->read(inScale, x, y, sampler, inputBuffers);
+ this->m_inputScaleYProgram->read(inScale, x, y, sampler, inputBuffers);
float ys = inScale[0];
/* clamp x and y displacement to triple image resolution -
* to prevent hangs from huge values mistakenly plugged in eg. z buffers */
- CLAMP(xs, -width_x4, width_x4);
- CLAMP(ys, -height_x4, height_x4);
+ CLAMP(xs, -this->m_width_x4, this->m_width_x4);
+ CLAMP(ys, -this->m_height_x4, this->m_height_x4);
- this->inputVectorProgram->read(inVector, x, y, sampler, inputBuffers);
+ this->m_inputVectorProgram->read(inVector, x, y, sampler, inputBuffers);
p_dx = inVector[0] * xs;
p_dy = inVector[1] * ys;
@@ -82,15 +82,15 @@ 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->inputColorProgram->read(color, u, v, sampler, inputBuffers);
+ this->m_inputColorProgram->read(color, u, v, sampler, inputBuffers);
}
void DisplaceSimpleOperation::deinitExecution()
{
- this->inputColorProgram = NULL;
- this->inputVectorProgram = NULL;
- this->inputScaleXProgram = NULL;
- this->inputScaleYProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_inputVectorProgram = NULL;
+ this->m_inputScaleXProgram = NULL;
+ this->m_inputScaleYProgram = NULL;
}
bool DisplaceSimpleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
index 1ebb238855b..25afbafe335 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.h
@@ -29,13 +29,13 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputColorProgram;
- SocketReader *inputVectorProgram;
- SocketReader *inputScaleXProgram;
- SocketReader *inputScaleYProgram;
+ SocketReader *m_inputColorProgram;
+ SocketReader *m_inputVectorProgram;
+ SocketReader *m_inputScaleXProgram;
+ SocketReader *m_inputScaleYProgram;
- float width_x4;
- float height_x4;
+ float m_width_x4;
+ float m_height_x4;
public:
DisplaceSimpleOperation();
diff --git a/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
index ec01ba922b5..19cca3d25bb 100644
--- a/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
@@ -28,20 +28,20 @@ DistanceMatteOperation::DistanceMatteOperation() : NodeOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- inputImageProgram = NULL;
- inputKeyProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputKeyProgram = NULL;
}
void DistanceMatteOperation::initExecution()
{
- this->inputImageProgram = this->getInputSocketReader(0);
- this->inputKeyProgram = this->getInputSocketReader(1);
+ this->m_inputImageProgram = this->getInputSocketReader(0);
+ this->m_inputKeyProgram = this->getInputSocketReader(1);
}
void DistanceMatteOperation::deinitExecution()
{
- this->inputImageProgram = NULL;
- this->inputKeyProgram = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputKeyProgram = NULL;
}
void DistanceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -49,14 +49,14 @@ void DistanceMatteOperation::executePixel(float *outputValue, float x, float y,
float inKey[4];
float inImage[4];
- const float tolerence = this->settings->t1;
- const float falloff = this->settings->t2;
+ const float tolerence = this->m_settings->t1;
+ const float falloff = this->m_settings->t2;
float distance;
float alpha;
- this->inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
- this->inputImageProgram->read(inImage, x, y, sampler, inputBuffers);
+ this->m_inputKeyProgram->read(inKey, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(inImage, x, y, sampler, inputBuffers);
distance = sqrt(pow((inKey[0] - inImage[0]), 2) +
pow((inKey[1] - inImage[1]), 2) +
diff --git a/source/blender/compositor/operations/COM_DistanceMatteOperation.h b/source/blender/compositor/operations/COM_DistanceMatteOperation.h
index cf1172a8c11..51e139d179e 100644
--- a/source/blender/compositor/operations/COM_DistanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceMatteOperation.h
@@ -30,9 +30,9 @@
*/
class DistanceMatteOperation : public NodeOperation {
private:
- NodeChroma *settings;
- SocketReader *inputImageProgram;
- SocketReader *inputKeyProgram;
+ NodeChroma *m_settings;
+ SocketReader *m_inputImageProgram;
+ SocketReader *m_inputKeyProgram;
public:
/**
* Default constructor
@@ -47,6 +47,6 @@ public:
void initExecution();
void deinitExecution();
- void setSettings(NodeChroma *nodeChroma) { this->settings = nodeChroma; }
+ void setSettings(NodeChroma *nodeChroma) { this->m_settings = nodeChroma; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp
index e225a677989..53ab5f97518 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cpp
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp
@@ -28,19 +28,19 @@ DotproductOperation::DotproductOperation() : NodeOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VALUE);
this->setResolutionInputSocketIndex(0);
- this->input1Operation = NULL;
- this->input2Operation = NULL;
+ this->m_input1Operation = NULL;
+ this->m_input2Operation = NULL;
}
void DotproductOperation::initExecution()
{
- this->input1Operation = this->getInputSocketReader(0);
- this->input2Operation = this->getInputSocketReader(1);
+ this->m_input1Operation = this->getInputSocketReader(0);
+ this->m_input2Operation = this->getInputSocketReader(1);
}
void DotproductOperation::deinitExecution()
{
- this->input1Operation = NULL;
- this->input2Operation = NULL;
+ this->m_input1Operation = NULL;
+ this->m_input2Operation = NULL;
}
/** @todo: current implementation is the inverse of a dotproduct. not 'logically' correct
@@ -49,7 +49,7 @@ void DotproductOperation::executePixel(float *color, float x, float y, PixelSamp
{
float input1[4];
float input2[4];
- this->input1Operation->read(input1, x, y, sampler, inputBuffers);
- this->input2Operation->read(input2, x, y, sampler, inputBuffers);
+ this->m_input1Operation->read(input1, x, y, sampler, inputBuffers);
+ this->m_input2Operation->read(input2, x, y, sampler, inputBuffers);
color[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 849dc83a9cd..7ca540983d9 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.h
+++ b/source/blender/compositor/operations/COM_DotproductOperation.h
@@ -27,8 +27,8 @@
class DotproductOperation : public NodeOperation {
private:
- SocketReader *input1Operation;
- SocketReader *input2Operation;
+ SocketReader *m_input1Operation;
+ SocketReader *m_input2Operation;
public:
DotproductOperation();
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index 8344a4d248b..c3c115b7c3b 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -1184,8 +1184,8 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float *imask, float *omask, float
*
* Each version has slightly different criteria for detecting an edge pixel.
*/
- if (this->adjecentOnly) { // if "adjacent only" inner edge mode is turned on
- if (this->keepInside) { // if "keep inside" buffer edge mode is turned on
+ if (this->m_adjecentOnly) { // if "adjacent only" inner edge mode is turned on
+ if (this->m_keepInside) { // if "keep inside" buffer edge mode is turned on
do_adjacentKeepBorders(t, rw, limask, lomask, lres, res, rsize);
}
else { // "bleed out" buffer edge mode is turned on
@@ -1198,7 +1198,7 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float *imask, float *omask, float
do_adjacentEdgeDetection(t, rw, limask, lomask, lres, res, rsize, isz, osz, gsz);
}
else { // "all" inner edge mode is turned on
- if (this->keepInside) { // if "keep inside" buffer edge mode is turned on
+ if (this->m_keepInside) { // if "keep inside" buffer edge mode is turned on
do_allKeepBorders(t, rw, limask, lomask, lres, res, rsize);
}
else { // "bleed out" buffer edge mode is turned on
@@ -1230,16 +1230,16 @@ DoubleEdgeMaskOperation::DoubleEdgeMaskOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputInnerMask = NULL;
- this->inputOuterMask = NULL;
- this->adjecentOnly = false;
- this->keepInside = false;
+ this->m_inputInnerMask = NULL;
+ this->m_inputOuterMask = NULL;
+ this->m_adjecentOnly = false;
+ this->m_keepInside = false;
this->setComplex(true);
}
bool DoubleEdgeMaskOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
- if (this->cachedInstance == NULL) {
+ if (this->m_cachedInstance == NULL) {
rcti newInput;
newInput.xmax = this->getWidth();
newInput.xmin = 0;
@@ -1254,30 +1254,31 @@ bool DoubleEdgeMaskOperation::determineDependingAreaOfInterest(rcti *input, Read
void DoubleEdgeMaskOperation::initExecution()
{
- this->inputInnerMask = this->getInputSocketReader(0);
- this->inputOuterMask = this->getInputSocketReader(1);
+ this->m_inputInnerMask = this->getInputSocketReader(0);
+ this->m_inputOuterMask = this->getInputSocketReader(1);
initMutex();
- this->cachedInstance = NULL;
+ this->m_cachedInstance = NULL;
}
void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->cachedInstance) return this->cachedInstance;
+ if (this->m_cachedInstance)
+ return this->m_cachedInstance;
lockMutex();
- if (this->cachedInstance == NULL) {
- MemoryBuffer *innerMask = (MemoryBuffer *)inputInnerMask->initializeTileData(rect, memoryBuffers);
- MemoryBuffer *outerMask = (MemoryBuffer *)inputOuterMask->initializeTileData(rect, memoryBuffers);
+ if (this->m_cachedInstance == NULL) {
+ MemoryBuffer *innerMask = (MemoryBuffer *)this->m_inputInnerMask->initializeTileData(rect, memoryBuffers);
+ MemoryBuffer *outerMask = (MemoryBuffer *)this->m_inputOuterMask->initializeTileData(rect, memoryBuffers);
float *data = new float[this->getWidth() * this->getHeight()];
float *imask = innerMask->convertToValueBuffer();
float *omask = outerMask->convertToValueBuffer();
doDoubleEdgeMask(imask, omask, data);
delete imask;
delete omask;
- this->cachedInstance = data;
+ this->m_cachedInstance = data;
}
unlockMutex();
- return this->cachedInstance;
+ return this->m_cachedInstance;
}
void DoubleEdgeMaskOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
@@ -1291,12 +1292,12 @@ void DoubleEdgeMaskOperation::executePixel(float *color, int x, int y, MemoryBuf
void DoubleEdgeMaskOperation::deinitExecution()
{
- this->inputInnerMask = NULL;
- this->inputOuterMask = NULL;
+ this->m_inputInnerMask = NULL;
+ this->m_inputOuterMask = NULL;
deinitMutex();
- if (this->cachedInstance) {
- delete cachedInstance;
- this->cachedInstance = NULL;
+ if (this->m_cachedInstance) {
+ delete this->m_cachedInstance;
+ this->m_cachedInstance = NULL;
}
}
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
index a18d59ae5a2..442680e320e 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
@@ -30,11 +30,11 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOuterMask;
- SocketReader *inputInnerMask;
- bool adjecentOnly;
- bool keepInside;
- float *cachedInstance;
+ SocketReader *m_inputOuterMask;
+ SocketReader *m_inputInnerMask;
+ bool m_adjecentOnly;
+ bool m_keepInside;
+ float *m_cachedInstance;
public:
DoubleEdgeMaskOperation();
@@ -58,7 +58,7 @@ public:
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void setAdjecentOnly(bool adjecentOnly) { this->adjecentOnly = adjecentOnly; }
- void setKeepInside(bool keepInside) { this->keepInside = keepInside; }
+ void setAdjecentOnly(bool adjecentOnly) { this->m_adjecentOnly = adjecentOnly; }
+ void setKeepInside(bool keepInside) { this->m_keepInside = keepInside; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index 0beacd02738..1aa1b89ee76 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -29,19 +29,19 @@ EllipseMaskOperation::EllipseMaskOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputMask = NULL;
- this->inputValue = NULL;
- this->cosine = 0.0f;
- this->sine = 0.0f;
+ this->m_inputMask = NULL;
+ this->m_inputValue = NULL;
+ this->m_cosine = 0.0f;
+ this->m_sine = 0.0f;
}
void EllipseMaskOperation::initExecution()
{
- this->inputMask = this->getInputSocketReader(0);
- this->inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD((double)this->data->rotation);
- this->cosine = cos(rad);
- this->sine = sin(rad);
- this->aspectRatio = ((float)this->getWidth()) / this->getHeight();
+ this->m_inputMask = this->getInputSocketReader(0);
+ this->m_inputValue = this->getInputSocketReader(1);
+ const double rad = DEG2RAD((double)this->m_data->rotation);
+ this->m_cosine = cos(rad);
+ this->m_sine = sin(rad);
+ this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
}
void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -52,26 +52,26 @@ void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSam
float rx = x / this->getWidth();
float ry = y / this->getHeight();
- const float dy = (ry - this->data->y) / this->aspectRatio;
- const float dx = rx - this->data->x;
- rx = this->data->x + (this->cosine * dx + this->sine * dy);
- ry = this->data->y + (-this->sine * dx + this->cosine * dy);
+ const float dy = (ry - this->m_data->y) / this->m_aspectRatio;
+ const float dx = rx - this->m_data->x;
+ rx = this->m_data->x + (this->m_cosine * dx + this->m_sine * dy);
+ ry = this->m_data->y + (-this->m_sine * dx + this->m_cosine * dy);
- this->inputMask->read(inputMask, x, y, sampler, inputBuffers);
- this->inputValue->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputMask->read(inputMask, x, y, sampler, inputBuffers);
+ this->m_inputValue->read(inputValue, x, y, sampler, inputBuffers);
- const float halfHeight = (this->data->height) / 2.0f;
- const float halfWidth = this->data->width / 2.0f;
- float sx = rx - this->data->x;
+ const float halfHeight = (this->m_data->height) / 2.0f;
+ const float halfWidth = this->m_data->width / 2.0f;
+ float sx = rx - this->m_data->x;
sx *= sx;
const float tx = halfWidth * halfWidth;
- float sy = ry - this->data->y;
+ float sy = ry - this->m_data->y;
sy *= sy;
const float ty = halfHeight * halfHeight;
bool inside = ((sx / tx) + (sy / ty)) < 1.0f;
- switch (this->maskType) {
+ switch (this->m_maskType) {
case CMP_NODE_MASKTYPE_ADD:
if (inside) {
color[0] = max(inputMask[0], inputValue[0]);
@@ -117,7 +117,7 @@ void EllipseMaskOperation::executePixel(float *color, float x, float y, PixelSam
void EllipseMaskOperation::deinitExecution()
{
- this->inputMask = NULL;
- this->inputValue = NULL;
+ this->m_inputMask = NULL;
+ this->m_inputValue = NULL;
}
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.h b/source/blender/compositor/operations/COM_EllipseMaskOperation.h
index 61d724c2f15..0b0ffa023cb 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.h
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.h
@@ -30,15 +30,15 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputMask;
- SocketReader *inputValue;
+ SocketReader *m_inputMask;
+ SocketReader *m_inputValue;
- float sine;
- float cosine;
- float aspectRatio;
- int maskType;
+ float m_sine;
+ float m_cosine;
+ float m_aspectRatio;
+ int m_maskType;
- NodeEllipseMask *data;
+ NodeEllipseMask *m_data;
public:
EllipseMaskOperation();
@@ -57,9 +57,9 @@ public:
*/
void deinitExecution();
- void setData(NodeEllipseMask *data) { this->data = data; }
+ void setData(NodeEllipseMask *data) { this->m_data = data; }
- void setMaskType(int maskType) { this->maskType = maskType; }
+ void setMaskType(int maskType) { this->m_maskType = maskType; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index 7491b0f30dd..8f0ebd9b8d2 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -28,7 +28,7 @@
FastGaussianBlurOperation::FastGaussianBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->iirgaus = NULL;
+ this->m_iirgaus = NULL;
}
void FastGaussianBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
@@ -51,7 +51,7 @@ bool FastGaussianBlurOperation::determineDependingAreaOfInterest(rcti *input, Re
return true;
}
else {
- if (this->iirgaus) {
+ if (this->m_iirgaus) {
return false;
}
else {
@@ -72,9 +72,9 @@ void FastGaussianBlurOperation::initExecution()
void FastGaussianBlurOperation::deinitExecution()
{
- if (this->iirgaus) {
- delete this->iirgaus;
- this->iirgaus = NULL;
+ if (this->m_iirgaus) {
+ delete this->m_iirgaus;
+ this->m_iirgaus = NULL;
}
BlurBaseOperation::deinitMutex();
}
@@ -82,33 +82,33 @@ void FastGaussianBlurOperation::deinitExecution()
void *FastGaussianBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!iirgaus) {
- MemoryBuffer *newBuf = (MemoryBuffer *)this->inputProgram->initializeTileData(rect, memoryBuffers);
+ if (!this->m_iirgaus) {
+ MemoryBuffer *newBuf = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect, memoryBuffers);
MemoryBuffer *copy = newBuf->duplicate();
updateSize(memoryBuffers);
int c;
- sx = data->sizex * this->size / 2.0f;
- sy = data->sizey * this->size / 2.0f;
+ this->m_sx = this->m_data->sizex * this->m_size / 2.0f;
+ this->m_sy = this->m_data->sizey * this->m_size / 2.0f;
- if ((sx == sy) && (sx > 0.f)) {
+ if ((this->m_sx == this->m_sy) && (this->m_sx > 0.f)) {
for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
- IIR_gauss(copy, sx, c, 3);
+ IIR_gauss(copy, this->m_sx, c, 3);
}
else {
- if (sx > 0.f) {
+ if (this->m_sx > 0.0f) {
for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
- IIR_gauss(copy, sx, c, 1);
+ IIR_gauss(copy, this->m_sx, c, 1);
}
- if (sy > 0.f) {
+ if (this->m_sy > 0.0f) {
for (c = 0; c < COM_NUMBER_OF_CHANNELS; ++c)
- IIR_gauss(copy, sy, c, 2);
+ IIR_gauss(copy, this->m_sy, c, 2);
}
}
- this->iirgaus = copy;
+ this->m_iirgaus = copy;
}
unlockMutex();
- return iirgaus;
+ return this->m_iirgaus;
}
void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src, float sigma, unsigned int chan, unsigned int xy)
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
index 0f3929f052c..1e303b23869 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.h
@@ -28,9 +28,9 @@
class FastGaussianBlurOperation : public BlurBaseOperation {
private:
- float sx;
- float sy;
- MemoryBuffer *iirgaus;
+ float m_sx;
+ float m_sy;
+ MemoryBuffer *m_iirgaus;
public:
FastGaussianBlurOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
diff --git a/source/blender/compositor/operations/COM_FlipOperation.cpp b/source/blender/compositor/operations/COM_FlipOperation.cpp
index 5023473f4aa..60dabb86bb5 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.cpp
+++ b/source/blender/compositor/operations/COM_FlipOperation.cpp
@@ -27,34 +27,34 @@ FlipOperation::FlipOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->flipX = true;
- this->flipY = false;
+ this->m_inputOperation = NULL;
+ this->m_flipX = true;
+ this->m_flipY = false;
}
void FlipOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void FlipOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void FlipOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- float nx = this->flipX ? this->getWidth() - 1 - x : x;
- float ny = this->flipY ? this->getHeight() - 1 - y : y;
+ float nx = this->m_flipX ? this->getWidth() - 1 - x : x;
+ float ny = this->m_flipY ? this->getHeight() - 1 - y : y;
- this->inputOperation->read(color, nx, ny, sampler, inputBuffers);
+ this->m_inputOperation->read(color, nx, ny, sampler, inputBuffers);
}
bool FlipOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- if (this->flipX) {
+ if (this->m_flipX) {
newInput.xmax = (this->getWidth() - 1 - input->xmin) + 1;
newInput.xmin = (this->getWidth() - 1 - input->xmax) - 1;
}
@@ -62,7 +62,7 @@ bool FlipOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOper
newInput.xmin = input->xmin;
newInput.xmax = input->xmax;
}
- if (this->flipY) {
+ if (this->m_flipY) {
newInput.ymax = (this->getHeight() - 1 - input->ymin) + 1;
newInput.ymin = (this->getHeight() - 1 - input->ymax) - 1;
}
diff --git a/source/blender/compositor/operations/COM_FlipOperation.h b/source/blender/compositor/operations/COM_FlipOperation.h
index f83fa6ac3a8..5442774c94c 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.h
+++ b/source/blender/compositor/operations/COM_FlipOperation.h
@@ -27,9 +27,9 @@
class FlipOperation : public NodeOperation {
private:
- SocketReader *inputOperation;
- bool flipX;
- bool flipY;
+ SocketReader *m_inputOperation;
+ bool m_flipX;
+ bool m_flipY;
public:
FlipOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
@@ -37,8 +37,8 @@ public:
void initExecution();
void deinitExecution();
- void setFlipX(bool flipX) { this->flipX = flipX; }
- void setFlipY(bool flipY) { this->flipY = flipY; }
+ void setFlipX(bool flipX) { this->m_flipX = flipX; }
+ void setFlipY(bool flipY) { this->m_flipY = flipY; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
index 3e90b643604..db8d54a2f3c 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
@@ -27,17 +27,17 @@ GammaCorrectOperation::GammaCorrectOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void GammaCorrectOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void GammaCorrectOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- this->inputProgram->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(inputColor, x, y, sampler, inputBuffers);
if (inputColor[3] > 0.0f) {
inputColor[0] /= inputColor[3];
inputColor[1] /= inputColor[3];
@@ -61,24 +61,24 @@ void GammaCorrectOperation::executePixel(float *color, float x, float y, PixelSa
void GammaCorrectOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
GammaUncorrectOperation::GammaUncorrectOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void GammaUncorrectOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void GammaUncorrectOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputColor[4];
- this->inputProgram->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(inputColor, x, y, sampler, inputBuffers);
if (inputColor[3] > 0.0f) {
inputColor[0] /= inputColor[3];
@@ -102,5 +102,5 @@ void GammaUncorrectOperation::executePixel(float *color, float x, float y, Pixel
void GammaUncorrectOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.h b/source/blender/compositor/operations/COM_GammaCorrectOperation.h
index 4bf03eac0a1..4db911bb9b5 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.h
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.h
@@ -30,7 +30,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
public:
GammaCorrectOperation();
@@ -56,7 +56,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
public:
GammaUncorrectOperation();
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index 2c3e78840ee..9ccc76f4392 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -28,13 +28,13 @@ GammaOperation::GammaOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
- this->inputGammaProgram = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputGammaProgram = NULL;
}
void GammaOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
- this->inputGammaProgram = this->getInputSocketReader(1);
+ this->m_inputProgram = this->getInputSocketReader(0);
+ this->m_inputGammaProgram = this->getInputSocketReader(1);
}
void GammaOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -42,8 +42,8 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s
float inputValue[4];
float inputGamma[4];
- this->inputProgram->read(inputValue, x, y, sampler, inputBuffers);
- this->inputGammaProgram->read(inputGamma, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputGammaProgram->read(inputGamma, x, y, sampler, inputBuffers);
const float gamma = inputGamma[0];
/* check for negative to avoid nan's */
color[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
@@ -55,6 +55,6 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s
void GammaOperation::deinitExecution()
{
- this->inputProgram = NULL;
- this->inputGammaProgram = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputGammaProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_GammaOperation.h b/source/blender/compositor/operations/COM_GammaOperation.h
index 8c007d27843..758f7bda04d 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.h
+++ b/source/blender/compositor/operations/COM_GammaOperation.h
@@ -30,8 +30,8 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
- SocketReader *inputGammaProgram;
+ SocketReader *m_inputProgram;
+ SocketReader *m_inputGammaProgram;
public:
GammaOperation();
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
index 2d78085e3b0..a138d4be1d9 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -30,14 +30,14 @@ extern "C" {
GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(COM_DT_VALUE)
{
- this->gausstab = NULL;
- this->rad = 0;
+ this->m_gausstab = NULL;
+ this->m_rad = 0;
}
void *GaussianAlphaXBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!this->sizeavailable) {
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
@@ -51,37 +51,37 @@ void GaussianAlphaXBlurOperation::initExecution()
initMutex();
- if (this->sizeavailable) {
- float rad = size * this->data->sizex;
+ if (this->m_sizeavailable) {
+ float rad = this->m_size * this->m_data->sizex;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
- this->distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->falloff);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->m_falloff);
}
}
void GaussianAlphaXBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
{
- if (this->gausstab == NULL) {
+ if (this->m_gausstab == NULL) {
updateSize(memoryBuffers);
- float rad = size * this->data->sizex;
+ float rad = this->m_size * this->m_data->sizex;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
}
- if (this->distbuf_inv == NULL) {
+ if (this->m_distbuf_inv == NULL) {
updateSize(memoryBuffers);
- float rad = size * this->data->sizex;
+ float rad = this->m_size * this->m_data->sizex;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->falloff);
+ this->m_rad = rad;
+ this->m_distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->m_falloff);
}
}
@@ -92,7 +92,7 @@ BLI_INLINE float finv_test(const float f, const bool test)
void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- const bool do_invert = this->do_subtract;
+ const bool do_invert = this->m_do_subtract;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
int bufferwidth = inputBuffer->getWidth();
@@ -101,8 +101,8 @@ void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, Memor
int miny = y;
int maxy = y;
- int minx = x - this->rad;
- int maxx = x + this->rad;
+ int minx = x - this->m_rad;
+ int maxx = x + this->m_rad;
miny = max(miny, inputBuffer->getRect()->ymin);
minx = max(minx, inputBuffer->getRect()->xmin);
maxy = min(maxy, inputBuffer->getRect()->ymax);
@@ -122,20 +122,20 @@ void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, Memor
float distfacinv_max = 1.0f; /* 0 to 1 */
for (int nx = minx; nx < maxx; nx += step) {
- const int index = (nx - x) + this->rad;
+ const int index = (nx - x) + this->m_rad;
float value = finv_test(buffer[bufferindex], do_invert);
float multiplier;
/* gauss */
{
- multiplier = gausstab[index];
+ multiplier = this->m_gausstab[index];
alpha_accum += value * multiplier;
multiplier_accum += multiplier;
}
/* dilate - find most extreme color */
if (value > value_max) {
- multiplier = distbuf_inv[index];
+ multiplier = this->m_distbuf_inv[index];
value *= multiplier;
if (value > value_max) {
value_max = value;
@@ -154,10 +154,10 @@ void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, Memor
void GaussianAlphaXBlurOperation::deinitExecution()
{
BlurBaseOperation::deinitExecution();
- delete [] this->gausstab;
- this->gausstab = NULL;
- delete [] this->distbuf_inv;
- this->distbuf_inv = NULL;
+ delete [] this->m_gausstab;
+ this->m_gausstab = NULL;
+ delete [] this->m_distbuf_inv;
+ this->m_distbuf_inv = NULL;
deinitMutex();
}
@@ -179,9 +179,9 @@ bool GaussianAlphaXBlurOperation::determineDependingAreaOfInterest(rcti *input,
else
#endif
{
- if (this->sizeavailable && this->gausstab != NULL) {
- newInput.xmax = input->xmax + rad;
- newInput.xmin = input->xmin - rad;
+ if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ newInput.xmax = input->xmax + this->m_rad;
+ newInput.xmin = input->xmin - this->m_rad;
newInput.ymax = input->ymax;
newInput.ymin = input->ymin;
}
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
index 38817ebef1d..59797c27952 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h
@@ -28,11 +28,11 @@
class GaussianAlphaXBlurOperation : public BlurBaseOperation {
private:
- float *gausstab;
- float *distbuf_inv;
- int falloff; /* falloff for distbuf_inv */
- bool do_subtract;
- int rad;
+ float *m_gausstab;
+ float *m_distbuf_inv;
+ int m_falloff; /* falloff for distbuf_inv */
+ bool m_do_subtract;
+ int m_rad;
void updateGauss(MemoryBuffer **memoryBuffers);
public:
GaussianAlphaXBlurOperation();
@@ -58,7 +58,7 @@ public:
/**
* Set subtract for Dilate/Erode functionality
*/
- void setSubtract(bool subtract) { this->do_subtract = subtract; }
- void setFalloff(int falloff) { this->falloff = falloff; }
+ void setSubtract(bool subtract) { this->m_do_subtract = subtract; }
+ void setFalloff(int falloff) { this->m_falloff = falloff; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
index ef5f9d5c31b..ab5f8d33850 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -30,14 +30,14 @@ extern "C" {
GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(COM_DT_VALUE)
{
- this->gausstab = NULL;
- this->rad = 0;
+ this->m_gausstab = NULL;
+ this->m_rad = 0;
}
void *GaussianAlphaYBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!this->sizeavailable) {
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
@@ -51,37 +51,37 @@ void GaussianAlphaYBlurOperation::initExecution()
initMutex();
- if (this->sizeavailable) {
- float rad = size * this->data->sizey;
+ if (this->m_sizeavailable) {
+ float rad = this->m_size * this->m_data->sizey;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
- this->distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->falloff);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->m_falloff);
}
}
void GaussianAlphaYBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
{
- if (this->gausstab == NULL) {
+ if (this->m_gausstab == NULL) {
updateSize(memoryBuffers);
- float rad = size * this->data->sizey;
+ float rad = this->m_size * this->m_data->sizey;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
}
- if (this->distbuf_inv == NULL) {
+ if (this->m_distbuf_inv == NULL) {
updateSize(memoryBuffers);
- float rad = size * this->data->sizex;
+ float rad = this->m_size * this->m_data->sizex;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->falloff);
+ this->m_rad = rad;
+ this->m_distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->m_falloff);
}
}
@@ -92,15 +92,15 @@ BLI_INLINE float finv_test(const float f, const bool test)
void GaussianAlphaYBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- const bool do_invert = this->do_subtract;
+ const bool do_invert = this->m_do_subtract;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
int bufferwidth = inputBuffer->getWidth();
int bufferstartx = inputBuffer->getRect()->xmin;
int bufferstarty = inputBuffer->getRect()->ymin;
- int miny = y - this->rad;
- int maxy = y + this->rad;
+ int miny = y - this->m_rad;
+ int maxy = y + this->m_rad;
int minx = x;
int maxx = x;
miny = max(miny, inputBuffer->getRect()->ymin);
@@ -122,20 +122,20 @@ void GaussianAlphaYBlurOperation::executePixel(float *color, int x, int y, Memor
for (int ny = miny; ny < maxy; ny += step) {
int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
- const int index = (ny - y) + this->rad;
+ const int index = (ny - y) + this->m_rad;
float value = finv_test(buffer[bufferindex], do_invert);
float multiplier;
/* gauss */
{
- multiplier = gausstab[index];
+ multiplier = this->m_gausstab[index];
alpha_accum += value * multiplier;
multiplier_accum += multiplier;
}
/* dilate - find most extreme color */
if (value > value_max) {
- multiplier = distbuf_inv[index];
+ multiplier = this->m_distbuf_inv[index];
value *= multiplier;
if (value > value_max) {
value_max = value;
@@ -154,10 +154,10 @@ void GaussianAlphaYBlurOperation::executePixel(float *color, int x, int y, Memor
void GaussianAlphaYBlurOperation::deinitExecution()
{
BlurBaseOperation::deinitExecution();
- delete [] this->gausstab;
- this->gausstab = NULL;
- delete [] this->distbuf_inv;
- this->distbuf_inv = NULL;
+ delete [] this->m_gausstab;
+ this->m_gausstab = NULL;
+ delete [] this->m_distbuf_inv;
+ this->m_distbuf_inv = NULL;
deinitMutex();
}
@@ -179,11 +179,11 @@ bool GaussianAlphaYBlurOperation::determineDependingAreaOfInterest(rcti *input,
else
#endif
{
- if (this->sizeavailable && this->gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != NULL) {
newInput.xmax = input->xmax;
newInput.xmin = input->xmin;
- newInput.ymax = input->ymax + rad;
- newInput.ymin = input->ymin - rad;
+ newInput.ymax = input->ymax + this->m_rad;
+ newInput.ymin = input->ymin - this->m_rad;
}
else {
newInput.xmax = this->getWidth();
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
index 67166be8241..e0789db7815 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h
@@ -28,11 +28,11 @@
class GaussianAlphaYBlurOperation : public BlurBaseOperation {
private:
- float *gausstab;
- float *distbuf_inv;
- bool do_subtract;
- int falloff;
- int rad;
+ float *m_gausstab;
+ float *m_distbuf_inv;
+ bool m_do_subtract;
+ int m_falloff;
+ int m_rad;
void updateGauss(MemoryBuffer **memoryBuffers);
public:
GaussianAlphaYBlurOperation();
@@ -58,7 +58,7 @@ public:
/**
* Set subtract for Dilate/Erode functionality
*/
- void setSubtract(bool subtract) { this->do_subtract = subtract; }
- void setFalloff(int falloff) { this->falloff = falloff; }
+ void setSubtract(bool subtract) { this->m_do_subtract = subtract; }
+ void setFalloff(int falloff) { this->m_falloff = falloff; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index 8d6a601b7dc..ac91d3336e2 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -29,13 +29,13 @@ extern "C" {
GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->gausstab = NULL;
+ this->m_gausstab = NULL;
}
void *GaussianBokehBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!sizeavailable) {
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
@@ -49,14 +49,14 @@ void GaussianBokehBlurOperation::initExecution()
initMutex();
- if (this->sizeavailable) {
+ if (this->m_sizeavailable) {
updateGauss(NULL);
}
}
void GaussianBokehBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
{
- if (this->gausstab == NULL) {
+ if (this->m_gausstab == NULL) {
float radxf;
float radyf;
int n;
@@ -66,37 +66,37 @@ void GaussianBokehBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
int j, i;
const float width = this->getWidth();
const float height = this->getHeight();
- if (!sizeavailable) {
+ if (!this->m_sizeavailable) {
updateSize(memoryBuffers);
}
- radxf = size * (float)this->data->sizex;
+ radxf = this->m_size * (float)this->m_data->sizex;
if (radxf > width / 2.0f)
radxf = width / 2.0f;
else if (radxf < 1.0f)
radxf = 1.0f;
/* vertical */
- radyf = size * (float)this->data->sizey;
+ radyf = this->m_size * (float)this->m_data->sizey;
if (radyf > height / 2.0f)
radyf = height / 2.0f;
else if (radyf < 1.0f)
radyf = 1.0f;
- radx = ceil(radxf);
- rady = ceil(radyf);
+ this->m_radx = ceil(radxf);
+ this->m_rady = ceil(radyf);
- n = (2 * radx + 1) * (2 * rady + 1);
+ n = (2 * this->m_radx + 1) * (2 * this->m_rady + 1);
/* create a full filter image */
ddgauss = new float[n];
dgauss = ddgauss;
val = 0.0f;
- for (j = -rady; j <= rady; j++) {
- for (i = -radx; i <= radx; i++, dgauss++) {
+ for (j = -this->m_rady; j <= this->m_rady; j++) {
+ for (i = -this->m_radx; i <= this->m_radx; i++, dgauss++) {
float fj = (float)j / radyf;
float fi = (float)i / radxf;
float dist = sqrt(fj * fj + fi * fi);
- *dgauss = RE_filter_value(this->data->filtertype, dist);
+ *dgauss = RE_filter_value(this->m_data->filtertype, dist);
val += *dgauss;
}
@@ -108,7 +108,7 @@ void GaussianBokehBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
}
else ddgauss[4] = 1.0f;
- gausstab = ddgauss;
+ this->m_gausstab = ddgauss;
}
}
@@ -126,10 +126,10 @@ void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, Memory
int bufferstartx = inputBuffer->getRect()->xmin;
int bufferstarty = inputBuffer->getRect()->ymin;
- int miny = y - this->rady;
- int maxy = y + this->rady;
- int minx = x - this->radx;
- int maxx = x + this->radx;
+ int miny = y - this->m_rady;
+ int maxy = y + this->m_rady;
+ int minx = x - this->m_radx;
+ int maxx = x + this->m_radx;
miny = max(miny, inputBuffer->getRect()->ymin);
minx = max(minx, inputBuffer->getRect()->xmin);
maxy = min(maxy, inputBuffer->getRect()->ymax);
@@ -139,10 +139,10 @@ void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, Memory
int step = QualityStepHelper::getStep();
int offsetadd = QualityStepHelper::getOffsetAdd();
for (int ny = miny; ny < maxy; ny += step) {
- index = ((ny - y) + this->rady) * (this->radx * 2 + 1) + (minx - x + this->radx);
+ index = ((ny - y) + this->m_rady) * (this->m_radx * 2 + 1) + (minx - x + this->m_radx);
int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
for (int nx = minx; nx < maxx; nx += step) {
- const float multiplier = gausstab[index];
+ const float multiplier = this->m_gausstab[index];
madd_v4_v4fl(tempColor, &buffer[bufferindex], multiplier);
multiplier_accum += multiplier;
index += step;
@@ -156,8 +156,8 @@ void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, Memory
void GaussianBokehBlurOperation::deinitExecution()
{
BlurBaseOperation::deinitExecution();
- delete [] this->gausstab;
- this->gausstab = NULL;
+ delete [] this->m_gausstab;
+ this->m_gausstab = NULL;
deinitMutex();
}
@@ -176,15 +176,15 @@ bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(rcti *input, R
return true;
}
else {
- if (this->sizeavailable && this->gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != NULL) {
newInput.xmin = 0;
newInput.ymin = 0;
newInput.xmax = this->getWidth();
newInput.ymax = this->getHeight();
}
else {
- int addx = radx;
- int addy = rady;
+ int addx = this->m_radx;
+ int addy = this->m_rady;
newInput.xmax = input->xmax + addx;
newInput.xmin = input->xmin - addx;
newInput.ymax = input->ymax + addy;
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
index 616a6539ad4..54dc8caed53 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h
@@ -28,8 +28,8 @@
class GaussianBokehBlurOperation : public BlurBaseOperation {
private:
- float *gausstab;
- int radx, rady;
+ float *m_gausstab;
+ int m_radx, m_rady;
void updateGauss(MemoryBuffer **memoryBuffers);
public:
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 51a71b90923..d18dd17528d 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -29,14 +29,14 @@ extern "C" {
GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->gausstab = NULL;
- this->rad = 0;
+ this->m_gausstab = NULL;
+ this->m_rad = 0;
}
void *GaussianXBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!this->sizeavailable) {
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
@@ -50,26 +50,26 @@ void GaussianXBlurOperation::initExecution()
initMutex();
- if (this->sizeavailable) {
- float rad = size * this->data->sizex;
+ if (this->m_sizeavailable) {
+ float rad = this->m_size * this->m_data->sizex;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
}
}
void GaussianXBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
{
- if (this->gausstab == NULL) {
+ if (this->m_gausstab == NULL) {
updateSize(memoryBuffers);
- float rad = size * this->data->sizex;
+ float rad = this->m_size * this->m_data->sizex;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
}
}
@@ -85,8 +85,8 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
int miny = y;
int maxy = y;
- int minx = x - this->rad;
- int maxx = x + this->rad;
+ int minx = x - this->m_rad;
+ int maxx = x + this->m_rad;
miny = max(miny, inputBuffer->getRect()->ymin);
minx = max(minx, inputBuffer->getRect()->xmin);
maxy = min(maxy, inputBuffer->getRect()->ymax);
@@ -97,8 +97,8 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
int offsetadd = getOffsetAdd();
int bufferindex = ((minx - bufferstartx) * 4) + ((miny - bufferstarty) * 4 * bufferwidth);
for (int nx = minx; nx < maxx; nx += step) {
- index = (nx - x) + this->rad;
- const float multiplier = gausstab[index];
+ index = (nx - x) + this->m_rad;
+ const float multiplier = this->m_gausstab[index];
madd_v4_v4fl(color_accum, &buffer[bufferindex], multiplier);
multiplier_accum += multiplier;
bufferindex += offsetadd;
@@ -109,8 +109,8 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
void GaussianXBlurOperation::deinitExecution()
{
BlurBaseOperation::deinitExecution();
- delete [] this->gausstab;
- this->gausstab = NULL;
+ delete [] this->m_gausstab;
+ this->m_gausstab = NULL;
deinitMutex();
}
@@ -129,9 +129,9 @@ bool GaussianXBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadB
return true;
}
else {
- if (this->sizeavailable && this->gausstab != NULL) {
- newInput.xmax = input->xmax + rad;
- newInput.xmin = input->xmin - rad;
+ if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ newInput.xmax = input->xmax + this->m_rad;
+ newInput.xmin = input->xmin - this->m_rad;
newInput.ymax = input->ymax;
newInput.ymin = input->ymin;
}
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.h b/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
index 10a8a538391..9b5c2131b74 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.h
@@ -27,8 +27,8 @@
class GaussianXBlurOperation : public BlurBaseOperation {
private:
- float *gausstab;
- int rad;
+ float *m_gausstab;
+ int m_rad;
void updateGauss(MemoryBuffer **memoryBuffers);
public:
GaussianXBlurOperation();
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index f69eeb913ad..d2d30da8ddf 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -29,14 +29,14 @@ extern "C" {
GaussianYBlurOperation::GaussianYBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->gausstab = NULL;
- this->rad = 0;
+ this->m_gausstab = NULL;
+ this->m_rad = 0;
}
void *GaussianYBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (!this->sizeavailable) {
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
@@ -50,26 +50,26 @@ void GaussianYBlurOperation::initExecution()
initMutex();
- if (this->sizeavailable) {
- float rad = size * this->data->sizey;
+ if (this->m_sizeavailable) {
+ float rad = this->m_size * this->m_data->sizey;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
}
}
void GaussianYBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
{
- if (this->gausstab == NULL) {
+ if (this->m_gausstab == NULL) {
updateSize(memoryBuffers);
- float rad = size * this->data->sizey;
+ float rad = this->m_size * this->m_data->sizey;
if (rad < 1)
rad = 1;
- this->rad = rad;
- this->gausstab = BlurBaseOperation::make_gausstab(rad);
+ this->m_rad = rad;
+ this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
}
}
@@ -83,8 +83,8 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
int bufferstartx = inputBuffer->getRect()->xmin;
int bufferstarty = inputBuffer->getRect()->ymin;
- int miny = y - this->rad;
- int maxy = y + this->rad;
+ int miny = y - this->m_rad;
+ int maxy = y + this->m_rad;
int minx = x;
int maxx = x;
miny = max(miny, inputBuffer->getRect()->ymin);
@@ -95,9 +95,9 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
int index;
int step = getStep();
for (int ny = miny; ny < maxy; ny += step) {
- index = (ny - y) + this->rad;
+ index = (ny - y) + this->m_rad;
int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
- const float multiplier = gausstab[index];
+ const float multiplier = this->m_gausstab[index];
madd_v4_v4fl(color_accum, &buffer[bufferindex], multiplier);
multiplier_accum += multiplier;
}
@@ -107,8 +107,8 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
void GaussianYBlurOperation::deinitExecution()
{
BlurBaseOperation::deinitExecution();
- delete [] this->gausstab;
- this->gausstab = NULL;
+ delete [] this->m_gausstab;
+ this->m_gausstab = NULL;
deinitMutex();
}
@@ -127,11 +127,11 @@ bool GaussianYBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadB
return true;
}
else {
- if (this->sizeavailable && this->gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != NULL) {
newInput.xmax = input->xmax;
newInput.xmin = input->xmin;
- newInput.ymax = input->ymax + rad;
- newInput.ymin = input->ymin - rad;
+ newInput.ymax = input->ymax + this->m_rad;
+ newInput.ymin = input->ymin - this->m_rad;
}
else {
newInput.xmax = this->getWidth();
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
index e8d362e4c32..f4d40c231dc 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.h
@@ -27,8 +27,8 @@
class GaussianYBlurOperation : public BlurBaseOperation {
private:
- float *gausstab;
- int rad;
+ float *m_gausstab;
+ int m_rad;
void updateGauss(MemoryBuffer **memoryBuffers);
public:
GaussianYBlurOperation();
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
index 90bdd705a7c..a6678fdecef 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
@@ -27,23 +27,23 @@ GlareBaseOperation::GlareBaseOperation() : SingleThreadedNodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->settings = NULL;
+ this->m_settings = NULL;
}
void GlareBaseOperation::initExecution()
{
SingleThreadedNodeOperation::initExecution();
- this->inputProgram = getInputSocketReader(0);
+ this->m_inputProgram = getInputSocketReader(0);
}
void GlareBaseOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
SingleThreadedNodeOperation::deinitExecution();
}
MemoryBuffer *GlareBaseOperation::createMemoryBuffer(rcti *rect2, MemoryBuffer **memoryBuffers)
{
- MemoryBuffer *tile = (MemoryBuffer *)inputProgram->initializeTileData(rect2, memoryBuffers);
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect2, memoryBuffers);
rcti rect;
rect.xmin = 0;
rect.ymin = 0;
@@ -51,7 +51,7 @@ MemoryBuffer *GlareBaseOperation::createMemoryBuffer(rcti *rect2, MemoryBuffer *
rect.ymax = getHeight();
MemoryBuffer *result = new MemoryBuffer(NULL, &rect);
float *data = result->getBuffer();
- this->generateGlare(data, tile, this->settings);
+ this->generateGlare(data, tile, this->m_settings);
return result;
}
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.h b/source/blender/compositor/operations/COM_GlareBaseOperation.h
index ac67ac055e9..6104ec7a81e 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.h
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.h
@@ -41,12 +41,12 @@ private:
/**
* @brief Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
/**
* @brief settings of the glare node.
*/
- NodeGlare *settings;
+ NodeGlare *m_settings;
public:
/**
* Initialize the execution
@@ -59,7 +59,7 @@ public:
void deinitExecution();
void setGlareSettings(NodeGlare *settings) {
- this->settings = settings;
+ this->m_settings = settings;
}
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.h b/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
index 5737a6a1ff0..1231185a21a 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.h
@@ -28,8 +28,7 @@
class GlareFogGlowOperation : public GlareBaseOperation {
public:
- GlareFogGlowOperation() : GlareBaseOperation() {
- }
+ GlareFogGlowOperation() : GlareBaseOperation() {}
protected:
void generateGlare(float *data, MemoryBuffer *inputTile, NodeGlare *settings);
};
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.h b/source/blender/compositor/operations/COM_GlareGhostOperation.h
index 2ee85cc4543..7ce1048efe9 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.h
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.h
@@ -28,8 +28,7 @@
class GlareGhostOperation : public GlareBaseOperation {
public:
- GlareGhostOperation() : GlareBaseOperation() {
- }
+ GlareGhostOperation() : GlareBaseOperation() {}
protected:
void generateGlare(float *data, MemoryBuffer *inputTile, NodeGlare *settings);
};
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
index a12d1191a1a..440f3ba147a 100644
--- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
+++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.h
@@ -28,8 +28,7 @@
class GlareSimpleStarOperation : public GlareBaseOperation {
public:
- GlareSimpleStarOperation() : GlareBaseOperation() {
- }
+ GlareSimpleStarOperation() : GlareBaseOperation() {}
protected:
void generateGlare(float *data, MemoryBuffer *inputTile, NodeGlare *settings);
};
diff --git a/source/blender/compositor/operations/COM_GlareStreaksOperation.h b/source/blender/compositor/operations/COM_GlareStreaksOperation.h
index 6520a05b44f..e629ac11623 100644
--- a/source/blender/compositor/operations/COM_GlareStreaksOperation.h
+++ b/source/blender/compositor/operations/COM_GlareStreaksOperation.h
@@ -28,8 +28,7 @@
class GlareStreaksOperation : public GlareBaseOperation {
public:
- GlareStreaksOperation() : GlareBaseOperation() {
- }
+ GlareStreaksOperation() : GlareBaseOperation() {}
protected:
void generateGlare(float *data, MemoryBuffer *inputTile, NodeGlare *settings);
};
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index f9b2ec2b32d..6d8c567c1b5 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -27,26 +27,26 @@ GlareThresholdOperation::GlareThresholdOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_FIT);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void GlareThresholdOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
NodeOperation::determineResolution(resolution, preferredResolution);
- resolution[0] = resolution[0] / (1 << settings->quality);
- resolution[1] = resolution[1] / (1 << settings->quality);
+ resolution[0] = resolution[0] / (1 << this->m_settings->quality);
+ resolution[1] = resolution[1] / (1 << this->m_settings->quality);
}
void GlareThresholdOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void GlareThresholdOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- const float threshold = settings->threshold;
+ const float threshold = this->m_settings->threshold;
- this->inputProgram->read(color, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(color, x, y, sampler, inputBuffers);
if (rgb_to_luma_y(color) >= threshold) {
color[0] -= threshold, color[1] -= threshold, color[2] -= threshold;
color[0] = MAX2(color[0], 0.0f);
@@ -60,5 +60,5 @@ void GlareThresholdOperation::executePixel(float *color, float x, float y, Pixel
void GlareThresholdOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.h b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
index 70692565e27..d89f3a0f29d 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.h
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.h
@@ -30,12 +30,12 @@ private:
/**
* @brief Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
/**
* @brief settings of the glare node.
*/
- NodeGlare *settings;
+ NodeGlare *m_settings;
public:
GlareThresholdOperation();
@@ -55,7 +55,7 @@ public:
void deinitExecution();
void setGlareSettings(NodeGlare *settings) {
- this->settings = settings;
+ this->m_settings = settings;
}
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index b8e46e2d0be..02914487072 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -37,30 +37,30 @@ HueSaturationValueCorrectOperation::HueSaturationValueCorrectOperation() : Curve
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void HueSaturationValueCorrectOperation::initExecution()
{
CurveBaseOperation::initExecution();
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void HueSaturationValueCorrectOperation::executePixel(float *output, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float hsv[4], f;
- this->inputProgram->read(hsv, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(hsv, x, y, sampler, inputBuffers);
/* adjust hue, scaling returned default 0.5 up to 1 */
- f = curvemapping_evaluateF(this->curveMapping, 0, hsv[0]);
+ f = curvemapping_evaluateF(this->m_curveMapping, 0, hsv[0]);
hsv[0] += f - 0.5f;
/* adjust saturation, scaling returned default 0.5 up to 1 */
- f = curvemapping_evaluateF(this->curveMapping, 1, hsv[0]);
+ f = curvemapping_evaluateF(this->m_curveMapping, 1, hsv[0]);
hsv[1] *= (f * 2.f);
/* adjust value, scaling returned default 0.5 up to 1 */
- f = curvemapping_evaluateF(this->curveMapping, 2, hsv[0]);
+ f = curvemapping_evaluateF(this->m_curveMapping, 2, hsv[0]);
hsv[2] *= (f * 2.f);
hsv[0] = hsv[0] - floorf(hsv[0]); /* mod 1.0 */
@@ -74,5 +74,5 @@ void HueSaturationValueCorrectOperation::executePixel(float *output, float x, fl
void HueSaturationValueCorrectOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
index 5ede0491773..7ae5f53e370 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.h
@@ -30,7 +30,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
public:
HueSaturationValueCorrectOperation();
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.cpp b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
index d02367088d7..c84124368be 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
@@ -26,24 +26,24 @@ IDMaskOperation::IDMaskOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void IDMaskOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void IDMaskOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputValue[4];
- this->inputProgram->read(inputValue, x, y, sampler, inputBuffers);
- const float a = (inputValue[0] == this->objectIndex) ? 1.0f : 0.0f;
+ this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
+ const float a = (inputValue[0] == this->m_objectIndex) ? 1.0f : 0.0f;
color[0] = a;
}
void IDMaskOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_IDMaskOperation.h b/source/blender/compositor/operations/COM_IDMaskOperation.h
index 229e1b2dd82..23e8ec704e8 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.h
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.h
@@ -30,9 +30,9 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
- float objectIndex;
+ float m_objectIndex;
public:
IDMaskOperation();
@@ -51,7 +51,7 @@ public:
*/
void deinitExecution();
- void setObjectIndex(float objectIndex) { this->objectIndex = objectIndex; }
+ void setObjectIndex(float objectIndex) { this->m_objectIndex = objectIndex; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 9dbe8419daa..eb2eaa8167a 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -38,15 +38,15 @@ extern "C" {
BaseImageOperation::BaseImageOperation() : NodeOperation()
{
- this->image = NULL;
- this->buffer = NULL;
- this->imageBuffer = NULL;
- this->imageUser = NULL;
- this->imagewidth = 0;
- this->imageheight = 0;
- this->framenumber = 0;
- this->depthBuffer = NULL;
- this->numberOfChannels = 0;
+ this->m_image = NULL;
+ this->m_buffer = NULL;
+ this->m_imageBuffer = NULL;
+ this->m_imageUser = NULL;
+ this->m_imagewidth = 0;
+ this->m_imageheight = 0;
+ this->m_framenumber = 0;
+ this->m_depthBuffer = NULL;
+ this->m_numberOfChannels = 0;
}
ImageOperation::ImageOperation() : BaseImageOperation()
{
@@ -65,7 +65,7 @@ ImBuf *BaseImageOperation::getImBuf()
{
ImBuf *ibuf;
- ibuf = BKE_image_get_ibuf(this->image, this->imageUser);
+ ibuf = BKE_image_get_ibuf(this->m_image, this->m_imageUser);
if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) {
return NULL;
}
@@ -80,19 +80,19 @@ ImBuf *BaseImageOperation::getImBuf()
void BaseImageOperation::initExecution()
{
ImBuf *stackbuf = getImBuf();
- this->buffer = stackbuf;
+ this->m_buffer = stackbuf;
if (stackbuf) {
- this->imageBuffer = stackbuf->rect_float;
- this->depthBuffer = stackbuf->zbuf_float;
- this->imagewidth = stackbuf->x;
- this->imageheight = stackbuf->y;
- this->numberOfChannels = stackbuf->channels;
+ this->m_imageBuffer = stackbuf->rect_float;
+ this->m_depthBuffer = stackbuf->zbuf_float;
+ this->m_imagewidth = stackbuf->x;
+ this->m_imageheight = stackbuf->y;
+ this->m_numberOfChannels = stackbuf->channels;
}
}
void BaseImageOperation::deinitExecution()
{
- this->imageBuffer = NULL;
+ this->m_imageBuffer = NULL;
}
void BaseImageOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
@@ -110,22 +110,19 @@ void BaseImageOperation::determineResolution(unsigned int resolution[], unsigned
void ImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if (this->imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
- color[0] = 0.0f;
- color[1] = 0.0f;
- color[2] = 0.0f;
- color[3] = 0.0f;
+ if (this->m_imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
+ zero_v4(color);
}
else {
switch (sampler) {
case COM_PS_NEAREST:
- neareast_interpolation_color(this->buffer, NULL, color, x, y);
+ neareast_interpolation_color(this->m_buffer, NULL, color, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->buffer, NULL, color, x, y);
+ bilinear_interpolation_color(this->m_buffer, NULL, color, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->buffer, NULL, color, x, y);
+ bicubic_interpolation_color(this->m_buffer, NULL, color, x, y);
break;
}
}
@@ -135,20 +132,20 @@ void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSamp
{
float tempcolor[4];
- if (this->imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
+ if (this->m_imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
color[0] = 0.0f;
}
else {
tempcolor[3] = 1.0f;
switch (sampler) {
case COM_PS_NEAREST:
- neareast_interpolation_color(this->buffer, NULL, tempcolor, x, y);
+ neareast_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->buffer, NULL, tempcolor, x, y);
+ bilinear_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->buffer, NULL, tempcolor, x, y);
+ bicubic_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
break;
}
color[0] = tempcolor[3];
@@ -157,11 +154,11 @@ void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSamp
void ImageDepthOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if (this->depthBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
+ if (this->m_depthBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
color[0] = 0.0f;
}
else {
- int offset = y * width + x;
- color[0] = this->depthBuffer[offset];
+ int offset = y * this->m_width + x;
+ color[0] = this->m_depthBuffer[offset];
}
}
diff --git a/source/blender/compositor/operations/COM_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h
index a4645c9d504..c87b06b9c4d 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.h
+++ b/source/blender/compositor/operations/COM_ImageOperation.h
@@ -40,15 +40,15 @@ extern "C" {
*/
class BaseImageOperation : public NodeOperation {
protected:
- ImBuf *buffer;
- Image *image;
- ImageUser *imageUser;
- float *imageBuffer;
- float *depthBuffer;
- int imageheight;
- int imagewidth;
- int framenumber;
- int numberOfChannels;
+ ImBuf *m_buffer;
+ Image *m_image;
+ ImageUser *m_imageUser;
+ float *m_imageBuffer;
+ float *m_depthBuffer;
+ int m_imageheight;
+ int m_imagewidth;
+ int m_framenumber;
+ int m_numberOfChannels;
BaseImageOperation();
/**
@@ -62,10 +62,10 @@ public:
void initExecution();
void deinitExecution();
- void setImage(Image *image) { this->image = image; }
- void setImageUser(ImageUser *imageuser) { this->imageUser = imageuser; }
+ void setImage(Image *image) { this->m_image = image; }
+ void setImageUser(ImageUser *imageuser) { this->m_imageUser = imageuser; }
- void setFramenumber(int framenumber) { this->framenumber = framenumber; }
+ void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
};
class ImageOperation : public BaseImageOperation {
public:
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp
index 6142959a12e..9e9c2522d66 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_InvertOperation.cpp
@@ -27,29 +27,29 @@ InvertOperation::InvertOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputValueProgram = NULL;
- this->inputColorProgram = NULL;
- this->color = true;
- this->alpha = false;
+ this->m_inputValueProgram = NULL;
+ this->m_inputColorProgram = NULL;
+ this->m_color = true;
+ this->m_alpha = false;
setResolutionInputSocketIndex(1);
}
void InvertOperation::initExecution()
{
- this->inputValueProgram = this->getInputSocketReader(0);
- this->inputColorProgram = this->getInputSocketReader(1);
+ this->m_inputValueProgram = this->getInputSocketReader(0);
+ this->m_inputColorProgram = this->getInputSocketReader(1);
}
void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputValue[4];
float inputColor[4];
- this->inputValueProgram->read(inputValue, x, y, sampler, inputBuffers);
- this->inputColorProgram->read(inputColor, x, y, sampler, inputBuffers);
+ this->m_inputValueProgram->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColorProgram->read(inputColor, x, y, sampler, inputBuffers);
const float value = inputValue[0];
const float invertedValue = 1.0f - value;
- if (color) {
+ 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;
@@ -58,7 +58,7 @@ void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sa
copy_v3_v3(out, inputColor);
}
- if (alpha)
+ if (this->m_alpha)
out[3] = (1.0f - inputColor[3]) * value + inputColor[3] * invertedValue;
else
out[3] = inputColor[3];
@@ -67,7 +67,7 @@ void InvertOperation::executePixel(float *out, float x, float y, PixelSampler sa
void InvertOperation::deinitExecution()
{
- this->inputValueProgram = NULL;
- this->inputColorProgram = NULL;
+ this->m_inputValueProgram = NULL;
+ this->m_inputColorProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_InvertOperation.h b/source/blender/compositor/operations/COM_InvertOperation.h
index 48432aecdd0..f00a3fb739d 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.h
+++ b/source/blender/compositor/operations/COM_InvertOperation.h
@@ -30,11 +30,11 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputValueProgram;
- SocketReader *inputColorProgram;
+ SocketReader *m_inputValueProgram;
+ SocketReader *m_inputColorProgram;
- bool alpha;
- bool color;
+ bool m_alpha;
+ bool m_color;
public:
InvertOperation();
@@ -54,7 +54,7 @@ public:
*/
void deinitExecution();
- void setColor(bool color) { this->color = color; }
- void setAlpha(bool alpha) { this->alpha = alpha; }
+ void setColor(bool color) { this->m_color = color; }
+ void setAlpha(bool alpha) { this->m_alpha = alpha; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
index 4f78e23d86b..3285bd32039 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
@@ -33,8 +33,8 @@ KeyingBlurOperation::KeyingBlurOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->size = 0;
- this->axis = BLUR_AXIS_X;
+ this->m_size = 0;
+ this->m_axis = BLUR_AXIS_X;
this->setComplex(true);
}
@@ -58,8 +58,8 @@ void KeyingBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer
float average = 0.0f;
- if (this->axis == 0) {
- for (i = -this->size + 1; i < this->size; i++) {
+ if (this->m_axis == 0) {
+ for (i = -this->m_size + 1; i < this->m_size; i++) {
int cx = x + i;
if (cx >= 0 && cx < bufferWidth) {
@@ -71,7 +71,7 @@ void KeyingBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer
}
}
else {
- for (i = -this->size + 1; i < this->size; i++) {
+ for (i = -this->m_size + 1; i < this->m_size; i++) {
int cy = y + i;
if (cy >= 0 && cy < bufferHeight) {
@@ -92,17 +92,17 @@ bool KeyingBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
{
rcti newInput;
- if (this->axis == BLUR_AXIS_X) {
- newInput.xmin = input->xmin - this->size;
+ if (this->m_axis == BLUR_AXIS_X) {
+ newInput.xmin = input->xmin - this->m_size;
newInput.ymin = input->ymin;
- newInput.xmax = input->xmax + this->size;
+ newInput.xmax = input->xmax + this->m_size;
newInput.ymax = input->ymax;
}
else {
newInput.xmin = input->xmin;
- newInput.ymin = input->ymin - this->size;
+ newInput.ymin = input->ymin - this->m_size;
newInput.xmax = input->xmax;
- newInput.ymax = input->ymax + this->size;
+ newInput.ymax = input->ymax + this->m_size;
}
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
diff --git a/source/blender/compositor/operations/COM_KeyingBlurOperation.h b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
index 41ccb465eab..6e08712bf39 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
@@ -31,8 +31,8 @@
*/
class KeyingBlurOperation : public NodeOperation {
protected:
- int size;
- int axis;
+ int m_size;
+ int m_axis;
public:
enum BlurAxis {
@@ -42,8 +42,8 @@ public:
KeyingBlurOperation();
- void setSize(int value) {this->size = value;}
- void setAxis(int value) {this->axis = value;}
+ void setSize(int value) {this->m_size = value;}
+ void setAxis(int value) {this->m_axis = value;}
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
index 1d7ae1372b0..8f7d7fbf625 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
@@ -33,13 +33,13 @@ KeyingClipOperation::KeyingClipOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->kernelRadius = 3;
- this->kernelTolerance = 0.1f;
+ this->m_kernelRadius = 3;
+ this->m_kernelTolerance = 0.1f;
- this->clipBlack = 0.0f;
- this->clipWhite = 1.0f;
+ this->m_clipBlack = 0.0f;
+ this->m_clipWhite = 1.0f;
- this->isEdgeMatte = false;
+ this->m_isEdgeMatte = false;
this->setComplex(true);
}
@@ -53,8 +53,8 @@ void *KeyingClipOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryB
void KeyingClipOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- const int delta = this->kernelRadius;
- const float tolerance = this->kernelTolerance;
+ const int delta = this->m_kernelRadius;
+ const float tolerance = this->m_kernelTolerance;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
float *buffer = inputBuffer->getBuffer();
@@ -90,7 +90,7 @@ void KeyingClipOperation::executePixel(float *color, int x, int y, MemoryBuffer
ok = count >= (float) totalCount * 0.9f;
- if (this->isEdgeMatte) {
+ if (this->m_isEdgeMatte) {
if (ok)
color[0] = 0.0f;
else
@@ -100,12 +100,12 @@ void KeyingClipOperation::executePixel(float *color, int x, int y, MemoryBuffer
color[0] = value;
if (ok) {
- if (color[0] < this->clipBlack)
+ if (color[0] < this->m_clipBlack)
color[0] = 0.0f;
- else if (color[0] >= this->clipWhite)
+ else if (color[0] >= this->m_clipWhite)
color[0] = 1.0f;
else
- color[0] = (color[0] - this->clipBlack) / (this->clipWhite - this->clipBlack);
+ color[0] = (color[0] - this->m_clipBlack) / (this->m_clipWhite - this->m_clipBlack);
}
}
}
@@ -114,10 +114,10 @@ bool KeyingClipOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
{
rcti newInput;
- newInput.xmin = input->xmin - this->kernelRadius;
- newInput.ymin = input->ymin - this->kernelRadius;
- newInput.xmax = input->xmax + this->kernelRadius;
- newInput.ymax = input->ymax + this->kernelRadius;
+ newInput.xmin = input->xmin - this->m_kernelRadius;
+ newInput.ymin = input->ymin - this->m_kernelRadius;
+ newInput.xmax = input->xmax + this->m_kernelRadius;
+ newInput.ymax = input->ymax + this->m_kernelRadius;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.h b/source/blender/compositor/operations/COM_KeyingClipOperation.h
index 9c7b23b0160..bffcdb96877 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.h
@@ -31,23 +31,23 @@
*/
class KeyingClipOperation : public NodeOperation {
protected:
- float clipBlack;
- float clipWhite;
+ float m_clipBlack;
+ float m_clipWhite;
- int kernelRadius;
- float kernelTolerance;
+ int m_kernelRadius;
+ float m_kernelTolerance;
- bool isEdgeMatte;
+ bool m_isEdgeMatte;
public:
KeyingClipOperation();
- void setClipBlack(float value) {this->clipBlack = value;}
- void setClipWhite(float value) {this->clipWhite = value;}
+ void setClipBlack(float value) {this->m_clipBlack = value;}
+ void setClipWhite(float value) {this->m_clipWhite = value;}
- void setKernelRadius(int value) {this->kernelRadius = value;}
- void setKernelTolerance(float value) {this->kernelTolerance = value;}
+ void setKernelRadius(int value) {this->m_kernelRadius = value;}
+ void setKernelTolerance(float value) {this->m_kernelTolerance = value;}
- void setIsEdgeMatte(bool value) {this->isEdgeMatte = value;}
+ void setIsEdgeMatte(bool value) {this->m_isEdgeMatte = value;}
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
index 04523384653..081d9f723e8 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
@@ -46,22 +46,22 @@ KeyingDespillOperation::KeyingDespillOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->despillFactor = 0.5f;
+ this->m_despillFactor = 0.5f;
- this->pixelReader = NULL;
- this->screenReader = NULL;
+ this->m_pixelReader = NULL;
+ this->m_screenReader = NULL;
}
void KeyingDespillOperation::initExecution()
{
- this->pixelReader = this->getInputSocketReader(0);
- this->screenReader = this->getInputSocketReader(1);
+ this->m_pixelReader = this->getInputSocketReader(0);
+ this->m_screenReader = this->getInputSocketReader(1);
}
void KeyingDespillOperation::deinitExecution()
{
- this->pixelReader = NULL;
- this->screenReader = NULL;
+ this->m_pixelReader = NULL;
+ this->m_screenReader = NULL;
}
void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -69,8 +69,8 @@ void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelS
float pixelColor[4];
float screenColor[4];
- this->pixelReader->read(pixelColor, x, y, sampler, inputBuffers);
- this->screenReader->read(screenColor, x, y, sampler, inputBuffers);
+ this->m_pixelReader->read(pixelColor, x, y, sampler, inputBuffers);
+ this->m_screenReader->read(screenColor, x, y, sampler, inputBuffers);
int screen_primary_channel = get_pixel_primary_channel(screenColor);
float average_value, amount;
@@ -83,7 +83,7 @@ void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelS
color[2] = pixelColor[2];
color[3] = pixelColor[3];
- if (this->despillFactor * amount > 0) {
- color[screen_primary_channel] = pixelColor[screen_primary_channel] - this->despillFactor * amount;
+ if (this->m_despillFactor * amount > 0) {
+ color[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 92a1415a1f0..879ee0acaca 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.h
@@ -31,9 +31,9 @@
*/
class KeyingDespillOperation : public NodeOperation {
protected:
- SocketReader *pixelReader;
- SocketReader *screenReader;
- float despillFactor;
+ SocketReader *m_pixelReader;
+ SocketReader *m_screenReader;
+ float m_despillFactor;
public:
KeyingDespillOperation();
@@ -41,7 +41,7 @@ public:
void initExecution();
void deinitExecution();
- void setDespillFactor(float value) {this->despillFactor = value;}
+ void setDespillFactor(float value) {this->m_despillFactor = value;}
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]);
};
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index d5d477a5385..e92e5c84c2d 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -60,28 +60,28 @@ KeyingOperation::KeyingOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->screenBalance = 0.5f;
+ this->m_screenBalance = 0.5f;
- this->pixelReader = NULL;
- this->screenReader = NULL;
- this->garbageReader = NULL;
- this->coreReader = NULL;
+ this->m_pixelReader = NULL;
+ this->m_screenReader = NULL;
+ this->m_garbageReader = NULL;
+ this->m_coreReader = NULL;
}
void KeyingOperation::initExecution()
{
- this->pixelReader = this->getInputSocketReader(0);
- this->screenReader = this->getInputSocketReader(1);
- this->garbageReader = this->getInputSocketReader(2);
- this->coreReader = this->getInputSocketReader(3);
+ this->m_pixelReader = this->getInputSocketReader(0);
+ this->m_screenReader = this->getInputSocketReader(1);
+ this->m_garbageReader = this->getInputSocketReader(2);
+ this->m_coreReader = this->getInputSocketReader(3);
}
void KeyingOperation::deinitExecution()
{
- this->pixelReader = NULL;
- this->screenReader = NULL;
- this->garbageReader = NULL;
- this->coreReader = NULL;
+ this->m_pixelReader = NULL;
+ this->m_screenReader = NULL;
+ this->m_garbageReader = NULL;
+ this->m_coreReader = NULL;
}
void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -91,10 +91,10 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
float garbageValue[4];
float coreValue[4];
- this->pixelReader->read(pixelColor, x, y, sampler, inputBuffers);
- this->screenReader->read(screenColor, x, y, sampler, inputBuffers);
- this->garbageReader->read(garbageValue, x, y, sampler, inputBuffers);
- this->coreReader->read(coreValue, x, y, sampler, inputBuffers);
+ this->m_pixelReader->read(pixelColor, x, y, sampler, inputBuffers);
+ this->m_screenReader->read(screenColor, x, y, sampler, inputBuffers);
+ this->m_garbageReader->read(garbageValue, x, y, sampler, inputBuffers);
+ this->m_coreReader->read(coreValue, x, y, sampler, inputBuffers);
int primary_channel = get_pixel_primary_channel(screenColor);
@@ -107,8 +107,8 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
color[0] = 1.0f;
}
else {
- float saturation = get_pixel_saturation(pixelColor, this->screenBalance, primary_channel);
- float screen_saturation = get_pixel_saturation(screenColor, this->screenBalance, primary_channel);
+ float saturation = get_pixel_saturation(pixelColor, this->m_screenBalance, primary_channel);
+ float screen_saturation = get_pixel_saturation(screenColor, this->m_screenBalance, primary_channel);
if (saturation < 0) {
/* means main channel of pixel is different from screen,
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.h b/source/blender/compositor/operations/COM_KeyingOperation.h
index 6e8ada927bd..61036bead80 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingOperation.h
@@ -36,12 +36,12 @@
*/
class KeyingOperation : public NodeOperation {
protected:
- SocketReader *pixelReader;
- SocketReader *screenReader;
- SocketReader *garbageReader;
- SocketReader *coreReader;
+ SocketReader *m_pixelReader;
+ SocketReader *m_screenReader;
+ SocketReader *m_garbageReader;
+ SocketReader *m_coreReader;
- float screenBalance;
+ float m_screenBalance;
public:
KeyingOperation();
@@ -49,7 +49,7 @@ public:
void initExecution();
void deinitExecution();
- void setScreenBalance(float value) {this->screenBalance = value;}
+ void setScreenBalance(float value) {this->m_screenBalance = value;}
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]);
};
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
index c75762a3f86..0fbe0aea555 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
@@ -42,22 +42,22 @@ extern "C" {
KeyingScreenOperation::KeyingScreenOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_COLOR);
- this->movieClip = NULL;
- this->framenumber = 0;
- this->trackingObject[0] = 0;
+ this->m_movieClip = NULL;
+ this->m_framenumber = 0;
+ this->m_trackingObject[0] = 0;
setComplex(true);
}
void KeyingScreenOperation::initExecution()
{
initMutex();
- this->cachedTriangulation = NULL;
+ this->m_cachedTriangulation = NULL;
}
void KeyingScreenOperation::deinitExecution()
{
- if (this->cachedTriangulation) {
- TriangulationData *triangulation = cachedTriangulation;
+ if (this->m_cachedTriangulation) {
+ TriangulationData *triangulation = this->m_cachedTriangulation;
if (triangulation->triangulated_points)
MEM_freeN(triangulation->triangulated_points);
@@ -68,9 +68,9 @@ void KeyingScreenOperation::deinitExecution()
if (triangulation->triangles_AABB)
MEM_freeN(triangulation->triangles_AABB);
- MEM_freeN(this->cachedTriangulation);
+ MEM_freeN(this->m_cachedTriangulation);
- this->cachedTriangulation = NULL;
+ this->m_cachedTriangulation = NULL;
}
}
@@ -78,7 +78,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
{
MovieClipUser user = {0};
TriangulationData *triangulation;
- MovieTracking *tracking = &movieClip->tracking;
+ MovieTracking *tracking = &this->m_movieClip->tracking;
MovieTrackingTrack *track;
VoronoiSite *sites;
ImBuf *ibuf;
@@ -88,10 +88,10 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
int i;
int width = this->getWidth();
int height = this->getHeight();
- int clip_frame = BKE_movieclip_remap_scene_to_clip_frame(this->movieClip, framenumber);
+ int clip_frame = BKE_movieclip_remap_scene_to_clip_frame(this->m_movieClip, this->m_framenumber);
- if (this->trackingObject[0]) {
- MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, this->trackingObject);
+ if (this->m_trackingObject[0]) {
+ MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, this->m_trackingObject);
if (!object)
return NULL;
@@ -114,7 +114,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
return NULL;
BKE_movieclip_user_set_frame(&user, clip_frame);
- ibuf = BKE_movieclip_get_ibuf(movieClip, &user);
+ ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, &user);
if (!ibuf)
return NULL;
@@ -199,19 +199,19 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
void *KeyingScreenOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->movieClip == NULL)
+ if (this->m_movieClip == NULL)
return NULL;
- if (this->cachedTriangulation)
- return this->cachedTriangulation;
+ if (this->m_cachedTriangulation)
+ return this->m_cachedTriangulation;
lockMutex();
- if (this->cachedTriangulation == NULL) {
- this->cachedTriangulation = buildVoronoiTriangulation();
+ if (this->m_cachedTriangulation == NULL) {
+ this->m_cachedTriangulation = buildVoronoiTriangulation();
}
unlockMutex();
- return this->cachedTriangulation;
+ return this->m_cachedTriangulation;
}
void KeyingScreenOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
@@ -219,13 +219,13 @@ void KeyingScreenOperation::determineResolution(unsigned int resolution[], unsig
resolution[0] = 0;
resolution[1] = 0;
- if (this->movieClip) {
+ if (this->m_movieClip) {
MovieClipUser user = {0};
int width, height;
- int clip_frame = BKE_movieclip_remap_scene_to_clip_frame(this->movieClip, framenumber);
+ int clip_frame = BKE_movieclip_remap_scene_to_clip_frame(this->m_movieClip, this->m_framenumber);
BKE_movieclip_user_set_frame(&user, clip_frame);
- BKE_movieclip_get_size(this->movieClip, &user, &width, &height);
+ BKE_movieclip_get_size(this->m_movieClip, &user, &width, &height);
resolution[0] = width;
resolution[1] = height;
@@ -239,7 +239,7 @@ void KeyingScreenOperation::executePixel(float *color, int x, int y, MemoryBuffe
color[2] = 0.0f;
color[3] = 1.0f;
- if (this->movieClip && data) {
+ if (this->m_movieClip && data) {
TriangulationData *triangulation = (TriangulationData *) data;
int i;
float co[2] = {(float) x, (float) y};
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.h b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
index a539ecf696e..7cf7ad3e959 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
@@ -39,8 +39,8 @@ extern "C" {
}
/**
- * Class with implementation of green screen gradient rasterization
- */
+ * Class with implementation of green screen gradient rasterization
+ */
class KeyingScreenOperation : public NodeOperation {
protected:
typedef struct TriangulationData {
@@ -50,19 +50,19 @@ protected:
rctf *triangles_AABB;
} TriangulationData;
- MovieClip *movieClip;
- int framenumber;
- TriangulationData *cachedTriangulation;
- char trackingObject[64];
+ MovieClip *m_movieClip;
+ int m_framenumber;
+ TriangulationData *m_cachedTriangulation;
+ char m_trackingObject[64];
/**
- * Determine the output resolution. The resolution is retrieved from the Renderer
- */
+ * Determine the output resolution. The resolution is retrieved from the Renderer
+ */
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
TriangulationData *buildVoronoiTriangulation();
- public:
+public:
KeyingScreenOperation();
void initExecution();
@@ -70,9 +70,9 @@ protected:
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
- void setMovieClip(MovieClip *clip) {this->movieClip = clip;}
- void setTrackingObject(char *object) {strncpy(this->trackingObject, object, sizeof(this->trackingObject));}
- void setFramenumber(int framenumber) {this->framenumber = framenumber;}
+ void setMovieClip(MovieClip *clip) {this->m_movieClip = clip;}
+ 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, MemoryBuffer *inputBuffers[], void *data);
};
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index 6e8aa9461e6..233f903c3e3 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -27,29 +27,29 @@ LuminanceMatteOperation::LuminanceMatteOperation() : NodeOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- inputImageProgram = NULL;
+ this->m_inputImageProgram = NULL;
}
void LuminanceMatteOperation::initExecution()
{
- this->inputImageProgram = this->getInputSocketReader(0);
+ this->m_inputImageProgram = this->getInputSocketReader(0);
}
void LuminanceMatteOperation::deinitExecution()
{
- this->inputImageProgram = NULL;
+ this->m_inputImageProgram = NULL;
}
void LuminanceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inColor[4];
- const float high = this->settings->t1;
- const float low = this->settings->t2;
+ const float high = this->m_settings->t1;
+ const float low = this->m_settings->t2;
float alpha;
- this->inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
+ this->m_inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
/* one line thread-friend algorithm:
* outputValue[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low))))
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
index f44e32396a3..7da56465cd8 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
@@ -30,8 +30,8 @@
*/
class LuminanceMatteOperation : public NodeOperation {
private:
- NodeChroma *settings;
- SocketReader *inputImageProgram;
+ NodeChroma *m_settings;
+ SocketReader *m_inputImageProgram;
public:
/**
* Default constructor
@@ -46,6 +46,6 @@ public:
void initExecution();
void deinitExecution();
- void setSettings(NodeChroma *nodeChroma) { this->settings = nodeChroma; }
+ void setSettings(NodeChroma *nodeChroma) { this->m_settings = nodeChroma; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index b29dcfab194..dec2d0849c9 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -27,17 +27,17 @@ MapUVOperation::MapUVOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_COLOR);
- this->alpha = 0.f;
+ this->m_alpha = 0.0f;
this->setComplex(true);
- this->inputUVProgram = NULL;
- this->inputColorProgram = NULL;
+ this->m_inputUVProgram = NULL;
+ this->m_inputColorProgram = NULL;
}
void MapUVOperation::initExecution()
{
- this->inputColorProgram = this->getInputSocketReader(0);
- this->inputUVProgram = this->getInputSocketReader(1);
+ this->m_inputColorProgram = this->getInputSocketReader(0);
+ this->m_inputUVProgram = this->getInputSocketReader(1);
}
void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -50,30 +50,30 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
float uv_l, uv_r;
float uv_u, uv_d;
- this->inputUVProgram->read(inputUV, x, y, sampler, inputBuffers);
+ this->m_inputUVProgram->read(inputUV, x, y, sampler, inputBuffers);
if (inputUV[2] == 0.f) {
zero_v4(color);
return;
}
/* adaptive sampling, red (U) channel */
- this->inputUVProgram->read(uv_a, x - 1, y, COM_PS_NEAREST, inputBuffers);
- this->inputUVProgram->read(uv_b, x + 1, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_a, x - 1, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_b, x + 1, y, COM_PS_NEAREST, inputBuffers);
uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
dx = 0.5f * (uv_l + uv_r);
/* adaptive sampling, green (V) channel */
- this->inputUVProgram->read(uv_a, x, y - 1, COM_PS_NEAREST, inputBuffers);
- this->inputUVProgram->read(uv_b, x, y + 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_a, x, y - 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_b, x, y + 1, COM_PS_NEAREST, inputBuffers);
uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f;
dy = 0.5f * (uv_u + uv_d);
/* more adaptive sampling, red and green (UV) channels */
- this->inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST, inputBuffers);
- this->inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST, inputBuffers);
uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
@@ -82,8 +82,8 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
dx += 0.25f * (uv_l + uv_r);
dy += 0.25f * (uv_u + uv_d);
- this->inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST, inputBuffers);
- this->inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST, inputBuffers);
+ this->m_inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST, inputBuffers);
uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f;
uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f;
uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f;
@@ -93,7 +93,7 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
dy += 0.25f * (uv_u + uv_d);
/* UV to alpha threshold */
- const float threshold = this->alpha * 0.05f;
+ const float threshold = this->m_alpha * 0.05f;
float alpha = 1.0f - threshold * (dx + dy);
if (alpha < 0.f) alpha = 0.f;
else alpha *= inputUV[2];
@@ -104,10 +104,10 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
/* EWA filtering */
- u = inputUV[0] * inputColorProgram->getWidth();
- v = inputUV[1] * inputColorProgram->getHeight();
+ u = inputUV[0] * this->m_inputColorProgram->getWidth();
+ v = inputUV[1] * this->m_inputColorProgram->getHeight();
- this->inputColorProgram->read(color, u, v, dx, dy, inputBuffers);
+ this->m_inputColorProgram->read(color, u, v, dx, dy, inputBuffers);
/* "premul" */
if (alpha < 1.0f) {
@@ -117,8 +117,8 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
void MapUVOperation::deinitExecution()
{
- this->inputUVProgram = NULL;
- this->inputColorProgram = NULL;
+ this->m_inputUVProgram = NULL;
+ this->m_inputColorProgram = NULL;
}
bool MapUVOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.h b/source/blender/compositor/operations/COM_MapUVOperation.h
index 22e3531e838..c14640da61c 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.h
+++ b/source/blender/compositor/operations/COM_MapUVOperation.h
@@ -29,10 +29,10 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputUVProgram;
- SocketReader *inputColorProgram;
+ SocketReader *m_inputUVProgram;
+ SocketReader *m_inputColorProgram;
- float alpha;
+ float m_alpha;
public:
MapUVOperation();
@@ -57,6 +57,6 @@ public:
*/
void deinitExecution();
- void setAlpha(float alpha) { this->alpha = alpha; }
+ void setAlpha(float alpha) { this->m_alpha = alpha; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp
index 6d7804dd6e3..17d82e85723 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp
@@ -26,19 +26,19 @@ MapValueOperation::MapValueOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void MapValueOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void MapValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float src[4];
- inputOperation->read(src, x, y, sampler, inputBuffers);
- TexMapping *texmap = this->settings;
+ this->m_inputOperation->read(src, x, y, sampler, inputBuffers);
+ TexMapping *texmap = this->m_settings;
float value = (src[0] + texmap->loc[0]) * texmap->size[0];
if (texmap->flag & TEXMAP_CLIP_MIN)
if (value < texmap->min[0])
@@ -52,5 +52,5 @@ void MapValueOperation::executePixel(float *outputValue, float x, float y, Pixel
void MapValueOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.h b/source/blender/compositor/operations/COM_MapValueOperation.h
index 5fae74e0a6a..53157c39938 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.h
+++ b/source/blender/compositor/operations/COM_MapValueOperation.h
@@ -34,8 +34,8 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputOperation;
- TexMapping *settings;
+ SocketReader *m_inputOperation;
+ TexMapping *m_settings;
public:
/**
* Default constructor
@@ -60,7 +60,7 @@ public:
/**
* @brief set the TexMapping settings
*/
- void setSettings(TexMapping *settings) { this->settings = settings; }
+ void setSettings(TexMapping *settings) { this->m_settings = settings; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index 3b7e98433e4..aa16ecf5d09 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -38,69 +38,69 @@ extern "C" {
MaskOperation::MaskOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_VALUE);
- this->mask = NULL;
- this->maskWidth = 0;
- this->maskHeight = 0;
- this->framenumber = 0;
- this->rasterizedMask = NULL;
+ this->m_mask = NULL;
+ this->m_maskWidth = 0;
+ this->m_maskHeight = 0;
+ this->m_framenumber = 0;
+ this->m_rasterizedMask = NULL;
setComplex(true);
}
void MaskOperation::initExecution()
{
initMutex();
- this->rasterizedMask = NULL;
+ this->m_rasterizedMask = NULL;
}
void MaskOperation::deinitExecution()
{
- if (this->rasterizedMask) {
- MEM_freeN(rasterizedMask);
- this->rasterizedMask = NULL;
+ if (this->m_rasterizedMask) {
+ MEM_freeN(this->m_rasterizedMask);
+ this->m_rasterizedMask = NULL;
}
}
void *MaskOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->rasterizedMask)
- return this->rasterizedMask;
+ if (this->m_rasterizedMask)
+ return this->m_rasterizedMask;
- if (!this->mask)
+ if (!this->m_mask)
return NULL;
lockMutex();
- if (this->rasterizedMask == NULL) {
+ if (this->m_rasterizedMask == NULL) {
int width = this->getWidth();
int height = this->getHeight();
float *buffer;
buffer = (float *)MEM_callocN(sizeof(float) * width * height, "rasterized mask");
- BKE_mask_rasterize(mask, width, height, buffer, TRUE, this->do_smooth, this->do_feather);
- if (this->do_smooth) {
+ BKE_mask_rasterize(this->m_mask, width, height, buffer, TRUE, this->m_do_smooth, this->m_do_feather);
+ if (this->m_do_smooth) {
PLX_antialias_buffer(buffer, width, height);
}
- this->rasterizedMask = buffer;
+ this->m_rasterizedMask = buffer;
}
unlockMutex();
- return this->rasterizedMask;
+ return this->m_rasterizedMask;
}
void MaskOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
- if (maskWidth == 0 || maskHeight == 0) {
+ if (this->m_maskWidth == 0 || this->m_maskHeight == 0) {
NodeOperation::determineResolution(resolution, preferredResolution);
}
else {
unsigned int nr[2];
- nr[0] = maskWidth;
- nr[1] = maskHeight;
+ nr[0] = this->m_maskWidth;
+ nr[1] = this->m_maskHeight;
NodeOperation::determineResolution(resolution, nr);
- resolution[0] = maskWidth;
- resolution[1] = maskHeight;
+ resolution[0] = this->m_maskWidth;
+ resolution[1] = this->m_maskHeight;
}
}
diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h
index 6b6d9aa9eeb..d50f5c619bb 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.h
+++ b/source/blender/compositor/operations/COM_MaskOperation.h
@@ -36,13 +36,13 @@
*/
class MaskOperation : public NodeOperation {
protected:
- Mask *mask;
- int maskWidth;
- int maskHeight;
- int framenumber;
- bool do_smooth;
- bool do_feather;
- float *rasterizedMask;
+ Mask *m_mask;
+ int m_maskWidth;
+ int m_maskHeight;
+ int m_framenumber;
+ bool m_do_smooth;
+ bool m_do_feather;
+ float *m_rasterizedMask;
/**
* Determine the output resolution. The resolution is retrieved from the Renderer
@@ -57,12 +57,12 @@ public:
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
- void setMask(Mask *mask) { this->mask = mask; }
- void setMaskWidth(int width) { this->maskWidth = width; }
- void setMaskHeight(int height) { this->maskHeight = height; }
- void setFramenumber(int framenumber) { this->framenumber = framenumber; }
- void setSmooth(bool smooth) { this->do_smooth = smooth; }
- void setFeather(bool feather) { this->do_feather = feather; }
+ void setMask(Mask *mask) { this->m_mask = mask; }
+ void setMaskWidth(int width) { this->m_maskWidth = width; }
+ void setMaskHeight(int height) { this->m_maskHeight = height; }
+ void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
+ void setSmooth(bool smooth) { this->m_do_smooth = smooth; }
+ void setFeather(bool feather) { this->m_do_feather = feather; }
void executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data);
};
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index 5e9fb70b206..1bf89be57b5 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -30,21 +30,21 @@ MathBaseOperation::MathBaseOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->inputValue1Operation = NULL;
- this->inputValue2Operation = NULL;
+ this->m_inputValue1Operation = NULL;
+ this->m_inputValue2Operation = NULL;
}
void MathBaseOperation::initExecution()
{
- this->inputValue1Operation = this->getInputSocketReader(0);
- this->inputValue2Operation = this->getInputSocketReader(1);
+ this->m_inputValue1Operation = this->getInputSocketReader(0);
+ this->m_inputValue2Operation = this->getInputSocketReader(1);
}
void MathBaseOperation::deinitExecution()
{
- this->inputValue1Operation = NULL;
- this->inputValue2Operation = NULL;
+ this->m_inputValue1Operation = NULL;
+ this->m_inputValue2Operation = NULL;
}
void MathBaseOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
@@ -69,8 +69,8 @@ void MathAddOperation::executePixel(float *outputValue, float x, float y, PixelS
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = inputValue1[0] + inputValue2[0];
}
@@ -80,8 +80,8 @@ void MathSubtractOperation::executePixel(float *outputValue, float x, float y, P
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = inputValue1[0] - inputValue2[0];
}
@@ -91,8 +91,8 @@ void MathMultiplyOperation::executePixel(float *outputValue, float x, float y, P
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = inputValue1[0] * inputValue2[0];
}
@@ -102,8 +102,8 @@ void MathDivideOperation::executePixel(float *outputValue, float x, float y, Pix
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
if (inputValue2[0] == 0) /* We don't want to divide by zero. */
outputValue[0] = 0.0;
@@ -116,8 +116,8 @@ void MathSineOperation::executePixel(float *outputValue, float x, float y, Pixel
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = sin(inputValue1[0]);
}
@@ -127,8 +127,8 @@ void MathCosineOperation::executePixel(float *outputValue, float x, float y, Pix
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = cos(inputValue1[0]);
}
@@ -138,8 +138,8 @@ void MathTangentOperation::executePixel(float *outputValue, float x, float y, Pi
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = tan(inputValue1[0]);
}
@@ -149,8 +149,8 @@ void MathArcSineOperation::executePixel(float *outputValue, float x, float y, Pi
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
if (inputValue1[0] <= 1 && inputValue1[0] >= -1)
outputValue[0] = asin(inputValue1[0]);
@@ -163,8 +163,8 @@ void MathArcCosineOperation::executePixel(float *outputValue, float x, float y,
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
if (inputValue1[0] <= 1 && inputValue1[0] >= -1)
outputValue[0] = acos(inputValue1[0]);
@@ -177,8 +177,8 @@ void MathArcTangentOperation::executePixel(float *outputValue, float x, float y,
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = atan(inputValue1[0]);
}
@@ -188,8 +188,8 @@ void MathPowerOperation::executePixel(float *outputValue, float x, float y, Pixe
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
if (inputValue1[0] >= 0) {
outputValue[0] = pow(inputValue1[0], inputValue2[0]);
@@ -211,8 +211,8 @@ void MathLogarithmOperation::executePixel(float *outputValue, float x, float y,
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
if (inputValue1[0] > 0 && inputValue2[0] > 0)
outputValue[0] = log(inputValue1[0]) / log(inputValue2[0]);
@@ -225,8 +225,8 @@ void MathMinimumOperation::executePixel(float *outputValue, float x, float y, Pi
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = min(inputValue1[0], inputValue2[0]);
}
@@ -236,8 +236,8 @@ void MathMaximumOperation::executePixel(float *outputValue, float x, float y, Pi
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = max(inputValue1[0], inputValue2[0]);
}
@@ -247,8 +247,8 @@ void MathRoundOperation::executePixel(float *outputValue, float x, float y, Pixe
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = round(inputValue1[0]);
}
@@ -258,8 +258,8 @@ void MathLessThanOperation::executePixel(float *outputValue, float x, float y, P
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = inputValue1[0] < inputValue2[0] ? 1.0f : 0.0f;
}
@@ -269,8 +269,8 @@ void MathGreaterThanOperation::executePixel(float *outputValue, float x, float y
float inputValue1[4];
float inputValue2[4];
- inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
- inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
+ this->m_inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
+ this->m_inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
outputValue[0] = inputValue1[0] > inputValue2[0] ? 1.0f : 0.0f;
}
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.h b/source/blender/compositor/operations/COM_MathBaseOperation.h
index 12dc5fa36c7..bf77223e26f 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.h
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.h
@@ -34,8 +34,8 @@ protected:
/**
* Prefetched reference to the inputProgram
*/
- SocketReader *inputValue1Operation;
- SocketReader *inputValue2Operation;
+ SocketReader *m_inputValue1Operation;
+ SocketReader *m_inputValue2Operation;
protected:
/**
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.cpp b/source/blender/compositor/operations/COM_MixAddOperation.cpp
index bd9538a5600..7f7315fb3ff 100644
--- a/source/blender/compositor/operations/COM_MixAddOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixAddOperation.cpp
@@ -33,9 +33,9 @@ void MixAddOperation::executePixel(float *outputValue, float x, float y, PixelSa
float inputColor2[4];
float inputValue[4];
- inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
float value = inputValue[0];
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.cpp b/source/blender/compositor/operations/COM_MixBaseOperation.cpp
index 0efab2942b0..fbe92f54aa8 100644
--- a/source/blender/compositor/operations/COM_MixBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixBaseOperation.cpp
@@ -28,17 +28,17 @@ MixBaseOperation::MixBaseOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->inputValueOperation = NULL;
- this->inputColor1Operation = NULL;
- this->inputColor2Operation = NULL;
+ this->m_inputValueOperation = NULL;
+ this->m_inputColor1Operation = NULL;
+ this->m_inputColor2Operation = NULL;
this->setUseValueAlphaMultiply(false);
}
void MixBaseOperation::initExecution()
{
- this->inputValueOperation = this->getInputSocketReader(0);
- this->inputColor1Operation = this->getInputSocketReader(1);
- this->inputColor2Operation = this->getInputSocketReader(2);
+ this->m_inputValueOperation = this->getInputSocketReader(0);
+ this->m_inputColor1Operation = this->getInputSocketReader(1);
+ this->m_inputColor2Operation = this->getInputSocketReader(2);
}
void MixBaseOperation::executePixel(float *outputColor, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -47,9 +47,9 @@ void MixBaseOperation::executePixel(float *outputColor, float x, float y, PixelS
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
@@ -63,9 +63,9 @@ void MixBaseOperation::executePixel(float *outputColor, float x, float y, PixelS
void MixBaseOperation::deinitExecution()
{
- this->inputValueOperation = NULL;
- this->inputColor1Operation = NULL;
- this->inputColor2Operation = NULL;
+ this->m_inputValueOperation = NULL;
+ this->m_inputColor1Operation = NULL;
+ this->m_inputColor2Operation = NULL;
}
void MixBaseOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.h b/source/blender/compositor/operations/COM_MixBaseOperation.h
index 3637cc9eacf..8e9bb283533 100644
--- a/source/blender/compositor/operations/COM_MixBaseOperation.h
+++ b/source/blender/compositor/operations/COM_MixBaseOperation.h
@@ -34,10 +34,10 @@ protected:
/**
* Prefetched reference to the inputProgram
*/
- SocketReader *inputValueOperation;
- SocketReader *inputColor1Operation;
- SocketReader *inputColor2Operation;
- bool valueAlphaMultiply;
+ SocketReader *m_inputValueOperation;
+ SocketReader *m_inputColor1Operation;
+ SocketReader *m_inputColor2Operation;
+ bool m_valueAlphaMultiply;
public:
/**
* Default constructor
@@ -61,7 +61,7 @@ public:
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
- void setUseValueAlphaMultiply(const bool value) { this->valueAlphaMultiply = value; }
- bool useValueAlphaMultiply() { return this->valueAlphaMultiply; }
+ void setUseValueAlphaMultiply(const bool value) { this->m_valueAlphaMultiply = value; }
+ bool useValueAlphaMultiply() { return this->m_valueAlphaMultiply; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.cpp b/source/blender/compositor/operations/COM_MixBlendOperation.cpp
index f010d23ce60..341aba0e7fc 100644
--- a/source/blender/compositor/operations/COM_MixBlendOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixBlendOperation.cpp
@@ -34,9 +34,9 @@ void MixBlendOperation::executePixel(float *outputValue, float x, float y, Pixel
float inputValue[4];
float value;
- inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
value = inputValue[0];
if (this->useValueAlphaMultiply()) {
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.cpp b/source/blender/compositor/operations/COM_MixBurnOperation.cpp
index e94834148e8..039915ab66a 100644
--- a/source/blender/compositor/operations/COM_MixBurnOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixBurnOperation.cpp
@@ -34,9 +34,9 @@ void MixBurnOperation::executePixel(float *outputValue, float x, float y, PixelS
float value;
float tmp;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.cpp b/source/blender/compositor/operations/COM_MixColorOperation.cpp
index f3e893bc18f..cb5791c02bb 100644
--- a/source/blender/compositor/operations/COM_MixColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixColorOperation.cpp
@@ -37,9 +37,9 @@ void MixColorOperation::executePixel(float *outputValue, float x, float y, Pixel
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp b/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
index a36c663ddda..db243cf4a87 100644
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
@@ -33,9 +33,9 @@ void MixDarkenOperation::executePixel(float *outputValue, float x, float y, Pixe
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp b/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
index 69886753480..9fe1a3cb94b 100644
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
@@ -34,9 +34,9 @@ void MixDifferenceOperation::executePixel(float *outputValue, float x, float y,
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.cpp b/source/blender/compositor/operations/COM_MixDivideOperation.cpp
index 8b6586c5336..0e1bd408b89 100644
--- a/source/blender/compositor/operations/COM_MixDivideOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDivideOperation.cpp
@@ -33,9 +33,9 @@ void MixDivideOperation::executePixel(float *outputValue, float x, float y, Pixe
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp b/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
index 971ddd5b736..ea01806267b 100644
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
@@ -34,9 +34,9 @@ void MixDodgeOperation::executePixel(float *outputValue, float x, float y, Pixel
float value;
float tmp;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.cpp b/source/blender/compositor/operations/COM_MixGlareOperation.cpp
index bfb0efe692f..7cd24b3bf06 100644
--- a/source/blender/compositor/operations/COM_MixGlareOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixGlareOperation.cpp
@@ -34,9 +34,9 @@ void MixGlareOperation::executePixel(float *outputValue, float x, float y, Pixel
float inputValue[4];
float value;
- inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
value = inputValue[0];
float mf = 2.f - 2.f * fabsf(value - 0.5f);
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.cpp b/source/blender/compositor/operations/COM_MixHueOperation.cpp
index 05d02805ebc..e7b444616f4 100644
--- a/source/blender/compositor/operations/COM_MixHueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixHueOperation.cpp
@@ -37,9 +37,9 @@ void MixHueOperation::executePixel(float *outputValue, float x, float y, PixelSa
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.cpp b/source/blender/compositor/operations/COM_MixLightenOperation.cpp
index 6e1af7a3c44..89166637f9f 100644
--- a/source/blender/compositor/operations/COM_MixLightenOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixLightenOperation.cpp
@@ -33,9 +33,9 @@ void MixLightenOperation::executePixel(float *outputValue, float x, float y, Pix
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp b/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
index bf1c181b566..5406a3cbcc1 100644
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
@@ -33,9 +33,9 @@ void MixLinearLightOperation::executePixel(float *outputValue, float x, float y,
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp b/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
index 62018ed5698..978e96eb2f6 100644
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
@@ -33,9 +33,9 @@ void MixMultiplyOperation::executePixel(float *outputValue, float x, float y, Pi
float inputColor2[4];
float inputValue[4];
- inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
- inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
- inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(inputValue, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler, inputBuffers);
float value = inputValue[0];
if (this->useValueAlphaMultiply()) {
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp b/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
index a269045c598..f4f96747acd 100644
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
@@ -33,9 +33,9 @@ void MixOverlayOperation::executePixel(float *outputValue, float x, float y, Pix
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp b/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
index 863a17a7f80..c9c6f691fdb 100644
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
@@ -37,9 +37,9 @@ void MixSaturationOperation::executePixel(float *outputValue, float x, float y,
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.cpp b/source/blender/compositor/operations/COM_MixScreenOperation.cpp
index 6fb7befeba4..9bc9144f4ff 100644
--- a/source/blender/compositor/operations/COM_MixScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixScreenOperation.cpp
@@ -33,9 +33,9 @@ void MixScreenOperation::executePixel(float *outputValue, float x, float y, Pixe
float inputColor2[4];
float valuev[4];
- inputValueOperation->read(valuev, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(valuev, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
float value = valuev[0];
if (this->useValueAlphaMultiply()) {
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp b/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
index 9f7d0823473..52c2e8829dc 100644
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
@@ -33,9 +33,9 @@ void MixSoftLightOperation::executePixel(float *outputValue, float x, float y, P
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp b/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
index 80086053872..60f54ab478d 100644
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
@@ -33,9 +33,9 @@ void MixSubtractOperation::executePixel(float *outputValue, float x, float y, Pi
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.cpp b/source/blender/compositor/operations/COM_MixValueOperation.cpp
index cd79c54318d..2651b0d7dee 100644
--- a/source/blender/compositor/operations/COM_MixValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixValueOperation.cpp
@@ -37,9 +37,9 @@ void MixValueOperation::executePixel(float *outputValue, float x, float y, Pixel
float inputColor2[4];
float value;
- inputValueOperation->read(&value, x, y, sampler, inputBuffers);
- inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
- inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
+ this->m_inputValueOperation->read(&value, x, y, sampler, inputBuffers);
+ this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler, inputBuffers);
+ this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler, inputBuffers);
if (this->useValueAlphaMultiply()) {
value *= inputColor2[3];
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
index 662212567de..1af206920c5 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
@@ -28,40 +28,40 @@ extern "C" {
MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_VALUE);
- this->valueSet = false;
- this->framenumber = 0;
- this->attribute = MCA_X;
+ this->m_valueSet = false;
+ this->m_framenumber = 0;
+ this->m_attribute = MCA_X;
}
void MovieClipAttributeOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if (!valueSet) {
+ if (!this->m_valueSet) {
float loc[2], scale, angle;
loc[0] = 0.0f;
loc[1] = 0.0f;
scale = 1.0f;
angle = 0.0f;
- if (clip) {
- int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, framenumber);
- BKE_tracking_stabilization_data_get(&clip->tracking, clip_framenr, getWidth(), getHeight(), loc, &scale, &angle);
+ if (this->m_clip) {
+ int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(this->m_clip, this->m_framenumber);
+ BKE_tracking_stabilization_data_get(&this->m_clip->tracking, clip_framenr, getWidth(), getHeight(), loc, &scale, &angle);
}
- switch (this->attribute) {
+ switch (this->m_attribute) {
case MCA_SCALE:
- this->value = scale;
+ this->m_value = scale;
break;
case MCA_ANGLE:
- this->value = angle;
+ this->m_value = angle;
break;
case MCA_X:
- this->value = loc[0];
+ this->m_value = loc[0];
break;
case MCA_Y:
- this->value = loc[1];
+ this->m_value = loc[1];
break;
}
- valueSet = true;
+ this->m_valueSet = true;
}
- outputValue[0] = this->value;
+ outputValue[0] = this->m_value;
}
void MovieClipAttributeOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
index b6e89fa345c..ba104d07572 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.h
@@ -37,11 +37,11 @@ typedef enum MovieClipAttribute {
*/
class MovieClipAttributeOperation : public NodeOperation {
private:
- MovieClip *clip;
- float value;
- bool valueSet;
- int framenumber;
- MovieClipAttribute attribute;
+ MovieClip *m_clip;
+ float m_value;
+ bool m_valueSet;
+ int m_framenumber;
+ MovieClipAttribute m_attribute;
public:
/**
* Default constructor
@@ -54,8 +54,8 @@ public:
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
- void setMovieClip(MovieClip *clip) { this->clip = clip; }
- void setFramenumber(int framenumber) { this->framenumber = framenumber; }
- void setAttribute(MovieClipAttribute attribute) { this->attribute = attribute; }
+ void setMovieClip(MovieClip *clip) { this->m_clip = clip; }
+ void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
+ void setAttribute(MovieClipAttribute attribute) { this->m_attribute = attribute; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
index b8bda12c626..f53bb66d478 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
@@ -34,23 +34,23 @@ extern "C" {
MovieClipOperation::MovieClipOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_COLOR);
- this->movieClip = NULL;
- this->movieClipBuffer = NULL;
- this->movieClipUser = NULL;
- this->movieClipwidth = 0;
- this->movieClipheight = 0;
- this->framenumber = 0;
+ this->m_movieClip = NULL;
+ this->m_movieClipBuffer = NULL;
+ this->m_movieClipUser = NULL;
+ this->m_movieClipwidth = 0;
+ this->m_movieClipheight = 0;
+ this->m_framenumber = 0;
}
void MovieClipOperation::initExecution()
{
- if (this->movieClip) {
- BKE_movieclip_user_set_frame(this->movieClipUser, this->framenumber);
+ if (this->m_movieClip) {
+ BKE_movieclip_user_set_frame(this->m_movieClipUser, this->m_framenumber);
ImBuf *ibuf;
- ibuf = BKE_movieclip_get_ibuf(this->movieClip, this->movieClipUser);
+ ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, this->m_movieClipUser);
if (ibuf) {
- this->movieClipBuffer = ibuf;
+ this->m_movieClipBuffer = ibuf;
if (ibuf->rect_float == NULL || ibuf->userflags & IB_RECT_INVALID) {
IMB_float_from_rect(ibuf);
ibuf->userflags &= ~IB_RECT_INVALID;
@@ -61,10 +61,10 @@ void MovieClipOperation::initExecution()
void MovieClipOperation::deinitExecution()
{
- if (this->movieClipBuffer) {
- IMB_freeImBuf(this->movieClipBuffer);
+ if (this->m_movieClipBuffer) {
+ IMB_freeImBuf(this->m_movieClipBuffer);
- this->movieClipBuffer = NULL;
+ this->m_movieClipBuffer = NULL;
}
}
@@ -73,10 +73,10 @@ void MovieClipOperation::determineResolution(unsigned int resolution[], unsigned
resolution[0] = 0;
resolution[1] = 0;
- if (this->movieClip) {
+ if (this->m_movieClip) {
int width, height;
- BKE_movieclip_get_size(this->movieClip, this->movieClipUser, &width, &height);
+ BKE_movieclip_get_size(this->m_movieClip, this->m_movieClipUser, &width, &height);
resolution[0] = width;
resolution[1] = height;
@@ -85,22 +85,19 @@ void MovieClipOperation::determineResolution(unsigned int resolution[], unsigned
void MovieClipOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if (this->movieClipBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
- color[0] = 0.0f;
- color[1] = 0.0f;
- color[2] = 0.0f;
- color[3] = 0.0f;
+ if (this->m_movieClipBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) {
+ zero_v4(color);
}
else {
switch (sampler) {
case COM_PS_NEAREST:
- neareast_interpolation_color(this->movieClipBuffer, NULL, color, x, y);
+ neareast_interpolation_color(this->m_movieClipBuffer, NULL, color, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->movieClipBuffer, NULL, color, x, y);
+ bilinear_interpolation_color(this->m_movieClipBuffer, NULL, color, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->movieClipBuffer, NULL, color, x, y);
+ bicubic_interpolation_color(this->m_movieClipBuffer, NULL, color, x, y);
break;
}
}
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h b/source/blender/compositor/operations/COM_MovieClipOperation.h
index 454c442a167..2e824009ab6 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.h
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.h
@@ -37,12 +37,12 @@
*/
class MovieClipOperation : public NodeOperation {
protected:
- MovieClip *movieClip;
- MovieClipUser *movieClipUser;
- ImBuf *movieClipBuffer;
- int movieClipheight;
- int movieClipwidth;
- int framenumber;
+ MovieClip *m_movieClip;
+ MovieClipUser *m_movieClipUser;
+ ImBuf *m_movieClipBuffer;
+ int m_movieClipheight;
+ int m_movieClipwidth;
+ int m_framenumber;
/**
* Determine the output resolution. The resolution is retrieved from the Renderer
@@ -54,10 +54,10 @@ public:
void initExecution();
void deinitExecution();
- void setMovieClip(MovieClip *image) { this->movieClip = image; }
- void setMovieClipUser(MovieClipUser *imageuser) { this->movieClipUser = imageuser; }
+ void setMovieClip(MovieClip *image) { this->m_movieClip = image; }
+ void setMovieClipUser(MovieClipUser *imageuser) { this->m_movieClipUser = imageuser; }
- void setFramenumber(int framenumber) { this->framenumber = framenumber; }
+ void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
};
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index 5320f901747..6b423cadcc6 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -37,57 +37,57 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperat
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->movieClip = NULL;
- this->cache = NULL;
- this->distortion = distortion;
+ this->m_inputOperation = NULL;
+ this->m_movieClip = NULL;
+ this->m_cache = NULL;
+ this->m_distortion = distortion;
}
void MovieDistortionOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- if (this->movieClip) {
+ this->m_inputOperation = this->getInputSocketReader(0);
+ if (this->m_movieClip) {
MovieClipUser clipUser = {0};
int calibration_width, calibration_height;
- BKE_movieclip_user_set_frame(&clipUser, this->framenumber);
- BKE_movieclip_get_size(this->movieClip, &clipUser, &calibration_width, &calibration_height);
+ BKE_movieclip_user_set_frame(&clipUser, this->m_framenumber);
+ BKE_movieclip_get_size(this->m_movieClip, &clipUser, &calibration_width, &calibration_height);
for (unsigned int i = 0; i < s_cache.size(); i++) {
DistortionCache *c = (DistortionCache *)s_cache[i];
- if (c->isCacheFor(this->movieClip, this->width, this->height,
- calibration_width, calibration_height, this->distortion))
+ if (c->isCacheFor(this->m_movieClip, this->m_width, this->m_height,
+ calibration_width, calibration_height, this->m_distortion))
{
- this->cache = c;
+ this->m_cache = c;
return;
}
}
- DistortionCache *newC = new DistortionCache(this->movieClip, this->width, this->height,
- calibration_width, calibration_height, this->distortion);
+ DistortionCache *newC = new DistortionCache(this->m_movieClip, this->m_width, this->m_height,
+ calibration_width, calibration_height, this->m_distortion);
s_cache.push_back(newC);
- this->cache = newC;
+ this->m_cache = newC;
}
else {
- this->cache = NULL;
+ this->m_cache = NULL;
}
}
void MovieDistortionOperation::deinitExecution()
{
- this->inputOperation = NULL;
- this->movieClip = NULL;
+ this->m_inputOperation = NULL;
+ this->m_movieClip = NULL;
}
void MovieDistortionOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if (this->cache != NULL) {
+ if (this->m_cache != NULL) {
float u, v;
- this->cache->getUV(&this->movieClip->tracking, x, y, &u, &v);
- this->inputOperation->read(color, u, v, sampler, inputBuffers);
+ this->m_cache->getUV(&this->m_movieClip->tracking, x, y, &u, &v);
+ this->m_inputOperation->read(color, u, v, sampler, inputBuffers);
}
else {
- this->inputOperation->read(color, x, y, sampler, inputBuffers);
+ this->m_inputOperation->read(color, x, y, sampler, inputBuffers);
}
}
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
index c2ce04a78e1..ab81ae44597 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h
@@ -31,100 +31,101 @@ extern "C" {
class DistortionCache {
private:
- float k1;
- float k2;
- float k3;
- float principal_x;
- float principal_y;
- float pixel_aspect;
- int width;
- int height;
- int calibration_width;
- int calibration_height;
- bool inverted;
- float *buffer;
- int *bufferCalculated;
+ float m_k1;
+ float m_k2;
+ float m_k3;
+ float m_principal_x;
+ float m_principal_y;
+ float m_pixel_aspect;
+ int m_width;
+ int m_height;
+ int m_calibration_width;
+ int m_calibration_height;
+ bool m_inverted;
+ float *m_buffer;
+ int *m_bufferCalculated;
public:
DistortionCache(MovieClip *movieclip, int width, int height, int calibration_width, int calibration_height, bool inverted) {
- this->k1 = movieclip->tracking.camera.k1;
- this->k2 = movieclip->tracking.camera.k2;
- this->k3 = movieclip->tracking.camera.k3;
- this->principal_x = movieclip->tracking.camera.principal[0];
- this->principal_y = movieclip->tracking.camera.principal[1];
- this->pixel_aspect = movieclip->tracking.camera.pixel_aspect;
- this->width = width;
- this->height = height;
- this->calibration_width = calibration_width;
- this->calibration_height = calibration_height;
- this->inverted = inverted;
- this->bufferCalculated = new int[this->width * this->height];
- this->buffer = new float[this->width * this->height * 2];
- for (int i = 0; i < this->width * this->height; i++) {
- this->bufferCalculated[i] = 0;
+ this->m_k1 = movieclip->tracking.camera.k1;
+ this->m_k2 = movieclip->tracking.camera.k2;
+ this->m_k3 = movieclip->tracking.camera.k3;
+ this->m_principal_x = movieclip->tracking.camera.principal[0];
+ this->m_principal_y = movieclip->tracking.camera.principal[1];
+ this->m_pixel_aspect = movieclip->tracking.camera.pixel_aspect;
+ this->m_width = width;
+ this->m_height = height;
+ this->m_calibration_width = calibration_width;
+ this->m_calibration_height = calibration_height;
+ this->m_inverted = inverted;
+ this->m_bufferCalculated = new int[this->m_width * this->m_height];
+ this->m_buffer = new float[this->m_width * this->m_height * 2];
+ for (int i = 0; i < this->m_width * this->m_height; i++) {
+ this->m_bufferCalculated[i] = 0;
}
}
bool isCacheFor(MovieClip *movieclip, int width, int height, int calibration_width, int claibration_height, bool inverted) {
- return this->k1 == movieclip->tracking.camera.k1 &&
- this->k2 == movieclip->tracking.camera.k2 &&
- this->k3 == movieclip->tracking.camera.k3 &&
- this->principal_x == movieclip->tracking.camera.principal[0] &&
- this->principal_y == movieclip->tracking.camera.principal[1] &&
- this->pixel_aspect == movieclip->tracking.camera.pixel_aspect &&
- this->inverted == inverted &&
- this->width == width &&
- this->height == height &&
- this->calibration_width == calibration_width &&
- this->calibration_height == calibration_height;
+ return this->m_k1 == movieclip->tracking.camera.k1 &&
+ this->m_k2 == movieclip->tracking.camera.k2 &&
+ this->m_k3 == movieclip->tracking.camera.k3 &&
+ this->m_principal_x == movieclip->tracking.camera.principal[0] &&
+ this->m_principal_y == movieclip->tracking.camera.principal[1] &&
+ this->m_pixel_aspect == movieclip->tracking.camera.pixel_aspect &&
+ this->m_inverted == inverted &&
+ this->m_width == width &&
+ this->m_height == height &&
+ this->m_calibration_width == this->m_calibration_width &&
+ this->m_calibration_height == this->m_calibration_height;
}
- void getUV(MovieTracking *trackingData, int x, int y, float *u, float *v) {
- if (x < 0 || x >= this->width || y < 0 || y >= this->height) {
+ void getUV(MovieTracking *trackingData, int x, int y, float *u, float *v)
+ {
+ if (x < 0 || x >= this->m_width || y < 0 || y >= this->m_height) {
*u = x;
*v = y;
}
else {
- int offset = y * this->width + x;
+ int offset = y * this->m_width + x;
int offset2 = offset * 2;
- if (!bufferCalculated[offset]) {
+ if (!this->m_bufferCalculated[offset]) {
//float overscan = 0.0f;
- float w = (float)this->width /* / (1 + overscan) */;
- float h = (float)this->height /* / (1 + overscan) */;
- float aspx = (float)w / this->calibration_width;
- float aspy = (float)h / this->calibration_height;
+ float w = (float)this->m_width /* / (1 + overscan) */;
+ float h = (float)this->m_height /* / (1 + overscan) */;
+ float aspx = (float)w / this->m_calibration_width;
+ float aspy = (float)h / this->m_calibration_height;
float in[2];
float out[2];
in[0] = (x /* - 0.5 * overscan * w */) / aspx;
- in[1] = (y /* - 0.5 * overscan * h */) / aspy / this->pixel_aspect;
+ in[1] = (y /* - 0.5 * overscan * h */) / aspy / this->m_pixel_aspect;
- if (inverted) {
+ if (this->m_inverted) {
BKE_tracking_undistort_v2(trackingData, in, out);
}
else {
BKE_tracking_distort_v2(trackingData, in, out);
}
- buffer[offset2] = out[0] * aspx /* + 0.5 * overscan * w */;
- buffer[offset2 + 1] = (out[1] * aspy /* + 0.5 * overscan * h */) * this->pixel_aspect;
+ this->m_buffer[offset2] = out[0] * aspx /* + 0.5 * overscan * w */;
+ this->m_buffer[offset2 + 1] = (out[1] * aspy /* + 0.5 * overscan * h */) * this->m_pixel_aspect;
- bufferCalculated[offset] = 1;
+ this->m_bufferCalculated[offset] = 1;
}
- *u = buffer[offset2];
- *v = buffer[offset2 + 1];
+ *u = this->m_buffer[offset2];
+ *v = this->m_buffer[offset2 + 1];
}
}
};
class MovieDistortionOperation : public NodeOperation {
private:
- DistortionCache *cache;
- SocketReader *inputOperation;
- MovieClip *movieClip;
+ DistortionCache *m_cache;
+ SocketReader *m_inputOperation;
+ MovieClip *m_movieClip;
protected:
- bool distortion;
- int framenumber;
+ bool m_distortion;
+ int m_framenumber;
public:
MovieDistortionOperation(bool distortion);
@@ -134,8 +135,8 @@ public:
void initExecution();
void deinitExecution();
- void setMovieClip(MovieClip *clip) { this->movieClip = clip; }
- void setFramenumber(int framenumber) { this->framenumber = framenumber; }
+ void setMovieClip(MovieClip *clip) { this->m_movieClip = clip; }
+ void setFramenumber(int framenumber) { this->m_framenumber = framenumber; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
index 1bd21f6e712..363c0379770 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -29,15 +29,15 @@ extern "C" {
MultilayerBaseOperation::MultilayerBaseOperation(int pass) : BaseImageOperation()
{
- this->passId = pass;
+ this->m_passId = pass;
}
ImBuf *MultilayerBaseOperation::getImBuf()
{
RenderPass *rpass;
- rpass = (RenderPass *)BLI_findlink(&this->renderlayer->passes, this->passId);
+ rpass = (RenderPass *)BLI_findlink(&this->m_renderlayer->passes, this->m_passId);
if (rpass) {
- this->imageUser->pass = this->passId;
- BKE_image_multilayer_index(image->rr, this->imageUser);
+ this->m_imageUser->pass = this->m_passId;
+ BKE_image_multilayer_index(this->m_image->rr, this->m_imageUser);
return BaseImageOperation::getImBuf();
}
return NULL;
@@ -47,31 +47,29 @@ void MultilayerColorOperation::executePixel(float *color, float x, float y, Pixe
{
int yi = y;
int xi = x;
- if (this->imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
+ 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;
}
else {
- if (this->numberOfChannels == 4) {
+ if (this->m_numberOfChannels == 4) {
switch (sampler) {
case COM_PS_NEAREST:
- neareast_interpolation_color(this->buffer, NULL, color, x, y);
+ neareast_interpolation_color(this->m_buffer, NULL, color, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->buffer, NULL, color, x, y);
+ bilinear_interpolation_color(this->m_buffer, NULL, color, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->buffer, NULL, color, x, y);
+ bicubic_interpolation_color(this->m_buffer, NULL, color, x, y);
break;
}
}
else {
int offset = (yi * this->getWidth() + xi) * 3;
- color[0] = this->imageBuffer[offset];
- color[1] = this->imageBuffer[offset + 1];
- color[2] = this->imageBuffer[offset + 2];
+ copy_v3_v3(color, &this->m_imageBuffer[offset]);
}
}
}
@@ -80,11 +78,11 @@ void MultilayerValueOperation::executePixel(float *color, float x, float y, Pixe
{
int yi = y;
int xi = x;
- if (this->imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
+ if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
color[0] = 0.0f;
}
else {
- float result = this->imageBuffer[yi * this->getWidth() + xi];
+ float result = this->m_imageBuffer[yi * this->getWidth() + xi];
color[0] = result;
}
}
@@ -93,13 +91,11 @@ void MultilayerVectorOperation::executePixel(float *color, float x, float y, Pix
{
int yi = y;
int xi = x;
- if (this->imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
+ if (this->m_imageBuffer == NULL || xi < 0 || yi < 0 || (unsigned int)xi >= this->getWidth() || (unsigned int)yi >= this->getHeight() ) {
color[0] = 0.0f;
}
else {
int offset = (yi * this->getWidth() + xi) * 3;
- color[0] = this->imageBuffer[offset];
- color[1] = this->imageBuffer[offset + 1];
- color[2] = this->imageBuffer[offset + 2];
+ copy_v3_v3(color, &this->m_imageBuffer[offset]);
}
}
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.h b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
index c33e65fc55b..f946c44dd35 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.h
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.h
@@ -29,8 +29,8 @@
class MultilayerBaseOperation : public BaseImageOperation {
private:
- int passId;
- RenderLayer *renderlayer;
+ int m_passId;
+ RenderLayer *m_renderlayer;
protected:
ImBuf *getImBuf();
public:
@@ -38,7 +38,7 @@ public:
* Constructor
*/
MultilayerBaseOperation(int pass);
- void setRenderLayer(RenderLayer *renderlayer) { this->renderlayer = renderlayer; }
+ void setRenderLayer(RenderLayer *renderlayer) { this->m_renderlayer = renderlayer; }
};
class MultilayerColorOperation : public MultilayerBaseOperation {
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cpp b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
index c0c22e05508..8a83ef7f3ae 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
@@ -25,13 +25,13 @@ NormalizeOperation::NormalizeOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->imageReader = NULL;
- this->cachedInstance = NULL;
+ this->m_imageReader = NULL;
+ this->m_cachedInstance = NULL;
this->setComplex(true);
}
void NormalizeOperation::initExecution()
{
- this->imageReader = this->getInputSocketReader(0);
+ this->m_imageReader = this->getInputSocketReader(0);
NodeOperation::initMutex();
}
@@ -41,16 +41,16 @@ void NormalizeOperation::executePixel(float *color, int x, int y, MemoryBuffer *
NodeTwoFloats *minmult = (NodeTwoFloats *)data;
float output[4];
- this->imageReader->read(output, x, y, inputBuffers, NULL);
+ this->m_imageReader->read(output, x, y, inputBuffers, NULL);
color[0] = (output[0] - minmult->x) * minmult->y;
}
void NormalizeOperation::deinitExecution()
{
- this->imageReader = NULL;
- if (this->cachedInstance) {
- delete cachedInstance;
+ this->m_imageReader = NULL;
+ if (this->m_cachedInstance) {
+ delete this->m_cachedInstance;
}
NodeOperation::deinitMutex();
}
@@ -58,7 +58,7 @@ void NormalizeOperation::deinitExecution()
bool NormalizeOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti imageInput;
- if (this->cachedInstance) return false;
+ if (this->m_cachedInstance) return false;
NodeOperation *operation = getInputOperation(0);
imageInput.xmax = operation->getWidth();
@@ -78,8 +78,8 @@ bool NormalizeOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
void *NormalizeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (this->cachedInstance == NULL) {
- MemoryBuffer *tile = (MemoryBuffer *)imageReader->initializeTileData(rect, memoryBuffers);
+ if (this->m_cachedInstance == NULL) {
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers);
/* using generic two floats struct to store x: min y: mult */
NodeTwoFloats *minmult = new NodeTwoFloats();
@@ -106,11 +106,11 @@ void *NormalizeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBu
/* The rare case of flat buffer would cause a divide by 0 */
minmult->y = ((maxv != minv) ? 1.0f / (maxv - minv) : 0.f);
- this->cachedInstance = minmult;
+ this->m_cachedInstance = minmult;
}
unlockMutex();
- return this->cachedInstance;
+ return this->m_cachedInstance;
}
void NormalizeOperation::deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data)
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.h b/source/blender/compositor/operations/COM_NormalizeOperation.h
index de1c4d67bba..1f4a403434e 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.h
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.h
@@ -33,13 +33,13 @@ protected:
/**
* @brief Cached reference to the reader
*/
- SocketReader *imageReader;
+ SocketReader *m_imageReader;
/**
* @brief temporarily cache of the execution storage
* it stores x->min and y->mult
*/
- NodeTwoFloats *cachedInstance;
+ NodeTwoFloats *m_cachedInstance;
public:
NormalizeOperation();
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index c0aa139b032..ecfcdb7c70f 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -94,59 +94,59 @@ static void write_buffer_rect(rcti *rect, MemoryBuffer **memoryBuffers, const bN
OutputSingleLayerOperation::OutputSingleLayerOperation(
const RenderData *rd, const bNodeTree *tree, DataType datatype, ImageFormatData *format, const char *path)
{
- this->rd = rd;
- this->tree = tree;
+ this->m_rd = rd;
+ this->m_tree = tree;
this->addInputSocket(datatype);
- this->outputBuffer = NULL;
- this->datatype = datatype;
- this->imageInput = NULL;
+ this->m_outputBuffer = NULL;
+ this->m_datatype = datatype;
+ this->m_imageInput = NULL;
- this->format = format;
- BLI_strncpy(this->path, path, sizeof(this->path));
+ this->m_format = format;
+ BLI_strncpy(this->m_path, path, sizeof(this->m_path));
}
void OutputSingleLayerOperation::initExecution()
{
- this->imageInput = getInputSocketReader(0);
- this->outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->datatype);
+ this->m_imageInput = getInputSocketReader(0);
+ this->m_outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_datatype);
}
void OutputSingleLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
{
- write_buffer_rect(rect, memoryBuffers, this->tree, imageInput, this->outputBuffer, this->getWidth(), this->datatype);
+ write_buffer_rect(rect, memoryBuffers, this->m_tree, this->m_imageInput, this->m_outputBuffer, this->getWidth(), this->m_datatype);
}
void OutputSingleLayerOperation::deinitExecution()
{
if (this->getWidth() * this->getHeight() != 0) {
- int size = get_datatype_size(this->datatype);
+ int size = get_datatype_size(this->m_datatype);
ImBuf *ibuf = IMB_allocImBuf(this->getWidth(), this->getHeight(), size * 8, 0);
Main *bmain = G.main; /* TODO, have this passed along */
char filename[FILE_MAX];
ibuf->channels = size;
- ibuf->rect_float = this->outputBuffer;
+ ibuf->rect_float = this->m_outputBuffer;
ibuf->mall |= IB_rectfloat;
- ibuf->dither = this->rd->dither_intensity;
+ ibuf->dither = this->m_rd->dither_intensity;
- if (this->rd->color_mgt_flag & R_COLOR_MANAGEMENT)
+ if (this->m_rd->color_mgt_flag & R_COLOR_MANAGEMENT)
ibuf->profile = IB_PROFILE_LINEAR_RGB;
- BKE_makepicstring(filename, this->path, bmain->name, this->rd->cfra, this->format->imtype,
- (this->rd->scemode & R_EXTENSION), true);
+ BKE_makepicstring(filename, this->m_path, bmain->name, this->m_rd->cfra, this->m_format->imtype,
+ (this->m_rd->scemode & R_EXTENSION), true);
- if (0 == BKE_imbuf_write(ibuf, filename, this->format))
+ if (0 == BKE_imbuf_write(ibuf, filename, this->m_format))
printf("Cannot save Node File Output to %s\n", filename);
else
printf("Saved: %s\n", filename);
IMB_freeImBuf(ibuf);
}
- this->outputBuffer = NULL;
- this->imageInput = NULL;
+ this->m_outputBuffer = NULL;
+ this->m_imageInput = NULL;
}
@@ -162,31 +162,31 @@ OutputOpenExrLayer::OutputOpenExrLayer(const char *name, DataType datatype)
OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(
const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec)
{
- this->rd = rd;
- this->tree = tree;
+ this->m_rd = rd;
+ this->m_tree = tree;
- BLI_strncpy(this->path, path, sizeof(this->path));
- this->exr_codec = exr_codec;
+ BLI_strncpy(this->m_path, path, sizeof(this->m_path));
+ this->m_exr_codec = exr_codec;
}
void OutputOpenExrMultiLayerOperation::add_layer(const char *name, DataType datatype)
{
this->addInputSocket(datatype);
- layers.push_back(OutputOpenExrLayer(name, datatype));
+ this->m_layers.push_back(OutputOpenExrLayer(name, datatype));
}
void OutputOpenExrMultiLayerOperation::initExecution()
{
- for (unsigned int i = 0; i < layers.size(); ++i) {
- layers[i].imageInput = getInputSocketReader(i);
- layers[i].outputBuffer = init_buffer(this->getWidth(), this->getHeight(), layers[i].datatype);
+ for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
+ this->m_layers[i].imageInput = getInputSocketReader(i);
+ this->m_layers[i].outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_layers[i].datatype);
}
}
void OutputOpenExrMultiLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
{
- for (unsigned int i = 0; i < layers.size(); ++i) {
- write_buffer_rect(rect, memoryBuffers, this->tree, layers[i].imageInput, layers[i].outputBuffer, this->getWidth(), layers[i].datatype);
+ for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
+ write_buffer_rect(rect, memoryBuffers, this->m_tree, this->m_layers[i].imageInput, this->m_layers[i].outputBuffer, this->getWidth(), this->m_layers[i].datatype);
}
}
@@ -199,19 +199,19 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
char filename[FILE_MAX];
void *exrhandle = IMB_exr_get_handle();
- BKE_makepicstring(filename, this->path, bmain->name, this->rd->cfra, R_IMF_IMTYPE_MULTILAYER,
- (this->rd->scemode & R_EXTENSION), true);
+ BKE_makepicstring(filename, this->m_path, bmain->name, this->m_rd->cfra, R_IMF_IMTYPE_MULTILAYER,
+ (this->m_rd->scemode & R_EXTENSION), true);
BLI_make_existing_file(filename);
- for (unsigned int i = 0; i < layers.size(); ++i) {
+ for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
char channelname[EXR_TOT_MAXNAME];
- BLI_strncpy(channelname, layers[i].name, sizeof(channelname) - 2);
+ BLI_strncpy(channelname, this->m_layers[i].name, sizeof(channelname) - 2);
char *channelname_ext = channelname + strlen(channelname);
- float *buf = layers[i].outputBuffer;
+ float *buf = this->m_layers[i].outputBuffer;
/* create channels */
- switch (layers[i].datatype) {
+ switch (this->m_layers[i].datatype) {
case COM_DT_VALUE:
strcpy(channelname_ext, ".V");
IMB_exr_add_channel(exrhandle, 0, channelname, 1, width, buf);
@@ -241,7 +241,7 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
}
/* when the filename has no permissions, this can fail */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->exr_codec)) {
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec)) {
IMB_exr_write_channels(exrhandle);
}
else {
@@ -251,13 +251,13 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
}
IMB_exr_close(exrhandle);
- for (unsigned int i = 0; i < layers.size(); ++i) {
- if (layers[i].outputBuffer) {
- MEM_freeN(layers[i].outputBuffer);
- layers[i].outputBuffer = NULL;
+ for (unsigned int i = 0; i < this->m_layers.size(); ++i) {
+ if (this->m_layers[i].outputBuffer) {
+ MEM_freeN(this->m_layers[i].outputBuffer);
+ this->m_layers[i].outputBuffer = NULL;
}
- layers[i].imageInput = NULL;
+ this->m_layers[i].imageInput = NULL;
}
}
}
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h
index 25ee5b31ec0..60244a8bf72 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.h
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.h
@@ -32,15 +32,15 @@
/* Writes the image to a single-layer file. */
class OutputSingleLayerOperation : public NodeOperation {
private:
- const RenderData *rd;
- const bNodeTree *tree;
+ const RenderData *m_rd;
+ const bNodeTree *m_tree;
- ImageFormatData *format;
- char path[FILE_MAX];
+ ImageFormatData *m_format;
+ char m_path[FILE_MAX];
- float *outputBuffer;
- DataType datatype;
- SocketReader *imageInput;
+ float *m_outputBuffer;
+ DataType m_datatype;
+ SocketReader *m_imageInput;
public:
OutputSingleLayerOperation(const RenderData *rd, const bNodeTree *tree, DataType datatype, ImageFormatData *format, const char *path);
@@ -67,12 +67,12 @@ class OutputOpenExrMultiLayerOperation : public NodeOperation {
private:
typedef std::vector<OutputOpenExrLayer> LayerList;
- const RenderData *rd;
- const bNodeTree *tree;
+ const RenderData *m_rd;
+ const bNodeTree *m_tree;
- char path[FILE_MAX];
- char exr_codec;
- LayerList layers;
+ char m_path[FILE_MAX];
+ char m_exr_codec;
+ LayerList m_layers;
public:
OutputOpenExrMultiLayerOperation(const RenderData *rd, const bNodeTree *tree, const char *path, char exr_codec);
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp
index 54a95af33b9..55e94568688 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cpp
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp
@@ -42,39 +42,41 @@ extern "C" {
PreviewOperation::PreviewOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
- this->outputBuffer = NULL;
- this->input = NULL;
- this->divider = 1.0f;
- this->node = NULL;
+ this->m_outputBuffer = NULL;
+ this->m_input = NULL;
+ this->m_divider = 1.0f;
+ this->m_node = NULL;
}
void PreviewOperation::initExecution()
{
- this->input = getInputSocketReader(0);
- if (!this->node->preview) {
- this->node->preview = (bNodePreview *)MEM_callocN(sizeof(bNodePreview), "node preview");
+ this->m_input = getInputSocketReader(0);
+ if (!this->m_node->preview) {
+ this->m_node->preview = (bNodePreview *)MEM_callocN(sizeof(bNodePreview), "node preview");
}
else {
- if (this->getWidth() == (unsigned int)this->node->preview->xsize && this->getHeight() == (unsigned int)this->node->preview->ysize) {
- this->outputBuffer = this->node->preview->rect;
+ if (this->getWidth() == (unsigned int)this->m_node->preview->xsize &&
+ this->getHeight() == (unsigned int)this->m_node->preview->ysize)
+ {
+ this->m_outputBuffer = this->m_node->preview->rect;
}
}
- if (this->outputBuffer == NULL) {
- this->outputBuffer = (unsigned char *)MEM_callocN(sizeof(unsigned char) * 4 * getWidth() * getHeight(), "PreviewOperation");
- if (this->node->preview->rect) {
- MEM_freeN(this->node->preview->rect);
+ if (this->m_outputBuffer == NULL) {
+ this->m_outputBuffer = (unsigned char *)MEM_callocN(sizeof(unsigned char) * 4 * getWidth() * getHeight(), "PreviewOperation");
+ if (this->m_node->preview->rect) {
+ MEM_freeN(this->m_node->preview->rect);
}
- this->node->preview->xsize = getWidth();
- this->node->preview->ysize = getHeight();
- this->node->preview->rect = outputBuffer;
+ this->m_node->preview->xsize = getWidth();
+ this->m_node->preview->ysize = getHeight();
+ this->m_node->preview->rect = this->m_outputBuffer;
}
}
void PreviewOperation::deinitExecution()
{
- this->outputBuffer = NULL;
- this->input = NULL;
+ this->m_outputBuffer = NULL;
+ this->m_input = NULL;
}
void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
@@ -84,16 +86,16 @@ void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber, Memory
for (int y = rect->ymin; y < rect->ymax; y++) {
offset = (y * getWidth() + rect->xmin) * 4;
for (int x = rect->xmin; x < rect->xmax; x++) {
- float rx = floor(x / divider);
- float ry = floor(y / divider);
+ float rx = floor(x / this->m_divider);
+ float ry = floor(y / this->m_divider);
color[0] = 0.0f;
color[1] = 0.0f;
color[2] = 0.0f;
color[3] = 1.0f;
- input->read(color, rx, ry, COM_PS_NEAREST, memoryBuffers);
+ this->m_input->read(color, rx, ry, COM_PS_NEAREST, memoryBuffers);
linearrgb_to_srgb_v4(color, color);
- F4TOCHAR4(color, outputBuffer + offset);
+ F4TOCHAR4(color, this->m_outputBuffer + offset);
offset += 4;
}
}
@@ -102,10 +104,10 @@ bool PreviewOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferO
{
rcti newInput;
- newInput.xmin = input->xmin / divider;
- newInput.xmax = input->xmax / divider;
- newInput.ymin = input->ymin / divider;
- newInput.ymax = input->ymax / divider;
+ newInput.xmin = input->xmin / this->m_divider;
+ newInput.xmax = input->xmax / this->m_divider;
+ newInput.ymin = input->ymin / this->m_divider;
+ newInput.ymax = input->ymax / this->m_divider;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -114,15 +116,15 @@ void PreviewOperation::determineResolution(unsigned int resolution[], unsigned i
NodeOperation::determineResolution(resolution, preferredResolution);
int width = resolution[0];
int height = resolution[1];
- this->divider = 0.0f;
+ this->m_divider = 0.0f;
if (width > height) {
- divider = COM_PREVIEW_SIZE / (width - 1);
+ this->m_divider = COM_PREVIEW_SIZE / (width - 1);
}
else {
- divider = COM_PREVIEW_SIZE / (height - 1);
+ this->m_divider = COM_PREVIEW_SIZE / (height - 1);
}
- width = width * divider;
- height = height * divider;
+ width = width * this->m_divider;
+ height = height * this->m_divider;
resolution[0] = width;
resolution[1] = height;
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.h b/source/blender/compositor/operations/COM_PreviewOperation.h
index f9ce0c644a1..e7b8ba55ae0 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.h
+++ b/source/blender/compositor/operations/COM_PreviewOperation.h
@@ -28,14 +28,14 @@
class PreviewOperation : public NodeOperation {
protected:
- unsigned char *outputBuffer;
+ unsigned char *m_outputBuffer;
/**
* @brief holds reference to the SDNA bNode, where this nodes will render the preview image for
*/
- bNode *node;
- SocketReader *input;
- float divider;
+ bNode *m_node;
+ SocketReader *m_input;
+ float m_divider;
public:
PreviewOperation();
@@ -46,7 +46,7 @@ public:
void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers);
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
- void setbNode(bNode *node) { this->node = node; }
+ void setbNode(bNode *node) { this->m_node = node; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
bool isPreviewOperation() { return true; }
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index b337e435df4..50bac63d6f2 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -30,19 +30,19 @@ ProjectorLensDistortionOperation::ProjectorLensDistortionOperation() : NodeOpera
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputProgram = NULL;
- this->dispersionAvailable = false;
- this->dispersion = 0.0f;
+ this->m_inputProgram = NULL;
+ this->m_dispersionAvailable = false;
+ this->m_dispersion = 0.0f;
}
void ProjectorLensDistortionOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void *ProjectorLensDistortionOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
updateDispersion(memoryBuffers);
- void *buffer = inputProgram->initializeTileData(NULL, memoryBuffers);
+ void *buffer = this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
return buffer;
}
@@ -54,45 +54,45 @@ void ProjectorLensDistortionOperation::executePixel(float *color, int x, int y,
const float v = (y + 0.5f) / height;
const float u = (x + 0.5f) / width;
MemoryBuffer *inputBuffer = (MemoryBuffer *)data;
- inputBuffer->readCubic(inputValue, (u * width + kr2) - 0.5f, v * height - 0.5f);
+ inputBuffer->readCubic(inputValue, (u * width + this->m_kr2) - 0.5f, v * height - 0.5f);
color[0] = inputValue[0];
inputBuffer->read(inputValue, x, y);
color[1] = inputValue[1];
- inputBuffer->readCubic(inputValue, (u * width - kr2) - 0.5f, v * height - 0.5f);
+ inputBuffer->readCubic(inputValue, (u * width - this->m_kr2) - 0.5f, v * height - 0.5f);
color[2] = inputValue[2];
color[3] = 1.0f;
}
void ProjectorLensDistortionOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti newInput;
- if (dispersionAvailable) {
+ if (this->m_dispersionAvailable) {
newInput.ymax = input->ymax;
newInput.ymin = input->ymin;
- newInput.xmin = input->xmin - kr2 - 2;
- newInput.xmax = input->xmax + kr2 + 2;
+ newInput.xmin = input->xmin - this->m_kr2 - 2;
+ newInput.xmax = input->xmax + this->m_kr2 + 2;
} else {
newInput.xmin = 0;
newInput.ymin = input->ymin;
newInput.ymax = input->ymax;
- newInput.xmax = inputProgram->getWidth();
+ newInput.xmax = this->m_inputProgram->getWidth();
}
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
void ProjectorLensDistortionOperation::updateDispersion(MemoryBuffer **inputBuffers)
{
- if (!dispersionAvailable) {
+ if (!this->m_dispersionAvailable) {
float result[4];
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST, inputBuffers);
- dispersion = result[0];
- kr = 0.25f * MAX2(MIN2(this->dispersion, 1.f), 0.f);
- kr2 = kr * 20;
- dispersionAvailable = true;
+ this->m_dispersion = result[0];
+ this->m_kr = 0.25f * MAX2(MIN2(this->m_dispersion, 1.f), 0.f);
+ this->m_kr2 = this->m_kr * 20;
+ this->m_dispersionAvailable = true;
}
}
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
index 5023a5df507..f992b22f300 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
@@ -30,14 +30,14 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
- NodeLensDist *data;
+ NodeLensDist *m_data;
- float dispersion;
- bool dispersionAvailable;
+ float m_dispersion;
+ bool m_dispersionAvailable;
- float kr, kr2;
+ float m_kr, m_kr2;
public:
ProjectorLensDistortionOperation();
@@ -57,7 +57,7 @@ public:
*/
void deinitExecution();
- void setData(NodeLensDist *data) { this->data = data; }
+ void setData(NodeLensDist *data) { this->m_data = data; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
diff --git a/source/blender/compositor/operations/COM_QualityStepHelper.cpp b/source/blender/compositor/operations/COM_QualityStepHelper.cpp
index 18b3b106138..d99d6f28eff 100644
--- a/source/blender/compositor/operations/COM_QualityStepHelper.cpp
+++ b/source/blender/compositor/operations/COM_QualityStepHelper.cpp
@@ -24,45 +24,45 @@
QualityStepHelper::QualityStepHelper()
{
- this->quality = COM_QUALITY_HIGH;
- this->step = 1;
- this->offsetadd = 4;
+ this->m_quality = COM_QUALITY_HIGH;
+ this->m_step = 1;
+ this->m_offsetadd = 4;
}
void QualityStepHelper::initExecution(QualityHelper helper)
{
switch (helper) {
case COM_QH_INCREASE:
- switch (this->quality) {
+ switch (this->m_quality) {
case COM_QUALITY_HIGH:
default:
- this->step = 1;
- this->offsetadd = 4;
+ this->m_step = 1;
+ this->m_offsetadd = 4;
break;
case COM_QUALITY_MEDIUM:
- this->step = 2;
- this->offsetadd = 8;
+ this->m_step = 2;
+ this->m_offsetadd = 8;
break;
case COM_QUALITY_LOW:
- this->step = 3;
- this->offsetadd = 12;
+ this->m_step = 3;
+ this->m_offsetadd = 12;
break;
}
break;
case COM_QH_MULTIPLY:
- switch (this->quality) {
+ switch (this->m_quality) {
case COM_QUALITY_HIGH:
default:
- this->step = 1;
- this->offsetadd = 4;
+ this->m_step = 1;
+ this->m_offsetadd = 4;
break;
case COM_QUALITY_MEDIUM:
- this->step = 2;
- this->offsetadd = 8;
+ this->m_step = 2;
+ this->m_offsetadd = 8;
break;
case COM_QUALITY_LOW:
- this->step = 4;
- this->offsetadd = 16;
+ this->m_step = 4;
+ this->m_offsetadd = 16;
break;
}
break;
diff --git a/source/blender/compositor/operations/COM_QualityStepHelper.h b/source/blender/compositor/operations/COM_QualityStepHelper.h
index aef80e22e38..34e2ba1b47c 100644
--- a/source/blender/compositor/operations/COM_QualityStepHelper.h
+++ b/source/blender/compositor/operations/COM_QualityStepHelper.h
@@ -31,9 +31,9 @@ typedef enum QualityHelper {
class QualityStepHelper {
private:
- CompositorQuality quality;
- int step;
- int offsetadd;
+ CompositorQuality m_quality;
+ int m_step;
+ int m_offsetadd;
protected:
/**
@@ -41,13 +41,13 @@ protected:
*/
void initExecution(QualityHelper helper);
- inline int getStep() const { return this->step; }
- inline int getOffsetAdd() const { return this->offsetadd; }
+ inline int getStep() const { return this->m_step; }
+ inline int getOffsetAdd() const { return this->m_offsetadd; }
public:
QualityStepHelper();
- void setQuality(CompositorQuality quality) { this->quality = quality; }
+ void setQuality(CompositorQuality quality) { this->m_quality = quality; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 857131950dd..76e6921503e 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -27,7 +27,7 @@
ReadBufferOperation::ReadBufferOperation() : NodeOperation()
{
this->addOutputSocket(COM_DT_COLOR);
- this->offset = 0;
+ this->m_offset = 0;
}
void *ReadBufferOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
@@ -37,19 +37,21 @@ void *ReadBufferOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryB
void ReadBufferOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
- if (this->memoryProxy != NULL) {
- WriteBufferOperation *operation = memoryProxy->getWriteBufferOperation();
+ if (this->m_memoryProxy != NULL) {
+ WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation();
operation->determineResolution(resolution, preferredResolution);
operation->setResolution(resolution);
/// @todo: may not occur!, but does with blur node
- if (memoryProxy->getExecutor()) memoryProxy->getExecutor()->setResolution(resolution);
+ if (this->m_memoryProxy->getExecutor()) {
+ this->m_memoryProxy->getExecutor()->setResolution(resolution);
+ }
}
}
void ReadBufferOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
if (inputBuffers) {
- MemoryBuffer *inputBuffer = inputBuffers[this->offset];
+ MemoryBuffer *inputBuffer = inputBuffers[this->m_offset];
if (inputBuffer) {
if (sampler == COM_PS_NEAREST) {
inputBuffer->read(color, x, y);
@@ -68,7 +70,7 @@ void ReadBufferOperation::executePixel(float *color, float x, float y, PixelSamp
void ReadBufferOperation::executePixel(float *color, float x, float y, float dx, float dy, MemoryBuffer *inputBuffers[])
{
- MemoryBuffer *inputBuffer = inputBuffers[this->offset];
+ MemoryBuffer *inputBuffer = inputBuffers[this->m_offset];
if (inputBuffer) {
inputBuffer->readEWA(color, x, y, dx, dy);
}
@@ -85,8 +87,8 @@ bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
void ReadBufferOperation::readResolutionFromWriteBuffer()
{
- if (this->memoryProxy != NULL) {
- WriteBufferOperation *operation = memoryProxy->getWriteBufferOperation();
+ if (this->m_memoryProxy != NULL) {
+ WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation();
this->setWidth(operation->getWidth());
this->setHeight(operation->getHeight());
}
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index 576aa194bc5..de0c69c0ecc 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -28,23 +28,23 @@
class ReadBufferOperation : public NodeOperation {
private:
- MemoryProxy *memoryProxy;
- unsigned int offset;
+ MemoryProxy *m_memoryProxy;
+ unsigned int m_offset;
public:
ReadBufferOperation();
int isBufferOperation() { return true; }
- void setMemoryProxy(MemoryProxy *memoryProxy) { this->memoryProxy = memoryProxy; }
- MemoryProxy *getMemoryProxy() { return this->memoryProxy; }
+ void setMemoryProxy(MemoryProxy *memoryProxy) { this->m_memoryProxy = memoryProxy; }
+ MemoryProxy *getMemoryProxy() { return this->m_memoryProxy; }
void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void executePixel(float *color, float x, float y, float dx, float dy, MemoryBuffer * inputBuffers[]);
const bool isReadBufferOperation() const { return true; }
- void setOffset(unsigned int offset) { this->offset = offset; }
- unsigned int getOffset() { return this->offset; }
+ void setOffset(unsigned int offset) { this->m_offset = offset; }
+ unsigned int getOffset() { return this->m_offset; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return memoryBuffers[offset]; }
+ MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return memoryBuffers[this->m_offset]; }
void readResolutionFromWriteBuffer();
};
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
index f27af3c25f5..e4543c06d9b 100644
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
@@ -33,10 +33,10 @@ extern "C" {
RenderLayersBaseProg::RenderLayersBaseProg(int renderpass, int elementsize) : NodeOperation()
{
- this->renderpass = renderpass;
+ this->m_renderpass = renderpass;
this->setScene(NULL);
- this->inputBuffer = NULL;
- this->elementsize = elementsize;
+ this->m_inputBuffer = NULL;
+ this->m_elementsize = elementsize;
}
@@ -55,10 +55,10 @@ void RenderLayersBaseProg::initExecution()
RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
if (rl && rl->rectf) {
- this->inputBuffer = RE_RenderLayerGetPass(rl, renderpass);
+ this->m_inputBuffer = RE_RenderLayerGetPass(rl, this->m_renderpass);
- if (this->inputBuffer == NULL || renderpass == SCE_PASS_COMBINED) {
- this->inputBuffer = rl->rectf;
+ if (this->m_inputBuffer == NULL || this->m_renderpass == SCE_PASS_COMBINED) {
+ this->m_inputBuffer = rl->rectf;
}
}
}
@@ -74,38 +74,30 @@ void RenderLayersBaseProg::executePixel(float *output, float x, float y, PixelSa
int ix = x;
int iy = y;
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
- output[0] = 0.0f;
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
+ if (this->m_inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
+ zero_v4(output);
}
else {
- unsigned int offset = (iy * this->getWidth() + ix) * elementsize;
- if (elementsize == 1) {
- output[0] = inputBuffer[offset];
+ unsigned int offset = (iy * this->getWidth() + ix) * this->m_elementsize;
+ if (this->m_elementsize == 1) {
+ output[0] = this->m_inputBuffer[offset];
output[1] = 0.0f;
output[2] = 0.0f;
output[3] = 0.0f;
}
- else if (elementsize == 3) {
- output[0] = inputBuffer[offset];
- output[1] = inputBuffer[offset + 1];
- output[2] = inputBuffer[offset + 2];
+ else if (this->m_elementsize == 3) {
+ copy_v3_v3(output, &this->m_inputBuffer[offset]);
output[3] = 1.0f;
}
else {
- output[0] = inputBuffer[offset];
- output[1] = inputBuffer[offset + 1];
- output[2] = inputBuffer[offset + 2];
- output[3] = inputBuffer[offset + 3];
+ copy_v4_v4(output, &this->m_inputBuffer[offset]);
}
}
}
void RenderLayersBaseProg::deinitExecution()
{
- this->inputBuffer = NULL;
+ this->m_inputBuffer = NULL;
}
void RenderLayersBaseProg::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h b/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
index ce2b8f767b6..a18b515bd7b 100644
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
@@ -45,24 +45,24 @@ private:
/**
* Reference to the scene object.
*/
- Scene *scene;
+ Scene *m_scene;
/**
* layerId of the layer where this operation needs to get its data from
*/
- short layerId;
+ short m_layerId;
/**
* cached instance to the float buffer inside the layer
*/
- float *inputBuffer;
+ float *m_inputBuffer;
/**
* renderpass where this operation needs to get its data from
*/
- int renderpass;
+ int m_renderpass;
- int elementsize;
+ int m_elementsize;
protected:
/**
@@ -78,7 +78,7 @@ protected:
/**
* retrieve the reference to the float buffer of the renderer.
*/
- inline float *getInputBuffer() { return this->inputBuffer; }
+ inline float *getInputBuffer() { return this->m_inputBuffer; }
public:
/**
@@ -86,10 +86,10 @@ public:
* @see RenderLayerNode to set the actual scene where
* the data will be retrieved from.
*/
- void setScene(Scene *scene) { this->scene = scene; }
- Scene *getScene() { return this->scene; }
- void setLayerId(short layerId) { this->layerId = layerId; }
- short getLayerId() { return this->layerId; }
+ void setScene(Scene *scene) { this->m_scene = scene; }
+ Scene *getScene() { return this->m_scene; }
+ void setLayerId(short layerId) { this->m_layerId = layerId; }
+ short getLayerId() { return this->m_layerId; }
void initExecution();
void deinitExecution();
void executePixel(float *output, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]);
diff --git a/source/blender/compositor/operations/COM_RenderLayersMistOperation.h b/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
index 8c0ee9bfcab..ad838c9e340 100644
--- a/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
+++ b/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
@@ -1,3 +1,25 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
#ifndef _COM_RenderLayersMistOperation_h
#define _COM_RenderLayersMistOperation_h
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp
index 456dc5d1d0f..086ce917e7e 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -29,41 +29,41 @@ RotateOperation::RotateOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->imageSocket = NULL;
- this->degreeSocket = NULL;
- this->doDegree2RadConversion = false;
- this->isDegreeSet = false;
+ this->m_imageSocket = NULL;
+ this->m_degreeSocket = NULL;
+ this->m_doDegree2RadConversion = false;
+ this->m_isDegreeSet = false;
}
void RotateOperation::initExecution()
{
- this->imageSocket = this->getInputSocketReader(0);
- this->degreeSocket = this->getInputSocketReader(1);
- this->centerX = this->getWidth() / 2.0;
- this->centerY = this->getHeight() / 2.0;
+ this->m_imageSocket = this->getInputSocketReader(0);
+ this->m_degreeSocket = this->getInputSocketReader(1);
+ this->m_centerX = this->getWidth() / 2.0;
+ this->m_centerY = this->getHeight() / 2.0;
}
void RotateOperation::deinitExecution()
{
- this->imageSocket = NULL;
- this->degreeSocket = NULL;
+ this->m_imageSocket = NULL;
+ this->m_degreeSocket = NULL;
}
inline void RotateOperation::ensureDegree()
{
- if (!isDegreeSet) {
+ if (!this->m_isDegreeSet) {
float degree[4];
- this->degreeSocket->read(degree, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_degreeSocket->read(degree, 0, 0, COM_PS_NEAREST, NULL);
double rad;
- if (this->doDegree2RadConversion) {
+ if (this->m_doDegree2RadConversion) {
rad = DEG2RAD((double)degree[0]);
}
else {
rad = degree[0];
}
- this->cosine = cos(rad);
- this->sine = sin(rad);
+ this->m_cosine = cos(rad);
+ this->m_sine = sin(rad);
- isDegreeSet = true;
+ this->m_isDegreeSet = true;
}
}
@@ -71,11 +71,11 @@ inline void RotateOperation::ensureDegree()
void RotateOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
ensureDegree();
- const float dy = y - this->centerY;
- const float dx = x - this->centerX;
- const float nx = this->centerX + (this->cosine * dx + this->sine * dy);
- const float ny = this->centerY + (-this->sine * dx + this->cosine * dy);
- this->imageSocket->read(color, nx, ny, sampler, inputBuffers);
+ 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, inputBuffers);
}
bool RotateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -83,19 +83,19 @@ bool RotateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOp
ensureDegree();
rcti newInput;
- const float dxmin = input->xmin - this->centerX;
- const float dymin = input->ymin - this->centerY;
- const float dxmax = input->xmax - this->centerX;
- const float dymax = input->ymax - this->centerY;
+ const float dxmin = input->xmin - this->m_centerX;
+ const float dymin = input->ymin - this->m_centerY;
+ const float dxmax = input->xmax - this->m_centerX;
+ const float dymax = input->ymax - this->m_centerY;
- const float x1 = this->centerX + (this->cosine * dxmin + this->sine * dymin);
- const float x2 = this->centerX + (this->cosine * dxmax + this->sine * dymin);
- const float x3 = this->centerX + (this->cosine * dxmin + this->sine * dymax);
- const float x4 = this->centerX + (this->cosine * dxmax + this->sine * dymax);
- const float y1 = this->centerY + (-this->sine * dxmin + this->cosine * dymin);
- const float y2 = this->centerY + (-this->sine * dxmax + this->cosine * dymin);
- const float y3 = this->centerY + (-this->sine * dxmin + this->cosine * dymax);
- const float y4 = this->centerY + (-this->sine * dxmax + this->cosine * dymax);
+ const float x1 = this->m_centerX + (this->m_cosine * dxmin + this->m_sine * dymin);
+ const float x2 = this->m_centerX + (this->m_cosine * dxmax + this->m_sine * dymin);
+ const float x3 = this->m_centerX + (this->m_cosine * dxmin + this->m_sine * dymax);
+ const float x4 = this->m_centerX + (this->m_cosine * dxmax + this->m_sine * dymax);
+ const float y1 = this->m_centerY + (-this->m_sine * dxmin + this->m_cosine * dymin);
+ const float y2 = this->m_centerY + (-this->m_sine * dxmax + this->m_cosine * dymin);
+ const float y3 = this->m_centerY + (-this->m_sine * dxmin + this->m_cosine * dymax);
+ const float y4 = this->m_centerY + (-this->m_sine * dxmax + this->m_cosine * dymax);
const float minx = min(x1, min(x2, min(x3, x4)));
const float maxx = max(x1, max(x2, max(x3, x4)));
const float miny = min(y1, min(y2, min(y3, y4)));
diff --git a/source/blender/compositor/operations/COM_RotateOperation.h b/source/blender/compositor/operations/COM_RotateOperation.h
index bf7355da80e..9e6dd3987d1 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.h
+++ b/source/blender/compositor/operations/COM_RotateOperation.h
@@ -27,21 +27,21 @@
class RotateOperation : public NodeOperation {
private:
- SocketReader *imageSocket;
- SocketReader *degreeSocket;
- float centerX;
- float centerY;
- float cosine;
- float sine;
- bool doDegree2RadConversion;
- bool isDegreeSet;
+ SocketReader *m_imageSocket;
+ SocketReader *m_degreeSocket;
+ float m_centerX;
+ float m_centerY;
+ float m_cosine;
+ float m_sine;
+ bool m_doDegree2RadConversion;
+ bool m_isDegreeSet;
public:
RotateOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
void initExecution();
void deinitExecution();
- void setDoDegree2RadConversion(bool abool) { this->doDegree2RadConversion = abool; }
+ void setDoDegree2RadConversion(bool abool) { this->m_doDegree2RadConversion = abool; }
void ensureDegree();
};
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp
index 31135d4c40e..6a1f7b62203 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp
@@ -33,24 +33,24 @@ ScaleOperation::ScaleOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->inputXOperation = NULL;
- this->inputYOperation = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputXOperation = NULL;
+ this->m_inputYOperation = NULL;
}
void ScaleOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- this->inputXOperation = this->getInputSocketReader(1);
- this->inputYOperation = this->getInputSocketReader(2);
- this->centerX = this->getWidth() / 2.0;
- this->centerY = this->getHeight() / 2.0;
+ this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_inputXOperation = this->getInputSocketReader(1);
+ this->m_inputYOperation = this->getInputSocketReader(2);
+ this->m_centerX = this->getWidth() / 2.0;
+ this->m_centerY = this->getHeight() / 2.0;
}
void ScaleOperation::deinitExecution()
{
- this->inputOperation = NULL;
- this->inputXOperation = NULL;
- this->inputYOperation = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputXOperation = NULL;
+ this->m_inputYOperation = NULL;
}
@@ -63,15 +63,15 @@ void ScaleOperation::executePixel(float *color, float x, float y, PixelSampler s
float scaleX[4];
float scaleY[4];
- this->inputXOperation->read(scaleX, x, y, sampler, inputBuffers);
- this->inputYOperation->read(scaleY, x, y, sampler, inputBuffers);
+ this->m_inputXOperation->read(scaleX, x, y, sampler, inputBuffers);
+ this->m_inputYOperation->read(scaleY, x, y, sampler, inputBuffers);
const float scx = scaleX[0];
const float scy = scaleY[0];
- float nx = this->centerX + (x - this->centerX) / scx;
- float ny = this->centerY + (y - this->centerY) / scy;
- this->inputOperation->read(color, nx, ny, sampler, inputBuffers);
+ 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, inputBuffers);
}
bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -80,16 +80,16 @@ bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOpe
float scaleX[4];
float scaleY[4];
- this->inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST, NULL);
- this->inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST, NULL);
const float scx = scaleX[0];
const float scy = scaleY[0];
- newInput.xmax = this->centerX + (input->xmax - this->centerX) / scx;
- newInput.xmin = this->centerX + (input->xmin - this->centerX) / scx;
- newInput.ymax = this->centerY + (input->ymax - this->centerY) / scy;
- newInput.ymin = this->centerY + (input->ymin - this->centerY) / scy;
+ newInput.xmax = this->m_centerX + (input->xmax - this->m_centerX) / scx;
+ newInput.xmin = this->m_centerX + (input->xmin - this->m_centerX) / scx;
+ newInput.ymax = this->m_centerY + (input->ymax - this->m_centerY) / scy;
+ newInput.ymin = this->m_centerY + (input->ymin - this->m_centerY) / scy;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -103,24 +103,24 @@ ScaleAbsoluteOperation::ScaleAbsoluteOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->inputXOperation = NULL;
- this->inputYOperation = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputXOperation = NULL;
+ this->m_inputYOperation = NULL;
}
void ScaleAbsoluteOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- this->inputXOperation = this->getInputSocketReader(1);
- this->inputYOperation = this->getInputSocketReader(2);
- this->centerX = this->getWidth() / 2.0;
- this->centerY = this->getHeight() / 2.0;
+ this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_inputXOperation = this->getInputSocketReader(1);
+ this->m_inputYOperation = this->getInputSocketReader(2);
+ this->m_centerX = this->getWidth() / 2.0;
+ this->m_centerY = this->getHeight() / 2.0;
}
void ScaleAbsoluteOperation::deinitExecution()
{
- this->inputOperation = NULL;
- this->inputXOperation = NULL;
- this->inputYOperation = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputXOperation = NULL;
+ this->m_inputYOperation = NULL;
}
@@ -133,8 +133,8 @@ void ScaleAbsoluteOperation::executePixel(float *color, float x, float y, PixelS
float scaleX[4];
float scaleY[4];
- this->inputXOperation->read(scaleX, x, y, sampler, inputBuffers);
- this->inputYOperation->read(scaleY, x, y, sampler, inputBuffers);
+ this->m_inputXOperation->read(scaleX, x, y, sampler, inputBuffers);
+ this->m_inputYOperation->read(scaleY, x, y, sampler, inputBuffers);
const float scx = scaleX[0]; // target absolute scale
const float scy = scaleY[0]; // target absolute scale
@@ -145,10 +145,10 @@ void ScaleAbsoluteOperation::executePixel(float *color, float x, float y, PixelS
float relativeXScale = scx / width;
float relativeYScale = scy / height;
- float nx = this->centerX + (x - this->centerX) / relativeXScale;
- float ny = this->centerY + (y - this->centerY) / relativeYScale;
+ float nx = this->m_centerX + (x - this->m_centerX) / relativeXScale;
+ float ny = this->m_centerY + (y - this->m_centerY) / relativeYScale;
- this->inputOperation->read(color, nx, ny, sampler, inputBuffers);
+ this->m_inputOperation->read(color, nx, ny, sampler, inputBuffers);
}
bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -157,8 +157,8 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB
float scaleX[4];
float scaleY[4];
- this->inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST, NULL);
- this->inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST, NULL);
const float scx = scaleX[0];
const float scy = scaleY[0];
@@ -168,10 +168,10 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB
float relateveXScale = scx / width;
float relateveYScale = scy / height;
- newInput.xmax = this->centerX + (input->xmax - this->centerX) / relateveXScale;
- newInput.xmin = this->centerX + (input->xmin - this->centerX) / relateveXScale;
- newInput.ymax = this->centerY + (input->ymax - this->centerY) / relateveYScale;
- newInput.ymin = this->centerY + (input->ymin - this->centerY) / relateveYScale;
+ newInput.xmax = this->m_centerX + (input->xmax - this->m_centerX) / relateveXScale;
+ newInput.xmin = this->m_centerX + (input->xmin - this->m_centerX) / relateveXScale;
+ newInput.ymax = this->m_centerY + (input->ymax - this->m_centerY) / relateveYScale;
+ newInput.ymin = this->m_centerY + (input->ymin - this->m_centerY) / relateveYScale;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -183,56 +183,56 @@ ScaleFixedSizeOperation::ScaleFixedSizeOperation() : NodeOperation()
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void ScaleFixedSizeOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- this->relX = inputOperation->getWidth() / (float)this->newWidth;
- this->relY = inputOperation->getHeight() / (float)this->newHeight;
+ this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_relX = this->m_inputOperation->getWidth() / (float)this->m_newWidth;
+ this->m_relY = this->m_inputOperation->getHeight() / (float)this->m_newHeight;
/* *** all the options below are for a fairly special case - camera framing *** */
- if (this->offsetX != 0.0f || this->offsetY != 0.0f) {
- this->is_offset = true;
+ if (this->m_offsetX != 0.0f || this->m_offsetY != 0.0f) {
+ this->m_is_offset = true;
- if (this->newWidth > this->newHeight) {
- this->offsetX *= this->newWidth;
- this->offsetY *= this->newWidth;
+ if (this->m_newWidth > this->m_newHeight) {
+ this->m_offsetX *= this->m_newWidth;
+ this->m_offsetY *= this->m_newWidth;
}
else {
- this->offsetX *= this->newHeight;
- this->offsetY *= this->newHeight;
+ this->m_offsetX *= this->m_newHeight;
+ this->m_offsetY *= this->m_newHeight;
}
}
- if (this->is_aspect) {
+ if (this->m_is_aspect) {
/* apply aspect from clip */
- const float w_src = inputOperation->getWidth();
- const float h_src = inputOperation->getHeight();
+ const float w_src = this->m_inputOperation->getWidth();
+ const float h_src = this->m_inputOperation->getHeight();
/* destination aspect is already applied from the camera frame */
- const float w_dst = this->newWidth;
- const float h_dst = this->newHeight;
+ const float w_dst = this->m_newWidth;
+ const float h_dst = this->m_newHeight;
const float asp_src = w_src / h_src;
const float asp_dst = w_dst / h_dst;
if (fabsf(asp_src - asp_dst) >= FLT_EPSILON) {
- if ((asp_src > asp_dst) == (this->is_crop == true)) {
+ if ((asp_src > asp_dst) == (this->m_is_crop == true)) {
/* fit X */
const float div = asp_src / asp_dst;
- this->relX /= div;
- this->offsetX += ((w_src - (w_src * div)) / (w_src / w_dst)) / 2.0f;
+ this->m_relX /= div;
+ this->m_offsetX += ((w_src - (w_src * div)) / (w_src / w_dst)) / 2.0f;
}
else {
/* fit Y */
const float div = asp_dst / asp_src;
- this->relY /= div;
- this->offsetY += ((h_src - (h_src * div)) / (h_src / h_dst)) / 2.0f;
+ this->m_relY /= div;
+ this->m_offsetY += ((h_src - (h_src * div)) / (h_src / h_dst)) / 2.0f;
}
- this->is_offset = true;
+ this->m_is_offset = true;
}
}
/* *** end framing options *** */
@@ -240,7 +240,7 @@ void ScaleFixedSizeOperation::initExecution()
void ScaleFixedSizeOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
@@ -250,13 +250,13 @@ void ScaleFixedSizeOperation::executePixel(float *color, float x, float y, Pixel
sampler = COM_PS_BICUBIC;
#endif
- if (this->is_offset) {
- float nx = ((x - this->offsetX) * relX);
- float ny = ((y - this->offsetY) * relY);
- this->inputOperation->read(color, nx, ny, sampler, inputBuffers);
+ 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, inputBuffers);
}
else {
- this->inputOperation->read(color, x * relX, y * relY, sampler, inputBuffers);
+ this->m_inputOperation->read(color, x * this->m_relX, y * this->m_relY, sampler, inputBuffers);
}
}
@@ -264,10 +264,10 @@ bool ScaleFixedSizeOperation::determineDependingAreaOfInterest(rcti *input, Read
{
rcti newInput;
- newInput.xmax = input->xmax * relX;
- newInput.xmin = input->xmin * relX;
- newInput.ymax = input->ymax * relY;
- newInput.ymin = input->ymin * relY;
+ newInput.xmax = input->xmax * this->m_relX;
+ newInput.xmin = input->xmin * this->m_relX;
+ newInput.ymax = input->ymax * this->m_relY;
+ newInput.ymin = input->ymin * this->m_relY;
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
@@ -275,9 +275,9 @@ bool ScaleFixedSizeOperation::determineDependingAreaOfInterest(rcti *input, Read
void ScaleFixedSizeOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
unsigned int nr[2];
- nr[0] = newWidth;
- nr[1] = newHeight;
+ nr[0] = this->m_newWidth;
+ nr[1] = this->m_newHeight;
NodeOperation::determineResolution(resolution, nr);
- resolution[0] = newWidth;
- resolution[1] = newHeight;
+ resolution[0] = this->m_newWidth;
+ resolution[1] = this->m_newHeight;
}
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.h b/source/blender/compositor/operations/COM_ScaleOperation.h
index 7089f6c10a4..8cd44810bbd 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.h
+++ b/source/blender/compositor/operations/COM_ScaleOperation.h
@@ -27,11 +27,11 @@
class ScaleOperation : public NodeOperation {
private:
- SocketReader *inputOperation;
- SocketReader *inputXOperation;
- SocketReader *inputYOperation;
- float centerX;
- float centerY;
+ SocketReader *m_inputOperation;
+ SocketReader *m_inputXOperation;
+ SocketReader *m_inputYOperation;
+ float m_centerX;
+ float m_centerY;
public:
ScaleOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
@@ -42,11 +42,11 @@ public:
};
class ScaleAbsoluteOperation : public NodeOperation {
- SocketReader *inputOperation;
- SocketReader *inputXOperation;
- SocketReader *inputYOperation;
- float centerX;
- float centerY;
+ SocketReader *m_inputOperation;
+ SocketReader *m_inputXOperation;
+ SocketReader *m_inputYOperation;
+ float m_centerX;
+ float m_centerY;
public:
ScaleAbsoluteOperation();
@@ -58,20 +58,20 @@ public:
};
class ScaleFixedSizeOperation : public NodeOperation {
- SocketReader *inputOperation;
- int newWidth;
- int newHeight;
- float relX;
- float relY;
+ SocketReader *m_inputOperation;
+ int m_newWidth;
+ int m_newHeight;
+ float m_relX;
+ float m_relY;
/* center is only used for aspect correction */
- float offsetX;
- float offsetY;
- bool is_aspect;
- bool is_crop;
+ float m_offsetX;
+ float m_offsetY;
+ bool m_is_aspect;
+ bool m_is_crop;
/* set from other properties on initialization,
* check if we need to apply offset */
- bool is_offset;
+ bool m_is_offset;
public:
ScaleFixedSizeOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
@@ -80,11 +80,11 @@ public:
void initExecution();
void deinitExecution();
- void setNewWidth(int width) { this->newWidth = width; }
- void setNewHeight(int height) { this->newHeight = height; }
- void setIsAspect(bool is_aspect) { this->is_aspect = is_aspect; }
- void setIsCrop(bool is_crop) { this->is_crop = is_crop; }
- void setOffset(float x, float y) { this->offsetX = x; this->offsetY = y; }
+ void setNewWidth(int width) { this->m_newWidth = width; }
+ void setNewHeight(int height) { this->m_newHeight = height; }
+ void setIsAspect(bool is_aspect) { this->m_is_aspect = is_aspect; }
+ void setIsCrop(bool is_crop) { this->m_is_crop = is_crop; }
+ void setOffset(float x, float y) { this->m_offsetX = x; this->m_offsetY = y; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index da3504de971..e3abf2aa70b 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -34,19 +34,19 @@ ScreenLensDistortionOperation::ScreenLensDistortionOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputProgram = NULL;
- this->valuesAvailable = false;
- this->dispersion = 0.0f;
- this->distortion = 0.0f;
+ this->m_inputProgram = NULL;
+ this->m_valuesAvailable = false;
+ this->m_dispersion = 0.0f;
+ this->m_distortion = 0.0f;
}
void ScreenLensDistortionOperation::initExecution()
{
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void *ScreenLensDistortionOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- void *buffer = inputProgram->initializeTileData(NULL, memoryBuffers);
+ void *buffer = this->m_inputProgram->initializeTileData(NULL, memoryBuffers);
updateDispersionAndDistortion(memoryBuffers);
return buffer;
}
@@ -60,29 +60,29 @@ void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int
int dr = 0, dg = 0, db = 0;
float d, t, ln[6] = {0, 0, 0, 0, 0, 0};
float tc[4] = {0, 0, 0, 0};
- const float v = sc * ((y + 0.5f) - cy) / cy;
- const float u = sc * ((x + 0.5f) - cx) / cx;
+ const float v = this->m_sc * ((y + 0.5f) - this->m_cy) / this->m_cy;
+ const float u = this->m_sc * ((x + 0.5f) - this->m_cx) / this->m_cx;
const float uv_dot = u * u + v * v;
int sta = 0, mid = 0, end = 0;
- if ((t = 1.f - kr4 * uv_dot) >= 0.f) {
+ if ((t = 1.f - this->m_kr4 * uv_dot) >= 0.f) {
d = 1.f / (1.f + sqrtf(t));
ln[0] = (u * d + 0.5f) * width - 0.5f, ln[1] = (v * d + 0.5f) * height - 0.5f;
sta = 1;
}
- if ((t = 1.f - kg4 * uv_dot) >= 0.f) {
+ if ((t = 1.f - this->m_kg4 * uv_dot) >= 0.f) {
d = 1.f / (1.f + sqrtf(t));
ln[2] = (u * d + 0.5f) * width - 0.5f, ln[3] = (v * d + 0.5f) * height - 0.5f;
mid = 1;
}
- if ((t = 1.f - kb4 * uv_dot) >= 0.f) {
+ if ((t = 1.f - this->m_kb4 * uv_dot) >= 0.f) {
d = 1.f / (1.f + sqrtf(t));
ln[4] = (u * d + 0.5f) * width - 0.5f, ln[5] = (v * d + 0.5f) * height - 0.5f;
end = 1;
}
if (sta && mid && end) {
- float jit = this->data->jit;
+ float jit = this->m_data->jit;
float z;
float color[4];
{
@@ -94,8 +94,8 @@ void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int
for (z = 0; z < ds; ++z) {
const float tz = ((float)z + (jit ? BLI_frand() : 0.5f)) * sd;
- t = 1.f - (kr4 + tz * drg) * uv_dot;
- d = 1.f / (1.f + sqrtf(t));
+ t = 1.0f - (this->m_kr4 + tz * this->m_drg) * uv_dot;
+ d = 1.0f / (1.f + sqrtf(t));
const float nx = (u * d + 0.5f) * width - 0.5f;
const float ny = (v * d + 0.5f) * height - 0.5f;
buffer->readCubic(color, nx, ny);
@@ -112,7 +112,7 @@ void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int
for (z = 0; z < ds; ++z) {
const float tz = ((float)z + (jit ? BLI_frand() : 0.5f)) * sd;
- t = 1.f - (kg4 + tz * dgb) * uv_dot;
+ t = 1.f - (this->m_kg4 + tz * this->m_dgb) * uv_dot;
d = 1.f / (1.f + sqrtf(t));
const float nx = (u * d + 0.5f) * width - 0.5f;
const float ny = (v * d + 0.5f) * height - 0.5f;
@@ -122,9 +122,9 @@ void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int
}
}
- if (dr) outputColor[0] = 2.f * tc[0] / (float)dr;
- if (dg) outputColor[1] = 2.f * tc[1] / (float)dg;
- if (db) outputColor[2] = 2.f * tc[2] / (float)db;
+ 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;
/* set alpha */
outputColor[3] = 1.0f;
@@ -139,14 +139,14 @@ void ScreenLensDistortionOperation::executePixel(float *outputColor, int x, int
void ScreenLensDistortionOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void ScreenLensDistortionOperation::determineUV(float result[2], float x, float y) const
{
- const float v = sc * ((y + 0.5f) - cy) / cy;
- const float u = sc * ((x + 0.5f) - cx) / cx;
- const float t = ABS(MIN3(kr, kg, kb) * 4);
+ const float v = this->m_sc * ((y + 0.5f) - this->m_cy) / this->m_cy;
+ const float u = this->m_sc * ((x + 0.5f) - this->m_cx) / this->m_cx;
+ const float t = ABS(MIN3(this->m_kr, this->m_kg, this->m_kb) * 4);
float d = 1.f / (1.f + sqrtf(t));
result[0] = (u * d + 0.5f) * getWidth() - 0.5f;
result[1] = (v * d + 0.5f) * getHeight() - 0.5f;
@@ -157,34 +157,34 @@ bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input
rcti newInput;
newInput.xmin = 0;
newInput.ymin = 0;
- newInput.ymax = inputProgram->getHeight();
- newInput.xmax = inputProgram->getWidth();
+ newInput.ymax = this->m_inputProgram->getHeight();
+ newInput.xmax = this->m_inputProgram->getWidth();
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
void ScreenLensDistortionOperation::updateDispersionAndDistortion(MemoryBuffer **inputBuffers)
{
- if (!valuesAvailable) {
+ if (!this->m_valuesAvailable) {
float result[4];
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST, inputBuffers);
- this->distortion = result[0];
+ this->m_distortion = result[0];
this->getInputSocketReader(2)->read(result, 0, 0, COM_PS_NEAREST, inputBuffers);
- this->dispersion = result[0];
- kg = MAX2(MIN2(this->distortion, 1.f), -0.999f);
+ this->m_dispersion = result[0];
+ this->m_kg = MAX2(MIN2(this->m_distortion, 1.f), -0.999f);
// smaller dispersion range for somewhat more control
- const float d = 0.25f * MAX2(MIN2(this->dispersion, 1.f), 0.f);
- kr = MAX2(MIN2((kg + d), 1.f), -0.999f);
- kb = MAX2(MIN2((kg - d), 1.f), -0.999f);
- maxk = MAX3(kr, kg, kb);
- sc = (this->data->fit && (maxk > 0.f)) ? (1.f / (1.f + 2.f * maxk)) : (1.f / (1.f + maxk));
- drg = 4.f * (kg - kr);
- dgb = 4.f * (kb - kg);
+ const float d = 0.25f * MAX2(MIN2(this->m_dispersion, 1.f), 0.f);
+ this->m_kr = MAX2(MIN2((this->m_kg + d), 1.0f), -0.999f);
+ this->m_kb = MAX2(MIN2((this->m_kg - d), 1.0f), -0.999f);
+ this->m_maxk = MAX3(this->m_kr, this->m_kg, this->m_kb);
+ this->m_sc = (this->m_data->fit && (this->m_maxk > 0.f)) ? (1.f / (1.f + 2.f * this->m_maxk)) : (1.f / (1.f + this->m_maxk));
+ this->m_drg = 4.f * (this->m_kg - this->m_kr);
+ this->m_dgb = 4.f * (this->m_kb - this->m_kg);
- kr4 = kr * 4.f;
- kg4 = kg * 4.f;
- kb4 = kb * 4.f;
- cx = 0.5f * (float)getWidth();
- cy = 0.5f * (float)getHeight();
- valuesAvailable = true;
+ this->m_kr4 = this->m_kr * 4.0f;
+ this->m_kg4 = this->m_kg * 4.0f;
+ this->m_kb4 = this->m_kb * 4.0f;
+ this->m_cx = 0.5f * (float)getWidth();
+ this->m_cy = 0.5f * (float)getHeight();
+ this->m_valuesAvailable = true;
}
}
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
index 21babd11295..d990651dd7d 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h
@@ -30,19 +30,19 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
- NodeLensDist *data;
+ NodeLensDist *m_data;
- float dispersion;
- float distortion;
- bool valuesAvailable;
- float kr, kg, kb;
- float kr4, kg4, kb4;
- float maxk;
- float drg;
- float dgb;
- float sc, cx, cy;
+ float m_dispersion;
+ float m_distortion;
+ bool m_valuesAvailable;
+ float m_kr, m_kg, m_kb;
+ float m_kr4, m_kg4, m_kb4;
+ float m_maxk;
+ float m_drg;
+ float m_dgb;
+ float m_sc, m_cx, m_cy;
public:
ScreenLensDistortionOperation();
@@ -62,7 +62,7 @@ public:
*/
void deinitExecution();
- void setData(NodeLensDist *data) { this->data = data; }
+ void setData(NodeLensDist *data) { this->m_data = data; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
index caa1387da2a..6ae4fc4cfe5 100644
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
+++ b/source/blender/compositor/operations/COM_SeparateChannelOperation.cpp
@@ -26,22 +26,22 @@ SeparateChannelOperation::SeparateChannelOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void SeparateChannelOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void SeparateChannelOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void SeparateChannelOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float input[4];
- this->inputOperation->read(input, x, y, sampler, inputBuffers);
- color[0] = input[this->channel];
+ this->m_inputOperation->read(input, x, y, sampler, inputBuffers);
+ color[0] = input[this->m_channel];
}
diff --git a/source/blender/compositor/operations/COM_SeparateChannelOperation.h b/source/blender/compositor/operations/COM_SeparateChannelOperation.h
index b1a38fd8294..65a54f91252 100644
--- a/source/blender/compositor/operations/COM_SeparateChannelOperation.h
+++ b/source/blender/compositor/operations/COM_SeparateChannelOperation.h
@@ -27,8 +27,8 @@
class SeparateChannelOperation : public NodeOperation {
private:
- SocketReader *inputOperation;
- int channel;
+ SocketReader *m_inputOperation;
+ int m_channel;
public:
SeparateChannelOperation();
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
@@ -36,7 +36,7 @@ public:
void initExecution();
void deinitExecution();
- void setChannel(int channel) { this->channel = channel; }
+ void setChannel(int channel) { this->m_channel = channel; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
index 5924108ed86..d383fb638ae 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -28,28 +28,28 @@ SetAlphaOperation::SetAlphaOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->inputColor = NULL;
- this->inputAlpha = NULL;
+ this->m_inputColor = NULL;
+ this->m_inputAlpha = NULL;
}
void SetAlphaOperation::initExecution()
{
- this->inputColor = getInputSocketReader(0);
- this->inputAlpha = getInputSocketReader(1);
+ this->m_inputColor = getInputSocketReader(0);
+ this->m_inputAlpha = getInputSocketReader(1);
}
void SetAlphaOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float alphaInput[4];
- this->inputColor->read(outputValue, x, y, sampler, inputBuffers);
- this->inputAlpha->read(alphaInput, x, y, sampler, inputBuffers);
+ this->m_inputColor->read(outputValue, x, y, sampler, inputBuffers);
+ this->m_inputAlpha->read(alphaInput, x, y, sampler, inputBuffers);
outputValue[3] = alphaInput[0];
}
void SetAlphaOperation::deinitExecution()
{
- this->inputColor = NULL;
- this->inputAlpha = NULL;
+ this->m_inputColor = NULL;
+ this->m_inputAlpha = NULL;
}
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.h b/source/blender/compositor/operations/COM_SetAlphaOperation.h
index 231b41f1697..857bd08bfbf 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.h
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.h
@@ -31,8 +31,8 @@
*/
class SetAlphaOperation : public NodeOperation {
private:
- SocketReader *inputColor;
- SocketReader *inputAlpha;
+ SocketReader *m_inputColor;
+ SocketReader *m_inputAlpha;
public:
/**
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.cpp b/source/blender/compositor/operations/COM_SetColorOperation.cpp
index 5307d7abc24..55a6a3800ca 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetColorOperation.cpp
@@ -29,10 +29,10 @@ SetColorOperation::SetColorOperation() : NodeOperation()
void SetColorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- outputValue[0] = this->channel1;
- outputValue[1] = this->channel2;
- outputValue[2] = this->channel3;
- outputValue[3] = this->channel4;
+ outputValue[0] = this->m_channel1;
+ outputValue[1] = this->m_channel2;
+ outputValue[2] = this->m_channel3;
+ outputValue[3] = this->m_channel4;
}
void SetColorOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
diff --git a/source/blender/compositor/operations/COM_SetColorOperation.h b/source/blender/compositor/operations/COM_SetColorOperation.h
index 9d28f1757db..abfa2b9538a 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.h
+++ b/source/blender/compositor/operations/COM_SetColorOperation.h
@@ -31,10 +31,10 @@
*/
class SetColorOperation : public NodeOperation {
private:
- float channel1;
- float channel2;
- float channel3;
- float channel4;
+ float m_channel1;
+ float m_channel2;
+ float m_channel3;
+ float m_channel4;
public:
/**
@@ -42,15 +42,21 @@ public:
*/
SetColorOperation();
- const float getChannel1() {return this->channel1;}
- void setChannel1(float value) {this->channel1 = value;}
- const float getChannel2() {return this->channel2;}
- void setChannel2(float value) {this->channel2 = value;}
- const float getChannel3() {return this->channel3;}
- void setChannel3(float value) {this->channel3 = value;}
- const float getChannel4() {return this->channel4;}
- void setChannel4(float value) {this->channel4 = value;}
- void setChannels(float value[4]) {this->channel1 = value[0];this->channel2 = value[1];this->channel3 = value[2];this->channel4 = value[3];}
+ const float getChannel1() { return this->m_channel1; }
+ void setChannel1(float value) { this->m_channel1 = value; }
+ const float getChannel2() { return this->m_channel2; }
+ void setChannel2(float value) { this->m_channel2 = value; }
+ const float getChannel3() { return this->m_channel3; }
+ void setChannel3(float value) { this->m_channel3 = value; }
+ const float getChannel4() { return this->m_channel4; }
+ void setChannel4(float value) { this->m_channel4 = value; }
+ void setChannels(float value[4])
+ {
+ this->m_channel1 = value[0];
+ this->m_channel2 = value[1];
+ this->m_channel3 = value[2];
+ this->m_channel4 = value[3];
+ }
/**
* the inner loop of this program
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
index dfe7fe91bf8..c235bd81e58 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
@@ -30,14 +30,14 @@ SetSamplerOperation::SetSamplerOperation() : NodeOperation()
void SetSamplerOperation::initExecution()
{
- this->reader = this->getInputSocketReader(0);
+ this->m_reader = this->getInputSocketReader(0);
}
void SetSamplerOperation::deinitExecution()
{
- this->reader = NULL;
+ this->m_reader = NULL;
}
void SetSamplerOperation::executePixel(float *output, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- reader->read(output, x, y, this->sampler, inputBuffers);
+ this->m_reader->read(output, x, y, this->m_sampler, inputBuffers);
}
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.h b/source/blender/compositor/operations/COM_SetSamplerOperation.h
index 5dba0b3703f..24e0c5e2ef5 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.h
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.h
@@ -31,15 +31,15 @@
*/
class SetSamplerOperation : public NodeOperation {
private:
- PixelSampler sampler;
- SocketReader *reader;
+ PixelSampler m_sampler;
+ SocketReader *m_reader;
public:
/**
* Default constructor
*/
SetSamplerOperation();
- void setSampler(PixelSampler sampler) { this->sampler = sampler; }
+ void setSampler(PixelSampler sampler) { this->m_sampler = sampler; }
/**
* the inner loop of this program
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.cpp b/source/blender/compositor/operations/COM_SetValueOperation.cpp
index 483fcc97a1f..98a21112c5b 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetValueOperation.cpp
@@ -29,7 +29,7 @@ SetValueOperation::SetValueOperation() : NodeOperation()
void SetValueOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- outputValue[0] = this->value;
+ outputValue[0] = this->m_value;
}
void SetValueOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h
index 2f4a6ec0dc8..dce0c3299ac 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.h
+++ b/source/blender/compositor/operations/COM_SetValueOperation.h
@@ -31,7 +31,7 @@
*/
class SetValueOperation : public NodeOperation {
private:
- float value;
+ float m_value;
public:
/**
@@ -39,8 +39,8 @@ public:
*/
SetValueOperation();
- const float getValue() { return this->value; }
- void setValue(float value) { this->value = value; }
+ const float getValue() { return this->m_value; }
+ void setValue(float value) { this->m_value = value; }
/**
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.cpp b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
index 3d15a184c4e..f37bc489e75 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
@@ -30,10 +30,10 @@ SetVectorOperation::SetVectorOperation() : NodeOperation()
void SetVectorOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- outputValue[0] = this->x;
- outputValue[1] = this->y;
- outputValue[2] = this->z;
- outputValue[3] = this->w;
+ outputValue[0] = this->m_x;
+ outputValue[1] = this->m_y;
+ outputValue[2] = this->m_z;
+ outputValue[3] = this->m_w;
}
void SetVectorOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.h b/source/blender/compositor/operations/COM_SetVectorOperation.h
index 49088027762..dc2a05ceff4 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.h
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.h
@@ -31,10 +31,10 @@
*/
class SetVectorOperation : public NodeOperation {
private:
- float x;
- float y;
- float z;
- float w;
+ float m_x;
+ float m_y;
+ float m_z;
+ float m_w;
public:
/**
@@ -42,14 +42,14 @@ public:
*/
SetVectorOperation();
- const float getX() { return this->x; }
- void setX(float value) { this->x = value; }
- const float getY() { return this->y; }
- void setY(float value) { this->y = value; }
- const float getZ() { return this->z; }
- void setZ(float value) { this->z = value; }
- const float getW() { return this->w; }
- void setW(float value) { this->w = value; }
+ const float getX() { return this->m_x; }
+ void setX(float value) { this->m_x = value; }
+ const float getY() { return this->m_y; }
+ void setY(float value) { this->m_y = value; }
+ const float getZ() { return this->m_z; }
+ void setZ(float value) { this->m_z = value; }
+ const float getW() { return this->m_w; }
+ void setW(float value) { this->m_w = value; }
/**
* the inner loop of this program
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
index 55c4b68ee57..8b39406fd83 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
@@ -26,22 +26,22 @@ SocketProxyOperation::SocketProxyOperation(DataType type) : NodeOperation()
{
this->addInputSocket(type);
this->addOutputSocket(type);
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void SocketProxyOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
+ this->m_inputOperation = this->getInputSocketReader(0);
}
void SocketProxyOperation::deinitExecution()
{
- this->inputOperation = NULL;
+ this->m_inputOperation = NULL;
}
void SocketProxyOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- if (this->inputOperation) {
- this->inputOperation->read(color, x, y, sampler, inputBuffers);
+ if (this->m_inputOperation) {
+ this->m_inputOperation->read(color, x, y, sampler, inputBuffers);
}
}
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.h b/source/blender/compositor/operations/COM_SocketProxyOperation.h
index 5dc8f3d6f8f..a4177efbd8e 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.h
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.h
@@ -27,7 +27,7 @@
class SocketProxyOperation : public NodeOperation {
private:
- SocketReader *inputOperation;
+ SocketReader *m_inputOperation;
public:
SocketProxyOperation(DataType type);
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
diff --git a/source/blender/compositor/operations/COM_SplitViewerOperation.cpp b/source/blender/compositor/operations/COM_SplitViewerOperation.cpp
index 2735f182406..00f854b2ba9 100644
--- a/source/blender/compositor/operations/COM_SplitViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SplitViewerOperation.cpp
@@ -40,30 +40,30 @@ SplitViewerOperation::SplitViewerOperation() : ViewerBaseOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
- this->image1Input = NULL;
- this->image2Input = NULL;
+ this->m_image1Input = NULL;
+ this->m_image2Input = NULL;
}
void SplitViewerOperation::initExecution()
{
// When initializing the tree during initial load the width and height can be zero.
- this->image1Input = getInputSocketReader(0);
- this->image2Input = getInputSocketReader(1);
+ this->m_image1Input = getInputSocketReader(0);
+ this->m_image2Input = getInputSocketReader(1);
ViewerBaseOperation::initExecution();
}
void SplitViewerOperation::deinitExecution()
{
- this->image1Input = NULL;
- this->image2Input = NULL;
+ this->m_image1Input = NULL;
+ this->m_image2Input = NULL;
ViewerBaseOperation::deinitExecution();
}
void SplitViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
{
- float *buffer = this->outputBuffer;
- unsigned char *bufferDisplay = this->outputBufferDisplay;
+ float *buffer = this->m_outputBuffer;
+ unsigned char *bufferDisplay = this->m_outputBufferDisplay;
if (!buffer) return;
int x1 = rect->xmin;
@@ -73,21 +73,21 @@ void SplitViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me
int offset = (y1 * this->getWidth() + x1) * 4;
int x;
int y;
- int perc = xSplit ? this->splitPercentage *getWidth() / 100.0f : this->splitPercentage *getHeight() / 100.0f;
+ int perc = this->m_xSplit ? this->m_splitPercentage * this->getWidth() / 100.0f : this->m_splitPercentage * this->getHeight() / 100.0f;
for (y = y1; y < y2; y++) {
for (x = x1; x < x2; x++) {
bool image1;
float srgb[4];
- image1 = xSplit ? x > perc : y > perc;
+ image1 = this->m_xSplit ? x > perc : y > perc;
if (image1) {
- image1Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers);
+ this->m_image1Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers);
}
else {
- image2Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers);
+ this->m_image2Input->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers);
}
/// @todo: linear conversion only when scene color management is selected, also check predivide.
- if (this->doColorManagement) {
- if (this->doColorPredivide) {
+ if (this->m_doColorManagement) {
+ if (this->m_doColorPredivide) {
linearrgb_to_srgb_predivide_v4(srgb, buffer + offset);
}
else {
diff --git a/source/blender/compositor/operations/COM_SplitViewerOperation.h b/source/blender/compositor/operations/COM_SplitViewerOperation.h
index aba63ff190b..92275606105 100644
--- a/source/blender/compositor/operations/COM_SplitViewerOperation.h
+++ b/source/blender/compositor/operations/COM_SplitViewerOperation.h
@@ -28,17 +28,17 @@
class SplitViewerOperation : public ViewerBaseOperation {
private:
- SocketReader *image1Input;
- SocketReader *image2Input;
+ SocketReader *m_image1Input;
+ SocketReader *m_image2Input;
- float splitPercentage;
- bool xSplit;
+ float m_splitPercentage;
+ bool m_xSplit;
public:
SplitViewerOperation();
void executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers);
void initExecution();
void deinitExecution();
- void setSplitPercentage(float splitPercentage) { this->splitPercentage = splitPercentage; }
- void setXSplit(bool xsplit) { this->xSplit = xsplit; }
+ void setSplitPercentage(float splitPercentage) { this->m_splitPercentage = splitPercentage; }
+ void setXSplit(bool xsplit) { this->m_xSplit = xsplit; }
};
#endif
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index dbdd17adbe4..6098cfc3e5c 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -29,10 +29,10 @@ TextureBaseOperation::TextureBaseOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_VECTOR); //offset
this->addInputSocket(COM_DT_VECTOR); //size
- this->texture = NULL;
- this->inputSize = NULL;
- this->inputOffset = NULL;
- this->rd = NULL;
+ this->m_texture = NULL;
+ this->m_inputSize = NULL;
+ this->m_inputOffset = NULL;
+ this->m_rd = NULL;
}
TextureOperation::TextureOperation() : TextureBaseOperation()
{
@@ -45,20 +45,20 @@ TextureAlphaOperation::TextureAlphaOperation() : TextureBaseOperation()
void TextureBaseOperation::initExecution()
{
- this->inputOffset = getInputSocketReader(0);
- this->inputSize = getInputSocketReader(1);
+ this->m_inputOffset = getInputSocketReader(0);
+ this->m_inputSize = getInputSocketReader(1);
}
void TextureBaseOperation::deinitExecution()
{
- this->inputSize = NULL;
- this->inputOffset = NULL;
+ this->m_inputSize = NULL;
+ this->m_inputOffset = NULL;
}
void TextureBaseOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
if (preferredResolution[0] == 0 || preferredResolution[1] == 0) {
- int width = this->rd->xsch * this->rd->size / 100;
- int height = this->rd->ysch * this->rd->size / 100;
+ int width = this->m_rd->xsch * this->m_rd->size / 100;
+ int height = this->m_rd->ysch * this->m_rd->size / 100;
resolution[0] = width;
resolution[1] = height;
}
@@ -89,14 +89,14 @@ void TextureBaseOperation::executePixel(float *color, float x, float y, PixelSam
const float u = (cx - x) / this->getWidth() * 2;
const float v = (cy - y) / this->getHeight() * 2;
- this->inputSize->read(textureSize, x, y, sampler, inputBuffers);
- this->inputOffset->read(textureOffset, x, y, sampler, inputBuffers);
+ this->m_inputSize->read(textureSize, x, y, sampler, inputBuffers);
+ this->m_inputOffset->read(textureOffset, x, y, sampler, inputBuffers);
vec[0] = textureSize[0] * (u + textureOffset[0]);
vec[1] = textureSize[1] * (v + textureOffset[1]);
vec[2] = textureSize[2] * textureOffset[2];
- retval = multitex_ext(this->texture, vec, NULL, NULL, 0, &texres);
+ retval = multitex_ext(this->m_texture, vec, NULL, NULL, 0, &texres);
if (texres.talpha)
color[3] = texres.ta;
diff --git a/source/blender/compositor/operations/COM_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h
index 14714242511..d42da697b08 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.h
+++ b/source/blender/compositor/operations/COM_TextureOperation.h
@@ -42,10 +42,10 @@ extern "C" {
*/
class TextureBaseOperation : public NodeOperation {
private:
- Tex *texture;
- const RenderData *rd;
- SocketReader *inputSize;
- SocketReader *inputOffset;
+ Tex *m_texture;
+ const RenderData *m_rd;
+ SocketReader *m_inputSize;
+ SocketReader *m_inputOffset;
protected:
@@ -62,10 +62,10 @@ protected:
public:
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
- void setTexture(Tex *texture) { this->texture = texture; }
+ void setTexture(Tex *texture) { this->m_texture = texture; }
void initExecution();
void deinitExecution();
- void setRenderData(const RenderData *rd) { this->rd = rd; }
+ void setRenderData(const RenderData *rd) { this->m_rd = rd; }
};
class TextureOperation : public TextureBaseOperation {
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index 7b978e0f87c..b5daf85b390 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -30,14 +30,14 @@ TonemapOperation::TonemapOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->imageReader = NULL;
- this->data = NULL;
- this->cachedInstance = NULL;
+ this->m_imageReader = NULL;
+ this->m_data = NULL;
+ this->m_cachedInstance = NULL;
this->setComplex(true);
}
void TonemapOperation::initExecution()
{
- this->imageReader = this->getInputSocketReader(0);
+ this->m_imageReader = this->getInputSocketReader(0);
NodeOperation::initMutex();
}
@@ -46,11 +46,11 @@ void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *in
AvgLogLum *avg = (AvgLogLum *)data;
float output[4];
- this->imageReader->read(output, x, y, inputBuffers, NULL);
+ this->m_imageReader->read(output, x, y, inputBuffers, NULL);
mul_v3_fl(output, avg->al);
- float dr = output[0] + this->data->offset;
- float dg = output[1] + this->data->offset;
- float db = output[2] + this->data->offset;
+ float dr = output[0] + this->m_data->offset;
+ float dg = output[1] + this->m_data->offset;
+ float db = output[2] + this->m_data->offset;
output[0] /= ((dr == 0.f) ? 1.0f : dr);
output[1] /= ((dg == 0.f) ? 1.0f : dg);
output[2] /= ((db == 0.f) ? 1.0f : db);
@@ -66,14 +66,14 @@ void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *in
void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
AvgLogLum *avg = (AvgLogLum *)data;
- NodeTonemap *ntm = this->data;
+ NodeTonemap *ntm = this->m_data;
- const float f = expf(-this->data->f);
+ const float f = expf(-this->m_data->f);
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->imageReader->read(output, x, y, inputBuffers, NULL);
+ this->m_imageReader->read(output, x, y, inputBuffers, NULL);
const float L = rgb_to_luma_y(output);
float I_l = output[0] + ic * (L - output[0]);
@@ -94,9 +94,9 @@ void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, Mem
void TonemapOperation::deinitExecution()
{
- this->imageReader = NULL;
- if (this->cachedInstance) {
- delete cachedInstance;
+ this->m_imageReader = NULL;
+ if (this->m_cachedInstance) {
+ delete this->m_cachedInstance;
}
NodeOperation::deinitMutex();
}
@@ -119,8 +119,8 @@ bool TonemapOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferO
void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
lockMutex();
- if (this->cachedInstance == NULL) {
- MemoryBuffer *tile = (MemoryBuffer *)imageReader->initializeTileData(rect, memoryBuffers);
+ if (this->m_cachedInstance == NULL) {
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect, memoryBuffers);
AvgLogLum *data = new AvgLogLum();
float *buffer = tile->getBuffer();
@@ -146,12 +146,12 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff
maxl = log((double)maxl + 1e-5); minl = log((double)minl + 1e-5); avl = lsum * sc;
data->auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.f;
float al = exp((double)avl);
- data->al = (al == 0.f) ? 0.f : (this->data->key / al);
- data->igm = (this->data->gamma == 0.f) ? 1 : (1.f / this->data->gamma);
- this->cachedInstance = data;
+ data->al = (al == 0.0f) ? 0.0f : (this->m_data->key / al);
+ data->igm = (this->m_data->gamma == 0.f) ? 1 : (1.f / this->m_data->gamma);
+ this->m_cachedInstance = data;
}
unlockMutex();
- return this->cachedInstance;
+ return this->m_cachedInstance;
}
void TonemapOperation::deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data)
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.h b/source/blender/compositor/operations/COM_TonemapOperation.h
index 005f0862443..ed9018d0a09 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.h
+++ b/source/blender/compositor/operations/COM_TonemapOperation.h
@@ -46,17 +46,17 @@ protected:
/**
* @brief Cached reference to the reader
*/
- SocketReader *imageReader;
+ SocketReader *m_imageReader;
/**
* @brief settings of the Tonemap
*/
- NodeTonemap *data;
+ NodeTonemap *m_data;
/**
* @brief temporarily cache of the execution storage
*/
- AvgLogLum *cachedInstance;
+ AvgLogLum *m_cachedInstance;
public:
TonemapOperation();
@@ -79,7 +79,7 @@ public:
*/
void deinitExecution();
- void setData(NodeTonemap *data) { this->data = data; }
+ void setData(NodeTonemap *data) { this->m_data = data; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index c41e2c7f156..e43a8e55130 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -29,31 +29,31 @@ TranslateOperation::TranslateOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->inputOperation = NULL;
- this->inputXOperation = NULL;
- this->inputYOperation = NULL;
- this->isDeltaSet = false;
+ this->m_inputOperation = NULL;
+ this->m_inputXOperation = NULL;
+ this->m_inputYOperation = NULL;
+ this->m_isDeltaSet = false;
}
void TranslateOperation::initExecution()
{
- this->inputOperation = this->getInputSocketReader(0);
- this->inputXOperation = this->getInputSocketReader(1);
- this->inputYOperation = this->getInputSocketReader(2);
+ this->m_inputOperation = this->getInputSocketReader(0);
+ this->m_inputXOperation = this->getInputSocketReader(1);
+ this->m_inputYOperation = this->getInputSocketReader(2);
}
void TranslateOperation::deinitExecution()
{
- this->inputOperation = NULL;
- this->inputXOperation = NULL;
- this->inputYOperation = NULL;
+ this->m_inputOperation = NULL;
+ this->m_inputXOperation = NULL;
+ this->m_inputYOperation = NULL;
}
void TranslateOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
ensureDelta();
- this->inputOperation->read(color, x - this->getDeltaX(), y - this->getDeltaY(), sampler, inputBuffers);
+ this->m_inputOperation->read(color, x - this->getDeltaX(), y - this->getDeltaY(), sampler, inputBuffers);
}
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 bf3121bec11..8af4ffe8967 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.h
+++ b/source/blender/compositor/operations/COM_TranslateOperation.h
@@ -27,12 +27,12 @@
class TranslateOperation : public NodeOperation {
private:
- SocketReader *inputOperation;
- SocketReader *inputXOperation;
- SocketReader *inputYOperation;
- float deltaX;
- float deltaY;
- bool isDeltaSet;
+ SocketReader *m_inputOperation;
+ SocketReader *m_inputXOperation;
+ SocketReader *m_inputYOperation;
+ float m_deltaX;
+ float m_deltaY;
+ bool m_isDeltaSet;
public:
TranslateOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
@@ -41,17 +41,17 @@ public:
void initExecution();
void deinitExecution();
- float getDeltaX() { return this->deltaX; }
- float getDeltaY() { return this->deltaY; }
+ float getDeltaX() { return this->m_deltaX; }
+ float getDeltaY() { return this->m_deltaY; }
inline void ensureDelta() {
- if (!isDeltaSet) {
+ if (!this->m_isDeltaSet) {
float tempDelta[4];
- this->inputXOperation->read(tempDelta, 0, 0, COM_PS_NEAREST, NULL);
- this->deltaX = tempDelta[0];
- this->inputYOperation->read(tempDelta, 0, 0, COM_PS_NEAREST, NULL);
- this->deltaY = tempDelta[0];
- this->isDeltaSet = true;
+ this->m_inputXOperation->read(tempDelta, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_deltaX = tempDelta[0];
+ this->m_inputYOperation->read(tempDelta, 0, 0, COM_PS_NEAREST, NULL);
+ this->m_deltaY = tempDelta[0];
+ this->m_isDeltaSet = true;
}
}
};
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index c17e51e6391..9eb004b3686 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -36,21 +36,21 @@ VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation() : NodeOperation
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->inputProgram = NULL;
- this->inputBokehProgram = NULL;
- this->inputSizeProgram = NULL;
- this->inputDepthProgram = NULL;
- this->maxBlur = 32.0f;
- this->threshold = 1.0f;
+ this->m_inputProgram = NULL;
+ this->m_inputBokehProgram = NULL;
+ this->m_inputSizeProgram = NULL;
+ this->m_inputDepthProgram = NULL;
+ this->m_maxBlur = 32.0f;
+ this->m_threshold = 1.0f;
}
void VariableSizeBokehBlurOperation::initExecution()
{
- this->inputProgram = getInputSocketReader(0);
- this->inputBokehProgram = getInputSocketReader(1);
- this->inputSizeProgram = getInputSocketReader(2);
- this->inputDepthProgram = getInputSocketReader(3);
+ this->m_inputProgram = getInputSocketReader(0);
+ this->m_inputBokehProgram = getInputSocketReader(1);
+ this->m_inputSizeProgram = getInputSocketReader(2);
+ this->m_inputDepthProgram = getInputSocketReader(3);
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -63,27 +63,27 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
float multiplier_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float color_accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
- int miny = y - maxBlur;
- int maxy = y + maxBlur;
- int minx = x - maxBlur;
- int maxx = x + maxBlur;
+ int miny = y - this->m_maxBlur;
+ int maxy = y + this->m_maxBlur;
+ int minx = x - this->m_maxBlur;
+ int maxx = x + this->m_maxBlur;
{
- inputSizeProgram->read(tempSize, x, y, COM_PS_NEAREST, inputBuffers);
- inputDepthProgram->read(tempDepth, x, y, COM_PS_NEAREST, inputBuffers);
- inputProgram->read(readColor, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputSizeProgram->read(tempSize, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputDepthProgram->read(tempDepth, x, y, COM_PS_NEAREST, inputBuffers);
+ this->m_inputProgram->read(readColor, x, y, COM_PS_NEAREST, inputBuffers);
add_v4_v4(color_accum, readColor);
add_v4_fl(multiplier_accum, 1.0f);
float sizeCenter = tempSize[0];
- float centerDepth = tempDepth[0]+threshold;
+ float centerDepth = tempDepth[0] + this->m_threshold;
for (int ny = miny; ny < maxy; ny += QualityStepHelper::getStep()) {
for (int nx = minx; nx < maxx; nx += QualityStepHelper::getStep()) {
if (nx >= 0 && nx < this->getWidth() && ny >= 0 && ny < getHeight()) {
- inputDepthProgram->read(tempDepth, nx, ny, COM_PS_NEAREST, inputBuffers);
- inputSizeProgram->read(tempSize, nx, ny, COM_PS_NEAREST, inputBuffers);
+ this->m_inputDepthProgram->read(tempDepth, nx, ny, COM_PS_NEAREST, inputBuffers);
+ this->m_inputSizeProgram->read(tempSize, nx, ny, COM_PS_NEAREST, inputBuffers);
float size = tempSize[0];
if (tempDepth[0] < centerDepth) {
- if ((sizeCenter > threshold && size > threshold) || size <= threshold) {
+ if ((sizeCenter > this->m_threshold && size > this->m_threshold) || size <= this->m_threshold) {
float dx = nx - x;
float dy = ny - y;
if (nx == x && ny == y) {
@@ -91,8 +91,8 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
else if (size >= fabsf(dx) && size >= fabsf(dy)) {
float u = 256 + dx * 256 / size;
float v = 256 + dy * 256 / size;
- inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
- inputProgram->read(readColor, nx, ny, COM_PS_NEAREST, inputBuffers);
+ this->m_inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
+ this->m_inputProgram->read(readColor, nx, ny, COM_PS_NEAREST, inputBuffers);
madd_v4_v4v4(color_accum, bokeh, readColor);
add_v4_v4(multiplier_accum, bokeh);
}
@@ -112,9 +112,9 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
void VariableSizeBokehBlurOperation::deinitExecution()
{
- this->inputProgram = NULL;
- this->inputBokehProgram = NULL;
- this->inputSizeProgram = NULL;
+ this->m_inputProgram = NULL;
+ this->m_inputBokehProgram = NULL;
+ this->m_inputSizeProgram = NULL;
}
bool VariableSizeBokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -122,10 +122,10 @@ bool VariableSizeBokehBlurOperation::determineDependingAreaOfInterest(rcti *inpu
rcti newInput;
rcti bokehInput;
- newInput.xmax = input->xmax + maxBlur + 2;
- newInput.xmin = input->xmin - maxBlur + 2;
- newInput.ymax = input->ymax + maxBlur - 2;
- newInput.ymin = input->ymin - maxBlur - 2;
+ newInput.xmax = input->xmax + this->m_maxBlur + 2;
+ newInput.xmin = input->xmin - this->m_maxBlur + 2;
+ newInput.ymax = input->ymax + this->m_maxBlur - 2;
+ newInput.ymin = input->ymin - this->m_maxBlur - 2;
bokehInput.xmax = 512;
bokehInput.xmin = 0;
bokehInput.ymax = 512;
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
index d04bf08405f..8e59a43fcb1 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
@@ -27,12 +27,12 @@
class VariableSizeBokehBlurOperation : public NodeOperation, public QualityStepHelper {
private:
- int maxBlur;
- float threshold;
- SocketReader *inputProgram;
- SocketReader *inputBokehProgram;
- SocketReader *inputSizeProgram;
- SocketReader *inputDepthProgram;
+ int m_maxBlur;
+ float m_threshold;
+ SocketReader *m_inputProgram;
+ SocketReader *m_inputBokehProgram;
+ SocketReader *m_inputSizeProgram;
+ SocketReader *m_inputDepthProgram;
public:
VariableSizeBokehBlurOperation();
@@ -54,9 +54,9 @@ public:
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void setMaxBlur(int maxRadius) { this->maxBlur = maxRadius; }
+ void setMaxBlur(int maxRadius) { this->m_maxBlur = maxRadius; }
- void setThreshold(float threshold) { this->threshold = threshold; }
+ void setThreshold(float threshold) { this->m_threshold = threshold; }
};
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index 3efae2c4e3d..48be72561ba 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -34,20 +34,20 @@ VectorBlurOperation::VectorBlurOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE); // ZBUF
this->addInputSocket(COM_DT_COLOR); //SPEED
this->addOutputSocket(COM_DT_COLOR);
- this->settings = NULL;
- this->cachedInstance = NULL;
- this->inputImageProgram = NULL;
- this->inputSpeedProgram = NULL;
- this->inputZProgram = NULL;
+ this->m_settings = NULL;
+ this->m_cachedInstance = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputSpeedProgram = NULL;
+ this->m_inputZProgram = NULL;
setComplex(true);
}
void VectorBlurOperation::initExecution()
{
initMutex();
- this->inputImageProgram = getInputSocketReader(0);
- this->inputZProgram = getInputSocketReader(1);
- this->inputSpeedProgram = getInputSocketReader(2);
- this->cachedInstance = NULL;
+ this->m_inputImageProgram = getInputSocketReader(0);
+ this->m_inputZProgram = getInputSocketReader(1);
+ this->m_inputSpeedProgram = getInputSocketReader(2);
+ this->m_cachedInstance = NULL;
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -56,44 +56,43 @@ void VectorBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer
{
float *buffer = (float *) data;
int index = (y * this->getWidth() + x) * COM_NUMBER_OF_CHANNELS;
- color[0] = buffer[index];
- color[1] = buffer[index + 1];
- color[2] = buffer[index + 2];
- color[3] = buffer[index + 3];
+ copy_v4_v4(color, &buffer[index]);
}
void VectorBlurOperation::deinitExecution()
{
deinitMutex();
- this->inputImageProgram = NULL;
- this->inputSpeedProgram = NULL;
- this->inputZProgram = NULL;
- if (this->cachedInstance) {
- delete cachedInstance;
- this->cachedInstance = NULL;
+ this->m_inputImageProgram = NULL;
+ this->m_inputSpeedProgram = NULL;
+ this->m_inputZProgram = NULL;
+ if (this->m_cachedInstance) {
+ delete this->m_cachedInstance;
+ this->m_cachedInstance = NULL;
}
}
void *VectorBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->cachedInstance) return this->cachedInstance;
+ if (this->m_cachedInstance) {
+ return this->m_cachedInstance;
+ }
lockMutex();
- if (this->cachedInstance == NULL) {
- MemoryBuffer *tile = (MemoryBuffer *)inputImageProgram->initializeTileData(rect, memoryBuffers);
- MemoryBuffer *speed = (MemoryBuffer *)inputSpeedProgram->initializeTileData(rect, memoryBuffers);
- MemoryBuffer *z = (MemoryBuffer *)inputZProgram->initializeTileData(rect, memoryBuffers);
+ if (this->m_cachedInstance == NULL) {
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputImageProgram->initializeTileData(rect, memoryBuffers);
+ MemoryBuffer *speed = (MemoryBuffer *)this->m_inputSpeedProgram->initializeTileData(rect, memoryBuffers);
+ MemoryBuffer *z = (MemoryBuffer *)this->m_inputZProgram->initializeTileData(rect, memoryBuffers);
float *data = new float[this->getWidth() * this->getHeight() * COM_NUMBER_OF_CHANNELS];
memcpy(data, tile->getBuffer(), this->getWidth() * this->getHeight() * COM_NUMBER_OF_CHANNELS * sizeof(float));
this->generateVectorBlur(data, tile, speed, z);
- this->cachedInstance = data;
+ this->m_cachedInstance = data;
}
unlockMutex();
- return this->cachedInstance;
+ return this->m_cachedInstance;
}
bool VectorBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
- if (this->cachedInstance == NULL) {
+ if (this->m_cachedInstance == NULL) {
rcti newInput;
newInput.xmax = this->getWidth();
newInput.xmin = 0;
@@ -110,11 +109,11 @@ void VectorBlurOperation::generateVectorBlur(float *data, MemoryBuffer *inputIma
{
float *zbuf = inputZ->convertToValueBuffer();
NodeBlurData blurdata;
- blurdata.samples = this->settings->samples / QualityStepHelper::getStep();
- blurdata.maxspeed = this->settings->maxspeed;
- blurdata.minspeed = this->settings->minspeed;
- blurdata.curved = this->settings->curved;
- blurdata.fac = this->settings->fac;
+ blurdata.samples = this->m_settings->samples / QualityStepHelper::getStep();
+ blurdata.maxspeed = this->m_settings->maxspeed;
+ blurdata.minspeed = this->m_settings->minspeed;
+ blurdata.curved = this->m_settings->curved;
+ blurdata.fac = this->m_settings->fac;
RE_zbuf_accumulate_vecblur(&blurdata, this->getWidth(), this->getHeight(), data, inputImage->getBuffer(), inputSpeed->getBuffer(), zbuf);
delete zbuf;
return;
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.h b/source/blender/compositor/operations/COM_VectorBlurOperation.h
index 30821cdd8b2..a2e72fa3232 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.h
@@ -31,16 +31,16 @@ private:
/**
* @brief Cached reference to the inputProgram
*/
- SocketReader *inputImageProgram;
- SocketReader *inputSpeedProgram;
- SocketReader *inputZProgram;
+ SocketReader *m_inputImageProgram;
+ SocketReader *m_inputSpeedProgram;
+ SocketReader *m_inputZProgram;
/**
* @brief settings of the glare node.
*/
- NodeBlurData *settings;
+ NodeBlurData *m_settings;
- float *cachedInstance;
+ float *m_cachedInstance;
public:
VectorBlurOperation();
@@ -62,7 +62,7 @@ public:
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
- void setVectorBlurSettings(NodeBlurData *settings) { this->settings = settings; }
+ void setVectorBlurSettings(NodeBlurData *settings) { this->m_settings = settings; }
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
protected:
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
index 3173599ece6..ee3f44d8979 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -35,12 +35,12 @@ VectorCurveOperation::VectorCurveOperation() : CurveBaseOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VECTOR);
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void VectorCurveOperation::initExecution()
{
CurveBaseOperation::initExecution();
- this->inputProgram = this->getInputSocketReader(0);
+ this->m_inputProgram = this->getInputSocketReader(0);
}
void VectorCurveOperation::executePixel(float *output, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -48,13 +48,13 @@ void VectorCurveOperation::executePixel(float *output, float x, float y, PixelSa
float input[4];
- this->inputProgram->read(input, x, y, sampler, inputBuffers);
+ this->m_inputProgram->read(input, x, y, sampler, inputBuffers);
- curvemapping_evaluate_premulRGBF(this->curveMapping, output, input);
+ curvemapping_evaluate_premulRGBF(this->m_curveMapping, output, input);
output[3] = input[3];
}
void VectorCurveOperation::deinitExecution()
{
- this->inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.h b/source/blender/compositor/operations/COM_VectorCurveOperation.h
index 41faee7acf6..2fbaf170986 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.h
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.h
@@ -30,7 +30,7 @@ private:
/**
* Cached reference to the inputProgram
*/
- SocketReader *inputProgram;
+ SocketReader *m_inputProgram;
public:
VectorCurveOperation();
diff --git a/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp b/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
index a8aa84e84f9..446b169763c 100644
--- a/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
@@ -42,10 +42,10 @@ ViewerBaseOperation::ViewerBaseOperation() : NodeOperation()
{
this->setImage(NULL);
this->setImageUser(NULL);
- this->outputBuffer = NULL;
- this->outputBufferDisplay = NULL;
- this->active = false;
- this->doColorManagement = true;
+ this->m_outputBuffer = NULL;
+ this->m_outputBufferDisplay = NULL;
+ this->m_active = false;
+ this->m_doColorManagement = true;
}
void ViewerBaseOperation::initExecution()
@@ -57,8 +57,8 @@ void ViewerBaseOperation::initExecution()
void ViewerBaseOperation::initImage()
{
- Image *anImage = this->image;
- ImBuf *ibuf = BKE_image_acquire_ibuf(anImage, this->imageUser, &this->lock);
+ Image *anImage = this->m_image;
+ ImBuf *ibuf = BKE_image_acquire_ibuf(anImage, this->m_imageUser, &this->m_lock);
if (!ibuf) return;
if (ibuf->x != (int)getWidth() || ibuf->y != (int)getHeight()) {
@@ -73,10 +73,10 @@ void ViewerBaseOperation::initImage()
}
/* now we combine the input with ibuf */
- this->outputBuffer = ibuf->rect_float;
- this->outputBufferDisplay = (unsigned char *)ibuf->rect;
+ this->m_outputBuffer = ibuf->rect_float;
+ this->m_outputBufferDisplay = (unsigned char *)ibuf->rect;
- BKE_image_release_ibuf(this->image, this->lock);
+ BKE_image_release_ibuf(this->m_image, this->m_lock);
}
void ViewerBaseOperation:: updateImage(rcti *rect)
{
@@ -85,7 +85,7 @@ void ViewerBaseOperation:: updateImage(rcti *rect)
void ViewerBaseOperation::deinitExecution()
{
- this->outputBuffer = NULL;
+ this->m_outputBuffer = NULL;
}
const CompositorPriority ViewerBaseOperation::getRenderPriority() const
diff --git a/source/blender/compositor/operations/COM_ViewerBaseOperation.h b/source/blender/compositor/operations/COM_ViewerBaseOperation.h
index 2aaa7d20966..f3fd1e9c9df 100644
--- a/source/blender/compositor/operations/COM_ViewerBaseOperation.h
+++ b/source/blender/compositor/operations/COM_ViewerBaseOperation.h
@@ -28,35 +28,35 @@
class ViewerBaseOperation : public NodeOperation {
protected:
- float *outputBuffer;
- unsigned char *outputBufferDisplay;
- Image *image;
- ImageUser *imageUser;
- void *lock;
- bool active;
- float centerX;
- float centerY;
- OrderOfChunks chunkOrder;
- bool doColorManagement;
- bool doColorPredivide;
+ float *m_outputBuffer;
+ unsigned char *m_outputBufferDisplay;
+ Image *m_image;
+ ImageUser *m_imageUser;
+ void *m_lock;
+ bool m_active;
+ float m_centerX;
+ float m_centerY;
+ OrderOfChunks m_chunkOrder;
+ bool m_doColorManagement;
+ bool m_doColorPredivide;
public:
bool isOutputOperation(bool rendering) const { return isActiveViewerOutput(); }
void initExecution();
void deinitExecution();
- void setImage(Image *image) { this->image = image; }
- void setImageUser(ImageUser *imageUser) { this->imageUser = imageUser; }
- const bool isActiveViewerOutput() const { return active; }
- void setActive(bool active) { this->active = active; }
- void setCenterX(float centerX) { this->centerX = centerX;}
- void setCenterY(float centerY) { this->centerY = centerY;}
- void setChunkOrder(OrderOfChunks tileOrder) { this->chunkOrder = tileOrder; }
- float getCenterX() { return this->centerX; }
- float getCenterY() { return this->centerY; }
- OrderOfChunks getChunkOrder() { return this->chunkOrder; }
+ void setImage(Image *image) { this->m_image = image; }
+ void setImageUser(ImageUser *imageUser) { this->m_imageUser = imageUser; }
+ const bool isActiveViewerOutput() const { return this->m_active; }
+ void setActive(bool active) { this->m_active = active; }
+ void setCenterX(float centerX) { this->m_centerX = centerX;}
+ void setCenterY(float centerY) { this->m_centerY = centerY;}
+ void setChunkOrder(OrderOfChunks tileOrder) { this->m_chunkOrder = tileOrder; }
+ float getCenterX() { return this->m_centerX; }
+ float getCenterY() { return this->m_centerY; }
+ OrderOfChunks getChunkOrder() { return this->m_chunkOrder; }
const CompositorPriority getRenderPriority() const;
- void setColorManagement(bool doColorManagement) { this->doColorManagement = doColorManagement; }
- void setColorPredivide(bool doColorPredivide) { this->doColorPredivide = doColorPredivide; }
+ void setColorManagement(bool doColorManagement) { this->m_doColorManagement = doColorManagement; }
+ void setColorPredivide(bool doColorPredivide) { this->m_doColorPredivide = doColorPredivide; }
bool isViewerOperation() { return true; }
protected:
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp
index cf7bf3fdc9d..9278ddd6ead 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp
@@ -44,30 +44,30 @@ ViewerOperation::ViewerOperation() : ViewerBaseOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
- this->imageInput = NULL;
- this->alphaInput = NULL;
+ this->m_imageInput = NULL;
+ this->m_alphaInput = NULL;
}
void ViewerOperation::initExecution()
{
// When initializing the tree during initial load the width and height can be zero.
- this->imageInput = getInputSocketReader(0);
- this->alphaInput = getInputSocketReader(1);
+ this->m_imageInput = getInputSocketReader(0);
+ this->m_alphaInput = getInputSocketReader(1);
ViewerBaseOperation::initExecution();
}
void ViewerOperation::deinitExecution()
{
- this->imageInput = NULL;
- this->alphaInput = NULL;
+ this->m_imageInput = NULL;
+ this->m_alphaInput = NULL;
ViewerBaseOperation::deinitExecution();
}
void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
{
- float *buffer = this->outputBuffer;
- unsigned char *bufferDisplay = this->outputBufferDisplay;
+ float *buffer = this->m_outputBuffer;
+ unsigned char *bufferDisplay = this->m_outputBufferDisplay;
if (!buffer) return;
const int x1 = rect->xmin;
const int y1 = rect->ymin;
@@ -82,14 +82,14 @@ void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryB
for (y = y1; y < y2 && (!breaked); y++) {
for (x = x1; x < x2; x++) {
- imageInput->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers);
- if (alphaInput != NULL) {
- alphaInput->read(alpha, x, y, COM_PS_NEAREST, memoryBuffers);
+ this->m_imageInput->read(&(buffer[offset]), x, y, COM_PS_NEAREST, memoryBuffers);
+ if (this->m_alphaInput != NULL) {
+ this->m_alphaInput->read(alpha, x, y, COM_PS_NEAREST, memoryBuffers);
buffer[offset + 3] = alpha[0];
}
/// @todo: linear conversion only when scene color management is selected, also check predivide.
- if (this->doColorManagement) {
- if (this->doColorPredivide) {
+ if (this->m_doColorManagement) {
+ if (this->m_doColorPredivide) {
linearrgb_to_srgb_predivide_v4(srgb, buffer + offset);
}
else {
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.h b/source/blender/compositor/operations/COM_ViewerOperation.h
index 49ef5ad4bb7..fd83c3957f1 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.h
+++ b/source/blender/compositor/operations/COM_ViewerOperation.h
@@ -29,8 +29,8 @@
class ViewerOperation : public ViewerBaseOperation {
private:
- SocketReader *imageInput;
- SocketReader *alphaInput;
+ SocketReader *m_imageInput;
+ SocketReader *m_alphaInput;
public:
ViewerOperation();
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 356ba452185..7259db34134 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -28,42 +28,42 @@
WriteBufferOperation::WriteBufferOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
- this->memoryProxy = new MemoryProxy();
- this->memoryProxy->setWriteBufferOperation(this);
- this->memoryProxy->setExecutor(NULL);
+ this->m_memoryProxy = new MemoryProxy();
+ this->m_memoryProxy->setWriteBufferOperation(this);
+ this->m_memoryProxy->setExecutor(NULL);
}
WriteBufferOperation::~WriteBufferOperation()
{
- if (this->memoryProxy) {
- delete this->memoryProxy;
- this->memoryProxy = NULL;
+ if (this->m_memoryProxy) {
+ delete this->m_memoryProxy;
+ this->m_memoryProxy = NULL;
}
}
void WriteBufferOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- input->read(color, x, y, sampler, inputBuffers);
+ this->m_input->read(color, x, y, sampler, inputBuffers);
}
void WriteBufferOperation::initExecution()
{
- this->input = this->getInputOperation(0);
- this->memoryProxy->allocate(this->width, this->height);
+ this->m_input = this->getInputOperation(0);
+ this->m_memoryProxy->allocate(this->m_width, this->m_height);
}
void WriteBufferOperation::deinitExecution()
{
- this->input = NULL;
- this->memoryProxy->free();
+ this->m_input = NULL;
+ this->m_memoryProxy->free();
}
void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, MemoryBuffer **memoryBuffers)
{
//MemoryBuffer *memoryBuffer = MemoryManager::getMemoryBuffer(this->getMemoryProxy(), tileNumber);
- MemoryBuffer *memoryBuffer = this->memoryProxy->getBuffer();
+ MemoryBuffer *memoryBuffer = this->m_memoryProxy->getBuffer();
float *buffer = memoryBuffer->getBuffer();
- if (this->input->isComplex()) {
- void *data = this->input->initializeTileData(rect, memoryBuffers);
+ if (this->m_input->isComplex()) {
+ void *data = this->m_input->initializeTileData(rect, memoryBuffers);
int x1 = rect->xmin;
int y1 = rect->ymin;
int x2 = rect->xmax;
@@ -74,7 +74,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me
for (y = y1; y < y2 && (!breaked); y++) {
int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS;
for (x = x1; x < x2; x++) {
- input->read(&(buffer[offset4]), x, y, memoryBuffers, data);
+ this->m_input->read(&(buffer[offset4]), x, y, memoryBuffers, data);
offset4 += COM_NUMBER_OF_CHANNELS;
}
@@ -84,7 +84,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me
}
if (data) {
- this->input->deinitializeTileData(rect, memoryBuffers, data);
+ this->m_input->deinitializeTileData(rect, memoryBuffers, data);
data = NULL;
}
}
@@ -100,7 +100,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber, Me
for (y = y1; y < y2 && (!breaked); y++) {
int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS;
for (x = x1; x < x2; x++) {
- input->read(&(buffer[offset4]), x, y, COM_PS_NEAREST, memoryBuffers);
+ this->m_input->read(&(buffer[offset4]), x, y, COM_PS_NEAREST, memoryBuffers);
offset4 += COM_NUMBER_OF_CHANNELS;
}
if (isBreaked()) {
@@ -140,7 +140,7 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice* device, rcti *rect,
clMemToCleanUp->push_back(clOutputBuffer);
list<cl_kernel> *clKernelsToCleanUp = new list<cl_kernel>();
- this->input->executeOpenCL(device, outputBuffer, clOutputBuffer, inputMemoryBuffers, clMemToCleanUp, clKernelsToCleanUp);
+ this->m_input->executeOpenCL(device, outputBuffer, clOutputBuffer, inputMemoryBuffers, clMemToCleanUp, clKernelsToCleanUp);
// STEP 3
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.h b/source/blender/compositor/operations/COM_WriteBufferOperation.h
index ccc20584186..24bfdecd124 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.h
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.h
@@ -31,13 +31,13 @@
* @ingroup Operation
*/
class WriteBufferOperation : public NodeOperation {
- MemoryProxy *memoryProxy;
- NodeOperation *input;
+ MemoryProxy *m_memoryProxy;
+ NodeOperation *m_input;
public:
WriteBufferOperation();
~WriteBufferOperation();
int isBufferOperation() { return true; }
- MemoryProxy *getMemoryProxy() { return this->memoryProxy; }
+ MemoryProxy *getMemoryProxy() { return this->m_memoryProxy; }
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
const bool isWriteBufferOperation() const { return true; }
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
index eb02b150fa4..c1ea63432b9 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -31,19 +31,19 @@ ZCombineOperation::ZCombineOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->image1Reader = NULL;
- this->depth1Reader = NULL;
- this->image2Reader = NULL;
- this->depth2Reader = NULL;
+ this->m_image1Reader = NULL;
+ this->m_depth1Reader = NULL;
+ this->m_image2Reader = NULL;
+ this->m_depth2Reader = NULL;
}
void ZCombineOperation::initExecution()
{
- this->image1Reader = this->getInputSocketReader(0);
- this->depth1Reader = this->getInputSocketReader(1);
- this->image2Reader = this->getInputSocketReader(2);
- this->depth2Reader = this->getInputSocketReader(3);
+ this->m_image1Reader = this->getInputSocketReader(0);
+ this->m_depth1Reader = this->getInputSocketReader(1);
+ this->m_image2Reader = this->getInputSocketReader(2);
+ this->m_depth2Reader = this->getInputSocketReader(3);
}
void ZCombineOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -51,13 +51,13 @@ void ZCombineOperation::executePixel(float *color, float x, float y, PixelSample
float depth1[4];
float depth2[4];
- this->depth1Reader->read(depth1, x, y, sampler, inputBuffers);
- this->depth2Reader->read(depth2, x, y, sampler, inputBuffers);
+ this->m_depth1Reader->read(depth1, x, y, sampler, inputBuffers);
+ this->m_depth2Reader->read(depth2, x, y, sampler, inputBuffers);
if (depth1[0] < depth2[0]) {
- this->image1Reader->read(color, x, y, sampler, inputBuffers);
+ this->m_image1Reader->read(color, x, y, sampler, inputBuffers);
}
else {
- this->image2Reader->read(color, x, y, sampler, inputBuffers);
+ this->m_image2Reader->read(color, x, y, sampler, inputBuffers);
}
}
void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -67,15 +67,15 @@ void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelS
float color1[4];
float color2[4];
- this->depth1Reader->read(depth1, x, y, sampler, inputBuffers);
- this->depth2Reader->read(depth2, x, y, sampler, inputBuffers);
+ this->m_depth1Reader->read(depth1, x, y, sampler, inputBuffers);
+ this->m_depth2Reader->read(depth2, x, y, sampler, inputBuffers);
if (depth1[0] < depth2[0]) {
- this->image1Reader->read(color1, x, y, sampler, inputBuffers);
- this->image2Reader->read(color2, x, y, sampler, inputBuffers);
+ this->m_image1Reader->read(color1, x, y, sampler, inputBuffers);
+ this->m_image2Reader->read(color2, x, y, sampler, inputBuffers);
}
else {
- this->image1Reader->read(color2, x, y, sampler, inputBuffers);
- this->image2Reader->read(color1, x, y, sampler, inputBuffers);
+ this->m_image1Reader->read(color2, x, y, sampler, inputBuffers);
+ this->m_image2Reader->read(color1, x, y, sampler, inputBuffers);
}
float fac = color1[3];
float ifac = 1.0f - fac;
@@ -87,8 +87,8 @@ void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelS
void ZCombineOperation::deinitExecution()
{
- this->image1Reader = NULL;
- this->depth1Reader = NULL;
- this->image2Reader = NULL;
- this->depth2Reader = NULL;
+ this->m_image1Reader = NULL;
+ this->m_depth1Reader = NULL;
+ this->m_image2Reader = NULL;
+ this->m_depth2Reader = NULL;
}
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.h b/source/blender/compositor/operations/COM_ZCombineOperation.h
index 56ad950a3aa..2ade3f599ad 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.h
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.h
@@ -31,10 +31,10 @@
*/
class ZCombineOperation : public NodeOperation {
protected:
- SocketReader *image1Reader;
- SocketReader *depth1Reader;
- SocketReader *image2Reader;
- SocketReader *depth2Reader;
+ SocketReader *m_image1Reader;
+ SocketReader *m_depth1Reader;
+ SocketReader *m_image2Reader;
+ SocketReader *m_depth2Reader;
public:
/**
* Default constructor