diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-23 20:21:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-23 20:21:55 +0400 |
commit | fec81d9b56075f46f6dde196ac85140872cff74e (patch) | |
tree | 6ee12fcc0b04ba3041f1b7e4d17281136375beb1 /source/blender/compositor/operations/COM_KeyingDespillOperation.cpp | |
parent | c623ba5e4b2aa68a5717ba17500c14217bc417aa (diff) |
use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingDespillOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingDespillOperation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp index 4426666f100..f9f43025d29 100644 --- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp @@ -28,9 +28,9 @@ #include "BLI_listbase.h" #include "BLI_math.h" -static int get_pixel_primary_channel(float *pixel) +static int get_pixel_primary_channel(float pixel[3]) { - float max_value = MAX3(pixel[0], pixel[1], pixel[2]); + float max_value = max(max(pixel[0], pixel[1]), pixel[2]); if (max_value == pixel[0]) return 0; @@ -77,8 +77,8 @@ void KeyingDespillOperation::executePixel(float output[4], float x, float y, Pix int other_1 = (screen_primary_channel + 1) % 3; int other_2 = (screen_primary_channel + 2) % 3; - int min_channel = MIN2(other_1, other_2); - int max_channel = MAX2(other_1, other_2); + int min_channel = min(other_1, other_2); + int max_channel = max(other_1, other_2); float average_value, amount; |