Commit Graph

3908 Commits

Author SHA1 Message Date
Pascal Massimino
499c395a35 Merge "anim_diff: expose the -max_diff option" 2018-02-09 19:39:03 +00:00
Pascal Massimino
f69dcd692a Merge "remove WEBP_EXPERIMENTAL_FEATURES" 2018-02-09 18:53:59 +00:00
James Zern
07d884d59b anim_diff: expose the -max_diff option
this removes the last remnant of WEBP_EXPERIMENTAL_FEATURES

Change-Id: I5952107b5aae60b865f0745e0bb4a7e1663af5aa
2018-02-09 10:32:09 -08:00
James Zern
f4dd92565e remove WEBP_EXPERIMENTAL_FEATURES
the webp bitstream is considered stable at this point

Change-Id: I4b13f9ed4c45f63785474b097e96cb7bf651be7b
2018-02-09 10:25:11 -08:00
skal
94a8377b3e extract the command-line parsing helpers to example_util
+ make img2webp tool use the text-file parsing option too.

Change-Id: I1976e651bbe8b4701abceba89e054b4fb3c35696
2018-02-08 08:11:31 +00:00
skal
fc09e6e252 PNM decoder: prevent unsupported depth=2 PAM case.
Change-Id: I8476818908d71498dd80b07dc255aa008ffd16f5
2018-02-07 18:24:01 -08:00
skal
6de58603b7 MIPS64: Fix defined-but-not-used errors with WEBP_REDUCE_CSP
BUG=webp:372

Change-Id: Ided3fae748face18138a8050eaced5e0f58120d4
2018-01-30 17:40:09 -08:00
James Zern
cbde5728c8 gif2webp: add support for reading from stdin
output to stdout is already supported; this matches [cd]webp

BUG=webp:371

Change-Id: Ib1ce1661b16ea792943bca2980f779584e90cc86
2018-01-26 03:13:44 -08:00
Vincent Rabaud
cf1c5054c7 Add an SSE4 version of some lossless color transforms.
Change-Id: Ieac094f684116d1292793b2ca321f6f1a69565b5
2018-01-24 14:33:25 +01:00
Vincent Rabaud
45a8b5eb59 Fix lint error with man page.
LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
     man --warnings -E UTF-8 -l -Tutf8 -Z img2webp.1 >/dev/null
would trigger it.

BUG=webp:370

Change-Id: I9543112bc58ac424af86bb65f7d894707a5646c7
2018-01-23 21:18:30 +01:00
Pascal Massimino
cff38e8f4d Merge "PNG decoder: handle gAMA chunk" 2018-01-06 00:07:58 +00:00
Pascal Massimino
59cb1a48c1 Merge "enable dc error-diffusion always" 2018-01-05 22:51:58 +00:00
Pascal Massimino
78318b30e5 PNG decoder: handle gAMA chunk
Apply gamma correction to the decoded RGB values.

This handles corner cases where the PNG file doesn't have
a standard 1/2.2 gamma value.

BUG=webp:369

Change-Id: I9907b6e2c458002de7c26d0b9e416278cca33990
2018-01-05 10:56:52 -08:00
Pascal Massimino
664c21dd01 Merge "remove some TODOs" 2017-12-28 14:39:35 +00:00
Pascal Massimino
815652de03 enable dc error-diffusion always
for q<=98, we always enable error diffusion.

+ reduce storage 2x by using int8_t
+ make the error diffusion more robust

BUG=webp:340,308

Change-Id: I0608df839ff7b64d6843005a0f81d2577143af9e
2017-12-27 20:11:57 +00:00
Pascal Massimino
aec45cec33 remove some TODOs
* regarding alpha_data_ used for testing.
   alpha_data_!=NULL is as close a good test as we'll get.
* regarding filter-strength / sharpness forcing
   no practical use (can be done during encode cycles,
   for experimentation)
* regarding a 'less-complex' filtering:
   no practical use so far. Next version!

Change-Id: If2dfff5818552a7d3e7c23ac08d64fe6d270229c
2017-12-27 17:40:18 +01:00
Pascal Massimino
5715dfce2e fix block-count[] increment in case of large image
For large images overflowing the partition0, we re-do a number
of passes but were forgetting to reset the block_count[].
This was leading to incorrect summary.

