Commit Graph

2272 Commits

Author SHA1 Message Date
James Zern
993af3e29a makefile.unix: disable -Wvla by default
Rather than add bulk to test for the new flag, simply comment out -Wvla
to keep the base makefile simple.
-Wvla was added in gcc-4.3.0.

Change-Id: I21feb456d7498ea628defb436a50c3d828e7f971
2011-07-08 21:23:27 -04:00
James Zern
3827e1bce4 Merge "examples: (windows/WIC) add alpha support" 2011-07-08 14:10:17 -07:00
Pascal Massimino
e291fae0fc SSE2 functions for the fancy upsampler.
~5-10% faster.
Heavy 8bit arithmetic trickery!
Patch by Somnath Banerjee (somnath at google dot com)

Change-Id: I9fd2c511d9f631e9cf4b008c46127b49fb527b47
2011-07-07 18:12:53 -07:00
Pascal Massimino
a06bbe2e80 add WebPISetIOHooks() to set some custom hooks on the incremental decoder object.
Change-Id: I01e973a1e45e3d60dc11fd284df3cbb938cf0485
2011-07-07 16:38:03 -07:00
pascal massimino
7643a6f2ef Merge "makefile.unix: use uname to detect OSX environment" 2011-07-07 16:29:25 -07:00
Pascal Massimino
5142a0be3a export alpha channel (if present) when dumping to PGM format
Change-Id: Ica1818937fa03b29a749887d28f49fe675c8b1db
2011-07-07 16:08:15 -07:00
James Zern
14d5731c7e makefile.unix: use uname to detect OSX environment
HOSTTYPE is x86_64 on e.g.,
bash 3.2.48(1)-release
ProductName:	Mac OS X
ProductVersion:	10.6.7
BuildVersion:	10J869

intel-mac seems to be the value under tcsh.

Change-Id: I814ad6d3b733933057cea605917b185ff6d423d0
2011-06-24 21:29:59 -04:00
James Zern
0805706252 examples: quiet warnings
When WEBP_HAVE_(JPEG|PNG) were undefined the stub functions would
produce warnings for unused parameters.

Change-Id: I79b2457c769d1f9382be834162de019c5427f94b
2011-06-24 16:50:02 -04:00
James Zern
3cfe0888ae examples: (windows/WIC) add alpha support
Portions based on a patch by Ismail Keskin (iskeskin at gmail dot com)
Fixes issue #83.

Change-Id: Ib54188910354240a2731b0a3a3d0915d17af2233
2011-06-22 12:01:48 -07:00
Pascal Massimino
13ed94b8ad add compile warning for variable-length-array 2011-06-20 17:42:25 -07:00
Pascal Massimino
5a18eb1a31 Merge "add Advanced Decoding Interface" 2011-06-20 16:30:01 -07:00
Pascal Massimino
5c4f27f9f5 add missing \n 2011-06-20 15:47:35 -07:00
Pascal Massimino
f4c4e416c0 80 cols fix 2011-06-20 15:39:40 -07:00
Pascal Massimino
d260310511 add Advanced Decoding Interface
You can now use WebPDecBuffer, WebPBitstreamFeatures and WebPDecoderOptions
to have better control over the decoding process (and the speed/quality tradeoff).

WebPDecoderOptions allow to:
 - turn fancy upsampler on/off
 - turn in-loop filter on/off
 - perform on-the-fly cropping
 - perform on the-fly rescale
(and more to come. Not all features are implemented yet).

On-the-fly cropping and scaling allow to save quite some memory
(as the decoding operation will now scale with the output's size, not
the input's one). It saves some CPU too (since for instance,
in-loop filtering is partially turned off where it doesn't matter,
and some YUV->RGB conversion operations are ommitted too).

The scaler uses summed area, so is mainly meant to be used for
downscaling (like: for generating thumbnails or previews).

Incremental decoding works with these new options.
More doc to come soon.

dwebp is now using the new decoding interface, with the new flags:
  -nofancy
  -nofilter
  -crop top left width height
  -scale width height

Change-Id: I08baf2fa291941686f4ef70a9cc2e4137874e85e
2011-06-20 15:30:52 -07:00
Pascal Massimino
bd2f65f67c sse2 version of the complex filter
12-15% faster.
(only inner edge is implemented for now)

