[prev in list] [next in list] [prev in thread] [next in thread] 

List:       graphicsmagick-commit
Subject:    [GM-commit] GraphicsMagick: 2 new changesets
From:       GraphicsMagick Commits <graphicsmagick-commit () lists ! sourceforge ! net>
Date:       2016-08-14 23:42:27
Message-ID: hg.9683881b876c.1471218147.2950750188400161634 () src ! simplesystems ! org
[Download RAW message or body]

changeset 9683881b876c in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=9683881b876c
summary: Updated bundled libwebp to release 0.5.1.

changeset 26f7b4f856a1 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=26f7b4f856a1
summary: Update generated files.

diffstat:

 ChangeLog                                     |     2 +
 patches/webp.patch                            |    12 +-
 webp/AUTHORS                                  |    11 +-
 webp/Android.mk                               |    45 +-
 webp/CMakeLists.txt                           |   333 ++++
 webp/ChangeLog                                |  1081 ++++++++++++++-
 webp/Makefile.in                              |     3 +
 webp/Makefile.vc                              |    97 +-
 webp/NEWS                                     |    40 +-
 webp/README                                   |   137 +-
 webp/README.mux                               |    30 +-
 webp/build.gradle                             |   337 +++++
 webp/cmake/config.h.in                        |   146 ++
 webp/configure                                |   446 +++++-
 webp/configure.ac                             |   207 ++-
 webp/examples/Android.mk                      |    28 +-
 webp/examples/Makefile.am                     |    38 +-
 webp/examples/Makefile.in                     |   321 ++--
 webp/examples/anim_diff.c                     |   289 ++++
 webp/examples/anim_util.c                     |   755 +++++++++++
 webp/examples/anim_util.h                     |    63 +
 webp/examples/cwebp.c                         |   246 +-
 webp/examples/dwebp.c                         |   240 ++-
 webp/examples/example_util.c                  |    23 +
 webp/examples/example_util.h                  |     6 +
 webp/examples/gif2webp.c                      |   493 ++----
 webp/examples/gif2webp_util.c                 |  1042 ---------------
 webp/examples/gif2webp_util.h                 |    88 -
 webp/examples/gifdec.c                        |   396 +++++
 webp/examples/gifdec.h                        |   116 +
 webp/examples/image_dec.c                     |    46 +
 webp/examples/image_dec.h                     |    61 +
 webp/examples/jpegdec.c                       |    68 +-
 webp/examples/jpegdec.h                       |     9 +-
 webp/examples/pngdec.c                        |    58 +-
 webp/examples/pngdec.h                        |    12 +-
 webp/examples/tiffdec.c                       |    71 +-
 webp/examples/tiffdec.h                       |     9 +-
 webp/examples/vwebp.c                         |    18 +-
 webp/examples/webpdec.c                       |    52 +-
 webp/examples/webpdec.h                       |    10 +-
 webp/examples/webpmux.c                       |    49 +-
 webp/examples/wicdec.c                        |    32 +-
 webp/examples/wicdec.h                        |     2 +-
 webp/gradle.properties                        |    14 +
 webp/gradle/wrapper/gradle-wrapper.jar        |   Bin 
 webp/gradle/wrapper/gradle-wrapper.properties |     6 +
 webp/gradlew                                  |   164 ++
 webp/gradlew.bat                              |    90 +
 webp/makefile.unix                            |   126 +-
 webp/man/Makefile.in                          |     3 +
 webp/man/cwebp.1                              |   282 ++-
 webp/man/dwebp.1                              |    36 +-
 webp/man/gif2webp.1                           |    18 +-
 webp/man/vwebp.1                              |    18 +-
 webp/man/webpmux.1                            |     9 +-
 webp/src/Makefile.am                          |    11 +-
 webp/src/Makefile.in                          |    25 +-
 webp/src/dec/Makefile.am                      |     3 +-
 webp/src/dec/Makefile.in                      |    11 +-
 webp/src/dec/alpha.c                          |   171 +-
 webp/src/dec/alphai.h                         |    15 +-
 webp/src/dec/buffer.c                         |    57 +-
 webp/src/dec/common.h                         |    54 +
 webp/src/dec/frame.c                          |   388 ++---
 webp/src/dec/idec.c                           |   114 +-
 webp/src/dec/io.c                             |   166 +-
 webp/src/dec/tree.c                           |     9 +
 webp/src/dec/vp8.c                            |    68 +-
 webp/src/dec/vp8i.h                           |    62 +-
 webp/src/dec/vp8l.c                           |   799 +++++++----
 webp/src/dec/vp8li.h                          |     9 +-
 webp/src/dec/webp.c                           |    68 +-
 webp/src/dec/webpi.h                          |    28 +-
 webp/src/demux/Makefile.am                    |     4 +-
 webp/src/demux/Makefile.in                    |    10 +-
 webp/src/demux/anim_decode.c                  |   442 ++++++
 webp/src/demux/demux.c                        |   196 +-
 webp/src/dsp/Makefile.am                      |    87 +-
 webp/src/dsp/Makefile.in                      |   605 +++++++-
 webp/src/dsp/alpha_processing.c               |    60 +-
 webp/src/dsp/alpha_processing_mips_dsp_r2.c   |   141 ++
 webp/src/dsp/alpha_processing_sse2.c          |   231 +++-
 webp/src/dsp/alpha_processing_sse41.c         |    92 +
 webp/src/dsp/argb.c                           |    68 +
 webp/src/dsp/argb_mips_dsp_r2.c               |   110 +
 webp/src/dsp/argb_sse2.c                      |    67 +
 webp/src/dsp/common_sse2.h                    |   109 +
 webp/src/dsp/cost.c                           |   412 ++++++
 webp/src/dsp/cost_mips32.c                    |   154 ++
 webp/src/dsp/cost_mips_dsp_r2.c               |   107 +
 webp/src/dsp/cost_sse2.c                      |   119 +
 webp/src/dsp/cpu.c                            |    65 +-
 webp/src/dsp/dec.c                            |   203 +-
 webp/src/dsp/dec_clip_tables.c                |     2 +-
 webp/src/dsp/dec_mips32.c                     |    97 +-
 webp/src/dsp/dec_mips_dsp_r2.c                |   994 ++++++++++++++
 webp/src/dsp/dec_msa.c                        |   172 ++
 webp/src/dsp/dec_neon.c                       |   397 +++++-
 webp/src/dsp/dec_sse2.c                       |   543 +++++--
 webp/src/dsp/dec_sse41.c                      |    46 +
 webp/src/dsp/dsp.h                            |   303 ++++-
 webp/src/dsp/enc.c                            |   170 ++-
 webp/src/dsp/enc_avx2.c                       |     5 +-
 webp/src/dsp/enc_mips32.c                     |   482 ++----
 webp/src/dsp/enc_mips_dsp_r2.c                |  1510 ++++++++++++++++++++++
 webp/src/dsp/enc_neon.c                       |   453 ++----
 webp/src/dsp/enc_sse2.c                       |  1408 +++++++++++++-------
 webp/src/dsp/enc_sse41.c                      |   339 +++++
 webp/src/dsp/filters.c                        |   261 +++
 webp/src/dsp/filters_mips_dsp_r2.c            |   395 +++++
 webp/src/dsp/filters_sse2.c                   |   330 ++++
 webp/src/dsp/lossless.c                       |  1110 +---------------
 webp/src/dsp/lossless.h                       |   215 ++-
 webp/src/dsp/lossless_enc.c                   |  1439 +++++++++++++++++++++
 webp/src/dsp/lossless_enc_mips32.c            |   386 +++++
 webp/src/dsp/lossless_enc_mips_dsp_r2.c       |   275 ++++
 webp/src/dsp/lossless_enc_neon.c              |   143 ++
 webp/src/dsp/lossless_enc_sse2.c              |   397 +++++
 webp/src/dsp/lossless_enc_sse41.c             |    51 +
 webp/src/dsp/lossless_mips32.c                |   416 ------
 webp/src/dsp/lossless_mips_dsp_r2.c           |   680 ++++++++++
 webp/src/dsp/lossless_neon.c                  |   222 +--
 webp/src/dsp/lossless_sse2.c                  |   243 +---
 webp/src/dsp/mips_macro.h                     |   200 ++
 webp/src/dsp/msa_macro.h                      |   555 ++++++++
 webp/src/dsp/neon.h                           |     2 +-
 webp/src/dsp/rescaler.c                       |   238 +++
 webp/src/dsp/rescaler_mips32.c                |   291 ++++
 webp/src/dsp/rescaler_mips_dsp_r2.c           |   314 ++++
 webp/src/dsp/rescaler_neon.c                  |   186 ++
 webp/src/dsp/rescaler_sse2.c                  |   375 +++++
 webp/src/dsp/upsampling.c                     |    78 +-
 webp/src/dsp/upsampling_mips_dsp_r2.c         |   282 ++++
 webp/src/dsp/upsampling_neon.c                |   133 +-
 webp/src/dsp/upsampling_sse2.c                |    73 +-
 webp/src/dsp/yuv.c                            |   126 +-
 webp/src/dsp/yuv.h                            |   133 +-
 webp/src/dsp/yuv_mips32.c                     |    47 +-
 webp/src/dsp/yuv_mips_dsp_r2.c                |   134 ++
 webp/src/dsp/yuv_sse2.c                       |   923 ++++++++++---
 webp/src/dsp/yuv_tables_sse2.h                |   536 --------
 webp/src/enc/Makefile.am                      |     8 +-
 webp/src/enc/Makefile.in                      |    35 +-
 webp/src/enc/alpha.c                          |    68 +-
 webp/src/enc/analysis.c                       |    51 +-
 webp/src/enc/backward_references.c            |  1674 ++++++++++++++++++------
 webp/src/enc/backward_references.h            |    38 +-
 webp/src/enc/config.c                         |    19 +-
 webp/src/enc/cost.c                           |   399 +-----
 webp/src/enc/cost.h                           |    29 +-
 webp/src/enc/delta_palettization.c            |   455 ++++++
 webp/src/enc/delta_palettization.h            |    25 +
 webp/src/enc/filter.c                         |    96 +-
 webp/src/enc/frame.c                          |    30 +-
 webp/src/enc/histogram.c                      |   605 +++++---
 webp/src/enc/histogram.h                      |    37 +-
 webp/src/enc/iterator.c                       |    26 +-
 webp/src/enc/near_lossless.c                  |   122 +
 webp/src/enc/picture.c                        |     3 +
 webp/src/enc/picture_csp.c                    |   374 +++--
 webp/src/enc/picture_psnr.c                   |   155 +-
 webp/src/enc/picture_rescale.c                |    65 +-
 webp/src/enc/picture_tools.c                  |    20 +
 webp/src/enc/quant.c                          |   339 +++-
 webp/src/enc/syntax.c                         |    40 +-
 webp/src/enc/token.c                          |    65 +-
 webp/src/enc/tree.c                           |     8 +-
 webp/src/enc/vp8enci.h                        |   237 +--
 webp/src/enc/vp8l.c                           |  1112 ++++++++++-----
 webp/src/enc/vp8li.h                          |    20 +-
 webp/src/enc/webpenc.c                        |    75 +-
 webp/src/extras/Makefile.am                   |    13 +
 webp/src/extras/Makefile.in                   |   716 ++++++++++
 webp/src/extras/extras.c                      |   111 +
 webp/src/extras/libwebpextras.pc.in           |    11 +
 webp/src/mux/Makefile.am                      |     3 +-
 webp/src/mux/Makefile.in                      |    12 +-
 webp/src/mux/anim_encode.c                    |  1534 ++++++++++++++++++++++
 webp/src/mux/muxedit.c                        |    10 +-
 webp/src/mux/muxi.h                           |     4 +-
 webp/src/mux/muxread.c                        |     5 -
 webp/src/utils/Makefile.am                    |     6 +
 webp/src/utils/Makefile.in                    |     9 +-
 webp/src/utils/bit_reader.c                   |    58 +-
 webp/src/utils/bit_reader.h                   |    19 +-
 webp/src/utils/bit_reader_inl.h               |     7 +-
 webp/src/utils/bit_writer.c                   |    64 +-
 webp/src/utils/bit_writer.h                   |    37 +-
 webp/src/utils/color_cache.c                  |    12 +-
 webp/src/utils/color_cache.h                  |    16 +-
 webp/src/utils/filters.c                      |   206 +--
 webp/src/utils/filters.h                      |    33 +-
 webp/src/utils/huffman.c                      |   404 ++---
 webp/src/utils/huffman.h                      |   106 +-
 webp/src/utils/huffman_encode.c               |     2 +-
 webp/src/utils/huffman_encode.h               |     5 +-
 webp/src/utils/quant_levels_dec.c             |    33 +-
 webp/src/utils/quant_levels_dec.h             |     4 +-
 webp/src/utils/rescaler.c                     |   492 +------
 webp/src/utils/rescaler.h                     |    22 +-
 webp/src/utils/thread.c                       |    49 +
 webp/src/utils/thread.h                       |     2 +-
 webp/src/utils/utils.c                        |    96 +-
 webp/src/utils/utils.h                        |    63 +-
 webp/src/webp/config.h.in                     |     9 +
 webp/src/webp/decode.h                        |    54 +-
 webp/src/webp/demux.h                         |   162 ++-
 webp/src/webp/encode.h                        |    39 +-
 webp/src/webp/extras.h                        |    51 +
 webp/src/webp/format_constants.h              |     2 +-
 webp/src/webp/mux.h                           |   159 ++-
 webp/src/webp/types.h                         |     6 +-
 www/Changelog.html                            |     1 +
 214 files changed, 31459 insertions(+), 11202 deletions(-)

