Commit Graph

4368 Commits

Author SHA1 Message Date
jzern@google.com
02ca04c348 add missing USE_{MSA,NEON} checks in headers
msa_macro.h
neon.h

allows the headers to be built / analyzed under different target
configurations

Change-Id: Ibbcfada210b54988aa5279674d53af8e21fd4a97
2021-12-14 22:21:57 +00:00
James Zern
e94716e27c xcframeworkbuild.sh: place headers in a subdir
Headers/<framework> rather than Headers/ to avoid a Xcode error when
using multiple frameworks:
  error: Multiple commands produce
    '.../Build/Products/Debug-iphoneos/include/types.h'

WebPMux.xcframework/ios-arm64_i386_x86_64-simulator/Headers/WebPMux
WebPMux.xcframework/ios-arm64_armv7_armv7s/Headers/WebPMux
WebPMux.xcframework/macos-arm64_x86_64/Headers/WebPMux
WebPMux.xcframework/ios-arm64_x86_64-maccatalyst/Headers/WebPMux
WebPDecoder.xcframework/ios-arm64_i386_x86_64-simulator/Headers/WebPDecoder
WebPDecoder.xcframework/ios-arm64_armv7_armv7s/Headers/WebPDecoder
WebPDecoder.xcframework/macos-arm64_x86_64/Headers/WebPDecoder
WebPDecoder.xcframework/ios-arm64_x86_64-maccatalyst/Headers/WebPDecoder
WebPDemux.xcframework/ios-arm64_i386_x86_64-simulator/Headers/WebPDemux
WebPDemux.xcframework/ios-arm64_armv7_armv7s/Headers/WebPDemux
WebPDemux.xcframework/macos-arm64_x86_64/Headers/WebPDemux
WebPDemux.xcframework/ios-arm64_x86_64-maccatalyst/Headers/WebPDemux
WebP.xcframework/ios-arm64_i386_x86_64-simulator/Headers/WebP
WebP.xcframework/ios-arm64_armv7_armv7s/Headers/WebP
WebP.xcframework/macos-arm64_x86_64/Headers/WebP
WebP.xcframework/ios-arm64_x86_64-maccatalyst/Headers/WebP

Bug: webp:542
Change-Id: Ic7e03d85d2119597e422b9cf68b3ac5a892d494d
2021-12-10 19:44:36 -08:00
Roberto Alanis
c846efd888 patch-check: commit subject length check
Change-Id: I7a1c7349f4f461c2384cbd1a62d1aa2e4e3be819
Bug: b:185520507
2021-12-08 18:57:13 +00:00
James Zern
b6f756e82b update http links
- prefer https

- metadataworkinggroup.org/com seem to be offline; the web archive link
  was obtained from exiftool: https://exiftool.org/TagNames/MWG.html

- fix kramdown link, rubyforge has been gone a long time

- fix png/zlib links

Bug: webp:544
Bug: b/202302177
Change-Id: Id69de4553e7baf00393f12a2c1acb262443a1a93
2021-11-23 10:13:40 -08:00
James Zern
8f5cb4c18e update rfc links
to https://datatracker.ietf.org/doc/html/... the http tools.ietf.org
links redirect here sometimes, in other cases they 404.

Bug: webp:544
Change-Id: I900972070d6c5659c45a86a89e78b870f42fe5bc
2021-11-17 11:03:35 -08:00
Pascal Massimino
8ea81561d2 change VP8LPredictorFunc signature to avoid reading 'left'
... when it's not available. Even if the value was discarded and
never used, some msan config were complaining about reading it
and passing it around.

Change-Id: Iab8d24676c5bb58e607a829121e36c2862da397c
2021-11-05 16:22:31 +01:00
Pascal Massimino
6b1d18c362 webpmux: fix the -bgcolor description
Change-Id: Iedb1865aec7b8c78c185a0eb17d97a5c9446a275
2021-11-04 22:51:48 +01:00
Pascal Massimino
3368d8768a Merge "webpmux: add "-set bgcolor A,R,G,B"" into main 2021-11-04 19:00:36 +00:00
Pascal Massimino
f213abf620 webpinfo: print the number of warnings
otherwise they can go un-noticed (unless you use -diag).

