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:
authorJeroen Bakker <jeroen@blender.org>2021-03-31 10:24:14 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-31 12:00:07 +0300
commite9616c82bd10a5444478d4b86fa4a8dea2041f09 (patch)
treee42bf8ef6212cb070576de6bf7d40d25e93411d6 /source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
parent645fc0c7679423667eb25a77bbd8fb2626d71080 (diff)
Cleanup: use constexpr for num channels.
Don't assume all compilers are smart. MSVC doesn't inline the call away like CLANG and GCC did.
Diffstat (limited to 'source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
index f61074a44d9..19cd5a53084 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc
@@ -137,14 +137,14 @@ void VariableSizeBokehBlurOperation::executePixel(float output[4], int x, int y,
const int addXStepValue = QualityStepHelper::getStep();
const int addYStepValue = addXStepValue;
- const int addXStepColor = addXStepValue * COM_data_type_num_channels(DataType::Color);
+ const int addXStepColor = addXStepValue * COM_DATA_TYPE_COLOR_CHANNELS;
if (size_center > this->m_threshold) {
for (int ny = miny; ny < maxy; ny += addYStepValue) {
float dy = ny - y;
int offsetValueNy = ny * inputSizeBuffer->getWidth();
int offsetValueNxNy = offsetValueNy + (minx);
- int offsetColorNxNy = offsetValueNxNy * COM_data_type_num_channels(DataType::Color);
+ int offsetColorNxNy = offsetValueNxNy * COM_DATA_TYPE_COLOR_CHANNELS;
for (int nx = minx; nx < maxx; nx += addXStepValue) {
if (nx != x || ny != y) {
float size = MIN2(inputSizeFloatBuffer[offsetValueNxNy] * scalar, size_center);