diffs (truncated from 53786 to 500 lines):

diff -r 46a5a46d43a3 -r 26f7b4f856a1 ChangeLog
--- a/ChangeLog	Sun Aug 14 17:35:43 2016 -0500
+++ b/ChangeLog	Sun Aug 14 18:42:20 2016 -0500
@@ -1,5 +1,7 @@
 2016-08-14  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
 
+	* webp: Updated bundled libwebp to release 0.5.1.
+
 	* libxml: Updated bundled libxml2 to release 2.9.4.
 
 	* lcms: Updated bundled lcms2 to release 2.8.
diff -r 46a5a46d43a3 -r 26f7b4f856a1 patches/webp.patch
--- a/patches/webp.patch	Sun Aug 14 17:35:43 2016 -0500
+++ b/patches/webp.patch	Sun Aug 14 18:42:20 2016 -0500
@@ -1,6 +1,6 @@
-diff -r -u libwebp-0.4.4/src/utils/endian_inl.h webp/src/utils/endian_inl.h
---- libwebp-0.4.4/src/utils/endian_inl.h	2015-10-23 15:20:40.000000000 -0500
-+++ webp/src/utils/endian_inl.h	2015-11-28 17:10:28.518626048 -0600
+diff -u -r libwebp-0.5.1/src/utils/endian_inl.h webp/src/utils/endian_inl.h
+--- libwebp-0.5.1/src/utils/endian_inl.h	2016-07-06 20:00:16.000000000 -0500
++++ webp/src/utils/endian_inl.h	2016-08-14 18:23:06.889053509 -0500
 @@ -73,7 +73,7 @@
    uint32_t swapped_bytes;
    __asm__ volatile("bswap %0" : "=r"(swapped_bytes) : "0"(x));
