Commit Graph

4164 Commits

Author SHA1 Message Date
James Zern
5651a6b2ed cmake: fix .so versioning
libtool uses -version-info current:revision:age, but the library created
is [c-a].a.r.

Change-Id: Icf081e156a818a3cd7579ad5ffe3b518d8532bdb
2021-04-07 13:51:22 -07:00
James Zern
25ae67b3de xcframeworkbuild.sh: add arm64 simulator target
this fixes simulator builds on an M1

Bug: webp:510
Change-Id: Ia2c81d33d9a85b432b17f22305b110ccc337b809
2021-03-15 15:25:44 -07:00
James Zern
5d4ee4c3c0 cosmetics: remove use of the term 'dummy'
this is replaced with more inclusive / informative text

Bug: webp:507
Change-Id: Ib77f0c79dd548601bf2bc3169985af4b5edf0a62
2021-03-15 11:39:06 -07:00
Ilya Kurdyukov
01b38ee19a faster CollectColorXXXTransforms_SSE41
3/4% faster overall.

Change-Id: If555c5530238ca0342b8d97b0d708b1bdc888d3f
2021-02-19 20:45:07 +01:00
Pascal Massimino
652aa34424 Merge "Use BitCtz for FastSLog2Slow_C" 2021-02-19 17:39:30 +00:00
Skal
0320e1e36f add the missing default BitsCtz() code
Change-Id: Iff3ea946a380837b9dfad58350173b68b45e1347
2021-02-19 17:04:35 +00:00
Ilya Kurdyukov
8886f620c0 Use BitCtz for FastSLog2Slow_C
Change-Id: Icc6068b8934e481e6f17efd30616392e68d504ad
2021-02-19 15:11:42 +01:00
Ilya Kurdyukov
fae416179e faster CombinedShannonEntropy_SSE2
optimized for sparse histograms

Change-Id: I54412f5f8fc53d2598964a5be91f6c54ece3f21b
2021-02-19 13:14:46 +01:00
Ilya Kurdyukov
5bd2704e30 Introduce the BitCtz() function.
* Use a WEBP_HAVE_SLOW_CLZ_CTZ flag when they are slow (LUT-based).

Change-Id: If707c121b8800438be404594a39bb123ef25b0f0
2021-02-19 11:52:05 +01:00
James Zern
fee642870e Merge "wicdec,icc: treat unsupported op as non-fatal" 2021-02-18 21:28:47 +00:00
James Zern
33ddb894b1 lossless_sse{2,41}: remove some unneeded includes
Change-Id: Icd2cffd32b39c6bf017eee353ac04a4b6d337a11
2021-02-18 10:54:09 -08:00
James Zern
b27ea8525a wicdec,icc: treat unsupported op as non-fatal
ICC extraction via GetColorContexts may fail due to the operation not
being supported with e.g., bitmaps.

Bug: webp:506
Change-Id: I587220e688ac90d77c84af21c9e7bc8bf178f3aa
2021-02-18 10:36:13 -08:00
Pascal Massimino
b78494a933 Merge "Fix undefined signed shift." 2021-02-18 16:51:17 +00:00
Vincent Rabaud
e79974cd6a Fix undefined signed shift.
Using the fix from SSE2.

Change-Id: Ie53d0163d97322da5a722c3e49f9d5f057ee1d91
2021-02-18 16:56:22 +01:00
Ilya Kurdyukov
a885339448 SSE4.1 versions of BGRA to RGB/BGR color-space conversions
Change-Id: Iacafd2f6402080b02fcbf75831e69c488f447454
2021-02-18 15:32:30 +01:00
Ilya Kurdyukov
a09a647241 SSE4.1 version of TransformColorInverse
Change-Id: I6ba5cb35917eef7a52152c4924eca205b4af7220
2021-02-18 12:42:39 +01:00
James Zern
401da22bd6 Merge "pngdec: check version before using png_get_chunk_malloc_max" 2021-02-11 00:44:19 +00:00
James Zern
2690782292 pngdec: check version before using png_get_chunk_malloc_max
png_get_chunk_malloc_max / png_set_chunk_malloc_max were added in 1.4.1.

Bug: webp:505, webp:497
Change-Id: Id4e0643a7734563fec7779f7943ec760da8d276d
2021-02-10 13:41:54 -08:00
Skal
06c1e72e71 Code cleanup
* match param names

Change-Id: Ib75197a3c6bcc735049c6724dce6c240684108ae
2021-02-10 22:14:45 +01:00
James Zern
8f0d41aac0 Merge changes Id135bbf4,I99e59797
* changes:
  cmake: add WEBP_USE_THREAD option
  cmake: don't install binaries from extras/
