webm/libwebp.git
39 hours agocwebp.1: fix quality description placement 38/71038/1 master
James Zern [Wed, 30 Jul 2014 18:08:27 +0000 (11:08 -0700)]
cwebp.1: fix quality description placement

move it above '-z'

Change-Id: I776aaee31a3702923324c7c4101e6628499cb819

2 days agoMerge tag 'v0.4.1' 25/71025/1
James Zern [Wed, 30 Jul 2014 01:00:23 +0000 (18:00 -0700)]
Merge tag 'v0.4.1'

libwebp 0.4.1
- 7/24/14: version 0.4.1
  This is a binary compatible release.
  * AArch64 (arm64) & MIPS support/optimizations
  * NEON assembly additions:
    - ~25% faster lossy decode / encode (-m 4)
    - ~10% faster lossless decode
    - ~5-10% faster lossless encode (-m 3/4)
  * dwebp/vwebp can read from stdin
  * cwebp/gif2webp can write to stdout
  * cwebp can read webp files; useful if storing sources as webp lossless

* tag 'v0.4.1':
  update ChangeLog
  iosbuild.sh: specify optimization flags
  update ChangeLog
  makefile.unix: add vwebp.1 to the dist target
  update ChangeLog
  gif2webp: dust up the help message
  remove -noalphadither option from README/vwebp.1
  update NEWS for the next release
  update AUTHORS
  bump version to 0.4.1
  restore mux API compatibility
  remove the !WEBP_REFERENCE_IMPLEMENTATION tweak in Put8x8uv
  restore encode API compatibility
  restore decode API compatibility
  gif2webp: fix compile with giflib 5.1.0
  gif2webp: simplify giflib version checking

Change-Id: Icf599f29bc6c0db757bc133aaddb3dbbbc316e08

3 days agoupdate ChangeLog 09/71009/1 0.4.1 v0.4.1
James Zern [Tue, 29 Jul 2014 00:22:32 +0000 (17:22 -0700)]
update ChangeLog

Change-Id: I3b930aa6cb72d17f41e52d645de1d9b2f3a0238b

3 days agoRecord & log the image pre-processing time. 08/71008/1
Vikas Arora [Mon, 28 Jul 2014 23:04:54 +0000 (16:04 -0700)]
Record & log the image pre-processing time.

Change-Id: If0ecec3046e87fe0021446a98f3e94c7e0576bb8

5 days agoiosbuild.sh: specify optimization flags 02/71002/1
James Zern [Sun, 27 Jul 2014 03:40:51 +0000 (20:40 -0700)]
iosbuild.sh: specify optimization flags

explicitly set '-O3 -DNDEBUG'. setting CFLAGS on the command line
overrides the default, resulting in -O0.

Change-Id: I213979f646b1444b1d8e0eb0bb58e9b2c3cc4dd3

7 days agoupdate ChangeLog 83/70983/1 v0.4.1-rc1
James Zern [Thu, 24 Jul 2014 18:54:02 +0000 (11:54 -0700)]
update ChangeLog

Change-Id: I5346984d2adff27b64304c154d720456549a9f24

8 days agomakefile.unix: add vwebp.1 to the dist target 77/70977/1
James Zern [Thu, 24 Jul 2014 06:41:47 +0000 (23:41 -0700)]
makefile.unix: add vwebp.1 to the dist target

Change-Id: Icf8b3853a9b175688c3b92d6f498ed44c58ca462

8 days agoupdate ChangeLog 75/70975/1
James Zern [Thu, 24 Jul 2014 06:05:49 +0000 (23:05 -0700)]
update ChangeLog

Change-Id: Ie9c2c7fe53321aefa17905c4322ad3373869ebad

8 days agoMerge "update NEWS for the next release" into 0.4.1
James Zern [Thu, 24 Jul 2014 06:02:19 +0000 (23:02 -0700)]
Merge "update NEWS for the next release" into 0.4.1

8 days agogif2webp: dust up the help message 74/70974/1
James Zern [Thu, 24 Jul 2014 03:02:43 +0000 (20:02 -0700)]
gif2webp: dust up the help message

* try to avoid trailing '.'
* rationalize capitalization

missed in:
0a8b886 dust up the help message

Change-Id: I6f80736cc8a2ff4f185f63d463a57d5bbf88a0db

8 days agoremove -noalphadither option from README/vwebp.1 73/70973/1
James Zern [Thu, 24 Jul 2014 02:52:45 +0000 (19:52 -0700)]
remove -noalphadither option from README/vwebp.1