Change-Id: Ic6faaf09e7993002cdae3e998623764fde860351
2021-11-04 17:09:51 +01:00
Pascal Massimino
50c97c301d webpmux: add "-set bgcolor A,R,G,B"
Similarly to "-set loop <>", this is useful to set
the parameter at global level and not just while assembling
the frames separately.

Change-Id: I79bcbe37f8ff50b9904e78d14011ccbac72f17a1
2021-11-04 15:45:44 +00:00
Roberto Alanis
2c206aaf96 Remove CMakeLists.txt check in compile.sh
Bug: b:185520507
Change-Id: Id573423a9f6960360b9d96950c098ba488e2e9f3
2021-11-02 20:37:11 +00:00
James Zern
96e3dfef26 Merge "infra/common.sh: add shard_should_run()" into main 2021-10-29 17:08:33 +00:00
James Zern
0e0f74b7e3 infra/common.sh: add shard_should_run()
Detects whether test block should be run in the current test shard.

if shard_should_run; then
 ...
fi

Bug: b/185520507
Change-Id: I408d226651630a01c5e447dbff7d26b73426ce42
2021-10-28 17:13:11 -07:00
Roberto Alanis
35b7436a21 Jenkins scripts port: update shell function comments
Review function comments style.
https://google.github.io/styleguide/shellguide.html#function-comments

Change-Id: I8c557fd6cb653744d93c28cd28caeef3e4bf10bc
Bug: b:185520507
2021-10-28 01:17:52 +00:00
James Zern
21d24b4c08 webp-container-spec.txt: remove 'experimental' markers
unknown chunks as a group are well defined in the text

+ remove the Note about stable features as it matched the list given;
there are no WIP features for the format

Change-Id: I11a4de39f9d203b815879f0e9dea9c45b2ae6ff6
2021-10-22 12:17:59 -07:00
Roberto Alanis Baez
cdcf89020e Merge "Port Jenkins script: compile" into main 2021-10-22 04:41:53 +00:00
Roberto Alanis
dc683cdef5 Jenkins scripts port: static analysis
From https://build.webmproject.org/jenkins/view/webp/job/libwebp__static_analysis/

Change-Id: I87846e14351632915a17ee086256dfebdbd656c9
Bug: b:185520507
2021-10-21 00:54:44 +00:00
Roberto Alanis
0858494e96 Port Jenkins script: compile
https://build.webmproject.org/jenkins/view/webp/job/libwebp__compile/

Change-Id: I646e3048cf4e3d8672b66838e31c7ccc53ced60f
Bug: b:185520507
2021-10-21 00:46:57 +00:00
Roberto Alanis
c2cf6a93b0 Jenkins scripts port: android compilation
Port script from https://build.webmproject.org/jenkins/job/libwebp__compile_android/
Change-Id: I4b3f7f15990b5c92971ec5faccc82dca815f92d2
Bug: b:185520507

Change-Id: Ic07f8191db7726e459ee56c04bf6e3776b30b1f7
2021-10-13 18:44:55 +00:00
Roberto Alanis
df0e808fed presubmit: Add pylint-2.7 and .pylintrc
Added files to skip to prevent lint over generated code.

Change-Id: I62de5ec4fa7b6d764df1d8671c0263f668904e52
Bug: b:185520507
2021-10-12 01:01:14 +00:00
Roberto Alanis
676c57dba4 patch-check: shfmt
shfmt is expected to be installed along with go.
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest

Change-Id: I27004e72f79f71df9405158f77df485f43b028bb
Bug: b:185520494
2021-10-08 05:05:01 +00:00
Roberto Alanis
7bb7f7474e patch-check: Add shellcheck
Shellcheck is expected to be installed because depot_tools does not
provide the tool.

