this is in line with the recommendation in the spec, cf.,
5603947 webp-container-spec: clarify background clear on loop
(cherry picked from commit 1579de3cae)
Change-Id: Id3910395b05a1a1f2804be841b61f97bd4bac593
previously the first frame would be redisplayed, which might be
unexpected if the final frame was meant to be a composite, for example.
(cherry picked from commit 0f017b56f3)
Change-Id: I4da795623c71501e2fa426e8fba8fb2ffcbab58a
add additional return checks and asserts to avoid:
C6102: Using 'XXX' from failed function call ...
(cherry picked from commit 9b228b5416)
Change-Id: I51f5fa630324e0cd7b2d9fceefecb4f4021474b1
width / height are unsigned; fixes a warning with msvs /analyze:
C6340: Mismatch on sign: 'const unsigned int' passed as _Param_(4) when
some signed type is required in call to 'fprintf'.
(cherry picked from commit 47d26be760)
Change-Id: I5f1fad4c93745baf17d70178a5e66579ccd2b155
This is much faster and the compression is slightly better too.
(cherry picked from commit c94ed49efd)
Change-Id: Ibf0d10eea83bfabfcc44ee497074767462ff41b1
Snapping odd offsets in GIF to even offsets in WebP was causing extra row/column
being disposed in such cases.
Code is rewritten to maintain previous and current canvas (it used to maintain
previous canvas and current frame earlier). And we recompute change rectangles
as those from GIF may no longer apply.
Also, this renders methods like ReduceTransparency() and ConvertToKeyFrame()
redundant, as internally maintained current canvas is always independent of
previous canvases.
Disposal method choice: we pick the disposal method that results in the smallest
change rectangle.
(cherry picked from commit e4c829efe9)
Conflicts:
examples/gif2webp_util.c
Change-Id: Ic31186d98fe1a2a790a89d1571b17e3abd127e79
For some GIF images, the first frame is missing the corresponding
graphic control extension. For such cases, we were never calling
GetBackgroundColor(), and default background color value (white) was being used
incorrectly.
So, we call GetBackgroundColor() when we encounter the first image
descriptor instead, to make sure that it is always called.
(cherry picked from commit 0cc811d7d6)
Change-Id: I00fc8e943d8a0c1578dcd718f3e74dec7de4ed61
put WebPMuxConfig on the stack in main() rather than allocating it in
InitializeConfig(); removes a level of indirection there.
(cherry picked from commit c0a462cac2)
Change-Id: I81d386f7472ebbd322dd3fdbfda9d78dbeb62a66
explicitly check [0, 65535], the use of 'long' was removed in a prior
commit
(cherry picked from commit 0e23c487da)
Change-Id: I70d5bf286908459b5d4d619c657853f0e833b6ea
the ABI wasn't bumped with this addition, but it's more correct to say
it was added with 0x0205 rather than 0x0204
Change-Id: I2ba12a33b612fac16bdfeb8272e76b0ea84f3938
this function was introduced in 0x0204; fix checks related to this to be
> 0x0203 instead of 0x0202, pointed out on ffmpeg-devel.
Change-Id: I52cd2b98304baf1eb9a83094e2374f2120a1546b
* try to avoid trailing '.'
* rationalize capitalization
missed in:
0a8b886 dust up the help message
Change-Id: I6f80736cc8a2ff4f185f63d463a57d5bbf88a0db
+ vwebp's -help output
this is a future option; missed in:
793368e restore decode API compatibility
Change-Id: If920df2cf8de57ebad93a6b98830562149396d8d
We store the raw RGB samples decoded from JPEG, and avoid precision loss.
Note that this may increase the encoding time reported by
cwebp -v, since RGB->YUV now occur during WebPEncode call
(in case of lossy), instead of ReadJPEG().
This also increases the memory use, since we're carying the
source ARGB samples around.
Change-Id: Ic2180206cfc9f5574f391e91c3b89b9d81695d01
this defines WORDS_BIGENDIAN, replacing uses of
__BIG_ENDIAN__/__BYTE_ORDER__ with it
+ fixes lossless BGRA output with big-endian toolchains
that do not define __BIG_ENDIAN__ (codesourcery mips gcc)
Change-Id: Ieaccd623292d235343b5e34b7a720fc251c432d7
previously, the final canvas size was adjusted tightly from the
animation frames. Now, it can be specified separately (to be larger, in particular).
calling WebPMuxSetCanvasSize(mux, 0, 0) triggers the 'adjust tightly' behaviour.
This can be useful after calling WebPMuxCreate() if further image addition
is expected.
-> Fixed gif2webp accordingly.
also: made WebPMuxAssemble() more robust by systematically zero-ing WebPData.
Change-Id: Ib4f7eac372cf9dbf6e25cd686a77960e386a0b7f
Similarly to Chrome, we then use the first sub-rectangle
to set the canvas size.
Also: add check for too-large GIF dimensions (>MAX_CANVAS_SIZE)
Change-Id: Idce55f1e6f6982a8f0e082aac540e16b530e023e
We align with Blink/Chromium code by:
- checking for ANIMEXTS1.0 signature too
- using ByteCount >= 3 instead of requiring ByteCount==3
Change-Id: Idc484ca62878517df3dccb1fdb3bb45104a5e066
see: http://odur.let.rug.nl/kleiweg/gif/netscape.html
new options:
dwebp -alpha_dither
vwebp -noalphadither
When the source was marked as quantized, we use a threshold-averaging
filter to smooth the decoded alpha plane.
Note: this option forces the decoding of alpha data in one pass, and
might slow the decoding a bit.
The new field in WebPDecoderOptions struct is 'alpha_dithering_strength'
(0 by default, means: off). Max strength value is '100'.
Change-Id: I218e21af96360d4781587fede95f8ea4e2b7287a