Commit Graph

3662 Commits

Author SHA1 Message Date
Pascal Massimino
4105d565d3 disable WEBP_USE_XXX optimisations when EMSCRIPTEN is defined
Currently, none are available. If WEBP_HAVE_SSE2 eventually works,
we'll have to refine this conditionals.

BUG=webp:261

Change-Id: Ibc63ee1c013f2a4169eeb85cc8b6317b6420c2ad
2017-02-08 15:44:20 +00:00
Pascal Massimino
9ee32a7506 Merge "WebP-JS: emscripten-based Javascript decoder" 2017-02-07 20:20:20 +00:00
Pascal Massimino
ca9f7b7dd6 WebP-JS: emscripten-based Javascript decoder
The build is based on CMake.

There is a demo HTML page under webp_js/index.html

See README.webp_js file.

BUG=webp:261

Change-Id: I6612378b89907efd7b863720c6becf98385fc406
2017-02-07 11:02:42 +00:00
Vincent Rabaud
868aa6901f Perform greedy histogram merge in a unified way.
Previously, the stochastic method for histogram
combination could finish in a greedy way
if the number of iterations to perform so was smaller.

Except that another greedy combination was performed
afterwards ... hence wasted CPU in some cases.

Change-Id: Ic0f26873e6dc746679486b91cb35d73efee91931
2017-02-07 11:57:20 +01:00
James Zern
5b393f2d2a Merge "fix path typo for vwebp_sdl in Makefile.vc" 2017-02-04 20:41:48 +00:00
Pascal Massimino
e0012bea23 CMake: only use libwebpdecoder for building dwebp
Change-Id: Ia972c063711529d1e9a7fa79cf250d0764840e6f
2017-02-04 00:04:23 -08:00
Pascal Massimino
84c2a7b01c fix path typo for vwebp_sdl in Makefile.vc
Change-Id: Ia9656f1627ecbb58512927e234d18816941b3c9c
2017-02-04 00:01:23 -08:00
Pascal Massimino
1b0e4abf08 Merge "Add a flag to disable SIMD optimizations." 2017-02-03 20:30:32 +00:00
Vincent Rabaud
3226325016 Add a flag to disable SIMD optimizations.
Change-Id: I83c33076e8afd1b20de1e9b191bdad6669998a0b
2017-02-03 16:56:37 +01:00
Pascal Massimino
b494fdec45 optimize the ARGB->ARGB Import to use memcpy
(instead of the generic VP8PackARGB call)

Change-Id: I86edeb5934e7c062593f0248de7607cca5f1027c
2017-02-03 16:54:52 +01:00
Pascal Massimino
f153603900 Merge "ReadWebP: decode directly into a pre-allocated buffer" 2017-02-03 14:04:41 +00:00
Pascal Massimino
e69ed29105 ReadWebP: decode directly into a pre-allocated buffer
This simplifies things a bit.

Change-Id: Ib128c7630ef727284f3467c3216cc536143edd66
2017-02-03 14:41:46 +01:00
Pascal Massimino
57d8de8a79 Merge "vwebp_sdl: simple viewer based on SDL" 2017-02-03 09:43:57 +00:00
Vincent Rabaud
5cfd4ebc5e LZ77 interval speedups. Faster, smaller, simpler.
The initial re-writing of this part of the code with intervals
had to be done with a complex logic (mostly intervals with a
lower and upper bound, not a constant value like now) to properly
deal with the inefficiencies of the then LZ77 algorithm.
The improvements made to LZ77 since, now allow for a simpler logic.

There were also small errors in the interval insertion logic
that lead to small inefficiencies (hence a slightly better
compression rate).

Change-Id: If079a0cafaae7be8e3f253485d9015a7177cf973
2017-02-02 11:51:30 +01:00
Pascal Massimino
1e7ad88b85 PNM header decoder: add some basic numerical validation
see spec: http://netpbm.sourceforge.net/doc/ppm.html

Change-Id: I55e01f8cec79f9124e72d5f3d05be4ad0deae315
2017-02-01 15:03:11 +01:00
Pascal Massimino
17c7890cba Merge "Add a decoder only library for WebP in CMake." 2017-02-01 12:49:32 +00:00
Pascal Massimino
be73378684 Merge "Add clang build fix for MSA" 2017-02-01 12:43:09 +00:00
Vincent Rabaud
03cda0e494 Add a decoder only library for WebP in CMake.
Other libraries are also cleaned to automatically read the Makefile.am.
Dependencies also got cleaned.