+ vwebp's -help output

this is a future option; missed in:
793368e restore decode API compatibility

Change-Id: If920df2cf8de57ebad93a6b98830562149396d8d

8 days agoupdate NEWS for the next release 57/70957/2
James Zern [Wed, 23 Jul 2014 03:55:03 +0000 (20:55 -0700)]
update NEWS for the next release

Change-Id: If708c6b442816f43522b7e5b292f3cba266d614a

8 days agoMerge "update AUTHORS" into 0.4.1
James Zern [Thu, 24 Jul 2014 00:33:15 +0000 (17:33 -0700)]
Merge "update AUTHORS" into 0.4.1

8 days agoupdate AUTHORS 72/70972/1
James Zern [Thu, 24 Jul 2014 00:21:04 +0000 (17:21 -0700)]
update AUTHORS

Change-Id: I1eae9342df7bf4e8e98d5328b2e3eab7cba9fee8

8 days agobump version to 0.4.1 71/70971/1
James Zern [Thu, 24 Jul 2014 00:15:33 +0000 (17:15 -0700)]
bump version to 0.4.1

libwebp{,decoder} - 0.4.1
libwebp libtool - 5.1.0
libwebpdecoder libtool - 1.1.0

mux/demux - 0.2.1
libtool - 1.1.0

Change-Id: If593a198f802fd68c7dbbdbe0fc2612dbc44e2df

8 days agoMerge "restore mux API compatibility" into 0.4.1
James Zern [Thu, 24 Jul 2014 00:11:33 +0000 (17:11 -0700)]
Merge "restore mux API compatibility" into 0.4.1

8 days agorestore mux API compatibility 70/70970/1
James Zern [Wed, 23 Jul 2014 23:13:56 +0000 (16:13 -0700)]
restore mux API compatibility

protect WebPMuxSetCanvasSize w/a WEBP_MUX_ABI_VERSION check

Change-Id: I6b01af55ebb4cc4c860d3cbf43be722077896748

8 days agoremove the !WEBP_REFERENCE_IMPLEMENTATION tweak in Put8x8uv 69/70969/1
skal [Wed, 23 Jul 2014 20:59:33 +0000 (13:59 -0700)]
remove the !WEBP_REFERENCE_IMPLEMENTATION tweak in Put8x8uv

There's no speed diff, so better remove it altogether

Reported in https://code.google.com/p/webp/issues/detail?id=215

Change-Id: I991330de18bec340029d6df5fed0dfb4337e4662

8 days agoMerge changes If4debc15,I437a5d5f into 0.4.1
James Zern [Wed, 23 Jul 2014 20:56:27 +0000 (13:56 -0700)]
Merge changes If4debc15,I437a5d5f into 0.4.1

* changes:
  restore encode API compatibility
  restore decode API compatibility

9 days agorestore encode API compatibility 59/70959/2
James Zern [Wed, 23 Jul 2014 03:24:59 +0000 (20:24 -0700)]
restore encode API compatibility

protect WebPConfigLosslessPreset/WebPMemoryWriterClear w/a
WEBP_ENCODER_ABI_VERSION check

Change-Id: If4debc15fee172a3f18079bc2bd29eb8447bc14b

9 days agorestore decode API compatibility 58/70958/1
James Zern [Wed, 23 Jul 2014 03:03:52 +0000 (20:03 -0700)]
restore decode API compatibility

protect flip/alpha_dither w/a WEBP_DECODER_ABI_VERSION check

Change-Id: I437a5d5f78800f71b7e7e323faa321f946bf9515

9 days agogif2webp: fix compile with giflib 5.1.0 56/70956/1
James Zern [Wed, 23 Jul 2014 00:48:24 +0000 (17:48 -0700)]
gif2webp: fix compile with giflib 5.1.0

DGifCloseFile() added an error code output parameter
http://giflib.sourceforge.net/gif_lib.html#compatibility

fixes issue #209

original patch by grizzly dot nyo at gmail

Change-Id: I5554de2bd70dbfd95fd356424ad5fb800ac94592

9 days agogif2webp: simplify giflib version checking 55/70955/1
James Zern [Wed, 23 Jul 2014 00:41:55 +0000 (17:41 -0700)]
gif2webp: simplify giflib version checking

introduce LOCAL_GIF_PREREQ/VERSION similar to the GCC variants in dsp.

