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-30 15:12:41 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-30 17:03:43 +0300
commit88e0ed32888f4a87ec1192e3b54aebe8686e029c (patch)
tree2659678f6a9adfd6605c7fb17b219b9166364ade /source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc
parentb48a573adb1e8ba254c5b3ea58bf1bb2a013ce89 (diff)
Cleanup: Use constexpr.
Diffstat (limited to 'source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc
index 6f2ac73d251..cd6bb3952bf 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cc
@@ -90,18 +90,18 @@ void *FastGaussianBlurOperation::initializeTileData(rcti *rect)
this->m_sy = this->m_data.sizey * this->m_size / 2.0f;
if ((this->m_sx == this->m_sy) && (this->m_sx > 0.0f)) {
- for (c = 0; c < COM_NUM_CHANNELS_COLOR; c++) {
+ for (c = 0; c < COM_data_type_num_channels(DataType::Color); c++) {
IIR_gauss(copy, this->m_sx, c, 3);
}
}
else {
if (this->m_sx > 0.0f) {
- for (c = 0; c < COM_NUM_CHANNELS_COLOR; c++) {
+ for (c = 0; c < COM_data_type_num_channels(DataType::Color); c++) {
IIR_gauss(copy, this->m_sx, c, 1);
}
}
if (this->m_sy > 0.0f) {
- for (c = 0; c < COM_NUM_CHANNELS_COLOR; c++) {
+ for (c = 0; c < COM_data_type_num_channels(DataType::Color); c++) {
IIR_gauss(copy, this->m_sy, c, 2);
}
}
@@ -318,8 +318,9 @@ void *FastGaussianBlurValueOperation::initializeTileData(rcti *rect)
if (this->m_overlay == FAST_GAUSS_OVERLAY_MIN) {
float *src = newBuf->getBuffer();
float *dst = copy->getBuffer();
- for (int i = copy->getWidth() * copy->getHeight(); i != 0;
- i--, src += COM_NUM_CHANNELS_VALUE, dst += COM_NUM_CHANNELS_VALUE) {
+ for (int i = copy->getWidth() * copy->getHeight(); i != 0; i--,
+ src += COM_data_type_num_channels(DataType::Value),
+ dst += COM_data_type_num_channels(DataType::Value)) {
if (*src < *dst) {
*dst = *src;
}
@@ -328,8 +329,9 @@ void *FastGaussianBlurValueOperation::initializeTileData(rcti *rect)
else if (this->m_overlay == FAST_GAUSS_OVERLAY_MAX) {
float *src = newBuf->getBuffer();
float *dst = copy->getBuffer();
- for (int i = copy->getWidth() * copy->getHeight(); i != 0;
- i--, src += COM_NUM_CHANNELS_VALUE, dst += COM_NUM_CHANNELS_VALUE) {
+ for (int i = copy->getWidth() * copy->getHeight(); i != 0; i--,
+ src += COM_data_type_num_channels(DataType::Value),
+ dst += COM_data_type_num_channels(DataType::Value)) {
if (*src > *dst) {
*dst = *src;
}