Commit Graph

4395 Commits

Author SHA1 Message Date
James Zern
8278825aac makefile.unix: add sharpyuv objects to clean target
Change-Id: Iad9ac2530bd892681c055e5ae1bf82eb8782d2a2
2022-07-05 10:41:14 -07:00
James Zern
14a49e018d update NEWS
Bug: webp:568
Change-Id: I0986c33910eba862ef6c1676d7dc58ea6df7ba3b
2022-06-30 19:30:31 -07:00
James Zern
34b1dc336d bump version to 1.2.3
libwebp{,decoder} - 1.2.3
libwebp libtool - 8.4.1
libwebpdecoder libtool - 4.4.1

mux - 1.2.3
libtool - 3.4.0

demux - 1.2.3
libtool - 2.10.0

Bug: webp:568
Change-Id: I943bae1b7eacb445f6a4e13123e63170ac8bb142
2022-06-30 19:30:31 -07:00
James Zern
0b397fda9d update AUTHORS
Bug: webp:568
Change-Id: I333e9679d1d9a9c33f94e214b7ab1723e063fe51
2022-06-30 19:30:27 -07:00
James Zern
c16488ac4a update .mailmap
Bug: webp:568
Change-Id: I34df01bf958ef9de87345e5e43034fafd185f42a
2022-06-30 19:29:53 -07:00
James Zern
5a2d929cd8 Merge "unicode.h: set console mode before using wprintf" into main 2022-07-01 01:03:01 +00:00
James Zern
169f867f3c unicode.h: set console mode before using wprintf
This fixes incorrect character display in the file name
in e.g., stats output from cwebp.exe in visual studio builds.

In mingw further changes will be needed as using %s in wfprintf() for
wchar_t pointers is a Microsoft extension that doesn't seem to be
supported with gcc -fms-extensions. %ls works, but will require updating
format strings and wrapping concatenations with TO_W_CHAR() as visual
studio will reject merging string constants of different width.

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode

Change-Id: I57d24c3815f7b5aa3971ac315c65c4458258d706
2022-06-29 22:05:26 -07:00
Maryla Ustarroz-Calonge
a94b855c54 Merge "libsharpyuv: add version defines" into main 2022-06-28 09:49:56 +00:00
Maryla
f83bdb5251 libsharpyuv: add version defines
Change-Id: I2dbe69d1ce5abaf7f5bd83daec99655520b5abad
2022-06-28 11:08:14 +02:00
James Zern
bef0d79764 unicode_gif.h: fix -Wdeclaration-after-statement
when building for windows with _UNICODE defined

unicode_gif.h|49 col 3| warning: ISO C90 forbids mixed declarations and
code [-Wdeclaration-after-statement]

Change-Id: Ib9f0cc0eba036d6cd4221a4f70a078770dde01d0
2022-06-20 11:40:09 -07:00
Jyrki Alakuijala
404c1622f8 Rename Huffman coding to prefix coding in the bitstream spec
... since no guarantee of Huffman coding can be introduced at decoding
time and encoding didn't actually use Huffman coding in the first place

Bug: webp:551
Change-Id: I400466bb3b4a1d5506353eb3f287d658603164ee
2022-06-16 10:56:03 -07:00
James Zern
8895f8a345 Merge "run_static_analysis.sh: fix scan-build archive path" into main 2022-06-16 17:27:52 +00:00
Maryla Ustarroz-Calonge
92a673d258 Merge "Add -fvisibility=hidden flag in CMakeLists." into main 2022-06-16 08:02:28 +00:00
James Zern
67c1d72239 Merge "add WEBP_MSAN" into main 2022-06-16 05:11:26 +00:00
Maryla
1124ff662d Add -fvisibility=hidden flag in CMakeLists.
This way, only functions marked with WEBP_EXTERN get exposed by the library.
This flag is already set in other build configs: configure.ac, makefile.unix,
Android.mk

Change-Id: Iafd8f160e539290e7ea46ceec764a090c6e626a9
2022-06-15 10:03:03 +02:00
James Zern
e15b356014 add WEBP_MSAN
and use it to suppress a false positive related to data that passes
through RGBA32PackedToPlanar_16b_SSE41(). Current versions (tested with
clang 13.0.1, using -O0 and the build from oss-fuzz of enc_dec_fuzzer)
model shuffles incorrectly reporting use of uninitialized
data related to the alpha change that's removed when converting to YUV.
valgrind behaves correctly, however.

Bug: webp:573
Change-Id: If76997668dcdd436adf280a2e6dcffba766a2875
2022-06-14 21:49:46 -07:00
Maryla
ec9e782a35 sharpyuv: remove minimum image size from sharpyuv library
libwebp still has a size threshold of 4 pixels in picture_csp_enc.c
but the sharpyuv library itself can handle any image size.

