Skip to content

Commit

Permalink
external libs: update libwebp to 1.0.3 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Aug 20, 2019
1 parent e3dfff1 commit 11aad7f
Show file tree
Hide file tree
Showing 319 changed files with 18,660 additions and 1,879 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -41,7 +41,7 @@ endif()
if (SUPPORT_WEBP)
target_compile_definitions(SDL2_image PRIVATE -DLOAD_WEBP)
# missing cpufeatures
add_subdirectory(external/libwebp-1.0.2)
add_subdirectory(external/libwebp-1.0.3)
target_link_libraries(SDL2_image PRIVATE webp)
endif()

Expand Down
4 changes: 4 additions & 0 deletions VisualC/external/include/webp/encode.h
Expand Up @@ -62,6 +62,10 @@ WEBP_EXTERN size_t WebPEncodeBGRA(const uint8_t* bgra,
// These functions are the equivalent of the above, but compressing in a
// lossless manner. Files are usually larger than lossy format, but will
// not suffer any compression loss.
// Note these functions, like the lossy versions, use the library's default
// settings. For lossless this means 'exact' is disabled. RGB values in
// transparent areas will be modified to improve compression. To avoid this,
// use WebPEncode() and set WebPConfig::exact to 1.
WEBP_EXTERN size_t WebPEncodeLosslessRGB(const uint8_t* rgb,
int width, int height, int stride,
uint8_t** output);
Expand Down
Binary file modified VisualC/external/lib/x64/libwebp-7.dll
Binary file not shown.
Binary file modified VisualC/external/lib/x86/libwebp-7.dll
Binary file not shown.
Expand Up @@ -62,6 +62,10 @@ WEBP_EXTERN size_t WebPEncodeBGRA(const uint8_t* bgra,
// These functions are the equivalent of the above, but compressing in a
// lossless manner. Files are usually larger than lossy format, but will
// not suffer any compression loss.
// Note these functions, like the lossy versions, use the library's default
// settings. For lossless this means 'exact' is disabled. RGB values in
// transparent areas will be modified to improve compression. To avoid this,
// use WebPEncode() and set WebPConfig::exact to 1.
WEBP_EXTERN size_t WebPEncodeLosslessRGB(const uint8_t* rgb,
int width, int height, int stride,
uint8_t** output);
Expand Down
Binary file not shown.
Expand Up @@ -7,18 +7,18 @@
<key>CFBundleExecutable</key>
<string>webp</string>
<key>CFBundleGetInfoString</key>
<string>libwebp 0.6.0</string>
<string>libwebp 1.0.3</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>webp</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.6.0</string>
<string>1.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.6.0</string>
<string>1.0.3</string>
</dict>
</plist>
Binary file modified Xcode/Frameworks/webp.framework/Versions/A/webp
Binary file not shown.
198 changes: 0 additions & 198 deletions external/libwebp-1.0.2/swig/libwebp.py

This file was deleted.

6 changes: 3 additions & 3 deletions external/libwebp-1.0.2.patch → external/libwebp-1.0.3.patch
@@ -1,6 +1,6 @@
diff -ruN libwebp-1.0.2.orig/Android.mk libwebp-1.0.2/Android.mk
--- libwebp-1.0.2.orig/Android.mk 2018-04-20 20:04:55.000000000 -0700
+++ libwebp-1.0.2/Android.mk 2018-10-26 14:17:28.000000000 -0700
diff -ruN libwebp-1.0.3.orig/Android.mk libwebp-1.0.3/Android.mk
--- libwebp-1.0.3.orig/Android.mk 2019-07-04 22:32:37.000000000 +0300
+++ libwebp-1.0.3/Android.mk 2019-08-20 14:11:24.000000000 +0300
@@ -273,7 +273,7 @@

WEBP_SRC_PATH := $(LOCAL_PATH)
Expand Down
@@ -1,4 +1,5 @@
Contributors:
- Aidan O'Loan (aidanol at gmail dot com)
- Alan Browning (browning at google dot com)
- Charles Munger (clm at google dot com)
- Christian Duvivier (cduvivier at google dot com)
Expand Down
File renamed without changes.
Expand Up @@ -17,6 +17,8 @@ option(WEBP_BUILD_WEBP_JS "Emscripten build of webp.js." OFF)
option(WEBP_NEAR_LOSSLESS "Enable near-lossless encoding" ON)
option(WEBP_ENABLE_SWAP_16BIT_CSP "Enable byte swap for 16 bit colorspaces."
OFF)
set(WEBP_BITTRACE "0" CACHE STRING "Bit trace mode (0=none, 1=bit, 2=bytes)")
set_property(CACHE WEBP_BITTRACE PROPERTY STRINGS 0 1 2)

# Option needed for handling Unicode file names on Windows.
if(WIN32)
Expand Down Expand Up @@ -55,6 +57,10 @@ if(WEBP_ENABLE_SWAP_16BIT_CSP)
add_definitions(-DWEBP_SWAP_16BIT_CSP=1)
endif()

if(NOT WEBP_BITTRACE STREQUAL "0")
add_definitions(-DBITTRACE=${WEBP_BITTRACE})
endif()

if(WEBP_UNICODE)
# Windows recommends setting both UNICODE and _UNICODE.
add_definitions(-DUNICODE -D_UNICODE)
Expand All @@ -65,13 +71,15 @@ set(exec_prefix "\$\{prefix\}")
set(libdir "\$\{prefix\}/lib")
set(includedir "\$\{prefix\}/include")
set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT})
set(INSTALLED_LIBRARIES)

# ##############################################################################
# Android only.
if(ANDROID)
include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
add_library(cpufeatures STATIC
${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
list(APPEND INSTALLED_LIBRARIES cpufeatures)
target_link_libraries(cpufeatures dl)
set(WEBP_DEP_LIBRARIES ${WEBP_DEP_LIBRARIES} cpufeatures)
set(WEBP_DEP_INCLUDE_DIRS ${WEBP_DEP_INCLUDE_DIRS}
Expand Down Expand Up @@ -306,7 +314,7 @@ string(REGEX MATCH
${TMP})

# Define the libraries to install.
set(INSTALLED_LIBRARIES webpdecoder webp webpdemux)
list(APPEND INSTALLED_LIBRARIES webpdecoder webp webpdemux)

# Deal with SIMD. Change the compile flags for SIMD files we use.
list(LENGTH WEBP_SIMD_FILES_TO_INCLUDE WEBP_SIMD_FILES_TO_INCLUDE_LENGTH)
Expand Down Expand Up @@ -556,7 +564,7 @@ if(WEBP_BUILD_WEBP_JS)
target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties(
webp_wasm
PROPERTIES LINK_FLAGS "-s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"' \
PROPERTIES LINK_FLAGS "-s WASM=1 \
-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
Expand Down
File renamed without changes.

0 comments on commit 11aad7f

Please sign in to comment.