[gegl] operations/common/exposure: Use exp2f for base-2 exponentials
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations/common/exposure: Use exp2f for base-2 exponentials
- Date: Thu, 9 Feb 2017 11:47:45 +0000 (UTC)
commit fc1e769f9f745b54379f991070631f4dc3cdbfd0
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Feb 8 20:33:17 2017 +0100
operations/common/exposure: Use exp2f for base-2 exponentials
https://bugzilla.gnome.org/show_bug.cgi?id=778361
operations/common/exposure.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/exposure.c b/operations/common/exposure.c
index 68b90d7..d45db11 100644
--- a/operations/common/exposure.c
+++ b/operations/common/exposure.c
@@ -44,7 +44,7 @@ property_double (gamma, _("Gamma adjustment"), 1.0)
#include <math.h>
#ifdef _MSC_VER
-#define powf(a,b) ((gfloat)pow(a,b))
+#define exp2f (b) ((gfloat) pow (2.0, b))
#endif
static void
@@ -69,7 +69,7 @@ process (GeglOperation *op,
gfloat *in_pixel;
gfloat *out_pixel;
- gfloat gain = powf(2.0, o->exposure);
+ gfloat gain = exp2f (o->exposure);
gfloat offset = o->offset;
gfloat gamma = 1.0 / o->gamma;
@@ -138,7 +138,7 @@ cl_process (GeglOperation *op,
GeglProperties *o = GEGL_PROPERTIES (op);
- gfloat gain = powf(2.0, o->exposure);
+ gfloat gain = exp2f (o->exposure);
gfloat offset = o->offset;
gfloat gamma = 1.0 / o->gamma;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]