Change-Id: Ic1c78c8f8fae528395fa46a74f717f47cb13098e
2022-06-14 14:55:12 +02:00
James Zern
7bd07f3b5d run_static_analysis.sh: fix scan-build archive path
move any error reports to the top-level of OUTPUT_DIR rather than
BUILD_DIR

Change-Id: Icb6677c42a89ef86d9d295a27b79a8a591672b87
2022-06-13 16:17:42 -07:00
Maryla Ustarroz-Calonge
5ecee06f7a Merge "sharpyuv: increase precision of gamma<->linear conversion" into main 2022-06-02 08:30:18 +00:00
James Zern
f81dd7d63e Merge changes I3d17d529,I53026880,I1bd61639,I6bd4b25d,Icfec8fba into main
* changes:
  CMake: add src to webpinfo includes
  CMake: add WEBP_BUILD_WEBPINFO to list of checks for exampleutil
  CMake: add WEBP_BUILD_WEBPMUX to list of checks for exampleutil
  CMake: link imageioutil to exampleutil after defined
  WEBP_DEP_LIBRARIES: use Threads::Threads
2022-06-01 18:18:00 +00:00
Maryla
2d607ee646 sharpyuv: increase precision of gamma<->linear conversion
Change-Id: I261bae3628315bda4ec0dafb8798c7512dd03a36
2022-06-01 15:38:44 +02:00
Maryla
266cbbc511 sharpyuv: add 32bit version of SharpYuvFilterRow.
This allows increasing intermediate value precision from 10 bits to 14 bits.

Change-Id: I0fc33400d200a849bcc2c677ab8346215a9dbc3b
2022-06-01 13:42:29 +02:00
Christopher Degawa
9fc12274ce
CMake: add src to webpinfo includes
Fixes an include error with webp/types.h

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I3d17d529c904cdb4e5c8ae630e89ed3789791e79
2022-05-31 20:46:21 -05:00
Christopher Degawa
7d18f40ac1
CMake: add WEBP_BUILD_WEBPINFO to list of checks for exampleutil
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I530268809468107fe29e0f04278791fe7c583208
2022-05-31 17:45:32 -05:00
Christopher Degawa
11309aa54c
CMake: add WEBP_BUILD_WEBPMUX to list of checks for exampleutil
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I1bd6163966d8cec9fc240fa46d41605f11d0c1ac
2022-05-31 17:45:30 -05:00
Christopher Degawa
4bc762f729
CMake: link imageioutil to exampleutil after defined
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I6bd4b25d31a85839aadef57437faa04966085f52
2022-05-31 17:11:20 -05:00
Christopher Degawa
0d1b9bc433
WEBP_DEP_LIBRARIES: use Threads::Threads
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: Icfec8fba117cbf5668c6f4c7d46d05cbb17e3dea
2022-05-31 17:09:09 -05:00
Maryla Ustarroz-Calonge
20ef48f05a Merge "sharpyuv: add support for 10/12/16 bit rgb and 10/12 bit yuv." into main 2022-05-24 11:05:08 +00:00
Maryla
93c5437115 sharpyuv: add support for 10/12/16 bit rgb and 10/12 bit yuv.
10bit+ input is truncated to 10bits for now.

Change-Id: I7ac00ca54c623d94c76ccd8954418e11095997d2
2022-05-23 20:48:44 +02:00
James Zern
53cf2b4997 normalize WebPValidatePicture declaration w/definition
quiets a warning under visual studio:
src\enc\picture_enc.c(48) : warning C4028: formal parameter 1 different
from declaration

Change-Id: Ic3affbbb0e22ac8c43fa183e13506eee72e180dc
2022-05-17 09:46:51 -07:00
Maryla
d3006f4b96 sharpyuv: slightly improve precision
- Remove SHALF constant so that we get back the original value when
  calling UpScale then downscale with rounding
- Make the linear->gamma precomputed table bigger (8 bits rather than 5)
- Round values in kLinearToGammaTabS

Change-Id: Ic9634d32cf93de321d2f6e9e4cad7f156d8d07df
2022-05-17 10:36:44 +02:00
James Zern
ea967098a4 Merge changes Ia01bd397,Ibf3771af into main
* changes:
  Add an internal WebPValidatePicture.
  Some renamings for consistency.
2022-05-16 17:49:04 +00:00
James Zern
11bc8410bd Merge changes I2d317c4b,I9e77f6db into main
* changes:
  webp-lossless-bitstream-spec,cosmetics: normalize range syntax
  webp-lossless-bitstream-spec,cosmetics: fix code typo
2022-05-16 17:17:22 +00:00
Vincent Rabaud
30453ea4e6 Add an internal WebPValidatePicture.
Change-Id: Ia01bd3975f7bd0d47eb0a1764807baed16f0d268
2022-05-16 17:37:20 +02:00
Vincent Rabaud
6c43219a5f Some renamings for consistency.
- pic->picture in public header
- match implementation to declaration in PictureImport, WebPPictureRescale, WebpBlendAlpha