Change-Id: I00ba5d523047b3b1c14ade992172e75e69043eb3

10 days agoExtend MakeARGB32() to accept Alpha channel. 35/70935/1
Vikas Arora [Mon, 21 Jul 2014 21:48:22 +0000 (14:48 -0700)]
Extend MakeARGB32() to accept Alpha channel.

Change-Id: I31b8e2d085000e2e3687a373401e4f655f11fc42

10 days agoMerge "use explicit size of kErrorMessages[] arrays"
skal [Mon, 21 Jul 2014 20:37:49 +0000 (13:37 -0700)]
Merge "use explicit size of kErrorMessages[] arrays"

10 days agoMerge "Actuate memory stats for PRINT_MEMORY_INFO"
skal [Mon, 21 Jul 2014 20:31:15 +0000 (13:31 -0700)]
Merge "Actuate memory stats for PRINT_MEMORY_INFO"

10 days agoJPEG decoder: delay conversion to YUV to WebPEncode() call 34/70934/1
skal [Mon, 21 Jul 2014 20:26:22 +0000 (22:26 +0200)]
JPEG decoder: delay conversion to YUV to WebPEncode() call

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

10 days agouse explicit size of kErrorMessages[] arrays 28/70928/2
skal [Mon, 21 Jul 2014 13:44:43 +0000 (15:44 +0200)]
use explicit size of kErrorMessages[] arrays

Change-Id: If02864e3a07ae37814bf379bf347862cd2871bf4

10 days agoActuate memory stats for PRINT_MEMORY_INFO 27/70927/3
skal [Mon, 21 Jul 2014 12:22:26 +0000 (14:22 +0200)]
Actuate memory stats for PRINT_MEMORY_INFO

Change-Id: If7eac591b5205990ca452ca02b084a908482850a

10 days agoMerge "move WebPPictureInit to picture.c"
James Zern [Mon, 21 Jul 2014 18:47:17 +0000 (11:47 -0700)]
Merge "move WebPPictureInit to picture.c"

10 days agomove WebPPictureInit to picture.c 26/70926/2
skal [Mon, 21 Jul 2014 12:11:58 +0000 (14:11 +0200)]
move WebPPictureInit to picture.c

Change-Id: I4b8c352cfd47256d0c3827334a6942c1caf742f6

11 days agofix configure message for multi-thread 24/70924/1
Pascal Massimino [Mon, 21 Jul 2014 07:21:50 +0000 (00:21 -0700)]
fix configure message for multi-thread

it's not just decoding, but general multi-threading

Change-Id: I9d1b7e14f05b93a0eb92955526b7019c2b0df20c

11 days agoconfigure: check for _beginthreadex 23/70923/1
James Zern [Sun, 20 Jul 2014 21:56:37 +0000 (14:56 -0700)]
configure: check for _beginthreadex

fixes thread support detection in e.g., cross-compiles/mingw installs
without libpthread, the behavior is unchanged in mingw installs with
libpthread. in the latter case although libpthread is detected the
windows api (_beginthreadex) path is being used.

Change-Id: Ie5f39f15f380731a1006a2497496d627f08fa103

13 days agoreorder the YUVA->ARGB and ARGB->YUVA functions correctly 13/70913/2
Pascal Massimino [Fri, 18 Jul 2014 13:20:08 +0000 (06:20 -0700)]
reorder the YUVA->ARGB and ARGB->YUVA functions correctly

+ rework few loops
+ consolidate few error-checks / error-reporting
+ don't modify picture->colorspace in Import() for ARGB output

Change-Id: Iae6da9b50acc738c59b85c3ee64efbaf6af8bffc

2 weeks agoMerge "extract colorspace code from picture.c into picture_csp.c"
James Zern [Thu, 17 Jul 2014 00:01:28 +0000 (17:01 -0700)]
Merge "extract colorspace code from picture.c into picture_csp.c"

2 weeks agoextract colorspace code from picture.c into picture_csp.c 41/70841/6
Pascal Massimino [Mon, 14 Jul 2014 09:04:14 +0000 (02:04 -0700)]
extract colorspace code from picture.c into picture_csp.c

had to refactor few functions here and there.

Change-Id: I86fde6fec7c2fc7eb48f0ecf327dbbd2bd40b9d4

2 weeks agoMerge "configure: check for -Wformat-security"
pascal massimino [Wed, 16 Jul 2014 10:23:29 +0000 (03:23 -0700)]
Merge "configure: check for -Wformat-security"