Change-Id: I9c8793cf7e2adedcb1e9f8244b886d6f2a54e2ae
Bug: b:185520494
2021-10-04 23:43:11 +00:00
Roberto Alanis
abcd1797a1 Reformat docstrings and imports
Change-Id: Ie96a21779000a67c272f5e06d2bc11a64b4883f5
Bug: b:185520494
2021-10-04 23:42:35 +00:00
Roberto Alanis
edaf08952d Port Jenkins scripts: compile js
Change-Id: I6d66de114758adccab782870e29a09b66a930ebc
Bug: b:185520507
2021-09-23 22:51:47 +00:00
James Zern
b96220636b Set CheckPatchFormatted flags to fail on diffs
Change-Id: Ifb826860e27139bc43b4411575e4c2bebcc81239
Bug: b:185520494
2021-09-22 22:44:21 +00:00
James Zern
e23cd5481c dsp.h: enable NEON w/VS2019+ ARM64 targets
Visual Studio added ARM64 support, but requires arm64_neon.h to be
included rather than arm_neon.h. Visual Studio 2019 addressed this so
we'll start with that version and leave a local adapter include for a
follow up.

Bug: webp:539
Change-Id: If975c029dafffba99210b3bb2d670035a83e8105
2021-09-13 19:56:19 -07:00
James Zern
3875c7de07 CMakeLists.txt: set minimum version to 3.7
cmake/cpu.cmake (at least) requires 3.7 due to its use of GREATER_EQUAL:
https://cmake.org/cmake/help/latest/release/3.7.html

Bug: webp:538
Change-Id: I63511226a593218e1f4d3b1a7c4c998de3ba2ae1
2021-08-31 13:21:46 -07:00
Vincent Rabaud
1a8f0d45d3 Have a hard-coded value for memset in TrellisQuantizeBlock.
Change-Id: I1b842bb0cfec9e8559d0f11b3db8fa1bc1c9692f
2021-08-30 18:50:11 +02:00
Vincent Rabaud
934801604e Speed up TrellisQuantizeBlock
- only initialize variable when needed
- perform first loop outside the for loop
- perform computation only if know we are not already worse
- not adding base_score every time

Change-Id: I2cb8231fcaec1113b5902ed61b685f0ae3c78823
2021-08-30 17:07:42 +02:00
Vincent Rabaud
45eaacc939 Convert deprecated uint32 to uint32_t.
Change-Id: I057296a7ea90c3eeb9eaf251e08352a8491a591b
2021-08-30 16:06:53 +02:00
Yannis Guyon
42592af875 webp,cmake: Remove unnecessary include dirs
Following crrev.com/c/webm/libwebp/+/3038647

Change-Id: Id43ed9b1cc02a7333bc64e82523122f483c9350a
2021-08-30 09:35:31 +02:00
Roberto Alanis
e298e05f66 Add patch-check steps in PRESUBMIT.py
It substitutes patch-check and style-check by:

- man format checks and warnings
- long lines (max 80, except urls)
- trailing whitespaces
- tab indentation (except make)
- EOL

