Commit Graph

4583 Commits

Author SHA1 Message Date
Yannis Guyon
916548c28c Make kFuzzPxLimit sanitizer dependent
Change-Id: Ib70f3c05fc845494c45cb357e70e9602a7e876a3
2023-04-25 08:14:22 +02:00
James Zern
4070b271ab advanced_api_fuzzer: reduce scaling limit
avoids another timeout while fuzzing with ASan

Change-Id: Ic5dfed15347bdd36f42274b8b2a25aec79fd568c
2023-04-18 16:56:23 -07:00
James Zern
761f49c3ab Merge "webp-lossless-bitstream-spec: add missing bits to ABNF" into main 2023-04-13 20:53:32 +00:00
James Zern
84d04c4845 webp-lossless-bitstream-spec: add missing bits to ABNF
alpha-is-used and the version number were missing before 'image-stream'

spotted by thakis@

Change-Id: I7a4f1d2e0f0962bb1a79a0400c229738159d88a5
2023-04-13 12:13:34 -07:00
James Zern
0696e1a7fb advanced_api_fuzzer: reduce scaling limit
avoids another timeout while fuzzing with ASan

Change-Id: Icf7209f3f93b894684ac7364864e4568b6b2c057
2023-04-11 12:16:39 -07:00
James Zern
93d88aa25b Merge "deps.cmake: remove unneeded header checks" into main 2023-04-11 19:13:10 +00:00
James Zern
118e0035df deps.cmake: remove unneeded header checks
These were picked up when matching autoconf's default checks and aren't
useful except to compare the generated config.h. Removing them speeds up
cmake, especially on windows where creating new processes is slow.

Change-Id: Ie891aad0a809af16357168d2ff7fd65922ee4011
2023-04-11 11:37:24 -07:00
James Zern
4c3d7018c0 webp-lossless-bitstream-spec: condense normal-prefix-code
Have this match simple-prefix-code and redirect to "Normal Code Length
Code" as the added indirection to 'code-length-code' and the undefined
'encoded-code-lengths' doesn't add much.

spotted by thakis@

Change-Id: Icd6b64a47c4e0001e93271d9ae5585be4a6d5906
2023-04-10 17:22:55 -07:00
James Zern
a6a09b3296 webp-lossless-bitstream-spec: fix 2 code typos
- add missing '(' in DIV_ROUND_UP
- in 6.2.2, rename 'pos' variable reference to match definition
  ('position')

spotted by thakis@

Change-Id: Ida3ed281c2c753ebbb0e1eb3c4ed04dadc79ca24
2023-04-10 17:18:52 -07:00
James Zern
50ac4f7c97 Merge "cpu.h: enable NEON w/_M_ARM64EC" into main 2023-04-07 20:31:49 +00:00
Yannis Guyon
4b7d7b4f2b Add contribution instructions
Change-Id: Icc58ef6c1e79e59977e0093973ad353237560e8e
2023-04-07 15:10:16 +02:00
James Zern
0afbd97b45 cpu.h: enable NEON w/_M_ARM64EC
The Arm64EC (Emulation Compatible) ABI was added for Windows 11 [1].

[1] https://learn.microsoft.com/en-us/windows/arm/arm64ec

Bug: b/277254922
Change-Id: I3767e1b3db61fa9c33eef7a9ed7abee7c502e36f
2023-04-06 13:49:36 -07:00
James Zern
349f4353dd Merge changes Ibd89e56b,Ic57e7f84,I89096614 into main
* changes:
  advanced_api_fuzzer: reduce scaling limit
  Skip slow scaling in libwebp advanced_api_fuzzer
  Reduce libwebp advanced_api_fuzzer threshold
2023-03-25 01:50:02 +00:00
James Zern
8f7513b7c0 upsampling_neon.c: fix WEBP_SWAP_16BIT_CSP check
this is always defined by default to 0 since:
v0.6.0-158-g663a6d9d unify the ALTERNATE_CODE flag usage

previously the !defined() check would cause a mismatch between C and
assembly.

Change-Id: Idca0b8e39ca90d63785fd4125aeb7af86c5aae61
2023-03-24 11:20:35 -07:00
James Zern
cbf624b561 advanced_api_fuzzer: reduce scaling limit
avoids another timeout while fuzzing with ASan