2 weeks agoconfigure: check for -Wformat-security 69/70869/1
James Zern [Tue, 15 Jul 2014 05:52:15 +0000 (22:52 -0700)]
configure: check for -Wformat-security

from debian hardening:
https://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_FORMAT_.28gcc.2Fg.2B-.2B-_-Wformat_-Wformat-security_-Werror.3Dformat-security.29

Change-Id: I6729fb92e7286532151c2dde93b876476ed2af96

2 weeks agosplit monolithic picture.c into picture_{tools,psnr,rescale}.c 38/70838/1
Pascal Massimino [Sat, 12 Jul 2014 16:13:33 +0000 (09:13 -0700)]
split monolithic picture.c into picture_{tools,psnr,rescale}.c

Change-Id: Ia5eb5496e4337e5bac8203872c5b014cad21c4f9

2 weeks agodec_neon/TransformAC3: initialize vector w/vcreate 24/70824/2
James Zern [Fri, 11 Jul 2014 07:15:02 +0000 (00:15 -0700)]
dec_neon/TransformAC3: initialize vector w/vcreate

replaces {} initialization gnu-ism

Change-Id: I5bedcba1a9c21883207301f07456cc6a843199a0

3 weeks agogif2webp: Allow single-frame animations 13/70813/1
Urvang Joshi [Thu, 10 Jul 2014 22:21:05 +0000 (15:21 -0700)]
gif2webp: Allow single-frame animations

Some single-frame GIF images have a canvas larger than the frame rectangle. For
such images, we retain the ANMF, ANIM and VP8X chunks in the output WebP file.
This ensures that the full canvas width/height and frame offsets are retained.

Change-Id: I3ebae4893f953984de4072fda0938411de787a29

3 weeks agothread: remove harmless race on status_ in End() 85/70785/2
James Zern [Wed, 9 Jul 2014 02:53:28 +0000 (19:53 -0700)]
thread: remove harmless race on status_ in End()

if a thread was still doing work when End() was called there'd be a race
on worker->status_. in these cases, however, the specific value is
meaningless as it would be >= OK and the thread would have been shut
down properly, but we'll check 'impl_' instead to avoid any potential
TSan/DRD reports.

Change-Id: Ib93cbc226a099f07761f7bad765549dffb8054b1

3 weeks agoMerge "configure: check for __builtin_bswapXX()"
James Zern [Sat, 5 Jul 2014 20:43:43 +0000 (13:43 -0700)]
Merge "configure: check for __builtin_bswapXX()"

3 weeks agoconfigure: check for __builtin_bswapXX() 59/70759/2
James Zern [Fri, 4 Jul 2014 23:56:41 +0000 (16:56 -0700)]
configure: check for __builtin_bswapXX()

defines HAVE_BUILTIN_BSWAP16/32/64
updated endian_inl.h to have a non-configure fallback for gcc and clang
BSwap16() now uses __builtin_bswap16 if available

Change-Id: Ia04ee07b39303c4b247df96d84f298fb8a81f389

3 weeks agoconfigure: fix iOS builds 60/70760/1
James Zern [Sat, 5 Jul 2014 04:48:36 +0000 (21:48 -0700)]
configure: fix iOS builds

possibly other cross-compiles; avoids misusing -mavx2/-msse2 in these
cases by checking the usability of the associated intrinsics header
files.

iosbuild.sh has been broken since at least:
6e61a3a configure: test for -msse2

Change-Id: Ic650d9eec70f6a5de7d89997b3b425a4aa50ccd9

3 weeks agoVP8LFillBitWindow: enable fast path for 32-bit builds 58/70758/2
James Zern [Fri, 4 Jul 2014 20:40:53 +0000 (13:40 -0700)]
VP8LFillBitWindow: enable fast path for 32-bit builds

also reduce the load size from 64 to 32 bits as the top 32 bits are
being shifted away in the operation.

the change is neutral speed-wise on x86_64 as is the change in load size
on x86, but it gives a slight improvement on 32-bit arm.
x86 is improved ~13%, 32-bit arm ~3.7%
aarch64 is untested but will likely benefit as well.

Change-Id: Ibcb02a70f46f2651105d7ab571afe352673bef48

3 weeks agoVP8LFillBitWindow: respect WEBP_FORCE_ALIGNED 57/70757/1
James Zern [Fri, 4 Jul 2014 20:30:32 +0000 (13:30 -0700)]
VP8LFillBitWindow: respect WEBP_FORCE_ALIGNED

