webm/libwebp.git
27 hours agoExUtilReadFromStdin: (windows) open stdin in bin mode 01/71401/1 master
James Zern [Sat, 30 Aug 2014 02:16:54 +0000 (19:16 -0700)]
ExUtilReadFromStdin: (windows) open stdin in bin mode

fixes input/decode from stdin in the examples

Change-Id: Ie8052da758a9ef64477501b709408236d258da82

27 hours agowebpmux: (windows) open stdout in binary mode 00/71400/1
James Zern [Sat, 30 Aug 2014 02:11:41 +0000 (19:11 -0700)]
webpmux: (windows) open stdout in binary mode

prevents corrupt output. related to issue #217

Change-Id: I6f0dac8131127717ba72b0709fb35d421ab41acb

28 hours agocwebp: (windows) open stdout in binary mode 99/71399/1
James Zern [Sat, 30 Aug 2014 02:11:41 +0000 (19:11 -0700)]
cwebp: (windows) open stdout in binary mode

prevents corrupt output. fixes issue #217

Change-Id: If90afb441636144300da66d64f0e7f78505b4060

28 hours agoexample_util: add ExUtilSetBinaryMode 98/71398/1
James Zern [Sat, 30 Aug 2014 02:07:17 +0000 (19:07 -0700)]
example_util: add ExUtilSetBinaryMode

use it in dwebp when dealing with 'stdout'

Change-Id: I8b8a0b0de9e73731e913ac3c83b5e2b33c693175

32 hours agowebpmux man page: Clarify some title, descriptions and examples 95/71395/2
Urvang Joshi [Fri, 29 Aug 2014 20:13:49 +0000 (13:13 -0700)]
webpmux man page: Clarify some title, descriptions and examples

Based on the feedback here:
https://groups.google.com/a/webmproject.org/d/msg/webp-discuss/qY6rWJLqRTY/pF8oSj8DOGYJ

Change-Id: I9119ea8e211ffb269026010e3c590385bc6a9f17

2 days agoaddress cosmetic comments from patch #71380 90/71390/1
skal [Fri, 29 Aug 2014 01:08:00 +0000 (18:08 -0700)]
address cosmetic comments from patch #71380

Change-Id: Iaba301b9e77aa4febe0efe1e6016fab42d5589f3

2 days agoSpeed up Huffman decoding for lossless 80/71380/4
skal [Thu, 28 Aug 2014 15:35:19 +0000 (08:35 -0700)]
Speed up Huffman decoding for lossless

speed-up is ~1.6% for photographic image to 10% for graphical image
(1000 images corpus was sped up by 5.8 %)

Code by akramarz@google.com and jyrki@google.com

Change-Id: Iceb2e50e6cc761b9315a3865d22ec9d19b8011c6

3 days agodsp/lossless: workaround gcc-4.9 bug on arm 79/71379/2
James Zern [Fri, 18 Jul 2014 00:48:42 +0000 (17:48 -0700)]
dsp/lossless: workaround gcc-4.9 bug on arm

force Sub3() to not be inlined, otherwise the code in Select() will be
incorrect.
https://android-review.googlesource.com/#/c/102511

Change-Id: I90ae58bf3e6cc92ca9897f69974733d562e29aaf

3 days agodsp.h: collect gcc/clang version test macros 78/71378/1
James Zern [Thu, 28 Aug 2014 02:33:09 +0000 (19:33 -0700)]
dsp.h: collect gcc/clang version test macros

endian_inl.h already relies on dsp.h, grab the definitions from there.

Change-Id: I445f7d0631723043c55da1070498f89965bec7b1

3 days agomove static initialization of WebPYUV444Converters[] to the Init function. 70/71370/2
skal [Wed, 27 Aug 2014 14:55:34 +0000 (07:55 -0700)]
move static initialization of WebPYUV444Converters[] to the Init function.

Split initialization of YUV444Converters[] out of Upsamplers init.

update test for NULL function pointers

Change-Id: I9603f54250f90c85a12ffbecfd6c59e9b06c47e0

3 days agoMerge "fix indentation"
skal [Wed, 27 Aug 2014 14:52:36 +0000 (07:52 -0700)]
Merge "fix indentation"

