]> granicus.if.org Git - imagemagick/commitdiff
resize.c SincFast is done + fix harmless fprintf compile warnings
authornicolas <nicolas@git.imagemagick.org>
Sun, 19 Sep 2010 21:14:15 +0000 (21:14 +0000)
committernicolas <nicolas@git.imagemagick.org>
Sun, 19 Sep 2010 21:14:15 +0000 (21:14 +0000)
Magick++/bin/Magick++-config
config/configure.xml
libtool
magick/Magick-config
magick/magick-config.h
magick/resize.c
wand/Wand-config

index 358177aa5a740f098578917121ddaec6e15e1742..43256b3bef5e0e2628c82cdaa5a3389de7a8fcc2 100755 (executable)
@@ -40,7 +40,7 @@ while test $# -gt 0; do
       echo $exec_prefix
       ;;
     --version)
-      echo '6.6.4 Q16 '
+      echo '6.6.4 Q64 '
       ;;
     --cflags)
       echo "-I${includedir} -fopenmp"
index 5c60ef71b24d4586faa158723521c16c979d9766..745512eb5a6c3e61555d63dfccdb1e9fdfd816af 100644 (file)
@@ -10,7 +10,7 @@
   <configure name="LIB_VERSION" value="0x664"/>
   <configure name="LIB_VERSION_NUMBER" value="6,6,4,5"/>
   <configure name="RELEASE_DATE" value="2010-09-19"/>
-  <configure name="CONFIGURE" value="./configure "/>
+  <configure name="CONFIGURE" value="./configure  '--with-quantum-depth=64'"/>
   <configure name="PREFIX" value="/usr/local"/>
   <configure name="EXEC-PREFIX" value="/usr/local"/>
   <configure name="VERSION" value="6.6.4"/>
   <configure name="LIBS" value="-lMagickCore -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldjvulibre -lwmf -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -pthread -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"/>
   <configure name="CXX" value="g++"/>
   <configure name="CXXFLAGS" value="-g -O2 -pthread"/>
-  <configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no"/>
+  <configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=64 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no"/>
   <configure name="HOST" value="x86_64-unknown-linux-gnu"/>
   <configure name="FEATURES" value="OpenMP "/>
   <configure name="DELEGATES" value="bzlib djvu freetype gvc jpeg jng jp2 lcms openexr png tiff x11 xml wmf zlib"/>
   <configure name="COPYRIGHT" value="Copyright (C) 1999-2010 ImageMagick Studio LLC"/>
   <configure name="WEBSITE" value="http://www.imagemagick.org"/>
-  <configure name="QuantumDepth" value="16"/>
+  <configure name="QuantumDepth" value="64"/>
 </configuremap>
diff --git a/libtool b/libtool
index 6159cc5894a9d86af032fbe9dfe752536b7d7cff..7ab2d74c986b3f811a2d3037e4f4ee03ad587069 100755 (executable)
--- a/libtool
+++ b/libtool
@@ -102,7 +102,7 @@ NM="/usr/bin/nm -B"
 LN_S="ln -s"
 
 # What is the maximum length of a command?
-max_cmd_len=3458764513820540925
+max_cmd_len=1572864
 
 # Object file suffix (normally "o").
 objext=o
index 467f513f6cbefc124902d44d74bf425c3967ca44..14e3b0e3ad7245daf8bd8a8219f97b32c551dede 100755 (executable)
@@ -37,7 +37,7 @@ while test $# -gt 0; do
       echo $exec_prefix
       ;;
     --version)
-      echo '6.6.4 Q16 '
+      echo '6.6.4 Q64 '
       ;;
     --cflags)
       echo "-I${includedir} -fopenmp"
index 18b624c4ed839f744cee30c6c196a69c3a526d82..d5cf159241b5076d04a0dc2516339766d09f508c 100644 (file)
 
 /* Location of coder modules */
 #ifndef MAGICKCORE_CODER_PATH
-#define MAGICKCORE_CODER_PATH "/usr/local/lib/ImageMagick-6.6.4/modules-Q16/coders/"
+#define MAGICKCORE_CODER_PATH "/usr/local/lib/ImageMagick-6.6.4/modules-Q64/coders/"
 #endif
 
 /* Subdirectory of lib where coder modules are installed */
 #ifndef MAGICKCORE_CODER_RELATIVE_PATH