Change-Id: I5d1ff0a4010d59e8c929ed0c9c30c05d83c271f8
2017-02-01 13:32:15 +01:00
Parag Salasakar
aa893914fc Add clang build fix for MSA
Change-Id: If139f4ecbdce756c69ba4ae032a70f81179683f8
2017-02-01 17:45:17 +05:30
Pascal Massimino
31a92e972e Merge "imageio: add limited PNM support for reading" 2017-02-01 10:49:57 +00:00
Pascal Massimino
dcf9d82a95 imageio: add limited PNM support for reading
see: http://netpbm.sourceforge.net/

Only reads P5 and P6 pnm files for now.

Change-Id: I2332a623f803df67455047f570f1cff9f464480a
2017-02-01 07:41:56 +00:00
Pascal Massimino
6524fcd614 vwebp_sdl: simple viewer based on SDL
Uses WebPToSDL() generic function defined in vwebp_sdl.[ch].
This function is not included in the libextras library, because it
would bring in an SDL dependency. Probably too heavy for now.

WebPToSDL() is separate, because it will be called used by the javascript
version of libwebp (through emscripten build rules)

Change-Id: Ic85b36f8ce4784f46023656278f6480be6802834
2017-01-31 10:23:03 +01:00
James Zern
6cf24a247d get_disto: fix reference file read
previously this was reading the first file a second time, since:
b0450139 ReadImage(): restore size reporting

BUG=webp:329

Change-Id: Ie75192e36a06102b7617841768a18d4dfb02d1f5
2017-01-30 18:45:29 -08:00
James Zern
43d472aa18 libwebp-0.6.0
- 1/26/2017: version 0.6.0
   * lossless performance and compression improvements
   * miscellaneous performance improvements (SSE2, NEON, MSA)
   * webpmux gained a -duration option allowing for frame timing modification
   * new img2webp utility allowing a sequence of images to be converted to
     animated webp
   * API changes:
     - libwebp:
       WebPPictureSharpARGBToYUVA
       WebPPlaneDistortion
     - libwebpmux / gif2webp:
       WebPAnimEncoderOptions: kmax <= 0 now disables keyframes, kmax == 1
                               forces all keyframes. See mux.h and the gif2webp
                               manpage for details.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYj9JHAAoJEPnD1r24IytdRHIP/2JWmd7BEjGgkozxm6l38SAM
 snyyPvorXQ20Qi9fnyfOFZP3fMB8i9YkaZgEDGLAqWgvtVEHKr6ZdwYquXDz9HCb
 GUGWlBEPiNrGKAQ2jJvdIT4yO8AEz7Y8UZwdPNDY1W05qI6XKRxsjtyeadFRQwku
 h4x+zP0M0ubrUkfq/rlnB9eITCf00fNBRb9AlkQAlbqh6GlZ9Jum142VsZRAlcLA
 lo3d4Q7GsVTDrILXXfDj+LsyKeyFDujnlG2ZxvOTHvtgEiKX3LT8Q/AfpF9IRc3a
 KJykMw9NZH1QHvIpTRF1J9SwtGkrBAoEbolp20cMJ/gV6348NsIDQsDskuA2LwlL
 62JmxArXFTrJ76g/s7xCu1zL/+znCs5uH4xBh9HTqnWSL6iPH3uok/eVK0aq4A+L
 7qAi9UWlKqTLgmUkg4Fibi3fWBPrp/fCAQmWB+tWL+QdPs70wyYennbHTvjG0t9I
 mOwfLuPsJoIaurg2s/RU4fWSNBJWEAUQbiDijUosrlFfgUZhSofNek+yaD2bYZ3m
 A23Pkmmlpcu3vzvd6mUFft2sPGXT+VkN6jiiVUY6rQDSMxW8akccGaRmHZIPplcp
 2KOAlHtSuyrc+xa/MutHCjIrPc87JKxyudugeSx+yl0TGWdMS6BKBFD7kcWDvFxM
 +fbS0q3776P7TZc7jzYd
 =LHmo
 -----END PGP SIGNATURE-----

Merge tag 'v0.6.0'

libwebp-0.6.0

- 1/26/2017: version 0.6.0
  * lossless performance and compression improvements
  * miscellaneous performance improvements (SSE2, NEON, MSA)
  * webpmux gained a -duration option allowing for frame timing modification
  * new img2webp utility allowing a sequence of images to be converted to
    animated webp
  * API changes:
    - libwebp:
      WebPPictureSharpARGBToYUVA
      WebPPlaneDistortion
    - libwebpmux / gif2webp:
      WebPAnimEncoderOptions: kmax <= 0 now disables keyframes, kmax == 1
                              forces all keyframes. See mux.h and the gif2webp
                              manpage for details.