@@ -10,9 +10,9 @@
    return (uint32_t)_byteswap_ulong(x);
  #else
    return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24);
-diff -r -u libwebp-0.4.4/src/webp/types.h webp/src/webp/types.h
---- libwebp-0.4.4/src/webp/types.h	2015-10-23 15:20:40.000000000 -0500
-+++ webp/src/webp/types.h	2015-11-28 17:10:28.525461364 -0600
+diff -u -r libwebp-0.5.1/src/webp/types.h webp/src/webp/types.h
+--- libwebp-0.5.1/src/webp/types.h	2016-07-06 20:00:16.000000000 -0500
++++ webp/src/webp/types.h	2016-08-14 18:23:06.889694772 -0500
 @@ -36,6 +36,24 @@
  #define WEBP_INLINE __forceinline
  #endif  /* _MSC_VER */
diff -r 46a5a46d43a3 -r 26f7b4f856a1 webp/AUTHORS
--- a/webp/AUTHORS	Sun Aug 14 17:35:43 2016 -0500
+++ b/webp/AUTHORS	Sun Aug 14 18:42:20 2016 -0500
@@ -7,20 +7,29 @@
 - Johann (johann dot koenig at duck dot com)
 - Jovan Zelincevic (jovan dot zelincevic at imgtec dot com)
 - Jyrki Alakuijala (jyrki at google dot com)