patch by Somnath Banerjee (somnath at google dot com)
2011-06-20 00:27:47 -07:00
Pascal Massimino
96ed9ce0fb perform two idct transforms at a time when possible
patch by Christian Duvivier (cduvivier at google dot com)
2011-06-20 00:22:37 -07:00
Pascal Massimino
01af7b69cd use aligned stored 2011-06-18 08:27:16 -07:00
James Zern
0e1d1fdfe0 Merge "Makefile.vc: add experimental target" 2011-06-17 18:34:29 -07:00
James Zern
2a1292a61f Makefile.vc: add experimental target
Defines WEBP_EXPERIMENTAL_FEATURES for the build.

Change-Id: I1f118ca07018a92bfdf86f562781971d4382fc6e
2011-06-17 18:32:15 -07:00
James Zern
23bf351e71 Enable decode SSE2 for Visual Studio
Change-Id: If32f8b1cfe415b2f9330af36a5dd0e31e49582b2
2011-06-17 18:12:01 -07:00
Somnath Banerjee
131a4b7b7b dec/dsp_sse2: fix visual studio compile
This addresses issue #80

Change-Id: Ia81ae21f85266dd64d39da63ff2fae33f9a572dc
2011-06-17 18:04:08 -07:00
James Zern
00d9d6807c swig: file reorganization
Rather than %include'ing decode.h and potentially pickup new
(unsupported functions), explicitly list the desired functions as with
encode.
Reorganize a bit to contain most of the language specific additions to
one area. This fixes the visibility of the wrap_* functions in java. The
method modifiers need to come before the function prototypes.

Change-Id: I595df4d1a60edcb263923b5a2621879d3b6233cf
2011-06-17 14:32:15 -07:00
pascal massimino
7fc7e0d9eb Merge "swig/java: basic encode support" 2011-06-16 13:45:50 -07:00
Pascal Massimino
3be57b166f fix MSVC compile for WEBP_EXPERIMENTAL_FEATURES
patch by Ismail Keskin (iskeskin at gmail dot com)
fixes issue #82
2011-06-16 13:33:07 -07:00
James Zern
40a7e347ff dec/dsp: disable sse2 for Visual Studio builds
This is a temporary workaround for issue #80.

Currently dec/dsp_sse2 is not included in Makefile.vc. Simply adding it
will cause a build error, however, as cl does not support aligning
function parameters producing, e.g.,
src\dec\dsp_sse2.c(228) : error C2719: 'q1': formal parameter with
__declspec(align('16')) won't be aligned

Change-Id: Id29e6802dd29110e59c4f6d13ffa5d4793c750a0
2011-06-15 13:53:14 -07:00
Pascal Massimino
e4d540c842 add SSE2 code for transform
Pretty similar to the encoder's version
3% faster decoding on average

patch by Christian Duvivier (cduvivier at google dot com)
2011-06-15 10:51:31 -07:00
James Zern
54f2170a15 swig/java: basic encode support
Wrap WebPEncode???* to provide an interface similar to decode.
As only WebPGetEncoderVersion is wrapped directly from encode.h avoid
including it in the swig file to reduce %ignore's.
This change also removes unnecessary incremental decoding related enums.

Change-Id: I0b5424026aa6ae012c6a29ad2f2301c2681ca301
2011-06-15 10:37:53 -07:00
Pascal Massimino
c5d4584b2c call function pointers instead of C-version
will potentially call SSE2 version instead of the plain-C one
catch by Christian Duvivier (cduvivier at google dot com)
2011-06-14 18:57:50 -07:00
pascal massimino
ea43f045b5 Merge "configure: mingw32 targets: test for WIC support" 2011-06-10 16:11:51 -07:00
Pascal Massimino
a11009d7fc SSE2 version of simple in-loop filtering
~10% faster decoding

Patch by Somnath Banerjee (somnath at google dot com)

Change-Id: I200db408272b4f61cda9d9261d2d4370a698d6c4
2011-06-10 15:10:18 -07:00
Pascal Massimino
42548da9e3 shave one unneeded filter-cache line
There was 1 unneeded sample line allocated for the filter cache in of simple filtering.
+ Add an explaining comment.

Change-Id: I775a596c8b8643e773e0eade8aa341dc23fb290f
2011-06-09 12:08:08 -07:00
James Zern
31f9dc6fdd configure: mingw32 targets: test for WIC support
Replace usage of _WIN32 in examples as this does not guarantee the
presence of wincodec.h.
mingw-w64 notably includes wincodec.h, though other releases do not.

Under cygwin the following can be used for a WIC enabled binary:
./configure --target=i686-pc-mingw32 CC=i686-w64-mingw32-gcc.exe