Change-Id: I23eddf01590de002efc21d8c7acc545a08fc3e48

3 weeks agoendian_inl.h: implement htoleXX with BSwapXX 54/70754/2
James Zern [Fri, 4 Jul 2014 07:50:34 +0000 (00:50 -0700)]
endian_inl.h: implement htoleXX with BSwapXX

+ s/htole(16|32)/HToLE$1/ to avoid any name conflicts

Change-Id: Ic1c84711557e50f73d83ca5aa2b3992ac6738216

3 weeks agoendian_inl.h: add BSwap16 53/70753/2
James Zern [Fri, 4 Jul 2014 07:41:14 +0000 (00:41 -0700)]
endian_inl.h: add BSwap16

+ use it in VP8LoadNewBytes()

Change-Id: I701d3652dc0cbd553852978702ef68c2657bca1c

4 weeks agoMerge "configure: add --enable-aligned"
James Zern [Fri, 4 Jul 2014 07:12:28 +0000 (00:12 -0700)]
Merge "configure: add --enable-aligned"

4 weeks agoconfigure: add --enable-aligned 52/70752/2
James Zern [Fri, 4 Jul 2014 06:06:06 +0000 (23:06 -0700)]
configure: add --enable-aligned

forces aligned memory reads (via memcpy) in the VP8 bit reader, useful
for platforms that don't support unaligned loads.

Change-Id: Ifa44a9a1677fbdc6a929520f9340b7e3fcbd6692

4 weeks agoMerge "configure: support WIC + OpenGL under mingw64"
James Zern [Fri, 4 Jul 2014 06:24:16 +0000 (23:24 -0700)]
Merge "configure: support WIC + OpenGL under mingw64"

4 weeks agoremove experimental YUV444 YUV422 and YUV400 code 49/70749/4
Pascal Massimino [Thu, 3 Jul 2014 20:20:06 +0000 (13:20 -0700)]
remove experimental YUV444 YUV422 and YUV400 code

(never used)

Change-Id: I12a886703592133939607df05132e9b498f916c1

4 weeks agoconfigure: support WIC + OpenGL under mingw64 51/70751/1
James Zern [Sat, 28 Jun 2014 19:10:31 +0000 (12:10 -0700)]
configure: support WIC + OpenGL under mingw64

fixes issue #211

original patch by grizzly dot nyo at gmail

Change-Id: Ie7bf63d24c112e7e351979da4bebcb690a831c5d

4 weeks agoconfigure.ac: add AC_C_BIGENDIAN 48/70748/3
James Zern [Sat, 28 Jun 2014 19:27:17 +0000 (12:27 -0700)]
configure.ac: add AC_C_BIGENDIAN

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

4 weeks agoendian_inl.h: add BSwap64 47/70747/2
James Zern [Thu, 3 Jul 2014 18:21:24 +0000 (11:21 -0700)]
endian_inl.h: add BSwap64

Change-Id: I66672b770500294b8f4ee8fa4bf1dfff1119dbe6

4 weeks agoendian_inl.h: add BSwap32 46/70746/2
James Zern [Thu, 3 Jul 2014 18:21:24 +0000 (11:21 -0700)]
endian_inl.h: add BSwap32

Change-Id: I96e3ae49659307024415d64587e6312888a0070f

4 weeks agoutils: add endian_inl.h 45/70745/2
James Zern [Thu, 3 Jul 2014 17:41:37 +0000 (10:41 -0700)]
utils: add endian_inl.h

moves the following to this header:
- htole*() definitions from bit_writer.c
- __BIG_ENDIAN__ fallback define from bit_reader_inl.h

Change-Id: I7fff59543f08a70bf8f9ddac849b72ed290471b1

4 weeks agoMerge "make alpha-detection loop in IsKeyFrame() in good x/y order"
Pascal Massimino [Thu, 3 Jul 2014 05:38:41 +0000 (22:38 -0700)]
Merge "make alpha-detection loop in IsKeyFrame() in good x/y order"

4 weeks agomake alpha-detection loop in IsKeyFrame() in good x/y order 39/70739/1
Pascal Massimino [Tue, 24 Jun 2014 20:20:29 +0000 (20:20 +0000)]
make alpha-detection loop in IsKeyFrame() in good x/y order

Change-Id: Ifeeb855e66c7b6b849e8584787dc24e7371b1e67