2021-02-09 21:25:12 +00:00
Pascal Massimino
373eb170f1 gif2webp: don't store loop-count if there's only 1 frame
BUG=webp:504

Change-Id: Iacea11a861096ae950379c872d9840bdbec42a21
2021-02-08 22:00:48 +00:00
James Zern
759b9d5a06 cmake: add WEBP_USE_THREAD option
this controls the config.h define of the same name and matches the
behavior of configure's --disable-threading

Bug: webp:502
Change-Id: Id135bbf4e6b3c9900e2b4f4f7ab744b3457ce41c
2021-02-05 15:32:41 -08:00
James Zern
926ce921f3 cmake: don't install binaries from extras/
this matches the behavior of configure

Bug: webp:502
Change-Id: I99e597971636bdc2b9a9465ba13bb24c70ce87c0
2021-02-05 15:30:06 -08:00
James Zern
9c367bc602 WebPAnimDecoderNewInternal: validate bitstream before alloc
this avoids large allocations with corrupt files due to the canvas size

BUG=oss-fuzz:28658

Change-Id: Idd1957e5447a2dadaef1fadaf68820fcb29f045a
2021-02-05 13:01:27 -08:00
James Zern
47f64f6edd filters_sse2: import Chromium change
VerticalUnfilter_SSE2 has long been disabled due to a crash in an
Android emulator that hasn't reproduced elsewhere (crbug.com/654974).
this synchronizes the code for now to avoid needing to locally edit the
file on import.

