diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-03-30 15:12:41 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-30 17:03:43 +0300 |
commit | 88e0ed32888f4a87ec1192e3b54aebe8686e029c (patch) | |
tree | 2659678f6a9adfd6605c7fb17b219b9166364ade /source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc | |
parent | b48a573adb1e8ba254c5b3ea58bf1bb2a013ce89 (diff) |
Cleanup: Use constexpr.
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc index 7e86b26bfd9..ac88ce0f894 100644 --- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc +++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cc @@ -305,7 +305,8 @@ void GaussianBlurReferenceOperation::executePixel(float output[4], int x, int y, int minyr = y - refrady < 0 ? -y : -refrady; int maxyr = y + refrady > imgy ? imgy - y : refrady; - float *srcd = buffer + COM_NUM_CHANNELS_COLOR * ((y + minyr) * imgx + x + minxr); + float *srcd = buffer + + COM_data_type_num_channels(DataType::Color) * ((y + minyr) * imgx + x + minxr); gausstabx = m_maintabs[refradx - 1]; gausstabcentx = gausstabx + refradx; @@ -313,9 +314,9 @@ void GaussianBlurReferenceOperation::executePixel(float output[4], int x, int y, gausstabcenty = gausstaby + refrady; sum = gval = rval = bval = aval = 0.0f; - for (i = minyr; i < maxyr; i++, srcd += COM_NUM_CHANNELS_COLOR * imgx) { + for (i = minyr; i < maxyr; i++, srcd += COM_data_type_num_channels(DataType::Color) * imgx) { src = srcd; - for (j = minxr; j < maxxr; j++, src += COM_NUM_CHANNELS_COLOR) { + for (j = minxr; j < maxxr; j++, src += COM_data_type_num_channels(DataType::Color)) { val = gausstabcenty[i] * gausstabcentx[j]; sum += val; |