This is much faster and the compression is slightly better too.
(cherry picked from commit c94ed49efd6265602f9423fdbc81c8106fda1069)
Change-Id: Ibf0d10eea83bfabfcc44ee497074767462ff41b1
Tweaked the gif2webp_util API to support this.
Requested in: https://code.google.com/p/webp/issues/detail?id=144
(cherry picked from commit 65e5eb8a62923424f3d1142a811f0e42341f161d)
Change-Id: I0e8c4edc39227355cd8d3acc55795186e25d0c3a
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 e4c829efe9bb233f38eeb5c575a1afdc0cd82c65)
Conflicts:
examples/gif2webp_util.c
Change-Id: Ic31186d98fe1a2a790a89d1571b17e3abd127e79
avoids an ICE with NDK r10b + NDK_TOOLCHAIN_VERSION=4.9
In function 'SSE16x16':
enc_mips32.c (684) internal compiler error: Segmentation fault
Change-Id: I1a3d33c0a9534c97633ab93bcdf9bf59d3a7e473
(cherry picked from commit 0ce27e715ec8d0bc6f3a9bf66b2b0d761ab433f9)
the number of segments are previously validated, but an explicit check
is needed to avoid a warning under gcc-4.9
(cherry picked from commit c8a87bb62d64b03087499e9277937fe76f1f1726)
Change-Id: Ifa7c0dd7f3f075b3860fa8ec176d2c98ff54fcea
iOS 5 support isn't available in the Xcode 6 install; iOS 6 covers
phones starting at the 3GS, so should be a reasonable base line
(cherry picked from commit 9f7d9e6ddaea051bf5f231356591bddde4d9a7ac)
Change-Id: Ie5603c9e30cb52114b372509e183febbf679a69a
This prevents the 'alpha-leak' reported in issue #220
Speed-diff is kept minimal.
(cherry picked from commit c792d4129ab3500a59e271cadb5885d9f079de0b)
Change-Id: I1976de5e6de7cfcec89a54df9233c1a6586a5846
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 0cc811d7d6f8200cde698b5273e632620deb4c6b)
Change-Id: I00fc8e943d8a0c1578dcd718f3e74dec7de4ed61
This is the opposite of WebPDispatchAlpha
+ Implement the SSE2 version
(cherry picked from commit cddd33405055d70e5aab7b2aabaf1970522dd2e4)
Conflicts:
src/dsp/alpha_processing_sse2.c
Change-Id: I0c297309255f508c5261da8aad01f7e57f924d6c
put WebPMuxConfig on the stack in main() rather than allocating it in
InitializeConfig(); removes a level of indirection there.
(cherry picked from commit c0a462cac252da745e4b4f21851db3e5188b5681)
Change-Id: I81d386f7472ebbd322dd3fdbfda9d78dbeb62a66
in most cases 'ok' is set via a goto macro
(cherry picked from commit f89e1690df4b0c96c31f5f2e346e8843b5e3dcba)
Change-Id: I17c832446bf3e716d3bcd323dbcc72bec544029c
explicitly check [0, 65535], the use of 'long' was removed in a prior
commit
(cherry picked from commit 0e23c487dad7a1bd9b2cff409144910386823c15)
Change-Id: I70d5bf286908459b5d4d619c657853f0e833b6ea
use --ldflags over --prefix + --libs combination
based on comment in issue #180.
(cherry picked from commit be70b86c5764b296f7ad75cf91f2e0b4c3d7cfe8)
Change-Id: If2ca06053d5237b6722ddf4117917e5f3c06ab59
Handle the corner case when VP8LDecodeImage() method is called with an invalid
header data. The lossless decoding doesn't support incremental mode yet.
Return the error status as BITSTREAM error in case not all pixels are decoded
with the provided bit-stream. Also added asserts in the VP8LDecodeImage() method
to validate the decoder header with appropriate/valid data for huffman trees
(htree_groups_ etc).
(cherry picked from commit e0a99321611c5b5a43e33b4d377877d999e730f9)
Change-Id: Ibac9fcfc4bd0a2c5f624bb9d4a2b9f6459aa19ea
ReadSymbol() finishes with a VP8LSetBitPos() call only and could miss an eos_ during the decode loop.
Things are faster because of inlining too.
(cherry picked from commit d3242aee16e022f296ff985b5a17d653b8af0529)
Change-Id: I2d2a275f38834ba005bc767d45c5de72d032103e
eos_ needs to be set only when superfluous bits have actually
been requested.
Earlier, we were assuming pre-mature end-of-stream to be an error.
Now, more precisely, we mark error when we have encountered end-of-stream *and*
we attempt to read more bits after that.
This handles cases where image data requires no bits to be read
(cherry picked from commit a9decb5584dccf74e2fefd37cefc59d786834771)
Change-Id: I628e2c39c64f10c443fb51f86b1f5919cc9fd299
We only need to set BITSTREAM_ERROR if !ok.
(cherry picked from commit 3fea6a28dafe8b326b0e407bd36b22a72e32f8b0)
Conflicts:
src/dec/vp8l.c
Change-Id: I5bd13e64797e8bc509477edb29158abb39cb0ee1
if ALPHA_LOSSLESS_COMPRESSION produces a too big file (very rare!),
we fall-back to no-compression automatically.
(cherry picked from commit 187d379db68839f76d1390be291c471f2f66644c)
Change-Id: I5f3f509c635ce43a5e7c23f5d0f0c8329a5f24b7
fixes input/decode from stdin in the examples
(cherry picked from commit a6140194ff28bafbc4a2b5804c923c7e5aa52163)
Change-Id: Ie8052da758a9ef64477501b709408236d258da82
prevents corrupt output. related to issue #217
(cherry picked from commit e80eab1fbc63fa267f7e97a89c6d5d07b9981d45)
Change-Id: I6f0dac8131127717ba72b0709fb35d421ab41acb
use it in dwebp when dealing with 'stdout'
(cherry picked from commit 5927e15bc78cc13134672ebfb83e3b6143204cae)
Change-Id: I8b8a0b0de9e73731e913ac3c83b5e2b33c693175
force Sub3() to not be inlined, otherwise the code in Select() will be
incorrect.
https://android-review.googlesource.com/#/c/102511
(cherry picked from commit 637b3888090dea7d79aa51731186938f8f0edf4d)
Change-Id: I90ae58bf3e6cc92ca9897f69974733d562e29aaf
endian_inl.h already relies on dsp.h, grab the definitions from there.
(cherry picked from commit 8323a9038d3dcd722516f874a3310e16be5b10b2)
Change-Id: I445f7d0631723043c55da1070498f89965bec7b1
vtbl4_u8 is available everywhere except iOS arm64: use vtbl2q_u8 there
with a corresponding change in the load.
(cherry picked from commit 953acd56a413da79c5b7235e7839dc57d2e68430)
Change-Id: Ib84212dda3c7875348282726c29e3b79b78b0eac
rightmost pixel was missing a copy, which could lead to invalid read.
Also added a lower dimension of 4, below which we use the regular conversion.
This is to prevent corner cases, in addition to not being overkill.
(cherry picked from commit 2523aa73cb0aa337aaa5cd480a47a65476cdeb2c)
Change-Id: Iac12e7a3d74590f12fe8eeb1830b9891e61439f6
_M_IX86 will be defined in mingw builds after including windows.h. as
the gcc inline asm is first, this missing check would only have caused
an error if the code was reorganized.
(cherry picked from commit 3fca851a202e5b1018a2cc491b9e005913394afe)
Change-Id: I395679bcfc43e94d308d1ceb0c0fbf932b2c378c
with a special case for dithering==0., it gets somewhat faster on x86
thanks to inlining.
Also, less macros.
(cherry picked from commit e2a83d71091abc3e5177ee0ffc4ceb18c7714fab)
Change-Id: Ic2f2bf6718310743bb40cef2104fa759a073e6d5
New function: WebPPictureSmartARGBToYUVA()
This implement smart RGB->YUV conversion.
This is rather undocumented for now, and is triggered using '-pre 4'
preprocessing option.
This is slow-ish and use quite some memory, but should be improvable.
This is somehow a usable beta version.
(cherry picked from commit 3fc4c539aa00c325eba9ef8faec30ec241d71e9c)
Change-Id: Ia50a8c30134e4cab8a7d3eb70aef13ce1f6187a1