Change-Id: I33f391bac37c15e995182d735afdbd4efb5c7cae
Bug: b:185520507
2021-08-27 19:32:17 +00:00
James Zern
29148919e0 libwebp-1.2.1
- 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)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEaw5rcJdt4wPt8vYB+cPWvbgjK10FAmEW+X4ACgkQ+cPWvbgj
 K13TSw/9EAOr+KSjftX4bHViT1Y0sEnj3k3ZD5VAx5PE9g8iL7D1D8f+8U8KGfWj
 3VD35TCaHASpkAgypcJNTUxPmvlzdgqHOac7D4dvh8wB2vTGxkyxPZjxqY+98vf5
 iVkfMXAafrp3Z+E0UYXbf28OZ56j+wECEfuC9eQlefVcGDuiZR5D/xsU/kDtX23l
 dpStpmMDnbni+oGZYNAWe4vIFVPtTuZRbVRZHBGHmUuFHHmkQ0Moucha0lTV7/lT
 vkhPTlLA+eJd6AbgmVd+hyAb8zKrUrCCMXil9MDCdnpygu51FdnZseGtUxv915Bb
 OSAIopAvIubvtBZd9yMIj8Uxtpc0oOZvMjIv6PwcgExY6u9haPxBcKZDPuoues+s
 ZBABIec2EZFndAWWDkpBrb56nic8CJd3krSq+ug80O/ATN4sXK6dVS5AneNYs5fw
 sJom6t76Dq2RmahOTS8yTpPbMSJB68g58wdzkHpozd8h3uJVniOv9TzgdQq2YVTE
 4aTKMqPeIqKke19XLsvW2Kr7XKQbZcOASZeL8rQQPz6uOSQ/11EMv44bfNBl15w/
 nEKop5WyB4iqnO9F2lTk2b46s7xTJ2TmugHV6B1wcjFdE1VkQsZ0B7GL68zZpHLD
 kcApQN6pvUTJ3IKOauxtSAjrSdDKnu7qxt5DUdyoR4TG+0EKjQs=
 =Z8FS
 -----END PGP SIGNATURE-----

Merge tag 'v1.2.1'

libwebp-1.2.1

- 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)

