Commit Graph

4164 Commits

Author SHA1 Message Date
Yannis Guyon
27d082403c Fix integer overflow in WebPAnimDecoderGetNext()
Change-Id: Ic53263b6125ca125d5fb3791474eab78043fec18
2020-02-27 20:23:37 +01:00
Pascal Massimino
69776e3832 Merge "remove call to MBAnalyzeBestIntra4Mode for method >= 5" 2020-02-08 16:15:27 +00:00
Skal
a99078c1cf remove call to MBAnalyzeBestIntra4Mode for method >= 5
this was not giving a good alpha value, making the method 5/6 a little
blurrier than method 4 (!).

Change-Id: I69b9890dea21499c1af1753e87d9f7adf8b433de
2020-02-07 14:38:13 +01:00
James Zern
22e404ccbd CMakeLists.txt: fix set(CACHE) argument order
<type> comes before <docstring>

Change-Id: Iad8cfbbab452381969a7b36aaf244b6abc4fc974
2020-02-06 20:27:01 -08:00
Skal
71690b524e fix MSVC warning
"warning C4244: '=': conversion from 'const int' to 'float', possible loss of data"

Change-Id: Ie0769e50c19efd48332ffeadb026d4538fec9919
2020-01-30 09:25:26 +01:00
Skal
6a0ff35872 Enc: add a qmin / qmax range for quality factor
This is particularly useful for multi-pass search (but not only),
to prevent the search from going over or below a reasonable threshold.
E.g.: 'cwebp -qrange 50 80 ...' will prevent any unreasonable degradation.

new cwebp option: -qrange min max

