Hello community,

here is the log from the commit of package libwebp for openSUSE:Factory checked 
in at 2012-12-14 09:41:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libwebp (Old)
 and      /work/SRC/openSUSE:Factory/.libwebp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libwebp", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/libwebp/libwebp.changes  2012-09-10 
15:20:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libwebp.new/libwebp.changes     2012-12-14 
09:42:01.000000000 +0100
@@ -1,0 +2,19 @@
+Sun Dec  9 13:21:00 UTC 2012 - [email protected]
+
+- Update to version 0.2.1
+* libwebp: validate chunk size in ParseOptionalChunks
+* cwebp (windows): fix alpha image import on XP
+* autoconf/libwebp: enable dll builds for mingw
+* [cd]webp: always output windows errors
+* fix double to float conversion warning
+* cwebp: fix jpg encodes on XP
+* VP8LAllocateHistogramSet: fix overflow in size calculation
+* GetHistoBits: fix integer overflow
+* EncodeImageInternal: fix uninitialized free
+* fix the -g/O3 discrepancy for 32bit compile
+* fix the BITS=8 case
+* Make *InitSSE2() functions be empty on non-SSE2 platform
+* make *InitSSE2() functions be empty on non-SSE2 platform
+* make VP8DspInitNEON() public
+
+-------------------------------------------------------------------

Old:
----
  libwebp-0.2.0.tar.gz

New:
----
  libwebp-0.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libwebp.spec ++++++
--- /var/tmp/diff_new_pack.PPsTqE/_old  2012-12-14 09:42:03.000000000 +0100
+++ /var/tmp/diff_new_pack.PPsTqE/_new  2012-12-14 09:42:03.000000000 +0100
@@ -18,7 +18,7 @@
 
 Name:           libwebp
 %define lname  libwebp4
-Version:        0.2.0
+Version:        0.2.1
 Release:        0
 Url:            https://developers.google.com/speed/webp/
 Summary:        Library and tools for the WebP graphics format

++++++ libwebp-0.2.0.tar.gz -> libwebp-0.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/ChangeLog new/libwebp-0.2.1/ChangeLog
--- old/libwebp-0.2.0/ChangeLog 2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/ChangeLog 2012-10-31 00:32:36.000000000 +0100
@@ -1,3 +1,21 @@
+abc0604 Merge "update NEWS" into 0.2.0
+57cf313 update NEWS
+25f585c bump version to 0.2.1
+fed7c04 libwebp: validate chunk size in ParseOptionalChunks
+552cd9b cwebp (windows): fix alpha image import on XP
+b14fea9 autoconf/libwebp: enable dll builds for mingw
+4a8fb27 [cd]webp: always output windows errors
+d662158 fix double to float conversion warning
+72b96a6 cwebp: fix jpg encodes on XP
+734f762 VP8LAllocateHistogramSet: fix overflow in size calculation
+f9cb58f GetHistoBits: fix integer overflow
+b30add2 EncodeImageInternal: fix uninitialized free
+3de58d7 fix the -g/O3 discrepancy for 32bit compile
+77aa7d5 fix the BITS=8 case
+e5970bd Make *InitSSE2() functions be empty on non-SSE2 platform
+ef5cc47 make *InitSSE2() functions be empty on non-SSE2 platform
+c4ea259 make VP8DspInitNEON() public
+4238bc0 Update ChangeLog (v0.2.0)
 c655380 dec/io.c: cosmetics
 fe1958f RGBA4444: harmonize lossless/lossy alpha values
 681cb30 fix RGBA4444 output w/fancy upsampling
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/NEWS new/libwebp-0.2.1/NEWS
--- old/libwebp-0.2.0/NEWS      2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/NEWS      2012-10-31 00:32:36.000000000 +0100
@@ -1,3 +1,8 @@
+- 10/30/12: version 0.2.1
+  * Various security related fixes
+  * cwebp.exe: fix import errors on Windows XP
+  * enable DLL builds for mingw targets
+
 - 8/3/12: version 0.2.0
   * Add support for ARGB -> YUVA conversion for lossless decoder
     New functions: WebPINewYUVA, WebPIDecGetYUVA
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/README new/libwebp-0.2.1/README
--- old/libwebp-0.2.0/README    2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/README    2012-10-31 00:32:36.000000000 +0100
@@ -4,7 +4,7 @@
           \__\__/\____/\_____/__/ ____  ___
                 / _/ /    \    \ /  _ \/ _/
                /  \_/   / /   \ \   __/  \__
