Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alchemy
Third Party
3p-libwebp
Commits
2456a60e
Commit
2456a60e
authored
Oct 03, 2021
by
Rye Mutt
🍞
Browse files
vendor source 1.2.1
parent
87c13c53
Changes
106
Hide whitespace changes
Inline
Side-by-side
libwebp/AUTHORS
View file @
2456a60e
...
...
@@ -4,8 +4,11 @@ Contributors:
- Charles Munger (clm at google dot com)
- Cheng Yi (cyi at google dot com)
- Christian Duvivier (cduvivier at google dot com)
- Christopher Degawa (ccom at randomderp dot com)
- Clement Courbet (courbet at google dot com)
- Djordje Pesut (djordje dot pesut at imgtec dot com)
- Hui Su (huisu at google dot com)
- Ilya Kurdyukov (jpegqs at gmail dot com)
- Ingvar Stepanyan (rreverser at google dot com)
- James Zern (jzern at google dot com)
- Jan Engelhardt (jengelh at medozas dot de)
...
...
@@ -45,3 +48,4 @@ Contributors:
- Wan-Teh Chang (wtc at google dot com)
- Yang Zhang (yang dot zhang at arm dot com)
- Yannis Guyon (yguyon at google dot com)
- Zhi An Ng (zhin at chromium dot org)
libwebp/Android.mk
View file @
2456a60e
...
...
@@ -74,6 +74,7 @@ dsp_dec_srcs := \
src/dsp/lossless_msa.c
\
src/dsp/lossless_neon.
$(NEON)
\
src/dsp/lossless_sse2.c
\
src/dsp/lossless_sse41.c
\
src/dsp/rescaler.c
\
src/dsp/rescaler_mips32.c
\
src/dsp/rescaler_mips_dsp_r2.c
\
...
...
libwebp/CMakeLists.txt
View file @
2456a60e
##
## Copyright (c) 2020 Google LLC.
##
## Use of this source code is governed by a BSD-style license
## that can be found in the LICENSE file in the root of the source
## tree. An additional intellectual property rights grant can be found
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
# Copyright (c) 2020 Google LLC.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
cmake_minimum_required
(
VERSION 3.5
)
if
(
POLICY CMP0072
)
cmake_policy
(
SET CMP0072 NEW
)
endif
()
project
(
WebP C
)
# Options for coder / decoder executables.
...
...
@@ -26,9 +29,11 @@ option(WEBP_BUILD_GIF2WEBP "Build the gif2webp conversion tool." ON)
option
(
WEBP_BUILD_IMG2WEBP
"Build the img2webp animation tool."
ON
)
option
(
WEBP_BUILD_VWEBP
"Build the vwebp viewer tool."
ON
)
option
(
WEBP_BUILD_WEBPINFO
"Build the webpinfo command line tool."
ON
)
option
(
WEBP_BUILD_LIBWEBPMUX
"Build the libwebpmux library."
ON
)
option
(
WEBP_BUILD_WEBPMUX
"Build the webpmux command line tool."
ON
)
option
(
WEBP_BUILD_EXTRAS
"Build extras."
ON
)
option
(
WEBP_BUILD_WEBP_JS
"Emscripten build of webp.js."
OFF
)
option
(
WEBP_USE_THREAD
"Enable threading support"
ON
)
option
(
WEBP_NEAR_LOSSLESS
"Enable near-lossless encoding"
ON
)
option
(
WEBP_ENABLE_SWAP_16BIT_CSP
"Enable byte swap for 16 bit colorspaces."
OFF
)
...
...
@@ -50,6 +55,7 @@ if(WEBP_BUILD_WEBP_JS)
set
(
WEBP_BUILD_WEBPINFO OFF
)
set
(
WEBP_BUILD_WEBPMUX OFF
)
set
(
WEBP_BUILD_EXTRAS OFF
)
set
(
WEBP_USE_THREAD OFF
)
if
(
WEBP_ENABLE_SIMD
)
message
(
"wasm2js does not support SIMD, disabling webp.js generation."
)
...
...
@@ -277,10 +283,12 @@ if(XCODE)
libwebp_add_stub_file
(
webp
)
endif
()
target_link_libraries
(
webp
${
WEBP_DEP_LIBRARIES
}
)
target_include_directories
(
webp
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
PUBLIC $<INSTALL_INTERFACE:include>
)
target_include_directories
(
webp
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/src>
$<INSTALL_INTERFACE:include>
)
set_target_properties
(
webp
PROPERTIES PUBLIC_HEADER
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/webp/decode.h;\
...
...
@@ -315,10 +323,10 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h")
configure_pkg_config
(
"src/demux/libwebpdemux.pc"
)
# Set the version numbers.
function
(
par
se_version FILE
NAME VAR
)
macro
(
se
t
_version FILE
TARGET_NAME NAME_IN_MAKEFILE
)
file
(
READ
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/
${
FILE
}
SOURCE_FILE
)
string
(
REGEX MATCH
"
${
NAME
}
_la_LDFLAGS[^
\n
]* -version-info [0-9:]+"
"
${
NAME
_IN_MAKEFILE
}
_la_LDFLAGS[^
\n
]* -version-info [0-9:]+"
TMP
${
SOURCE_FILE
}
)
string
(
REGEX MATCH
...
...
@@ -327,29 +335,35 @@ function(parse_version FILE NAME VAR)
${
TMP
}
)
string
(
REGEX
REPLACE
":"
"
.
"
VERSION
"
"
LT_
VERSION
${
TMP
}
)
set
(
${
VAR
}
"
${
VERSION
}
"
PARENT_SCOPE
)
endfunction
()
parse_version
(
Makefile.am webp WEBP_WEBP_SOVERSION
)
set_target_properties
(
webp
PROPERTIES VERSION
${
PACKAGE_VERSION
}
SOVERSION
${
WEBP_WEBP_SOVERSION
}
)
parse_version
(
Makefile.am webpdecoder WEBP_DECODER_SOVERSION
)
set_target_properties
(
webpdecoder
PROPERTIES VERSION
${
PACKAGE_VERSION
}
SOVERSION
${
WEBP_DECODER_SOVERSION
}
)
parse_version
(
demux/Makefile.am webpdemux WEBP_DEMUX_SOVERSION
)
set_target_properties
(
webpdemux
PROPERTIES VERSION
${
PACKAGE_VERSION
}
SOVERSION
${
WEBP_DEMUX_SOVERSION
}
)
# See the libtool docs for more information:
# https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
#
# c=<current>, a=<age>, r=<revision>
#
# libtool generates a .so file as .so.[c-a].a.r, while -version-info c:r:a is
# passed to libtool.
#
# We set FULL = [c-a].a.r and MAJOR = [c-a].
separate_arguments
(
LT_VERSION
)
list
(
GET LT_VERSION 0 LT_CURRENT
)
list
(
GET LT_VERSION 1 LT_REVISION
)
list
(
GET LT_VERSION 2 LT_AGE
)
math
(
EXPR LT_CURRENT_MINUS_AGE
"
${
LT_CURRENT
}
-
${
LT_AGE
}
"
)
set_target_properties
(
${
TARGET_NAME
}
PROPERTIES VERSION
${
LT_CURRENT_MINUS_AGE
}
.
${
LT_AGE
}
.
${
LT_REVISION
}
SOVERSION
${
LT_CURRENT_MINUS_AGE
}
)
endmacro
()
set_version
(
Makefile.am webp webp
)
set_version
(
Makefile.am webpdecoder webpdecoder
)
set_version
(
demux/Makefile.am webpdemux webpdemux
)
file
(
READ
${
CMAKE_CURRENT_SOURCE_DIR
}
/configure.ac CONFIGURE_FILE
)
string
(
REGEX MATCH
"AC_INIT
\\
([^
\n
]*
\\
[[0-9
\\
.]+
\\
]"
...
...
@@ -377,6 +391,12 @@ foreach(I_FILE RANGE ${WEBP_SIMD_FILES_TO_INCLUDE_RANGE})
${
SIMD_COMPILE_FLAG
}
)
endforeach
()
if
(
NOT WEBP_BUILD_LIBWEBPMUX
)
set
(
WEBP_BUILD_GIF2WEBP OFF
)
set
(
WEBP_BUILD_IMG2WEBP OFF
)
set
(
WEBP_BUILD_WEBPMUX OFF
)
endif
()
if
(
WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND
)
set
(
WEBP_BUILD_GIF2WEBP OFF
)
endif
()
...
...
@@ -449,19 +469,14 @@ if(WEBP_BUILD_CWEBP)
install
(
TARGETS cwebp RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
endif
()
if
(
WEBP_BUILD_
GIF2WEBP OR WEBP_BUILD_IMG2WEBP
)
if
(
WEBP_BUILD_
LIBWEBPMUX
)
parse_makefile_am
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/mux
"WEBP_MUX_SRCS"
""
)
add_library
(
libwebpmux
${
WEBP_MUX_SRCS
}
)
target_link_libraries
(
libwebpmux webp
)
target_include_directories
(
libwebpmux
PRIVATE
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
)
parse_version
(
mux/Makefile.am webpmux WEBP_MUX_SOVERSION
)
set_target_properties
(
libwebpmux
PROPERTIES VERSION
${
PACKAGE_VERSION
}
SOVERSION
${
WEBP_MUX_SOVERSION
}
)
set_version
(
mux/Makefile.am libwebpmux webpmux
)
set_target_properties
(
libwebpmux
PROPERTIES PUBLIC_HEADER
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/webp/mux.h;\
...
...
@@ -567,7 +582,6 @@ if(WEBP_BUILD_EXTRAS)
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
${
CMAKE_CURRENT_BINARY_DIR
}
/src
)
install
(
TARGETS get_disto RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
# webp_quality
add_executable
(
webp_quality
${
WEBP_QUALITY_SRCS
}
${
WEBP_EXTRAS_SRCS
}
)
...
...
@@ -575,7 +589,6 @@ if(WEBP_BUILD_EXTRAS)
target_include_directories
(
webp_quality
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
)
install
(
TARGETS webp_quality RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
# vwebp_sdl
find_package
(
SDL
)
...
...
@@ -590,7 +603,6 @@ if(WEBP_BUILD_EXTRAS)
${
SDL_INCLUDE_DIR
}
)
set
(
WEBP_HAVE_SDL 1
)
target_compile_definitions
(
vwebp_sdl PUBLIC WEBP_HAVE_SDL
)
install
(
TARGETS vwebp_sdl RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
)
endif
()
endif
()
...
...
@@ -606,7 +618,7 @@ if(WEBP_BUILD_WEBP_JS)
webp_js
PROPERTIES LINK_FLAGS
"-s WASM=0 \
-s EXPORTED_FUNCTIONS='[
\"
_WebpToSDL
\"
]' -s INVOKE_RUN=0 \
-s
EXTRA_
EXPORTED_RUNTIME_METHODS='[
\"
cwrap
\"
]'"
)
-s EXPORTED_RUNTIME_METHODS='[
\"
cwrap
\"
]'"
)
set_target_properties
(
webp_js PROPERTIES OUTPUT_NAME webp
)
target_compile_definitions
(
webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL
)
endif
()
...
...
@@ -619,7 +631,7 @@ if(WEBP_BUILD_WEBP_JS)
webp_wasm
PROPERTIES LINK_FLAGS
"-s WASM=1 \
-s EXPORTED_FUNCTIONS='[
\"
_WebpToSDL
\"
]' -s INVOKE_RUN=0 \
-s
EXTRA_
EXPORTED_RUNTIME_METHODS='[
\"
cwrap
\"
]'"
)
-s EXPORTED_RUNTIME_METHODS='[
\"
cwrap
\"
]'"
)
target_compile_definitions
(
webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL
)
target_compile_definitions
(
webpdspdecode PUBLIC EMSCRIPTEN
)
...
...
@@ -637,7 +649,6 @@ if(WEBP_BUILD_ANIM_UTILS)
imageenc
imageioutil
webp
libwebpmux
webpdemux
${
WEBP_DEP_GIF_LIBRARIES
}
)
target_include_directories
(
anim_diff PRIVATE
${
CMAKE_CURRENT_BINARY_DIR
}
/src
)
...
...
@@ -653,7 +664,6 @@ if(WEBP_BUILD_ANIM_UTILS)
imageenc
imageioutil
webp
libwebpmux
webpdemux
${
WEBP_DEP_GIF_LIBRARIES
}
)
target_include_directories
(
anim_dump PRIVATE
${
CMAKE_CURRENT_BINARY_DIR
}
/src
)
...
...
libwebp/CONTRIBUTING.md
0 → 100644
View file @
2456a60e
# How to Contribute
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to
<https://cla.developers.google.com/>
to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Code reviews
All submissions, including submissions by project members, require review. We
use a
[
Gerrit
](
https://www.gerritcodereview.com
)
instance hosted at
https://chromium-review.googlesource.com for this purpose. See the
[
WebM Project page
](
https://www.webmproject.org/code/contribute/submitting-patches/
)
for additional details.
## Community Guidelines
This project follows
[
Google's Open Source Community Guidelines
](
https://opensource.google.com/conduct/
)
.
libwebp/ChangeLog
View file @
2456a60e
d9191588 fuzzer/*: normalize src/ includes
53b6f762 fix indent
731246ba update ChangeLog (tag: v1.2.1-rc2)
d250f01d dsp/*: use WEBP_HAVE_* to determine Init availability
3a4d3ecd update NEWS
b2bc8093 bump version to 1.2.1
e542fc7a update AUTHORS
e0241154 Merge "libwebp/CMake: Add <BUILD_INTERFACE> to webp incl" into main
edea6444 libwebp/CMake: Add <BUILD_INTERFACE> to webp incl
ece18e55 dsp.h: respect --disable-sse2/sse4.1/neon
a89a3230 wicdec: support alpha from WebP WIC decoder
26f4aa01 Merge "alpha_processing: fix visual studio warnings" into main
8f594663 alpha_processing: fix visual studio warnings
46d844e6 Merge "cpu.cmake: fix compiler flag detection w/3.17.0+" into main
298d26ea Merge changes I593adf92,If20675e7,Ifac68eac into main
a1e5dae0 alpha_processing*: use WEBP_RESTRICT qualifier
327ef24f cpu.cmake: fix compiler flag detection w/3.17.0+
f70819de configure: enable libwebpmux by default
dc7e2b42 configure: add informational notices when disabling binaries
9df23ddd configure: move lib flag checks before binaries
a2e18f10 Merge "WebPConfig.config.in: correct WEBP_INCLUDE_DIRS" into main
e1a8d4f3 Merge "bit_reader_inl_utils: uniformly apply WEBP_RESTRICT" into main
4de35f43 rescaler.c: fix alignment
0f13eec7 bit_reader_inl_utils: uniformly apply WEBP_RESTRICT
277d3074 Fix size_t overflow in WebPRescalerInit
97adbba5 WebPConfig.config.in: correct WEBP_INCLUDE_DIRS
b60d4603 advanced_api_fuzzer: add extreme config value coverage
72fe52f6 anim_encode.c,cosmetics: normalize indent
116d235c anim_encode: Fix encoded_frames_[] overflow
6f445b3e CMake: set CMP0072 to NEW
b1cf887f define WEBP_RESTRICT for MSVC
3e265136 Add WEBP_RESTRICT & use it in VP8BitReader
f6d29247 vp8l_dec::ProcessRows: fix int overflow in multiply
de3b4ba8 CMake: add WEBP_BUILD_LIBWEBPMUX
7f09d3d1 CMakeLists.txt: rm libwebpmux dep from anim_{diff,dump}
4edea4a6 Init{RGB,YUV}Rescaler: fix a few more int overflows
c9e26bdb rescaler_utils: set max valid scaled w/h to INT_MAX/2
28d488e6 utils.h: add SizeOverflow()
695bdaa2 Export/EmitRescaledRowsRGBA: fix pointer offset int overflow
685d073e Init{RGB,YUV}Rescaler: fix int overflows in multiplication
d38bd0dd WebPFlipBuffer: fix integer overflow
109ff0f1 utils: allow MALLOC_LIMIT to indicate a max
a2fce867 WebPRescalerImportRowExpand_C: promote some vals before multiply
776983d4 AllocateBuffer: fix int multiplication overflow check
315abbd6 Merge "Revert "Do not use a palette for one color images.""
eae815d0 Merge changes Ica3bbf75,I82f82954
afbca5a1 Require Emscripten 2.0.18
3320416b CMakeLists,emscripten: use EXPORTED_RUNTIME_METHODS
29145ed6 Update README instructions for using Emscripten
1f579139 cosmetics: remove use of 'sanity' / 'master'
29b6129c WebPAnimEncoderNewInternal: remove some unnecessary inits
b60869a1 Revert "Do not use a palette for one color images."
6fb4cddc demux: move padded size calc post unpadded validation
05b72d42 vp8l_enc.c: normalize index types
b6513fba Do not use a palette for one color images.
98bbe35b Fix multi-threading with palettes.
b1674240 Add modified Zeng's method to palette sorting.
88c90c45 add CONTRIBUTING.md
6a9916d7 WebPRescalerInit: add missing int64_t promotion
b6cf52d5 WebPIoInitFromOptions: treat use_scaling as a bool
3b12b7f4 WebPIoInitFromOptions: treat use_cropping as a bool
595fa13f add WebPCheckCropDimensions()
8fdaecb0 Disable cross-color when palette is used.
8933bac2 WebPIoInitFromOptions: respect incoming bypass_filtering val
7d416ff0 webpdec,cosmetics: match error text to function call
ec6cfeb5 Fix typo on WebPPictureAlloc() in README
7e58a1a2 *.cmake: add license header
5651a6b2 cmake: fix .so versioning
25ae67b3 xcframeworkbuild.sh: add arm64 simulator target
5d4ee4c3 cosmetics: remove use of the term 'dummy'
01b38ee1 faster CollectColorXXXTransforms_SSE41
652aa344 Merge "Use BitCtz for FastSLog2Slow_C"
0320e1e3 add the missing default BitsCtz() code
8886f620 Use BitCtz for FastSLog2Slow_C
fae41617 faster CombinedShannonEntropy_SSE2
5bd2704e Introduce the BitCtz() function.
fee64287 Merge "wicdec,icc: treat unsupported op as non-fatal"
33ddb894 lossless_sse{2,41}: remove some unneeded includes
b27ea852 wicdec,icc: treat unsupported op as non-fatal
b78494a9 Merge "Fix undefined signed shift."
e79974cd Fix undefined signed shift.
a8853394 SSE4.1 versions of BGRA to RGB/BGR color-space conversions
a09a6472 SSE4.1 version of TransformColorInverse
401da22b Merge "pngdec: check version before using png_get_chunk_malloc_max"
26907822 pngdec: check version before using png_get_chunk_malloc_max
06c1e72e Code cleanup
8f0d41aa Merge changes Id135bbf4,I99e59797
373eb170 gif2webp: don't store loop-count if there's only 1 frame
759b9d5a cmake: add WEBP_USE_THREAD option
926ce921 cmake: don't install binaries from extras/
9c367bc6 WebPAnimDecoderNewInternal: validate bitstream before alloc
47f64f6e filters_sse2: import Chromium change
cc3577e9 fuzzer/*: use src/ based include paths
004d77ff Merge tag 'v1.2.0'
fedac6cc update ChangeLog (tag: v1.2.0-rc3, tag: v1.2.0)
170a8712 Fix check_c_source_compiles with pthread.
ceddb5fc Fix check_c_source_compiles with pthread.
85995719 disable CombinedShannonEntropy_SSE2 on x86
289757fe TiffDec: enforce stricter mem/dimension limit on tiles
8af7436f Merge "{ios,xcframework}build.sh: make min version(s) more visible" into 1.2.0
e56c3c5b pngdec: raise memory limit if needed
8696147d pngdec: raise memory limit if needed
13b8e9fe {ios,xcframework}build.sh: make min version(s) more visible
a9225410 animdecoder_fuzzer: fix memory leak
d6c2285d update gradle to 6.1.1
8df77fb1 animdecoder_fuzzer: fix memory leak
52ce6333 update NEWS
28c49820 bump version to 1.2.0
7363dff2 webp/encode.h: restore WEBP_ENCODER_ABI_VERSION to v1.1.0
...
...
libwebp/Makefile.vc
View file @
2456a60e
...
...
@@ -215,6 +215,7 @@ DSP_DEC_OBJS = \
$(DIROBJ)
\d
sp
\l
ossless_msa.obj
\
$(DIROBJ)
\d
sp
\l
ossless_neon.obj
\
$(DIROBJ)
\d
sp
\l
ossless_sse2.obj
\
$(DIROBJ)
\d
sp
\l
ossless_sse41.obj
\
$(DIROBJ)
\d
sp
\r
escaler.obj
\
$(DIROBJ)
\d
sp
\r
escaler_mips32.obj
\
$(DIROBJ)
\d
sp
\r
escaler_mips_dsp_r2.obj
\
...
...
libwebp/NEWS
View file @
2456a60e
- 7/20/2021: version 1.2.1
This is a binary compatible release.
* minor lossless encoder improvements and x86 color conversion speed up
* add ARM64 simulator support to xcframeworkbuild.sh (#510)
* further security related hardening in libwebp & examples
(issues: #497, #508, #518)
(chromium: #1196480, #1196773, #1196775, #1196777, #1196778, #1196850)
(oss-fuzz: #28658, #28978)
* toolchain updates and bug fixes (#498, #501, #502, #504, #505, #506, #509,
#533)
* use more inclusive language within the source (#507)
- 12/23/2020: version 1.2.0
* API changes:
- libwebp:
...
...
libwebp/README
View file @
2456a60e
...
...
@@ -4,7 +4,7 @@
\__\__/\____/\_____/__/ ____ ___
/ _/ / \ \ / _ \/ _/
/ \_/ / / \ \ __/ \__
\____/____/\_____/_____/____/v1.2.
0
\____/____/\_____/_____/____/v1.2.
1
Description:
============
...
...
@@ -619,7 +619,7 @@ The encoding flow looks like:
pic.width = width;
pic.height = height;
// allocated picture of dimension width x height
if (!WebPPictureAlloc
ate
(&pic)) {
if (!WebPPictureAlloc(&pic)) {
return 0; // memory error
}
// at this point, 'pic' has been initialized as a container,
...
...
libwebp/README.mux
View file @
2456a60e
__ __ ____ ____ ____ __ __ _ __ __
/ \\/ \/ _ \/ _ \/ _ \/ \ \/ \___/_ / _\
\ / __/ _ \ __/ / / (_/ /__
\__\__/\_____/_____/__/ \__//_/\_____/__/___/v1.2.
0
\__\__/\_____/_____/__/ \__//_/\_____/__/___/v1.2.
1
Description:
...
...
libwebp/README.webp_js
View file @
2456a60e
...
...
@@ -10,26 +10,18 @@ This file describes the compilation of libwebp into a JavaScript decoder
using Emscripten and CMake.
- install the Emscripten SDK following the procedure described at:
https://
kripken.github.io/
emscripten
-site
/docs/getting_started/downloads.html
https://emscripten
.org
/docs/getting_started/downloads.html
#installation-instructions-using-the-emsdk-recommended
After installation, you should have some global variable positioned to the
location of the SDK. In particular, $EMS
CRIPTEN
should point to the
location of the SDK. In particular, $EMS
DK
should point to the
top-level directory containing Emscripten tools.
- make sure the file $EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake is
accessible. This is the toolchain file used by CMake to invoke Emscripten.
If $EMSCRIPTEN is unset search for Emscripten.cmake under $EMSDK and set
$EMSCRIPTEN accordingly, for example:
unix-like environments: export EMSCRIPTEN=$EMSDK/upstream/emscripten
windows: set EMSCRIPTEN=%EMSDK%\upstream\emscripten
- configure the project 'WEBP_JS' with CMake using:
cd webp_js && \
cmake -DWEBP_BUILD_WEBP_JS=ON \
-DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake \
emcmake cmake -DWEBP_BUILD_WEBP_JS=ON \
../
- compile webp.js using 'make'.
- compile webp.js using '
emmake
make'.
- that's it! Upon completion, you should have the webp.js and
webp.wasm files generated.
...
...
@@ -58,7 +50,7 @@ Web-Assembly (WASM) version:
See webp_js/index_wasm.html for a simple demo page using the WASM version
of the library.
You will need a fairly recent version of Emscripten (at least
1.37.
8,
You will need a fairly recent version of Emscripten (at least
2.0.1
8,
latest-upstream is recommended) and of your WASM-enabled browser to run this
version.
...
...
libwebp/build.gradle
View file @
2456a60e
...
...
@@ -141,6 +141,7 @@ model {
include
"lossless_msa.c"
include
"lossless_neon.$NEON"
include
"lossless_sse2.c"
include
"lossless_sse41.c"
include
"rescaler.c"
include
"rescaler_mips32.c"
include
"rescaler_mips_dsp_r2.c"
...
...
libwebp/cmake/WebPConfig.cmake.in
View file @
2456a60e
...
...
@@ -5,7 +5,7 @@ set(WEBP_VERSION ${WebP_VERSION})
include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
set(WebP_INCLUDE_DIRS "
webp
")
set(WebP_INCLUDE_DIRS "
@CMAKE_INSTALL_FULL_INCLUDEDIR@
")
set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS})
set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@")
set(WEBP_LIBRARIES "${WebP_LIBRARIES}")
libwebp/cmake/cpu.cmake
View file @
2456a60e
# Copyright (c) 2021 Google LLC.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
# Check for SIMD extensions.
include
(
CMakePushCheckState
)
...
...
@@ -117,6 +125,12 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
list
(
GET SIMD_DISABLE_FLAGS
${
I_SIMD
}
SIMD_COMPILE_FLAG
)
include
(
CheckCCompilerFlag
)
if
(
SIMD_COMPILE_FLAG
)
# Between 3.17.0 and 3.18.2 check_cxx_compiler_flag() sets a normal
# variable at parent scope while check_cxx_source_compiles() continues
# to set an internal cache variable, so we unset both to avoid the
# failure / success state persisting between checks. See
# https://gitlab.kitware.com/cmake/cmake/-/issues/21207.
unset
(
HAS_COMPILE_FLAG
)
unset
(
HAS_COMPILE_FLAG CACHE
)
check_c_compiler_flag
(
${
SIMD_COMPILE_FLAG
}
HAS_COMPILE_FLAG
)
if
(
HAS_COMPILE_FLAG
)
...
...
@@ -134,6 +148,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
"warning: argument unused during compilation:"
${
COMMON_PATTERNS
}
)
if
(
NOT FLAG_
${
SIMD_COMPILE_FLAG
}
)
unset
(
HAS_COMPILE_FLAG
)
unset
(
HAS_COMPILE_FLAG CACHE
)
endif
()
endif
()
...
...
libwebp/cmake/deps.cmake
View file @
2456a60e
# Copyright (c) 2021 Google LLC.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
# Generate the config.h to compile with specific intrinsics / libs.
# Check for compiler options.
...
...
@@ -22,26 +30,25 @@ check_c_source_compiles("
"
HAVE_BUILTIN_BSWAP64
)
# Check for libraries.
if
(
NOT WEBP_BUILD_WEBP_JS
)
# Disable pThreads for WASM.
if
(
WEBP_USE_THREAD
)
find_package
(
Threads
)
endif
()
if
(
Threads_FOUND
)
# work around cmake bug on QNX (https://cmake.org/Bug/view.php?id=11333)
if
(
CMAKE_USE_PTHREADS_INIT AND NOT CMAKE_SYSTEM_NAME STREQUAL
"QNX"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-pthread"
)
if
(
Threads_FOUND
)
# work around cmake bug on QNX (https://cmake.org/Bug/view.php?id=11333)
if
(
CMAKE_USE_PTHREADS_INIT AND NOT CMAKE_SYSTEM_NAME STREQUAL
"QNX"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-pthread"
)
endif
()
check_c_source_compiles
(
"
#include <pthread.h>
int main (void) {
int attr = PTHREAD_PRIO_INHERIT;
return attr;
}
"
FLAG_HAVE_PTHREAD_PRIO_INHERIT
)
set
(
HAVE_PTHREAD_PRIO_INHERIT
${
FLAG_HAVE_PTHREAD_PRIO_INHERIT
}
)
list
(
APPEND WEBP_DEP_LIBRARIES
${
CMAKE_THREAD_LIBS_INIT
}
)
endif
()
check_c_source_compiles
(
"
#include <pthread.h>
int main (void) {
int attr = PTHREAD_PRIO_INHERIT;
return attr;
}
"
FLAG_HAVE_PTHREAD_PRIO_INHERIT
)
set
(
HAVE_PTHREAD_PRIO_INHERIT
${
FLAG_HAVE_PTHREAD_PRIO_INHERIT
}
)
list
(
APPEND WEBP_DEP_LIBRARIES
${
CMAKE_THREAD_LIBS_INIT
}
)
set
(
WEBP_USE_THREAD
${
Threads_FOUND
}
)
endif
()
set
(
WEBP_USE_THREAD
${
Threads_FOUND
}
)
# TODO: this seems unused, check with autotools.
set
(
LT_OBJDIR
".libs/"
)
...
...
libwebp/configure
View file @
2456a60e
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libwebp 1.2.
0
.
# Generated by GNU Autoconf 2.69 for libwebp 1.2.
1
.
#
# Report bugs to <https://bugs.chromium.org/p/webp>.
#
...
...
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libwebp'
PACKAGE_TARNAME='libwebp'
PACKAGE_VERSION='1.2.
0
'
PACKAGE_STRING='libwebp 1.2.
0
'
PACKAGE_VERSION='1.2.
1
'
PACKAGE_STRING='libwebp 1.2.
1
'
PACKAGE_BUGREPORT='https://bugs.chromium.org/p/webp'
PACKAGE_URL='http://developers.google.com/speed/webp'
...
...
@@ -635,14 +635,6 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
BUILD_EXTRAS_FALSE
BUILD_EXTRAS_TRUE
BUILD_LIBWEBPDECODER_FALSE
BUILD_LIBWEBPDECODER_TRUE
BUILD_DEMUX_FALSE
BUILD_DEMUX_TRUE
BUILD_MUX_FALSE
BUILD_MUX_TRUE
USE_SWAP_16BIT_CSP
BUILD_WEBPINFO_FALSE
BUILD_WEBPINFO_TRUE
...
...
@@ -680,6 +672,14 @@ SSE41_FLAGS
AM_CFLAGS
pkgconfigdir
AM_CPPFLAGS
BUILD_EXTRAS_FALSE
BUILD_EXTRAS_TRUE
BUILD_LIBWEBPDECODER_FALSE
BUILD_LIBWEBPDECODER_TRUE
BUILD_DEMUX_FALSE
BUILD_DEMUX_TRUE
BUILD_MUX_FALSE
BUILD_MUX_TRUE
CPP
LT_SYS_LIBRARY_PATH
OTOOL64
...
...
@@ -808,6 +808,10 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
enable_everything
enable_libwebpmux
enable_libwebpdemux
enable_libwebpdecoder
enable_libwebpextras
enable_asserts
with_pkgconfigdir
enable_sse4_1
...
...
@@ -836,10 +840,6 @@ with_giflibdir
enable_wic