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:
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/CMakeLists.txt4
-rw-r--r--source/blender/compositor/COM_compositor.h4
-rw-r--r--source/blender/compositor/intern/COM_ChannelInfo.cpp6
-rw-r--r--source/blender/compositor/intern/COM_ChannelInfo.h24
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrder.cpp14
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrder.h18
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp12
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrderHotspot.h15
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.cpp16
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.h44
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp166
-rw-r--r--source/blender/compositor/intern/COM_Converter.h8
-rw-r--r--source/blender/compositor/intern/COM_Device.h3
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp249
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h51
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp116
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.h28
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp14
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystemHelper.h9
-rw-r--r--source/blender/compositor/intern/COM_InputSocket.cpp22
-rw-r--r--source/blender/compositor/intern/COM_InputSocket.h8
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp88
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h28
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cpp12
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.h28
-rw-r--r--source/blender/compositor/intern/COM_Node.cpp6
-rw-r--r--source/blender/compositor/intern/COM_Node.h8
-rw-r--r--source/blender/compositor/intern/COM_NodeBase.cpp26
-rw-r--r--source/blender/compositor/intern/COM_NodeBase.h17
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp26
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h36
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp32
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.h14
-rw-r--r--source/blender/compositor/intern/COM_OutputSocket.cpp22
-rw-r--r--source/blender/compositor/intern/COM_OutputSocket.h6
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp18
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h4
-rw-r--r--source/blender/compositor/intern/COM_Socket.cpp12
-rw-r--r--source/blender/compositor/intern/COM_Socket.h17
-rw-r--r--source/blender/compositor/intern/COM_SocketConnection.cpp16
-rw-r--r--source/blender/compositor/intern/COM_SocketConnection.h14
-rw-r--r--source/blender/compositor/intern/COM_SocketReader.h18
-rw-r--r--source/blender/compositor/intern/COM_WorkPackage.cpp4
-rw-r--r--source/blender/compositor/intern/COM_WorkPackage.h12
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp130
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.h7
-rw-r--r--source/blender/compositor/intern/COM_compositor.cpp16
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.h1
-rw-r--r--source/blender/compositor/nodes/COM_BokehBlurNode.h1
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_ChromaMatteNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_ColorMatteNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_ColorRampNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_ColorSpillNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_ColorToBWNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CombineHSVANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CombineRGBANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CombineYCCANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CombineYUVANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CompositorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CropNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.h1
-rw-r--r--source/blender/compositor/nodes/COM_DifferenceMatteNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_DilateErodeNode.cpp8
-rw-r--r--source/blender/compositor/nodes/COM_DilateErodeNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_DisplaceNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DistanceMatteNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.h9
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.h1
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.cpp111
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.h12
-rw-r--r--source/blender/compositor/nodes/COM_KeyingScreenNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_LuminanceMatteNode.h9
-rw-r--r--source/blender/compositor/nodes/COM_MapUVNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MapValueNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.cpp3
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MovieClipNode.h8
-rw-r--r--source/blender/compositor/nodes/COM_NormalNode.h7
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SeparateHSVANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SeparateRGBANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SeparateYCCANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SeparateYUVANode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SetAlphaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SplitViewerNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_Stabilize2dNode.h5
-rw-r--r--source/blender/compositor/nodes/COM_SwitchNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TransformNode.h5
-rw-r--r--source/blender/compositor/nodes/COM_ViewerNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.h4
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.h8
-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.cpp55
-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.cpp19
-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.cpp19
-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.cpp179
-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.cpp64
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp66
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.h14
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp56
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp49
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp52
-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.cpp4
-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.cpp43
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.h11
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.h24
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.h12
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp50
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.h18
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp189
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.h31
-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.cpp33
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp88
-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.cpp41
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h14
-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.cpp162
-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.h26
-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
344 files changed, 3868 insertions, 3557 deletions
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index d0093c58d23..653e11c80a7 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -46,6 +46,10 @@ set(INC
../../../intern/guardedalloc
)
+set(INC_SYS
+
+)
+
set(SRC
COM_compositor.h
COM_defines.h
diff --git a/source/blender/compositor/COM_compositor.h b/source/blender/compositor/COM_compositor.h
index 4d8c83a5b2d..86390e5650a 100644
--- a/source/blender/compositor/COM_compositor.h
+++ b/source/blender/compositor/COM_compositor.h
@@ -224,7 +224,7 @@ extern "C" {
* For every CPUcore a working thread is created. These working threads will ask the WorkScheduler if there is work
* for a specific Device.
* the workscheduler will find work for the device and the device will be asked to execute the WorkPackage
-
+ *
* @subsection singlethread Single threaded
* For debugging reasons the multi-threading can be disabled. This is done by changing the COM_CURRENT_THREADING_MODEL
* to COM_TM_NOTHREAD. When compiling the workscheduler
@@ -268,7 +268,7 @@ extern "C" {
*
* @section executePixel executing a pixel
* Finally the last step, the node functionality :)
-
+ *
* @page newnode Creating new nodes
*/
diff --git a/source/blender/compositor/intern/COM_ChannelInfo.cpp b/source/blender/compositor/intern/COM_ChannelInfo.cpp
index f2fa62006d5..557075cdc80 100644
--- a/source/blender/compositor/intern/COM_ChannelInfo.cpp
+++ b/source/blender/compositor/intern/COM_ChannelInfo.cpp
@@ -29,7 +29,7 @@
*/
ChannelInfo::ChannelInfo()
{
- this->number = 0;
- this->premultiplied = true;
- this->type = COM_CT_UNUSED;
+ this->m_number = 0;
+ this->m_premultiplied = true;
+ this->m_type = COM_CT_UNUSED;
}
diff --git a/source/blender/compositor/intern/COM_ChannelInfo.h b/source/blender/compositor/intern/COM_ChannelInfo.h
index 399fdc62fa2..44664442359 100644
--- a/source/blender/compositor/intern/COM_ChannelInfo.h
+++ b/source/blender/compositor/intern/COM_ChannelInfo.h
@@ -61,23 +61,23 @@ private:
/**
* @brief the channel number, in the connection. [0-3]
*/
- int number;
+ int m_number;
/**
* @brief type of channel
*/
- ChannelType type;
+ ChannelType m_type;
/**
* @brieg Is this value in this channel premultiplied with its alpha
* @note only valid if type = ColorComponent;
*/
- bool premultiplied;
+ bool m_premultiplied;
// /**
-// * Color space of this value.
-// * only valid when type = ColorComponent;
-// */
+// * Color space of this value.
+// * only valid when type = ColorComponent;
+// */
// string colorspacename;
public:
@@ -89,32 +89,32 @@ public:
/**
* @brief set the index of this channel in the SocketConnection
*/
- void setNumber(const int number) { this->number = number; }
+ void setNumber(const int number) { this->m_number = number; }
/**
* @brief get the index of this channel in the SocketConnection
*/
- const int getNumber() const { return this->number; }
+ const int getNumber() const { return this->m_number; }
/**
* @brief set the type of channel
*/
- void setType(const ChannelType type) { this->type = type; }
+ void setType(const ChannelType type) { this->m_type = type; }
/**
* @brief get the type of channel
*/
- const ChannelType getType() const { return this->type; }
+ const ChannelType getType() const { return this->m_type; }
/**
* @brief set the premultiplicatioin of this channel
*/
- void setPremultiplied(const bool premultiplied) { this->premultiplied = premultiplied; }
+ void setPremultiplied(const bool premultiplied) { this->m_premultiplied = premultiplied; }
/**
* @brief is this channel premultiplied
*/
- const bool isPremultiplied() const { return this->premultiplied; }
+ const bool isPremultiplied() const { return this->m_premultiplied; }
};
diff --git a/source/blender/compositor/intern/COM_ChunkOrder.cpp b/source/blender/compositor/intern/COM_ChunkOrder.cpp
index 02c28a1997a..38a3350c263 100644
--- a/source/blender/compositor/intern/COM_ChunkOrder.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrder.cpp
@@ -25,10 +25,10 @@
ChunkOrder::ChunkOrder()
{
- this->distance = 0.0;
- this->number = 0;
- this->x = 0;
- this->y = 0;
+ this->m_distance = 0.0;
+ this->m_number = 0;
+ this->m_x = 0;
+ this->m_y = 0;
}
void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots)
@@ -37,15 +37,15 @@ void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int nu
double distance = MAXFLOAT;
for (index = 0; index < numberOfHotspots; index++) {
ChunkOrderHotspot *hotspot = hotspots[index];
- double ndistance = hotspot->determineDistance(this->x, this->y);
+ double ndistance = hotspot->determineDistance(this->m_x, this->m_y);
if (ndistance < distance) {
distance = ndistance;
}
}
- this->distance = distance;
+ this->m_distance = distance;
}
bool operator<(const ChunkOrder& a, const ChunkOrder& b)
{
- return a.distance < b.distance;
+ return a.m_distance < b.m_distance;
}
diff --git a/source/blender/compositor/intern/COM_ChunkOrder.h b/source/blender/compositor/intern/COM_ChunkOrder.h
index f096ebeebfe..190ecb9c380 100644
--- a/source/blender/compositor/intern/COM_ChunkOrder.h
+++ b/source/blender/compositor/intern/COM_ChunkOrder.h
@@ -26,20 +26,20 @@
#include "COM_ChunkOrderHotspot.h"
class ChunkOrder {
private:
- unsigned int number;
- int x;
- int y;
- double distance;
+ unsigned int m_number;
+ int m_x;
+ int m_y;
+ double m_distance;
public:
ChunkOrder();
void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots);
friend bool operator<(const ChunkOrder& a, const ChunkOrder& b);
- void setChunkNumber(unsigned int chunknumber) { this->number = chunknumber; }
- void setX(int x) { this->x = x; }
- void setY(int y) { this->y = y; }
- unsigned int getChunkNumber() { return this->number; }
- double getDistance() { return this->distance; }
+ void setChunkNumber(unsigned int chunknumber) { this->m_number = chunknumber; }
+ void setX(int x) { this->m_x = x; }
+ void setY(int y) { this->m_y = y; }
+ unsigned int getChunkNumber() { return this->m_number; }
+ double getDistance() { return this->m_distance; }
};
#endif
diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
index 96568092b72..1e64e0b9ea0 100644
--- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
@@ -25,16 +25,16 @@
ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition)
{
- this->x = x;
- this->y = y;
- this->addition = addition;
+ this->m_x = x;
+ this->m_y = y;
+ this->m_addition = addition;
}
double ChunkOrderHotspot::determineDistance(int x, int y)
{
- int dx = x - this->x;
- int dy = y - this->y;
+ int dx = x - this->m_x;
+ int dy = y - this->m_y;
double result = sqrt((double)(dx * dx + dy * dy));
- result += (double)this->addition;
+ result += (double)this->m_addition;
return result;
}
diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.h b/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
index ceb5934a7df..b166a7af57f 100644
--- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
+++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.h
@@ -23,15 +23,24 @@
#ifndef _COM_ChunkOrderHotSpot_h_
#define _COM_ChunkOrderHotSpot_h_
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
class ChunkOrderHotspot {
private:
- int x;
- int y;
- float addition;
+ int m_x;
+ int m_y;
+ float m_addition;
public:
ChunkOrderHotspot(int x, int y, float addition);
double determineDistance(int x, int y);
+
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:ChunkOrderHotspot")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_CompositorContext.cpp b/source/blender/compositor/intern/COM_CompositorContext.cpp
index c3470f0a16e..56335630b80 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.cpp
+++ b/source/blender/compositor/intern/COM_CompositorContext.cpp
@@ -26,16 +26,16 @@
CompositorContext::CompositorContext()
{
- this->rd = NULL;
- this->quality = COM_QUALITY_HIGH;
- this->hasActiveOpenCLDevices = false;
- this->activegNode = NULL;
+ this->m_rd = NULL;
+ this->m_quality = COM_QUALITY_HIGH;
+ this->m_hasActiveOpenCLDevices = false;
+ this->m_activegNode = NULL;
}
const int CompositorContext::getFramenumber() const
{
- if (this->rd) {
- return this->rd->cfra;
+ if (this->m_rd) {
+ return this->m_rd->cfra;
}
else {
return -1; /* this should never happen */
@@ -44,8 +44,8 @@ const int CompositorContext::getFramenumber() const
const int CompositorContext::isColorManaged() const
{
- if (this->rd) {
- return this->rd->color_mgt_flag & R_COLOR_MANAGEMENT;
+ if (this->m_rd) {
+ return this->m_rd->color_mgt_flag & R_COLOR_MANAGEMENT;
}
else {
return 0; /* this should never happen */
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index 81fd81b4117..49acda811f1 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -41,38 +41,38 @@ private:
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
- bool rendering;
+ bool m_rendering;
/**
* @brief The quality of the composite.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
- CompositorQuality quality;
+ CompositorQuality m_quality;
/**
* @brief Reference to the render data that is being composited.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
- RenderData *rd;
+ RenderData *m_rd;
/**
* @brief reference to the bNodeTree
* This field is initialized in ExecutionSystem and must only be read from that point on.
* @see ExecutionSystem
*/
- bNodeTree *bnodetree;
+ bNodeTree *m_bnodetree;
/**
* @brief activegNode the group node that is currently being edited.
*/
- bNode *activegNode;
+ bNode *m_activegNode;
/**
* @brief does this system have active opencl devices?
*/
- bool hasActiveOpenCLDevices;
+ bool m_hasActiveOpenCLDevices;
public:
/**
@@ -83,56 +83,52 @@ public:
/**
* @brief set the rendering field of the context
*/
- void setRendering(bool rendering) { this->rendering = rendering; }
+ void setRendering(bool rendering) { this->m_rendering = rendering; }
/**
* @brief get the rendering field of the context
*/
- bool isRendering() const { return this->rendering; }
+ bool isRendering() const { return this->m_rendering; }
/**
* @brief set the scene of the context
*/
- void setRenderData(RenderData *rd) { this->rd = rd; }
+ void setRenderData(RenderData *rd) { this->m_rd = rd; }
/**
* @brief set the bnodetree of the context
*/
- void setbNodeTree(bNodeTree *bnodetree) { this->bnodetree = bnodetree; }
+ void setbNodeTree(bNodeTree *bnodetree) { this->m_bnodetree = bnodetree; }
/**
* @brief get the bnodetree of the context
*/
- const bNodeTree *getbNodeTree() const { return this->bnodetree; }
+ const bNodeTree *getbNodeTree() const { return this->m_bnodetree; }
/**
* @brief set the active groupnode of the context
*/
- void setActivegNode(bNode *gnode) { this->activegNode = gnode; }
+ void setActivegNode(bNode *gnode) { this->m_activegNode = gnode; }
/**
* @brief get the active groupnode of the context
*/
- const bNode *getActivegNode() const { return this->activegNode; }
+ const bNode *getActivegNode() const { return this->m_activegNode; }
/**
* @brief get the scene of the context
*/
- const RenderData *getRenderData() const { return this->rd; }
+ const RenderData *getRenderData() const { return this->m_rd; }
/**
* @brief set the quality
*/
- void setQuality(CompositorQuality quality) {
- this->quality = quality;
- }
+ void setQuality(CompositorQuality quality) { this->m_quality = quality; }
/**
* @brief get the quality
*/
- const CompositorQuality getQuality() const {
- return quality;
- }
+ const CompositorQuality getQuality() const { return this->m_quality; }
/**
* @brief get the current framenumber of the scene in this context
@@ -142,16 +138,12 @@ public:
/**
* @brief has this system active openclDevices?
*/
- const bool getHasActiveOpenCLDevices() const {
- return this->hasActiveOpenCLDevices;
- }
+ const bool getHasActiveOpenCLDevices() const { return this->m_hasActiveOpenCLDevices; }
/**
* @brief set has this system active openclDevices?
*/
- void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) {
- this->hasActiveOpenCLDevices = hasAvtiveOpenCLDevices;
- }
+ void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) { this->m_hasActiveOpenCLDevices = hasAvtiveOpenCLDevices; }
int getChunksize() { return this->getbNodeTree()->chunksize; }
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 0a8862e4017..38c514d8e99 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -117,253 +117,253 @@
#include "COM_ViewerNode.h"
#include "COM_ZCombineNode.h"
-Node *Converter::convert(bNode *bNode)
+Node *Converter::convert(bNode *b_node)
{
Node *node;
- if (bNode->flag & NODE_MUTED) {
- node = new MuteNode(bNode);
+ if (b_node->flag & NODE_MUTED) {
+ node = new MuteNode(b_node);
return node;
}
- switch (bNode->type) {
+ switch (b_node->type) {
case CMP_NODE_COMPOSITE:
- node = new CompositorNode(bNode);
+ node = new CompositorNode(b_node);
break;
case CMP_NODE_R_LAYERS:
- node = new RenderLayersNode(bNode);
+ node = new RenderLayersNode(b_node);
break;
case CMP_NODE_TEXTURE:
- node = new TextureNode(bNode);
+ node = new TextureNode(b_node);
break;
case CMP_NODE_RGBTOBW:
- node = new ColourToBWNode(bNode);
+ node = new ColourToBWNode(b_node);
break;
case CMP_NODE_MIX_RGB:
- node = new MixNode(bNode);
+ node = new MixNode(b_node);
break;
case CMP_NODE_TRANSLATE:
- node = new TranslateNode(bNode);
+ node = new TranslateNode(b_node);
break;
case CMP_NODE_SCALE:
- node = new ScaleNode(bNode);
+ node = new ScaleNode(b_node);
break;
case CMP_NODE_ROTATE:
- node = new RotateNode(bNode);
+ node = new RotateNode(b_node);
break;
case CMP_NODE_FLIP:
- node = new FlipNode(bNode);
+ node = new FlipNode(b_node);
break;
case CMP_NODE_FILTER:
- node = new FilterNode(bNode);
+ node = new FilterNode(b_node);
break;
case CMP_NODE_ID_MASK:
- node = new IDMaskNode(bNode);
+ node = new IDMaskNode(b_node);
break;
case CMP_NODE_BRIGHTCONTRAST:
- node = new BrightnessNode(bNode);
+ node = new BrightnessNode(b_node);
break;
case CMP_NODE_SEPRGBA:
- node = new SeparateRGBANode(bNode);
+ node = new SeparateRGBANode(b_node);
break;
case CMP_NODE_COMBRGBA:
- node = new CombineRGBANode(bNode);
+ node = new CombineRGBANode(b_node);
break;
case CMP_NODE_SEPHSVA:
- node = new SeparateHSVANode(bNode);
+ node = new SeparateHSVANode(b_node);
break;
case CMP_NODE_COMBHSVA:
- node = new CombineHSVANode(bNode);
+ node = new CombineHSVANode(b_node);
break;
case CMP_NODE_SEPYUVA:
- node = new SeparateYUVANode(bNode);
+ node = new SeparateYUVANode(b_node);
break;
case CMP_NODE_COMBYUVA:
- node = new CombineYUVANode(bNode);
+ node = new CombineYUVANode(b_node);
break;
case CMP_NODE_SEPYCCA:
- node = new SeparateYCCANode(bNode);
+ node = new SeparateYCCANode(b_node);
break;
case CMP_NODE_COMBYCCA:
- node = new CombineYCCANode(bNode);
+ node = new CombineYCCANode(b_node);
break;
case CMP_NODE_ALPHAOVER:
- node = new AlphaOverNode(bNode);
+ node = new AlphaOverNode(b_node);
break;
case CMP_NODE_COLORBALANCE:
- node = new ColorBalanceNode(bNode);
+ node = new ColorBalanceNode(b_node);
break;
case CMP_NODE_VIEWER:
- node = new ViewerNode(bNode);
+ node = new ViewerNode(b_node);
break;
case CMP_NODE_SPLITVIEWER:
- node = new SplitViewerNode(bNode);
+ node = new SplitViewerNode(b_node);
break;
case CMP_NODE_INVERT:
- node = new InvertNode(bNode);
+ node = new InvertNode(b_node);
break;
case NODE_GROUP:
- node = new GroupNode(bNode);
+ node = new GroupNode(b_node);
break;
case CMP_NODE_NORMAL:
- node = new NormalNode(bNode);
+ node = new NormalNode(b_node);
break;
case CMP_NODE_NORMALIZE:
- node = new NormalizeNode(bNode);
+ node = new NormalizeNode(b_node);
break;
case CMP_NODE_IMAGE:
- node = new ImageNode(bNode);
+ node = new ImageNode(b_node);
break;
case CMP_NODE_SETALPHA:
- node = new SetAlphaNode(bNode);
+ node = new SetAlphaNode(b_node);
break;
case CMP_NODE_PREMULKEY:
- node = new ConvertAlphaNode(bNode);
+ node = new ConvertAlphaNode(b_node);
break;
case CMP_NODE_MATH:
- node = new MathNode(bNode);
+ node = new MathNode(b_node);
break;
case CMP_NODE_HUE_SAT:
- node = new HueSaturationValueNode(bNode);
+ node = new HueSaturationValueNode(b_node);
break;
case CMP_NODE_COLORCORRECTION:
- node = new ColorCorrectionNode(bNode);
+ node = new ColorCorrectionNode(b_node);
break;
case CMP_NODE_MASK_BOX:
- node = new BoxMaskNode(bNode);
+ node = new BoxMaskNode(b_node);
break;
case CMP_NODE_MASK_ELLIPSE:
- node = new EllipseMaskNode(bNode);
+ node = new EllipseMaskNode(b_node);
break;
case CMP_NODE_GAMMA:
- node = new GammaNode(bNode);
+ node = new GammaNode(b_node);
break;
case CMP_NODE_CURVE_RGB:
- node = new ColorCurveNode(bNode);
+ node = new ColorCurveNode(b_node);
break;
case CMP_NODE_CURVE_VEC:
- node = new VectorCurveNode(bNode);
+ node = new VectorCurveNode(b_node);
break;
case CMP_NODE_HUECORRECT:
- node = new HueSaturationValueCorrectNode(bNode);
+ node = new HueSaturationValueCorrectNode(b_node);
break;
case CMP_NODE_MAP_UV:
- node = new MapUVNode(bNode);
+ node = new MapUVNode(b_node);
break;
case CMP_NODE_DISPLACE:
- node = new DisplaceNode(bNode);
+ node = new DisplaceNode(b_node);
break;
case CMP_NODE_VALTORGB:
- node = new ColorRampNode(bNode);
+ node = new ColorRampNode(b_node);
break;
case CMP_NODE_DIFF_MATTE:
- node = new DifferenceMatteNode(bNode);
+ node = new DifferenceMatteNode(b_node);
break;
case CMP_NODE_LUMA_MATTE:
- node = new LuminanceMatteNode(bNode);
+ node = new LuminanceMatteNode(b_node);
break;
case CMP_NODE_DIST_MATTE:
- node = new DistanceMatteNode(bNode);
+ node = new DistanceMatteNode(b_node);
break;
case CMP_NODE_CHROMA_MATTE:
- node = new ChromaMatteNode(bNode);
+ node = new ChromaMatteNode(b_node);
break;
case CMP_NODE_COLOR_MATTE:
- node = new ColorMatteNode(bNode);
+ node = new ColorMatteNode(b_node);
break;
case CMP_NODE_CHANNEL_MATTE:
- node = new ChannelMatteNode(bNode);
+ node = new ChannelMatteNode(b_node);
break;
case CMP_NODE_BLUR:
- node = new BlurNode(bNode);
+ node = new BlurNode(b_node);
break;
case CMP_NODE_BOKEHIMAGE:
- node = new BokehImageNode(bNode);
+ node = new BokehImageNode(b_node);
break;
case CMP_NODE_BOKEHBLUR:
- node = new BokehBlurNode(bNode);
+ node = new BokehBlurNode(b_node);
break;
case CMP_NODE_DILATEERODE:
- node = new DilateErodeNode(bNode);
+ node = new DilateErodeNode(b_node);
break;
case CMP_NODE_LENSDIST:
- node = new LensDistortionNode(bNode);
+ node = new LensDistortionNode(b_node);
break;
case CMP_NODE_RGB:
- node = new ColorNode(bNode);
+ node = new ColorNode(b_node);
break;
case CMP_NODE_VALUE:
- node = new ValueNode(bNode);
+ node = new ValueNode(b_node);
break;
case CMP_NODE_TIME:
- node = new TimeNode(bNode);
+ node = new TimeNode(b_node);
break;
case CMP_NODE_DBLUR:
- node = new DirectionalBlurNode(bNode);
+ node = new DirectionalBlurNode(b_node);
break;
case CMP_NODE_ZCOMBINE:
- node = new ZCombineNode(bNode);
+ node = new ZCombineNode(b_node);
break;
case CMP_NODE_TONEMAP:
- node = new TonemapNode(bNode);
+ node = new TonemapNode(b_node);
break;
case CMP_NODE_SWITCH:
- node = new SwitchNode(bNode);
+ node = new SwitchNode(b_node);
break;
case CMP_NODE_GLARE:
- node = new GlareNode(bNode);
+ node = new GlareNode(b_node);
break;
case CMP_NODE_MOVIECLIP:
- node = new MovieClipNode(bNode);
+ node = new MovieClipNode(b_node);
break;
case CMP_NODE_COLOR_SPILL:
- node = new ColorSpillNode(bNode);
+ node = new ColorSpillNode(b_node);
break;
case CMP_NODE_OUTPUT_FILE:
- node = new OutputFileNode(bNode);
+ node = new OutputFileNode(b_node);
break;
case CMP_NODE_MAP_VALUE:
- node = new MapValueNode(bNode);
+ node = new MapValueNode(b_node);
break;
case CMP_NODE_TRANSFORM:
- node = new TransformNode(bNode);
+ node = new TransformNode(b_node);
break;
case CMP_NODE_STABILIZE2D:
- node = new Stabilize2dNode(bNode);
+ node = new Stabilize2dNode(b_node);
break;
case CMP_NODE_BILATERALBLUR:
- node = new BilateralBlurNode(bNode);
+ node = new BilateralBlurNode(b_node);
break;
case CMP_NODE_VECBLUR:
- node = new VectorBlurNode(bNode);
+ node = new VectorBlurNode(b_node);
break;
case CMP_NODE_MOVIEDISTORTION:
- node = new MovieDistortionNode(bNode);
+ node = new MovieDistortionNode(b_node);
break;
case CMP_NODE_VIEW_LEVELS:
- node = new ViewLevelsNode(bNode);
+ node = new ViewLevelsNode(b_node);
break;
case CMP_NODE_DEFOCUS:
- node = new DefocusNode(bNode);
+ node = new DefocusNode(b_node);
break;
case CMP_NODE_DOUBLEEDGEMASK:
- node = new DoubleEdgeMaskNode(bNode);
+ node = new DoubleEdgeMaskNode(b_node);
break;
case CMP_NODE_CROP:
- node = new CropNode(bNode);
+ node = new CropNode(b_node);
break;
case CMP_NODE_MASK:
- node = new MaskNode(bNode);
+ node = new MaskNode(b_node);
break;
case CMP_NODE_KEYINGSCREEN:
- node = new KeyingScreenNode(bNode);
+ node = new KeyingScreenNode(b_node);
break;
case CMP_NODE_KEYING:
- node = new KeyingNode(bNode);
+ node = new KeyingNode(b_node);
break;
/* not inplemented yet */
default:
- node = new MuteNode(bNode);
+ node = new MuteNode(b_node);
break;
}
return node;
diff --git a/source/blender/compositor/intern/COM_Converter.h b/source/blender/compositor/intern/COM_Converter.h
index d01556cc79c..dbe98871c50 100644
--- a/source/blender/compositor/intern/COM_Converter.h
+++ b/source/blender/compositor/intern/COM_Converter.h
@@ -42,7 +42,7 @@ public:
* @see Node
* @see MuteNode
*/
- static Node *convert(bNode *bNode);
+ static Node *convert(bNode *b_node);
/**
* @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type.
@@ -60,11 +60,15 @@ public:
*
* @note Conversion logic is implemented in this method
* @see InputSocketResizeMode for the possible conversions.
-
+ *
* @param connection the SocketConnection what needs conversion
* @param system the ExecutionSystem to add the conversion to.
* @see SocketConnection - a link between two sockets
*/
static void convertResolution(SocketConnection *connection, ExecutionSystem *system);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:Converter")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_Device.h b/source/blender/compositor/intern/COM_Device.h
index 2a86382a191..e33a2a4288f 100644
--- a/source/blender/compositor/intern/COM_Device.h
+++ b/source/blender/compositor/intern/COM_Device.h
@@ -48,6 +48,9 @@ public:
*/
virtual void execute(WorkPackage *work) = 0;
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:Device")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 4dfb9c7d26c..2d3d24b296f 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -43,20 +43,20 @@
ExecutionGroup::ExecutionGroup()
{
- this->isOutput = false;
- this->complex = false;
- this->chunkExecutionStates = NULL;
- this->bTree = NULL;
- this->height = 0;
- this->width = 0;
- this->cachedMaxReadBufferOffset = 0;
- this->numberOfXChunks = 0;
- this->numberOfYChunks = 0;
- this->numberOfChunks = 0;
- this->initialized = false;
- this->openCL = false;
- this->singleThreaded = false;
- this->chunksFinished = 0;
+ this->m_isOutput = false;
+ this->m_complex = false;
+ this->m_chunkExecutionStates = NULL;
+ this->m_bTree = NULL;
+ this->m_height = 0;
+ this->m_width = 0;
+ this->m_cachedMaxReadBufferOffset = 0;
+ this->m_numberOfXChunks = 0;
+ this->m_numberOfYChunks = 0;
+ this->m_numberOfChunks = 0;
+ this->m_initialized = false;
+ this->m_openCL = false;
+ this->m_singleThreaded = false;
+ this->m_chunksFinished = 0;
}
CompositorPriority ExecutionGroup::getRenderPriotrity()
@@ -66,7 +66,7 @@ CompositorPriority ExecutionGroup::getRenderPriotrity()
bool ExecutionGroup::containsOperation(NodeOperation *operation)
{
- for (vector<NodeOperation *>::const_iterator iterator = this->operations.begin(); iterator != this->operations.end(); ++iterator) {
+ for (vector<NodeOperation *>::const_iterator iterator = this->m_operations.begin(); iterator != this->m_operations.end(); ++iterator) {
NodeOperation *inListOperation = *iterator;
if (inListOperation == operation) {
return true;
@@ -77,12 +77,12 @@ bool ExecutionGroup::containsOperation(NodeOperation *operation)
const bool ExecutionGroup::isComplex() const
{
- return this->complex;
+ return this->m_complex;
}
bool ExecutionGroup::canContainOperation(NodeOperation *operation)
{
- if (!this->initialized) { return true; }
+ if (!this->m_initialized) { return true; }
if (operation->isReadBufferOperation()) { return true; }
if (operation->isWriteBufferOperation()) { return false; }
if (operation->isSetOperation()) { return true; }
@@ -100,12 +100,12 @@ void ExecutionGroup::addOperation(ExecutionSystem *system, NodeOperation *operat
if (containsOperation(operation)) return;
if (canContainOperation(operation)) {
if (!operation->isBufferOperation()) {
- this->complex = operation->isComplex();
- this->openCL = operation->isOpenCL();
- this->singleThreaded = operation->isSingleThreaded();
- this->initialized = true;
+ this->m_complex = operation->isComplex();
+ this->m_openCL = operation->isOpenCL();
+ this->m_singleThreaded = operation->isSingleThreaded();
+ this->m_initialized = true;
}
- this->operations.push_back(operation);
+ this->m_operations.push_back(operation);
if (operation->isReadBufferOperation()) {
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
WriteBufferOperation *writeOperation = readOperation->getMemoryProxy()->getWriteBufferOperation();
@@ -137,52 +137,52 @@ void ExecutionGroup::addOperation(ExecutionSystem *system, NodeOperation *operat
NodeOperation *ExecutionGroup::getOutputNodeOperation() const
{
- return this->operations[0]; // the first operation of the group is always the output operation.
+ return this->m_operations[0]; // the first operation of the group is always the output operation.
}
void ExecutionGroup::initExecution()
{
- if (this->chunkExecutionStates != NULL) {
- delete[] this->chunkExecutionStates;
+ if (this->m_chunkExecutionStates != NULL) {
+ delete[] this->m_chunkExecutionStates;
}
unsigned int index;
determineNumberOfChunks();
- this->chunkExecutionStates = NULL;
- if (this->numberOfChunks != 0) {
- this->chunkExecutionStates = new ChunkExecutionState[numberOfChunks];
- for (index = 0; index < numberOfChunks; index++) {
- this->chunkExecutionStates[index] = COM_ES_NOT_SCHEDULED;
+ this->m_chunkExecutionStates = NULL;
+ if (this->m_numberOfChunks != 0) {
+ this->m_chunkExecutionStates = new ChunkExecutionState[this->m_numberOfChunks];
+ for (index = 0; index < this->m_numberOfChunks; index++) {
+ this->m_chunkExecutionStates[index] = COM_ES_NOT_SCHEDULED;
}
}
unsigned int maxNumber = 0;
- for (index = 0; index < this->operations.size(); index++) {
- NodeOperation *operation = this->operations[index];
+ for (index = 0; index < this->m_operations.size(); index++) {
+ NodeOperation *operation = this->m_operations[index];
if (operation->isReadBufferOperation()) {
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
- this->cachedReadOperations.push_back(readOperation);
+ this->m_cachedReadOperations.push_back(readOperation);
maxNumber = max(maxNumber, readOperation->getOffset());
}
}
maxNumber++;
- this->cachedMaxReadBufferOffset = maxNumber;
+ this->m_cachedMaxReadBufferOffset = maxNumber;
}
void ExecutionGroup::deinitExecution()
{
- if (this->chunkExecutionStates != NULL) {
- delete[] this->chunkExecutionStates;
- this->chunkExecutionStates = NULL;
- }
- this->numberOfChunks = 0;
- this->numberOfXChunks = 0;
- this->numberOfYChunks = 0;
- this->cachedReadOperations.clear();
- this->bTree = NULL;
+ if (this->m_chunkExecutionStates != NULL) {
+ delete[] this->m_chunkExecutionStates;
+ this->m_chunkExecutionStates = NULL;
+ }
+ this->m_numberOfChunks = 0;
+ this->m_numberOfXChunks = 0;
+ this->m_numberOfYChunks = 0;
+ this->m_cachedReadOperations.clear();
+ this->m_bTree = NULL;
}
void ExecutionGroup::determineResolution(unsigned int resolution[])
{
@@ -194,16 +194,16 @@ void ExecutionGroup::determineResolution(unsigned int resolution[])
void ExecutionGroup::determineNumberOfChunks()
{
- if (singleThreaded) {
- this->numberOfXChunks = 1;
- this->numberOfYChunks = 1;
- this->numberOfChunks = 1;
+ if (this->m_singleThreaded) {
+ this->m_numberOfXChunks = 1;
+ this->m_numberOfYChunks = 1;
+ this->m_numberOfChunks = 1;
}
else {
- const float chunkSizef = this->chunkSize;
- this->numberOfXChunks = ceil(this->width / chunkSizef);
- this->numberOfYChunks = ceil(this->height / chunkSizef);
- this->numberOfChunks = this->numberOfXChunks * this->numberOfYChunks;
+ const float chunkSizef = this->m_chunkSize;
+ this->m_numberOfXChunks = ceil(this->m_width / chunkSizef);
+ this->m_numberOfYChunks = ceil(this->m_height / chunkSizef);
+ this->m_numberOfChunks = this->m_numberOfXChunks * this->m_numberOfYChunks;
}
}
@@ -214,17 +214,17 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
{
CompositorContext& context = graph->getContext();
const bNodeTree *bTree = context.getbNodeTree();
- if (this->width == 0 || this->height == 0) {return; } /// @note: break out... no pixels to calculate.
+ if (this->m_width == 0 || this->m_height == 0) {return; } /// @note: break out... no pixels to calculate.
if (bTree->test_break && bTree->test_break(bTree->tbh)) {return; } /// @note: early break out for blur and preview nodes
- if (this->numberOfChunks == 0) {return; } /// @note: early break out
+ if (this->m_numberOfChunks == 0) {return; } /// @note: early break out
unsigned int chunkNumber;
- this->chunksFinished = 0;
- this->bTree = bTree;
+ this->m_chunksFinished = 0;
+ this->m_bTree = bTree;
unsigned int index;
- unsigned int *chunkOrder = new unsigned int[this->numberOfChunks];
+ unsigned int *chunkOrder = new unsigned int[this->m_numberOfChunks];
- for (chunkNumber = 0; chunkNumber < this->numberOfChunks; chunkNumber++) {
+ for (chunkNumber = 0; chunkNumber < this->m_numberOfChunks; chunkNumber++) {
chunkOrder[chunkNumber] = chunkNumber;
}
NodeOperation *operation = this->getOutputNodeOperation();
@@ -241,9 +241,9 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
switch (chunkorder) {
case COM_TO_RANDOM:
- for (index = 0; index < 2 * numberOfChunks; index++) {
- int index1 = rand() % numberOfChunks;
- int index2 = rand() % numberOfChunks;
+ for (index = 0; index < 2 * this->m_numberOfChunks; index++) {
+ int index1 = rand() % this->m_numberOfChunks;
+ int index2 = rand() % this->m_numberOfChunks;
int s = chunkOrder[index1];
chunkOrder[index1] = chunkOrder[index2];
chunkOrder[index2] = s;
@@ -252,10 +252,10 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
case COM_TO_CENTER_OUT:
{
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot *[1];
- hotspots[0] = new ChunkOrderHotspot(this->width * centerX, this->height * centerY, 0.0f);
+ hotspots[0] = new ChunkOrderHotspot(this->m_width * centerX, this->m_height * centerY, 0.0f);
rcti rect;
- ChunkOrder *chunkOrders = new ChunkOrder[this->numberOfChunks];
- for (index = 0; index < this->numberOfChunks; index++) {
+ ChunkOrder *chunkOrders = new ChunkOrder[this->m_numberOfChunks];
+ for (index = 0; index < this->m_numberOfChunks; index++) {
determineChunkRect(&rect, index);
chunkOrders[index].setChunkNumber(index);
chunkOrders[index].setX(rect.xmin);
@@ -263,8 +263,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
chunkOrders[index].determineDistance(hotspots, 1);
}
- sort(&chunkOrders[0], &chunkOrders[numberOfChunks - 1]);
- for (index = 0; index < numberOfChunks; index++) {
+ sort(&chunkOrders[0], &chunkOrders[this->m_numberOfChunks - 1]);
+ for (index = 0; index < this->m_numberOfChunks; index++) {
chunkOrder[index] = chunkOrders[index].getChunkNumber();
}
@@ -276,14 +276,14 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
case COM_TO_RULE_OF_THIRDS:
{
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot *[9];
- unsigned int tx = this->width / 6;
- unsigned int ty = this->height / 6;
- unsigned int mx = this->width / 2;
- unsigned int my = this->height / 2;
+ unsigned int tx = this->m_width / 6;
+ unsigned int ty = this->m_height / 6;
+ unsigned int mx = this->m_width / 2;
+ unsigned int my = this->m_height / 2;
unsigned int bx = mx + 2 * tx;
unsigned int by = my + 2 * ty;
- float addition = numberOfChunks / COM_RULE_OF_THIRDS_DIVIDER;
+ float addition = this->m_numberOfChunks / COM_RULE_OF_THIRDS_DIVIDER;
hotspots[0] = new ChunkOrderHotspot(mx, my, addition * 0);
hotspots[1] = new ChunkOrderHotspot(tx, my, addition * 1);
hotspots[2] = new ChunkOrderHotspot(bx, my, addition * 2);
@@ -294,8 +294,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
hotspots[7] = new ChunkOrderHotspot(mx, ty, addition * 7);
hotspots[8] = new ChunkOrderHotspot(mx, by, addition * 8);
rcti rect;
- ChunkOrder *chunkOrders = new ChunkOrder[this->numberOfChunks];
- for (index = 0; index < this->numberOfChunks; index++) {
+ ChunkOrder *chunkOrders = new ChunkOrder[this->m_numberOfChunks];
+ for (index = 0; index < this->m_numberOfChunks; index++) {
determineChunkRect(&rect, index);
chunkOrders[index].setChunkNumber(index);
chunkOrders[index].setX(rect.xmin);
@@ -303,9 +303,9 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
chunkOrders[index].determineDistance(hotspots, 9);
}
- sort(&chunkOrders[0], &chunkOrders[numberOfChunks]);
+ sort(&chunkOrders[0], &chunkOrders[this->m_numberOfChunks]);
- for (index = 0; index < numberOfChunks; index++) {
+ for (index = 0; index < this->m_numberOfChunks; index++) {
chunkOrder[index] = chunkOrders[index].getChunkNumber();
}
@@ -333,16 +333,15 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
const int maxNumberEvaluated = BLI_system_thread_count() * 2;
while (!finished && !breaked) {
- unsigned int index;
bool startEvaluated = false;
finished = true;
int numberEvaluated = 0;
- for (index = startIndex; index < numberOfChunks && numberEvaluated < maxNumberEvaluated; index++) {
- int chunkNumber = chunkOrder[index];
- int yChunk = chunkNumber / this->numberOfXChunks;
- int xChunk = chunkNumber - (yChunk * this->numberOfXChunks);
- const ChunkExecutionState state = this->chunkExecutionStates[chunkNumber];
+ for (index = startIndex; index < this->m_numberOfChunks && numberEvaluated < maxNumberEvaluated; index++) {
+ chunkNumber = chunkOrder[index];
+ int yChunk = chunkNumber / this->m_numberOfXChunks;
+ int xChunk = chunkNumber - (yChunk * this->m_numberOfXChunks);
+ const ChunkExecutionState state = this->m_chunkExecutionStates[chunkNumber];
if (state == COM_ES_NOT_SCHEDULED) {
scheduleChunkWhenPossible(graph, xChunk, yChunk);
finished = false;
@@ -375,12 +374,12 @@ MemoryBuffer **ExecutionGroup::getInputBuffersCPU()
unsigned int index;
this->determineDependingMemoryProxies(&memoryproxies);
- MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->cachedMaxReadBufferOffset];
- for (index = 0; index < this->cachedMaxReadBufferOffset; index++) {
+ MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->m_cachedMaxReadBufferOffset];
+ for (index = 0; index < this->m_cachedMaxReadBufferOffset; index++) {
memoryBuffers[index] = NULL;
}
- for (index = 0; index < this->cachedReadOperations.size(); index++) {
- ReadBufferOperation *readOperation = (ReadBufferOperation *)this->cachedReadOperations[index];
+ for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
+ ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index];
memoryBuffers[readOperation->getOffset()] = readOperation->getMemoryProxy()->getBuffer();
}
return memoryBuffers;
@@ -394,13 +393,13 @@ MemoryBuffer **ExecutionGroup::getInputBuffersOpenCL(int chunkNumber)
determineChunkRect(&rect, chunkNumber);
this->determineDependingMemoryProxies(&memoryproxies);
- MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->cachedMaxReadBufferOffset];
- for (index = 0; index < this->cachedMaxReadBufferOffset; index++) {
+ MemoryBuffer **memoryBuffers = new MemoryBuffer *[this->m_cachedMaxReadBufferOffset];
+ for (index = 0; index < this->m_cachedMaxReadBufferOffset; index++) {
memoryBuffers[index] = NULL;
}
rcti output;
- for (index = 0; index < this->cachedReadOperations.size(); index++) {
- ReadBufferOperation *readOperation = (ReadBufferOperation *)this->cachedReadOperations[index];
+ for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
+ ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index];
MemoryProxy *memoryProxy = readOperation->getMemoryProxy();
this->determineDependingAreaOfInterest(&rect, readOperation, &output);
MemoryBuffer *memoryBuffer = memoryProxy->getExecutor()->constructConsolidatedMemoryBuffer(memoryProxy, &output);
@@ -419,12 +418,12 @@ MemoryBuffer *ExecutionGroup::constructConsolidatedMemoryBuffer(MemoryProxy *mem
void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memoryBuffers)
{
- if (this->chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED)
- this->chunkExecutionStates[chunkNumber] = COM_ES_EXECUTED;
+ if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED)
+ this->m_chunkExecutionStates[chunkNumber] = COM_ES_EXECUTED;
- this->chunksFinished++;
+ this->m_chunksFinished++;
if (memoryBuffers) {
- for (unsigned int index = 0; index < this->cachedMaxReadBufferOffset; index++) {
+ for (unsigned int index = 0; index < this->m_cachedMaxReadBufferOffset; index++) {
MemoryBuffer *buffer = memoryBuffers[index];
if (buffer) {
if (buffer->isTemporarily()) {
@@ -435,30 +434,30 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
}
delete[] memoryBuffers;
}
- if (bTree) {
+ if (this->m_bTree) {
// status report is only performed for top level Execution Groups.
- float progress = chunksFinished;
- progress /= numberOfChunks;
- bTree->progress(bTree->prh, progress);
+ float progress = this->m_chunksFinished;
+ progress /= this->m_numberOfChunks;
+ this->m_bTree->progress(this->m_bTree->prh, progress);
}
}
inline void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int xChunk, const unsigned int yChunk) const
{
- if (singleThreaded) {
- BLI_init_rcti(rect, 0, this->width, 0, this->height);
+ if (this->m_singleThreaded) {
+ BLI_init_rcti(rect, 0, this->m_width, 0, this->m_height);
}
else {
- const unsigned int minx = xChunk * chunkSize;
- const unsigned int miny = yChunk * chunkSize;
- BLI_init_rcti(rect, minx, min(minx + this->chunkSize, this->width), miny, min(miny + this->chunkSize, this->height));
+ const unsigned int minx = xChunk * this->m_chunkSize;
+ const unsigned int miny = yChunk * this->m_chunkSize;
+ BLI_init_rcti(rect, minx, min(minx + this->m_chunkSize, this->m_width), miny, min(miny + this->m_chunkSize, this->m_height));
}
}
void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int chunkNumber) const
{
- const unsigned int yChunk = chunkNumber / numberOfXChunks;
- const unsigned int xChunk = chunkNumber - (yChunk * numberOfXChunks);
+ const unsigned int yChunk = chunkNumber / this->m_numberOfXChunks;
+ const unsigned int xChunk = chunkNumber - (yChunk * this->m_numberOfXChunks);
determineChunkRect(rect, xChunk, yChunk);
}
@@ -477,23 +476,27 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int chunkNumber, rcti *rect)
bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area)
{
- if (singleThreaded) {
+ if (this->m_singleThreaded) {
return scheduleChunkWhenPossible(graph, 0, 0);
}
// find all chunks inside the rect
// determine minxchunk, minychunk, maxxchunk, maxychunk where x and y are chunknumbers
- float chunkSizef = this->chunkSize;
+ float chunkSizef = this->m_chunkSize;
int indexx, indexy;
- const int minxchunk = floor(area->xmin / chunkSizef);
- const int maxxchunk = ceil((area->xmax - 1) / chunkSizef);
- const int minychunk = floor(area->ymin / chunkSizef);
- const int maxychunk = ceil((area->ymax - 1) / chunkSizef);
+ int minxchunk = floor(area->xmin / chunkSizef);
+ int maxxchunk = ceil((area->xmax - 1) / chunkSizef);
+ int minychunk = floor(area->ymin / chunkSizef);
+ int maxychunk = ceil((area->ymax - 1) / chunkSizef);
+ minxchunk = MAX2(minxchunk, 0);
+ minychunk = MAX2(minychunk, 0);
+ maxxchunk = MIN2(maxxchunk, this->m_numberOfXChunks);
+ maxychunk = MIN2(maxychunk, this->m_numberOfYChunks);
bool result = true;
- for (indexx = max(minxchunk, 0); indexx < maxxchunk; indexx++) {
- for (indexy = max(minychunk, 0); indexy < maxychunk; indexy++) {
+ for (indexx = minxchunk; indexx < maxxchunk; indexx++) {
+ for (indexy = minychunk; indexy < maxychunk; indexy++) {
if (!scheduleChunkWhenPossible(graph, indexx, indexy)) {
result = false;
}
@@ -505,8 +508,8 @@ bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area
bool ExecutionGroup::scheduleChunk(unsigned int chunkNumber)
{
- if (this->chunkExecutionStates[chunkNumber] == COM_ES_NOT_SCHEDULED) {
- this->chunkExecutionStates[chunkNumber] = COM_ES_SCHEDULED;
+ if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_NOT_SCHEDULED) {
+ this->m_chunkExecutionStates[chunkNumber] = COM_ES_SCHEDULED;
WorkScheduler::schedule(this, chunkNumber);
return true;
}
@@ -515,20 +518,20 @@ bool ExecutionGroup::scheduleChunk(unsigned int chunkNumber)
bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChunk, int yChunk)
{
- if (xChunk < 0 || xChunk >= (int)this->numberOfXChunks) {
+ if (xChunk < 0 || xChunk >= (int)this->m_numberOfXChunks) {
return true;
}
- if (yChunk < 0 || yChunk >= (int)this->numberOfYChunks) {
+ if (yChunk < 0 || yChunk >= (int)this->m_numberOfYChunks) {
return true;
}
- int chunkNumber = yChunk * this->numberOfXChunks + xChunk;
+ int chunkNumber = yChunk * this->m_numberOfXChunks + xChunk;
// chunk is already executed
- if (this->chunkExecutionStates[chunkNumber] == COM_ES_EXECUTED) {
+ if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_EXECUTED) {
return true;
}
// chunk is scheduled, but not executed
- if (this->chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED) {
+ if (this->m_chunkExecutionStates[chunkNumber] == COM_ES_SCHEDULED) {
return false;
}
@@ -542,8 +545,8 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChun
bool canBeExecuted = true;
rcti area;
- for (index = 0; index < cachedReadOperations.size(); index++) {
- ReadBufferOperation *readOperation = (ReadBufferOperation *)cachedReadOperations[index];
+ for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
+ ReadBufferOperation *readOperation = (ReadBufferOperation *)this->m_cachedReadOperations[index];
BLI_init_rcti(&area, 0, 0, 0, 0);
MemoryProxy *memoryProxy = memoryProxies[index];
determineDependingAreaOfInterest(&rect, readOperation, &area);
@@ -574,13 +577,13 @@ void ExecutionGroup::determineDependingAreaOfInterest(rcti *input, ReadBufferOpe
void ExecutionGroup::determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies)
{
unsigned int index;
- for (index = 0; index < this->cachedReadOperations.size(); index++) {
- ReadBufferOperation *readOperation = (ReadBufferOperation *) this->cachedReadOperations[index];
+ for (index = 0; index < this->m_cachedReadOperations.size(); index++) {
+ ReadBufferOperation *readOperation = (ReadBufferOperation *) this->m_cachedReadOperations[index];
memoryProxies->push_back(readOperation->getMemoryProxy());
}
}
bool ExecutionGroup::isOpenCL()
{
- return this->openCL;
+ return this->m_openCL;
}
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index 541b3e4866d..43c2bfac52e 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -67,81 +67,81 @@ private:
/**
* @brief list of operations in this ExecutionGroup
*/
- vector<NodeOperation *> operations;
+ vector<NodeOperation *> m_operations;
/**
* @brief is this ExecutionGroup an input ExecutionGroup
* an input execution group is a group that is at the end of the calculation (the output is important for the user)
*/
- int isOutput;
+ int m_isOutput;
/**
* @brief Width of the output
*/
- unsigned int width;
+ unsigned int m_width;
/**
* @brief Height of the output
*/
- unsigned int height;
+ unsigned int m_height;
/**
* @brief size of a single chunk, being Width or of height
* a chunk is always a square, except at the edges of the MemoryBuffer
*/
- unsigned int chunkSize;
+ unsigned int m_chunkSize;
/**
* @brief number of chunks in the x-axis
*/
- unsigned int numberOfXChunks;
+ unsigned int m_numberOfXChunks;
/**
* @brief number of chunks in the y-axis
*/
- unsigned int numberOfYChunks;
+ unsigned int m_numberOfYChunks;
/**
* @brief total number of chunks
*/
- unsigned int numberOfChunks;
+ unsigned int m_numberOfChunks;
/**
* @brief contains this ExecutionGroup a complex NodeOperation.
*/
- bool complex;
+ bool m_complex;
/**
* @brief can this ExecutionGroup be scheduled on an OpenCLDevice
*/
- bool openCL;
+ bool m_openCL;
/**
* @brief Is this Execution group SingleThreaded
*/
- bool singleThreaded;
+ bool m_singleThreaded;
/**
* @brief what is the maximum number field of all ReadBufferOperation in this ExecutionGroup.
* @note this is used to construct the MemoryBuffers that will be passed during execution.
*/
- unsigned int cachedMaxReadBufferOffset;
+ unsigned int m_cachedMaxReadBufferOffset;
/**
* @brief a cached vector of all read operations in the execution group.
*/
- vector<NodeOperation *> cachedReadOperations;
+ vector<NodeOperation *> m_cachedReadOperations;
/**
* @brief reference to the original bNodeTree, this field is only set for the 'top' execution group.
* @note can only be used to call the callbacks for progress, status and break
*/
- const bNodeTree *bTree;
+ const bNodeTree *m_bTree;
/**
* @brief total number of chunks that have been calculated for this ExecutionGroup
*/
- unsigned int chunksFinished;
+ unsigned int m_chunksFinished;
/**
* @brief the chunkExecutionStates holds per chunk the execution state. this state can be
@@ -149,7 +149,7 @@ private:
* - COM_ES_SCHEDULED: scheduled
* - COM_ES_EXECUTED: executed
*/
- ChunkExecutionState *chunkExecutionStates;
+ ChunkExecutionState *m_chunkExecutionStates;
/**
* @brief indicator when this ExecutionGroup has valid NodeOperations in its vector for Execution
@@ -160,7 +160,7 @@ private:
* @see complex
* @see openCL
*/
- bool initialized;
+ bool m_initialized;
// methods
/**
@@ -258,13 +258,13 @@ public:
* @note ViewerOperation, CompositeOperation, PreviewOperation.
* @see NodeOperation.isOutputOperation
*/
- const int isOutputExecutionGroup() const { return this->isOutput; }
+ const int isOutputExecutionGroup() const { return this->m_isOutput; }
/**
* @brief set whether this ExecutionGroup is an output
* @param isOutput
*/
- void setOutputExecutionGroup(int isOutput) { this->isOutput = isOutput; }
+ void setOutputExecutionGroup(int isOutput) { this->m_isOutput = isOutput; }
/**
* @brief determine the resolution of this ExecutionGroup
@@ -276,17 +276,17 @@ public:
* @brief set the resolution of this executiongroup
* @param resolution
*/
- void setResolution(unsigned int resolution[]) { this->width = resolution[0]; this->height = resolution[1]; }
+ void setResolution(unsigned int resolution[]) { this->m_width = resolution[0]; this->m_height = resolution[1]; }
/**
* @brief get the width of this execution group
*/
- const unsigned int getWidth() { return this->width; }
+ const unsigned int getWidth() { return this->m_width; }
/**
* @brief get the height of this execution group
*/
- const unsigned int getHeight() { return this->height; }
+ const unsigned int getHeight() { return this->m_height; }
/**
* @brief does this ExecutionGroup contains a complex NodeOperation
@@ -387,14 +387,17 @@ public:
*/
bool isOpenCL();
- void setChunksize(int chunksize) { this->chunkSize = chunksize; }
+ void setChunksize(int chunksize) { this->m_chunkSize = chunksize; }
/**
* @brief get the Render priority of this ExecutionGroup
* @see ExecutionSystem.execute
*/
CompositorPriority getRenderPriotrity();
-
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionGroup")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 7e09486fd0b..23e243187d5 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -23,7 +23,6 @@
#include "COM_ExecutionSystem.h"
#include <sstream>
-#include <stdio.h>
#include "PIL_time.h"
#include "BKE_node.h"
@@ -41,38 +40,42 @@
#include "BKE_global.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool rendering)
{
- context.setbNodeTree(editingtree);
+ this->m_context.setbNodeTree(editingtree);
bNode *gnode;
for (gnode = (bNode *)editingtree->nodes.first; gnode; gnode = (bNode *)gnode->next) {
if (gnode->type == NODE_GROUP && gnode->typeinfo->group_edit_get(gnode)) {
- context.setActivegNode(gnode);
+ this->m_context.setActivegNode(gnode);
break;
}
}
/* initialize the CompositorContext */
if (rendering) {
- context.setQuality((CompositorQuality)editingtree->render_quality);
+ this->m_context.setQuality((CompositorQuality)editingtree->render_quality);
}
else {
- context.setQuality((CompositorQuality)editingtree->edit_quality);
+ this->m_context.setQuality((CompositorQuality)editingtree->edit_quality);
}
- context.setRendering(rendering);
- context.setHasActiveOpenCLDevices(WorkScheduler::hasGPUDevices() && (editingtree->flag & NTREE_COM_OPENCL));
+ this->m_context.setRendering(rendering);
+ this->m_context.setHasActiveOpenCLDevices(WorkScheduler::hasGPUDevices() && (editingtree->flag & NTREE_COM_OPENCL));
ExecutionSystemHelper::addbNodeTree(*this, 0, editingtree, NULL);
- context.setRenderData(rd);
+ this->m_context.setRenderData(rd);
this->convertToOperations();
this->groupOperations(); /* group operations in ExecutionGroups */
unsigned int index;
unsigned int resolution[2];
- for (index = 0; index < this->groups.size(); index++) {
+ for (index = 0; index < this->m_groups.size(); index++) {
resolution[0] = 0;
resolution[1] = 0;
- ExecutionGroup *executionGroup = groups[index];
+ ExecutionGroup *executionGroup = this->m_groups[index];
executionGroup->determineResolution(resolution);
}
@@ -84,32 +87,32 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool re
ExecutionSystem::~ExecutionSystem()
{
unsigned int index;
- for (index = 0; index < this->connections.size(); index++) {
- SocketConnection *connection = this->connections[index];
+ for (index = 0; index < this->m_connections.size(); index++) {
+ SocketConnection *connection = this->m_connections[index];
delete connection;
}
- this->connections.clear();
- for (index = 0; index < this->nodes.size(); index++) {
- Node *node = this->nodes[index];
+ this->m_connections.clear();
+ for (index = 0; index < this->m_nodes.size(); index++) {
+ Node *node = this->m_nodes[index];
delete node;
}
- this->nodes.clear();
- for (index = 0; index < this->operations.size(); index++) {
- NodeOperation *operation = this->operations[index];
+ this->m_nodes.clear();
+ for (index = 0; index < this->m_operations.size(); index++) {
+ NodeOperation *operation = this->m_operations[index];
delete operation;
}
- this->operations.clear();
- for (index = 0; index < this->groups.size(); index++) {
- ExecutionGroup *group = this->groups[index];
+ this->m_operations.clear();
+ for (index = 0; index < this->m_groups.size(); index++) {
+ ExecutionGroup *group = this->m_groups[index];
delete group;
}
- this->groups.clear();
+ this->m_groups.clear();
}
void ExecutionSystem::execute()
{
unsigned int order = 0;
- for (vector<NodeOperation *>::iterator iter = this->operations.begin(); iter != operations.end(); ++iter) {
+ for (vector<NodeOperation *>::iterator iter = this->m_operations.begin(); iter != this->m_operations.end(); ++iter) {
NodeBase *node = *iter;
NodeOperation *operation = (NodeOperation *) node;
if (operation->isReadBufferOperation()) {
@@ -120,18 +123,18 @@ void ExecutionSystem::execute()
}
unsigned int index;
- for (index = 0; index < this->operations.size(); index++) {
- NodeOperation *operation = this->operations[index];
- operation->setbNodeTree(this->context.getbNodeTree());
+ for (index = 0; index < this->m_operations.size(); index++) {
+ NodeOperation *operation = this->m_operations[index];
+ operation->setbNodeTree(this->m_context.getbNodeTree());
operation->initExecution();
}
- for (index = 0; index < this->groups.size(); index++) {
- ExecutionGroup *executionGroup = this->groups[index];
- executionGroup->setChunksize(context.getChunksize());
+ for (index = 0; index < this->m_groups.size(); index++) {
+ ExecutionGroup *executionGroup = this->m_groups[index];
+ executionGroup->setChunksize(this->m_context.getChunksize());
executionGroup->initExecution();
}
- WorkScheduler::start(this->context);
+ WorkScheduler::start(this->m_context);
executeGroups(COM_PRIORITY_HIGH);
executeGroups(COM_PRIORITY_MEDIUM);
@@ -140,12 +143,12 @@ void ExecutionSystem::execute()
WorkScheduler::finish();
WorkScheduler::stop();
- for (index = 0; index < this->operations.size(); index++) {
- NodeOperation *operation = this->operations[index];
+ for (index = 0; index < this->m_operations.size(); index++) {
+ NodeOperation *operation = this->m_operations[index];
operation->deinitExecution();
}
- for (index = 0; index < this->groups.size(); index++) {
- ExecutionGroup *executionGroup = this->groups[index];
+ for (index = 0; index < this->m_groups.size(); index++) {
+ ExecutionGroup *executionGroup = this->m_groups[index];
executionGroup->deinitExecution();
}
}
@@ -164,7 +167,7 @@ void ExecutionSystem::executeGroups(CompositorPriority priority)
void ExecutionSystem::addOperation(NodeOperation *operation)
{
- ExecutionSystemHelper::addOperation(this->operations, operation);
+ ExecutionSystemHelper::addOperation(this->m_operations, operation);
// operation->setBTree
}
@@ -205,7 +208,6 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
*/
OutputSocket *outputsocket = operation->getOutputSocket();
if (outputsocket->isConnected()) {
- int index;
WriteBufferOperation *writeOperation;
writeOperation = new WriteBufferOperation();
writeOperation->setbNodeTree(this->getContext().getbNodeTree());
@@ -227,13 +229,13 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
void ExecutionSystem::convertToOperations()
{
unsigned int index;
- for (index = 0; index < this->nodes.size(); index++) {
- Node *node = (Node *)this->nodes[index];
- node->convertToOperations(this, &this->context);
+ for (index = 0; index < this->m_nodes.size(); index++) {
+ Node *node = (Node *)this->m_nodes[index];
+ node->convertToOperations(this, &this->m_context);
}
- for (index = 0; index < this->connections.size(); index++) {
- SocketConnection *connection = this->connections[index];
+ for (index = 0; index < this->m_connections.size(); index++) {
+ SocketConnection *connection = this->m_connections[index];
if (connection->isValid()) {
if (connection->getFromSocket()->getDataType() != connection->getToSocket()->getDataType()) {
Converter::convertDataType(connection, this);
@@ -242,18 +244,18 @@ void ExecutionSystem::convertToOperations()
}
// determine all resolutions of the operations (Width/Height)
- for (index = 0; index < this->operations.size(); index++) {
- NodeOperation *operation = this->operations[index];
- if (operation->isOutputOperation(context.isRendering()) && !operation->isPreviewOperation()) {
+ for (index = 0; index < this->m_operations.size(); index++) {
+ NodeOperation *operation = this->m_operations[index];
+ if (operation->isOutputOperation(this->m_context.isRendering()) && !operation->isPreviewOperation()) {
unsigned int resolution[2] = {0, 0};
unsigned int preferredResolution[2] = {0, 0};
operation->determineResolution(resolution, preferredResolution);
operation->setResolution(resolution);
}
}
- for (index = 0; index < this->operations.size(); index++) {
- NodeOperation *operation = this->operations[index];
- if (operation->isOutputOperation(context.isRendering()) && operation->isPreviewOperation()) {
+ for (index = 0; index < this->m_operations.size(); index++) {
+ NodeOperation *operation = this->m_operations[index];
+ if (operation->isOutputOperation(this->m_context.isRendering()) && operation->isPreviewOperation()) {
unsigned int resolution[2] = {0, 0};
unsigned int preferredResolution[2] = {0, 0};
operation->determineResolution(resolution, preferredResolution);
@@ -262,8 +264,8 @@ void ExecutionSystem::convertToOperations()
}
// add convert resolution operations when needed.
- for (index = 0; index < this->connections.size(); index++) {
- SocketConnection *connection = this->connections[index];
+ for (index = 0; index < this->m_connections.size(); index++) {
+ SocketConnection *connection = this->m_connections[index];
if (connection->isValid()) {
if (connection->needsResolutionConversion()) {
Converter::convertResolution(connection, this);
@@ -278,13 +280,13 @@ void ExecutionSystem::groupOperations()
NodeOperation *operation;
unsigned int index;
// surround complex operations with ReadBufferOperation and WriteBufferOperation
- for (index = 0; index < this->operations.size(); index++) {
- operation = this->operations[index];
+ for (index = 0; index < this->m_operations.size(); index++) {
+ operation = this->m_operations[index];
if (operation->isComplex()) {
this->addReadWriteBufferOperations(operation);
}
}
- ExecutionSystemHelper::findOutputNodeOperations(&outputOperations, this->getOperations(), this->context.isRendering());
+ ExecutionSystemHelper::findOutputNodeOperations(&outputOperations, this->getOperations(), this->m_context.isRendering());
for (vector<NodeOperation *>::iterator iter = outputOperations.begin(); iter != outputOperations.end(); ++iter) {
operation = *iter;
ExecutionGroup *group = new ExecutionGroup();
@@ -296,15 +298,15 @@ void ExecutionSystem::groupOperations()
void ExecutionSystem::addSocketConnection(SocketConnection *connection)
{
- this->connections.push_back(connection);
+ this->m_connections.push_back(connection);
}
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result, CompositorPriority priority) const
{
unsigned int index;
- for (index = 0; index < this->groups.size(); index++) {
- ExecutionGroup *group = this->groups[index];
+ for (index = 0; index < this->m_groups.size(); index++) {
+ ExecutionGroup *group = this->m_groups[index];
if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) {
result->push_back(group);
}
@@ -314,8 +316,8 @@ void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result,
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup *> *result) const
{
unsigned int index;
- for (index = 0; index < this->groups.size(); index++) {
- ExecutionGroup *group = this->groups[index];
+ for (index = 0; index < this->m_groups.size(); index++) {
+ ExecutionGroup *group = this->m_groups[index];
if (group->isOutputExecutionGroup()) {
result->push_back(group);
}
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 48ff2ef6af9..e51bd7f3026 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -108,27 +108,27 @@ private:
/**
* @brief the context used during execution
*/
- CompositorContext context;
+ CompositorContext m_context;
/**
* @brief vector of nodes
*/
- vector<Node *> nodes;
+ vector<Node *> m_nodes;
/**
* @brief vector of operations
*/
- vector<NodeOperation *> operations;
+ vector<NodeOperation *> m_operations;
/**
* @brief vector of groups
*/
- vector<ExecutionGroup *> groups
+ vector<ExecutionGroup *> m_groups;
/**
* @brief vector of connections
- */;
- vector<SocketConnection *> connections;
+ */
+ vector<SocketConnection *> m_connections;
private: //methods
/**
@@ -200,27 +200,27 @@ public:
/**
* @brief get the reference to the compositor context
*/
- CompositorContext& getContext() { return this->context; }
+ CompositorContext& getContext() { return this->m_context; }
/**
* @brief get the reference to the compositor nodes
*/
- vector<Node *>& getNodes() { return this->nodes; }
+ vector<Node *>& getNodes() { return this->m_nodes; }
/**
* @brief get the reference to the compositor connections
*/
- vector<SocketConnection *>& getConnections() { return this->connections; }
+ vector<SocketConnection *>& getConnections() { return this->m_connections; }
/**
* @brief get the reference to the list of execution groups
*/
- vector<ExecutionGroup *>& getExecutionGroups() { return this->groups; }
+ vector<ExecutionGroup *>& getExecutionGroups() { return this->m_groups; }
/**
* @brief get the reference to the list of operations
*/
- vector<NodeOperation *>& getOperations() { return this->operations; }
+ vector<NodeOperation *>& getOperations() { return this->m_operations; }
private:
@@ -232,5 +232,9 @@ private:
void executeGroups(CompositorPriority priority);
-};
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystem")
#endif
+};
+
+#endif /* _COM_ExecutionSystem_h */
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
index e5376567077..0f6ba1f4ac9 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
@@ -77,11 +77,11 @@ void ExecutionSystemHelper::addNode(vector<Node *>& nodes, Node *node)
nodes.push_back(node);
}
-Node *ExecutionSystemHelper::addNode(vector<Node *>& nodes, bNode *bNode, bool inActiveGroup)
+Node *ExecutionSystemHelper::addNode(vector<Node *>& nodes, bNode *b_node, bool inActiveGroup)
{
Converter converter;
Node *node;
- node = converter.convert(bNode);
+ node = converter.convert(b_node);
node->setIsInActiveGroup(inActiveGroup);
if (node != NULL) {
addNode(nodes, node);
@@ -153,17 +153,17 @@ static OutputSocket *find_output(NodeRange &node_range, bNode *bnode, bNodeSocke
}
return NULL;
}
-SocketConnection *ExecutionSystemHelper::addNodeLink(NodeRange &node_range, vector<SocketConnection *>& links, bNodeLink *bNodeLink)
+SocketConnection *ExecutionSystemHelper::addNodeLink(NodeRange &node_range, vector<SocketConnection *>& links, bNodeLink *b_nodelink)
{
/// @note: cyclic lines will be ignored. This has been copied from node.c
- if (bNodeLink->tonode != 0 && bNodeLink->fromnode != 0) {
- if (!(bNodeLink->fromnode->level >= bNodeLink->tonode->level && bNodeLink->tonode->level != 0xFFF)) { // only add non cyclic lines! so execution will procede
+ if (b_nodelink->tonode != 0 && b_nodelink->fromnode != 0) {
+ if (!(b_nodelink->fromnode->level >= b_nodelink->tonode->level && b_nodelink->tonode->level != 0xFFF)) { // only add non cyclic lines! so execution will procede
return NULL;
}
}
- InputSocket *inputSocket = find_input(node_range, bNodeLink->tonode, bNodeLink->tosock);
- OutputSocket *outputSocket = find_output(node_range, bNodeLink->fromnode, bNodeLink->fromsock);
+ InputSocket *inputSocket = find_input(node_range, b_nodelink->tonode, b_nodelink->tosock);
+ OutputSocket *outputSocket = find_output(node_range, b_nodelink->fromnode, b_nodelink->fromsock);
if (inputSocket == NULL || outputSocket == NULL) {
return NULL;
}
diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.h b/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
index 8dbd308153b..4b65ed15577 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
@@ -58,7 +58,7 @@ public:
* @param bNode node to add
* @return Node that represents the bNode or null when not able to convert.
*/
- static Node *addNode(vector<Node *>& nodes, bNode *bNode, bool isInActiveGroup);
+ static Node *addNode(vector<Node *>& nodes, bNode *b_node, bool isInActiveGroup);
/**
* @brief Add a Node to a list
@@ -123,5 +123,10 @@ public:
* @param system the execution system to dump
*/
static void debugDump(ExecutionSystem *system);
-};
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystemHelper")
#endif
+};
+
+#endif /* _COM_ExecutionSystemHelper_h */
diff --git a/source/blender/compositor/intern/COM_InputSocket.cpp b/source/blender/compositor/intern/COM_InputSocket.cpp
index 3ca74f157b4..94cb5ff5396 100644
--- a/source/blender/compositor/intern/COM_InputSocket.cpp
+++ b/source/blender/compositor/intern/COM_InputSocket.cpp
@@ -27,37 +27,37 @@
InputSocket::InputSocket(DataType datatype) : Socket(datatype)
{
- this->connection = NULL;
- this->resizeMode = COM_SC_CENTER;
+ this->m_connection = NULL;
+ this->m_resizeMode = COM_SC_CENTER;
}
InputSocket::InputSocket(DataType datatype, InputSocketResizeMode resizeMode) : Socket(datatype)
{
- this->connection = NULL;
- this->resizeMode = resizeMode;
+ this->m_connection = NULL;
+ this->m_resizeMode = resizeMode;
}
InputSocket::InputSocket(InputSocket *from) : Socket(from->getDataType())
{
- this->connection = NULL;
- this->resizeMode = from->getResizeMode();
+ this->m_connection = NULL;
+ this->m_resizeMode = from->getResizeMode();
}
int InputSocket::isInputSocket() const { return true; }
-const int InputSocket::isConnected() const { return this->connection != NULL; }
+const int InputSocket::isConnected() const { return this->m_connection != NULL; }
void InputSocket::setConnection(SocketConnection *connection)
{
- this->connection = connection;
+ this->m_connection = connection;
}
SocketConnection *InputSocket::getConnection()
{
- return this->connection;
+ return this->m_connection;
}
void InputSocket::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
if (this->isConnected()) {
- this->connection->getFromSocket()->determineResolution(resolution, preferredResolution);
+ this->m_connection->getFromSocket()->determineResolution(resolution, preferredResolution);
}
else {
return;
@@ -140,7 +140,7 @@ SocketReader *InputSocket::getReader()
NodeOperation *InputSocket::getOperation() const
{
if (isConnected()) {
- return (NodeOperation *)this->connection->getFromSocket()->getNode();
+ return (NodeOperation *)this->m_connection->getFromSocket()->getNode();
}
else {
return NULL;
diff --git a/source/blender/compositor/intern/COM_InputSocket.h b/source/blender/compositor/intern/COM_InputSocket.h
index c066b5d8303..5d0923ff204 100644
--- a/source/blender/compositor/intern/COM_InputSocket.h
+++ b/source/blender/compositor/intern/COM_InputSocket.h
@@ -65,12 +65,12 @@ private:
* @brief connection connected to this InputSocket.
* An input socket can only have a single connection
*/
- SocketConnection *connection;
+ SocketConnection *m_connection;
/**
* @brief resize mode of this socket
*/
- InputSocketResizeMode resizeMode;
+ InputSocketResizeMode m_resizeMode;
public:
@@ -126,7 +126,7 @@ public:
* @param resizeMode the new resize mode.
*/
void setResizeMode(InputSocketResizeMode resizeMode) {
- this->resizeMode = resizeMode;
+ this->m_resizeMode = resizeMode;
}
/**
@@ -134,7 +134,7 @@ public:
* @return InputSocketResizeMode
*/
InputSocketResizeMode getResizeMode() const {
- return this->resizeMode;
+ return this->m_resizeMode;
}
const ChannelInfo *getChannelInfo(const int channelnumber);
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index ceed53c4c0d..8dd1e55274f 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -32,43 +32,43 @@ unsigned int MemoryBuffer::determineBufferSize()
int MemoryBuffer::getWidth() const
{
- return this->rect.xmax - this->rect.xmin;
+ return this->m_rect.xmax - this->m_rect.xmin;
}
int MemoryBuffer::getHeight() const
{
- return this->rect.ymax - this->rect.ymin;
+ return this->m_rect.ymax - this->m_rect.ymin;
}
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti *rect)
{
- BLI_init_rcti(&this->rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
- this->memoryProxy = memoryProxy;
- this->chunkNumber = chunkNumber;
- this->buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
- this->state = COM_MB_ALLOCATED;
- this->datatype = COM_DT_COLOR;
- this->chunkWidth = this->rect.xmax - this->rect.xmin;
+ BLI_init_rcti(&this->m_rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
+ this->m_memoryProxy = memoryProxy;
+ this->m_chunkNumber = chunkNumber;
+ this->m_buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
+ this->m_state = COM_MB_ALLOCATED;
+ this->m_datatype = COM_DT_COLOR;
+ this->m_chunkWidth = this->m_rect.xmax - this->m_rect.xmin;
}
MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, rcti *rect)
{
- BLI_init_rcti(&this->rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
- this->memoryProxy = memoryProxy;
- this->chunkNumber = -1;
- this->buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
- this->state = COM_MB_TEMPORARILY;
- this->datatype = COM_DT_COLOR;
- this->chunkWidth = this->rect.xmax - this->rect.xmin;
+ BLI_init_rcti(&this->m_rect, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
+ this->m_memoryProxy = memoryProxy;
+ this->m_chunkNumber = -1;
+ this->m_buffer = (float *)MEM_mallocN(sizeof(float) * determineBufferSize() * COM_NUMBER_OF_CHANNELS, "COM_MemoryBuffer");
+ this->m_state = COM_MB_TEMPORARILY;
+ this->m_datatype = COM_DT_COLOR;
+ this->m_chunkWidth = this->m_rect.xmax - this->m_rect.xmin;
}
MemoryBuffer *MemoryBuffer::duplicate()
{
- MemoryBuffer *result = new MemoryBuffer(this->memoryProxy, &this->rect);
- memcpy(result->buffer, this->buffer, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
+ MemoryBuffer *result = new MemoryBuffer(this->m_memoryProxy, &this->m_rect);
+ memcpy(result->m_buffer, this->m_buffer, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
return result;
}
void MemoryBuffer::clear()
{
- memset(this->buffer, 0, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
+ memset(this->m_buffer, 0, this->determineBufferSize() * COM_NUMBER_OF_CHANNELS * sizeof(float));
}
float *MemoryBuffer::convertToValueBuffer()
@@ -78,7 +78,7 @@ float *MemoryBuffer::convertToValueBuffer()
float *result = new float[size];
- const float *fp_src = this->buffer;
+ const float *fp_src = this->m_buffer;
float *fp_dst = result;
for (i = 0; i < size; i++, fp_dst++, fp_src += COM_NUMBER_OF_CHANNELS) {
@@ -90,9 +90,9 @@ float *MemoryBuffer::convertToValueBuffer()
MemoryBuffer::~MemoryBuffer()
{
- if (this->buffer) {
- MEM_freeN(this->buffer);
- this->buffer = NULL;
+ if (this->m_buffer) {
+ MEM_freeN(this->m_buffer);
+ this->m_buffer = NULL;
}
}
@@ -102,30 +102,30 @@ void MemoryBuffer::copyContentFrom(MemoryBuffer *otherBuffer)
return;
}
unsigned int otherY;
- unsigned int minX = max(this->rect.xmin, otherBuffer->rect.xmin);
- unsigned int maxX = min(this->rect.xmax, otherBuffer->rect.xmax);
- unsigned int minY = max(this->rect.ymin, otherBuffer->rect.ymin);
- unsigned int maxY = min(this->rect.ymax, otherBuffer->rect.ymax);
+ unsigned int minX = max(this->m_rect.xmin, otherBuffer->m_rect.xmin);
+ unsigned int maxX = min(this->m_rect.xmax, otherBuffer->m_rect.xmax);
+ unsigned int minY = max(this->m_rect.ymin, otherBuffer->m_rect.ymin);
+ unsigned int maxY = min(this->m_rect.ymax, otherBuffer->m_rect.ymax);
int offset;
int otherOffset;
for (otherY = minY; otherY < maxY; otherY++) {
- otherOffset = ((otherY - otherBuffer->rect.ymin) * otherBuffer->chunkWidth + minX - otherBuffer->rect.xmin) * COM_NUMBER_OF_CHANNELS;
- offset = ((otherY - this->rect.ymin) * this->chunkWidth + minX - this->rect.xmin) * COM_NUMBER_OF_CHANNELS;
- memcpy(&this->buffer[offset], &otherBuffer->buffer[otherOffset], (maxX - minX) * COM_NUMBER_OF_CHANNELS * sizeof(float));
+ otherOffset = ((otherY - otherBuffer->m_rect.ymin) * otherBuffer->m_chunkWidth + minX - otherBuffer->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
+ offset = ((otherY - this->m_rect.ymin) * this->m_chunkWidth + minX - this->m_rect.xmin) * COM_NUMBER_OF_CHANNELS;
+ memcpy(&this->m_buffer[offset], &otherBuffer->m_buffer[otherOffset], (maxX - minX) * COM_NUMBER_OF_CHANNELS * sizeof(float));
}
}
void MemoryBuffer::read(float result[4], int x, int y)
{
- if (x >= this->rect.xmin && x < this->rect.xmax &&
- y >= this->rect.ymin && y < this->rect.ymax)
+ if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
+ y >= this->m_rect.ymin && y < this->m_rect.ymax)
{
- const int dx = x - this->rect.xmin;
- const int dy = y - this->rect.ymin;
- const int offset = (this->chunkWidth * dy + dx) * COM_NUMBER_OF_CHANNELS;
- copy_v4_v4(result, &this->buffer[offset]);
+ const int dx = x - this->m_rect.xmin;
+ const int dy = y - this->m_rect.ymin;
+ const int offset = (this->m_chunkWidth * dy + dx) * COM_NUMBER_OF_CHANNELS;
+ copy_v4_v4(result, &this->m_buffer[offset]);
}
else {
zero_v4(result);
@@ -133,21 +133,21 @@ void MemoryBuffer::read(float result[4], int x, int y)
}
void MemoryBuffer::writePixel(int x, int y, const float color[4])
{
- if (x >= this->rect.xmin && x < this->rect.xmax &&
- y >= this->rect.ymin && y < this->rect.ymax)
+ if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
+ y >= this->m_rect.ymin && y < this->m_rect.ymax)
{
- const int offset = (this->chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
- copy_v4_v4(&this->buffer[offset], color);
+ const int offset = (this->m_chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
+ copy_v4_v4(&this->m_buffer[offset], color);
}
}
void MemoryBuffer::addPixel(int x, int y, const float color[4])
{
- if (x >= this->rect.xmin && x < this->rect.xmax &&
- y >= this->rect.ymin && y < this->rect.ymax)
+ if (x >= this->m_rect.xmin && x < this->m_rect.xmax &&
+ y >= this->m_rect.ymin && y < this->m_rect.ymax)
{
- const int offset = (this->chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
- add_v4_v4(&this->buffer[offset], color);
+ const int offset = (this->m_chunkWidth * y + x) * COM_NUMBER_OF_CHANNELS;
+ add_v4_v4(&this->m_buffer[offset], color);
}
}
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index dd24a30e85e..63b41aeddde 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -56,39 +56,39 @@ private:
/**
* @brief proxy of the memory (same for all chunks in the same buffer)
*/
- MemoryProxy *memoryProxy;
+ MemoryProxy *m_memoryProxy;
/**
* @brief the type of buffer COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR
*/
- DataType datatype;
+ DataType m_datatype;
/**
* @brief region of this buffer inside reative to the MemoryProxy
*/
- rcti rect;
+ rcti m_rect;
/**
* brief refers to the chunknumber within the executiongroup where related to the MemoryProxy
* @see memoryProxy
*/
- unsigned int chunkNumber;
+ unsigned int m_chunkNumber;
/**
* @brief width of the chunk
*/
- unsigned int chunkWidth;
+ unsigned int m_chunkWidth;
/**
* @brief state of the buffer
*/
- MemoryBufferState state;
+ MemoryBufferState m_state;
/**
* @brief the actual float buffer/data
*/
- float *buffer;
+ float *m_buffer;
public:
/**
@@ -109,19 +109,19 @@ public:
/**
* @brief read the ChunkNumber of this MemoryBuffer
*/
- unsigned int getChunkNumber() { return this->chunkNumber; }
+ unsigned int getChunkNumber() { return this->m_chunkNumber; }
/**
* @brief get the data of this MemoryBuffer
* @note buffer should already be available in memory
*/
- float *getBuffer() { return this->buffer; }
+ float *getBuffer() { return this->m_buffer; }
/**
* @brief after execution the state will be set to available by calling this method
*/
void setCreatedState() {
- this->state = COM_MB_AVAILABLE;
+ this->m_state = COM_MB_AVAILABLE;
}
void read(float result[4], int x, int y);
@@ -133,7 +133,7 @@ public:
/**
* @brief is this MemoryBuffer a temporarily buffer (based on an area, not on a chunk)
*/
- inline const bool isTemporarily() const { return this->state == COM_MB_TEMPORARILY; }
+ inline const bool isTemporarily() const { return this->m_state == COM_MB_TEMPORARILY; }
/**
* @brief add the content from otherBuffer to this MemoryBuffer
@@ -144,7 +144,7 @@ public:
/**
* @brief get the rect of this MemoryBuffer
*/
- rcti *getRect() { return &this->rect; }
+ rcti *getRect() { return &this->m_rect; }
/**
* @brief get the width of this MemoryBuffer
@@ -166,6 +166,10 @@ public:
float *convertToValueBuffer();
private:
unsigned int determineBufferSize();
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryBuffer")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cpp b/source/blender/compositor/intern/COM_MemoryProxy.cpp
index 3a2c690d7de..90ca0baea06 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cpp
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cpp
@@ -25,8 +25,8 @@
MemoryProxy::MemoryProxy()
{
- this->writeBufferOperation = NULL;
- this->executor = NULL;
+ this->m_writeBufferOperation = NULL;
+ this->m_executor = NULL;
}
void MemoryProxy::allocate(unsigned int width, unsigned int height)
@@ -37,14 +37,14 @@ void MemoryProxy::allocate(unsigned int width, unsigned int height)
result.ymin = 0;
result.ymax = height;
- buffer = new MemoryBuffer(this, 1, &result);
+ this->m_buffer = new MemoryBuffer(this, 1, &result);
}
void MemoryProxy::free()
{
- if (buffer) {
- delete buffer;
- buffer = NULL;
+ if (this->m_buffer) {
+ delete this->m_buffer;
+ this->m_buffer = NULL;
}
}
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.h b/source/blender/compositor/intern/COM_MemoryProxy.h
index e7e7f1cf3a0..130c5f5057a 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.h
+++ b/source/blender/compositor/intern/COM_MemoryProxy.h
@@ -23,8 +23,8 @@
class MemoryProxy;
-#ifndef _COM_MemoryProxy_h
-#define _COM_MemoryProxy_h
+#ifndef _COM_MemoryProxy_h_
+#define _COM_MemoryProxy_h_
#include "COM_ExecutionGroup.h"
class ExecutionGroup;
@@ -40,27 +40,27 @@ private:
/**
* @brief reference to the ouput operation of the executiongroup
*/
- WriteBufferOperation *writeBufferOperation;
+ WriteBufferOperation *m_writeBufferOperation;
/**
* @brief reference to the executor. the Execution group that can fill a chunk
*/
- ExecutionGroup *executor;
+ ExecutionGroup *m_executor;
/**
* @brief datatype of this MemoryProxy
*/
- DataType datatype;
+ /* DataType m_datatype; */ /* UNUSED */
/**
* @brief channel information of this buffer
*/
- ChannelInfo channelInfo[COM_NUMBER_OF_CHANNELS];
+ /* ChannelInfo m_channelInfo[COM_NUMBER_OF_CHANNELS]; */ /* UNUSED */
/**
* @brief the allocated memory
*/
- MemoryBuffer *buffer;
+ MemoryBuffer *m_buffer;
public:
MemoryProxy();
@@ -69,24 +69,24 @@ public:
* @brief set the ExecutionGroup that can be scheduled to calculate a certain chunk.
* @param group the ExecutionGroup to set
*/
- void setExecutor(ExecutionGroup *executor) { this->executor = executor; }
+ void setExecutor(ExecutionGroup *executor) { this->m_executor = executor; }
/**
* @brief get the ExecutionGroup that can be scheduled to calculate a certain chunk.
*/
- ExecutionGroup *getExecutor() { return this->executor; }
+ ExecutionGroup *getExecutor() { return this->m_executor; }
/**
* @brief set the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @param operation
*/
- void setWriteBufferOperation(WriteBufferOperation *operation) { this->writeBufferOperation = operation; }
+ void setWriteBufferOperation(WriteBufferOperation *operation) { this->m_writeBufferOperation = operation; }
/**
* @brief get the WriteBufferOperation that is responsible for writing to this MemoryProxy
* @return WriteBufferOperation
*/
- WriteBufferOperation *getWriteBufferOperation() { return this->writeBufferOperation; }
+ WriteBufferOperation *getWriteBufferOperation() { return this->m_writeBufferOperation; }
/**
* @brief allocate memory of size widht x height
@@ -101,7 +101,11 @@ public:
/**
* @brief get the allocated memory
*/
- inline MemoryBuffer *getBuffer() { return this->buffer; }
+ inline MemoryBuffer *getBuffer() { return this->m_buffer; }
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:MemoryProxy")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp
index 06b6164be3c..15b8a3933a7 100644
--- a/source/blender/compositor/intern/COM_Node.cpp
+++ b/source/blender/compositor/intern/COM_Node.cpp
@@ -41,7 +41,7 @@
Node::Node(bNode *editorNode, bool create_sockets)
{
- this->editorNode = editorNode;
+ this->m_editorNode = editorNode;
if (create_sockets) {
bNodeSocket *input = (bNodeSocket *)editorNode->inputs.first;
@@ -66,12 +66,12 @@ Node::Node(bNode *editorNode, bool create_sockets)
}
Node::Node()
{
- this->editorNode = NULL;
+ this->m_editorNode = NULL;
}
bNode *Node::getbNode()
{
- return this->editorNode;
+ return this->m_editorNode;
}
void Node::addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket, int editorNodeInputSocketIndex)
diff --git a/source/blender/compositor/intern/COM_Node.h b/source/blender/compositor/intern/COM_Node.h
index 090b1455440..5d6d232f37a 100644
--- a/source/blender/compositor/intern/COM_Node.h
+++ b/source/blender/compositor/intern/COM_Node.h
@@ -51,12 +51,12 @@ private:
/**
* @brief stores the reference to the SDNA bNode struct
*/
- bNode *editorNode;
+ bNode *m_editorNode;
/**
* @brief Is this node part of the active group
*/
- bool inActiveGroup;
+ bool m_inActiveGroup;
public:
Node(bNode *editorNode, bool create_sockets = true);
@@ -70,7 +70,7 @@ public:
* @brief Is this node in the active group (the group that is being edited)
* @param isInActiveGroup
*/
- void setIsInActiveGroup(bool isInActiveGroup) { this->inActiveGroup = isInActiveGroup; }
+ void setIsInActiveGroup(bool value) { this->m_inActiveGroup = value; }
/**
* @brief Is this node part of the active group
@@ -78,7 +78,7 @@ public:
* the active group will be the main tree (all nodes that are not part of a group will be active)
* @return bool [false:true]
*/
- inline bool isInActiveGroup() { return this->inActiveGroup; }
+ inline bool isInActiveGroup() { return this->m_inActiveGroup; }
/**
* @brief convert node to operation
diff --git a/source/blender/compositor/intern/COM_NodeBase.cpp b/source/blender/compositor/intern/COM_NodeBase.cpp
index 1a895cf93b1..8dbda5f649c 100644
--- a/source/blender/compositor/intern/COM_NodeBase.cpp
+++ b/source/blender/compositor/intern/COM_NodeBase.cpp
@@ -39,13 +39,13 @@ NodeBase::NodeBase()
NodeBase::~NodeBase()
{
- while (!this->outputsockets.empty()) {
- delete (this->outputsockets.back());
- this->outputsockets.pop_back();
+ while (!this->m_outputsockets.empty()) {
+ delete (this->m_outputsockets.back());
+ this->m_outputsockets.pop_back();
}
- while (!this->inputsockets.empty()) {
- delete (this->inputsockets.back());
- this->inputsockets.pop_back();
+ while (!this->m_inputsockets.empty()) {
+ delete (this->m_inputsockets.back());
+ this->m_inputsockets.pop_back();
}
}
@@ -63,7 +63,7 @@ void NodeBase::addInputSocket(DataType datatype, InputSocketResizeMode resizeMod
InputSocket *socket = new InputSocket(datatype, resizeMode);
socket->setEditorSocket(bSocket);
socket->setNode(this);
- this->inputsockets.push_back(socket);
+ this->m_inputsockets.push_back(socket);
}
void NodeBase::addOutputSocket(DataType datatype)
@@ -76,21 +76,21 @@ void NodeBase::addOutputSocket(DataType datatype, bNodeSocket *bSocket)
OutputSocket *socket = new OutputSocket(datatype);
socket->setEditorSocket(bSocket);
socket->setNode(this);
- this->outputsockets.push_back(socket);
+ this->m_outputsockets.push_back(socket);
}
const bool NodeBase::isInputNode() const
{
- return this->inputsockets.size() == 0;
+ return this->m_inputsockets.size() == 0;
}
OutputSocket *NodeBase::getOutputSocket(unsigned int index)
{
- BLI_assert(index < this->outputsockets.size());
- return this->outputsockets[index];
+ BLI_assert(index < this->m_outputsockets.size());
+ return this->m_outputsockets[index];
}
InputSocket *NodeBase::getInputSocket(unsigned int index)
{
- BLI_assert(index < this->inputsockets.size());
- return this->inputsockets[index];
+ BLI_assert(index < this->m_inputsockets.size());
+ return this->m_inputsockets[index];
}
diff --git a/source/blender/compositor/intern/COM_NodeBase.h b/source/blender/compositor/intern/COM_NodeBase.h
index 54f80926b84..7095cda39e3 100644
--- a/source/blender/compositor/intern/COM_NodeBase.h
+++ b/source/blender/compositor/intern/COM_NodeBase.h
@@ -47,23 +47,23 @@ private:
/**
* @brief the list of actual inputsockets @see InputSocket
*/
- vector<InputSocket *> inputsockets;
+ vector<InputSocket *> m_inputsockets;
/**
* @brief the list of actual outputsockets @see OutputSocket
*/
- vector<OutputSocket *> outputsockets;
+ vector<OutputSocket *> m_outputsockets;
protected:
/**
* @brief get access to the vector of input sockets
*/
- inline vector<InputSocket *>& getInputSockets() { return this->inputsockets; }
+ inline vector<InputSocket *>& getInputSockets() { return this->m_inputsockets; }
/**
* @brief get access to the vector of input sockets
*/
- inline vector<OutputSocket *>& getOutputSockets() { return this->outputsockets; }
+ inline vector<OutputSocket *>& getOutputSockets() { return this->m_outputsockets; }
public:
@@ -91,12 +91,12 @@ public:
/**
* @brief Return the number of input sockets of this node.
*/
- const unsigned int getNumberOfInputSockets() const { return this->inputsockets.size(); }
+ const unsigned int getNumberOfInputSockets() const { return this->m_inputsockets.size(); }
/**
* @brief Return the number of output sockets of this node.
*/
- const unsigned int getNumberOfOutputSockets() const { return this->outputsockets.size(); }
+ const unsigned int getNumberOfOutputSockets() const { return this->m_outputsockets.size(); }
/**
* get the reference to a certain outputsocket
@@ -141,6 +141,11 @@ protected:
*/
void addOutputSocket(DataType datatype);
void addOutputSocket(DataType datatype, bNodeSocket *socket);
+
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeBase")
+#endif
};
#endif
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 f96b994685a..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,16 @@ 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")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index c9d27b8543c..eae1ffeb08a 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -23,28 +23,28 @@
#include "COM_OpenCLDevice.h"
#include "COM_WorkScheduler.h"
-typedef enum COM_VendorID {NVIDIA=0x10DE, AMD=0x1002} COM_VendorID;
+typedef enum COM_VendorID {NVIDIA = 0x10DE, AMD = 0x1002} COM_VendorID;
OpenCLDevice::OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId)
{
- this->device = device;
- this->context = context;
- this->program = program;
- this->queue = NULL;
- this->vendorID = vendorId;
+ this->m_device = device;
+ this->m_context = context;
+ this->m_program = program;
+ this->m_queue = NULL;
+ this->m_vendorID = vendorId;
}
bool OpenCLDevice::initialize()
{
cl_int error;
- queue = clCreateCommandQueue(context, device, 0, &error);
+ this->m_queue = clCreateCommandQueue(this->m_context, this->m_device, 0, &error);
return false;
}
void OpenCLDevice::deinitialize()
{
- if (queue) {
- clReleaseCommandQueue(queue);
+ if (this->m_queue) {
+ clReleaseCommandQueue(this->m_queue);
}
}
@@ -76,8 +76,8 @@ cl_mem OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
CL_FLOAT
};
- cl_mem clBuffer = clCreateImage2D(this->context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, &imageFormat, result->getWidth(),
- result->getHeight(), 0, result->getBuffer(), &error);
+ cl_mem clBuffer = clCreateImage2D(this->m_context, CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR, &imageFormat, result->getWidth(),
+ result->getHeight(), 0, result->getBuffer(), &error);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
if (error == CL_SUCCESS) cleanup->push_back(clBuffer);
@@ -124,7 +124,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
cl_int error;
const size_t size[] = {outputMemoryBuffer->getWidth(), outputMemoryBuffer->getHeight()};
- error = clEnqueueNDRangeKernel(this->queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
+ error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
}
@@ -139,7 +139,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
size_t size[2];
cl_int2 offset;
- if (this->vendorID == NVIDIA){localSize = 32;}
+ if (this->m_vendorID == NVIDIA) {localSize = 32;}
bool breaked = false;
for (offsety = 0; offsety < height && (!breaked); offsety += localSize) {
offset[1] = offsety;
@@ -160,9 +160,9 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
error = clSetKernelArg(kernel, offsetIndex, sizeof(cl_int2), &offset);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
- error = clEnqueueNDRangeKernel(this->queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
+ error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
- clFlush(this->queue);
+ clFlush(this->m_queue);
if (operation->isBreaked()) {
breaked = false;
}
@@ -173,7 +173,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
cl_kernel OpenCLDevice::COM_clCreateKernel(const char *kernelname, list<cl_kernel> *clKernelsToCleanUp)
{
cl_int error;
- cl_kernel kernel = clCreateKernel(this->program, kernelname, &error);
+ cl_kernel kernel = clCreateKernel(this->m_program, kernelname, &error);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
else {
if (clKernelsToCleanUp) clKernelsToCleanUp->push_back(kernel);
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.h b/source/blender/compositor/intern/COM_OpenCLDevice.h
index d132f330651..30a90dabc3e 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.h
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.h
@@ -38,27 +38,27 @@ private:
/**
* @brief opencl context
*/
- cl_context context;
+ cl_context m_context;
/**
* @brief opencl device
*/
- cl_device_id device;
+ cl_device_id m_device;
/**
* @brief opencl program
*/
- cl_program program;
+ cl_program m_program;
/**
* @brief opencl command queue
*/
- cl_command_queue queue;
+ cl_command_queue m_queue;
/**
* @brief opencl vendor ID
*/
- cl_int vendorID;
+ cl_int m_vendorID;
public:
/**
@@ -91,9 +91,9 @@ public:
*/
void execute(WorkPackage *work);
- cl_context getContext(){return this->context;}
+ cl_context getContext(){ return this->m_context; }
- cl_command_queue getQueue(){return this->queue;}
+ cl_command_queue getQueue(){ return this->m_queue; }
cl_mem COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel, int parameterIndex, int offsetIndex, list<cl_mem> *cleanup, MemoryBuffer **inputMemoryBuffers, SocketReader *reader);
void COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel kernel, int offsetIndex, MemoryBuffer *memoryBuffers);
diff --git a/source/blender/compositor/intern/COM_OutputSocket.cpp b/source/blender/compositor/intern/COM_OutputSocket.cpp
index 484254fe6de..865ab0472e8 100644
--- a/source/blender/compositor/intern/COM_OutputSocket.cpp
+++ b/source/blender/compositor/intern/COM_OutputSocket.cpp
@@ -31,7 +31,7 @@ OutputSocket::OutputSocket(DataType datatype) : Socket(datatype)
}
int OutputSocket::isOutputSocket() const { return true; }
-const int OutputSocket::isConnected() const { return this->connections.size() != 0; }
+const int OutputSocket::isConnected() const { return this->m_connections.size() != 0; }
void OutputSocket::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
{
@@ -51,37 +51,37 @@ void OutputSocket::determineResolution(unsigned int resolution[], unsigned int p
void OutputSocket::addConnection(SocketConnection *connection)
{
- this->connections.push_back(connection);
+ this->m_connections.push_back(connection);
}
void OutputSocket::relinkConnections(OutputSocket *relinkToSocket, bool single)
{
if (isConnected()) {
if (single) {
- SocketConnection *connection = this->connections[0];
+ SocketConnection *connection = this->m_connections[0];
connection->setFromSocket(relinkToSocket);
relinkToSocket->addConnection(connection);
- this->connections.erase(this->connections.begin());
+ this->m_connections.erase(this->m_connections.begin());
}
else {
unsigned int index;
- for (index = 0; index < this->connections.size(); index++) {
- SocketConnection *connection = this->connections[index];
+ for (index = 0; index < this->m_connections.size(); index++) {
+ SocketConnection *connection = this->m_connections[index];
connection->setFromSocket(relinkToSocket);
relinkToSocket->addConnection(connection);
}
- this->connections.clear();
+ this->m_connections.clear();
}
}
}
void OutputSocket::removeFirstConnection()
{
- SocketConnection *connection = this->connections[0];
+ SocketConnection *connection = this->m_connections[0];
InputSocket *inputSocket = connection->getToSocket();
if (inputSocket != NULL) {
inputSocket->setConnection(NULL);
}
- this->connections.erase(this->connections.begin());
+ this->m_connections.erase(this->m_connections.begin());
}
void OutputSocket::clearConnections()
@@ -94,8 +94,8 @@ void OutputSocket::clearConnections()
WriteBufferOperation *OutputSocket::findAttachedWriteBufferOperation() const
{
unsigned int index;
- for (index = 0; index < this->connections.size(); index++) {
- SocketConnection *connection = this->connections[index];
+ for (index = 0; index < this->m_connections.size(); index++) {
+ SocketConnection *connection = this->m_connections[index];
NodeBase *node = connection->getToNode();
if (node->isOperation()) {
NodeOperation *operation = (NodeOperation *)node;
diff --git a/source/blender/compositor/intern/COM_OutputSocket.h b/source/blender/compositor/intern/COM_OutputSocket.h
index c073703c423..4810e1ae065 100644
--- a/source/blender/compositor/intern/COM_OutputSocket.h
+++ b/source/blender/compositor/intern/COM_OutputSocket.h
@@ -42,7 +42,7 @@ class WriteBufferOperation;
*/
class OutputSocket : public Socket {
private:
- vector<SocketConnection *> connections;
+ vector<SocketConnection *> m_connections;
void removeFirstConnection();
public:
@@ -50,7 +50,7 @@ public:
OutputSocket(DataType datatype, int inputSocketDataTypeDeterminatorIndex);
OutputSocket(OutputSocket *from);
void addConnection(SocketConnection *connection);
- SocketConnection *getConnection(unsigned int index) { return this->connections[index]; }
+ SocketConnection *getConnection(unsigned int index) { return this->m_connections[index]; }
const int isConnected() const;
int isOutputSocket() const;
@@ -66,7 +66,7 @@ public:
*/
void relinkConnections(OutputSocket *relinkToSocket) { this->relinkConnections(relinkToSocket, false); };
void relinkConnections(OutputSocket *relinkToSocket, bool single);
- const int getNumberOfConnections() { return connections.size(); }
+ const int getNumberOfConnections() { return this->m_connections.size(); }
void clearConnections();
diff --git a/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp b/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp
index 01043664412..a6f81410b74 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp
@@ -24,7 +24,7 @@
SingleThreadedNodeOperation::SingleThreadedNodeOperation() : NodeOperation()
{
- this->cachedInstance = NULL;
+ this->m_cachedInstance = NULL;
setComplex(true);
}
@@ -35,26 +35,26 @@ void SingleThreadedNodeOperation::initExecution()
void SingleThreadedNodeOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- this->cachedInstance->read(color, x, y);
+ this->m_cachedInstance->read(color, x, y);
}
void SingleThreadedNodeOperation::deinitExecution()
{
deinitMutex();
- if (this->cachedInstance) {
- delete cachedInstance;
- this->cachedInstance = NULL;
+ if (this->m_cachedInstance) {
+ delete this->m_cachedInstance;
+ this->m_cachedInstance = NULL;
}
}
void *SingleThreadedNodeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->cachedInstance) return this->cachedInstance;
+ if (this->m_cachedInstance) return this->m_cachedInstance;
lockMutex();
- if (this->cachedInstance == NULL) {
+ if (this->m_cachedInstance == NULL) {
//
- this->cachedInstance = createMemoryBuffer(rect, memoryBuffers);
+ this->m_cachedInstance = createMemoryBuffer(rect, memoryBuffers);
}
unlockMutex();
- return this->cachedInstance;
+ return this->m_cachedInstance;
}
diff --git a/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h b/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h
index b1bf28c9c07..c6db5381f48 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h
+++ b/source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h
@@ -26,11 +26,11 @@
class SingleThreadedNodeOperation : public NodeOperation {
private:
- MemoryBuffer *cachedInstance;
+ MemoryBuffer *m_cachedInstance;
protected:
inline bool isCached() {
- return cachedInstance != NULL;
+ return this->m_cachedInstance != NULL;
}
public:
diff --git a/source/blender/compositor/intern/COM_Socket.cpp b/source/blender/compositor/intern/COM_Socket.cpp
index 11739a4e9c5..30f28f9dddb 100644
--- a/source/blender/compositor/intern/COM_Socket.cpp
+++ b/source/blender/compositor/intern/COM_Socket.cpp
@@ -26,18 +26,18 @@
Socket::Socket(DataType datatype)
{
- this->datatype = datatype;
- this->editorSocket = NULL;
- this->node = NULL;
+ this->m_datatype = datatype;
+ this->m_editorSocket = NULL;
+ this->m_node = NULL;
}
DataType Socket::getDataType() const
{
- return this->datatype;
+ return this->m_datatype;
}
int Socket::isInputSocket() const { return false; }
int Socket::isOutputSocket() const { return false; }
const int Socket::isConnected() const { return false; }
-void Socket::setNode(NodeBase *node) { this->node = node; }
-NodeBase *Socket::getNode() const { return this->node; }
+void Socket::setNode(NodeBase *node) { this->m_node = node; }
+NodeBase *Socket::getNode() const { return this->m_node; }
diff --git a/source/blender/compositor/intern/COM_Socket.h b/source/blender/compositor/intern/COM_Socket.h
index 7c5c2198a16..5607d2f4569 100644
--- a/source/blender/compositor/intern/COM_Socket.h
+++ b/source/blender/compositor/intern/COM_Socket.h
@@ -29,6 +29,10 @@
#include "DNA_node_types.h"
#include "COM_defines.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
class SocketConnection;
class NodeBase;
@@ -49,15 +53,15 @@ private:
/**
* Reference to the node where this Socket belongs to
*/
- NodeBase *node;
+ NodeBase *m_node;
/**
* the datatype of this socket. Is used for automatically data transformation.
* @section data-conversion
*/
- DataType datatype;
+ DataType m_datatype;
- bNodeSocket *editorSocket;
+ bNodeSocket *m_editorSocket;
public:
Socket(DataType datatype);
@@ -71,9 +75,12 @@ public:
int isOutputSocket() const;
virtual void determineResolution(int resolution[], unsigned int preferredResolution[]) {}
- void setEditorSocket(bNodeSocket *editorSocket) { this->editorSocket = editorSocket; }
- bNodeSocket *getbNodeSocket() const { return this->editorSocket; }
+ void setEditorSocket(bNodeSocket *editorSocket) { this->m_editorSocket = editorSocket; }
+ bNodeSocket *getbNodeSocket() const { return this->m_editorSocket; }
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:Socket")
+#endif
};
diff --git a/source/blender/compositor/intern/COM_SocketConnection.cpp b/source/blender/compositor/intern/COM_SocketConnection.cpp
index 1edeb6158b9..1f2cba72dc0 100644
--- a/source/blender/compositor/intern/COM_SocketConnection.cpp
+++ b/source/blender/compositor/intern/COM_SocketConnection.cpp
@@ -25,8 +25,8 @@
SocketConnection::SocketConnection()
{
- this->fromSocket = NULL;
- this->toSocket = NULL;
+ this->m_fromSocket = NULL;
+ this->m_toSocket = NULL;
this->setIgnoreResizeCheck(false);
}
@@ -35,19 +35,19 @@ void SocketConnection::setFromSocket(OutputSocket *fromsocket)
if (fromsocket == NULL) {
throw "ERROR";
}
- this->fromSocket = fromsocket;
+ this->m_fromSocket = fromsocket;
}
-OutputSocket *SocketConnection::getFromSocket() const { return this->fromSocket; }
+OutputSocket *SocketConnection::getFromSocket() const { return this->m_fromSocket; }
void SocketConnection::setToSocket(InputSocket *tosocket)
{
if (tosocket == NULL) {
throw "ERROR";
}
- this->toSocket = tosocket;
+ this->m_toSocket = tosocket;
}
-InputSocket *SocketConnection::getToSocket() const { return this->toSocket; }
+InputSocket *SocketConnection::getToSocket() const { return this->m_toSocket; }
NodeBase *SocketConnection::getFromNode() const
{
@@ -79,10 +79,10 @@ bool SocketConnection::isValid() const
bool SocketConnection::needsResolutionConversion() const
{
- if (this->ignoreResizeCheck) { return false; }
+ if (this->m_ignoreResizeCheck) { return false; }
NodeOperation *fromOperation = (NodeOperation *)this->getFromNode();
NodeOperation *toOperation = (NodeOperation *)this->getToNode();
- if (this->toSocket->getResizeMode() == COM_SC_NO_RESIZE) { return false; }
+ if (this->m_toSocket->getResizeMode() == COM_SC_NO_RESIZE) { return false; }
const unsigned int fromWidth = fromOperation->getWidth();
const unsigned int fromHeight = fromOperation->getHeight();
const unsigned int toWidth = toOperation->getWidth();
diff --git a/source/blender/compositor/intern/COM_SocketConnection.h b/source/blender/compositor/intern/COM_SocketConnection.h
index 5385c5be49b..9777bd45be2 100644
--- a/source/blender/compositor/intern/COM_SocketConnection.h
+++ b/source/blender/compositor/intern/COM_SocketConnection.h
@@ -48,17 +48,17 @@ private:
/**
* @brief Startpoint of the connection
*/
- OutputSocket *fromSocket;
+ OutputSocket *m_fromSocket;
/**
* @brief Endpoint of the connection
*/
- InputSocket *toSocket;
+ InputSocket *m_toSocket;
/**
* @brief has the resize already been done for this connection
*/
- bool ignoreResizeCheck;
+ bool m_ignoreResizeCheck;
public:
SocketConnection();
@@ -104,12 +104,12 @@ public:
/**
* @brief set, whether the resize has already been done for this SocketConnection
*/
- void setIgnoreResizeCheck(bool check) { this->ignoreResizeCheck = check; }
+ void setIgnoreResizeCheck(bool check) { this->m_ignoreResizeCheck = check; }
/**
* @brief has the resize already been done for this SocketConnection
*/
- bool isIgnoreResizeCheck() const { return this->ignoreResizeCheck; }
+ bool isIgnoreResizeCheck() const { return this->m_ignoreResizeCheck; }
/**
* @brief does this SocketConnection need resolution conversion
@@ -118,6 +118,10 @@ public:
* @return needs conversion [true:false]
*/
bool needsResolutionConversion() const;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:SocketConnection")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h
index 3eb39e4bf02..0f35fcfb0df 100644
--- a/source/blender/compositor/intern/COM_SocketReader.h
+++ b/source/blender/compositor/intern/COM_SocketReader.h
@@ -25,6 +25,10 @@
#include "BLI_rect.h"
#include "COM_defines.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
typedef enum PixelSampler {
COM_PS_NEAREST,
COM_PS_BILINEAR,
@@ -43,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;
/**
@@ -104,8 +108,12 @@ 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")
#endif
+};
+
+#endif /* _COM_SocketReader_h */
diff --git a/source/blender/compositor/intern/COM_WorkPackage.cpp b/source/blender/compositor/intern/COM_WorkPackage.cpp
index 07974b9aafc..fa332ffa23e 100644
--- a/source/blender/compositor/intern/COM_WorkPackage.cpp
+++ b/source/blender/compositor/intern/COM_WorkPackage.cpp
@@ -24,6 +24,6 @@
WorkPackage::WorkPackage(ExecutionGroup *group, unsigned int chunkNumber)
{
- this->executionGroup = group;
- this->chunkNumber = chunkNumber;
+ this->m_executionGroup = group;
+ this->m_chunkNumber = chunkNumber;
}
diff --git a/source/blender/compositor/intern/COM_WorkPackage.h b/source/blender/compositor/intern/COM_WorkPackage.h
index fed87186d20..953a164e95e 100644
--- a/source/blender/compositor/intern/COM_WorkPackage.h
+++ b/source/blender/compositor/intern/COM_WorkPackage.h
@@ -36,12 +36,12 @@ private:
/**
* @brief executionGroup with the operations-setup to be evaluated
*/
- ExecutionGroup *executionGroup;
+ ExecutionGroup *m_executionGroup;
/**
* @brief number of the chunk to be executed
*/
- unsigned int chunkNumber;
+ unsigned int m_chunkNumber;
public:
/**
* @constructor
@@ -53,12 +53,16 @@ public:
/**
* @brief get the ExecutionGroup
*/
- ExecutionGroup *getExecutionGroup() const { return this->executionGroup; }
+ ExecutionGroup *getExecutionGroup() const { return this->m_executionGroup; }
/**
* @brief get the number of the chunk
*/
- unsigned int getChunkNumber() const { return this->chunkNumber; }
+ unsigned int getChunkNumber() const { return this->m_chunkNumber; }
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkPackage")
+#endif
};
#endif
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 619c5bea71e..c49ac24e018 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -43,24 +43,24 @@
/// @brief list of all CPUDevices. for every hardware thread an instance of CPUDevice is created
-static vector<CPUDevice *> cpudevices;
+static vector<CPUDevice *> g_cpudevices;
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
/// @brief list of all thread for every CPUDevice in cpudevices a thread exists
-static ListBase cputhreads;
+static ListBase g_cputhreads;
/// @brief all scheduled work for the cpu
-static ThreadQueue *cpuqueue;
-static ThreadQueue *gpuqueue;
+static ThreadQueue *g_cpuqueue;
+static ThreadQueue *g_gpuqueue;
#ifdef COM_OPENCL_ENABLED
-static cl_context context;
-static cl_program program;
+static cl_context g_context;
+static cl_program g_program;
/// @brief list of all OpenCLDevices. for every OpenCL GPU device an instance of OpenCLDevice is created
-static vector<OpenCLDevice *> gpudevices;
+static vector<OpenCLDevice *> g_gpudevices;
/// @brief list of all thread for every GPUDevice in cpudevices a thread exists
-static ListBase gputhreads;
+static ListBase g_gputhreads;
/// @brief all scheduled work for the gpu
#ifdef COM_OPENCL_ENABLED
-static bool openclActive = false;
+static bool g_openclActive = false;
#endif
#endif
#endif
@@ -72,7 +72,7 @@ void *WorkScheduler::thread_execute_cpu(void *data)
Device *device = (Device *)data;
WorkPackage *work;
- while ((work = (WorkPackage *)BLI_thread_queue_pop(cpuqueue))) {
+ while ((work = (WorkPackage *)BLI_thread_queue_pop(g_cpuqueue))) {
device->execute(work);
delete work;
}
@@ -85,7 +85,7 @@ void *WorkScheduler::thread_execute_gpu(void *data)
Device *device = (Device *)data;
WorkPackage *work;
- while ((work = (WorkPackage *)BLI_thread_queue_pop(gpuqueue))) {
+ while ((work = (WorkPackage *)BLI_thread_queue_pop(g_gpuqueue))) {
device->execute(work);
delete work;
}
@@ -105,11 +105,11 @@ void WorkScheduler::schedule(ExecutionGroup *group, int chunkNumber)
delete package;
#elif COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
#ifdef COM_OPENCL_ENABLED
- if (group->isOpenCL() && openclActive) {
- BLI_thread_queue_push(gpuqueue, package);
+ if (group->isOpenCL() && g_openclActive) {
+ BLI_thread_queue_push(g_gpuqueue, package);
}
else {
- BLI_thread_queue_push(cpuqueue, package);
+ BLI_thread_queue_push(g_cpuqueue, package);
}
#else
BLI_thread_queue_push(cpuqueue, package);
@@ -121,24 +121,24 @@ void WorkScheduler::start(CompositorContext &context)
{
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
unsigned int index;
- cpuqueue = BLI_thread_queue_init();
- BLI_init_threads(&cputhreads, thread_execute_cpu, cpudevices.size());
- for (index = 0; index < cpudevices.size(); index++) {
- Device *device = cpudevices[index];
- BLI_insert_thread(&cputhreads, device);
+ g_cpuqueue = BLI_thread_queue_init();
+ BLI_init_threads(&g_cputhreads, thread_execute_cpu, g_cpudevices.size());
+ for (index = 0; index < g_cpudevices.size(); index++) {
+ Device *device = g_cpudevices[index];
+ BLI_insert_thread(&g_cputhreads, device);
}
#ifdef COM_OPENCL_ENABLED
if (context.getHasActiveOpenCLDevices()) {
- gpuqueue = BLI_thread_queue_init();
- BLI_init_threads(&gputhreads, thread_execute_gpu, gpudevices.size());
- for (index = 0; index < gpudevices.size(); index++) {
- Device *device = gpudevices[index];
- BLI_insert_thread(&gputhreads, device);
+ g_gpuqueue = BLI_thread_queue_init();
+ BLI_init_threads(&g_gputhreads, thread_execute_gpu, g_gpudevices.size());
+ for (index = 0; index < g_gpudevices.size(); index++) {
+ Device *device = g_gpudevices[index];
+ BLI_insert_thread(&g_gputhreads, device);
}
- openclActive = true;
+ g_openclActive = true;
}
else {
- openclActive = false;
+ g_openclActive = false;
}
#endif
#endif
@@ -147,12 +147,12 @@ void WorkScheduler::finish()
{
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
#ifdef COM_OPENCL_ENABLED
- if (openclActive) {
- BLI_thread_queue_wait_finish(gpuqueue);
- BLI_thread_queue_wait_finish(cpuqueue);
+ if (g_openclActive) {
+ BLI_thread_queue_wait_finish(g_gpuqueue);
+ BLI_thread_queue_wait_finish(g_cpuqueue);
}
else {
- BLI_thread_queue_wait_finish(cpuqueue);
+ BLI_thread_queue_wait_finish(g_cpuqueue);
}
#else
BLI_thread_queue_wait_finish(cpuqueue);
@@ -162,16 +162,16 @@ void WorkScheduler::finish()
void WorkScheduler::stop()
{
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
- BLI_thread_queue_nowait(cpuqueue);
- BLI_end_threads(&cputhreads);
- BLI_thread_queue_free(cpuqueue);
- cpuqueue = NULL;
+ BLI_thread_queue_nowait(g_cpuqueue);
+ BLI_end_threads(&g_cputhreads);
+ BLI_thread_queue_free(g_cpuqueue);
+ g_cpuqueue = NULL;
#ifdef COM_OPENCL_ENABLED
- if (openclActive) {
- BLI_thread_queue_nowait(gpuqueue);
- BLI_end_threads(&gputhreads);
- BLI_thread_queue_free(gpuqueue);
- gpuqueue = NULL;
+ if (g_openclActive) {
+ BLI_thread_queue_nowait(g_gpuqueue);
+ BLI_end_threads(&g_gputhreads);
+ BLI_thread_queue_free(g_gpuqueue);
+ g_gpuqueue = NULL;
}
#endif
#endif
@@ -181,7 +181,7 @@ bool WorkScheduler::hasGPUDevices()
{
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
#ifdef COM_OPENCL_ENABLED
- return gpudevices.size() > 0;
+ return g_gpudevices.size() > 0;
#else
return 0;
#endif
@@ -203,11 +203,11 @@ void WorkScheduler::initialize()
for (int index = 0; index < numberOfCPUThreads; index++) {
CPUDevice *device = new CPUDevice();
device->initialize();
- cpudevices.push_back(device);
+ g_cpudevices.push_back(device);
}
#ifdef COM_OPENCL_ENABLED
- context = NULL;
- program = NULL;
+ g_context = NULL;
+ g_program = NULL;
if (clCreateContextFromType) {
cl_uint numberOfPlatforms = 0;
cl_int error;
@@ -225,18 +225,18 @@ void WorkScheduler::initialize()
cl_device_id *cldevices = new cl_device_id[numberOfDevices];
clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices, 0);
- context = clCreateContext(NULL, numberOfDevices, cldevices, clContextError, NULL, &error);
+ g_context = clCreateContext(NULL, numberOfDevices, cldevices, clContextError, NULL, &error);
if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
- program = clCreateProgramWithSource(context, 1, &clkernelstoh_COM_OpenCLKernels_cl, 0, &error);
- error = clBuildProgram(program, numberOfDevices, cldevices, 0, 0, 0);
+ g_program = clCreateProgramWithSource(g_context, 1, &clkernelstoh_COM_OpenCLKernels_cl, 0, &error);
+ error = clBuildProgram(g_program, numberOfDevices, cldevices, 0, 0, 0);
if (error != CL_SUCCESS) {
cl_int error2;
size_t ret_val_size = 0;
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
- error2 = clGetProgramBuildInfo(program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size);
+ error2 = clGetProgramBuildInfo(g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size);
if (error2 != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
char *build_log = new char[ret_val_size + 1];
- error2 = clGetProgramBuildInfo(program, cldevices[0], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, NULL);
+ error2 = clGetProgramBuildInfo(g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, NULL);
if (error2 != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
build_log[ret_val_size] = '\0';
printf("%s", build_log);
@@ -247,14 +247,14 @@ void WorkScheduler::initialize()
for (indexDevices = 0; indexDevices < numberOfDevices; indexDevices++) {
cl_device_id device = cldevices[indexDevices];
cl_int vendorID = 0;
- cl_int error = clGetDeviceInfo(device, CL_DEVICE_VENDOR_ID, sizeof(cl_int), &vendorID, NULL);
- if (error!= CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); }
- OpenCLDevice *clDevice = new OpenCLDevice(context, device, program, vendorID);
+ cl_int error2 = clGetDeviceInfo(device, CL_DEVICE_VENDOR_ID, sizeof(cl_int), &vendorID, NULL);
+ if (error2 != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error2, clewErrorString(error2)); }
+ OpenCLDevice *clDevice = new OpenCLDevice(g_context, device, g_program, vendorID);
clDevice->initialize();
- gpudevices.push_back(clDevice);
+ g_gpudevices.push_back(clDevice);
}
}
- delete cldevices;
+ delete[] cldevices;
}
}
delete[] platforms;
@@ -267,26 +267,26 @@ void WorkScheduler::deinitialize()
{
#if COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
Device *device;
- while (cpudevices.size() > 0) {
- device = cpudevices.back();
- cpudevices.pop_back();
+ while (g_cpudevices.size() > 0) {
+ device = g_cpudevices.back();
+ g_cpudevices.pop_back();
device->deinitialize();
delete device;
}
#ifdef COM_OPENCL_ENABLED
- while (gpudevices.size() > 0) {
- device = gpudevices.back();
- gpudevices.pop_back();
+ while (g_gpudevices.size() > 0) {
+ device = g_gpudevices.back();
+ g_gpudevices.pop_back();
device->deinitialize();
delete device;
}
- if (program) {
- clReleaseProgram(program);
- program = NULL;
+ if (g_program) {
+ clReleaseProgram(g_program);
+ g_program = NULL;
}
- if (context) {
- clReleaseContext(context);
- context = NULL;
+ if (g_context) {
+ clReleaseContext(g_context);
+ g_context = NULL;
}
#endif
#endif
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.h b/source/blender/compositor/intern/COM_WorkScheduler.h
index e52e0295607..f56fe94201e 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.h
+++ b/source/blender/compositor/intern/COM_WorkScheduler.h
@@ -110,5 +110,10 @@ public:
* @see CompositorContext.getHasActiveOpenCLDevices
*/
static bool hasGPUDevices();
-};
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("COM:WorkScheduler")
#endif
+};
+
+#endif /* _COM_WorkScheduler_h_ */
diff --git a/source/blender/compositor/intern/COM_compositor.cpp b/source/blender/compositor/intern/COM_compositor.cpp
index bec9ff95eed..7282cf65bc3 100644
--- a/source/blender/compositor/intern/COM_compositor.cpp
+++ b/source/blender/compositor/intern/COM_compositor.cpp
@@ -33,20 +33,22 @@ extern "C" {
#include "COM_WorkScheduler.h"
#include "OCL_opencl.h"
-static ThreadMutex *compositorMutex;
+static ThreadMutex compositorMutex;
+static char is_compositorMutex_init = FALSE;
void COM_execute(RenderData *rd, bNodeTree *editingtree, int rendering)
{
- if (compositorMutex == NULL) { /// TODO: move to blender startup phase
- compositorMutex = new ThreadMutex();
- BLI_mutex_init(compositorMutex);
+ if (is_compositorMutex_init == FALSE) { /// TODO: move to blender startup phase
+ memset(&compositorMutex, 0, sizeof(compositorMutex));
+ BLI_mutex_init(&compositorMutex);
OCL_init();
WorkScheduler::initialize(); ///TODO: call workscheduler.deinitialize somewhere
+ is_compositorMutex_init = TRUE;
}
- BLI_mutex_lock(compositorMutex);
+ BLI_mutex_lock(&compositorMutex);
if (editingtree->test_break(editingtree->tbh)) {
// during editing multiple calls to this method can be triggered.
// make sure one the last one will be doing the work.
- BLI_mutex_unlock(compositorMutex);
+ BLI_mutex_unlock(&compositorMutex);
return;
}
@@ -60,5 +62,5 @@ void COM_execute(RenderData *rd, bNodeTree *editingtree, int rendering)
system->execute();
delete system;
- BLI_mutex_unlock(compositorMutex);
+ BLI_mutex_unlock(&compositorMutex);
}
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.h b/source/blender/compositor/nodes/COM_AlphaOverNode.h
index f7375d9a7c5..e25e9e11975 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.h
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_AlphaOverNode_h
-#define _COM_AlphaOverNode_h
+#ifndef _COM_AlphaOverNode_h_
+#define _COM_AlphaOverNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BlurNode.h b/source/blender/compositor/nodes/COM_BlurNode.h
index e7daff1c414..95b0516dae0 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.h
+++ b/source/blender/compositor/nodes/COM_BlurNode.h
@@ -29,7 +29,6 @@
* @brief BlurNode
* @ingroup Node
*/
-
class BlurNode : public Node {
public:
BlurNode(bNode *editorNode);
diff --git a/source/blender/compositor/nodes/COM_BokehBlurNode.h b/source/blender/compositor/nodes/COM_BokehBlurNode.h
index 5ce75a7d42b..c2bc7552ac0 100644
--- a/source/blender/compositor/nodes/COM_BokehBlurNode.h
+++ b/source/blender/compositor/nodes/COM_BokehBlurNode.h
@@ -29,7 +29,6 @@
* @brief BokehBlurNode
* @ingroup Node
*/
-
class BokehBlurNode : public Node {
public:
BokehBlurNode(bNode *editorNode);
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.h b/source/blender/compositor/nodes/COM_ChannelMatteNode.h
index 45d03e18a6a..4efb06c9f87 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef COM_ChannelMatteNODE_H
-#define COM_ChannelMatteNODE_H
+#ifndef _COM_ChannelMatteNode_h_
+#define _COM_ChannelMatteNode_h_
#include "COM_Node.h"
@@ -28,8 +28,7 @@
* @brief ChannelMatteNode
* @ingroup Node
*/
-class ChannelMatteNode : public Node
-{
+class ChannelMatteNode : public Node {
public:
ChannelMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_ChromaMatteNode.h b/source/blender/compositor/nodes/COM_ChromaMatteNode.h
index ed8250b0329..ddd350aab40 100644
--- a/source/blender/compositor/nodes/COM_ChromaMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ChromaMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef COM_ChromaMatteNODE_H
-#define COM_ChromaMatteNODE_H
+#ifndef _COM_ChromaMatteNode_h_
+#define _COM_ChromaMatteNode_h_
#include "COM_Node.h"
@@ -28,8 +28,7 @@
* @brief ChromaMatteNode
* @ingroup Node
*/
-class ChromaMatteNode : public Node
-{
+class ChromaMatteNode : public Node {
public:
ChromaMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.h b/source/blender/compositor/nodes/COM_ColorBalanceNode.h
index c2bdc306e20..cdad02fc831 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.h
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef COM_ColorBalanceNODE_H
-#define COM_ColorBalanceNODE_H
+#ifndef _COM_ColorBalanceNode_h_
+#define _COM_ColorBalanceNode_h_
#include "COM_Node.h"
@@ -29,8 +29,7 @@
* @brief ColorBalanceNode
* @ingroup Node
*/
-class ColorBalanceNode : public Node
-{
+class ColorBalanceNode : public Node {
public:
ColorBalanceNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_ColorMatteNode.h b/source/blender/compositor/nodes/COM_ColorMatteNode.h
index 375c914a122..92a4fa79408 100644
--- a/source/blender/compositor/nodes/COM_ColorMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ColorMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef COM_ColorMatteNODE_H
-#define COM_ColorMatteNODE_H
+#ifndef _COM_ColorMatteNode_h_
+#define _COM_ColorMatteNode_h_
#include "COM_Node.h"
@@ -28,8 +28,7 @@
* @brief ColorMatteNode
* @ingroup Node
*/
-class ColorMatteNode : public Node
-{
+class ColorMatteNode : public Node {
public:
ColorMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_ColorRampNode.h b/source/blender/compositor/nodes/COM_ColorRampNode.h
index 4d706e126e1..6c256c09e68 100644
--- a/source/blender/compositor/nodes/COM_ColorRampNode.h
+++ b/source/blender/compositor/nodes/COM_ColorRampNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef COM_ColorRampNODE_H
-#define COM_ColorRampNODE_H
+#ifndef _COM_ColorRampNode_h_
+#define _COM_ColorRampNode_h_
#include "COM_Node.h"
@@ -29,8 +29,7 @@
* @brief ColorRampNode
* @ingroup Node
*/
-class ColorRampNode : public Node
-{
+class ColorRampNode : public Node {
public:
ColorRampNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_ColorSpillNode.h b/source/blender/compositor/nodes/COM_ColorSpillNode.h
index d8ce6878fa0..1d976fc65ae 100644
--- a/source/blender/compositor/nodes/COM_ColorSpillNode.h
+++ b/source/blender/compositor/nodes/COM_ColorSpillNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef COM_ColorSpillNODE_H
-#define COM_ColorSpillNODE_H
+#ifndef _COM_ColorSpillNode_h_
+#define _COM_ColorSpillNode_h_
#include "COM_Node.h"
@@ -29,8 +29,7 @@
* @brief ColorSpillNode
* @ingroup Node
*/
-class ColorSpillNode : public Node
-{
+class ColorSpillNode : public Node {
public:
ColorSpillNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_ColorToBWNode.h b/source/blender/compositor/nodes/COM_ColorToBWNode.h
index 34a157c73d8..9262634edda 100644
--- a/source/blender/compositor/nodes/COM_ColorToBWNode.h
+++ b/source/blender/compositor/nodes/COM_ColorToBWNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColourToBWNode_h
-#define _COM_ColourToBWNode_h
+#ifndef _COM_ColourToBWNode_h_
+#define _COM_ColourToBWNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_CombineHSVANode.h b/source/blender/compositor/nodes/COM_CombineHSVANode.h
index d8aba71d456..95d3cf9ecdd 100644
--- a/source/blender/compositor/nodes/COM_CombineHSVANode.h
+++ b/source/blender/compositor/nodes/COM_CombineHSVANode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_CombineHSVANode_h
-#define _COM_CombineHSVANode_h
+#ifndef _COM_CombineHSVANode_h_
+#define _COM_CombineHSVANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_CombineRGBANode.h b/source/blender/compositor/nodes/COM_CombineRGBANode.h
index 1f25d8deed9..5cc0b1ea6da 100644
--- a/source/blender/compositor/nodes/COM_CombineRGBANode.h
+++ b/source/blender/compositor/nodes/COM_CombineRGBANode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_CombineRGBANode_h
-#define _COM_CombineRGBANode_h
+#ifndef _COM_CombineRGBANode_h_
+#define _COM_CombineRGBANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_CombineYCCANode.h b/source/blender/compositor/nodes/COM_CombineYCCANode.h
index 3b143aabc7f..6ff2938c161 100644
--- a/source/blender/compositor/nodes/COM_CombineYCCANode.h
+++ b/source/blender/compositor/nodes/COM_CombineYCCANode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_CombineYCCANode_h
-#define _COM_CombineYCCANode_h
+#ifndef _COM_CombineYCCANode_h_
+#define _COM_CombineYCCANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_CombineYUVANode.h b/source/blender/compositor/nodes/COM_CombineYUVANode.h
index 1eae44c83a5..e3d8f36a5dd 100644
--- a/source/blender/compositor/nodes/COM_CombineYUVANode.h
+++ b/source/blender/compositor/nodes/COM_CombineYUVANode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_CombineYUVANode_h
-#define _COM_CombineYUVANode_h
+#ifndef _COM_CombineYUVANode_h_
+#define _COM_CombineYUVANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_CompositorNode.h b/source/blender/compositor/nodes/COM_CompositorNode.h
index 585dae7761e..54d52d7db9e 100644
--- a/source/blender/compositor/nodes/COM_CompositorNode.h
+++ b/source/blender/compositor/nodes/COM_CompositorNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_CompositorNode_h
-#define _COM_CompositorNode_h
+#ifndef _COM_CompositorNode_h_
+#define _COM_CompositorNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.h b/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
index d9077c23a02..a80f8de1607 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_ConvertAlphaNode_h
-#define _COM_ConvertAlphaNode_h
+#ifndef _COM_ConvertAlphaNode_h_
+#define _COM_ConvertAlphaNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_CropNode.h b/source/blender/compositor/nodes/COM_CropNode.h
index 44fdeecc180..1003728a9d4 100644
--- a/source/blender/compositor/nodes/COM_CropNode.h
+++ b/source/blender/compositor/nodes/COM_CropNode.h
@@ -25,6 +25,10 @@
#include "COM_Node.h"
+/**
+ * @brief CropNode
+ * @ingroup Node
+ */
class CropNode : public Node {
public:
CropNode(bNode *editorNode);
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.h b/source/blender/compositor/nodes/COM_DefocusNode.h
index a3cffbd98c4..7d69b6413bb 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.h
+++ b/source/blender/compositor/nodes/COM_DefocusNode.h
@@ -29,7 +29,6 @@
* @brief DefocusNode
* @ingroup Node
*/
-
class DefocusNode : public Node {
public:
DefocusNode(bNode *editorNode);
diff --git a/source/blender/compositor/nodes/COM_DifferenceMatteNode.h b/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
index faaf235bf34..191b7361c3c 100644
--- a/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef COM_DifferenceMatteNODE_H
-#define COM_DifferenceMatteNODE_H
+#ifndef _COM_DifferenceMatteNode_h_
+#define _COM_DifferenceMatteNode_h_
#include "COM_Node.h"
@@ -29,8 +29,7 @@
* @brief DifferenceMatteNode
* @ingroup Node
*/
-class DifferenceMatteNode : public Node
-{
+class DifferenceMatteNode : public Node {
public:
DifferenceMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_DilateErodeNode.cpp b/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
index 285bfa0470e..3f4e3736bbe 100644
--- a/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
+++ b/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
@@ -77,7 +77,7 @@ void DilateErodeNode::convertToOperations(ExecutionSystem *graph, CompositorCont
CompositorQuality quality = context->getQuality();
/* initialize node data */
- NodeBlurData *data = (NodeBlurData *)&this->alpha_blur;
+ NodeBlurData *data = (NodeBlurData *)&this->m_alpha_blur;
memset(data, 0, sizeof(*data));
data->filtertype = R_FILTER_GAUSS;
@@ -119,9 +119,9 @@ void DilateErodeNode::convertToOperations(ExecutionSystem *graph, CompositorCont
operationy->setSubtract(editorNode->custom2 < 0);
if (editorNode->storage) {
- NodeDilateErode *data = (NodeDilateErode *)editorNode->storage;
- operationx->setFalloff(data->falloff);
- operationy->setFalloff(data->falloff);
+ NodeDilateErode *data_storage = (NodeDilateErode *)editorNode->storage;
+ operationx->setFalloff(data_storage->falloff);
+ operationy->setFalloff(data_storage->falloff);
}
}
else {
diff --git a/source/blender/compositor/nodes/COM_DilateErodeNode.h b/source/blender/compositor/nodes/COM_DilateErodeNode.h
index ac374d7375b..4b02042ffc9 100644
--- a/source/blender/compositor/nodes/COM_DilateErodeNode.h
+++ b/source/blender/compositor/nodes/COM_DilateErodeNode.h
@@ -30,7 +30,7 @@
* @ingroup Node
*/
class DilateErodeNode : public Node {
- NodeBlurData alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
+ NodeBlurData m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
public:
DilateErodeNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_DisplaceNode.h b/source/blender/compositor/nodes/COM_DisplaceNode.h
index ecbe07b06b9..af6afc25366 100644
--- a/source/blender/compositor/nodes/COM_DisplaceNode.h
+++ b/source/blender/compositor/nodes/COM_DisplaceNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_DisplaceNode_h
-#define _COM_DisplaceNode_h
+#ifndef _COM_DisplaceNode_h_
+#define _COM_DisplaceNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DistanceMatteNode.h b/source/blender/compositor/nodes/COM_DistanceMatteNode.h
index 42582ef10a0..4e6682424e8 100644
--- a/source/blender/compositor/nodes/COM_DistanceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_DistanceMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef COM_DistanceMatteNODE_H
-#define COM_DistanceMatteNODE_H
+#ifndef _COM_DistanceMatteNode_h_
+#define _COM_DistanceMatteNode_h_
#include "COM_Node.h"
@@ -28,8 +28,7 @@
* @brief DistanceMatteNode
* @ingroup Node
*/
-class DistanceMatteNode : public Node
-{
+class DistanceMatteNode : public Node {
public:
DistanceMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_FilterNode.h b/source/blender/compositor/nodes/COM_FilterNode.h
index 17f590b9cfc..d65166944d8 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.h
+++ b/source/blender/compositor/nodes/COM_FilterNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef COM_FILTERNODE_H
-#define COM_FILTERNODE_H
+#ifndef _COM_FilterNode_h_
+#define _COM_FilterNode_h_
#include "COM_Node.h"
@@ -29,11 +29,10 @@
* @brief FilterNode
* @ingroup Node
*/
-class FilterNode : public Node
-{
+class FilterNode : public Node {
public:
FilterNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
-#endif // COM_FILTERNODE_H
+#endif // _COM_FilterNode_h_
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
index ed5f2b51ce3..dd5f70f6579 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_HueSaturationValueCorrectNode_h
-#define _COM_HueSaturationValueCorrectNode_h
+#ifndef _COM_HueSaturationValueCorrectNode_h_
+#define _COM_HueSaturationValueCorrectNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.h b/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
index 92c18019196..47b89a35269 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_HueSaturationValueNode_h
-#define _COM_HueSaturationValueNode_h
+#ifndef _COM_HueSaturationValueNode_h_
+#define _COM_HueSaturationValueNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ImageNode.h b/source/blender/compositor/nodes/COM_ImageNode.h
index 384dd6c09ff..49006efbed5 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.h
+++ b/source/blender/compositor/nodes/COM_ImageNode.h
@@ -34,7 +34,6 @@ extern "C" {
* @ingroup Node
*/
class ImageNode : public Node {
-
private:
NodeOperation *doMultilayerCheck(ExecutionSystem *system, RenderLayer *rl, Image *image, ImageUser *user, int framenumber, int outputsocketIndex, int pass, DataType datatype);
public:
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp
index 50c1903982e..cc6fc6e1236 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.cpp
+++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp
@@ -34,13 +34,15 @@
#include "COM_CombineChannelsOperation.h"
#include "COM_ConvertRGBToYCCOperation.h"
#include "COM_ConvertYCCToRGBOperation.h"
-#include "COM_GaussianBokehBlurOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_DilateErodeOperation.h"
#include "COM_SetAlphaOperation.h"
+#include "COM_GaussianAlphaXBlurOperation.h"
+#include "COM_GaussianAlphaYBlurOperation.h"
+
KeyingNode::KeyingNode(bNode *editorNode) : Node(editorNode)
{
/* pass */
@@ -67,13 +69,21 @@ OutputSocket *KeyingNode::setupPreBlur(ExecutionSystem *graph, InputSocket *inpu
addLink(graph, separateOperation->getOutputSocket(0), combineOperation->getInputSocket(channel));
}
else {
- KeyingBlurOperation *blurOperation = new KeyingBlurOperation();
+ KeyingBlurOperation *blurXOperation = new KeyingBlurOperation();
+ KeyingBlurOperation *blurYOperation = new KeyingBlurOperation();
+
+ blurXOperation->setSize(size);
+ blurXOperation->setAxis(KeyingBlurOperation::BLUR_AXIS_X);
+
+ blurYOperation->setSize(size);
+ blurYOperation->setAxis(KeyingBlurOperation::BLUR_AXIS_Y);
- blurOperation->setSize(size);
+ addLink(graph, separateOperation->getOutputSocket(), blurXOperation->getInputSocket(0));
+ addLink(graph, blurXOperation->getOutputSocket(), blurYOperation->getInputSocket(0));
+ addLink(graph, blurYOperation->getOutputSocket(0), combineOperation->getInputSocket(channel));
- addLink(graph, separateOperation->getOutputSocket(0), blurOperation->getInputSocket(0));
- addLink(graph, blurOperation->getOutputSocket(0), combineOperation->getInputSocket(channel));
- graph->addOperation(blurOperation);
+ graph->addOperation(blurXOperation);
+ graph->addOperation(blurYOperation);
}
}
@@ -87,30 +97,37 @@ OutputSocket *KeyingNode::setupPreBlur(ExecutionSystem *graph, InputSocket *inpu
return convertYCCToRGBOperation->getOutputSocket(0);
}
-OutputSocket *KeyingNode::setupPostBlur(ExecutionSystem *graph, OutputSocket *postBLurInput, int size)
+OutputSocket *KeyingNode::setupPostBlur(ExecutionSystem *graph, OutputSocket *postBlurInput, int size)
{
- KeyingBlurOperation *blurOperation = new KeyingBlurOperation();
+ KeyingBlurOperation *blurXOperation = new KeyingBlurOperation();
+ KeyingBlurOperation *blurYOperation = new KeyingBlurOperation();
- blurOperation->setSize(size);
+ blurXOperation->setSize(size);
+ blurXOperation->setAxis(KeyingBlurOperation::BLUR_AXIS_X);
- addLink(graph, postBLurInput, blurOperation->getInputSocket(0));
+ blurYOperation->setSize(size);
+ blurYOperation->setAxis(KeyingBlurOperation::BLUR_AXIS_Y);
- graph->addOperation(blurOperation);
+ addLink(graph, postBlurInput, blurXOperation->getInputSocket(0));
+ addLink(graph, blurXOperation->getOutputSocket(), blurYOperation->getInputSocket(0));
- return blurOperation->getOutputSocket();
+ graph->addOperation(blurXOperation);
+ graph->addOperation(blurYOperation);
+
+ return blurYOperation->getOutputSocket();
}
OutputSocket *KeyingNode::setupDilateErode(ExecutionSystem *graph, OutputSocket *dilateErodeInput, int distance)
{
- DilateStepOperation *dilateErodeOperation;
+ DilateDistanceOperation *dilateErodeOperation;
if (distance > 0) {
- dilateErodeOperation = new DilateStepOperation();
- dilateErodeOperation->setIterations(distance);
+ dilateErodeOperation = new DilateDistanceOperation();
+ dilateErodeOperation->setDistance(distance);
}
else {
- dilateErodeOperation = new ErodeStepOperation();
- dilateErodeOperation->setIterations(-distance);
+ dilateErodeOperation = new ErodeDistanceOperation();
+ dilateErodeOperation->setDistance(-distance);
}
addLink(graph, dilateErodeInput, dilateErodeOperation->getInputSocket(0));
@@ -120,6 +137,46 @@ OutputSocket *KeyingNode::setupDilateErode(ExecutionSystem *graph, OutputSocket
return dilateErodeOperation->getOutputSocket(0);
}
+OutputSocket *KeyingNode::setupFeather(ExecutionSystem *graph, CompositorContext *context,
+ OutputSocket *featherInput, int falloff, int distance)
+{
+ /* this uses a modified gaussian blur function otherwise its far too slow */
+ CompositorQuality quality = context->getQuality();
+
+ /* initialize node data */
+ NodeBlurData *data = (NodeBlurData *)&this->m_alpha_blur;
+ memset(data, 0, sizeof(*data));
+ data->filtertype = R_FILTER_GAUSS;
+
+ if (distance > 0) {
+ data->sizex = data->sizey = distance;
+ }
+ else {
+ data->sizex = data->sizey = -distance;
+ }
+
+ GaussianAlphaXBlurOperation *operationx = new GaussianAlphaXBlurOperation();
+ operationx->setData(data);
+ operationx->setQuality(quality);
+ operationx->setSize(1.0f);
+ operationx->setSubtract(distance < 0);
+ operationx->setFalloff(falloff);
+ graph->addOperation(operationx);
+
+ GaussianAlphaYBlurOperation *operationy = new GaussianAlphaYBlurOperation();
+ operationy->setData(data);
+ operationy->setQuality(quality);
+ operationy->setSize(1.0f);
+ operationy->setSubtract(distance < 0);
+ operationy->setFalloff(falloff);
+ graph->addOperation(operationy);
+
+ addLink(graph, featherInput, operationx->getInputSocket(0));
+ addLink(graph, operationx->getOutputSocket(), operationy->getInputSocket(0));
+
+ return operationy->getOutputSocket();
+}
+
OutputSocket *KeyingNode::setupDespill(ExecutionSystem *graph, OutputSocket *despillInput, OutputSocket *inputScreen, float factor)
{
KeyingDespillOperation *despillOperation = new KeyingDespillOperation();
@@ -162,7 +219,7 @@ void KeyingNode::convertToOperations(ExecutionSystem *graph, CompositorContext *
OutputSocket *outputImage = this->getOutputSocket(0);
OutputSocket *outputMatte = this->getOutputSocket(1);
OutputSocket *outputEdges = this->getOutputSocket(2);
- OutputSocket *postprocessedMatte, *postprocessedImage, *originalImage, *edgesMatte;
+ OutputSocket *postprocessedMatte = NULL, *postprocessedImage = NULL, *originalImage = NULL, *edgesMatte = NULL;
bNode *editorNode = this->getbNode();
NodeKeyingData *keying_data = (NodeKeyingData *) editorNode->storage;
@@ -196,9 +253,11 @@ void KeyingNode::convertToOperations(ExecutionSystem *graph, CompositorContext *
keying_data->clip_black, keying_data->clip_white, false);
}
- edgesMatte = setupClip(graph, postprocessedMatte,
- keying_data->edge_kernel_radius, keying_data->edge_kernel_tolerance,
- keying_data->clip_black, keying_data->clip_white, true);
+ if (outputEdges->isConnected()) {
+ edgesMatte = setupClip(graph, postprocessedMatte,
+ keying_data->edge_kernel_radius, keying_data->edge_kernel_tolerance,
+ keying_data->clip_black, keying_data->clip_white, true);
+ }
/* apply blur on matte if needed */
if (keying_data->blur_post)
@@ -209,6 +268,12 @@ void KeyingNode::convertToOperations(ExecutionSystem *graph, CompositorContext *
postprocessedMatte = setupDilateErode(graph, postprocessedMatte, keying_data->dilate_distance);
}
+ /* matte feather */
+ if (keying_data->feather_distance != 0) {
+ postprocessedMatte = setupFeather(graph, context, postprocessedMatte, keying_data->feather_falloff,
+ keying_data->feather_distance);
+ }
+
/* set alpha channel to output image */
SetAlphaOperation *alphaOperation = new SetAlphaOperation();
addLink(graph, originalImage, alphaOperation->getInputSocket(0));
@@ -226,7 +291,9 @@ void KeyingNode::convertToOperations(ExecutionSystem *graph, CompositorContext *
/* connect result to output sockets */
outputImage->relinkConnections(postprocessedImage);
outputMatte->relinkConnections(postprocessedMatte);
- outputEdges->relinkConnections(edgesMatte);
+
+ if (edgesMatte)
+ outputEdges->relinkConnections(edgesMatte);
graph->addOperation(alphaOperation);
}
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.h b/source/blender/compositor/nodes/COM_KeyingNode.h
index cc1d447c66e..294a27bb52c 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.h
+++ b/source/blender/compositor/nodes/COM_KeyingNode.h
@@ -24,14 +24,18 @@
#include "COM_Node.h"
/**
- * @brief KeyingNode
- * @ingroup Node
- */
+ * @brief KeyingNode
+ * @ingroup Node
+ */
class KeyingNode : public Node {
protected:
+ NodeBlurData m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesnt have this */
+
OutputSocket *setupPreBlur(ExecutionSystem *graph, InputSocket *inputImage, int size, OutputSocket **originalImage);
- OutputSocket *setupPostBlur(ExecutionSystem *graph, OutputSocket *postBLurInput, int size);
+ OutputSocket *setupPostBlur(ExecutionSystem *graph, OutputSocket *postBlurInput, int size);
OutputSocket *setupDilateErode(ExecutionSystem *graph, OutputSocket *dilateErodeInput, int distance);
+ OutputSocket *setupFeather(ExecutionSystem *graph, CompositorContext *context, OutputSocket *featherInput,
+ int falloff, int distance);
OutputSocket *setupDespill(ExecutionSystem *graph, OutputSocket *despillInput, OutputSocket *inputSrceen, float factor);
OutputSocket *setupClip(ExecutionSystem *graph, OutputSocket *clipInput, int kernelRadius, float kernelTolerance,
float clipBlack, float clipWhite, bool edgeMatte);
diff --git a/source/blender/compositor/nodes/COM_KeyingScreenNode.h b/source/blender/compositor/nodes/COM_KeyingScreenNode.h
index 7c87219ef6e..9b8ac88bb6e 100644
--- a/source/blender/compositor/nodes/COM_KeyingScreenNode.h
+++ b/source/blender/compositor/nodes/COM_KeyingScreenNode.h
@@ -25,9 +25,9 @@
#include "DNA_node_types.h"
/**
- * @brief KeyingScreenNode
- * @ingroup Node
- */
+ * @brief KeyingScreenNode
+ * @ingroup Node
+ */
class KeyingScreenNode : public Node {
public:
KeyingScreenNode(bNode *editorNode);
diff --git a/source/blender/compositor/nodes/COM_LuminanceMatteNode.h b/source/blender/compositor/nodes/COM_LuminanceMatteNode.h
index c699a0d1168..37f3c31113f 100644
--- a/source/blender/compositor/nodes/COM_LuminanceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_LuminanceMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef COM_LuminanceMatteNODE_H
-#define COM_LuminanceMatteNODE_H
+#ifndef _COM_LuminanceMatteNode_h_
+#define _COM_LuminanceMatteNode_h_
#include "COM_Node.h"
@@ -28,11 +28,10 @@
* @brief LuminanceMatteNode
* @ingroup Node
*/
-class LuminanceMatteNode : public Node
-{
+class LuminanceMatteNode : public Node {
public:
LuminanceMatteNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
-#endif // COM_LuminanceMatteNODE_H
+#endif // _COM_LuminanceMatteNode_h_
diff --git a/source/blender/compositor/nodes/COM_MapUVNode.h b/source/blender/compositor/nodes/COM_MapUVNode.h
index a1df790f192..2e5616e0bd0 100644
--- a/source/blender/compositor/nodes/COM_MapUVNode.h
+++ b/source/blender/compositor/nodes/COM_MapUVNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_MapUVNode_h
-#define _COM_MapUVNode_h
+#ifndef _COM_MapUVNode_h_
+#define _COM_MapUVNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_MapValueNode.h b/source/blender/compositor/nodes/COM_MapValueNode.h
index c7a842dff95..22aa5459ec0 100644
--- a/source/blender/compositor/nodes/COM_MapValueNode.h
+++ b/source/blender/compositor/nodes/COM_MapValueNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_MapValueNode_h
-#define _COM_MapValueNode_h
+#ifndef _COM_MapValueNode_h_
+#define _COM_MapValueNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
@@ -34,4 +34,5 @@ public:
MapValueNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
-#endif
+
+#endif // _COM_MapValueNode_h_
diff --git a/source/blender/compositor/nodes/COM_MaskNode.h b/source/blender/compositor/nodes/COM_MaskNode.h
index 8a9bc50eac7..cdd5d3c362e 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.h
+++ b/source/blender/compositor/nodes/COM_MaskNode.h
@@ -21,6 +21,9 @@
* Sergey Sharybin
*/
+#ifndef _COM_MaskNode_h_
+#define _COM_MaskNode_h_
+
#include "COM_Node.h"
#include "DNA_node_types.h"
@@ -29,10 +32,10 @@
* @ingroup Node
*/
class MaskNode : public Node {
-
-
public:
MaskNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
+
+#endif // _COM_MaskNode_h_
diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp
index 6e9b49253e7..300c9967cc4 100644
--- a/source/blender/compositor/nodes/COM_MathNode.cpp
+++ b/source/blender/compositor/nodes/COM_MathNode.cpp
@@ -28,8 +28,7 @@ void MathNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co
{
MathBaseOperation *operation = NULL;
- switch (this->getbNode()->custom1)
- {
+ switch (this->getbNode()->custom1) {
case 0: /* Add */
operation = new MathAddOperation();
break;
diff --git a/source/blender/compositor/nodes/COM_MathNode.h b/source/blender/compositor/nodes/COM_MathNode.h
index 16d65843b0d..4f8e64754e7 100644
--- a/source/blender/compositor/nodes/COM_MathNode.h
+++ b/source/blender/compositor/nodes/COM_MathNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_MathNode_h
-#define _COM_MathNode_h
+#ifndef _COM_MathNode_h_
+#define _COM_MathNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_MixNode.h b/source/blender/compositor/nodes/COM_MixNode.h
index 99e8b4d48f0..76076d01427 100644
--- a/source/blender/compositor/nodes/COM_MixNode.h
+++ b/source/blender/compositor/nodes/COM_MixNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_MixNode_h
-#define _COM_MixNode_h
+#ifndef _COM_MixNode_h_
+#define _COM_MixNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.h b/source/blender/compositor/nodes/COM_MovieClipNode.h
index d70881a6725..52ea11ea8e9 100644
--- a/source/blender/compositor/nodes/COM_MovieClipNode.h
+++ b/source/blender/compositor/nodes/COM_MovieClipNode.h
@@ -20,6 +20,9 @@
* Monique Dewanchand
*/
+#ifndef _COM_MovieClipNode_h_
+#define _COM_MovieClipNode_h_
+
#include "COM_Node.h"
#include "DNA_node_types.h"
@@ -28,10 +31,9 @@
* @ingroup Node
*/
class MovieClipNode : public Node {
-
-
public:
MovieClipNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
-
};
+
+#endif // _COM_MovieClipNode_h_
diff --git a/source/blender/compositor/nodes/COM_NormalNode.h b/source/blender/compositor/nodes/COM_NormalNode.h
index bf684298e65..660d90040bd 100644
--- a/source/blender/compositor/nodes/COM_NormalNode.h
+++ b/source/blender/compositor/nodes/COM_NormalNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef COM_NORMALNODE_H
-#define COM_NORMALNODE_H
+#ifndef _COM_NormalNode_h_
+#define _COM_NormalNode_h_
#include "COM_Node.h"
@@ -29,8 +29,7 @@
* @brief NormalNode
* @ingroup Node
*/
-class NormalNode : public Node
-{
+class NormalNode : public Node {
public:
NormalNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.h b/source/blender/compositor/nodes/COM_OutputFileNode.h
index 79c9b577643..e3194436f7f 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.h
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.h
@@ -21,8 +21,8 @@
* Lukas Tönne
*/
-#ifndef _COM_OutputFileNode_h
-#define _COM_OutputFileNode_h
+#ifndef _COM_OutputFileNode_h_
+#define _COM_OutputFileNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_SeparateHSVANode.h b/source/blender/compositor/nodes/COM_SeparateHSVANode.h
index 4a7e86849dc..6199237ebda 100644
--- a/source/blender/compositor/nodes/COM_SeparateHSVANode.h
+++ b/source/blender/compositor/nodes/COM_SeparateHSVANode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SeparateHSVANode_h
-#define _COM_SeparateHSVANode_h
+#ifndef _COM_SeparateHSVANode_h_
+#define _COM_SeparateHSVANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_SeparateRGBANode.h b/source/blender/compositor/nodes/COM_SeparateRGBANode.h
index c1be02753da..35321304d99 100644
--- a/source/blender/compositor/nodes/COM_SeparateRGBANode.h
+++ b/source/blender/compositor/nodes/COM_SeparateRGBANode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SeparateRGBANode_h
-#define _COM_SeparateRGBANode_h
+#ifndef _COM_SeparateRGBANode_h_
+#define _COM_SeparateRGBANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_SeparateYCCANode.h b/source/blender/compositor/nodes/COM_SeparateYCCANode.h
index 4b216841e2a..542e1693932 100644
--- a/source/blender/compositor/nodes/COM_SeparateYCCANode.h
+++ b/source/blender/compositor/nodes/COM_SeparateYCCANode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_SeparateYCCANode_h
-#define _COM_SeparateYCCANode_h
+#ifndef _COM_SeparateYCCANode_h_
+#define _COM_SeparateYCCANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_SeparateYUVANode.h b/source/blender/compositor/nodes/COM_SeparateYUVANode.h
index e1763e37dff..e51c0ce4fa6 100644
--- a/source/blender/compositor/nodes/COM_SeparateYUVANode.h
+++ b/source/blender/compositor/nodes/COM_SeparateYUVANode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_SeparateYUVANode_h
-#define _COM_SeparateYUVANode_h
+#ifndef _COM_SeparateYUVANode_h_
+#define _COM_SeparateYUVANode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_SetAlphaNode.h b/source/blender/compositor/nodes/COM_SetAlphaNode.h
index 0707cf5dac1..e82fa210a89 100644
--- a/source/blender/compositor/nodes/COM_SetAlphaNode.h
+++ b/source/blender/compositor/nodes/COM_SetAlphaNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SetAlphaNode_h
-#define _COM_SetAlphaNode_h
+#ifndef _COM_SetAlphaNode_h_
+#define _COM_SetAlphaNode_h_
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_SplitViewerNode.h b/source/blender/compositor/nodes/COM_SplitViewerNode.h
index 6c532d4e813..f17cfd57cbf 100644
--- a/source/blender/compositor/nodes/COM_SplitViewerNode.h
+++ b/source/blender/compositor/nodes/COM_SplitViewerNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SplitViewerNode_h
-#define _COM_SplitViewerNode_h
+#ifndef _COM_SplitViewerNode_h_
+#define _COM_SplitViewerNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.h b/source/blender/compositor/nodes/COM_Stabilize2dNode.h
index 589e090b48c..3363ff4142c 100644
--- a/source/blender/compositor/nodes/COM_Stabilize2dNode.h
+++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.h
@@ -20,6 +20,9 @@
* Monique Dewanchand
*/
+#ifndef _COM_Stabilize2dNode_h_
+#define _COM_Stabilize2dNode_h_
+
#include "COM_Node.h"
#include "DNA_node_types.h"
@@ -32,3 +35,5 @@ public:
Stabilize2dNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
+
+#endif
diff --git a/source/blender/compositor/nodes/COM_SwitchNode.h b/source/blender/compositor/nodes/COM_SwitchNode.h
index be3d54c3000..16d9e18885b 100644
--- a/source/blender/compositor/nodes/COM_SwitchNode.h
+++ b/source/blender/compositor/nodes/COM_SwitchNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SwitchNode_h
-#define _COM_SwitchNode_h
+#ifndef _COM_SwitchNode_h_
+#define _COM_SwitchNode_h_
#include "COM_Node.h"
#include "COM_NodeOperation.h"
diff --git a/source/blender/compositor/nodes/COM_TransformNode.h b/source/blender/compositor/nodes/COM_TransformNode.h
index da40b655f29..57a7a0229ec 100644
--- a/source/blender/compositor/nodes/COM_TransformNode.h
+++ b/source/blender/compositor/nodes/COM_TransformNode.h
@@ -20,6 +20,9 @@
* Monique Dewanchand
*/
+#ifndef _COM_TransformNode_h_
+#define _COM_TransformNode_h_
+
#include "COM_Node.h"
#include "DNA_node_types.h"
@@ -32,3 +35,5 @@ public:
TransformNode(bNode *editorNode);
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
};
+
+#endif // _COM_TransformNode_h_
diff --git a/source/blender/compositor/nodes/COM_ViewerNode.h b/source/blender/compositor/nodes/COM_ViewerNode.h
index e1f1226f1f1..3a9954b8aea 100644
--- a/source/blender/compositor/nodes/COM_ViewerNode.h
+++ b/source/blender/compositor/nodes/COM_ViewerNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ViewerNode_h
-#define _COM_ViewerNode_h
+#ifndef _COM_ViewerNode_h_
+#define _COM_ViewerNode_h_
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.h b/source/blender/compositor/nodes/COM_ZCombineNode.h
index a2ceedfc2cd..61f4037be90 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.h
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ZCombineNode_h
-#define _COM_ZCombineNode_h
+#ifndef _COM_ZCombineNode_h_
+#define _COM_ZCombineNode_h_
#include "COM_Node.h"
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..e56fb9151f2 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
@@ -24,7 +24,7 @@
AlphaOverMixedOperation::AlphaOverMixedOperation() : MixBaseOperation()
{
- this->x = 0.0f;
+ this->m_x = 0.0f;
}
void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -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);
@@ -44,7 +44,7 @@ void AlphaOverMixedOperation::executePixel(float outputValue[4], float x, float
copy_v4_v4(outputValue, inputOverColor);
}
else {
- float addfac = 1.0f - this->x + inputOverColor[3] * this->x;
+ float addfac = 1.0f - this->m_x + inputOverColor[3] * this->m_x;
float premul = value[0] * addfac;
float mul = 1.0f - value[0] * inputOverColor[3];
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
index 2807b3b489a..24a991da17b 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_AlphaOverMixedOperation_h
-#define _COM_AlphaOverMixedOperation_h
+#ifndef _COM_AlphaOverMixedOperation_h_
+#define _COM_AlphaOverMixedOperation_h_
#include "COM_MixBaseOperation.h"
@@ -31,7 +31,7 @@
*/
class AlphaOverMixedOperation : public MixBaseOperation {
private:
- float x;
+ float m_x;
public:
/**
* Default constructor
@@ -43,6 +43,6 @@ public:
*/
void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
- void setX(float x) { this->x = x; }
+ void setX(float x) { this->m_x = x; }
};
#endif
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..696c0748d69 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -27,37 +27,38 @@ extern "C" {
#include "RE_pipeline.h"
}
-BlurBaseOperation::BlurBaseOperation(DataType data_type=COM_DT_COLOR) : NodeOperation()
+BlurBaseOperation::BlurBaseOperation(DataType data_type) : NodeOperation()
{
+ /* data_type is almost always COM_DT_COLOR except for alpha-blur */
this->addInputSocket(data_type);
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 +78,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 +132,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..5bc13736dda 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 */ /* UNUSED */ /* TODO ? */
+ 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..7f41a79b7f4 100644
--- a/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
@@ -26,27 +26,26 @@ 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)
{
- switch (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 +55,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 +66,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..78b7a7af60d 100644
--- a/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
@@ -26,27 +26,26 @@ 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)
{
- switch (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 +53,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..e5a145bab2e 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -781,10 +781,10 @@ static void do_allEdgeDetection(unsigned int t, unsigned int rw, unsigned int *l
if (!limask[a]) { // if the inner mask is empty
if (lomask[a]) { // if the outer mask is full
/*
- Next we test all 4 directions around the current pixel: next/prev/up/down
- The test ensures that the outer mask is empty and that the inner mask
- is also empty. If both conditions are true for any one of the 4 adjacent pixels
- then the current pixel is counted as being a true outer edge pixel.
+ * Next we test all 4 directions around the current pixel: next/prev/up/down
+ * The test ensures that the outer mask is empty and that the inner mask
+ * is also empty. If both conditions are true for any one of the 4 adjacent pixels
+ * then the current pixel is counted as being a true outer edge pixel.
*/
if ((!lomask[pix_nextCol] && !limask[pix_nextCol]) ||
(!lomask[pix_prevCol] && !limask[pix_prevCol]) ||
@@ -843,10 +843,10 @@ static void do_adjacentEdgeDetection(unsigned int t, unsigned int rw, unsigned i
if (!limask[a]) { // if the inner mask is empty
if (lomask[a]) { // if the outer mask is full
/*
- Next we test all 4 directions around the current pixel: next/prev/up/down
- The test ensures that the outer mask is empty and that the inner mask
- is also empty. If both conditions are true for any one of the 4 adjacent pixels
- then the current pixel is counted as being a true outer edge pixel.
+ * Next we test all 4 directions around the current pixel: next/prev/up/down
+ * The test ensures that the outer mask is empty and that the inner mask
+ * is also empty. If both conditions are true for any one of the 4 adjacent pixels
+ * then the current pixel is counted as being a true outer edge pixel.
*/
if ((!lomask[pix_nextCol] && !limask[pix_nextCol]) ||
(!lomask[pix_prevCol] && !limask[pix_prevCol]) ||
@@ -902,65 +902,65 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
unsigned int outerAccum = 0; // for looping outer edge pixel indexes, represents current position from offset
unsigned int gradientAccum = 0; // for looping gradient pixel indexes, represents current position from offset
/*
- Here we compute the size of buffer needed to hold (row,col) coordinates
- for each pixel previously determined to be either gradient, inner edge,
- or outer edge.
-
- Allocation is done by requesting 4 bytes "sizeof(int)" per pixel, even
- though gbuf[] is declared as unsigned short* (2 bytes) because we don't
- store the pixel indexes, we only store x,y location of pixel in buffer.
-
- This does make the assumption that x and y can fit in 16 unsigned bits
- so if Blender starts doing renders greater than 65536 in either direction
- this will need to allocate gbuf[] as unsigned int *and allocate 8 bytes
- per flagged pixel.
-
- In general, the buffer on-screen:
-
- Example: 9 by 9 pixel block
-
- . = pixel non-white in both outer and inner mask
- o = pixel white in outer, but not inner mask, adjacent to "." pixel
- g = pixel white in outer, but not inner mask, not adjacent to "." pixel
- i = pixel white in inner mask, adjacent to "g" or "." pixel
- F = pixel white in inner mask, only adjacent to other pixels white in the inner mask
-
-
- ......... <----- pixel #80
- ..oooo...
- .oggggo..
- .oggiggo.
- .ogiFigo.
- .oggiggo.
- .oggggo..
- ..oooo...
- pixel #00 -----> .........
-
- gsz = 18 (18 "g" pixels above)
- isz = 4 (4 "i" pixels above)
- osz = 18 (18 "o" pixels above)
-
-
- The memory in gbuf[] after filling will look like this:
-
- gradientFillOffset (0 pixels) innerEdgeOffset (18 pixels) outerEdgeOffset (22 pixels)
- / / /
- / / /
- |X Y X Y X Y X Y > <X Y X Y > <X Y X Y X Y > <X Y X Y | <- (x,y)
- +--------------------------------> <----------------> <------------------------> <----------------+
- |0 2 4 6 8 10 12 14 > ... <68 70 72 74 > ... <80 82 84 86 88 90 > ... <152 154 156 158 | <- bytes
- +--------------------------------> <----------------> <------------------------> <----------------+
- |g0 g0 g1 g1 g2 g2 g3 g3 > <g17 g17 i0 i0 > <i2 i2 i3 i3 o0 o0 > <o16 o16 o17 o17 | <- pixel
- / / /
- / / /
- / / /
- +---------- gradientAccum (18) ---------+ +--- innerAccum (22) ---+ +--- outerAccum (40) ---+
-
-
- Ultimately we do need the pixel's memory buffer index to set the output
- pixel color, but it's faster to reconstruct the memory buffer location
- each iteration of the final gradient calculation than it is to deconstruct
- a memory location into x,y pairs each round.
+ * Here we compute the size of buffer needed to hold (row,col) coordinates
+ * for each pixel previously determined to be either gradient, inner edge,
+ * or outer edge.
+ *
+ * Allocation is done by requesting 4 bytes "sizeof(int)" per pixel, even
+ * though gbuf[] is declared as unsigned short* (2 bytes) because we don't
+ * store the pixel indexes, we only store x,y location of pixel in buffer.
+ *
+ * This does make the assumption that x and y can fit in 16 unsigned bits
+ * so if Blender starts doing renders greater than 65536 in either direction
+ * this will need to allocate gbuf[] as unsigned int *and allocate 8 bytes
+ * per flagged pixel.
+ *
+ * In general, the buffer on-screen:
+ *
+ * Example: 9 by 9 pixel block
+ *
+ * . = pixel non-white in both outer and inner mask
+ * o = pixel white in outer, but not inner mask, adjacent to "." pixel
+ * g = pixel white in outer, but not inner mask, not adjacent to "." pixel
+ * i = pixel white in inner mask, adjacent to "g" or "." pixel
+ * F = pixel white in inner mask, only adjacent to other pixels white in the inner mask
+ *
+ *
+ * ......... <----- pixel #80
+ * ..oooo...
+ * .oggggo..
+ * .oggiggo.
+ * .ogiFigo.
+ * .oggiggo.
+ * .oggggo..
+ * ..oooo...
+ * pixel #00 -----> .........
+ *
+ * gsz = 18 (18 "g" pixels above)
+ * isz = 4 (4 "i" pixels above)
+ * osz = 18 (18 "o" pixels above)
+ *
+ *
+ * The memory in gbuf[] after filling will look like this:
+ *
+ * gradientFillOffset (0 pixels) innerEdgeOffset (18 pixels) outerEdgeOffset (22 pixels)
+ * / / /
+ * / / /
+ * |X Y X Y X Y X Y > <X Y X Y > <X Y X Y X Y > <X Y X Y | <- (x,y)
+ * +--------------------------------> <----------------> <------------------------> <----------------+
+ * |0 2 4 6 8 10 12 14 > ... <68 70 72 74 > ... <80 82 84 86 88 90 > ... <152 154 156 158 | <- bytes
+ * +--------------------------------> <----------------> <------------------------> <----------------+
+ * |g0 g0 g1 g1 g2 g2 g3 g3 > <g17 g17 i0 i0 > <i2 i2 i3 i3 o0 o0 > <o16 o16 o17 o17 | <- pixel
+ * / / /
+ * / / /
+ * / / /
+ * +---------- gradientAccum (18) ---------+ +--- innerAccum (22) ---+ +--- outerAccum (40) ---+
+ *
+ *
+ * Ultimately we do need the pixel's memory buffer index to set the output
+ * pixel color, but it's faster to reconstruct the memory buffer location
+ * each iteration of the final gradient calculation than it is to deconstruct
+ * a memory location into x,y pairs each round.
*/
@@ -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 954aef7b916..a138d4be1d9 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -30,16 +30,18 @@ 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)
{
- if (!this->sizeavailable) {
+ lockMutex();
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
+ unlockMutex();
return buffer;
}
@@ -47,37 +49,39 @@ void GaussianAlphaXBlurOperation::initExecution()
{
/* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */
- if (this->sizeavailable) {
- float rad = size * this->data->sizex;
+ initMutex();
+
+ 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);
}
}
@@ -88,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();
@@ -97,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);
@@ -118,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;
@@ -150,10 +154,12 @@ 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();
}
bool GaussianAlphaXBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -173,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 e1105cf94b1..ab5f8d33850 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -30,16 +30,18 @@ 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)
{
- if (!this->sizeavailable) {
+ lockMutex();
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
+ unlockMutex();
return buffer;
}
@@ -47,37 +49,39 @@ void GaussianAlphaYBlurOperation::initExecution()
{
/* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */
- if (this->sizeavailable) {
- float rad = size * this->data->sizey;
+ initMutex();
+
+ 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);
}
}
@@ -88,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);
@@ -118,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;
@@ -150,10 +154,12 @@ 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();
}
bool GaussianAlphaYBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -173,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 dc9e354b124..ac91d3336e2 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -29,15 +29,17 @@ extern "C" {
GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->gausstab = NULL;
+ this->m_gausstab = NULL;
}
void *GaussianBokehBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (!sizeavailable) {
+ lockMutex();
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
+ unlockMutex();
return buffer;
}
@@ -45,14 +47,16 @@ void GaussianBokehBlurOperation::initExecution()
{
BlurBaseOperation::initExecution();
- if (this->sizeavailable) {
+ initMutex();
+
+ 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;
@@ -62,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;
}
@@ -104,7 +108,7 @@ void GaussianBokehBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
}
else ddgauss[4] = 1.0f;
- gausstab = ddgauss;
+ this->m_gausstab = ddgauss;
}
}
@@ -122,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);
@@ -135,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;
@@ -152,8 +156,10 @@ 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();
}
bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -170,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 7a1964a4a63..d18dd17528d 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -29,17 +29,18 @@ 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)
{
- if (!this->sizeavailable) {
+ lockMutex();
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
+ unlockMutex();
return buffer;
}
@@ -47,27 +48,29 @@ void GaussianXBlurOperation::initExecution()
{
BlurBaseOperation::initExecution();
- if (this->sizeavailable) {
- float rad = size * this->data->sizex;
+ initMutex();
+
+ 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);
+ }
}
void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
@@ -82,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);
@@ -94,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;
@@ -106,8 +109,10 @@ 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();
}
bool GaussianXBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -124,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 06c1c78d85a..d2d30da8ddf 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -29,41 +29,47 @@ 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)
{
- if (!this->sizeavailable) {
+ lockMutex();
+ if (!this->m_sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
+ unlockMutex();
return buffer;
}
void GaussianYBlurOperation::initExecution()
{
- if (this->sizeavailable) {
- float rad = size * this->data->sizey;
+ BlurBaseOperation::initExecution();
+
+ initMutex();
+
+ 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);
}
}
@@ -77,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);
@@ -86,12 +92,12 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
maxy = min(maxy, inputBuffer->getRect()->ymax);
maxx = min(maxx, inputBuffer->getRect()->xmax);
- int step = getStep();
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;
}
@@ -101,8 +107,10 @@ 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();
}
bool GaussianYBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
@@ -119,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.cpp b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
index 694aa26bcde..cb4c27a4c80 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
@@ -120,8 +120,8 @@ static void FHT(fREAL *data, unsigned int M, unsigned int inverse)
}
//------------------------------------------------------------------------------
/* 2D Fast Hartley Transform, Mx/My -> log2 of width/height,
- nzp -> the row where zero pad data starts,
- inverse -> see above */
+ * nzp -> the row where zero pad data starts,
+ * inverse -> see above */
static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My,
unsigned int nzp, unsigned int inverse)
{
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 9c7a33c1327..3285bd32039 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
@@ -33,7 +33,8 @@ KeyingBlurOperation::KeyingBlurOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->size = 0.0f;
+ this->m_size = 0;
+ this->m_axis = BLUR_AXIS_X;
this->setComplex(true);
}
@@ -53,16 +54,28 @@ void KeyingBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer
int bufferWidth = inputBuffer->getWidth();
int bufferHeight = inputBuffer->getHeight();
- int i, j, count = 0;
+ int i, count = 0;
float average = 0.0f;
- for (i = -this->size + 1; i < this->size; i++) {
- for (j = -this->size + 1; j < this->size; j++) {
- int cx = x + j, cy = y + 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 && cy >= 0 && cy < bufferHeight) {
- int bufferIndex = (cy * bufferWidth + cx) * 4;
+ if (cx >= 0 && cx < bufferWidth) {
+ int bufferIndex = (y * bufferWidth + cx) * 4;
+
+ average += buffer[bufferIndex];
+ count++;
+ }
+ }
+ }
+ else {
+ for (i = -this->m_size + 1; i < this->m_size; i++) {
+ int cy = y + i;
+
+ if (cy >= 0 && cy < bufferHeight) {
+ int bufferIndex = (cy * bufferWidth + x) * 4;
average += buffer[bufferIndex];
count++;
@@ -79,10 +92,18 @@ bool KeyingBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuff
{
rcti newInput;
- newInput.xmin = 0;
- newInput.ymin = 0;
- newInput.xmax = this->getWidth();
- newInput.ymax = this->getHeight();
+ if (this->m_axis == BLUR_AXIS_X) {
+ newInput.xmin = input->xmin - this->m_size;
+ newInput.ymin = input->ymin;
+ newInput.xmax = input->xmax + this->m_size;
+ newInput.ymax = input->ymax;
+ }
+ else {
+ newInput.xmin = input->xmin;
+ newInput.ymin = input->ymin - this->m_size;
+ newInput.xmax = input->xmax;
+ 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 2848f260cbd..6e08712bf39 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.h
@@ -31,12 +31,19 @@
*/
class KeyingBlurOperation : public NodeOperation {
protected:
- int size;
+ int m_size;
+ int m_axis;
public:
+ enum BlurAxis {
+ BLUR_AXIS_X = 0,
+ BLUR_AXIS_Y = 1
+ };
+
KeyingBlurOperation();
- void setSize(float value) {this->size = 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 2c9949f2b4b..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 = 0;
- newInput.ymin = 0;
- newInput.xmax = this->getWidth();
- newInput.ymax = this->getHeight();
+ 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..1a8e71a306b 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.h
@@ -27,27 +27,27 @@
#include "COM_NodeOperation.h"
/**
- * Class with implementation of black/white clipping for keying node
- */
+ * Class with implementation of black/white clipping for keying node
+ */
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..4fea9b578a1 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.h
@@ -27,13 +27,13 @@
#include "COM_NodeOperation.h"
/**
- * Class with implementation of keying despill node
- */
+ * Class with implementation of keying despill node
+ */
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 ae2913350f9..e92e5c84c2d 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -60,28 +60,28 @@ KeyingOperation::KeyingOperation() : NodeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->screenBalance = 0.5f;
+ this->m_screenBalance = 0.5f;
- this->pixelReader = NULL;
- this->screenReader = NULL;
- this->garbageReader = NULL;
- this->coreReader = NULL;
+ this->m_pixelReader = NULL;
+ this->m_screenReader = NULL;
+ this->m_garbageReader = NULL;
+ this->m_coreReader = NULL;
}
void KeyingOperation::initExecution()
{
- this->pixelReader = this->getInputSocketReader(0);
- this->screenReader = this->getInputSocketReader(1);
- this->garbageReader = this->getInputSocketReader(2);
- this->coreReader = this->getInputSocketReader(3);
+ this->m_pixelReader = this->getInputSocketReader(0);
+ this->m_screenReader = this->getInputSocketReader(1);
+ this->m_garbageReader = this->getInputSocketReader(2);
+ this->m_coreReader = this->getInputSocketReader(3);
}
void KeyingOperation::deinitExecution()
{
- this->pixelReader = NULL;
- this->screenReader = NULL;
- this->garbageReader = NULL;
- this->coreReader = NULL;
+ this->m_pixelReader = NULL;
+ this->m_screenReader = NULL;
+ this->m_garbageReader = NULL;
+ this->m_coreReader = NULL;
}
void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
@@ -91,10 +91,10 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
float garbageValue[4];
float coreValue[4];
- this->pixelReader->read(pixelColor, x, y, sampler, inputBuffers);
- this->screenReader->read(screenColor, x, y, sampler, inputBuffers);
- this->garbageReader->read(garbageValue, x, y, sampler, inputBuffers);
- this->coreReader->read(coreValue, x, y, sampler, inputBuffers);
+ this->m_pixelReader->read(pixelColor, x, y, sampler, inputBuffers);
+ this->m_screenReader->read(screenColor, x, y, sampler, inputBuffers);
+ this->m_garbageReader->read(garbageValue, x, y, sampler, inputBuffers);
+ this->m_coreReader->read(coreValue, x, y, sampler, inputBuffers);
int primary_channel = get_pixel_primary_channel(screenColor);
@@ -107,8 +107,8 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
color[0] = 1.0f;
}
else {
- float saturation = get_pixel_saturation(pixelColor, this->screenBalance, primary_channel);
- float screen_saturation = get_pixel_saturation(screenColor, this->screenBalance, primary_channel);
+ float saturation = get_pixel_saturation(pixelColor, this->m_screenBalance, primary_channel);
+ float screen_saturation = get_pixel_saturation(screenColor, this->m_screenBalance, primary_channel);
if (saturation < 0) {
/* means main channel of pixel is different from screen,
@@ -136,15 +136,3 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler
/* apply core matte */
color[0] = MAX2(color[0], coreValue[0]);
}
-
-bool KeyingOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
-{
- rcti newInput;
-
- newInput.xmin = 0;
- newInput.ymin = 0;
- newInput.xmax = this->getWidth();
- newInput.ymax = this->getHeight();
-
- return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
-}
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.h b/source/blender/compositor/operations/COM_KeyingOperation.h
index 8d0e7851ee5..736db54850a 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingOperation.h
@@ -32,16 +32,16 @@
#include "BLI_listbase.h"
/**
- * Class with implementation of keying node
- */
+ * Class with implementation of keying node
+ */
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,11 +49,9 @@ 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[]);
-
- bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
};
#endif
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
index 9f7b69636ab..53572162b9e 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);
@@ -65,9 +65,12 @@ void KeyingScreenOperation::deinitExecution()
if (triangulation->triangles)
MEM_freeN(triangulation->triangles);
- MEM_freeN(this->cachedTriangulation);
+ if (triangulation->triangles_AABB)
+ MEM_freeN(triangulation->triangles_AABB);
- this->cachedTriangulation = NULL;
+ MEM_freeN(this->m_cachedTriangulation);
+
+ this->m_cachedTriangulation = NULL;
}
}
@@ -75,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;
@@ -85,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;
@@ -98,13 +101,20 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
else
tracksbase = BKE_tracking_get_active_tracks(tracking);
- sites_total = BLI_countlist(tracksbase);
+ /* count sites */
+ for (track = (MovieTrackingTrack *) tracksbase->first, sites_total = 0; track; track = track->next) {
+ MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_frame);
+
+ if ((marker->flag & MARKER_DISABLED) == 0) {
+ sites_total++;
+ }
+ }
if (!sites_total)
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;
@@ -113,13 +123,19 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
sites = (VoronoiSite *) MEM_callocN(sizeof(VoronoiSite) * sites_total, "keyingscreen voronoi sites");
track = (MovieTrackingTrack *) tracksbase->first;
- i = 0;
- while (track) {
- VoronoiSite *site = &sites[i];
+ for (track = (MovieTrackingTrack *) tracksbase->first, i = 0; track; track = track->next, i++) {
MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_frame);
- ImBuf *pattern_ibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, marker, TRUE, FALSE);
+ VoronoiSite *site;
+ ImBuf *pattern_ibuf;
int j;
+ if (marker->flag & MARKER_DISABLED)
+ continue;
+
+ site = &sites[i];
+
+ pattern_ibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, marker, TRUE, FALSE);
+
zero_v3(site->color);
for (j = 0; j < pattern_ibuf->x * pattern_ibuf->y; j++) {
if (pattern_ibuf->rect_float) {
@@ -139,9 +155,6 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
site->co[0] = marker->pos[0] * width;
site->co[1] = marker->pos[1] * height;
-
- track = track->next;
- i++;
}
IMB_freeImBuf(ibuf);
@@ -155,24 +168,100 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
MEM_freeN(sites);
BLI_freelistN(&edges);
+ if (triangulation->triangles_total) {
+ rctf *rect;
+ rect = triangulation->triangles_AABB =
+ (rctf *) MEM_callocN(sizeof(rctf) * triangulation->triangles_total, "voronoi triangulation AABB");
+
+ for (i = 0; i < triangulation->triangles_total; i++, rect++) {
+ int *triangle = triangulation->triangles[i];
+ VoronoiTriangulationPoint *a = &triangulation->triangulated_points[triangle[0]],
+ *b = &triangulation->triangulated_points[triangle[1]],
+ *c = &triangulation->triangulated_points[triangle[2]];
+
+ float min[2], max[2];
+
+ INIT_MINMAX2(min, max);
+
+ DO_MINMAX2(a->co, min, max);
+ DO_MINMAX2(b->co, min, max);
+ DO_MINMAX2(c->co, min, max);
+
+ rect->xmin = min[0];
+ rect->ymin = min[1];
+
+ rect->xmax = max[0];
+ rect->ymax = max[1];
+ }
+ }
+
return triangulation;
}
void *KeyingScreenOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
- if (this->movieClip == NULL)
+ TileData *tile_data;
+ TriangulationData *triangulation;
+ int triangles_allocated = 0;
+ int chunk_size = 20;
+ int i;
+ rctf rect_float;
+
+ if (this->m_movieClip == NULL)
return NULL;
- if (this->cachedTriangulation)
- return this->cachedTriangulation;
+ if (!this->m_cachedTriangulation) {
+ lockMutex();
+ if (this->m_cachedTriangulation == NULL) {
+ this->m_cachedTriangulation = buildVoronoiTriangulation();
+ }
+ unlockMutex();
+ }
+
+ triangulation = this->m_cachedTriangulation;
+
+ if (!triangulation)
+ return NULL;
+
+ BLI_init_rctf(&rect_float, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
+
+ tile_data = (TileData *) MEM_callocN(sizeof(TileData), "keying screen tile data");
+
+ for (i = 0; i < triangulation->triangles_total; i++) {
+ bool ok = BLI_isect_rctf(&rect_float, &triangulation->triangles_AABB[i], NULL);
+
+ if (ok) {
+ tile_data->triangles_total++;
+
+ if (tile_data->triangles_total > triangles_allocated) {
+ if (!tile_data->triangles) {
+ tile_data->triangles = (int *) MEM_mallocN(sizeof(int) * chunk_size,
+ "keying screen tile triangles chunk");
+ }
+ else {
+ tile_data->triangles = (int *) MEM_reallocN(tile_data->triangles,
+ sizeof(int) * (triangles_allocated + chunk_size));
+ }
- lockMutex();
- if (this->cachedTriangulation == NULL) {
- this->cachedTriangulation = buildVoronoiTriangulation();
+ triangles_allocated += chunk_size;
+ }
+
+ tile_data->triangles[tile_data->triangles_total - 1] = i;
+ }
}
- unlockMutex();
- return this->cachedTriangulation;
+ return tile_data;
+}
+
+void KeyingScreenOperation::deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data)
+{
+ TileData *tile_data = (TileData *) data;
+
+ if (tile_data->triangles) {
+ MEM_freeN(tile_data->triangles);
+ }
+
+ MEM_freeN(tile_data);
}
void KeyingScreenOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
@@ -180,13 +269,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;
@@ -200,21 +289,29 @@ void KeyingScreenOperation::executePixel(float *color, int x, int y, MemoryBuffe
color[2] = 0.0f;
color[3] = 1.0f;
- if (this->movieClip && data) {
- TriangulationData *triangulation = (TriangulationData *) data;
+ if (this->m_movieClip && data) {
+ TriangulationData *triangulation = this->m_cachedTriangulation;
+ TileData *tile_data = (TileData *) data;
int i;
- for (i = 0; i < triangulation->triangles_total; i++) {
- int *triangle = triangulation->triangles[i];
- VoronoiTriangulationPoint *a = &triangulation->triangulated_points[triangle[0]],
- *b = &triangulation->triangulated_points[triangle[1]],
- *c = &triangulation->triangulated_points[triangle[2]];
- float co[2] = {(float) x, (float) y}, w[3];
-
- if (barycentric_coords_v2(a->co, b->co, c->co, co, w)) {
- if (barycentric_inside_triangle_v2(w)) {
- color[0] += a->color[0] * w[0] + b->color[0] * w[1] + c->color[0] * w[2];
- color[1] += a->color[1] * w[0] + b->color[1] * w[1] + c->color[1] * w[2];
- color[2] += a->color[2] * w[0] + b->color[2] * w[1] + c->color[2] * w[2];
+ float co[2] = {(float) x, (float) y};
+
+ for (i = 0; i < tile_data->triangles_total; i++) {
+ int triangle_idx = tile_data->triangles[i];
+ rctf *rect = &triangulation->triangles_AABB[triangle_idx];
+
+ if (IN_RANGE_INCL(x, rect->xmin, rect->xmax) && IN_RANGE_INCL(y, rect->ymin, rect->ymax)) {
+ int *triangle = triangulation->triangles[triangle_idx];
+ VoronoiTriangulationPoint *a = &triangulation->triangulated_points[triangle[0]],
+ *b = &triangulation->triangulated_points[triangle[1]],
+ *c = &triangulation->triangulated_points[triangle[2]];
+ float w[3];
+
+ if (barycentric_coords_v2(a->co, b->co, c->co, co, w)) {
+ if (barycentric_inside_triangle_v2(w)) {
+ color[0] += a->color[0] * w[0] + b->color[0] * w[1] + c->color[0] * w[2];
+ color[1] += a->color[1] * w[0] + b->color[1] * w[1] + c->color[1] * w[2];
+ color[2] += a->color[2] * w[0] + b->color[2] * w[1] + c->color[2] * w[2];
+ }
}
}
}
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.h b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
index 9d3f44f6be2..95815cd3930 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
@@ -39,39 +39,46 @@ 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 {
VoronoiTriangulationPoint *triangulated_points;
int (*triangles)[3];
int triangulated_points_total, triangles_total;
+ rctf *triangles_AABB;
} TriangulationData;
- MovieClip *movieClip;
- int framenumber;
- TriangulationData *cachedTriangulation;
- char trackingObject[64];
+ typedef struct TileData {
+ int *triangles;
+ int triangles_total;
+ } TileData;
+
+ 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();
void deinitExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
+ void deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data);
- 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 6d12141a455..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,8 @@ void NormalizeOperation::deinitExecution()
bool NormalizeOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
rcti imageInput;
-
+ if (this->m_cachedInstance) return false;
+
NodeOperation *operation = getInputOperation(0);
imageInput.xmax = operation->getWidth();
imageInput.xmin = 0;
@@ -77,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();
@@ -92,8 +93,12 @@ void *NormalizeOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBu
float value;
while (p--) {
value = bc[0];
- maxv = max(value, maxv);
- minv = min(value, minv);
+ if ((value > maxv) && (value <= BLENDER_ZMAX)) {
+ maxv = value;
+ }
+ if ((value < minv) && (value >= -BLENDER_ZMAX)) {
+ minv = value;
+ }
bc += 4;
}
@@ -101,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..087e7a15e39 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -94,66 +94,66 @@ 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;
}
-OutputOpenExrLayer::OutputOpenExrLayer(const char *name, DataType datatype)
+OutputOpenExrLayer::OutputOpenExrLayer(const char *name_, DataType datatype_)
{
- BLI_strncpy(this->name, name, sizeof(this->name));
- this->datatype = datatype;
+ BLI_strncpy(this->name, name_, sizeof(this->name));
+ this->datatype = datatype_;
/* these are created in initExecution */
this->outputBuffer = 0;
this->imageInput = 0;
@@ -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..74145c52a5d 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -30,19 +30,20 @@ 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->initMutex();
+ 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 +55,49 @@ 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->deinitMutex();
+ 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.xmin = input->xmin-7; //(0.25f*20*1)+2 == worse case dispersion
newInput.ymin = input->ymin;
newInput.ymax = input->ymax;
- newInput.xmax = inputProgram->getWidth();
+ newInput.xmax = input->xmax+7; //(0.25f*20*1)+2 == worse case dispersion
}
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
void ProjectorLensDistortionOperation::updateDispersion(MemoryBuffer **inputBuffers)
{
- if (!dispersionAvailable) {
+ if (this->m_dispersionAvailable) return;
+ this->lockMutex();
+ 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;
}
+ this->unlockMutex();
}
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.h
index 5023a5df507..c658d66429a 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,11 +57,11 @@ 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);
- void updateDispersion(MemoryBuffer** inputBuffers);
+ void updateDispersion(MemoryBuffer **inputBuffers);
};
#endif
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 2e23df73b67..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);
}
@@ -180,59 +180,59 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB
// Absolute fixed siez
ScaleFixedSizeOperation::ScaleFixedSizeOperation() : NodeOperation()
{
- this->addInputSocket(COM_DT_COLOR);
+ 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..7e4fda0f755 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,13 +62,13 @@ 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);
private:
void determineUV(float *result, float x, float y) const;
- void updateDispersionAndDistortion(MemoryBuffer** inputBuffers);
+ void updateDispersionAndDistortion(MemoryBuffer **inputBuffers);
};
#endif
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