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_ConvertPremulToKeyOperation.cpp | |
parent | 7fec7070d7fcf7bde53768e555b40b57ef4a7552 (diff) |
yse BLI_math for the compositor in more places.
Diffstat (limited to 'source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp index 16636ee2afc..920b5f8a775 100644 --- a/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp @@ -44,14 +44,10 @@ void ConvertPremulToKeyOperation::executePixel(float *outputValue, float x, floa alpha = inputValue[3]; if (fabsf(alpha) < 1e-5f) { - outputValue[0] = 0.f; - outputValue[1] = 0.f; - outputValue[2] = 0.f; + zero_v3(outputValue); } else { - outputValue[0] = inputValue[0] / alpha; - outputValue[1] = inputValue[1] / alpha; - outputValue[2] = inputValue[2] / alpha; + mul_v3_v3fl(outputValue, inputValue, 1.0f / alpha); } /* never touches the alpha */ |