4 days agoCode cleanup for HistogramRemap. 63/71363/1
Vikas Arora [Tue, 26 Aug 2014 22:44:04 +0000 (15:44 -0700)]
Code cleanup for HistogramRemap.

Avoid call to HistogramAddThresh when there's only one Histogram image.
Change-Id: I43b09e8e2d218c95969567034224777dcce37ab9

4 days agofix indentation 54/71354/2
skal [Tue, 26 Aug 2014 06:52:09 +0000 (23:52 -0700)]
fix indentation

Change-Id: I2294a6c83e5f345f64bd5120b91532e00ed6c543

5 days agoMerge "add a DispatchAlpha() for SSE2 that handles 8 pixels at a time"
skal [Tue, 26 Aug 2014 05:43:42 +0000 (22:43 -0700)]
Merge "add a DispatchAlpha() for SSE2 that handles 8 pixels at a time"

5 days agoadd a DispatchAlpha() for SSE2 that handles 8 pixels at a time 51/71351/2
skal [Tue, 26 Aug 2014 03:55:28 +0000 (20:55 -0700)]
add a DispatchAlpha() for SSE2 that handles 8 pixels at a time

Only slightly faster.

Change-Id: Ie2e57e6a0950166124cf1075c6c9b45b7abdad8c

5 days agointroduce VP8EncQuantize2Blocks to quantize two blocks at a time 42/71342/2
skal [Mon, 25 Aug 2014 20:16:14 +0000 (13:16 -0700)]
introduce VP8EncQuantize2Blocks to quantize two blocks at a time

No speed diff for now. We might reorder better the instructions later,
to speed things up.

Change-Id: I1949525a0b329c7fd861b8dbea7db4b23d37709c

9 days agoMIPS: dspr2: added optimization for EmitAlphaRGB 91/71291/6
Djordje Pesut [Thu, 21 Aug 2014 17:26:18 +0000 (19:26 +0200)]
MIPS: dspr2: added optimization for EmitAlphaRGB

New dsp function: WebPDispatchAlpha()

Change-Id: I48e539d22471279ec75185759bc68d18b127f716

10 days agoenc_neon: enable QuantizeBlock for aarch64 85/71285/1
James Zern [Wed, 20 Aug 2014 06:59:03 +0000 (23:59 -0700)]
enc_neon: enable QuantizeBlock for aarch64

vtbl4_u8 is available everywhere except iOS arm64: use vtbl2q_u8 there
with a corresponding change in the load.

Change-Id: Ib84212dda3c7875348282726c29e3b79b78b0eac

11 days agoMIPS: mips32: code rebase 51/71251/1
Djordje Pesut [Tue, 19 Aug 2014 13:10:30 +0000 (15:10 +0200)]
MIPS: mips32: code rebase

mips code rebased to be same as C code
from commit I8c29a8a0285076cb3423b01ffae9fcc465da6a81

Change-Id: I3848f4ce43387c3a62b336606498779f7b07ec44

11 days agoMIPS: dspr2: added optimizations for VP8YuvTo* 12/71212/6
Djordje Pesut [Fri, 15 Aug 2014 09:00:32 +0000 (11:00 +0200)]
MIPS: dspr2: added optimizations for VP8YuvTo*

VP8YuvToRgb
VP8YuvToBgr
VP8YuvToRgb565
VP8YuvToRgba4444
VP8YuvToArgb
VP8YuvToBgra
VP8YuvToRgba

Change-Id: I22212a125d890e1fd28388fec906a1a5c07ff386

12 days agoSmartRGBYUV: fix odd-width problem with pixel replication 46/71246/1
skal [Mon, 18 Aug 2014 21:29:37 +0000 (14:29 -0700)]
SmartRGBYUV: fix odd-width problem with pixel replication

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.

Change-Id: Iac12e7a3d74590f12fe8eeb1830b9891e61439f6

2 weeks agofix some MSVC64 warning about float conversion 33/71233/1
Pascal Massimino [Sat, 16 Aug 2014 07:15:29 +0000 (00:15 -0700)]
fix some MSVC64 warning about float conversion

Change-Id: I27ab27fc15033d27d0505729f6275fb542c8d473