Change-Id: Ica6a714c3356a8eaf88486a1c3f5aa6adde394c0
2011-06-08 11:32:41 -07:00
Pascal Massimino
1955969925 Merge "split expression in two." 2011-06-08 09:08:54 -07:00
Pascal Massimino
415dbe4625 split expression in two.
makes order of evaluation strictly defined.
(cf http://en.wikipedia.org/wiki/Sequence_point)

Suggestion by mr dot gnu dot jr at gmail dot com
2011-06-08 09:06:03 -07:00
James Zern
e29072a8ce configure: test for zlib only w/--enable-experimental
Only builds with --enable-experimental require zlib currently.
A base install of mingw will not include the development headers and
library. libwebp itself will now build in such environments.
Additionally, remove -lz from **/Makefile.am, -lz will be added to LIBS
by AC_CHECK_LIB when necessary.

Change-Id: Iae8319cdf00162ecb7ed44661c02f40beb34f155
2011-06-07 14:12:53 -07:00
James Zern
b2b0090b4c Simplify Visual Studio ifdefs
Use _MSC_VER as the intrinsics compile without /arch:SSE2 on x86.
Also avoids applying the same flag to all files which defeated the
purpose of the runtime cpu-detection.

Thanks to Frank B. for the suggestion!

Change-Id: Iae9933a3cee704e663d9bbd53d0fa68e8c025425
2011-06-03 11:40:15 -07:00
Pascal Massimino
ca7a2fd66d Add error reporting from encoding failures.
picture->error_code can be looked up for finer error diagnose.
Added readable error messages to cwebp too.

Should close bug #75 (http://code.google.com/p/webp/issues/detail?id=75)

Change-Id: I8889d06642d90702f698cd5c27441a058ddb3636
2011-06-02 07:06:39 -07:00
pascal massimino
6c9405dbfb Merge "Makefile.vc: require CFG with clean target" 2011-06-01 17:04:35 -07:00
James Zern
0424ecd996 Makefile.vc: require CFG with clean target
Allows clean to target a specific CFG output directory which has the
side benefit of supporting of tree builds.
Earlier versions would clean the entire source tree possibly removing
multiple builds.

Change-Id: I63c0f32f73c0035f2b7fae0a88c02de3805d264b
2011-06-01 15:55:22 -07:00
James Zern
003417c7c7 Enable SSE2 for Visual Studio builds
Based on the remnants of change #2273.
Adds an auto-detect for ARCH based on the environment.

Change-Id: I4644eae7509f3982a8b385b49beac03675a2e0e8
2011-06-01 12:57:18 -07:00
Pascal Massimino
af10db4aa4 little speed up for VP8BitUpdate()
1% faster on average

Patch by Somnath Banerjee (somnath at google dot com)

Change-Id: I44cbc125024d3b7ba8621643e9161b72f0eac281
2011-05-29 22:35:44 -07:00
Pascal Massimino
e71418f899 more MSVC files to ignore
original patch by Vladimir Panteleev (vladimir at thecybershadow dot net)
2011-05-27 10:07:51 -07:00
Pascal Massimino
46d90363af cosmetics 2011-05-27 10:04:36 -07:00
Pascal Massimino
edf59ab320 typo fix 2011-05-27 09:55:47 -07:00
Mikolaj Zalewski
72229f5f34 Add support for x64 and SSE2 builds under Windows. 2011-05-26 16:50:46 +02:00
Pascal Massimino
92e5c6e1d4 VP8GetInfo() + WebPResetDecParams()
- add an internal VP8GetInfo() to parse header
- add WebPResetDecParams() for proper initialization

Change-Id: Ic39ea634d1d8016d25bdcfef2cb0d00b6dad83e9
2011-05-19 19:17:05 -07:00
Pascal Massimino
416b7a6b95 raise the fixed-point precision for the rescaler
for super-large upscaling factor (32x and up), 20bits was not enough.

Change-Id: I7b0d1975d0609948d464cfc3aeff1a70df16dc57
2011-05-16 17:12:37 -07:00
Pascal Massimino
aa87e4e063 fix alignment
Change-Id: I72d2c7a0faf240d3cada1b6fb86ffb32bead3eb2
2011-05-16 14:39:47 -07:00
Pascal Massimino
eb66670c6f disable WEBP_EXPERIMENTAL_FEATURES
Change-Id: I39caa72d261a0fd668910b1bfe067489c48a2de1
2011-05-09 12:10:28 -07:00
Pascal Massimino
c5ae7f653a typo fix: USE_ => WEBP_
Change-Id: I8d31320ff8a28bc89b943606a695421f9eda692d
2011-05-06 20:09:41 -07:00