]> granicus.if.org Git - imagemagick/commitdiff
Changed macro name MagickPIL to MagickRealTypePI
authornicolas <nicolas@git.imagemagick.org>
Tue, 21 Sep 2010 00:32:38 +0000 (00:32 +0000)
committernicolas <nicolas@git.imagemagick.org>
Tue, 21 Sep 2010 00:32:38 +0000 (00:32 +0000)
ChangeLog
magick/resize.c

index a84238b36a8c044a3d5d03329a56bb60e9179385..d9af87186e57d94ef68268e3bd33dc74c6fd1caf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 2010-09-20  6.6.4-5 Nicolas Robidoux <nicolas.robidoux@gmail...>
-  * Modified "magick/resize.c" so that PIL is a MagickRealType number. Earlier,
-    some computations were needlessly done in long double precision because PIL
-    forced an automatic upcast wherever it appeared.
+  * Modified "magick/resize.c" so that MagickPIL is a MagickRealType number.
+    Earlier, some computations were needlessly done in long double precision
+    because PIL forced an automatic upcast wherever it appeared. Changed its
+    name to MagickRealTypePI.
   * Modified "magick/resize.c" so that Bohman uses one trig call + one sqrt call
     instead of two trig calls.
 
index 3457f00383037a6003e06cd7c26a29118b5df300..7f24af2c9d4b421ef6782ca93cb8e4d055566ccd 100644 (file)
@@ -133,7 +133,7 @@ static MagickRealType
 %
 */
 
-#define MagickPIL ((MagickRealType) 3.14159265358979323846264338327950288420L)
+#define MagickREALTYPEPI ((MagickRealType) 3.14159265358979323846264338327950288420L)
 
 static MagickRealType Bessel(const MagickRealType x,
   const ResizeFilter *magick_unused(resize_filter))
@@ -145,8 +145,8 @@ static MagickRealType Bessel(const MagickRealType x,
     http://www.ph.ed.ac.uk/%7ewjh/teaching/mo/slides/lens/lens.pdf.
   */
   if (x == 0.0)
-    return((MagickRealType) (0.25*MagickPIL));
-  return(BesselOrderOne((MagickRealType) (MagickPIL*x))/(x+x));
+    return((MagickRealType) (0.25*MagickREALTYPEPI));
+  return(BesselOrderOne((MagickRealType) (MagickREALTYPEPI*x))/(x+x));
 }
 
 static MagickRealType Blackman(const MagickRealType x,
@@ -158,7 +158,7 @@ static MagickRealType Blackman(const MagickRealType x,
     Refactored by Chantal Racette and Nicolas Robidoux to one trig
     call and five flops.
   */
-  const MagickRealType cospix = cos((double) (MagickPIL*x));
+  const MagickRealType cospix = cos((double) (MagickREALTYPEPI*x));
   return(0.34+cospix*(0.5+cospix*0.16));
 }
 
@@ -172,9 +172,9 @@ static MagickRealType Bohman(const MagickRealType x,
     and 7 flops, taking advantage of the fact that the support of
     Bohman is 1 (so that we know that sin(pi x) >= 0).
   */
-  const double cospix = cos((double) (MagickPIL*x));
+  const double cospix = cos((double) (MagickREALTYPEPI*x));
   const double sinpix = sqrt(1.0-cospix*cospix);
-  return((MagickRealType) ((1.0-x)*cospix+(1.0/MagickPIL)*sinpix));
+  return((MagickRealType) ((1.0-x)*cospix+(1.0/MagickREALTYPEPI)*sinpix));
 }
 
 static MagickRealType Box(const MagickRealType x,
@@ -246,7 +246,7 @@ static MagickRealType Hanning(const MagickRealType x,
   /*
     Cosine window function: .5 + .5 cos(pi x).
   */
-  const MagickRealType cospix = cos((double) (MagickPIL*x));
+  const MagickRealType cospix = cos((double) (MagickREALTYPEPI*x));
   return(0.5+0.5*cospix);
 }
 
@@ -256,7 +256,7 @@ static MagickRealType Hamming(const MagickRealType x,
   /*
     Offset cosine window function: .54 + .46 cos(pi x).
   */
-  const MagickRealType cospix = cos((double) (MagickPIL*x));
+  const MagickRealType cospix = cos((double) (MagickREALTYPEPI*x));
   return(0.54+0.46*cospix);
 }
 
@@ -333,7 +333,7 @@ static MagickRealType Sinc(const MagickRealType x,
   */
   if (x != 0.0)
   {
-    const MagickRealType pix = (MagickRealType) (MagickPIL*x);
+    const MagickRealType pix = (MagickRealType) (MagickREALTYPEPI*x);
     return(sin((double) pix)/pix);
   }
   return(1.0);
@@ -373,7 +373,7 @@ static MagickRealType SincFast(const MagickRealType x,
   */
   if (x > 4.0)
     {
-      const MagickRealType pix = (MagickRealType) (MagickPIL*x);
+      const MagickRealType pix = (MagickRealType) (MagickREALTYPEPI*x);
       return(sin((double) pix)/pix);
     }
   {