Change-Id: Ibd89e56bf936aeea040cd4c47ccae20960417ac0
2023-03-24 10:52:46 -07:00
yguyon@google.com
89edfdd1e9 Skip slow scaling in libwebp advanced_api_fuzzer
Change-Id: Ic57e7f8418afec42f042197a401aaf4cc047b23f
2023-03-24 10:52:43 -07:00
yguyon@google.com
859f19f74f Reduce libwebp advanced_api_fuzzer threshold
To avoid timeouts.

Change-Id: I8909661479cdbcb940bb44c6f9130906cab3f271
2023-03-24 10:52:40 -07:00
James Zern
a4f0483579 Merge changes Ic389aaa2,I329ccd79 into main
* changes:
  img2webp: normalize help output
  cwebp: reflow -near_lossless help text
2023-03-20 19:46:23 +00:00
James Zern
1275fac820 Makefile.vc: fix img2webp link w/dynamic cfg
add a dependency on libsharpyuv, which is needed after:
0825faa4c img2webp: add -sharp_yuv/-near_lossless

Change-Id: I2471549aa85a4ead6e00d6c459d9774ea4254eaa
2023-03-18 13:58:21 -07:00
James Zern
2fe27bb96d img2webp: normalize help output
this makes the output from img2webp and the ordering in doc/tools.md and
man/img2webp.1 consistent

Change-Id: Ic389aaa29c20128f2b87f231be383094602f125b
2023-03-17 15:37:55 -07:00
James Zern
24bed3d9fb cwebp: reflow -near_lossless help text
this matches the output from img2webp added in:
0825faa4 img2webp: add -sharp_yuv/-near_lossless

Change-Id: I329ccd796d7e9bee36de1429fceafe83d7dc5532
2023-03-17 15:17:31 -07:00
jzern@google.com
0825faa4c1 img2webp: add -sharp_yuv/-near_lossless
Both are global settings. Modifying them at the frame level is left as a
follow up based on need.

Bug: b/272739498
Change-Id: If15256c052f73fe3df56be5e0095e76d9870cc0f
2023-03-17 09:35:29 -07:00
James Zern
d64e6d7d9d Merge "PaletteSortModifiedZeng: fix leak on error" into main 2023-02-28 00:23:05 +00:00
James Zern
0e12a22d88 Merge "EncodeAlphaInternal: clear result->bw on error" into main 2023-02-28 00:22:57 +00:00
James Zern
0edbb6ea71 PaletteSortModifiedZeng: fix leak on error
Change-Id: I462bd9a3bc4670efdf251c295f6771a38c08a6ce
2023-02-23 22:03:31 -08:00
James Zern
41ffe04e12 Merge "Update yapf style from "chromium" to "yapf"" into main 2023-02-24 01:29:40 +00:00
Thiago Perrotta
2d9d9265f5 Update yapf style from "chromium" to "yapf"
yapf v0.30.0 renamed "chromium" style to "yapf".