-#define MAGICKCORE_CODER_RELATIVE_PATH "ImageMagick-6.6.4/modules-Q16/coders"
+#define MAGICKCORE_CODER_RELATIVE_PATH "ImageMagick-6.6.4/modules-Q64/coders"
 #endif
 
 /* Directory where architecture-dependent configuration files live. */
 
 /* Location of filter modules */
 #ifndef MAGICKCORE_FILTER_PATH
-#define MAGICKCORE_FILTER_PATH "/usr/local/lib/ImageMagick-6.6.4/modules-Q16/filters/"
+#define MAGICKCORE_FILTER_PATH "/usr/local/lib/ImageMagick-6.6.4/modules-Q64/filters/"
 #endif
 
 /* Subdirectory of lib where filter modules are installed */
 #ifndef MAGICKCORE_FILTER_RELATIVE_PATH
-#define MAGICKCORE_FILTER_RELATIVE_PATH "ImageMagick-6.6.4/modules-Q16/filters"
+#define MAGICKCORE_FILTER_RELATIVE_PATH "ImageMagick-6.6.4/modules-Q64/filters"
 #endif
 
 /* Define if you have FONTCONFIG library */
 
 /* Number of bits in a pixel Quantum (8/16/32/64) */
 #ifndef MAGICKCORE_QUANTUM_DEPTH
-#define MAGICKCORE_QUANTUM_DEPTH 16
+#define MAGICKCORE_QUANTUM_DEPTH 64
 #endif
 
 /* Define as the return type of signal handlers (`int' or `void'). */
index 78965f92e66cb0d496fcd29623eb3879386e24b1..38b349c6edff75c2f3c623605172685b07346d37 100644 (file)
@@ -383,7 +383,7 @@ static MagickRealType Sinc(const MagickRealType x,
   const ResizeFilter *magick_unused(resize_filter))
 {
   /*
-    Scaled sinc(x) function using a trig call (to the sine function)
+    Scaled sinc(x) function using a trig call
       sinc(x) == sin(pi x)/(pi x).
   */
   if (x != 0.0)
@@ -418,10 +418,14 @@ static MagickRealType SincFast(const MagickRealType x,
     interval.
 
     The Remez algorithm, as implemented in the boost library's minimax
-    package, is the key to the construction. See
+    package, is the key to the construction:
     http://www.boost.org/doc/libs/1_36_0/libs/math/doc/...
     ...sf_and_dist/html/math_toolkit/backgrounders/remez.html
   */
+  /*
+    If outside of the interval of approximation, use the standard trig
+    formula.
+  */
   if (x > 4.0)
   {
     const MagickRealType pix = (MagickRealType) (MagickPIL*x);
@@ -445,8 +449,8 @@ static MagickRealType SincFast(const MagickRealType x,
     const MagickRealType c5 = -0.324874073895735800961260474028013982211e-8L;
     const MagickRealType c6 = 0.628155216606695311524920882748052490116e-10L;
     const MagickRealType c7 = -0.586110644039348333520104379959307242711e-12L;
-    const MagickRealType p = c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*
-      (c6+xx*c7))))));
+    const MagickRealType p =
+      c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*c7))))));
     return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)*p);
 #elif MAGICKCORE_QUANTUM_DEPTH <= 16
     /*
@@ -454,41 +458,63 @@ static MagickRealType SincFast(const MagickRealType x,
     */
     const MagickRealType c0 = 0.173611107357320220183368594093166520811e-2L;
     const MagickRealType c1 = -0.384240921114946632192116762889211361285e-3L;
-    const MagickRealType c2 = 0.3942011823593181282212298917249470487713e-4L;
-    const MagickRealType c3 = -0.2509633016091172176600688891655505348562e-5L;
-    const MagickRealType c4 = 0.1119020328180957844142377820713688051202e-6L;
-    const MagickRealType c5 = -0.3728951014087795493684656143211370488753e-8L;
-    const MagickRealType c6 = 0.9576941966775725703198167801887185183299e-10L;
+    const MagickRealType c2 = 0.394201182359318128221229891724947048771e-4L;
+    const MagickRealType c3 = -0.250963301609117217660068889165550534856e-5L;
+    const MagickRealType c4 = 0.111902032818095784414237782071368805120e-6L;
+    const MagickRealType c5 = -0.372895101408779549368465614321137048875e-8L;
+    const MagickRealType c6 = 0.957694196677572570319816780188718518330e-10L;
     const MagickRealType c7 = -0.187208577776590710853865174371617338991e-11L;
     const MagickRealType c8 = 0.253524321426864752676094495396308636823e-13L;
     const MagickRealType c9 = -0.177084805010701112639035485248501049364e-15L;