2 weeks agocpu: check for _MSC_VER before using msvc inline asm 26/71226/1
James Zern [Fri, 15 Aug 2014 22:11:40 +0000 (15:11 -0700)]
cpu: check for _MSC_VER before using msvc inline asm

_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.

Change-Id: I395679bcfc43e94d308d1ceb0c0fbf932b2c378c

2 weeks agofaster RGB->YUV conversion function (~7% speedup) 15/71215/1
skal [Fri, 15 Aug 2014 18:13:25 +0000 (11:13 -0700)]
faster RGB->YUV conversion function (~7% speedup)

with a special case for dithering==0., it gets somewhat faster on x86
thanks to inlining.

Also, less macros.

Change-Id: Ic2f2bf6718310743bb40cef2104fa759a073e6d5

2 weeks agoMerge "Add smart RGB->YUV conversion option -pre 4"
skal [Fri, 15 Aug 2014 18:07:49 +0000 (11:07 -0700)]
Merge "Add smart RGB->YUV conversion option -pre 4"

2 weeks agoAdd smart RGB->YUV conversion option -pre 4 13/71213/1
skal [Fri, 15 Aug 2014 17:55:09 +0000 (10:55 -0700)]
Add smart RGB->YUV conversion option -pre 4

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.

Change-Id: Ia50a8c30134e4cab8a7d3eb70aef13ce1f6187a1

2 weeks agoMIPS: dspr2: added optimization for (un)filters 96/71196/4
Djordje Pesut [Mon, 4 Aug 2014 14:22:10 +0000 (16:22 +0200)]
MIPS: dspr2: added optimization for (un)filters

HorizontalFilter
VerticalFilter
GradientFilter
HorizontalUnfilter
VerticalUnfilter
GradientUnfilter

Change-Id: I54055b4767c37719691811072e95bf79c1f627b1

2 weeks agoMerge "configure: add work around for gcc-4.9 aarch64 bug"
James Zern [Thu, 14 Aug 2014 00:38:58 +0000 (17:38 -0700)]
Merge "configure: add work around for gcc-4.9 aarch64 bug"

2 weeks agoMIPS: dspr2: Optimization of some simple point-sampling functions 73/71173/3
Djordje Pesut [Tue, 12 Aug 2014 09:47:36 +0000 (11:47 +0200)]
MIPS: dspr2: Optimization of some simple point-sampling functions

Change-Id: I6a4ab29bd0cc5a2951a8882cf9997032dc38bd79

2 weeks agoconfigure: add work around for gcc-4.9 aarch64 bug 72/71172/3
James Zern [Tue, 12 Aug 2014 02:41:05 +0000 (19:41 -0700)]
configure: add work around for gcc-4.9 aarch64 bug

add -frename-registers to avoid:
src/dsp/dec_neon.c:1234:1: internal
compiler error: in simplify_const_unary_operation, at
simplify-rtx.c:1539

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62040
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61622
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757738

Change-Id: I52fb3a29ac30b82b27da05378bdb495ddebb97d7

2 weeks agoMIPS: mips32r2: added optimization for BSwap32 48/71148/2
Djordje Pesut [Mon, 11 Aug 2014 16:11:40 +0000 (18:11 +0200)]
MIPS: mips32r2: added optimization for BSwap32

gcc < 4.8.3 doesn't translate bswap optimally.
use optimized version always

Change-Id: I979ea26ad6dc0166d3d2f39c4148eb8adfb7ddec

2 weeks agoUpdate PATENTS to reflect s/VP8/WebM/g 66/71166/1
Lou Quillio [Mon, 11 Aug 2014 19:55:14 +0000 (12:55 -0700)]
Update PATENTS to reflect s/VP8/WebM/g

Sync with http://www.webmproject.org/license/additional/

modified:   PATENTS

Change-Id: I9f7af36fdcf57a82311363a043707b181832fc18

2 weeks agoMerge "MIPS: detect mips32r6 and disable mips32r1 code"
Djordje Pesut [Mon, 11 Aug 2014 12:44:01 +0000 (05:44 -0700)]
Merge "MIPS: detect mips32r6 and disable mips32r1 code"