4 weeks agolossless: Remove unaligned read warning 38/70738/1
Vikas Arora [Wed, 2 Jul 2014 20:39:47 +0000 (20:39 +0000)]
lossless: Remove unaligned read warning

(typecast uint32 pointer to uint64).
The proposed change is little (0.05%) slower but avoids uint32 to uint64
pointer conversion.

Change-Id: I6b8828077ea1324fabd04bfa7e7439e324776250

4 weeks agoMerge "configure.ac: add an autoconf version prerequisite"
James Zern [Thu, 3 Jul 2014 02:26:39 +0000 (19:26 -0700)]
Merge "configure.ac: add an autoconf version prerequisite"

4 weeks agoconfigure.ac: add an autoconf version prerequisite 19/70719/1
James Zern [Wed, 2 Jul 2014 03:02:58 +0000 (20:02 -0700)]
configure.ac: add an autoconf version prerequisite

ax_pthread.m4 uses AS_CASE() which was added in 2.60

Change-Id: Ifafe2271a8814c734a20d24048e9b24925e13077

4 weeks agoneon: normalize vdup_n_* usage 97/70697/1
James Zern [Tue, 1 Jul 2014 07:55:05 +0000 (00:55 -0700)]
neon: normalize vdup_n_* usage

with constants, prefer this over vmov_n_* or vcreate_*

Change-Id: Ia84b2a82faea58e2626211a7e2257e0ba4af358a

4 weeks agoMerge changes I0da7b3d3,Idad2f278,I4accc305
James Zern [Tue, 1 Jul 2014 07:48:38 +0000 (00:48 -0700)]
Merge changes I0da7b3d3,Idad2f278,I4accc305

* changes:
  neon: add INIT_VECTOR4
  neon: add INIT_VECTOR3
  neon: add INIT_VECTOR2

4 weeks agoMerge "fix (uncompiled) typo"
skal [Tue, 1 Jul 2014 07:29:19 +0000 (00:29 -0700)]
Merge "fix (uncompiled) typo"

4 weeks agoneon: add INIT_VECTOR4 95/70695/3
James Zern [Sun, 29 Jun 2014 20:40:45 +0000 (13:40 -0700)]
neon: add INIT_VECTOR4

used to initialize NxMx4 vector types
replaces initialization via '{{ }}' gnu-ism.

Change-Id: I0da7b3d321f3d48579b7863fb2e4d3f449ae7f5e

4 weeks agoneon: add INIT_VECTOR3 94/70694/2
James Zern [Sun, 29 Jun 2014 20:40:45 +0000 (13:40 -0700)]
neon: add INIT_VECTOR3

used to initialize NxMx3 vector types
replaces initialization via '{{ }}' gnu-ism.

Change-Id: Idad2f278ab104cf2cc650517194258ce3cfb37b4

4 weeks agoneon: add INIT_VECTOR2 93/70693/2
James Zern [Sun, 29 Jun 2014 20:40:45 +0000 (13:40 -0700)]
neon: add INIT_VECTOR2

used to initialize NxMx2 vector types
replaces initialization via '{{ }}' gnu-ism.

Change-Id: I4accc305c7dd4c886b63c22e38890b629bffb139

4 weeks agoadd WebPMuxSetCanvasSize() to the mux API 76/70676/1
skal [Mon, 30 Jun 2014 05:00:49 +0000 (07:00 +0200)]
add WebPMuxSetCanvasSize() to the mux API

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

4 weeks agofix (uncompiled) typo 57/70657/1
skal [Fri, 27 Jun 2014 15:02:24 +0000 (17:02 +0200)]
fix (uncompiled) typo

output was not properly descaled when compiled
without USE_GAMMA_COMPRESSION

Change-Id: I5282c9573cfcfbef4be22b6b3cdec7e16cad9c1c

5 weeks agoremove unused 'shift' argument and QFIX2 define 37/70637/2
Pascal Massimino [Thu, 26 Jun 2014 07:12:51 +0000 (00:12 -0700)]
remove unused 'shift' argument and QFIX2 define

this will remove a warning about the shift amount not being
an immediate (=constant).

Change-Id: Ie9a00fefdb9a07ec8994fb113f24234518bc878a
Also: fix the NULL sharpen argument mismatch.

5 weeks agoMerge "VP8LoadNewBytes: use __builtin_bswap32 if available"
pascal massimino [Wed, 25 Jun 2014 09:15:17 +0000 (02:15 -0700)]
Merge "VP8LoadNewBytes: use __builtin_bswap32 if available"

