1 space is most common in the source; this fixes some mixed cases within
lossless files, likely from clang-format
Change-Id: I504206d5bf418781d4131ee73570ecee4e0a69a1
several calls to ChunkSetHead() were unchecked, causing the chunk to
leak should the call fail due to OOM
Tested:
for i in `seq 1 1125`; do
export MALLOC_FAIL_AT=$i
./examples/gif2webp gif_file
./examples/gif2webp -mixed gif_file
done
for i in `seq 1 171`; do
export MALLOC_FAIL_AT=$i
./examples/img2webp jpeg_file -o /dev/null
./examples/img2webp -mixed jpeg_file -o /dev/null
done
Change-Id: I479bc487f61b493e5ce033872d353007055c172a
argv_data would leak if the argv_ allocation failed or the MAX_ARGC cap
was hit
Tested:
for i in `seq 1 171`; do
export MALLOC_FAIL_AT=$i
./examples/img2webp jpeg_file -o /dev/null
./examples/img2webp -mixed jpeg_file -o /dev/null
done
Change-Id: I39864691e96d5456f324d95a3653bba0f6d6a7be
in ReadAnimatedWebP() & ReadAnimatedGIF() when AllocateFrames() fails
due to OOM
Tested:
for i in `seq 1 278`; do
export MALLOC_FAIL_AT=$i
./examples/anim_diff webp1 webp2
./examples/anim_diff gif1 gif2
done
Change-Id: I5d486c2c2982ae088e34a25d8e3e0188df1a9b51
previously calls to WebPPictureCopy() weren't checked, causing a crash
when the canvas copies were accessed later in the loop
Tested:
for i in `seq 1 1125`; do
export MALLOC_FAIL_AT=$i
./examples/gif2webp gif_file
./examples/gif2webp -mixed gif_file
done
Change-Id: I186d13be0ec8f3b72b7d247a8482590c1b1be541
previously failures in the call to
VP8LBackwardReferencesTraceBackwards() would be ignored which, though it
wouldn't result in a crash, would produce non-deterministic output
Change-Id: Id9890a60883c3270ec75e968506d46eea32b76d4
change CostManager to calloc to avoid frees on undefined pointer
values in CostManagerClear() should the cost_model allocation succeed,
but the cost_manager allocation fail
since:
v0.5.0-93-g3e023c17 Speed-up BackwardReferencesHashChainDistanceOnly.
Tested:
for i in `seq 1 639`; do
export MALLOC_FAIL_AT=$i
./examples/cwebp -m 6 -q 100 -lossless jpeg_file
done
Bug: webp:565
Change-Id: I376d81e6f41eb73529053e9e30c142b4b4f6b45b
initialize bw_side before calling EncoderAnalyze() & EncoderInit() which
may fail; previously this would cause a free of an invalid pointer in
VP8LBitWriterWipeOut().
since at least:
v0.6.0-120-gf8c2ac15 Multi-thread the lossless cruncher.
Tested:
for i in `seq 1 639`; do
export MALLOC_FAIL_AT=$i
./examples/cwebp -m 6 -q 100 -lossless jpeg_file
done
Bug: webp:565
Change-Id: I1c95883834b6e4b13aee890568ce3bad0f4266f0
AC_PROG_LIBTOOL is deprecated. quiets a warning from autoconf 2.71:
configure.ac:12: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
Change-Id: I3b131f5ee636a8df48057862e600759f25ad7289
the trailing width % 8 bytes would clear the upper bytes of
alpha_mask as they're done one at a time
since:
49d0280d NEON: implement several alpha-processing functions
Change-Id: Iff76c0af3094597285a6aa6ed032b345f9856aae
this removes the mt.exe step and may fix some build failures if the
executable is locked after linking, e.g., by an antivirus program
Change-Id: I9a8184f3aaecb62a133a13d9ad3383667bc93fd3
It's self contained apart from a dependency on src/webp/types.h and src/dsp/cpu.h
For now it's only set up as an internal library, not an installable one.
Webp doesn't depend on it yet, the code is only duplicated.
Change-Id: I752799894f9d4105d0d296ddebd9f9641181a1ec
Break the main README into into multiple pages in the doc/ directory,
except for the tests, swig and webp_js docs which are in the corresponding
directories.
The webp mux doc is merged into the API doc and the tools doc.
Change-Id: Ia407617dd88094f4662841d37947cfef80799914
results in code layout changes, a couple fewer instructions; some of the
smaller functions were unaffected as they were inlined, but are updated
for consistency. this mostly affects VP8Decimate(), ReconstructIntra16()
and ReconstructUV().
Change-Id: Icc2582278987a66ad1110bab683d1e0c21e6591a
A WebPPicture instance is necessary to call WebPReportProgress() which
sets WebPPicture::error_code so as well use WebPEncodingSetError() to
record errors too, instead of functions returning a WebPEncodingError.
However there must be one WebPPicture instance per thread, with error
codes merged at sync time. A mutex could simplify that but it is not
the objective of this change.
https://groups.google.com/a/webmproject.org/g/webp-discuss/c/yOiP8APubgc/m/vCTvxl6ODgAJ
Change-Id: Ia1a8f9d1199202e1c88484ce719b0180a80447ce
When using CMake the `<prefix>/usr/share/WebP/cmake/WebPConfig.cmake` gets
used to get the names of the libraries to link against.
Since version 1.2.1 of libwebp, libwebpmux is on by default.
This causes a linker error because the linker arg should be `-lwebpmux`
instead of `-llibwebpmux`.
This is fixable by renaming `libwebpmux` to `webpmux` in a few places.
This was identified after an update to 1.2.1 of libwebp in the OpenWrt
project:
https://github.com/openwrt/packages/pull/16766
Internally in OpenWrt, this was patched here:
https://github.com/openwrt/packages/pull/16784
Change-Id: I97501c62b1e97b133a62b04d6516261d6d7c7fd0
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
- prefer Exif to EXIF when not referring to the chunk
- normalize use of code format for canvas / frame width & height
Change-Id: I7fc9e87baeb5d8e719274680ce621dcb078a985f
- 1/11/2022: version 1.2.2
This is a binary compatible release.
* webpmux: add "-set bgcolor A,R,G,B"
* add ARM64 NEON support for MSVC builds (#539)
* fix duplicate include error in Xcode when using multiple XCFrameworks in a
project (#542)
* doc updates and bug fixes (#538, #544, #548, #550)
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEaw5rcJdt4wPt8vYB+cPWvbgjK10FAmHoy90ACgkQ+cPWvbgj
K10DLg/7BS8mjKMJGkH1HD3PT12K54H9a9BReD2lPMfUTmclLbLktwG9/cn8pHG1
xTTJp7HQWr5d0VEkv2X2XZYIAdAb+6FICdFDp+J26jqErZU62LLK2Gq0gWs+bRNE
36u8Q0qyJdt2BAdDgfUEBHZeAz+uevp1u5YVCg05u3FcBejLEGx6Bc+fvIrk5Al9
C1zjbP7kFRVE/6OEGFc/jLHGfzTHhfgIW0GDUIKav/x9/cjkqjcC34Uwgz6/y4+K
C6HAzfHfgiKUzDpwTYC9HkpulKhuIfMF4wTytaIfyoYXMScbKRWq989NW6a7ctGv
1+nOh//37RRf2gXnGFW2eXGD1vFdXwLSm04AXzpXIE1o9jQzII3akw6vQX4gGE0d
n3X0GUjpvAkgPH1P1/qF5qZSKuBSLlfYYAbdZNNoUvKCviF/zOj2A0T19727OdnV
EtXvL6Yd9B7E+Uu15FyoCeJYiGwFFEJSTC1fhMnGPgiLa0JN/7QD4Q9RFg/O45Q3
e3DvYv7x6sg83MJipWNh7BTXhcX9Q0zNXmySAwuM53g+hhtkVliojZV4+7vzdO/0
/aVfNAErAtPNUPofDUOIj9qrbx+PvLCeiI5lhFWs1sBWtSdU7XNnewzzYJKJAexp
HMbwpVM0KnMbX7D3VzT8mo11M5KYQGbzIjaM1DzqiaobLSVmVs8=
=HlsB
-----END PGP SIGNATURE-----
Merge tag 'v1.2.2'
libwebp-1.2.2
- 1/11/2022: version 1.2.2
This is a binary compatible release.
* webpmux: add "-set bgcolor A,R,G,B"
* add ARM64 NEON support for MSVC builds (#539)
* fix duplicate include error in Xcode when using multiple XCFrameworks in a
project (#542)
* doc updates and bug fixes (#538, #544, #548, #550)
* tag 'v1.2.2':
update ChangeLog
libwebp: Fix VP8EncTokenLoop() progress
BMP enc: fix the transparency case
libwebp: do not destroy jpeg codec twice on error
update ChangeLog
update NEWS
man/img2webp.1: update date
Reword img2webp synopsis command line
anim_decode: fix alpha blending with big-endian
webpinfo: fix fourcc comparison w/big-endian
update ChangeLog
update NEWS
bump version to 1.2.2
update AUTHORS
Bug: webp:541, b/202302177
Change-Id: Iae875b6ec3084157837cc774c94088ca72e8dd91
When transparency is present, it's not enough to just write 32bpp samples.
One need to use the full BITMAPV3INFOHEADER syntax and specify the
masks for BGRA.
see https://en.wikipedia.org/wiki/BMP_file_format#Pixel_storage
Also remove the height-flip trick and write samples bottom-to-top instead.
Change-Id: If5d92c11453b96764b5bfbf19e9678e632bc911f
(cherry picked from commit 480cd51de6)
WebPPictureImportRGB() can fail on memory allocation. In this case,
jpeg_destroy_decompress() was already called, so do not go to Error.
Free metadata as an error is returned.
Change-Id: I045b072090e9063d3ad10369ad18b0f08bdffe9f
(cherry picked from commit 6e8a4126f2)
WebPPictureImportRGB() can fail on memory allocation. In this case,
jpeg_destroy_decompress() was already called, so do not go to Error.
Free metadata as an error is returned.
Change-Id: I045b072090e9063d3ad10369ad18b0f08bdffe9f
When transparency is present, it's not enough to just write 32bpp samples.
One need to use the full BITMAPV3INFOHEADER syntax and specify the
masks for BGRA.
see https://en.wikipedia.org/wiki/BMP_file_format#Pixel_storage
Also remove the height-flip trick and write samples bottom-to-top instead.
Change-Id: If5d92c11453b96764b5bfbf19e9678e632bc911f