explicitly add immintrin.h instead of transitively picking it up via
windows.h presumably. makes the code easier to move around.
(cherry picked from commit b6c0428e8c)
Change-Id: If70d5143ac94fc331da763ce034358858e460e06
reported in https://code.google.com/p/webp/issues/detail?id=237
An empty partition #0 should be indicative of a bitstream error.
The previous code was correct, only an assert was triggered in debug mode.
But we might as well handle the case properly right away...
(cherry picked from commit 205c7f26af)
Change-Id: I4dc31a46191fa9e65659c9a5bf5de9605e93f2f5
allows the sources to be #include'd in some hackish builds (don't do
that!)
(cherry picked from commit 67f601cd46)
Conflicts:
src/dsp/alpha_processing.c
src/dsp/argb.c
src/dsp/dec.c
src/dsp/enc.c
src/dsp/lossless.c
src/dsp/upsampling.c
src/dsp/yuv.c
Change-Id: I0c7a43acbebd0e2d5068845e6daa8ce47361cd91
can be useful, not sure they are a subset of the flags we
use already...
(cherry picked from commit 80d950d94e)
Change-Id: Iec742a99427a791d9527368302a1136df2ff96cd
we compare the current VP8GetCPUInfo pointer to the last used.
This is less code overall and each implementation is still
testable separately (by just changing VP8GetCPUInfo, but not
a separate threads!)
(cherry picked from commit a437694a17)
Conflicts:
src/dsp/alpha_processing.c
src/dsp/argb.c
src/dsp/dec.c
src/dsp/enc.c
src/dsp/lossless.c
src/dsp/upsampling.c
src/dsp/yuv.c
Change-Id: Ia13fa8ffc4561a884508f6ab71ed0d1b9f1ce59b
check for __apple_build_version__ to distinguish the two; a version
check could work as Apple bumped Xcode's to 5.x/6.x, but it's unclear
how upstream will deal with their versioning as they go 3.6+, so avoid
it for now.
(cherry picked from commit a3946b8956)
Change-Id: I67cda67c4f68e262a92d805a63cc1496374be063
This wasn't working for this specific scenario:
- Encode an RGBA 'pic' (with trivial alpha) using lossy encoding.
(so that pic->a == NULL after import happens).
- Modify the 'pic->argb' so that it has non-trivial alpha.
- Encode the same 'pic' again.
This used to fail to encode alpha data as pic->a == NULL.
(cherry picked from commit e4f4dddba3)
Change-Id: Ieaaa7bd09825c42f54fbd99e6781d98f0b19cc0c
at least clang 3.[45] in c++ mode with -std=c++11 define __STRICT_ANSI__
this change set WEBP_INLINE to inline for c++/non-strict-ansi/> c99
fixes crbug.com/428383
(cherry picked from commit 6638710b9e)
Change-Id: Ief2b934353c336a75865c73c90cc3dc5e4f83913
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
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 0ce27e715e)
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 c8a87bb62d)
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 9f7d9e6dda)
Change-Id: Ie5603c9e30cb52114b372509e183febbf679a69a
This prevents the 'alpha-leak' reported in issue #220
Speed-diff is kept minimal.
(cherry picked from commit c792d4129a)
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 0cc811d7d6)
Change-Id: I00fc8e943d8a0c1578dcd718f3e74dec7de4ed61
This is the opposite of WebPDispatchAlpha
+ Implement the SSE2 version
(cherry picked from commit cddd334050)
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 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
use --ldflags over --prefix + --libs combination
based on comment in issue #180.
(cherry picked from commit be70b86c57)
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 e0a9932161)
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 d3242aee16)
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 a9decb5584)
Change-Id: I628e2c39c64f10c443fb51f86b1f5919cc9fd299
We only need to set BITSTREAM_ERROR if !ok.
(cherry picked from commit 3fea6a28da)
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 187d379db6)
Change-Id: I5f3f509c635ce43a5e7c23f5d0f0c8329a5f24b7