* tag 'v1.2.1':
  update ChangeLog
  fuzzer/*: normalize src/ includes
  fix indent
  update ChangeLog
  dsp/*: use WEBP_HAVE_* to determine Init availability
  update NEWS
  bump version to 1.2.1
  update AUTHORS

Bug: 521, b/188435220
Change-Id: Id6e6781d8da878413c2e57dcae5e2f2841174181
2021-08-13 16:43:13 -07:00
James Zern
9ce5843dba update ChangeLog
Change-Id: I12c2b718e99087201a57f7ab7cc4c16374e205f6
2021-07-29 15:55:37 -07:00
James Zern
d9191588ab fuzzer/*: normalize src/ includes
this uses the format introduced to some files in:
cc3577e9 fuzzer/*: use src/ based include paths

Change-Id: I9b5cbeadbb9d54d1e89f474a6e479a5eb3175ed7
(cherry picked from commit c5bc36243a)
2021-07-29 20:15:30 +00:00
James Zern
c5bc36243a fuzzer/*: normalize src/ includes
this uses the format introduced to some files in:
cc3577e9 fuzzer/*: use src/ based include paths

Change-Id: I9b5cbeadbb9d54d1e89f474a6e479a5eb3175ed7
2021-07-28 13:32:19 -07:00
James Zern
53b6f76209 fix indent
after:
277d3074 Fix size_t overflow in  WebPRescalerInit

Change-Id: I9adf7f01f28ddd54305512762e2ed28713282966
(cherry picked from commit d2caaba435)
2021-07-28 20:22:18 +00:00
James Zern
d2caaba435 fix indent
after:
277d3074 Fix size_t overflow in  WebPRescalerInit

Change-Id: I9adf7f01f28ddd54305512762e2ed28713282966
2021-07-28 11:23:45 -07:00
James Zern
731246ba3b update ChangeLog
Change-Id: Ia3faaafd42eb96e257415e1cf9c7ceb69f851147
2021-07-26 18:19:56 -07:00
James Zern
d250f01d95 dsp/*: use WEBP_HAVE_* to determine Init availability
after:
  ece18e55 dsp.h: respect --disable-sse2/sse4.1/neon
WEBP_USE_* will be set when a module is targeting a particular
instruction set, e.g., sse4.1, and not overridden if WEBP_HAVE_SSE41 is
set, as previously this would ignore the case where the instruction set
was disabled via config.h and the HAVE macro was unset.

dsp.h not ensures WEBP_HAVE_* are set when WEBP_USE_* to cover cases
where the files are built without config.h.

Change-Id: Ia1c2dcf4100cc1081d968acb6e085e2a1768ece6
(cherry picked from commit 1fe3162541)
2021-07-26 20:44:58 +00:00
James Zern
1fe3162541 dsp/*: use WEBP_HAVE_* to determine Init availability
after:
  ece18e55 dsp.h: respect --disable-sse2/sse4.1/neon
WEBP_USE_* will be set when a module is targeting a particular
instruction set, e.g., sse4.1, and not overridden if WEBP_HAVE_SSE41 is
set, as previously this would ignore the case where the instruction set
was disabled via config.h and the HAVE macro was unset.

dsp.h not ensures WEBP_HAVE_* are set when WEBP_USE_* to cover cases
where the files are built without config.h.

Change-Id: Ia1c2dcf4100cc1081d968acb6e085e2a1768ece6
2021-07-24 10:19:30 -07:00
James Zern
3a4d3ecd40 update NEWS
Bug: webp:521
Change-Id: Ic52942bcbfa8aa8e41b95991c0663698884fa8a8
2021-07-20 18:12:28 -07:00
James Zern
b2bc809346 bump version to 1.2.1
libwebp{,decoder} - 1.2.1
libwebp libtool - 8.2.1
libwebpdecoder libtool - 4.2.1

mux - 1.2.1
libtool - 3.7.0

demux - 1.2.1
libtool - 2.8.0

Bug: webp:521
Change-Id: I098e3e9df698baa275dea85315b9136e565e9971
2021-07-20 18:12:24 -07:00
James Zern
e542fc7a8a update AUTHORS
Bug: webp:521
Change-Id: Ie2decd9def1a718a01aa1e381ef8f284d18fe279
2021-07-20 18:12:16 -07:00
Yannis Guyon
e024115490 Merge "libwebp/CMake: Add <BUILD_INTERFACE> to webp incl" into main 2021-07-19 20:40:32 +00:00
Yannis Guyon
edea64442c libwebp/CMake: Add <BUILD_INTERFACE> to webp incl
This way target_link_libraries(my_target PUBLIC webp) is enough,
no need to add include directories explicitly for the public headers
such as src/webp/decode.h. This matches the /usr/include/webp/decode.h
installation folder path prefix (#include "webp/decode.h").
See https://bugs.chromium.org/p/webp/issues/detail?id=532

The target_include_directories() calls for cwebp, dwebp etc. may be
unnecessary now and may be removed in another patch.

Change-Id: I2c85218920ffc35ebec23e0dd239f71e29add23b
2021-07-19 18:46:03 +02:00
James Zern
ece18e5520 dsp.h: respect --disable-sse2/sse4.1/neon
previously this would be overridden if the instruction set was enabled
via -msse4.1, __aarch64__, etc.

Change-Id: I51e87a7da7589c6093d260b848ab41d89ec7b990
2021-07-17 12:14:38 -07:00
James Zern
a89a3230c9 wicdec: support alpha from WebP WIC decoder
the container check may not be strictly necessary now that the alpha
check has matured and the library will detect usable alpha, but it's
safer to fix this case first before making larger changes.

Bug: webp:533
Change-Id: I2e1ba42156970d579a52bd183707a037e65fd900
2021-07-16 12:19:33 -07:00
James Zern
26f4aa0115 Merge "alpha_processing: fix visual studio warnings" into main 2021-07-13 23:42:08 +00:00
James Zern
8f5946634e alpha_processing: fix visual studio warnings
similar to '* const', __restrict needs to be included in the
declaration to avoid warnings like:
src\dsp\alpha_processing.c(429): warning C4028: formal parameter 1
different from declaration

this change also moves WEBP_RESTRICT to dsp.h to avoid a circular
dependency between it and utils.h which already includes dsp.h

Change-Id: Ib070d358a372e76fae4be5445ab288940b9baac0
2021-07-13 23:41:45 +00:00