-    const MagickRealType p = c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*
-      (c7+xx*(c8+xx*c9))))))));
+    const MagickRealType p = 
+      c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*(c7+xx*(c8+xx*c9))))))));
     return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)*p);
-#else
+#elif MAGICKCORE_QUANTUM_DEPTH <= 32
     /*
-      Max. abs. rel. error 2.8e-14 < 1/2^45 if computed with "true"
-      long doubles, 4.3e-14 < 1/2^44 if long doubles are actually
-      IEEE doubles.
+      Max. abs. rel. error 1.2e-12 < 1/2^39.
     */
+    const MagickRealType c0 = 0.173611111110910715186413700076827593074e-2L;
+    const MagickRealType c1 = -0.289105544717893415815859968653611245425e-3L;
+    const MagickRealType c2 = 0.206952161241815727624413291940849294025e-4L;
+    const MagickRealType c3 = -0.834446180169727178193268528095341741698e-6L;
+    const MagickRealType c4 = 0.207010104171026718629622453275917944941e-7L;
+    const MagickRealType c5 = -0.319724784938507108101517564300855542655e-9L;
+    const MagickRealType c6 = 0.288101675249103266147006509214934493930e-11L;
+    const MagickRealType c7 = -0.118218971804934245819960233886876537953e-13L;
+    const MagickRealType p =
+      c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*c7))))));
     const MagickRealType d0 = 1.0L;
-    const MagickRealType d1 = 0.472092849026063055335985385237754734674e-1L;
-    const MagickRealType d2 = 0.980827934715957880722726308652148654422e-3L;
-    const MagickRealType d3 = 0.108578238237913347720703630897684619857e-4L;
-    const MagickRealType d4 = 0.557879419987251079197210245241936245949e-7L;
+    const MagickRealType d1 = 0.547981619622284827495856984100563583948e-1L;
+    const MagickRealType d2 = 0.134226268835357312626304688047086921806e-2L;
+    const MagickRealType d3 = 0.178994697503371051002463656833597608689e-4L;
+    const MagickRealType d4 = 0.114633394140438168641246022557689759090e-6L;
     const MagickRealType q = d0+xx*(d1+xx*(d2+xx*(d3+xx*d4)));
-    const MagickRealType c0 = 0.173611111111106247746825939303766583803e-2L;
-    const MagickRealType c1 = -0.302280678531277982259682703263172983639e-3L;
-    const MagickRealType c2 = 0.229836848594725622956831582214430021316e-4L;
-    const MagickRealType c3 = -0.100695138496374329999375193650269551747e-5L;
-    const MagickRealType c4 = 0.281042764976558835062414967336291807862e-7L;
-    const MagickRealType c5 = -0.517543276733917186144818086999073738663e-9L;
-    const MagickRealType c6 = 0.621439288501187158171383347783850097842e-11L;
-    const MagickRealType c7 = -0.450319346388691701911265202136937840546e-13L;
-    const MagickRealType c8 = 0.152608559789404502241147185831249792831e-15L;
-    const MagickRealType p = c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*
-      (c7+xx*c8)))))));
-    return((xx-1.0)/q*(xx-4.0)*(xx-9.0)*(xx-16.0)*p);
+    return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)/q*p);
+#else
+    /*
+      Max. abs. rel. error 2.5e-17 < 1/2^55 if computed with "true"
+      long doubles, 2.6e-14 < 1/2^45 if long doubles are IEEE doubles.
+    */
+    const MagickRealType c0 = 0.173611111111111113332932116053816904714e-2L;
+    const MagickRealType c1 = -0.303723497515718809687399886229022703169e-3L;
+    const MagickRealType c2 = 0.233100817439489606061795544561807507471e-4L;
+    const MagickRealType c3 = -0.103906554814465396861269897523992002705e-5L;
+    const MagickRealType c4 = 0.299175768961095380104447394070231517712e-7L;
+    const MagickRealType c5 = -0.582555275175235235925786868156315453570e-9L;
+    const MagickRealType c6 = 0.774885118857072154223233850399192557934e-11L;
+    const MagickRealType c7 = -0.686148809066333092764596425714057372964e-13L;
+    const MagickRealType c8 = 0.371085247462909594457662716426170281684e-15L;
+    const MagickRealType c9 = -0.944551950759515118228796037513456335763e-18L;
+    const MagickRealType p =
+      c0+xx*(c1+xx*(c2+xx*(c3+xx*(c4+xx*(c5+xx*(c6+xx*(c7+xx*(c8+xx*c9))))))));
+    const MagickRealType d0 = 1.0L;
+    const MagickRealType d1 = 0.463782211680615975951490586564903936283e-1L;
+    const MagickRealType d2 = 0.984899056548092584226994406603163505777e-3L;
+    const MagickRealType d3 = 0.121314604267142674069019025409802158375e-4L;
+    const MagickRealType d4 = 0.881998514405598677970025517260813044225e-7L;
+    const MagickRealType d5 = 0.310377434094436341006055666680844291856e-9L;
+    const MagickRealType q = d0+xx*(d1+xx*(d2+xx*(d3+xx*(d4+xx*d5))));
+    return((xx-1.0)*(xx-4.0)*(xx-9.0)*(xx-16.0)/q*p);
 #endif
   }
 }