+ some cosmetic fixes here and there

BUG=webp:355

Change-Id: Ie87158d7f177f8efdca429b146cfcd0e81652d2f
2017-12-27 17:12:58 +01:00
Pascal Massimino
c2d04f3eb2 enable DC error-diffusion always for multi-pass
We can't predict if the quality is going to be below the threshold
eventually, so we might as well enable it always.

Change-Id: I30aedecc8c6d4daf159f6ef152697df0206d1e93
2017-12-12 15:00:45 +01:00
Pascal Massimino
96bf07c560 use DC error diffusion for U/V at low-quality
This fixes some color smearing due to heavy quantization.
This is only enabled for q <= 30 (cf ERROR_DIFFUSION_QUALITY)

Change-Id: I07e83a4d38461357a32c9e214f7eadc6db73baa9
2017-12-11 06:37:40 -08:00
Pascal Massimino
1c59020b93 fix missing sse41 targets in makefile.unix
Change-Id: I8c7a39746594caea160c40e25ea22d756ca44e11
2017-12-11 00:00:19 -08:00
James Zern
7a8e814b57 cosmetics: s/color_space/colorspace/
in webpinfo.c, quality_estimate.c.
this form is used elsewhere in the codebase

Change-Id: I40c8202db51a7356e6a14d7e9b25c68153548438
2017-12-08 12:40:18 -08:00
James Zern
05f6fe24c3 upsampling: rm asserts w/REDUCE_CSP+OMIT_C_CODE
with WEBP_NEON_OMIT_C_CODE the default _C functions won't be set and
with WEBP_REDUCE_CSP the NEON functions won't be either triggering an
assert for an empty table member.

BUG=chromium:792627

Change-Id: I8d2d430eaa37bb92885b61a3dd39f961924a8def
2017-12-06 17:09:26 -08:00
Vincent Rabaud
b4cf5597f4 Merge "Upsampling SSE2/SSE4 speedup." 2017-12-06 10:10:12 +00:00
James Zern
ccbeb32c04 Makefile.vc: add missing sse41 files
upsampling_sse41.c and yuv_sse41.c added in:
807b53c4 Implement the upsampling/yuv functions in SSE41

Change-Id: I186cb6f6c296ba26b8e9b42d88da7f58c55710a9
2017-12-05 23:27:16 -08:00
Vincent Rabaud
55403a9a5a Upsampling SSE2/SSE4 speedup.
RGB to YUV conversion was not using SSE to finish up the row.
End data is now copied to a buffer big enough to fit in a
SSE register.
(UPSAMPLE_LAST_BLOCK was already using that trick).

Change-Id: Ie539bcbe570a643a774aa88263503c0d2c41890f
2017-12-05 23:37:06 +01:00
Vincent Rabaud
807b53c47e Implement the upsampling/yuv functions in SSE41
Change-Id: If122da22b74a974262063d232f6ca0ab902ff64e
2017-12-04 22:29:43 +01:00
Vincent Rabaud
84101a8165 Fix wasm WebP compilation
Change-Id: I6638628fbf3b7ae310bc892c9ca49678d1098b9b
2017-12-04 13:39:50 +01:00
Pascal Massimino
8bebd2a32e fix warning on MSVC
'function' : different 'const' qualifiers

Change-Id: I855e94e8734a7e9a6156c771a7bad41b19a450d7
2017-12-01 22:46:48 -08:00
Pascal Massimino
a7f93fe32d webpmux: allow reading argument from a file
if a single text file name is supplied as argument
(e.g.: 'webpmux my_long_list_of_frames.txt'), the command
line arguments are actually parsed from this file.
Tokenizer will remove space, tabs, LF, CR, returns, etc.

+ changed ImgIoUtilReadFile() to return a null-terminated
data, for convenience.

+ misc clean-up in the code

BUG=webp:355

Change-Id: I76796305641d660933de5881763d723006712fa9
---
2017-12-01 01:42:22 -08:00
James Zern
b69f18a73a gif2webp.1: fix -loop_compatibility layout
Change-Id: Ia29b7a9e3b72605d2bb8c13ad3e37b88094444f5
2017-11-29 22:59:30 -08:00
James Zern
72d530c01d Merge "fix lossless decoding w/WEBP_REDUCE_SIZE" 2017-11-30 06:42:20 +00:00
James Zern
296c7dc4ac fix lossless decoding w/WEBP_REDUCE_SIZE
alpha processing is still required when requesting premultiplied output

