Page 1 of 1

Huffman on compress.c

Posted: 2012-09-05T03:39:24-07:00
by broucaries
Hi,

It seems that we could remove your custom code about huffman coding if you use the HUFFMAN_ONLY strategy in
ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
int level,
int method,
int windowBits,
int memLevel,
int strategy));

It need a testsuite but it will improve the speed.

Bastien

Re: Huffman on compress.c

Posted: 2012-09-05T04:48:16-07:00
by magick
Thanks, we'll take a look at using ZLIB for Huffman encoding.

Re: Huffman on compress.c

Posted: 2012-09-05T05:14:56-07:00
by broucaries
Note that you may need Z_FIXED if the huffman table are not dynamic in the sense of the RFC

Re: Huffman on compress.c

Posted: 2012-09-05T07:25:13-07:00
by broucaries
BTW libtiff #define at the beginning of the file could be dropped....

Re: Huffman on compress.c

Posted: 2012-09-05T07:49:12-07:00
by magick
Done. Thanks.

Re: Huffman on compress.c

Posted: 2012-09-05T07:53:12-07:00
by broucaries
I think you could now remove libjpeg and libtiff from the depends_libs of libmagickcore...

They are not referenced in the module case (not even included)

Thanks

Re: Huffman on compress.c

Posted: 2012-09-05T08:28:54-07:00
by magick
I think you could now remove libjpeg and libtiff from the depends_libs of libmagickcore...
We don't see either as a dependency of MagickCore anymore. Which file includes these dependencies?

Re: Huffman on compress.c

Posted: 2012-09-05T09:07:04-07:00
by broucaries
something like this

Code: Select all

--- a/configure.ac
+++ b/configure.ac
@@ -3713,7 +3713,7 @@ AC_SUBST(MAGICK_LIBLTDL)
 AC_SUBST(MAGICK_LTDLDEPS)
 
 if test "$with_modules" != 'no'; then
-    MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
+    MAGICK_DEP_LIBS="$LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
 else
     MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $CL_LIBS $THREAD_LIBS"
 fi

Re: Huffman on compress.c

Posted: 2012-09-05T09:54:01-07:00
by magick
Got it. Thanks.

Re: Huffman on compress.c

Posted: 2012-12-22T05:17:56-07:00
by broucaries
magick wrote:Thanks, we'll take a look at using ZLIB for Huffman encoding.
Any news ?

Care to add to TODO list ?

BTW could you publish on the source tree the TODOS list ? It will help other (particularly distrib to help you)

Re: Huffman on compress.c

Posted: 2012-12-22T15:17:54-07:00
by magick
See http://www.imagemagick.org/Usage/bugs/ for a bug list and our ambitions for the future.

ZLib Huffman compression may have not made it to the TODO list just yet due to a standard open-source problem-- too much to do, too little time, not enough developers.

In the mean-time, thank you for your many recent contributions to the ImageMagick project. All were needed and all are appreciated.