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:
authorCampbell Barton <ideasman42@gmail.com>2012-12-21 09:07:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-21 09:07:26 +0400
commitb2c66e268f68ee406e5e05a65d9d1609b65d20c4 (patch)
tree722192b9fe1d7af57695860fc3639781bedf5f2b /source/blender/compositor
parente09ddf0d4ba6f6d1e8963d41eef153dadce482f8 (diff)
replace MIN/MAX 3,4 with inline functions
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index d2c6c833e2e..fb996f2abaf 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -204,10 +204,10 @@ bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input
}
#define UPDATE_INPUT { \
- newInput.xmin = MIN4(newInput.xmin, coords[0], coords[2], coords[4]); \
- newInput.ymin = MIN4(newInput.ymin, coords[1], coords[3], coords[5]); \
- newInput.xmax = MAX4(newInput.xmax, coords[0], coords[2], coords[4]); \
- newInput.ymax = MAX4(newInput.ymax, coords[1], coords[3], coords[5]); \
+ newInput.xmin = min_ffff(newInput.xmin, coords[0], coords[2], coords[4]); \
+ newInput.ymin = min_ffff(newInput.ymin, coords[1], coords[3], coords[5]); \
+ newInput.xmax = max_ffff(newInput.xmax, coords[0], coords[2], coords[4]); \
+ newInput.ymax = max_ffff(newInput.ymax, coords[1], coords[3], coords[5]); \
} (void)0
rcti newInput;
@@ -273,7 +273,7 @@ void ScreenLensDistortionOperation::updateVariables(float distortion, float disp
const float d = 0.25f * max_ff(min_ff(dispersion, 1.0f), 0.0f);
this->m_kr = max_ff(min_ff((this->m_kg + d), 1.0f), -0.999f);
this->m_kb = max_ff(min_ff((this->m_kg - d), 1.0f), -0.999f);
- this->m_maxk = MAX3(this->m_kr, this->m_kg, this->m_kb);
+ this->m_maxk = max_fff(this->m_kr, this->m_kg, this->m_kb);
this->m_sc = (this->m_data->fit && (this->m_maxk > 0.0f)) ? (1.0f / (1.0f + 2.0f * this->m_maxk)) :
(1.0f / (1.0f + this->m_maxk));
this->m_drg = 4.0f * (this->m_kg - this->m_kr);