-- levytamar82 (tamar dot levy at intel dot com)
+- Lode Vandevenne (lode at google dot com)
 - Lou Quillio (louquillio at google dot com)
 - Mans Rullgard (mans at mansr dot com)
+- Marcin Kowalczyk (qrczak at google dot com)
 - Martin Olsson (mnemo at minimum dot se)
 - Mikołaj Zalewski (mikolajz at google dot com)
+- Mislav Bradac (mislavm at google dot com)
+- Nico Weber (thakis at chromium dot org)
 - Noel Chromium (noel at chromium dot org)
+- Parag Salasakar (img dot mips1 at gmail dot com)
 - Pascal Massimino (pascal dot massimino at gmail dot com)
 - Paweł Hajdan, Jr (phajdan dot jr at chromium dot org)
 - Pierre Joye (pierre dot php at gmail dot com)
 - Sam Clegg (sbc at chromium dot org)
+- Scott Hancher (seh at google dot com)
 - Scott LaVarnway (slavarnway at google dot com)
 - Scott Talbot (s at chikachow dot org)
 - Slobodan Prijic (slobodan dot prijic at imgtec dot com)
 - Somnath Banerjee (somnath dot banerjee at gmail dot com)
+- Sriraman Tallam (tmsriram at google dot com)
+- Tamar Levy (tamar dot levy at intel dot com)
 - Timothy Gu (timothygu99 at gmail dot com)
 - Urvang Joshi (urvang at google dot com)
 - Vikas Arora (vikasa at google dot com)
