mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Merge "Fix "all|no frames are keyframes" settings."
This commit is contained in:
commit
1c3190b6ed
@ -1,5 +1,5 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.TH GIF2WEBP 1 "June 23, 2016"
|
||||
.TH GIF2WEBP 1 "January 25, 2017"
|
||||
.SH NAME
|
||||
gif2webp \- Convert a GIF image to WebP
|
||||
.SH SYNOPSIS
|
||||
@ -68,8 +68,9 @@ Specify the minimum and maximum distance between consecutive key frames
|
||||
some key frames into the output animation as needed so that this criteria is
|
||||
satisfied.
|
||||
.br
|
||||
A 'kmin' value of 0 will turn off insertion of key frames. A 'kmax' value of 0
|
||||
will result in all frames being key frames.
|
||||
A 'kmax' value of 0 will turn off insertion of key frames. A 'kmax' value of 1
|
||||
will result in all frames being key frames. 'kmin' value is not taken into
|
||||
account in both these special cases.
|
||||
Typical values are in the range 3 to 30. Default values are kmin = 9,
|
||||
kmax = 17 for lossless compression and kmin = 3, kmax = 5 for lossy compression.
|
||||
.br
|
||||
|
@ -129,14 +129,13 @@ static void SanitizeEncoderOptions(WebPAnimEncoderOptions* const enc_options) {
|
||||
DisableKeyframes(enc_options);
|
||||
}
|
||||
|
||||
if (enc_options->kmin <= 0) {
|
||||
DisableKeyframes(enc_options);
|
||||
print_warning = 0;
|
||||
}
|
||||
if (enc_options->kmax <= 0) { // All frames will be key-frames.
|
||||
if (enc_options->kmax == 1) { // All frames will be key-frames.
|
||||
enc_options->kmin = 0;
|
||||
enc_options->kmax = 0;
|
||||
return;
|
||||
} else if (enc_options->kmax <= 0) {
|
||||
DisableKeyframes(enc_options);
|
||||
print_warning = 0;
|
||||
}
|
||||
|
||||
if (enc_options->kmin >= enc_options->kmax) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WEBP_MUX_ABI_VERSION 0x0107 // MAJOR(8b) + MINOR(8b)
|
||||
#define WEBP_MUX_ABI_VERSION 0x0108 // MAJOR(8b) + MINOR(8b)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Mux API
|
||||
@ -430,9 +430,10 @@ struct WebPAnimEncoderOptions {
|
||||
// frames in the output. The library may insert some key
|
||||
// frames as needed to satisfy this criteria.
|
||||
// Note that these conditions should hold: kmax > kmin
|
||||
// and kmin >= kmax / 2 + 1. Also, if kmin == 0, then
|
||||
// key-frame insertion is disabled; and if kmax == 0,
|
||||
// then all frames will be key-frames.
|
||||
// and kmin >= kmax / 2 + 1. Also, if kmax <= 0, then
|
||||
// key-frame insertion is disabled; and if kmax == 1,
|
||||
// then all frames will be key-frames (kmin value does
|
||||
// not matter for these special cases).
|
||||
int allow_mixed; // If true, use mixed compression mode; may choose
|
||||
// either lossy and lossless for each frame.
|
||||
int verbose; // If true, print info and warning messages to stderr.
|
||||
|
Loading…
Reference in New Issue
Block a user