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:
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp8
4 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 31608c88274..1723da11f21 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -92,8 +92,8 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data)
dxt = p_dx - d_dx;
dyt = p_dy - d_dy;
- dxt = signf(dxt) * maxf(fabsf(dxt), DISPLACE_EPSILON) / this->getWidth();
- dyt = signf(dyt) * maxf(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight();
+ dxt = signf(dxt) * max_ff(fabsf(dxt), DISPLACE_EPSILON) / this->getWidth();
+ dyt = signf(dyt) * max_ff(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight();
/* EWA filtering (without nearest it gets blurry with NO distortion) */
this->m_inputColorProgram->read(output, u, v, dxt, dyt, COM_PS_NEAREST);
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 70d4d987c81..81ca06cfff0 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -133,9 +133,9 @@ void InpaintSimpleOperation::calc_manhatten_distance()
if (this->get_pixel(i, j)[3] < 1.0f) {
r = width + height;
if (i > 0)
- r = mini(r, m[j * width + i - 1] + 1);
+ r = min_ii(r, m[j * width + i - 1] + 1);
if (j > 0)
- r = mini(r, m[(j - 1) * width + i] + 1);
+ r = min_ii(r, m[(j - 1) * width + i] + 1);
}
m[j * width + i] = r;
}
@@ -146,9 +146,9 @@ void InpaintSimpleOperation::calc_manhatten_distance()
int r = m[j * width + i];
if (i + 1 < width)
- r = mini(r, m[j * width + i + 1] + 1);
+ r = min_ii(r, m[j * width + i + 1] + 1);
if (j + 1 < height)
- r = mini(r, m[(j + 1) * width + i] + 1);
+ r = min_ii(r, m[(j + 1) * width + i] + 1);
m[j * width + i] = r;
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index d92fe04eb15..00e35f2c9d8 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -104,7 +104,7 @@ void ProjectorLensDistortionOperation::updateDispersion()
float result[4];
this->getInputSocketReader(1)->read(result, 1, 1, COM_PS_NEAREST);
this->m_dispersion = result[0];
- this->m_kr = 0.25f * maxf(minf(this->m_dispersion, 1.0f), 0.0f);
+ this->m_kr = 0.25f * max_ff(min_ff(this->m_dispersion, 1.0f), 0.0f);
this->m_kr2 = this->m_kr * 20;
this->m_dispersionAvailable = true;
}
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index b65444108bc..d2c6c833e2e 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -268,11 +268,11 @@ bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input
void ScreenLensDistortionOperation::updateVariables(float distortion, float dispersion)
{
- this->m_kg = maxf(minf(distortion, 1.0f), -0.999f);
+ this->m_kg = max_ff(min_ff(distortion, 1.0f), -0.999f);
// smaller dispersion range for somewhat more control
- const float d = 0.25f * maxf(minf(dispersion, 1.0f), 0.0f);
- this->m_kr = maxf(minf((this->m_kg + d), 1.0f), -0.999f);
- this->m_kb = maxf(minf((this->m_kg - d), 1.0f), -0.999f);
+ 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_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));