+- Vincent Rabaud (vrabaud at google dot com)
+- Yang Zhang (yang dot zhang at arm dot com)
diff -r 46a5a46d43a3 -r 26f7b4f856a1 webp/Android.mk
--- a/webp/Android.mk	Sun Aug 14 17:35:43 2016 -0500
+++ b/webp/Android.mk	Sun Aug 14 18:42:20 2016 -0500
@@ -15,6 +15,7 @@
   # instructions to be generated for armv7a code. Instead target the neon code
   # specifically.
   NEON := c.neon
+  USE_CPUFEATURES := yes
 else
   NEON := c
 endif
@@ -32,34 +33,65 @@
     src/dec/webp.c \
 
 demux_srcs := \
+    src/demux/anim_decode.c \
     src/demux/demux.c \
 
 dsp_dec_srcs := \
     src/dsp/alpha_processing.c \
+    src/dsp/alpha_processing_mips_dsp_r2.c \
     src/dsp/alpha_processing_sse2.c \
+    src/dsp/alpha_processing_sse41.c \
+    src/dsp/argb.c \
+    src/dsp/argb_mips_dsp_r2.c \
+    src/dsp/argb_sse2.c \
     src/dsp/cpu.c \
     src/dsp/dec.c \
     src/dsp/dec_clip_tables.c \
     src/dsp/dec_mips32.c \
+    src/dsp/dec_mips_dsp_r2.c \
+    src/dsp/dec_msa.c \
     src/dsp/dec_neon.$(NEON) \
     src/dsp/dec_sse2.c \
+    src/dsp/dec_sse41.c \
+    src/dsp/filters.c \
+    src/dsp/filters_mips_dsp_r2.c \
+    src/dsp/filters_sse2.c \
     src/dsp/lossless.c \
-    src/dsp/lossless_mips32.c \
+    src/dsp/lossless_mips_dsp_r2.c \
     src/dsp/lossless_neon.$(NEON) \
     src/dsp/lossless_sse2.c \
+    src/dsp/rescaler.c \
+    src/dsp/rescaler_mips32.c \
+    src/dsp/rescaler_mips_dsp_r2.c \
+    src/dsp/rescaler_neon.$(NEON) \
+    src/dsp/rescaler_sse2.c \
     src/dsp/upsampling.c \
+    src/dsp/upsampling_mips_dsp_r2.c \
     src/dsp/upsampling_neon.$(NEON) \
     src/dsp/upsampling_sse2.c \
     src/dsp/yuv.c \
     src/dsp/yuv_mips32.c \
+    src/dsp/yuv_mips_dsp_r2.c \
     src/dsp/yuv_sse2.c \
 
 dsp_enc_srcs := \
+    src/dsp/cost.c \
+    src/dsp/cost_mips32.c \
+    src/dsp/cost_mips_dsp_r2.c \
+    src/dsp/cost_sse2.c \
     src/dsp/enc.c \
     src/dsp/enc_avx2.c \
     src/dsp/enc_mips32.c \
+    src/dsp/enc_mips_dsp_r2.c \
     src/dsp/enc_neon.$(NEON) \
     src/dsp/enc_sse2.c \
+    src/dsp/enc_sse41.c \
+    src/dsp/lossless_enc.c \
+    src/dsp/lossless_enc_mips32.c \
+    src/dsp/lossless_enc_mips_dsp_r2.c \
+    src/dsp/lossless_enc_neon.$(NEON) \
+    src/dsp/lossless_enc_sse2.c \
+    src/dsp/lossless_enc_sse41.c \
 
 enc_srcs := \
     src/enc/alpha.c \
@@ -67,10 +99,12 @@
     src/enc/backward_references.c \
     src/enc/config.c \
     src/enc/cost.c \
+    src/enc/delta_palettization.c \
     src/enc/filter.c \
     src/enc/frame.c \
     src/enc/histogram.c \
     src/enc/iterator.c \
+    src/enc/near_lossless.c \
     src/enc/picture.c \
     src/enc/picture_csp.c \
     src/enc/picture_psnr.c \
@@ -84,6 +118,7 @@
     src/enc/webpenc.c \
 
 mux_srcs := \
+    src/mux/anim_encode.c \
     src/mux/muxedit.c \
     src/mux/muxinternal.c \
     src/mux/muxread.c \
@@ -120,7 +155,9 @@
 # prefer arm over thumb mode for performance gains
 LOCAL_ARM_MODE := arm
 
-LOCAL_STATIC_LIBRARIES := cpufeatures
+ifeq ($(USE_CPUFEATURES),yes)
+  LOCAL_STATIC_LIBRARIES := cpufeatures
+endif
 
 LOCAL_MODULE := webpdecoder_static
 