@@ -1032,27 +1058,31 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
         support = GetResizeFilterSupport(resize_filter); /* support range */
         (void) fprintf(stdout,"#\n# Resize Filter (for graphing)\n#\n");
         (void) fprintf(stdout,"# filter = %s\n",
-            MagickOptionToMnemonic(MagickFilterOptions, filter_type) );
+                      MagickOptionToMnemonic(MagickFilterOptions, filter_type)
+                      );
         (void) fprintf(stdout,"# window = %s\n",
-            MagickOptionToMnemonic(MagickFilterOptions, window_type) );
+                      MagickOptionToMnemonic(MagickFilterOptions, window_type)
+                      );
         (void) fprintf(stdout,"# support = %.*g\n",
-            GetMagickPrecision(),resize_filter->support );
+                      GetMagickPrecision(),(double) resize_filter->support);
         (void) fprintf(stdout,"# win-support = %.*g\n",
-            GetMagickPrecision(),resize_filter->window_support );
+                      GetMagickPrecision(),
+                      (double) resize_filter->window_support);
         (void) fprintf(stdout,"# blur = %.*g\n",
-            GetMagickPrecision(),resize_filter->blur );
+                      GetMagickPrecision(),(double) resize_filter->blur);
         (void) fprintf(stdout,"# blurred_support = %.*g\n",
-            GetMagickPrecision(),support);
+                      GetMagickPrecision(),(double) support);
         (void) fprintf(stdout,"# B,C = %.*g,%.*g\n",
-            GetMagickPrecision(),B,   GetMagickPrecision(),C);
+                      GetMagickPrecision(),(double) B,
+                      GetMagickPrecision(),(double) C);
         (void) fprintf(stdout,"#\n");
         /*
           Output values of resulting filter graph -- for graphing
           filter result.
         */
         for (x=0.0; x <= support; x+=0.01f)
-          (void) fprintf(stdout,"%5.2lf\t%.*g\n", x,
-            GetMagickPrecision(), GetResizeFilterWeight(resize_filter,x));
+          (void) fprintf(stdout,"%5.2lf\t%.*g\n", x, GetMagickPrecision(),
+                        (double) GetResizeFilterWeight(resize_filter,x));
         /* A final value so gnuplot can graph the 'stop' properly. */
         (void) fprintf(stdout,"%5.2lf\t%.*g\n",support,
             GetMagickPrecision(), 0.0);
index cf9b4cee84db7bc0fc71431079e4d8271c68d2e1..3ee0dcf632a557ff17abf86fbad4f1636876c2cc 100755 (executable)
@@ -37,7 +37,7 @@ while test $# -gt 0; do
       echo $exec_prefix
       ;;
     --version)
-      echo '6.6.4 Q16 '
+      echo '6.6.4 Q64 '
       ;;
     --cflags)
       echo "-I${includedir} -fopenmp"