3 weeks agoMIPS: detect mips32r6 and disable mips32r1 code 34/71134/1
Djordje Pesut [Fri, 8 Aug 2014 15:08:06 +0000 (17:08 +0200)]
MIPS: detect mips32r6 and disable mips32r1 code

Change-Id: Id1325c789a990c9a8704e84e99a22d580303eb8a

3 weeks agoCorrectly use the AC_CANONICAL_* macros 06/71106/2
Timothy Gu [Wed, 6 Aug 2014 03:55:04 +0000 (20:55 -0700)]
Correctly use the AC_CANONICAL_* macros

http://www.gnu.org/software/autoconf/manual/autoconf.html#Using-System-Type

Change-Id: I40a13e84f5266ed20bc4db098502b1610ab71206
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
3 weeks agoMerge "cosmetics"
pascal massimino [Wed, 6 Aug 2014 19:30:08 +0000 (12:30 -0700)]
Merge "cosmetics"

3 weeks agocosmetics 95/71095/2
James Zern [Wed, 6 Aug 2014 05:22:29 +0000 (07:22 +0200)]
cosmetics

fix some indent/whitespace, remove a few duplicate includes, extra
semi-colons

Change-Id: If937182b40a21e0f2028496e7b4b06c6e8a41352

3 weeks agoMerge "cosmetics: remove some extraneous 'extern's"
pascal massimino [Wed, 6 Aug 2014 06:00:04 +0000 (23:00 -0700)]
Merge "cosmetics: remove some extraneous 'extern's"

3 weeks agoMerge "vp8enci.h: cosmetics: fix '*' placement"
pascal massimino [Wed, 6 Aug 2014 05:34:13 +0000 (22:34 -0700)]
Merge "vp8enci.h: cosmetics: fix '*' placement"

3 weeks agobit_writer: cosmetics: rename kFlush() -> Flush() 92/71092/1
James Zern [Sun, 3 Aug 2014 01:42:16 +0000 (18:42 -0700)]
bit_writer: cosmetics: rename kFlush() -> Flush()

Change-Id: I8907927974188bee85ffade1d75d2e50817aa115

3 weeks agocosmetics: remove some extraneous 'extern's 93/71093/1
James Zern [Sun, 3 Aug 2014 01:59:17 +0000 (18:59 -0700)]
cosmetics: remove some extraneous 'extern's

Change-Id: Ib3f0cff37120c51633387dd1c46592c53ab0ba6d

3 weeks agovp8enci.h: cosmetics: fix '*' placement 94/71094/1
James Zern [Sun, 3 Aug 2014 02:10:12 +0000 (19:10 -0700)]
vp8enci.h: cosmetics: fix '*' placement

associate with the type

Change-Id: Icf94f11bf79f6ccee3150e27b228755f8f3f0f37

3 weeks agoadd -near_lossless [0..100] experimental option 78/71078/1
skal [Tue, 5 Aug 2014 17:14:57 +0000 (19:14 +0200)]
add -near_lossless [0..100] experimental option

This compresses the uimage using lossless compression and controlable
decimating pre-process.
Code is under WEBP_EXPERIMENTAL_FEATURE while it's being experimented with.

Change-Id: I8b7f4cfcc3c6afc52a556102842bdbb045ed5ee8

4 weeks agodsp: detect mips64 & disable mips32 code 73/71073/3
James Zern [Fri, 1 Aug 2014 19:15:15 +0000 (21:15 +0200)]
dsp: detect mips64 & disable mips32 code

Change-Id: Icf68dafd5cf0614ca25b36a0252caa1784ac8059

4 weeks agocwebp.1: fix quality description placement 38/71038/1
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

4 weeks 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

4 weeks 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

4 weeks 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 weeks 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

5 weeks 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

5 weeks 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

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

Change-Id: Ie9c2c7fe53321aefa17905c4322ad3373869ebad

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

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

Change-Id: I1eae9342df7bf4e8e98d5328b2e3eab7cba9fee8

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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"

5 weeks 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"

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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"

5 weeks 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

5 weeks 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

5 weeks 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

6 weeks 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

6 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"

6 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

6 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"

6 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

7 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

7 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

7 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

7 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

8 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()"

8 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

8 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

8 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

8 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

8 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

8 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

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

8 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

8 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"

8 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

8 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

8 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

8 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