diff options
author | Julian Eisel <julian@blender.org> | 2021-03-31 23:53:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-03-31 23:53:03 +0300 |
commit | c7904d2398fd4d43d15268c792aa15ea8ee538fe (patch) | |
tree | 484fd7f66ac59c82abd4aca18894f991b4935483 /source/blender/compositor/operations/COM_GlareGhostOperation.cc | |
parent | 91b87d8d7fb8aec62faf00e5e0c3619d2753a92e (diff) | |
parent | 1a100d2d78c75c9a6ac015606cc16698e7775682 (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.cc | 10 |
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 |