since:
1b27bf8b WEBP_REDUCE_SIZE: disable all rescaler code

Change-Id: Id1b03256c4c04b8db31527e60cd31dd20ce6f3ad
2017-11-29 17:01:40 -08:00
Pascal Massimino
0d5d029c18 Merge "ImgIoUtilReadFile: fix file leak upon error" 2017-11-30 00:24:51 +00:00
Pascal Massimino
ae568ce7c4 ImgIoUtilReadFile: fix file leak upon error
the file was not closed in case of malloc error.

Change-Id: I5f8b22d7d0da6d2c8c2dd245cdd57994e3ddea3a
2017-11-29 21:30:22 +01:00
James Zern
796b5a8a8a libwebp-0.6.1
- 11/24/2017: version 0.6.1
   This is a binary compatible release.
   * lossless performance and compression improvements + a new 'cruncher' mode
     (-m 6 -q 100)
   * ARM performance improvements with clang (15-20% w/ndk r15c, issue #339)
   * webp-js: emscripten/webassembly based javascript decoder
   * miscellaneous bug & build fixes (issue #329, #332, #343, #353, #360, #361,
     #363)
   Tool updates / additions:
     added webpinfo - prints file format information (issue #330)
     gif2webp - loop behavior modified to match Chrome M63+ (crbug.com/649264);
                '-loop_compatibility' can be used for the old behavior
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaHeXcAAoJEPnD1r24IytdGCMQAKr0uEtzi6MOWGX61y7APIst
 ZqKwwIppqsY8jFCkcfYcQY4iRDhdIPm4QBxZN1PYCkB9yAEHtlGeoxjdFgckGW90
 DAZI2z710KvE0rA5zvqa1zxKMct2lB06AG2cYViD+I6PNzkQ1lI21TnqAC3mJ5qP
 t0EN32s8h6jAgbji3u+fANSNeT9iHDuqZaAJmoXVHdjQy4pB5geJrKKHN2FAQzL4
 +FG8glM1CK0P5ZWsX1UljiaMdSnsiKcOb2BvVACgGx7OaBAhTOgi9GPGsRiF36Wr
 ddiTsbRN/RH+G4njVMq/es3lFWJCbYKozcBTdfthfrRQbgc7ZhhttNV2Qqr5fNTo
 qwF1VfuJs/i6c4+Uk7SXcOvwCHemPMXQyKJ7ZjZH8BZBxvvbI+fGO4xkc36F3qN8
 cCm5yCFry9O6vIBG243c/y5jNJLEBnIuQgoKO6HPlUzm3qb26s7+o9Ptd4rIs7XD
 ikoUmcJoIXUt/brcTpJYqmGgT2Gj5Oflg0XgWdt/9tw7bQ55QStQf/YfMQ0fLtfk
 QnG0NtDs9GavT2Q6NnadiAmzw1o0ZJMRiAX+BHPK6di3awWArKQuRiIGZZrlmy7Q
 wDsuEHuClKvPof5qsZYHXh10tupYSml0bw0ZNObltCfaiimvr+BeXR4WXND9taA4
 xNfJdCIQmoqIObCArbyk
 =deXw
 -----END PGP SIGNATURE-----

Merge tag 'v0.6.1'

libwebp-0.6.1

- 11/24/2017: version 0.6.1
  This is a binary compatible release.
  * lossless performance and compression improvements + a new 'cruncher' mode
    (-m 6 -q 100)
  * ARM performance improvements with clang (15-20% w/ndk r15c, issue #339)
  * webp-js: emscripten/webassembly based javascript decoder
  * miscellaneous bug & build fixes (issue #329, #332, #343, #353, #360, #361,
    #363)
  Tool updates / additions:
    added webpinfo - prints file format information (issue #330)
    gif2webp - loop behavior modified to match Chrome M63+ (crbug.com/649264);
               '-loop_compatibility' can be used for the old behavior

* tag 'v0.6.1':
  update ChangeLog
  WEBP_REDUCE_CSP: restrict colorspace support
  update ChangeLog
  vwebp: disable double buffering on windows & mac
  webp_to_sdl.c: fix file mode
  WEBP_REDUCE_SIZE: disable all rescaler code
  webpinfo: add -version option
  bump version to 0.6.1
  update NEWS
  README: add webpinfo section

Change-Id: Iab2153fae38da3c99daccdf57fec816e07b7909a
2017-11-28 15:03:15 -08:00
James Zern
6b7a95fd83 update ChangeLog
Change-Id: I868b7680164ddc712233acc8607a8dfb6b3a4cbe
2017-11-28 12:01:56 -08:00
Pascal Massimino
f66955de5f WEBP_REDUCE_CSP: restrict colorspace support
only supported ones are: RGBA/BGRA/rgbA/bgrA (decoder)
as well as: WebPPictureImportRGB/RGBX/RGBA (encoder).

(note: extras/get_disto is affected too)

Change-Id: If6c4f95054ca15759c4e289fb3b4c352b3521c2c
(cherry picked from commit 6de20df02c)
2017-11-28 00:15:15 -08:00
Pascal Massimino
1af0df7662 Merge "WEBP_REDUCE_CSP: restrict colorspace support" 2017-11-27 20:08:55 +00:00
Pascal Massimino
6de20df02c WEBP_REDUCE_CSP: restrict colorspace support
only supported ones are: RGBA/BGRA/rgbA/bgrA (decoder)
as well as: WebPPictureImportRGB/RGBX/RGBA (encoder).

(note: extras/get_disto is affected too)

Change-Id: If6c4f95054ca15759c4e289fb3b4c352b3521c2c
2017-11-26 08:44:08 +00:00
James Zern
a289d8e774 update ChangeLog
Change-Id: Ia1e4669e6270faa6daae6306f47baa31488f119d
2017-11-25 19:01:58 -08:00
James Zern
c10a493caf vwebp: disable double buffering on windows & mac
this results in flickering with animated webp + alpha. disabling the
option is a workaround to restore the behavior to the previous release.

BUG=webp:365

Change-Id: Iac7fcc0d483837e76cc54ad3f26c4e0e5511e31d
2017-11-25 18:22:39 -08:00
James Zern
0d4466c2b4 webp_to_sdl.c: fix file mode
Change-Id: I1ca8506d40a60cd6db7f6f0d63a4431848bb0ea9
2017-11-25 13:52:03 -08:00
Pascal Massimino
1b27bf8b76 WEBP_REDUCE_SIZE: disable all rescaler code
BUG=webp:355

Change-Id: Id87cb11902e3fb8544a214308526ea9665ce8440
(cherry picked from commit 0df22b9eed)
2017-11-24 22:40:15 -08:00
James Zern
126be10950 webpinfo: add -version option
Change-Id: I5861d5ccd2119dd6749dc70b65fd145b5a732f98
2017-11-24 14:21:05 -08:00
Pascal Massimino
0df22b9eed WEBP_REDUCE_SIZE: disable all rescaler code
BUG=webp:355

Change-Id: Id87cb11902e3fb8544a214308526ea9665ce8440
2017-11-24 22:08:32 +00:00
James Zern
9add62b581 bump version to 0.6.1
libwebp{,decoder} - 0.6.1
libwebp libtool - 7.1.0
libwebpdecoder libtool - 3.1.0

mux - 0.4.1
libtool - 3.1.0

demux - 0.3.3
libtool - 2.3.0

Change-Id: If4a95c6e9829d4a608028ee9258b5c2b7af60c37
2017-11-24 21:03:05 +00:00
James Zern
d3e2614493 update NEWS
Change-Id: I66c8abe05b54558030a8555d80010506730ecbe9
2017-11-24 12:21:44 +00:00
James Zern
2edda639b2 README: add webpinfo section
Change-Id: Iee4a4ecbe562d6154f627ba62524cd1871a06564
2017-11-23 23:58:22 -08:00
James Zern
9ca568ef82 Merge "right-size some tables" 2017-11-24 06:28:02 +00:00
Pascal Massimino
31f1995cc5 Merge "SSE2 implementation of HasAlphaXXX" 2017-11-24 06:25:58 +00:00