libwebp/src/webp
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
..
decode.h fix doc and code snippet for WebPINewDecoder() doc 2016-11-04 12:07:54 +01:00
demux.h Merge "demux: accept raw bitstreams" 2015-12-17 22:52:10 +00:00
encode.h cwebp: add a -sharp_yuv option for 'sharp' RGB->YUV conversion 2017-01-20 16:54:54 +01:00
format_constants.h remove mention of fragment, frgm, FRGM, etc. 2016-09-02 14:43:12 +02:00
mux_types.h remove mention of fragment, frgm, FRGM, etc. 2016-09-02 14:43:12 +02:00
mux.h Fix "all|no frames are keyframes" settings. 2017-01-25 13:12:52 -08:00
types.h webp/types.h: use inline for clang++/-std=c++11 2014-10-30 15:25:27 +01:00