-               \____/____/\_____/_____/____/v0.2.0
+               \____/____/\_____/_____/____/v0.2.1
 
 Description:
 ============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/configure new/libwebp-0.2.1/configure
--- old/libwebp-0.2.0/configure 2012-08-17 01:24:05.000000000 +0200
+++ new/libwebp-0.2.1/configure 2012-10-31 01:39:08.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for libwebp 0.2.0.
+# Generated by GNU Autoconf 2.65 for libwebp 0.2.1.
 #
 # Report bugs to <http://code.google.com/p/webp/issues>.
 #
@@ -701,8 +701,8 @@
 # Identity of this package.
 PACKAGE_NAME='libwebp'
 PACKAGE_TARNAME='libwebp'
-PACKAGE_VERSION='0.2.0'
-PACKAGE_STRING='libwebp 0.2.0'
+PACKAGE_VERSION='0.2.1'
+PACKAGE_STRING='libwebp 0.2.1'
 PACKAGE_BUGREPORT='http://code.google.com/p/webp/issues'
 PACKAGE_URL='http://developers.google.com/speed/webp'
 
@@ -1444,7 +1444,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libwebp 0.2.0 to adapt to many kinds of systems.
+\`configure' configures libwebp 0.2.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1515,7 +1515,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libwebp 0.2.0:";;
+     short | recursive ) echo "Configuration of libwebp 0.2.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1631,7 +1631,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libwebp configure 0.2.0
+libwebp configure 0.2.1
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2002,7 +2002,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libwebp $as_me 0.2.0, which was
+It was created by libwebp $as_me 0.2.1, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -2920,7 +2920,7 @@
 
 # Define the identity of the package.
  PACKAGE='libwebp'
- VERSION='0.2.0'
+ VERSION='0.2.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12036,7 +12036,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libwebp $as_me 0.2.0, which was
+This file was extended by libwebp $as_me 0.2.1, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12103,7 +12103,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libwebp config.status 0.2.0
+libwebp config.status 0.2.1
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/configure.ac 
new/libwebp-0.2.1/configure.ac
--- old/libwebp-0.2.0/configure.ac      2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/configure.ac      2012-10-31 00:32:36.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([libwebp], [0.2.0],
+AC_INIT([libwebp], [0.2.1],
         [http://code.google.com/p/webp/issues],,
         [http://developers.google.com/speed/webp])
 AC_CANONICAL_TARGET
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/examples/cwebp.c 
new/libwebp-0.2.1/examples/cwebp.c
--- old/libwebp-0.2.0/examples/cwebp.c  2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/examples/cwebp.c  2012-10-31 00:32:36.000000000 +0100
@@ -95,14 +95,12 @@
 
 #ifdef HAVE_WINCODEC_H
 
-#define IFS(fn)                \
-  do {                         \
-     if (SUCCEEDED(hr))        \
-     {                         \
-        hr = (fn);             \
-        if (FAILED(hr) && verbose)           \
-          fprintf(stderr, #fn " failed %08x\n", hr);  \
-     }                         \
+#define IFS(fn)                                                     \
+  do {                                                              \
+     if (SUCCEEDED(hr)) {                                           \
+        hr = (fn);                                                  \
+        if (FAILED(hr)) fprintf(stderr, #fn " failed %08x\n", hr);  \
+     }                                                              \
   } while (0)
 
 // modified version of DEFINE_GUID from guiddef.h.
@@ -115,6 +113,12 @@
 #define MAKE_REFGUID(x) &(x)
 #endif
 
+typedef struct WICFormatImporter {
+  const GUID* pixel_format;
+  int bytes_per_pixel;
+  int (*import)(WebPPicture* const, const uint8_t* const, int);
+} WICFormatImporter;
+
 static HRESULT OpenInputStream(const char* filename, IStream** ppStream) {
   HRESULT hr = S_OK;
   IFS(SHCreateStreamOnFileA(filename, STGM_READ, ppStream));
@@ -125,6 +129,31 @@
 
 static HRESULT ReadPictureWithWIC(const char* filename,
                                   WebPPicture* const pic, int keep_alpha) {
+  // From Microsoft SDK 7.0a -- wincodec.h
+  // Create local copies for compatibility when building against earlier
+  // versions of the SDK.
+  WEBP_DEFINE_GUID(GUID_WICPixelFormat24bppBGR_,
+                   0x6fddc324, 0x4e03, 0x4bfe,
+                   0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c);
+  WEBP_DEFINE_GUID(GUID_WICPixelFormat24bppRGB_,
+                   0x6fddc324, 0x4e03, 0x4bfe,
+                   0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d);
+  WEBP_DEFINE_GUID(GUID_WICPixelFormat32bppBGRA_,
+                   0x6fddc324, 0x4e03, 0x4bfe,
+                   0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f);
+  WEBP_DEFINE_GUID(GUID_WICPixelFormat32bppRGBA_,
+                   0xf5c7ad2d, 0x6a8d, 0x43dd,
+                   0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9);
+  const WICFormatImporter alphaFormatImporters[] = {
+    { &GUID_WICPixelFormat32bppBGRA_, 4, WebPPictureImportBGRA },
+    { &GUID_WICPixelFormat32bppRGBA_, 4, WebPPictureImportRGBA },
+    { NULL, 0, NULL },
+  };
+  const WICFormatImporter nonAlphaFormatImporters[] = {
+    { &GUID_WICPixelFormat24bppBGR_, 3, WebPPictureImportBGR },
+    { &GUID_WICPixelFormat24bppRGB_, 3, WebPPictureImportRGB },
+    { NULL, 0, NULL },
+  };
   HRESULT hr = S_OK;
   IWICBitmapFrameDecode* pFrame = NULL;
   IWICFormatConverter* pConverter = NULL;
@@ -135,6 +164,7 @@
   UINT width = 0, height = 0;
   BYTE* rgb = NULL;
   WICPixelFormatGUID srcPixelFormat = { 0 };
+  const WICFormatImporter* importer = NULL;
   GUID srcContainerFormat = { 0 };
   const GUID* alphaContainers[] = {
     &GUID_ContainerFormatBmp,
@@ -143,18 +173,6 @@
   };
   int has_alpha = 0;
   int i, stride;
-  // From Microsoft SDK 7.0a
-  // Create local copies for compatibility when building against earlier
-  // versions of the SDK.
-  WEBP_DEFINE_GUID(GUID_WICPixelFormat24bppRGB_,
-                   0x6fddc324, 0x4e03, 0x4bfe,
-                   0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d);
-  WEBP_DEFINE_GUID(GUID_WICPixelFormat32bppRGBA_,
-                   0xf5c7ad2d, 0x6a8d, 0x43dd,
-                   0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9);
-  WEBP_DEFINE_GUID(GUID_WICPixelFormat32bppBGRA_,
-                   0x6fddc324, 0x4e03, 0x4bfe,
-                   0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f);
 
   IFS(CoInitialize(NULL));
   IFS(CoCreateInstance(MAKE_REFGUID(CLSID_WICImagingFactory), NULL,
@@ -179,32 +197,45 @@
   IFS(IWICBitmapFrameDecode_GetPixelFormat(pFrame, &srcPixelFormat));
   IFS(IWICBitmapDecoder_GetContainerFormat(pDecoder, &srcContainerFormat));
 
-  has_alpha = keep_alpha;
-  for (i = 0;
-       has_alpha && i < sizeof(alphaContainers)/sizeof(alphaContainers[0]);
-       ++i) {
-    if (IsEqualGUID(MAKE_REFGUID(srcContainerFormat),
-                    MAKE_REFGUID(*alphaContainers[i]))) {
-      has_alpha =
-          IsEqualGUID(MAKE_REFGUID(srcPixelFormat),
-                      MAKE_REFGUID(GUID_WICPixelFormat32bppRGBA_)) ||
-          IsEqualGUID(MAKE_REFGUID(srcPixelFormat),
-                      MAKE_REFGUID(GUID_WICPixelFormat32bppBGRA_));
-      break;
+  if (keep_alpha) {
+    for (i = 0;
+         i < sizeof(alphaContainers) / sizeof(alphaContainers[0]);
+         ++i) {
+      if (IsEqualGUID(MAKE_REFGUID(srcContainerFormat),
+                      MAKE_REFGUID(*alphaContainers[i]))) {
+        has_alpha =
+            IsEqualGUID(MAKE_REFGUID(srcPixelFormat),
+                        MAKE_REFGUID(GUID_WICPixelFormat32bppRGBA_)) ||
+            IsEqualGUID(MAKE_REFGUID(srcPixelFormat),
+                        MAKE_REFGUID(GUID_WICPixelFormat32bppBGRA_));
+        break;
+      }
     }
   }
 
   // Prepare for pixel format conversion (if necessary).
   IFS(IWICImagingFactory_CreateFormatConverter(pFactory, &pConverter));
+
+  for (importer = has_alpha ? alphaFormatImporters : nonAlphaFormatImporters;
+       hr == S_OK && importer->import != NULL; ++importer) {
+    BOOL canConvert;
+    const HRESULT cchr = IWICFormatConverter_CanConvert(
+        pConverter,
+        MAKE_REFGUID(srcPixelFormat),
+        MAKE_REFGUID(*importer->pixel_format),
+        &canConvert);
+    if (SUCCEEDED(cchr) && canConvert) break;
+  }
+  if (importer->import == NULL) hr = E_FAIL;
+
   IFS(IWICFormatConverter_Initialize(pConverter, (IWICBitmapSource*)pFrame,
-          has_alpha ? MAKE_REFGUID(GUID_WICPixelFormat32bppRGBA_)
-                    : MAKE_REFGUID(GUID_WICPixelFormat24bppRGB_),
+          importer->pixel_format,
           WICBitmapDitherTypeNone,
           NULL, 0.0, WICBitmapPaletteTypeCustom));
 
   // Decode.
   IFS(IWICFormatConverter_GetSize(pConverter, &width, &height));
-  stride = (has_alpha ? 4 : 3) * width * sizeof(*rgb);
+  stride = importer->bytes_per_pixel * width * sizeof(*rgb);
   if (SUCCEEDED(hr)) {
     rgb = (BYTE*)malloc(stride * height);
     if (rgb == NULL)
@@ -218,8 +249,7 @@
     int ok;
     pic->width = width;
     pic->height = height;
-    ok = has_alpha ? WebPPictureImportRGBA(pic, rgb, stride)
-                   : WebPPictureImportRGB(pic, rgb, stride);
+    ok = importer->import(pic, rgb, stride);
     if (!ok)
       hr = E_FAIL;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/examples/dwebp.c 
new/libwebp-0.2.1/examples/dwebp.c
--- old/libwebp-0.2.0/examples/dwebp.c  2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/examples/dwebp.c  2012-10-31 00:32:36.000000000 +0100
@@ -67,14 +67,12 @@
 
 #ifdef HAVE_WINCODEC_H
 
-#define IFS(fn)                \
-  do {                         \
-     if (SUCCEEDED(hr))        \
-     {                         \
-        hr = (fn);             \
-        if (FAILED(hr) && verbose)           \
-          fprintf(stderr, #fn " failed %08x\n", hr);  \
-     }                         \
+#define IFS(fn)                                                     \
+  do {                                                              \
+     if (SUCCEEDED(hr)) {                                           \
+        hr = (fn);                                                  \
+        if (FAILED(hr)) fprintf(stderr, #fn " failed %08x\n", hr);  \
+     }                                                              \
   } while (0)
 
 #ifdef __cplusplus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/Makefile.am 
new/libwebp-0.2.1/src/Makefile.am
--- old/libwebp-0.2.0/src/Makefile.am   2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/src/Makefile.am   2012-10-31 00:32:36.000000000 +0100
@@ -20,7 +20,11 @@
 libwebp_la_LIBADD += enc/libwebpencode.la
 libwebp_la_LIBADD += utils/libwebputils.la
 
-libwebp_la_LDFLAGS = -version-info 4:0:0
+# Use '-no-undefined' to declare that libwebp does not depend on any libraries
+# other than the ones listed on the command line, i.e., after linking, it will
+# not have unresolved symbols. Some platforms (Windows among them) require all
+# symbols in shared libraries to be resolved at library creation.
+libwebp_la_LDFLAGS = -no-undefined -version-info 4:1:0
 libwebpincludedir = $(includedir)/webp
 
 pkgconfig_DATA = libwebp.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/Makefile.in 
new/libwebp-0.2.1/src/Makefile.in
--- old/libwebp-0.2.0/src/Makefile.in   2012-08-17 01:24:06.000000000 +0200
+++ new/libwebp-0.2.1/src/Makefile.in   2012-10-31 01:39:09.000000000 +0100
@@ -292,7 +292,12 @@
 noinst_HEADERS = webp/format_constants.h
 libwebp_la_LIBADD = dec/libwebpdecode.la dsp/libwebpdsp.la \
        enc/libwebpencode.la utils/libwebputils.la
-libwebp_la_LDFLAGS = -version-info 4:0:0
+
+# Use '-no-undefined' to declare that libwebp does not depend on any libraries
+# other than the ones listed on the command line, i.e., after linking, it will
+# not have unresolved symbols. Some platforms (Windows among them) require all
+# symbols in shared libraries to be resolved at library creation.
+libwebp_la_LDFLAGS = -no-undefined -version-info 4:1:0
 libwebpincludedir = $(includedir)/webp
 pkgconfig_DATA = libwebp.pc
 all: all-recursive
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/dec/vp8i.h 
new/libwebp-0.2.1/src/dec/vp8i.h
--- old/libwebp-0.2.0/src/dec/vp8i.h    2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/src/dec/vp8i.h    2012-10-31 00:32:36.000000000 +0100
@@ -28,7 +28,7 @@
 // version numbers
 #define DEC_MAJ_VERSION 0
 #define DEC_MIN_VERSION 2
-#define DEC_REV_VERSION 0
+#define DEC_REV_VERSION 1
 
 #define ONLY_KEYFRAME_CODE      // to remove any code related to P-Frames
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/dec/webp.c 
new/libwebp-0.2.1/src/dec/webp.c
--- old/libwebp-0.2.0/src/dec/webp.c    2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/src/dec/webp.c    2012-10-31 00:32:36.000000000 +0100
@@ -76,6 +76,9 @@
       if (size < TAG_SIZE + CHUNK_HEADER_SIZE) {
         return VP8_STATUS_BITSTREAM_ERROR;
       }
+      if (size > MAX_CHUNK_PAYLOAD) {
+        return VP8_STATUS_BITSTREAM_ERROR;
+      }
       // We have a RIFF container. Skip it.
       *riff_size = size;
       *data += RIFF_HEADER_SIZE;
@@ -177,6 +180,9 @@
     }
 
     chunk_size = get_le32(buf + TAG_SIZE);
+    if (chunk_size > MAX_CHUNK_PAYLOAD) {
+      return VP8_STATUS_BITSTREAM_ERROR;          // Not a valid chunk size.
+    }
     // For odd-sized chunk-payload, there's one byte padding at the end.
     disk_chunk_size = (CHUNK_HEADER_SIZE + chunk_size + 1) & ~1;
     total_size += disk_chunk_size;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/dsp/dec_neon.c 
new/libwebp-0.2.1/src/dsp/dec_neon.c
--- old/libwebp-0.2.0/src/dsp/dec_neon.c        2012-08-16 07:49:03.000000000 
+0200
+++ new/libwebp-0.2.1/src/dsp/dec_neon.c        2012-10-31 00:32:36.000000000 
+0100
@@ -12,14 +12,14 @@
 
 #include "./dsp.h"
 
-#if defined(WEBP_USE_NEON)
-
-#include "../dec/vp8i.h"
-
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
 
+#if defined(WEBP_USE_NEON)
+
+#include "../dec/vp8i.h"
+
 #define QRegs "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7",                  
\
               "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15"
 
@@ -311,19 +311,24 @@
   }
 }
 
+#endif   // WEBP_USE_NEON
+
+//------------------------------------------------------------------------------
+// Entry point
+
 extern void VP8DspInitNEON(void);
 
 void VP8DspInitNEON(void) {
+#if defined(WEBP_USE_NEON)
   VP8Transform = TransformTwoNEON;
 
   VP8SimpleVFilter16 = SimpleVFilter16NEON;
   VP8SimpleHFilter16 = SimpleHFilter16NEON;
   VP8SimpleVFilter16i = SimpleVFilter16iNEON;
   VP8SimpleHFilter16i = SimpleHFilter16iNEON;
+#endif   // WEBP_USE_NEON
 }
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }    // extern "C"
 #endif
-
-#endif   // WEBP_USE_NEON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/dsp/dec_sse2.c 
new/libwebp-0.2.1/src/dsp/dec_sse2.c
--- old/libwebp-0.2.0/src/dsp/dec_sse2.c        2012-08-16 07:49:03.000000000 
+0200
+++ new/libwebp-0.2.1/src/dsp/dec_sse2.c        2012-10-31 00:32:36.000000000 
+0100
@@ -12,15 +12,15 @@
 
 #include "./dsp.h"
 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
 #if defined(WEBP_USE_SSE2)
 
 #include <emmintrin.h>
 #include "../dec/vp8i.h"
 
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
 
//------------------------------------------------------------------------------
 // Transforms (Paragraph 14.4)
 
@@ -876,9 +876,15 @@
   Store16x4(u, v, stride, &p1, &p0, &q0, &q1);
 }
 
+#endif   // WEBP_USE_SSE2
+
+//------------------------------------------------------------------------------
+// Entry point
+
 extern void VP8DspInitSSE2(void);
 
 void VP8DspInitSSE2(void) {
+#if defined(WEBP_USE_SSE2)
   VP8Transform = TransformSSE2;
 
   VP8VFilter16 = VFilter16SSE2;
@@ -894,10 +900,9 @@
   VP8SimpleHFilter16 = SimpleHFilter16SSE2;
   VP8SimpleVFilter16i = SimpleVFilter16iSSE2;
   VP8SimpleHFilter16i = SimpleHFilter16iSSE2;
+#endif   // WEBP_USE_SSE2
 }
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }    // extern "C"
 #endif
-
-#endif   // WEBP_USE_SSE2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/dsp/enc_sse2.c 
new/libwebp-0.2.1/src/dsp/enc_sse2.c
--- old/libwebp-0.2.0/src/dsp/enc_sse2.c        2012-08-16 07:49:03.000000000 
+0200
+++ new/libwebp-0.2.1/src/dsp/enc_sse2.c        2012-10-31 00:32:36.000000000 
+0100
@@ -11,16 +11,16 @@
 
 #include "./dsp.h"
 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
 #if defined(WEBP_USE_SSE2)
 #include <stdlib.h>  // for abs()
 #include <emmintrin.h>
 
 #include "../enc/vp8enci.h"
 
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
 
//------------------------------------------------------------------------------
 // Compute susceptibility based on DCT-coeff histograms:
 // the higher, the "easier" the macroblock is to compress.
@@ -819,8 +819,15 @@
   }
 }
 
+#endif   // WEBP_USE_SSE2
+
+//------------------------------------------------------------------------------
+// Entry point
+
 extern void VP8EncDspInitSSE2(void);
+
 void VP8EncDspInitSSE2(void) {
+#if defined(WEBP_USE_SSE2)
   VP8CollectHistogram = CollectHistogramSSE2;
   VP8EncQuantizeBlock = QuantizeBlockSSE2;
   VP8ITransform = ITransformSSE2;
@@ -828,10 +835,9 @@
   VP8SSE4x4 = SSE4x4SSE2;
   VP8TDisto4x4 = Disto4x4SSE2;
   VP8TDisto16x16 = Disto16x16SSE2;
+#endif   // WEBP_USE_SSE2
 }
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }    // extern "C"
 #endif
-
-#endif   // WEBP_USE_SSE2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/dsp/upsampling_sse2.c 
new/libwebp-0.2.1/src/dsp/upsampling_sse2.c
--- old/libwebp-0.2.0/src/dsp/upsampling_sse2.c 2012-08-16 07:49:03.000000000 
+0200
+++ new/libwebp-0.2.1/src/dsp/upsampling_sse2.c 2012-10-31 00:32:36.000000000 
+0100
@@ -11,6 +11,10 @@
 
 #include "./dsp.h"
 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
 #if defined(WEBP_USE_SSE2)
 
 #include <assert.h>
@@ -18,10 +22,6 @@
 #include <string.h>
 #include "./yuv.h"
 
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
 #ifdef FANCY_UPSAMPLING
 
 // We compute (9*a + 3*b + 3*c + d + 8) / 16 as follows
@@ -184,26 +184,32 @@
 #undef CONVERT2RGB
 #undef SSE2_UPSAMPLE_FUNC
 
+#endif  // FANCY_UPSAMPLING
+
+#endif   // WEBP_USE_SSE2
+
 
//------------------------------------------------------------------------------
 
 extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */];
 
 void WebPInitUpsamplersSSE2(void) {
+#if defined(WEBP_USE_SSE2)
   WebPUpsamplers[MODE_RGB]  = UpsampleRgbLinePairSSE2;
   WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePairSSE2;
   WebPUpsamplers[MODE_BGR]  = UpsampleBgrLinePairSSE2;
   WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePairSSE2;
+#endif   // WEBP_USE_SSE2
 }
 
 void WebPInitPremultiplySSE2(void) {
+#if defined(WEBP_USE_SSE2)
   WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePairSSE2;
   WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePairSSE2;
+#endif   // WEBP_USE_SSE2
 }
 
-#endif  // FANCY_UPSAMPLING
-
 #if defined(__cplusplus) || defined(c_plusplus)
 }    // extern "C"
 #endif
 
-#endif   // WEBP_USE_SSE2
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/enc/backward_references.c 
new/libwebp-0.2.1/src/enc/backward_references.c
--- old/libwebp-0.2.0/src/enc/backward_references.c     2012-08-16 
07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/src/enc/backward_references.c     2012-10-31 
00:32:36.000000000 +0100
@@ -459,8 +459,8 @@
   const int quality = 100;
   const int pix_count = xsize * ysize;
   const int use_color_cache = (cache_bits > 0);
-  double* const cost =
-      (double*)WebPSafeMalloc((uint64_t)pix_count, sizeof(*cost));
+  float* const cost =
+      (float*)WebPSafeMalloc((uint64_t)pix_count, sizeof(*cost));
   CostModel* cost_model = (CostModel*)malloc(sizeof(*cost_model));
   HashChain* hash_chain = (HashChain*)malloc(sizeof(*hash_chain));
   VP8LColorCache hashers;
@@ -481,7 +481,7 @@
     goto Error;
   }
 
-  for (i = 0; i < pix_count; ++i) cost[i] = 1e100;
+  for (i = 0; i < pix_count; ++i) cost[i] = 1e38f;
 
   // We loop one pixel at a time, but store all currently best points to
   // non-processed locations from this point.
@@ -509,10 +509,9 @@
             prev_cost + GetDistanceCost(cost_model, code);
         int k;
         for (k = 1; k < len; ++k) {
-          const double cost_val =
-              distance_cost + GetLengthCost(cost_model, k);
+          const double cost_val = distance_cost + GetLengthCost(cost_model, k);
           if (cost[i + k] > cost_val) {
-            cost[i + k] = cost_val;
+            cost[i + k] = (float)cost_val;
             dist_array[i + k] = k + 1;
           }
         }
@@ -554,7 +553,7 @@
         cost_val += GetLiteralCost(cost_model, argb[i]) * mul1;
       }
       if (cost[i] > cost_val) {
-        cost[i] = cost_val;
+        cost[i] = (float)cost_val;
         dist_array[i] = 1;  // only one is inserted.
       }
       if (use_color_cache) VP8LColorCacheInsert(&hashers, argb[i]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/enc/histogram.c 
new/libwebp-0.2.1/src/enc/histogram.c
--- old/libwebp-0.2.0/src/enc/histogram.c       2012-08-16 07:49:03.000000000 
+0200
+++ new/libwebp-0.2.1/src/enc/histogram.c       2012-10-31 00:32:36.000000000 
+0100
@@ -55,9 +55,9 @@
   int i;
   VP8LHistogramSet* set;
   VP8LHistogram* bulk;
-  const uint64_t total_size = (uint64_t)sizeof(*set)
-                            + size * sizeof(*set->histograms)
-                            + size * sizeof(**set->histograms);
+  const uint64_t total_size = sizeof(*set)
+                            + (uint64_t)size * sizeof(*set->histograms)
+                            + (uint64_t)size * sizeof(**set->histograms);
   uint8_t* memory = (uint8_t*)WebPSafeMalloc(total_size, sizeof(*memory));
   if (memory == NULL) return NULL;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/enc/vp8enci.h 
new/libwebp-0.2.1/src/enc/vp8enci.h
--- old/libwebp-0.2.0/src/enc/vp8enci.h 2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/src/enc/vp8enci.h 2012-10-31 00:32:36.000000000 +0100
@@ -27,7 +27,7 @@
 // version numbers
 #define ENC_MAJ_VERSION 0
 #define ENC_MIN_VERSION 2
-#define ENC_REV_VERSION 0
+#define ENC_REV_VERSION 1
 
 // size of histogram used by CollectHistogram.
 #define MAX_COEFF_THRESH   64
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/enc/vp8l.c 
new/libwebp-0.2.1/src/enc/vp8l.c
--- old/libwebp-0.2.0/src/enc/vp8l.c    2012-08-16 07:49:03.000000000 +0200
+++ new/libwebp-0.2.1/src/enc/vp8l.c    2012-10-31 00:32:36.000000000 +0100
@@ -529,7 +529,12 @@
                                 sizeof(*histogram_symbols));
   assert(histogram_bits >= MIN_HUFFMAN_BITS);
   assert(histogram_bits <= MAX_HUFFMAN_BITS);
-  if (histogram_image == NULL || histogram_symbols == NULL) goto Error;
+
+  if (histogram_image == NULL || histogram_symbols == NULL) {
+    free(histogram_image);
+    free(histogram_symbols);
+    return 0;
+  }
 
   // Calculate backward references from ARGB image.
   if (!VP8LGetBackwardReferences(width, height, argb, quality, cache_bits,
@@ -898,13 +903,13 @@
                         const WebPPicture* const pic) {
   const int width = pic->width;
   const int height = pic->height;
-  const size_t hist_size = sizeof(VP8LHistogram);
+  const uint64_t hist_size = sizeof(VP8LHistogram);
   // Make tile size a function of encoding method (Range: 0 to 6).
   int histo_bits = 7 - config->method;
   while (1) {
-    const size_t huff_image_size = VP8LSubSampleSize(width, histo_bits) *
-                                   VP8LSubSampleSize(height, histo_bits) *
-                                   hist_size;
+    const uint64_t huff_image_size = VP8LSubSampleSize(width, histo_bits) *
+                                     VP8LSubSampleSize(height, histo_bits) *
+                                     hist_size;
     if (huff_image_size <= MAX_HUFF_IMAGE_SIZE) break;
     ++histo_bits;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwebp-0.2.0/src/utils/bit_reader.h 
new/libwebp-0.2.1/src/utils/bit_reader.h
--- old/libwebp-0.2.0/src/utils/bit_reader.h    2012-08-16 07:49:03.000000000 
+0200
+++ new/libwebp-0.2.1/src/utils/bit_reader.h    2012-10-31 00:32:36.000000000 
+0100
@@ -93,6 +93,8 @@
 #elif (BITS == 16)
     // gcc will recognize a 'rorw $8, ...' here:
     bits = (bit_t)(in_bits >> 8) | ((in_bits & 0xff) << 8);
+#else   // BITS == 8
+    bits = (bit_t)in_bits;
 #endif
 #else    // LITTLE_ENDIAN
     bits = (bit_t)in_bits;

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to