Bug: chromium:1306598
Change-Id: I2a637d2c5d64f81ba411b1c0d07339ad7480bd66
2023-02-23 18:10:53 -05:00
James Zern
a486d800b6 EncodeAlphaInternal: clear result->bw on error
This avoids a double free should the function fail prior to
VP8BitWriterInit() and a previous trial result's buffer carried over.
Previously in ApplyFiltersAndEncode() trial.bw (with a previous
iteration's buffer) would be freed, followed by best.bw pointing to the
same buffer.

Since:
187d379d add a fallback to ALPHA_NO_COMPRESSION

In addition, check the return value of VP8BitWriterInit() in this
function.

Bug: webp:603
Change-Id: Ic258381ee26c8c16bc211d157c8153831c8c6910
2023-02-22 22:23:41 -08:00
Yannis Guyon
1347a32d82 Skip big scaled advanced_api_fuzzer
To avoid timeouts.

Change-Id: I8f04fd45313bef47004a616d2460be992692030d
2023-02-08 10:53:40 +01:00
Yannis Guyon
52b6f06703 Fix scaling limit in advanced_api_fuzzer.c
config.options.scaled_width or config.options.scaled_height being 0
means a ratio-conservative scaling so 7361842 was not enough.

Change-Id: Ib75241eb683cf824bc46222c5c07535b6c6d7313
2023-02-07 18:05:42 +01:00
Yannis Guyon
7361842839 Limit scaling in libwebp advanced_api_fuzzer.c
Change-Id: Ic1e3fdc76f4bdcb1ac68cf4f9334d2e77ca29374
2023-01-27 14:39:14 +01:00
James Zern
b54d21a01d Merge "CMakeLists.txt: allow CMAKE_INSTALL_RPATH to be set empty" into main 2023-01-18 19:10:44 +00:00
James Zern
31c28db53c libwebp{,demux,mux}.pc.in: Requires -> Requires.private
The libraries don't expose the symbols in libsharpyuv / libwebp, they're
only needed when static linking.

Noted for libwebp (Requires: libsharpyuv) in:
https://crbug.com/webp/590#c5. libwebpdemux and libwebpmux had a similar
issue with libwebp.

See also:
https://web.archive.org/web/20190921014607/https://wiki.openmandriva.org/en/Overlinking_issues_in_packaging

Change-Id: Ia1866b6b44cbb1ef1a77fd45fbcf10c027eae788
2023-01-17 18:32:44 -08:00
James Zern
d9a505ffb6 CMakeLists.txt: allow CMAKE_INSTALL_RPATH to be set empty
this allows the user to override the default non-empty value added in:
b4994eaa CMake: set rpath for shared objects

Bug: webp:592
Change-Id: I069dcbcd8c2f1e8654d9bc98149139f398ac2c93
Fixed: webp:592
2023-01-17 18:22:47 -08:00
James Zern
bdf33d03b0 libwebp-1.3.0
- 12/16/2022: version 1.3.0
   This is a binary compatible release.
   * add libsharpyuv, which exposes -sharp_yuv/config.use_sharp_yuv
     functionality to other libraries; libwebp now depends on this library
   * major updates to the container and lossless bitstream docs (#448, #546,
     #551)
   * miscellaneous warning, bug & build fixes (#576, #583, #584)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEaw5rcJdt4wPt8vYB+cPWvbgjK10FAmPAtgoACgkQ+cPWvbgj
 K11C9A/9FVNCbB6BTa0q2iZsgoEj49k+6KCsYQs80yhAwBBKtB+b2qHbjoaoGYQN
 cRNeanWvP2XxWcInPvkr6CIOhOaP9U3j3PKlubCeWv4YzI58mOx6uVGv1T9r6Isr
 ogPXrSOATUnVnlgG0RtJLRivOadY0mY+u4JNj2R8kHmSgp50poZRrw8GIiclh1ml
 KVq9RJ9St/p8ps4mJROLowxnaB5pH2jTif5T1rkmq4GsQskkLzPtHfELrM4hQjMz
 dc/pcdT0DCMMRqJZ/ePGMK0BjVjzHEBsxHYuHGfayKesO+MYajwfsTyYxxSGOD3y
 fEb0H7NCwHemGm94AyYj6NyjKUuIG2G2dku+0h0dWn/Ml855RzghGLIqCzqMXs0s
 AwaSpoyxWMBJw39pHcuk+ZuVX+uhy7dndLC5OtTLfEDCDwxKAktGaUdzRIy1nL/k
 NzH0IWCOnb/awux6heamP1gmTfKIKk+IsJwFiFJyfi+VQwxil7jD4rVCYsavL5f0
 hTkBFcZNzZsNSkuFJzqDiCnCFtcXWJ8mQ9fwx38wlvESH+U3k0yggo02cXmLpH8J
 pSYdlOU5kCpipdfgmS7Aa4HHo91SgkjlvL4+bzOa22UBpMQEgD3wgMnkVUm4dZ9F
 bgwMsZLt9KQYso6OKBdvOx+wy6Bp7/gOnIhVPleRZZk/HWoAHdE=
 =67V9
 -----END PGP SIGNATURE-----

Merge tag 'v1.3.0'

libwebp-1.3.0

- 12/16/2022: version 1.3.0
  This is a binary compatible release.
  * add libsharpyuv, which exposes -sharp_yuv/config.use_sharp_yuv
    functionality to other libraries; libwebp now depends on this library
  * major updates to the container and lossless bitstream docs (#448, #546,
    #551)
  * miscellaneous warning, bug & build fixes (#576, #583, #584)

* tag 'v1.3.0':
  update ChangeLog
  update NEWS
  bump version to 1.3.0
  update AUTHORS

Bug: webp:590
Bug: b/262806895
Change-Id: I4bc5cfb0708fab3569dc567d22bfdbcb5ff2a1ad
2023-01-12 17:58:29 -08:00
James Zern
b557776962 update ChangeLog
Change-Id: If794cc65c0813fbff7f5e0ecbd519d5387beb16d
2022-12-19 16:23:35 -08:00
James Zern
0ba772442e update NEWS
Bug: webp:590
Change-Id: I877bda2d177bd371cd2a43974200c66cf5fa8a10
2022-12-16 16:47:42 -08:00
James Zern
e763eb1ea3 bump version to 1.3.0
libwebp{,decoder} - 1.3.0
libwebp libtool - 8.6.1
libwebpdecoder libtool - 4.6.1

mux - 1.3.0
libtool - 3.11.0

demux - 1.3.0
libtool - 2.12.0

sharpyuv - 0.2.0 (unchanged, first release)
libtool - 0.0.0 (ditto)

Bug: webp:590
Change-Id: Ibf3ed56af87667c30650d8dd60eb0ff3bdcb6749
2022-12-16 16:47:42 -08:00
James Zern
2a8686fcab update AUTHORS
Bug: webp:590
Change-Id: I5f18987cd56f5efd47fe901b097669346c698446
2022-12-16 16:47:36 -08:00
James Zern
106a57c1db Merge "*/Android.mk: add a check for NDK_ROOT" into main 2022-12-16 20:59:49 +00:00
James Zern
c5e841c417 Merge "extras: WebpToSDL -> WebPToSDL" into main 2022-12-16 20:15:12 +00:00
James Zern
dbc3071512 Merge "xcframeworkbuild.sh: bump MACOSX_CATALYST_MIN_VERSION" into main 2022-12-16 20:13:44 +00:00
James Zern
6fc1a9f96e */Android.mk: add a check for NDK_ROOT
This simplifies integration with the Android platform and avoids the
files from being used when a non-NDK build is performed. In that case
Android.bp is preferred.

Change-Id: I6e334cf8b05a19da8452405f5f448f9e4b6e4a40
2022-12-16 12:10:36 -08:00
James Zern
d3e151fc03 doc/api.md,webp_js/README.md: Webp -> WebP
Change-Id: Ib30d008b5750d2e4064aaf478db6f5bc7aa5902e
2022-12-15 18:14:19 -08:00
James Zern
ed92a62649 extras: WebpToSDL -> WebPToSDL
this normalizes the function case to what's more commonly used in the
project

Change-Id: If614cb8eff4afba96b2468e28c52d850651a759b
2022-12-15 18:11:40 -08:00
James Zern
6eb0189b24 xcframeworkbuild.sh: bump MACOSX_CATALYST_MIN_VERSION
14.0 (-target x86_64-apple-ios14.0-macabi) is supported by default in
Xcode 14.0.1.

Change-Id: I05bc318fe321758c68c7be2e339d77512dd81684
2022-12-15 15:14:44 -08:00
James Zern
1d58575b18 CMake: align .pc variables with autoconf
Use prefix/exec_prefix for includedir/libdir if
CMAKE_INSTALL_{LIBDIR,INCLUDEDIR} are relative and the CMake variable
alone if they're absolute.

This matches what autoconf will produce if a custom --libdir or
--includedir are used.

See also: https://github.com/AOMediaCodec/libavif/issues/1220

Change-Id: I6fbc016c0009ede42e1e5db3a9ee7ae9545d8da0
2022-12-14 19:21:12 -08:00
James Zern
e5fe2cfc1b webp-lossless-bitstream-spec,cosmetics: reflow paragraphs
Change-Id: Ifd7472fe0678b45efc62faa66de8e8dc2e9931e3
2022-11-22 11:38:01 -08:00
James Zern
0ceeeab987 webp-lossless-bitstream-spec: add amendment note
for fixes to the distance_map pseudo-code, the inverse color transform
description and the num_code_lengths check.

Bug: webp:448
Bug: webp:551
Change-Id: Id7e791b97704dd64bb9519657ce48b92cb457ae4
2022-11-22 11:38:01 -08:00
James Zern
607611cd86 Merge "webp-container-spec: normalize section title case" into main 2022-11-22 19:35:41 +00:00