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 0f017b56f3995cc7439bd62b0980eb1cc56c856e)
Change-Id: I4da795623c71501e2fa426e8fba8fb2ffcbab58a
DitherRow() only checks this value, not 'skip_' so previously it was
uninitialized for these blocks.
(cherry picked from commit 66935fb9ee7a8fc4f59dd91fec34c03d4318784c)
Change-Id: I0f698b81854ee9d91edacb51c1e3bdab9cba96f2
similar to:
1ba61b0 enable NEON intrinsics in aarch64 builds
vtbl1_u8 is available everywhere but Xcode-based iOS arm64 builds, use
vtbl1q_u8 there.
performance varies based on the input, 1-3% on encode was observed
(cherry picked from commit 416e1cea9b7f7a626341005cced947add7da5c54)
Change-Id: Ifec35b37eb856acfcf69ed7f16fa078cd40b7034
Reported here: https://code.google.com/p/webp/issues/detail?id=239
At the beginning of method 'DecodeImageData', pixels up to
'dec->last_pixel_' are assumed to be already cached. So, at the end of
previous call to that method also, that assumption should hold true.
Hence, we should cache all pixels up to 'src' regardless of 'src_last'.
This affects lossless incremental decoding only, as that is when
src_last and src_end differ.
Note: alpha decoding is implicitly incremental, as alpha decoding of
only the rows 'y_end - y_start' happens during FinishRow() call. So, this bug
affects alpha decoding in non-incremental decoding flow as well.
This bug was introduced in: https://gerrit.chromium.org/gerrit/#/c/59716.
(cherry picked from commit 783a8cda2470f313f454538a149a82ea12171c74)
Change-Id: Ide6edfeb2609b02aff701e1bd9fd776da0a16be0
add additional return checks and asserts to avoid:
C6102: Using 'XXX' from failed function call ...
(cherry picked from commit 9b228b5416903cf425b60debeefb0a4c92464f90)
Change-Id: I51f5fa630324e0cd7b2d9fceefecb4f4021474b1
these are used on both sides of the setjmp().
(cherry picked from commit 7a191398caa4847c4eeba4375f2886e7377b1655)
Change-Id: I4a789bfb3a5d56946a22286c5a140008d90e1ba2
setjmp() is used in WritePNG().
(cherry picked from commit 775dfad297ab260e370d8f483fc34aecf2288178)
Change-Id: Iadd836272fc7d368d635c891507ce2a08c4d3dec
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 47d26be760d043fc2dde91b26e424b955054c0ef)
Change-Id: I5f1fad4c93745baf17d70178a5e66579ccd2b155
check enc->argb_ to quiet an msvs /analyze warning:
C6387: 'enc->argb_+y*width' could be '0': this does not adhere to the
specification for the function 'memcpy'.
(cherry picked from commit f0e0677b87b22006964a17ee1e8947f5b72ebb25)
Change-Id: I87544e92ee0d3ea38942a475c30c6d552f9877b7
and only use it on x86 / x64 where it's available.
has the side-effect of quieting a msvs /analyze warning:
C6001: Using uninitialized memory 'cpu_info'.
(cherry picked from commit 0de5f33e31036c04c020527c3984749bdd292675)
Change-Id: Iae51be3b22b2ee949cfc473eeea9fd9fb6b3c2cb
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 b6c0428e8ced79ace1ec8f3822a3583bc546b4fa)
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 205c7f26afe24d3ae6cf215dae8bcc18b491b334)
Change-Id: I4dc31a46191fa9e65659c9a5bf5de9605e93f2f5
allows the sources to be #include'd in some hackish builds (don't do
that!)
(cherry picked from commit 67f601cd4623019cec74b1fa4c3712a8d898b29b)
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 80d950d94ee8645d311150d645e880d108acf038)
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 a437694a17e2ee4c68bf0abba8e45e0dfd2a8e27)
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
this portion of the format was never finalized
(cherry picked from commit a66e66c79d0548fb1130b111fd9ea2498e700a1a)
Change-Id: I80aa1b27457a0e52b047c7284df2f58b181ca5d8
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 a3946b895633bf0421685af9a52df4a52ad10d30)
Change-Id: I67cda67c4f68e262a92d805a63cc1496374be063
based on the patch here:
https://github.com/pixelkind/webp-ios-build
(cherry picked from commit a96ccf8fdece8ea32d20406bd0c028545ec8534f)
Change-Id: Iaa346b751e5f18e8cf13a8e5c4064b0c2a3f5f6c
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 e4f4dddba3719faaeebe5bc74c2436756b966d44)
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 6638710b9e9f9e7d3b6b9b0ba60799576876e653)
Change-Id: Ief2b934353c336a75865c73c90cc3dc5e4f83913
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