Rename the sign() in mathutils.h properly
Renamed the function name sign() to apply_sign()to justify the
functionality.
Change-Id: Ib531b5d148050d92b4bd99d620a0ddce16ab00de
diff --git a/av1/encoder/mathutils.h b/av1/encoder/mathutils.h
index 64f9361..576de07 100644
--- a/av1/encoder/mathutils.h
+++ b/av1/encoder/mathutils.h
@@ -114,7 +114,7 @@
// svdcmp
// Adopted from Numerical Recipes in C
-static INLINE double sign(double a, double b) {
+static INLINE double apply_sign(double a, double b) {
return ((b) >= 0 ? fabs(a) : -fabs(a));
}
@@ -150,7 +150,7 @@
s += u[k][i] * u[k][i];
}
f = u[i][i];
- g = -sign(sqrt(s), f);
+ g = -apply_sign(sqrt(s), f);
h = f * g - s;
u[i][i] = f - g;
for (j = l; j < n; j++) {
@@ -171,7 +171,7 @@
s += u[i][k] * u[i][k];
}
f = u[i][l];
- g = -sign(sqrt(s), f);
+ g = -apply_sign(sqrt(s), f);
h = f * g - s;
u[i][l] = f - g;
for (k = l; k < n; k++) rv1[k] = u[i][k] / h;
@@ -269,7 +269,7 @@
h = rv1[k];
f = ((y - z) * (y + z) + (g - h) * (g + h)) / (2.0 * h * y);
g = pythag(f, 1.0);
- f = ((x - z) * (x + z) + h * ((y / (f + sign(g, f))) - h)) / x;
+ f = ((x - z) * (x + z) + h * ((y / (f + apply_sign(g, f))) - h)) / x;
c = s = 1.0;
for (j = l; j <= nm; j++) {
i = j + 1;