* tag 'v0.6.0':
  update ChangeLog
  extras/Makefile.am: fix libwebpextras.la reference
  update ChangeLog
  update NEWS
  update AUTHORS
  Fix "all|no frames are keyframes" settings.
  disable GradientUnfilter_NEON
  img2webp: treat -loop as a no-op w/single images
  ReadImage(): restore size reporting
  update ChangeLog
  img2webp,get_disto: fix image decode w/WIC builds
  get_disto: make ReadPicture() return a bool
  update NEWS
  man/img2webp.1: fix formatting warning
  update NEWS
  bump version to 0.6.0
  update AUTHORS

Change-Id: I682fd7821ad51174e4772d84a4445e58d0cebd22
2017-01-30 16:20:52 -08:00
James Zern
50d1a848bc update ChangeLog
Change-Id: Ibaa88480519114b8f36f96c51d44b5c3b8a6433d
2017-01-30 12:23:57 -08:00
James Zern
20a7fea064 extras/Makefile.am: fix libwebpextras.la reference
drop './' from the reference in webp_quality_LDADD.. this form is used
in the other makefiles. this fixes a parallel build failure seen under
freebsd:
make[1]: don't know how to make ./libwebpextras.la. Stop

Change-Id: I59635a0c747d402cd990f6379eb1948c3e40f278
2017-01-28 13:33:07 -08:00
James Zern
415f3ffe3d update ChangeLog
Change-Id: Id1788367319e8476b79a5221af32c8068bba78e4
2017-01-26 23:09:25 -08:00
James Zern
3c6d1224b4 update NEWS
Change-Id: Id0ecf4abd657c2e0c97abe28fc3cca4ab7bc625b
2017-01-26 22:47:46 -08:00
James Zern
ee4a4141f5 update AUTHORS
Change-Id: I86b80411f50f5b112da54236aedd4d9ac005f8a5
2017-01-26 22:41:09 -08:00
Jehan
32ed856f60 Fix "all|no frames are keyframes" settings.
Documentation says: "if kmin == 0, then key-frame insertion is disabled;
and if kmax == 0, then all frames will be key-frames."
Reading this, you'd expect that if kmax == 0, then with any kmin <= 0
all frames will be key-frames. But actually the kmin <= 0 test is caught
first and you get the opposite (no keyframes but the first). You'd have
instead to set kmax == 0 and any value kmin > 0, which is absolutely
counter-intuitive (reversing order).
Moreover kmax == 1 has no valid kmin (kmin == 1 conflicts with the
`kmax > kmin` rule and kmin == 0 conflicts with `kmin >= kmax / 2 + 1`).
So it should be considered an exception too.

Instead I propose this new logic:
- kmax == 1 means that all frames are keyframes (you are explicitly
  requesting a keyframe every 1 frame at most, i.e. all frames).
- kmax == 0 means no keyframes (you ask for a keyframe every 0 frames,
  i.e. never).
This is more "logical" language-wise, and also does not involve any
conflicts about what if both kmax and kmin are 0, since now a single
property value is meaningful for the 2 exceptional cases.

Change-Id: Ia90fb963bc26904ff078d2e4ef9f74b22b13a0fd
(cherry picked from commit 2dc0bdcaee)
2017-01-26 22:31:16 -08:00
James Zern
1c3190b6ed Merge "Fix "all|no frames are keyframes" settings." 2017-01-27 00:02:04 +00:00
Pascal Massimino
f4dc56fd77 disable GradientUnfilter_NEON
Compile with XCode, it appears quite slower than the C-version,
especially for arm64.

Change-Id: Ic46dba184a36be454fef674129d2f909003788fc
(cherry picked from commit 4f3e3bbd44)
2017-01-25 20:30:15 -08:00
Pascal Massimino
4f3e3bbd44 disable GradientUnfilter_NEON
Compile with XCode, it appears quite slower than the C-version,
especially for arm64.

Change-Id: Ic46dba184a36be454fef674129d2f909003788fc
2017-01-25 16:33:26 -08:00
Jehan
2dc0bdcaee Fix "all|no frames are keyframes" settings.
Documentation says: "if kmin == 0, then key-frame insertion is disabled;
and if kmax == 0, then all frames will be key-frames."
Reading this, you'd expect that if kmax == 0, then with any kmin <= 0
all frames will be key-frames. But actually the kmin <= 0 test is caught
first and you get the opposite (no keyframes but the first). You'd have
instead to set kmax == 0 and any value kmin > 0, which is absolutely
counter-intuitive (reversing order).
Moreover kmax == 1 has no valid kmin (kmin == 1 conflicts with the
`kmax > kmin` rule and kmin == 0 conflicts with `kmin >= kmax / 2 + 1`).
So it should be considered an exception too.

