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
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
previously this would be overridden if the instruction set was enabled
via -msse4.1, __aarch64__, etc.
Change-Id: I51e87a7da7589c6093d260b848ab41d89ec7b990
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
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
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.
This was fixed in 3.18.3 [1], but regressed shortly afterward [2];
currently seen with 3.20.0 installed via homebrew.
[1] https://gitlab.kitware.com/cmake/cmake/-/issues/21207
[2]
90dead024c CheckCompilerFlag: unified way to check compiler flags per language
Change-Id: I57282f89b07a9cfd85aca7569380f7d115c0b3cf
this will provide the main libraries and their supporting examples by
default if external library requirements (e.g., gif2webp+libgif) are
met.
Bug: webp:501
Change-Id: I593adf9222698e2dc5a2199909949c7fea1273b2
this ensures the defaults are set properly before testing conditions for
enabling certain binaries. previously anim_diff would need
--enable-libwebpdemux to be explicitly added though it defaults to
enabled.
Bug: webp:501
Change-Id: Ifac68eac7096b39e98d0025e07a37b0be3d32c0a
this can help with some aliasing issues with some versions of clang/gcc,
similar to:
3e265136 Add WEBP_RESTRICT & use it in VP8BitReader
Change-Id: I863e53cc9d707c9a4b21373ca743c3089aed012e
this should be the full path to the installed headers to be added to the
client code's search path, e.g., /usr/local/include when including
<webp/decode.h>
Bug: webp:509
Change-Id: I756249876d8de421c9a33513221fb635157560ef
this enables cases that might trigger overflows, but increases the risk
of OOM and timeouts
Bug: chromium:1196850
Change-Id: I317b5109525646731e762faa3c34ed28a27595dc
Check encoded_frames_ count and call FlushFrames if necessary after
IncreasePreviousDuration. Avoids an overflow in encoded_frames_[] with
-kmax 0 and an assertion failure related to the previous and keyframe
durations when a frame is forced in this way.
Based on patch by tomwei7g <at> gmail
Bug: webp:518
Change-Id: Idef685e6c06a67d48fcdc048265ca0e672a01263
Silences CMake's warning and uses GLVND, which still works for linux
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: Iadd173b41c4fbcdff9fe512f9a7dbf70a6d95bcd
Marking the `VP8BitReader` as `__restrict__` helps the compiler generate
better code avoiding issues related to aliasing (re-loads/stores).
Change-Id: Ib7178f57e27e5f40572efc3e567cdf994ea6d928
use 64-bit math in calculating the offsets as they may exceed 32-bits
when scaling
Bug: chromium:1196850
Change-Id: I6a484fc4dded6f6c4b82346ef145eb69c1477b3c
Adds an additional option similar to configure's --enable-libwebpmux
to toggle building libwebpmux separate from the binaries
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I0443b84eea36d86791e2e421a6fc0070879a7bef
promote out_width to size_t before multiplying
src/dec/io_dec.c:301:30: runtime error: signed integer overflow: 2 *
1224167500 cannot be represented in type 'int'
#0 0x55fd9e8de2bd in InitYUVRescaler src/dec/io_dec.c:301:30
#1 0x55fd9e8de2bd in CustomSetup src/dec/io_dec.c:571:54
Bug: chromium:1196850
Change-Id: I70d0aac1b5eef163a3f353b721fb9ab561e02040
this will avoid the potential for some integer overflows in rescaler
calculations
Bug: chromium:1196850
Change-Id: Iaa09f5d6b888b39aaeb2154d470279620362d6eb
in Export increment the dst pointer, but in EmitRescaledRowsRGBA use
64-bit math as the number of output lines is variable and may still
overflow when incrementing.
Bug: chromium:1196850
Change-Id: I5c65b875894ee9da0fef1e24d27e507171800c4a
with large sizes the intermediate calculations may exceed 32-bits
src/dec/io_dec.c:491:17: runtime error: signed integer overflow: 3 *
788529152 cannot be represented in type 'int'
#0 0x557a3ad972b2 in InitRGBRescaler src/dec/io_dec.c:491:17
#1 0x557a3ad972b2 in CustomSetup src/dec/io_dec.c:563:29
Bug: chromium:1196850
Change-Id: Iaf2e8a6de9481dfea31dcd7fccb2d4eca767bddf
with large scale values the offset to the end of the buffer may exceed
32-bits range.
src/dec/buffer_dec.c:158:39: runtime error: signed integer overflow: 2 *
1275068416 cannot be represented in type 'int'
#0 0x56444802bea5 in WebPFlipBuffer src/dec/buffer_dec.c:158:39
Bug: chromium:1196850
Change-Id: I08c8b69ada5d5dd3e9bf2b9006dffa0c5f2103a5
in addition to checking the environment for "MALLOC_LIMIT"; the
environment will still take precedence.
this is in preparation for adding extreme config value coverage to
advanced_api_fuzzer
Bug: chromium:1196850
Change-Id: Ibe22f5e39e030a422fd6e383269bde35252d3fae
avoids integer overflow in extreme cases:
src/dsp/rescaler.c:45:32: runtime error: signed integer overflow: 129 *
16777215 cannot be represented in type 'int'
#0 0x556bde3538e3 in WebPRescalerImportRowExpand_C src/dsp/rescaler.c:45:32
#1 0x556bde357465 in RescalerImportRowExpand_SSE2 src/dsp/rescaler_sse2.c:56:5
...
Bug: chromium:1196850
Change-Id: I4f923807f106713e113f3eec62a1d1c346066345
after the check using 64-bit math we used a signed integer in the
multiplication. previously unsigned integer max was tested.
fixes cases like:
src/dec/buffer_dec.c:108:16: runtime error: signed integer overflow:
944731466 * 4 cannot be represented in type 'int'
#0 0x55e56187dc1d in AllocateBuffer src/dec/buffer_dec.c:108:16
#1 0x55e56187dc1d in WebPAllocateDecBuffer src/dec/buffer_dec.c:216:12
...
Bug: chromium:1196850
Change-Id: I6e5b3e5d1d5b50b5c98c39bbf9813a63fedc5ca7
replace with more inclusive terms or remove the comment entirely if the
meaning was already clear.
Bug: webp:507
Change-Id: Ica3bbf751ebf79f6668df6e6209af770248ff4ca
enc is allocated with WebPSafeCalloc so there's no need to clear the
pointers afterward.
this has the side-effect of removing a non-inclusive term.
Bug: webp:507
Change-Id: I82f82954936638c4c15d33b2d6f0497a6a13571f
This reverts commit b6513fbaa8.
This change can produce files that can cause decode failures in some
versions of chrome and safari/ios/macos.
https://chromium-review.googlesource.com/c/chromium/src/+/2876279
The chrome fix will be available in M92. This change can be revisited
after it and the mac updates are more widely deployed.
Bug: b/186640109,b/188702956
Change-Id: I296b8fe88c6c48219e3edf532226c4f972f1605b
though the max chunk/payload sizes were checked and would fail the
padded size was being calculated beforehand which could result in a
(harmless) unsigned int overflow warning.
Bug: webp:508
Change-Id: I4fa30ded2b027c1577b03049a2deeb7bf75e5472