5 weeks agoMerge "Fix handling of weird GIF with canvas dimension 0x0"
skal [Wed, 25 Jun 2014 09:14:54 +0000 (02:14 -0700)]
Merge "Fix handling of weird GIF with canvas dimension 0x0"

5 weeks agoVP8LoadNewBytes: use __builtin_bswap32 if available 27/70627/2
James Zern [Wed, 25 Jun 2014 04:13:42 +0000 (21:13 -0700)]
VP8LoadNewBytes: use __builtin_bswap32 if available

mostly to balance the use of bswap64, some gcc platforms are already
interpreting the default case the same

Change-Id: Icf860f55b3f16bea349a7d721e6d6abeeb4e5cf3

5 weeks agoFix handling of weird GIF with canvas dimension 0x0 17/70617/2
skal [Tue, 24 Jun 2014 15:34:45 +0000 (17:34 +0200)]
Fix handling of weird GIF with canvas dimension 0x0

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

5 weeks agoMerge "rename interface -> winterface"
Pascal Massimino [Tue, 24 Jun 2014 07:44:11 +0000 (00:44 -0700)]
Merge "rename interface -> winterface"

5 weeks agoFix logic in the GIF LOOP-detection parsing 09/70609/1
skal [Mon, 23 Jun 2014 21:26:36 +0000 (23:26 +0200)]
Fix logic in the GIF LOOP-detection parsing

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

5 weeks agorename interface -> winterface 08/70608/1
Pascal Massimino [Mon, 23 Jun 2014 21:21:22 +0000 (14:21 -0700)]
rename interface -> winterface

to avoid name clash on win32

Change-Id: Ia4ad3d4528df4652bab803f9a9544e21e6c4b177

5 weeks agomake WebPSetWorkerInterface() check its arguments 00/70600/1
skal [Mon, 23 Jun 2014 05:39:56 +0000 (07:39 +0200)]
make WebPSetWorkerInterface() check its arguments

Change-Id: I522c58cfe05e864a50cacb58bdfa14d5369c6d60

6 weeks agoMerge "cosmetics: update thread.h comments"
James Zern [Fri, 20 Jun 2014 06:23:06 +0000 (23:23 -0700)]
Merge "cosmetics: update thread.h comments"

6 weeks agoMerge "dust up the help message"
James Zern [Fri, 20 Jun 2014 06:12:02 +0000 (23:12 -0700)]
Merge "dust up the help message"

6 weeks agodust up the help message 48/70548/3
skal [Wed, 18 Jun 2014 14:45:34 +0000 (16:45 +0200)]
dust up the help message

* try to avoid trailing '.'
* rationalize capitalization

Change-Id: I50939baf01b1ab44d3031eee916ba51f2338af8a

6 weeks agocosmetics: update thread.h comments 77/70577/1
James Zern [Fri, 20 Jun 2014 02:29:41 +0000 (19:29 -0700)]
cosmetics: update thread.h comments

WebPWorker*() are now part of WebPWorkerInterface; refer to them with
unadorned names.

Change-Id: Iae1dd59f1e545cba6dd8c18f26ba60eb9a84419b

6 weeks agoQuantizeBlock SSE2 Optimization: 46/70546/5
levytamar82 [Wed, 18 Jun 2014 11:45:51 +0000 (04:45 -0700)]
QuantizeBlock SSE2 Optimization:

Another store to load forward block was detected coming from the function
FTransform.
FTransform save the output data 4 times 8 bytes each. when this data is
later being loaded by the QuantizeBlock function in one chunk of 16 bytes
that caused a store to load forward block.
The fix was done in the FTransform function where each two consecutive 8 bytes
were merged into one 16 bytes register and saved into the memory.
This fix gives ~21% function level gain and 1.6% user level gain.

Change-Id: Idc27c307d5083f3ebe206d3ca19059e5bd465992

6 weeks agoMerge "webpmux: warn when odd frame offsets are used"
James Zern [Wed, 18 Jun 2014 19:18:09 +0000 (12:18 -0700)]
Merge "webpmux: warn when odd frame offsets are used"

6 weeks agoMerge changes Id8edd3c1,Id418eb96,Ide05e3be
James Zern [Wed, 18 Jun 2014 19:17:15 +0000 (12:17 -0700)]
Merge changes Id8edd3c1,Id418eb96,Ide05e3be