@@ -212,4 +249,6 @@
 
 include $(LOCAL_PATH)/examples/Android.mk
 
-$(call import-module,android/cpufeatures)
+ifeq ($(USE_CPUFEATURES),yes)
+  $(call import-module,android/cpufeatures)
+endif
diff -r 46a5a46d43a3 -r 26f7b4f856a1 webp/CMakeLists.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/webp/CMakeLists.txt	Sun Aug 14 18:42:20 2016 -0500
@@ -0,0 +1,333 @@
+cmake_minimum_required(VERSION 2.8.7)
+
+project(libwebp C)
+
+# Options for coder / decoder executables.
+option(WEBP_BUILD_CWEBP "Build the cwebp command line tool." OFF)
+option(WEBP_BUILD_DWEBP "Build the dwebp command line tool." OFF)
+option(WEBP_EXPERIMENTAL_FEATURES "Build with experimental features." OFF)
+option(WEBP_FORCE_ALIGNED "Force aligned memory operations." OFF)
+
+set(WEBP_DEP_LIBRARIES)
+set(WEBP_DEP_INCLUDE_DIRS)
+
+if(NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE "Release" CACHE
+    "Build type: Release, Debug or RelWithDebInfo" STRING FORCE
+  )
+endif()
+
+################################################################################
+# Generate the config.h to compile with specific intrinsics / libs.
+
+## Check for compiler options.
+include(CheckCSourceCompiles)
+check_c_source_compiles("
+    int main(void) {
+      (void)__builtin_bswap16(0);
+      return 0;
+    }
+  "
+  HAVE_BUILTIN_BSWAP16
+)
+check_c_source_compiles("
+    int main(void) {
+      (void)__builtin_bswap32(0);
+      return 0;
+    }
+  "
+  HAVE_BUILTIN_BSWAP32
+)
+check_c_source_compiles("
+    int main(void) {
+      (void)__builtin_bswap64(0);
+      return 0;
+    }
+  "
+  HAVE_BUILTIN_BSWAP64
+)
+
+## Check for libraries.
+find_package(Threads)
+if(Threads_FOUND)
+  if(CMAKE_USE_PTHREADS_INIT)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+  endif()
+  foreach(PTHREAD_TEST HAVE_PTHREAD_PRIO_INHERIT PTHREAD_CREATE_UNDETACHED)
+    check_c_source_compiles("
+        #include <pthread.h>
+        int main (void) {
+          int attr = ${PTHREAD_TEST};
+          return attr;
+        }
+      " ${PTHREAD_TEST}
+    )
+  endforeach()
+  list(APPEND WEBP_DEP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+endif()
+set(WEBP_USE_THREAD ${Threads_FOUND})
+
+# TODO: this seems unused, check with autotools.
+set(LT_OBJDIR ".libs/")
+
+# Only useful for vwebp, so useless for now.
+# find_package(OpenGL)
+# set(WEBP_HAVE_GL ${OPENGL_FOUND})
+# set(WEBP_DEP_INCLUDE_DIRS ${WEBP_DEP_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS})
+# set(WEBP_DEP_LIBRARIES ${WEBP_DEP_LIBRARIES} ${OPENGL_LIBRARIES})
+
+# Find the standard C math library.
+find_library(MATH_LIBRARY NAMES m)
+if(MATH_LIBRARY)
+  list(APPEND WEBP_DEP_LIBRARIES ${MATH_LIBRARY})
+endif()
+
+# Find the standard image libraries.
+set(WEBP_DEP_IMG_LIBRARIES)
+set(WEBP_DEP_IMG_INCLUDE_DIRS)
+foreach(I_LIB PNG JPEG TIFF GIF)
+  find_package(${I_LIB})
+  set(WEBP_HAVE_${I_LIB} ${${I_LIB}_FOUND})
+  if(${I_LIB}_FOUND)
+    list(APPEND WEBP_DEP_IMG_LIBRARIES ${${I_LIB}_LIBRARIES})
+    list(APPEND WEBP_DEP_IMG_INCLUDE_DIRS ${${I_LIB}_INCLUDE_DIRS})
+  endif()
+endforeach()
+
+## Check for specific headers.
+include(CheckIncludeFiles)
+check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
+check_include_files(dlfcn.h HAVE_DLFCN_H)
+check_include_files(GLUT/glut.h HAVE_GLUT_GLUT_H)
+check_include_files(GL/glut.h HAVE_GL_GLUT_H)
+check_include_files(inttypes.h HAVE_INTTYPES_H)
+check_include_files(memory.h HAVE_MEMORY_H)
+check_include_files(OpenGL/glut.h HAVE_OPENGL_GLUT_H)
+check_include_files(shlwapi.h HAVE_SHLWAPI_H)
+check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(stdlib.h HAVE_STDLIB_H)
+check_include_files(strings.h HAVE_STRINGS_H)
+check_include_files(string.h HAVE_STRING_H)
+check_include_files(sys/stat.h HAVE_SYS_STAT_H)
+check_include_files(sys/types.h HAVE_SYS_TYPES_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
+check_include_files(wincodec.h HAVE_WINCODEC_H)
+check_include_files(windows.h HAVE_WINDOWS_H)
+
+# Windows specifics
+if(HAVE_WINCODEC_H)
+  list(APPEND WEBP_DEP_LIBRARIES shlwapi ole32 windowscodecs)
+endif()
+
+## Check for SIMD extensions.
+set(WEBP_SIMD_FLAGS "SSE2;SSE41;AVX2")
+set(WEBP_SIMD_FILE_EXTENSIONS "_sse2.c;_sse41.c;_avx2.c")
+if(MSVC)
+  # MSVC does not have a SSE4 flag but AVX2 support implies
+  # SSE4 support.
+  set(SIMD_ENABLE_FLAGS "/arch:SSE2;/arch:AVX2;/arch:AVX2")
+  set(SIMD_DISABLE_FLAGS)
+else()
+  set(SIMD_ENABLE_FLAGS "-msse2;-msse4.1;-mavx2")
+  set(SIMD_DISABLE_FLAGS "-mno-sse2;-mno-sse4.1;-mno-avx2")
+endif()
+
+set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
+set(WEBP_SIMD_FILES_TO_INCLUDE)
+set(WEBP_SIMD_FLAGS_TO_INCLUDE)
+
+list(LENGTH WEBP_SIMD_FLAGS WEBP_SIMD_FLAGS_LENGTH)
+math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
+
+foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
+  list(GET WEBP_SIMD_FLAGS ${I_SIMD} WEBP_SIMD_FLAG)
+  list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
+  set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
+  check_c_source_compiles("
+      #include \"${CMAKE_CURRENT_LIST_DIR}/src/dsp/dsp.h\"
+      int main(void) {
+        #if !defined(WEBP_USE_${WEBP_SIMD_FLAG})
+        this is not valid code
+        #endif
+        return 0;
+      }
+    "
+    WEBP_HAVE_${WEBP_SIMD_FLAG}
+  )
+
+  # Check which files we should include or not.
+  list(GET WEBP_SIMD_FILE_EXTENSIONS ${I_SIMD} WEBP_SIMD_FILE_EXTENSION)
+  file(GLOB SIMD_FILES RELATIVE ${CMAKE_CURRENT_LIST_DIR}
+    "${CMAKE_CURRENT_SOURCE_DIR}/src/dsp/*${WEBP_SIMD_FILE_EXTENSION}"
+  )
+  if(WEBP_HAVE_${WEBP_SIMD_FLAG})
+    # Memorize the file and flags.
+    foreach(FILE ${SIMD_FILES})
+      list(APPEND WEBP_SIMD_FILES_TO_INCLUDE ${FILE})
+      list(APPEND WEBP_SIMD_FLAGS_TO_INCLUDE ${SIMD_COMPILE_FLAG})
+    endforeach()
+  else()
+    # Remove the file from the list.
+    foreach(FILE ${SIMD_FILES})
+      list(APPEND WEBP_SIMD_FILES_NOT_TO_INCLUDE ${FILE})
+    endforeach()
+    # Explicitly disable SIMD.
+    if(SIMD_DISABLE_FLAGS)
+      list(GET SIMD_DISABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
+      include(CheckCCompilerFlag)
+      check_c_compiler_flag(${SIMD_COMPILE_FLAG} HAS_COMPILE_FLAG)
+      if(HAS_COMPILE_FLAG)
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SIMD_COMPILE_FLAG}")
+      endif()
+    endif()
+  endif()
+endforeach()
+
+## Define extra info.
+set(PACKAGE ${PROJECT_NAME})
+set(PACKAGE_NAME ${PROJECT_NAME})
+
+# Read from configure.ac.
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac CONFIGURE_AC)
+string(REGEX MATCHALL "\\[([0-9a-z\\.:/]*)\\]"
+  CONFIGURE_AC_PACKAGE_INFO ${CONFIGURE_AC}
+)
+function(strip_bracket VAR)
+  string(LENGTH ${${VAR}} TMP_LEN)
+  math(EXPR TMP_LEN ${TMP_LEN}-2)
+  string(SUBSTRING ${${VAR}} 1 ${TMP_LEN} TMP_SUB)
+  set(${VAR} ${TMP_SUB} PARENT_SCOPE)
+endfunction()
+
+list(GET CONFIGURE_AC_PACKAGE_INFO 1 PACKAGE_VERSION)
+strip_bracket(PACKAGE_VERSION)
+list(GET CONFIGURE_AC_PACKAGE_INFO 2 PACKAGE_BUGREPORT)
+strip_bracket(PACKAGE_BUGREPORT)
+list(GET CONFIGURE_AC_PACKAGE_INFO 3 PACKAGE_URL)
+strip_bracket(PACKAGE_URL)
+
+# Build more info.
+set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set(PACKAGE_TARNAME ${PACKAGE_NAME})
+set(VERSION ${PACKAGE_VERSION})
+
+## Generate the config.h header.
+configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/config.h.in
+  ${CMAKE_CURRENT_BINARY_DIR}/include/webp/config.h)
+add_definitions(-DHAVE_CONFIG_H)
+# The webp folder is included as we reference config.h as
+# ../webp/config.h or webp/config.h
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/include
+  ${CMAKE_CURRENT_BINARY_DIR}/include/webp
+)
+
+
+################################################################################
+# WebP source files.
+# Read the Makefile.am to get the source files.
+set(WEBP_SRCS)
+
+function(parse_Makefile_am FOLDER WEBP_SRCS)
+  file(READ ${FOLDER}/Makefile.am MAKEFILE_AM)
+  string(REGEX MATCHALL "_SOURCES \\+= [^\n]*"
+    FILES_PER_LINE ${MAKEFILE_AM}
+  )
+  set(SRCS ${WEBP_SRCS})
+  foreach(FILES ${FILES_PER_LINE})
+    string(SUBSTRING ${FILES} 12 -1 FILES)
+    string(REGEX MATCHALL "[0-9a-z\\._]+"
+      FILES ${FILES}
+    )
+    foreach(FILE ${FILES})
+      list(APPEND SRCS ${FOLDER}/${FILE})
+    endforeach()
+  endforeach()
+  set(WEBP_SRCS ${SRCS} PARENT_SCOPE)
+endfunction()
+
+parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/dec "${WEBP_SRCS}")
+parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/demux "${WEBP_SRCS}")
+parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/dsp "${WEBP_SRCS}")
+parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/enc "${WEBP_SRCS}")
+parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/utils "${WEBP_SRCS}")
+
+# Remove the files specific to SIMD we don't user.
+foreach(FILE ${WEBP_SIMD_FILES_NOT_TO_INCLUDE})
+  list(REMOVE_ITEM WEBP_SRCS ${FILE})
+endforeach()
+
+# Build the library.
+add_definitions(-Wall)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/ ${WEBP_DEP_INCLUDE_DIRS})
+add_library(webp ${WEBP_SRCS})
+target_link_libraries(webp ${WEBP_DEP_LIBRARIES})
+
+# Change the compile flags for SIMD files we use.
+list(LENGTH WEBP_SIMD_FILES_TO_INCLUDE WEBP_SIMD_FILES_TO_INCLUDE_LENGTH)
+math(EXPR WEBP_SIMD_FILES_TO_INCLUDE_RANGE
+  "${WEBP_SIMD_FILES_TO_INCLUDE_LENGTH}-1"
+)
+
+foreach(I_FILE RANGE ${WEBP_SIMD_FILES_TO_INCLUDE_RANGE})
+  list(GET WEBP_SIMD_FILES_TO_INCLUDE ${I_FILE} FILE)
+  list(GET WEBP_SIMD_FLAGS_TO_INCLUDE ${I_FILE} SIMD_COMPILE_FLAG)
+  set_source_files_properties(${FILE} PROPERTIES
+    COMPILE_FLAGS ${SIMD_COMPILE_FLAG}
+  )
+endforeach()
+
+# Build the executables if asked for.
+if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP)
+  # Example utility library.
+  set(exampleutil_SRCS
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/example_util.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/example_util.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h)
+  add_library(exampleutil ${exampleutil_SRCS})
+  target_link_libraries(exampleutil webp ${WEBP_DEP_LIBRARIES})
+endif()
+
+if(WEBP_BUILD_CWEBP)
+  # Image-decoding utility library.
+  set(exampledec_SRCS
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/image_dec.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/image_dec.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/jpegdec.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/jpegdec.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/metadata.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/metadata.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/pngdec.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/pngdec.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/tiffdec.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/tiffdec.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/webpdec.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/webpdec.h
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/wicdec.c
+    ${CMAKE_CURRENT_SOURCE_DIR}/examples/wicdec.h)
+  add_library(exampledec ${exampledec_SRCS})

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Graphicsmagick-commit mailing list
Graphicsmagick-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic