Commit Graph

19 Commits

Author SHA1 Message Date
Pascal Massimino
b4e046778d gif2webp: introduce -loop_compatibility option
This patch fixes the compatibility for loop-count handling.
This aims at addressing the change in Chrome handling of loop-count
prior to M63.

Before M63: loop-count interpretation was aligned to GIF's behaviour in
Chrome, but incompatible with WebP's spec. In particular, you couldn't
loop exactly once.

Post-M63: loop-count in WebP is really the total number of loops. Gif2webp
will convert correctly from a GIF source by adjusting the loop count.

Note: The Chrome version can be retrieved from the User-Agent
string (chrome://version).
An M63 version will contain the pattern:
   Chrome/63.x.xxxx.xx
for instance.

Change-Id: Ie6dc13227e6498f4d7af2f09247913648997648a
2017-09-20 07:37:49 +00:00
Vincent Rabaud
f0569adb93 Fix man pages for multi-threading.
BUG=webp:336

Change-Id: I70d3dfb8a532c1f2b80bd08cc62e833962cb4b34
2017-06-15 08:49:04 +00: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
Pascal Massimino
447adbce1e 'our bug tracker' -> 'the bug tracker'
(less exclusive wording)
(also a good opportunity to update the date)

Change-Id: Ife221f3f8ac3c38db93ec91954123edc3d8a4a6b
2016-06-23 16:06:12 -07:00
James Zern
b5e30dac38 man/*, AUTHORS: clarify origin of the tool
mention libwebp in the AUTHORS section quote
+ add a direct link to the libwebp repo

Change-Id: I700614aa41f229910c82204f319355152b6b4f29
2015-12-11 18:48:38 -08:00
James Zern
4b9186b2eb update issue tracker url
code.google.com -> bugs.chromium.org

Change-Id: I0dc99a85c29657415401160df3c7dd0423f96457
2015-10-19 20:06:50 -07:00
Urvang Joshi
b9df35f714 AnimEncode API: kmax=0 should imply all keyframes.
Earlier, it wasn't adding any keyframes at all.

Change-Id: If3824fc8e57548b8610a52e875fb9279f862fa57
2015-02-03 11:42:13 -08:00
Urvang Joshi
7489b0e72b gif2webp: Add '-min-size' option to get best compression.
This disables key-frame insertion and tries both dispose methods for
each frame.

Change-Id: Ib167747198fd1d98cb93321f76826e91228f24d8
2014-10-30 15:17:09 -07:00
skal
2bcad89b4c allow some more stdin/stout I/O
* allow reading from stdin for dwebp / vwebp
 * allow writing to stdout for gif2webp

by introducing a new function ExUtilReadFromStdin()

Example use: cat in.webp | dwebp -o - -- - > out.png

Note that the '-- -' option must appear *last*
(as per general fashion for '--' option parsing)

Change-Id: I8df0f3a246cc325925d6b6f668ba060f7dd81d68
2014-03-12 19:32:16 +01:00
James Zern
6f36ade926 manpage pedantry
from man-pages (7):
provides a comma-separated list of related man pages, ordered by section
number and then alphabetically by name, possibly followed by other
related pages or documents. Do not terminate this with a period.

Change-Id: I6763b3b3a89f3c2e9ed5c1a4e9d05fb9ce85dd40
2013-12-17 23:30:34 -08:00
Urvang Joshi
a9a20acfa6 gif2webp: Add a multi-threaded encode option
Change-Id: If16a5f434e0ab2965a7ac9392633ecaf8c4aff46
2013-12-17 17:01:59 -08:00
James Zern
5459030be0 gif2webp: let -- stop parameter parsing
this enables gif2webp to accept input files starting with '-'

Change-Id: I994a5587e16e3af83ca45bfda8caf2dc39068b6c
2013-12-16 15:15:20 -08:00
Urvang Joshi
4c617d3286 gif2webp: Disable output of ICC profile by default
This is to discourage generation of animated WebP images with ICC
profile, as
the real-world use-case for such images is rare at best.

Output of ICC/XMP metadata is now controlled by the '-metadata' option.

Change-Id: I8e3e29878c32bf46cbc661f50661bac602603c43
2013-12-10 14:53:06 -08:00
Urvang Joshi
73f52133a1 gif2webp: Add a mixed compression mode
When '-mixed' option is given, each frame would be heuristically chosen
to be
encoded using lossy or lossless compression.

The heuristic is based on the number of colors in the image:
- If num_colors <= 31, pick lossless compression
- If num_colors >= 194, pick lossy compression
- Otherwise, try both and pick the one that compresses better.

Change-Id: I908c73493ddc38e8db35b7b1959300569e6d3a97
2013-11-17 18:04:07 -08:00
Urvang Joshi
fb887f7fe6 gif2webp: Different kmin/kmax defaults for lossy and lossless
These were the best values found considering the compression gain and
decoding speed.

Change-Id: Iddae4c5b78c6aa42b1f8a034d1c1b93843071a81
2013-09-30 14:25:58 -07:00
Urvang Joshi
d538cea8c2 gif2webp: Support a 'min' and 'max' key frame interval
Change-Id: If910c8849d7210e7227db0f45affa26fce7da102
2013-09-12 13:41:09 -07:00
Urvang Joshi
f0d6a14b64 gif2webp: Insert independent frames at regular intervals.
We use the 'do not blend' option for creating independent frames.
We also mark the already independent frames as 'do not blend'.

This bounds the maximum number of frames that need to be decoded to
decode a given frame, thus leading to a much better decoding performance.

Change-Id: I7cef98af2b53751ec36993fd2bd54f7f4c4aad2b
2013-08-20 11:47:48 -07:00
James Zern
14c3820038 manpages: italicize option parameters
Change-Id: Id7e4edde2a1c91fe4fbf96ddc280a06132e9986a
2013-02-01 20:35:58 -08:00
Urvang Joshi
79efa1d006 Add man page for gif2webp utility
Change-Id: Ia4826134db4e97427ab27977af7cc358b26e2b86
2012-11-15 15:55:06 -08:00