* changes:
  examples/Android.mk: add cwebp
  Android.mk: move dwebp to examples/Android.mk
  Android.mk: add ENABLE_SHARED flag

6 weeks agowebpmux: warn when odd frame offsets are used 41/70541/2
James Zern [Wed, 18 Jun 2014 06:21:49 +0000 (23:21 -0700)]
webpmux: warn when odd frame offsets are used

offsets are stored as (x/2, y/2)

Change-Id: Ic8f727ab7996a84c1f8c57f4f6dbaf8701bf8eae

6 weeks agoMerge "add alpha dithering for lossy"
skal [Wed, 18 Jun 2014 14:32:24 +0000 (07:32 -0700)]
Merge "add alpha dithering for lossy"

6 weeks agoexamples/Android.mk: add cwebp 44/70544/1
James Zern [Wed, 18 Jun 2014 06:37:00 +0000 (23:37 -0700)]
examples/Android.mk: add cwebp

Change-Id: Id8edd3c17d82e4ab0087c315cd3ead1cb285e714

6 weeks agoAndroid.mk: move dwebp to examples/Android.mk 43/70543/1
James Zern [Wed, 18 Jun 2014 06:33:10 +0000 (23:33 -0700)]
Android.mk: move dwebp to examples/Android.mk

this depends on the top-level Android.mk for shared flags

Change-Id: Id418eb9639e839518a921ffcb6a376ce10aafbd2

6 weeks agoAndroid.mk: add ENABLE_SHARED flag 42/70542/1
James Zern [Wed, 18 Jun 2014 06:30:20 +0000 (23:30 -0700)]
Android.mk: add ENABLE_SHARED flag

builds libwebp.so instead of libwebp.a
$ ndk-build ENABLE_SHARED=1

Change-Id: Ide05e3be4f9848852e6d7e9d99abe11344419241

6 weeks agomuxread: fix out of bounds read 27/70527/1
James Zern [Tue, 17 Jun 2014 19:50:12 +0000 (19:50 +0000)]
muxread: fix out of bounds read

ChunkVerifyAndAssign() expects to have at least 8 bytes to work with,
but was only checking for the presence of 4.

Change-Id: I8456b15d872de24a90c1e8fbfba463391ced5c7f

6 weeks agoMakefile.vc: fix CFLAGS assignment w/HAVE_AVX2=1 23/70523/1
James Zern [Tue, 17 Jun 2014 03:23:20 +0000 (20:23 -0700)]
Makefile.vc: fix CFLAGS assignment w/HAVE_AVX2=1

there's no '+=' operator

Change-Id: Icd6fe684bd468827339f0d73643b325c8477d5c5

6 weeks agoadd alpha dithering for lossy 15/68215/6
skal [Fri, 13 Jun 2014 22:06:16 +0000 (00:06 +0200)]
add alpha dithering for lossy

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

7 weeks agoMerge "make error-code reporting consistent upon malloc failure"
skal [Fri, 13 Jun 2014 07:25:30 +0000 (00:25 -0700)]
Merge "make error-code reporting consistent upon malloc failure"

7 weeks agomake error-code reporting consistent upon malloc failure 77/70477/3
skal [Fri, 13 Jun 2014 06:45:12 +0000 (08:45 +0200)]
make error-code reporting consistent upon malloc failure

Sometimes, the error-code was not set correctly.
We now return OUT_OF_MEMORY everytimes it's appropriate
(tested using MALLOC_FAIL_AT mechanism)

Took the opportunity to clean-up the code and dust the error
code returned (some were erroneously set to INVALID_CONFIGURATION)

Change-Id: I56f7331e2447557b3dd038e245daace4fc82214c

7 weeks ago**/Makefile.am: remove unused AM_CPPFLAGS 76/70476/2
James Zern [Thu, 12 Jun 2014 06:23:13 +0000 (23:23 -0700)]
**/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

7 weeks agoAdd an interface abstraction to the WebP worker thread implementation 78/70478/1
skal [Thu, 12 Jun 2014 09:35:44 +0000 (11:35 +0200)]
Add an interface abstraction to the WebP worker thread implementation

This allows custom implementations of threading mecanism.

Patch by Leonhard Gruenschloss.

Change-Id: Id8ea5917acd2f24fa8bce79748d1747de2751614

7 weeks agoMerge "fix orig_rect==NULL case"
Pascal Massimino [Thu, 12 Jun 2014 07:48:30 +0000 (00:48 -0700)]
Merge "fix orig_rect==NULL case"