Change-Id: Ibf3771af22d671bba6fd657684add618c6f32978
2022-05-16 17:33:49 +02:00
James Zern
4f59fa7390 update .mailmap
Change-Id: I246d84d735bc0efada544a9051ddcb3c3a7ceabf
2022-05-14 20:57:41 -07:00
James Zern
e74f8a62b2 webp-lossless-bitstream-spec,cosmetics: normalize range syntax
[N, M] -> [N..M] the latter is more common in this doc

Bug: webp:551
Change-Id: I2d317c4b8bb31d313123e981f93cd1feb346a98a
2022-05-14 20:51:43 -07:00
James Zern
5a709ec0d7 webp-lossless-bitstream-spec,cosmetics: fix code typo
code_lengths -> code_length_code_lengths
after:
86f94ee0 Update lossless spec with Huffman codes.

Bug: webp:551
Change-Id: I9e77f6db0fca6fe8294cb31a3015e723050094b5
2022-05-14 20:51:34 -07:00
James Zern
a2093acc4b webp-lossless-bitstream-spec: add amendment note
for recent changes to color transform, simple code length code, image
structure and details of decoding prefix codes

Bug: webp:551
Change-Id: I36a4d1ee3e25b8a56f5d926f4770374ace99bc2f
2022-05-13 18:50:55 -07:00
James Zern
86c669303a webp-lossless-bitstream-spec: fix BNF
color cache info precedes the meta huffman info

Bug: webp:551
Change-Id: Ibb69b4ffad6bff5693015be3fe6c600c53fd06c0
2022-05-13 18:41:30 -07:00
James Zern
232f22da5a webp-lossless-bitstream-spec: fix 'simple code' snippet
based on https://crbug.com/webp/551#c3 & https://crbug.com/webp/551#c4

Bug: webp:551
Change-Id: I4bcc19643b0bdda999247e9c3457d6954a49e35f
2022-05-13 18:41:20 -07:00
James Zern
44dd765def webp-lossless-bitstream-spec: fix ColorTransform impl
and the corresponding InverseTransform(); the operations were swapped.
The forward transform subtracts the deltas, the inverse adds them.

Bug: webp:551
Change-Id: Ieb90a24f843cee7cdfe46cbb15ec7d716ca9d269
2022-05-13 18:33:16 -07:00
James Zern
7a7e33e977 webp-lossless-bitstream-spec: fix TR-pixel right border note
the value of the TR-pixel on the right border is the leftmost pixel on
the current row, not the previous one

Bug: webp:551
Change-Id: I157e8c16ce43a9f52c36aa880be1be3bef19c063
2022-05-13 16:48:23 -07:00
vrabaud@google.com
86f94ee010 Update lossless spec with Huffman codes.
Bug: webp:551
Change-Id: I28b57c8e87a8023b727fe8359c2e2809cf92752d
2022-05-13 16:42:00 -07:00
James Zern
a3927cc800 sharpyuv.c,cosmetics: fix indent
+ a few typos in sharpyuv_csp.c

Change-Id: I34b208d10d7808b42afb39b0618fb2e5d76633eb
2022-05-11 11:53:25 -07:00
Vincent Rabaud
6c45cef7ff Make sure the stride has a minimum value in the importer.
Bug: webp:569
Change-Id: Ia48d064dbb10e7179ae3da04ca8d769d1c447276
2022-05-10 10:18:46 +02:00
Maryla
0c8b0e67a4 sharpyuv: cleanup/cosmetic changes
Remove unused constants.
Use ALL_CAPS for defines and kCamelCase for static const values.
Change some defines into static constants if they are not used in array sizes.

Change-Id: I036b0f99215fd0414a33f099bd6b809ff8ee4541
2022-05-09 15:10:14 +02:00
James Zern
dc3841e077 {histogram,predictor}_enc: quiet int -> float warnings
after:
a19a25bb Replace doubles by floats in lossless misc cost estimations.

Change-Id: Idc5888b40ce5b591b72c6e51a188a9ab8c5d9823
2022-04-20 10:10:27 -07:00
Vincent Rabaud
a19a25bb03 Replace doubles by floats in lossless misc cost estimations.
Doubles are slower and use more RAM for no benefit.

Change-Id: I05b313576f9b33388c7c39d7fed8de84170c3753
2022-04-17 21:07:54 +02:00
Vincent Rabaud
42888f6c7c Add an option to enable static builds.
The build is not fully static but enough for certain usage.

Change-Id: I269fa40f332365873634b12ac54fd3c36beefd66
2022-04-12 17:50:19 +02:00