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:
authorJulian Eisel <julian@blender.org>2021-03-31 23:53:03 +0300
committerJulian Eisel <julian@blender.org>2021-03-31 23:53:03 +0300
commitc7904d2398fd4d43d15268c792aa15ea8ee538fe (patch)
tree484fd7f66ac59c82abd4aca18894f991b4935483 /source/blender/compositor/operations/COM_GlareGhostOperation.cc
parent91b87d8d7fb8aec62faf00e5e0c3619d2753a92e (diff)
parent1a100d2d78c75c9a6ac015606cc16698e7775682 (diff)
Merge branch 'master' into ui-asset-view-templateui-asset-view-template
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareGhostOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_GlareGhostOperation.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.cc b/source/blender/compositor/operations/COM_GlareGhostOperation.cc
index a4cd6dc60c1..22c8767632e 100644
--- a/source/blender/compositor/operations/COM_GlareGhostOperation.cc
+++ b/source/blender/compositor/operations/COM_GlareGhostOperation.cc
@@ -20,6 +20,8 @@
#include "BLI_math.h"
#include "COM_FastGaussianBlurOperation.h"
+namespace blender::compositor {
+
static float smoothMask(float x, float y)
{
float t;
@@ -123,7 +125,7 @@ void GlareGhostOperation::generateGlare(float *data, MemoryBuffer *inputTile, No
memset(tbuf1.getBuffer(),
0,
- tbuf1.getWidth() * tbuf1.getHeight() * COM_NUM_CHANNELS_COLOR * sizeof(float));
+ tbuf1.getWidth() * tbuf1.getHeight() * COM_DATA_TYPE_COLOR_CHANNELS * sizeof(float));
for (n = 1; n < settings->iter && (!breaked); n++) {
for (y = 0; y < gbuf.getHeight() && (!breaked); y++) {
v = ((float)y + 0.5f) / (float)gbuf.getHeight();
@@ -147,9 +149,11 @@ void GlareGhostOperation::generateGlare(float *data, MemoryBuffer *inputTile, No
}
memcpy(gbuf.getBuffer(),
tbuf1.getBuffer(),
- tbuf1.getWidth() * tbuf1.getHeight() * COM_NUM_CHANNELS_COLOR * sizeof(float));
+ tbuf1.getWidth() * tbuf1.getHeight() * COM_DATA_TYPE_COLOR_CHANNELS * sizeof(float));
}
memcpy(data,
gbuf.getBuffer(),
- gbuf.getWidth() * gbuf.getHeight() * COM_NUM_CHANNELS_COLOR * sizeof(float));
+ gbuf.getWidth() * gbuf.getHeight() * COM_DATA_TYPE_COLOR_CHANNELS * sizeof(float));
}
+
+} // namespace blender::compositor