diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-13 00:04:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-13 00:04:55 +0400 |
commit | e1241030db424ce10e9fee04076ff7e209eac98c (patch) | |
tree | ac8e1a81a81fa130e166366c6b93587e77e4188f /source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp | |
parent | 7fec7070d7fcf7bde53768e555b40b57ef4a7552 (diff) |
yse BLI_math for the compositor in more places.
Diffstat (limited to 'source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp index 43cba09d16f..60c31400eca 100644 --- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp @@ -85,10 +85,7 @@ void DirectionalBlurOperation::executePixel(float *color, int x, int y, MemoryBu this->inputProgram->read(col, cs * u + ss * v + center_x_pix, cs * v - ss * u + center_y_pix, COM_PS_NEAREST, inputBuffers); - col2[0] += col[0]; - col2[1] += col[1]; - col2[2] += col[2]; - col2[3] += col[3]; + add_v4_v4(col2, col); /* double transformations */ ltx += tx; @@ -96,10 +93,8 @@ void DirectionalBlurOperation::executePixel(float *color, int x, int y, MemoryBu lrot += rot; lsc += sc; } - color[0] = col2[0]/iterations; - color[1] = col2[1]/iterations; - color[2] = col2[2]/iterations; - color[3] = col2[3]/iterations; + + mul_v4_v4fl(color, col2, 1.0f / iterations); } void DirectionalBlurOperation::deinitExecution() |