Instead I propose this new logic:
- kmax == 1 means that all frames are keyframes (you are explicitly
  requesting a keyframe every 1 frame at most, i.e. all frames).
- kmax == 0 means no keyframes (you ask for a keyframe every 0 frames,
  i.e. never).
This is more "logical" language-wise, and also does not involve any
conflicts about what if both kmax and kmin are 0, since now a single
property value is meaningful for the 2 exceptional cases.

Change-Id: Ia90fb963bc26904ff078d2e4ef9f74b22b13a0fd
2017-01-25 13:12:52 -08:00
James Zern
0d8e05880c img2webp: treat -loop as a no-op w/single images
or in cases where duplicates have been reduced to one

Change-Id: I145cd61b6792b021617f1234f0ba36e2a3128d84
2017-01-25 08:17:39 +00:00
Pascal Massimino
b045013970 ReadImage(): restore size reporting
That was useful for printing rd-curves.

Change-Id: Idd641d94633f1f88bad2e29494b3d99c4c02fa30
2017-01-24 23:05:33 -08:00
James Zern
0ad3b4efa8 update ChangeLog
Change-Id: Iceb140648137d41a480515ce83fc4b3703449645
2017-01-24 17:41:14 -08:00
James Zern
6451709e72 img2webp,get_disto: fix image decode w/WIC builds
similar to cwebp, attempt ReadPictureWithWIC() first

Change-Id: Ifb83aaa457be59c95b201bf8bd6b0877a6a253ed
2017-01-24 15:12:08 -08:00
James Zern
92504d214c get_disto: make ReadPicture() return a bool
the input size of one of the images in the output didn't add much value.

Change-Id: I935a8c44c98fc085f0f6f360b3851826e1480f09
2017-01-24 15:07:03 -08:00
James Zern
c3e4b3a946 update NEWS
drop iOS framework update, that was included in 0.5.2

Change-Id: I2bd2ce5a6eba0c76d168c2c27070555e48e1da2b
2017-01-23 19:49:55 -08:00
James Zern
3363eb6d68 man/img2webp.1: fix formatting warning
the default is format is roman, fixes:
`R' is a string (producing the registered sign), not a macro.

Change-Id: If2bce714eff1237cd1702ae1143323249d85b93b
2017-01-23 19:36:14 -08:00
James Zern
4d1312f2d5 update NEWS
Change-Id: If1735e8aa839004a7c5728f7f8fe23649a5a4d90
2017-01-23 18:34:31 -08:00
James Zern
36c42ea415 bump version to 0.6.0
libwebp{,decoder} - 0.6.0
libwebp libtool - 7.0.0
libwebpdecoder libtool - 3.0.0

mux - 0.4.0
libtool - 3.0.0

demux - 0.3.2
libtool - 2.2.0

Change-Id: Ie46dc70df1e283df0ccef6eb07c5694feb4d4a2b
2017-01-23 18:07:00 -08:00
James Zern
bb498a51e2 update AUTHORS
Change-Id: I84cb70614e70d510c22d462a73e10088421e03c5
2017-01-23 17:48:18 -08:00
James Zern
84cef16f47 Makefile.vc: fix CFG=debug-dynamic build
strip '_debug' from the library basename to form the resource target.
since:
919f9e2f Merge "add .rc files for windows dll versioning"

BUG=webp:323

Change-Id: I97cfa48afa846211385720034a40aa452c68134c
2017-01-20 17:03:51 -08:00
James Zern
919f9e2fd6 Merge "add .rc files for windows dll versioning" 2017-01-20 19:29:50 +00:00
James Zern
f1ae8af42f Merge ".gitignore: add img2webp" 2017-01-20 19:27:37 +00:00
Pascal Massimino
4689ce1635 cwebp: add a -sharp_yuv option for 'sharp' RGB->YUV conversion
Change-Id: I6edd5b44d693da50f702fa8218f14872874d91ba
2017-01-20 16:54:54 +01:00
Pascal Massimino
79bf46f120 rename the pretentious SmartYUV into SharpYUV
Change-Id: Ifeeb9cb85896c5f3ba0cc1c2c821f8d00295f69e
2017-01-20 14:36:21 +01:00
Pascal Massimino
eb1dc89a5f silently expose use_delta_palette in the WebPConfig API
is just a placeholder for now, unless WEBP_USE_EXPERIMENTAL_FEATURES
is defined.

Change-Id: I087cb49781560bc1a7fbb01b136d36115c97ef72
2017-01-20 10:25:19 +01:00