Change-Id: I59f394533535fc20b6996bc0895f4301476d5eff
2020-01-29 14:52:02 +01:00
James Zern
0fa56f307f libwebp-1.1.0
- 12/18/2019: version 1.1.0
   * API changes:
     - libwebp:
       WebPMalloc (issue #442)
     - extras:
       WebPUnmultiplyARGB
   * alpha decode fix (issue #439)
   * toolchain updates and bug fixes
     (chromium: #1026858, #1027136, #1027409, #1028620, #1028716, #995200)
     (oss-fuzz: #19430, #19447)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEaw5rcJdt4wPt8vYB+cPWvbgjK10FAl4TyZcACgkQ+cPWvbgj
 K104/hAAilifYCn1sUdoCShS2/trJiRr1RywfRQdlpCDcZcrJpNJhCMRXSPveXtB
 qzVjxj5b1YB5z3Ungp2qvfzCl9zWkpoSvliZdsp7XBgtmXTA5Sac68E4QW7dfPOP
 C0YxG8m3hnJ7pFFZFMgXA3v8UXGUKSMNclZPSwGILKHR0txd8FLt1t/VW4z9+9Yw
 78eU+Wbl2sE2QgNRhatYPWB/M2iFmTnMOylR9lAzynf4BFEbBO+gp2liQuQqElkn
 dzJWCm3OCdp8fyNWzYd0tw/X4/3wqdbrlueXny+y+98lY1Q0zWXYSvexJrsSAt/B
 oKaaG/6NfgikWEcS6hfwcbjG6J1mbYPRZqnjk4yRVijYIAEVJXgKoCrFF5qIp7tl
 F35rAQ/ml3JVSUxk200HeKIvWtVlhM6ID9pwa+CRUdEgLffqZ2/Usuxec6mTqELY
 18U5DTBM7r302lMsjaUTIuzA/QkEjPC+G+Lm2lmMMkjBNfU3amG3dKWqsKL+Dfcj
 5AELdL4H8IPftMj4yhrNiywc7Imr0SItQpwglh9vSBeFo6+IFf/jkKu/UwcMn1O6
 5irTNnnJX/cAT9pIx2KERs1HhZO8/bHlpiaO7umHWeD97zTbPF+NJzcBe23CN5vj
 an9pkMo7o0l8sq/QMyqWxic9Luzql/a7B1M9k9uLIM5t9YCwxg4=
 =cVn5
 -----END PGP SIGNATURE-----

Merge tag 'v1.1.0'

libwebp-1.1.0

- 12/18/2019: version 1.1.0
  * API changes:
    - libwebp:
      WebPMalloc (issue #442)
    - extras:
      WebPUnmultiplyARGB
  * alpha decode fix (issue #439)
  * toolchain updates and bug fixes
    (chromium: #1026858, #1027136, #1027409, #1028620, #1028716, #995200)
    (oss-fuzz: #19430, #19447)

* tag 'v1.1.0':
  update ChangeLog
  Makefile.vc: fix webp_quality.exe link
  update NEWS
  bump version to 1.1.0
  update AUTHORS

BUG=webp:441

Change-Id: Ie4ae80a736c795549e7f0fc8942a293fa724d475
2020-01-06 16:31:09 -08:00
Pascal Massimino
6cf504d018 PNM decoding: handle max_value != 255
also add support for PAM's GRAYSCALE_ALPHA tuple (with depth = 2)

BUG=webp:449

Change-Id: I0fe4825cd1d5487b9f7af332c7d3d56c1b35c3fb
2020-01-06 23:48:40 +01:00
James Zern
d7844e9762 update ChangeLog
BUG=webp:441

Change-Id: Ib401d468c677b9e598ffcec6535a846bf2456a4f
2019-12-21 05:37:43 -08:00
James Zern
7f0064361a Makefile.vc: fix webp_quality.exe link
when building a dll based libwebp include the dsp private symbols that
WebPUnmultiplyARGB requires

Change-Id: I7cf7da0b20d6cf6740219c8562380926a0abd93c
(cherry picked from commit cf047e8347)
2019-12-20 16:29:22 -05:00
James Zern
cf047e8347 Makefile.vc: fix webp_quality.exe link
when building a dll based libwebp include the dsp private symbols that
WebPUnmultiplyARGB requires

Change-Id: I7cf7da0b20d6cf6740219c8562380926a0abd93c
2019-12-20 08:55:37 -08:00
James Zern
c074c65368 update NEWS
BUG=webp:441

Change-Id: I8586b004e28b92d8c3c146f681bc9765f8a1f361
2019-12-18 00:06:50 -08:00
James Zern
30f0955160 bump version to 1.1.0
libwebp{,decoder} - 1.1.0
libwebp libtool - 8.0.1
libwebpdecoder libtool - 4.0.1

mux - 1.1.0
libtool - 3.5.0

demux - 1.1.0
libtool - 2.6.0 (no code change)

BUG=webp:441

Change-Id: I458940f407515e0d95d20bbfd670ee29255c12eb
2019-12-18 00:06:50 -08:00
James Zern
a76694a1d6 update AUTHORS
BUG=webp:441

Change-Id: I844f1e4b5c32219a1e54de0c57a73822f93c7755
2019-12-18 00:06:50 -08:00
James Zern
6e3ef7b326 extras: fix WEBP_SWAP_16BIT_CSP check
this is defined to 0 by dsp.h if it wasn't defined previously, since:
47178dbd extras: add WebPUnmultiplyARGB() convenience function

Change-Id: If4dd48360a95b2786410670cff5ac655227fb6dd
2019-12-18 07:15:53 +00:00
Skal
47178dbd45 extras: add WebPUnmultiplyARGB() convenience function
This is useful for converting associated to unassociated.

Change-Id: I0e6d16ec63cb5514a0f945c14a54e0d01e1fab0a
2019-12-17 17:36:37 -08:00
James Zern
22cbae33e5 idec_dec: fix 0 offset of NULL pointer
in RemapMemBuffer() and AppendToMemBuffer()

BUG=chromium:1028716,chromium:1027136

Change-Id: Ibc321d233b6207be3cb5cef4d9e8a60498e32457
2019-12-14 17:14:30 -08:00
James Zern
290dd0b426 muxread: fix 0 offset of NULL pointer
BUG=chromium:1028620,chromium:1027409

Change-Id: I2b5527a223a03161afbf39c297c4646954a91fbc
2019-12-14 12:57:39 -08:00
James Zern
0df474ac9e Merge "lossless_(enc_|)sse2: avoid offsetting a NULL pointer" 2019-12-13 22:04:44 +00:00
James Zern
c6b75a1966 lossless_(enc_|)sse2: avoid offsetting a NULL pointer
PredictorSub0_SSE2 doesn't use 'upper' (neither does
VP8LPredictorsSub_C[0]); just pass NULL when dealing with trailing
pixels to avoid undefined behavior when offsetting a NULL pointer

BUG=chromium:1026858,oss-fuzz:19430

Change-Id: I08be8899ed2e34f26aaee34defe68dbd0fe216d3
2019-12-13 18:33:10 +00:00
Skal
295e5e3801 fix UBSAN warning
"applying non-zero offset 2044 to null pointer"

  Fixes chromium bug #19447

Change-Id: I530ae27dc64e92ed0018f36469264c448329e042
2019-12-13 13:26:16 +00:00
James Zern
e2575e05cb DC8_NEON,aarch64: use vaddv
results in one fewer instruction for both DC8uv_NEON and
DC8uvNoLeft_NEON

Change-Id: Ia4e6f4dbc070079cdc2496a698bd4b34198ea164
2019-12-06 09:38:48 -08:00
Cheng Yi
b0e09e346f dec_neon: Fix build failure under some toolchains
some toolchains may implement vcreate_u64 as an assignment to a vector
causing a type mismatch:
 invalid conversion between vector type 'uint64x1_t' (vector of 1
'uint64_t' value) and integer type 'unsigned int' of different size
  const uint64x1_t LKJI____ = vcreate_u64(L | (K << 8) | (J << 16) | (I << 24));
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I5c7b0076ad66d4b3fcdcb7ee9f59bbaa6f19b783
2019-12-06 00:06:44 -08:00
Oliver Wolff
cf0e903c89 dsp/lossless: Fix non gcc ARM builds
The workaround for GCC ARM must not be applied when another toolchain
(like MSVC) is used for the build.

Change-Id: I11ec4558902063ccb085d3f435e24b3a60739dd5
2019-11-27 15:05:08 +01:00
Vincent Rabaud
bb7bc40b6d Remove ubsan errors.
'upper' could be NULL and it would be increased.
But that is for predictor zero that does not use 'upper'.

Change-Id: Icd4ae6792cc55ea021b4f828c3dbdb5f03e120d8
2019-11-06 14:08:14 +01:00
Pascal Massimino
78881b769c CMake: fix GLUT library link
use GLUT_LIBRARIES instead of GLUT::GLUT

Change-Id: I92af90e09e00b01bd050ebeb8e9003b14c7dc144
2019-10-23 16:25:39 +02:00
James Zern
9f750f7a06 cmake: fix BUILD_SHARED_LIBS build on mac
add some missing dependencies and convert utility libraries to
static only libraries to avoid creating unnecessary shared object
libraries which may fail to link due to missing symbols.

Change-Id: Iaa91a3d97fa5af6ada4b2a851cc7fc2879d871da
2019-10-22 14:42:30 -07:00
Yannis Guyon
17850e74ce libwebp: Remove char-subscripts warning in pnmdec.c
Change-Id: I7a771e17fca0ba8a49a816b48cc477ad7a03a435
2019-10-16 17:58:30 +02:00
Pascal Massimino
2fa2552db1 Merge "Expose WebPMalloc() in addition to WebPFree()" 2019-10-16 05:48:18 +00:00
Skal
a4df4aae73 Expose WebPMalloc() in addition to WebPFree()
and use it at various places, including for WebPData.

This is an API change!

Change-Id: Ic041323a1179c465292a4f981a86c4c34635d243
2019-10-15 23:19:50 +02:00
Yannis Guyon
853ea3d846 imageio/tiff: Return error before allocating bad tile size
Change-Id: I5820b808e25beeda0fd4e755b62da0caabe48d8d
2019-10-15 10:44:17 +02:00
Nico Weber
af650c0bd2 Fix a Wxor-used-as-pow false positive
Since people seem to write "2 ^ X" hoping that it means "1 << X", clang
recently added a warning for this pattern.

It incorrectly fires on this file. To suppress it, restructure the code
to be less clever. (Alternatively we could use "xor" instead of "^" or
write "0x2" instead of "2" but both seem worse.)

No intended behavior change.

Bug: chromium:995200
Change-Id: I64744345be5f5a8cd1f4aaeaf0982da239b378a7
2019-09-04 23:35:46 -07:00
James Zern
601ef17cf6 libwebp.py: update to swig 3.0.12
fixes use with python 3

Change-Id: I4035c1c93e9f6551dd2e7e57da7d4ffd42ca06ce
2019-08-31 19:20:58 -07:00
Skal
0e48d889eb bugfix: last alpha rows were incorrectly decoded
sometimes, the last rows of the alpha plane contain more than NUM_ARGB_CACHE_ROWS
rows to process. But ExtractAlphaRows() was repeatedly calling ApplyInverseTransforms()
without updating the dec->last_row_ field, which is the starting row used as starting
point.

Fix would consist of either updating correctly dec->last_row_ before calling
ApplyInverseTransforms(). Or pass the starting row explicitly, which is simpler.

BUG=webp:439

Change-Id: Id99f2c28662d02b2b866cb79e666050be9d59e04
2019-08-30 14:13:28 +02:00
Yannis Guyon
24d2ccb4e0 webp: Fix imageio ReadPNM() TUPLTYPE
It was colliding with "DEPTH" header value so ignoring "TUPLTYPE"
except for unhandled types.

Change-Id: I3c69cb6a81c5369e64b59d50567cd7fbc1756d57
2019-07-30 09:22:29 +02:00
James Zern
fab8f9cfcf cosmetics: normalize '*' association
we associate '*' with types rather than variables

Change-Id: Id93ed65272a8a88e604278693e3850649639e9b6
2019-07-26 01:04:09 -07:00
James Zern
94138e0e0d update .gitignore
anim_dump, webpinfo, vwebp_sdl

Change-Id: I66043c9c296fae2319ec9b0acf3031543cb070bd
2019-07-13 00:52:46 -07:00
James Zern
0fe1a89dbf update ChangeLog
Change-Id: I9cc1442edb7b3fef73c07979d85417e9dcbf5a70
2019-07-04 12:32:37 -07:00
James Zern
2ad0916d5a update NEWS
Change-Id: I56c8d9430f0c77e813c2dbeee866387fa7a441c5
2019-07-04 11:43:29 -07:00
James Zern
1287362b9a bump version to 1.0.3
libwebp{,decoder} - 1.0.3
libwebp libtool - 7.5.0
libwebpdecoder libtool - 3.5.0

mux - 1.0.3
libtool - 3.4.0 (no code change)

demux - 1.0.3
libtool - 2.6.0 (no code change)

Change-Id: Ie0eaeff5fd6ab6f957836b50aff565843e6ca845
2019-07-04 11:07:04 -07:00
James Zern
7b968cc2d5 update AUTHORS
Change-Id: Ic19305928b563110093254e6177f22bbd65b0827
2019-07-04 10:42:46 -07:00
Pascal Massimino
9d6988f44d Fix the oscillating prediction problem at low quality
For some exact resonance the over-quantization was exactly
compensating the under-quantization, leading to resonance
and strange patterns.

-> we special-handle the very flat blocks, hopefully for the
greater good (and not just the bad-resonance case).

For 'fast mode' (-m 3 or less), we just pay special attention
to the border of the image, where the oscillation / instability
usually starts. For the inner part of the image, since we're not
doing rd-opt, it's harder to fix anything.

Overall, on 'regular' images, the change is written the noise,
often leading to overall faster encoding (because of the short-cut).

BUG=webp:432

Change-Id: Ifaa8286499add80fd77daecf8e347abbff7c3a15
2019-07-03 08:40:41 -07:00
James Zern
312f74d010 makefile.unix: allow *_LIBS to be overridden w/EXTRA_LIBS
previously setting EXTRA_LIBS on the command line would skip any
per-target updates. this allows both EXTRA_LIBS and [CD]WEBP_LIBS,
GL_LIBS to be set together avoiding the need to add unnecessary
dependencies to EXTRA_LIBS which affects all targets.

Change-Id: I63bbc14f0ac0cd04aa50c5d5047060ac57d0c9dc
2019-07-01 19:49:18 -07:00
James Zern
92dbf23775 filters_sse2,cosmetics: shorten some long lines
Change-Id: Ifd8ddec50821aba175d41237df18e41b9ac6c7d4
2019-07-01 12:17:43 -07:00
James Zern
a277d197a2 filters_sse2.c: quiet integer sanitizer warnings
missed in a788b49

with clang7+ quiets conversion warnings like:
implicit conversion from type 'int' of value -114 (32-bit, signed) to
type 'uint8_t' (aka 'unsigned char') changed the value to 142 (8-bit,
unsigned)

Change-Id: I52dcd9cd613107f5424177c277785b92430bffb7
2019-07-01 11:16:50 -07:00
Vincent Rabaud
804540f183 Fix cpufeatures in CMake.
cpufeatures was not installed even though WebP depends on it on Android.

BUG=webp:415

Change-Id: Iba00001534ceedbf65fbb42244a6c1341eb65134
2019-07-01 10:48:54 +02:00
Vincent Rabaud
bf00c15b23 Add CMake option for bittrace.
Change-Id: I9f09eb2c0afdac41e94bc10dfedd1fd004c45731
2019-07-01 10:48:54 +02:00
James Zern
a788b49897 filters_sse2.c: quiet integer sanitizer warnings
with clang7+ quiets conversion warnings like:
implicit conversion from type 'int' of value -114 (32-bit, signed) to
type 'uint8_t' (aka 'unsigned char') changed the value to 142 (8-bit,
unsigned)

Change-Id: I7f08a836ddcf777454dfd5b877a81b62b2abac86
2019-06-28 23:22:49 -07:00
James Zern
e6a92c5e15 filters.c: quiet integer sanitizer warnings
with clang7+ quiets conversion warnings like:
implicit conversion from type 'int' of value -12 (32-bit, signed) to
type 'uint8_t' (aka 'unsigned char') changed the value to 244 (8-bit,
unsigned)

Change-Id: I053c92301e55dcb0cae89a7733636283da942176
2019-06-28 23:16:28 -07:00
James Zern
ec1cc40a59 lossless.c: remove U32 -> S8 conversion warnings
Change-Id: Ica2664ea087254959391275654412141ed9472df
2019-06-28 01:34:55 -07:00