Bug: 1141126
Change-Id: Ib61aeab93caaff1759606566b9e499eaac1576cf
2021-01-30 11:44:07 -08:00
James Zern
cc3577e9b9 fuzzer/*: use src/ based include paths
this synchronizes the code with chrome, where this format allows the
code to pass buildtools/checkdeps/checkdeps.py

Bug: 1141126
Change-Id: I25361b1a43cd95730814302f02aa16af8fdb5fd2
2021-01-29 20:04:08 -08:00
James Zern
004d77ffab libwebp-1.2.0
- 12/23/2020: version 1.2.0
   * API changes:
     - libwebp:
       encode.h: add a qmin / qmax range for quality factor (cwebp adds -qrange)
   * lossless encoder improvements
   * SIMD support for Wasm builds
   * add xcframeworkbuild.sh, supports Mac Catalyst builds
   * import fuzzers from oss-fuzz & chromium (#409)
   * webpmux: add an '-set loop <value>' option (#494)
   * toolchain updates and bug fixes (#449, #463, #470, #475, #477, #478, #479,
     #488, #491)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEaw5rcJdt4wPt8vYB+cPWvbgjK10FAmAUzc8ACgkQ+cPWvbgj
 K10fxg//cM6DotPh3VGZQR2ToWffrMuseK5pxPkeoGu4f3VF7UA0g6qVSmjKMPsL
 Dqm2zdpHftEcpNUVAfKD9oSv8Hp/wpfmIR30qkBN0a/a66gjasWmskdYU2Ms06c8
 lyaewTfUf/P0B5vcnDeqNNkBJjmGUi3HDXsxI/gVAZjqVIIDG3i3dDx435+ojxIJ
 Lda03jHhk+klpPz35IwC7BeSdD1A01u+Z6qRB3mqrAK3c9Ox45j4jzljUOVx3gto
 T06cwFL/cES1d4tyQKe9layM39F3hguKryQlCvfv4cFHYjOX4NDTuVxbcC4zyFRv
 MM3ZYRAlshXVrKhqS9SDJNIJEvI+cZmxOHvfmSh7Qw+ge3maiL3LRKkiiq9tIuzf
 6cUYix2i/uDrNkPyek2hXXIF5Xltu07coJqGtqdYn3kaRwXbkQ0hUJRS+0tj2qfi
 07SRCtV6PmEwplcB8qRVV5PSrr/gr0/Jg3U8Ru2vkVhN/wl0+7kcR4xMJzExCWtC
 q7Rdlda6HApLRYb/TIa2M/sKojNQ7usDfKpnwaYB901m0sfNmcUS53DR/5bHi+VV
 Ag35dK/0GsrwEbN11N0LnJ05AiXxN3bzJiie7SdXmoLcSVltJn7bkEDEhaKw94cU
 zMr93Xgei5JhV1Ean3rkF2b5mgpSwN7/NasMwFTC2fyXji3X6iA=
 =AInA
 -----END PGP SIGNATURE-----

Merge tag 'v1.2.0'

libwebp-1.2.0

- 12/23/2020: version 1.2.0
  * API changes:
    - libwebp:
      encode.h: add a qmin / qmax range for quality factor (cwebp adds -qrange)
  * lossless encoder improvements
  * SIMD support for Wasm builds
  * add xcframeworkbuild.sh, supports Mac Catalyst builds
  * import fuzzers from oss-fuzz & chromium (#409)
  * webpmux: add an '-set loop <value>' option (#494)
  * toolchain updates and bug fixes (#449, #463, #470, #475, #477, #478, #479,
    #488, #491)

* tag 'v1.2.0':
  update ChangeLog
  Fix check_c_source_compiles with pthread.
  disable CombinedShannonEntropy_SSE2 on x86
  pngdec: raise memory limit if needed
  {ios,xcframework}build.sh: make min version(s) more visible
  animdecoder_fuzzer: fix memory leak
  update gradle to 6.1.1
  update NEWS
  bump version to 1.2.0
  webp/encode.h: restore WEBP_ENCODER_ABI_VERSION to v1.1.0
  update AUTHORS

Bug: webp:484
Change-Id: I8f716a0e0438537e674092c1bfb60d27d738f69f
2021-01-29 19:24:01 -08:00
James Zern
fedac6cc69 update ChangeLog
Bug: webp:484
Change-Id: I071715469d10d590f7a65f9fa8e766f9c7bbf25f
2021-01-20 19:43:45 -08:00
Vincent Rabaud
170a871202 Fix check_c_source_compiles with pthread.
Also fix the variables: we need to check for PTHREAD_PRIO_INHERIT
and PTHREAD_CREATE_JOINABLE (not PTHREAD_CREATE_UNDETACHED) and
internally use HAVE_PTHREAD_PRIO_INHERIT and PTHREAD_CREATE_JOINABLE
(and not HAVE_PTHREAD_CREATE_JOINABLE).
cmake/config.h.in actually had the right variables.

BUG=webp:498

Change-Id: Ibf6cf854337cea5781a74316024f8ff4960366d7
(cherry picked from commit ceddb5fc8d)
2021-01-20 19:19:32 -08:00
Vincent Rabaud
ceddb5fc8d Fix check_c_source_compiles with pthread.
Also fix the variables: we need to check for PTHREAD_PRIO_INHERIT
and PTHREAD_CREATE_JOINABLE (not PTHREAD_CREATE_UNDETACHED) and
internally use HAVE_PTHREAD_PRIO_INHERIT and PTHREAD_CREATE_JOINABLE
(and not HAVE_PTHREAD_CREATE_JOINABLE).
cmake/config.h.in actually had the right variables.

BUG=webp:498

Change-Id: Ibf6cf854337cea5781a74316024f8ff4960366d7
2021-01-19 23:15:16 +01:00
James Zern
8599571935 disable CombinedShannonEntropy_SSE2 on x86
this function produces different results from the C code due to
use of double/float resulting in output differences when compared to
-noasm.

Bug: webp:499
Change-Id: Ia039b168c0a66da723fb434656657ba1948db8ae
2021-01-18 16:41:44 -08:00
Skal
289757fe1e TiffDec: enforce stricter mem/dimension limit on tiles
Tile can be even larger than image dimensions.

Change-Id: I80518e815bb11d7a07c8189d0493b3cc60e29815
2021-01-12 10:57:27 +01:00
James Zern
8af7436f10 Merge "{ios,xcframework}build.sh: make min version(s) more visible" into 1.2.0 2021-01-09 18:33:41 +00:00
Pascal Massimino
e56c3c5be3 pngdec: raise memory limit if needed
Some PNG input contain chunks larger than libpng's default
memory-alloc limit (8M).
Raise this limit reasonably if it looks like the input bitstream
is larger than libpng's default limit.

BUG=webp:497

Change-Id: I2c9fbed727424042444b82cbf15e0781cefb38dc
(cherry picked from commit 8696147da4)
2021-01-08 20:30:13 -08:00
Pascal Massimino
8696147da4 pngdec: raise memory limit if needed
Some PNG input contain chunks larger than libpng's default
memory-alloc limit (8M).
Raise this limit reasonably if it looks like the input bitstream
is larger than libpng's default limit.

BUG=webp:497

Change-Id: I2c9fbed727424042444b82cbf15e0781cefb38dc
2021-01-08 08:48:39 +01:00
James Zern
13b8e9fe16 {ios,xcframework}build.sh: make min version(s) more visible
add IOS_MIN_VERSION, MACOSX_MIN_VERSION and MACOSX_CATALYST_MIN_VERSION
to allow control of the minimum versions supported based on the
deployment target; based on feedback from:
e8e8db98 add xcframeworkbuild.sh
e8e8db985a

Change-Id: I9fbca072bf00c4cb8e59143371a2d3522d22808b
2021-01-05 10:52:44 -08:00
Pascal Massimino
a92254107e animdecoder_fuzzer: fix memory leak
BUG=oss-fuzz:28978

Change-Id: I7b3a495c02b4b03f367d732af5acb02856f8bead
(cherry picked from commit 8df77fb1b1)
2021-01-02 15:52:07 -08:00
James Zern
d6c2285d7c update gradle to 6.1.1
somewhat arbitrary version selection, but this matches what's currently
in use in ExoPlayer in the dev-v2 branch

fixes:
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.9.1'.

and removes the wrapper task as this is predefined in later versions:
Build file '/home/jzern/external/libwebp/build.gradle' line: 437

* What went wrong:
A problem occurred evaluating root project 'libwebp'.
> Cannot add task 'wrapper' as a task with that name already exists.

Change-Id: Ib9ef757d874cd6d4b08da3e7cef3ac5316935966
2021-01-02 15:51:55 -08:00
Pascal Massimino
8df77fb1b1 animdecoder_fuzzer: fix memory leak
BUG=oss-fuzz:28978

Change-Id: I7b3a495c02b4b03f367d732af5acb02856f8bead
2020-12-26 12:26:41 +01:00
James Zern
52ce633388 update NEWS
Bug: webp:484
Change-Id: Idd2ffc1c0a61f5442adea1ac751c57bd4cc2fced
2020-12-24 10:09:03 -08:00
James Zern
28c4982064 bump version to 1.2.0
libwebp{,decoder} - 1.2.0
libwebp libtool - 8.1.1
libwebpdecoder libtool - 4.1.1

mux - 1.2.0
libtool - 3.6.0

demux - 1.1.0
libtool - 2.7.0

Bug: webp:484
Change-Id: I458940f407515e0d95d20bbfd670ee29255c12eb
2020-12-23 19:54:29 -08:00
James Zern
7363dff25c webp/encode.h: restore WEBP_ENCODER_ABI_VERSION to v1.1.0
this was missed in:
f9b30586 fix ABI breakage introduced by 6a0ff358

Bug: webp:484
Change-Id: I64c9e5d1113209727f1ede467316549b4f2ad116
2020-12-23 19:50:03 -08:00
James Zern
826aafa570 update AUTHORS
Bug: webp:484
Change-Id: I62c722eec267ecd961e66f714beec4a8feafd724
2020-12-23 19:32:04 -08:00
James Zern
6325882327 animdecoder_fuzzer: validate canvas size
avoids some OOMs due to extreme resolutions

BUG=oss-fuzz:28658

Change-Id: I60b5fb3d7a7d17694a89237d521b851b0897e9fb
2020-12-18 11:18:11 -08:00
Skal
9eb2638119 CMake: remove duplicate "include(GNUInstallDirs)"
+ add missing copyright header

Change-Id: I2b61ab56a14d38360ac5beaebab4d2acf165dd46
2020-12-17 08:00:06 +01:00
Pascal Massimino
2e7bed7925 WebPPicture: clarify the ownership of user-owned data.
It's explicitly safe (and recommended!) to plug external data into
the pic->y/u/v/argb fields. They are guaranteed to be preserved
by the encoding process if no conversion is needed.

Change-Id: I325ca41a6a834f7f028431c605dddef67e9542cc
2020-12-14 12:28:52 +01:00
Pascal Massimino
cccf5e337a webpmux: add an '-set loop <value>' option
This allows to change the loop count option on animated files.

BUG=webp:494

Change-Id: I6849f56d7bff8b33a94f14b409e40f99789009ad
2020-12-12 19:05:11 +00:00
James Zern
c9a3f6a1d0 Merge changes Ie29f9867,I289c54c4
* changes:
  iosbuild.sh: sync some aspects of xcframeworkbuild.sh
  add xcframeworkbuild.sh
2020-12-10 20:23:39 +00:00
James Zern
319f56f1a1 iosbuild.sh: sync some aspects of xcframeworkbuild.sh
Change-Id: Ie29f986767132fe980d71e43f6b8d367a9e2e6a9
2020-12-08 19:20:53 -08:00
James Zern
e8e8db985a add xcframeworkbuild.sh
this is similar to iosbuild.sh, but will create .xcframework variants to
support Catalyst targets. currently it includes libs for:
  ios-arm64_armv7_armv7s
  ios-arm64_x86_64-maccatalyst
  ios-i386_x86_64-simulator
  macos-arm64_x86_64

this script requires Xcode 12+ to target arm64 for mac/catalyst, Xcode
11 builds will create x86_64 libraries only. iosbuild.sh remains for
compatibility purposes

Change-Id: I289c54c4b85848392a99bea698d45d54a9781f49
2020-12-08 19:20:46 -08:00