configure: set WEBP_HAVE_AVX2 when available

this is used to set WEBP_USE_AVX2 in files where the build flag won't be
used, i.e., dsp/enc.c, which enables VP8EncDspInitAVX2() to be called

Change-Id: I362f4ba39ca40d3e07a081292d5f743c649d9d7f
real fix for longjmp warning

the 'volatile' qualifier was at the wrong place

Patch by Paul Pluzhnikov

Change-Id: I26e6f311a0ccd145de640b3505fe92965389c1d9
Merge "real fix for longjmp warning"
enc_sse2: prevent signed int overflow

_mm_movemask_epi8 returns a 16-bit mask; << 16 can overflow a signed
int.

Change-Id: Ia0bb0804fe548fb9b0edb3695e82727506066cda
VP8RandomBits2: prevent signed int overflow

'diff' at its largest may be INT_MAX; << 1 of anything at or above
1 << 30 will overflow.

Change-Id: Idb2b5a9b55acc2f6d5e32be8baaebee3f89919ad
Merge "VP8RandomBits2: prevent signed int overflow"
Merge "configure: set WEBP_HAVE_AVX2 when available"
dsp/yuv: move sse2 functions to yuv_sse2.c

Change-Id: I2f037ff18e7cf07e8801f49b3a89c1e36ef73000
rename upsampling_mips32.c to yuv_mips32.c

matches yuv_sse2 added in;
bdfeeba dsp/yuv: move sse2 functions to yuv_sse2.c

Change-Id: I84f7d7858ca6851c956e8366a7c76b45070dcbc3
configure: test for -msse2

+ add a WEBP_HAVE_SSE2 to dsp.h

not all 32-bit toolchain configurations will have sse2 enabled by
default

Change-Id: I7c675e511581f93cf55c79f960fa7efa2df4987e
remove the special casing for res->first in VP8SetResidualCoeffs

if res->first = 1, coeffs[0]=0 because of quant.c:749 and line
added at quant.c:744
So, no need for the extra case.
Going forward, TrellisQuantizeBlock() should also be calling
a variant of VP8SetResidualCoeffs() to set the 'last' field.

also: fixes a warning for win64
    + slight speed-up

Change-Id: Ib24b611f7396d24aeb5b56dc74d5c39160f048f0
makefiles: define WEBP_HAVE_AVX2 when appropriate

more precisely: in makefile.unix and Makefile.vc when HAVE_AVX2=1

Change-Id: Ia93f373eef6595c016d650728f4f64f61764cd48
Merge changes I7c675e51,I84f7d785

* changes:
  configure: test for -msse2
  rename upsampling_mips32.c to yuv_mips32.c
configure: move config.h to src/webp/config.h

this change has the side-effect of using directory names in the
include, silencing a lint warning.

Change-Id: Ib91cf63a90534e32fadfa5c2372bfdb29f854d02
properly report back encoding error code in WebPFrameCacheAddFrame()

User-hook can fail but error was not propagated back.

Change-Id: Ic79f9543bf767634a127eccfef90af855ff15c34
Also: some ad-hoc clean-up and API dusting. More to come later...
Merge "configure: move config.h to src/webp/config.h"
fix orig_rect==NULL case

Change-Id: I3bb4fbebf59cba2a67681e74530fc0fe51f1958f
Merge "fix orig_rect==NULL case"
Add an interface abstraction to the WebP worker thread implementation

This allows custom implementations of threading mecanism.

Patch by Leonhard Gruenschloss.

Change-Id: Id8ea5917acd2f24fa8bce79748d1747de2751614
**/Makefile.am: remove unused AM_CPPFLAGS

only 1 of <lib>_CPPFLAGS and AM_CPPFLAGS is used, with the former
getting precedence when it's defined. configure's DEFAULT_INCLUDES is
covering what's necessary given the include paths are all source
relative.

Change-Id: I7d14076acd266b28a88a3d92bcc3d7165284d5f3