Commit Graph

1173 Commits

Author SHA1 Message Date
pascal massimino
9b69be1cdc Merge "Simplify mux library code" 2012-01-05 00:15:48 -08:00
Urvang Joshi
a056170eca Simplify mux library code
Refactor mux code into Read APIs, Set/Delete APIs and internal
objects/utils.

Change-Id: Ia4ce32ec18cf0c1c75de9084fbb28840d46892b4
2012-01-05 12:23:08 +05:30
James Zern
992187a380 improve log2 test
- add check for native log2 to configure
- use a common define (NOT_HAVE_LOG2) to enable use of local library
  version for non-autoconf platforms without their own version,
  currently msvc and android

This uses a negative (NOT_HAVE_) to simplify the ifdef

Change-Id: Id0610eed507f8bb9c5da338918112853d5c8127a
2012-01-04 18:49:37 -08:00
Pascal Massimino
e852f83205 update Android.mk file list
Change-Id: Idffc497931c85582725e65f1d7b7384bcee0fdd5
2011-12-26 02:39:56 -08:00
Pascal Massimino
a90cb2be6e reduce number of copies and mallocs in alpha plane enc/dec
Change-Id: Ice48d2dd403c18870567ee6e1b210b1eb3d5b44f
2011-12-23 01:21:53 -08:00
James Zern
b1662b0530 fix some more type conversion warnings w/MSVC
API & memory related warnings will be dealt with separately

Change-Id: I8a7893baa4d5035c963fb3c16e0bb4eee742e968
2011-12-21 16:07:16 -08:00
Pascal Massimino
223d8c60aa fix some uint64_t -> int conversion warnings with MSC
Change-Id: I5dc314c9d1a3cbda095be3c90886983500104867
2011-12-21 14:43:52 -08:00
James Zern
c1a0437b87 Merge "simplify checks for enabling SSE2 code" 2011-12-20 17:42:59 -08:00
James Zern
f06817aaea simplify checks for enabling SSE2 code
also fixes build issues under vs11 which has a native arm compiler for
windows 8 targets

Change-Id: Id76c2deae9fc9de147d13ad0d34edffcb5a726c4
2011-12-20 17:41:55 -08:00
James Zern
948d4fe94f silence a msvc build warning
implicit double -> float conversion; avoiding sqrtf (c99) for
compatibility

Change-Id: If9b367dde237fc5173c1445cc60b16aa6ad2821c
2011-12-19 23:04:01 -08:00
James Zern
911795490e vwebp: msvc build tweaks
snprintf -> _snprintf / remove double->float warnings

Change-Id: I5dcdc394cf7e2d37205beaf83ed0f80a18ec06ab
2011-12-16 19:30:33 -08:00
Pascal Massimino
7937b409e7 simple WebP viewer, based on OpenGL
Quite handy and simple (for now).
It's not yet incorporated within the build system (autotools or
makefile.unix), because it gets complicated with OpenGL. TODO(later).

For now, there's some ready-to-use command line for compiling on Linux
or Mac in the header of vwebp.c

Later, this tool will be supplemented with support for animation,
tiling, zooming, etc.

Change-Id: I292972cea4862536afbe8c9ec444c590d152f086
2011-12-13 14:02:04 -08:00
Pascal Massimino
6aac1df17b add a bunch of missing 'extern "C"'
Change-Id: I8c0ada049ce9fa7ef14164b90d58e999cdabba53
2011-12-13 10:51:32 -08:00
James Zern
421eb99db3 Merge "Remove assigned-but-not-used variable "br"" 2011-12-08 10:41:18 -08:00
Pascal Massimino
91e27f4573 better fitting names for upsampling functions
Change-Id: I816e81586c9e1a74ebc5516598dbd4ae0ddf48d8
2011-12-08 06:42:53 -08:00
Martin Olsson
a5d7ed5c4b Remove assigned-but-not-used variable "br"
Fixes gcc 4.6.x -Wunused-but-set-variable compiler warning:

	libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -Wextra -Wall -Wunused-but-set-variable -MT libwebpdecode_la-idec.lo -MD -MP -MF .deps/libwebpdecode_la-idec.Tpo -c idec.c  -fPIC -DPIC -o .libs/libwebpdecode_la-idec.o
	idec.c: In function 'DecodeRemaining':
	idec.c:371:17: warning: variable 'br' set but not used [-Wunused-but-set-variable]

Change-Id: Ib037be9634b5b802ba9f1e2ef156a8fdf9630752
2011-12-08 15:42:01 +01:00
Pascal Massimino
f62d2c9497 remove unused 'has_alpha' from VP8GetInfo() signature
alpha information is not to be found at RIFF chunks level, not
in the VP8 bitstream (that was a tmp hack)

Change-Id: Idd1629c696b03c26f6f30650d7216f627f1761df
2011-12-08 06:41:40 -08:00
Pascal Massimino
08e865822a trap alpha-decoding error
Improves robustness to bad bitstream.

Change-Id: I87ca03ccd12d4d690904b35f8dfc2a20a28fb47b
2011-12-08 06:34:00 -08:00
Pascal Massimino
b361eca1c5 add cut-off to arith coder probability update.
This speeds things up for long message, while not damaging
the stats too much for usual-sized cases

Change-Id: I3f45e28b771d701e2e1da11eb800de18c4ed12fc
2011-12-08 06:27:11 -08:00
Urvang Joshi
8666a93aae Some bug-fixes for images with alpha.
- Fix the off-by-one diff when cropping with simple-filter.
- Fix a bug in incremental decoding in case of alpha.
- In VP8FinishRow(), do not decode alpha when y_start > y_end.
- Correct output of alpha channel for MODE_ARGB.
- Correct output of alpha channel for MODE_RGBA_4444.

Change-Id: I785763a2a704b973cc742ad93ffbb53699d1fc0a
2011-12-07 15:12:50 +05:30
Pascal Massimino
273a12a013 fix off-by-1 diff in case cropping and simple filtering
Change-Id: I6dea172d0cf129f9986b8a3e1eea85fa97a70402
2011-12-05 08:37:55 -08:00
James Zern
2f741d1e13 webpmux: ReadImage: fix ptr free in error case
allocate to temporaries and deal with output pointers in one place to
reduce casting.

Change-Id: Ib12d866440184315536f35a15eb5adeba7879ae7
2011-12-02 17:58:20 -08:00
James Zern
721f3f48e7 fix alpha decode
- remove left-over WEBP_EXPERIMENTAL_FEATURES #ifdef

Change-Id: I2b91ccd2e2b3ebea63d5f698f90206feec30a4db
2011-12-02 11:00:27 -08:00
Pascal Massimino
60942c8cea fix the has_alpha_ order
Change-Id: I26211732584f6181bf763497818b45515e394c21
2011-12-02 10:26:42 -08:00
Pascal Massimino
30971c9e95 Implement progress report (and user abort)
New cwebp flag is -progress

Change-Id: Ied872cca13f512036860783bbee1bdbccad72768
2011-12-01 14:19:40 -08:00
James Zern
eda520a92e cosmetics after 9523f2a
spelling, indent and other style conformance

Change-Id: Iad720c0d85f2147676e302439d57628712d3b109
2011-12-01 13:05:31 -08:00
pascal massimino
38bd5bb524 Merge "Better alpha support in webpmux binary" 2011-12-01 06:01:33 -08:00
pascal massimino
ccbaebfe30 Merge "Updated the includes to relative paths." 2011-12-01 04:20:46 -08:00
Pascal Massimino
d71fbdcca3 fix small typo in error message array
Change-Id: If34537e53cc56b5f5daa15afaefb1f49d11602f5
2011-12-01 03:34:22 -08:00
Urvang Joshi
cdf97aa265 Better alpha support in webpmux binary
- Support for adding/getting frames/tiles with alpha in webpmux
- For "-info" option in webpmux binary, add alpha related info

Change-Id: Iccd2fd35ab8453dabd74779f12f2844ab76d0538
2011-12-01 16:15:57 +05:30
Vikas Arora
885f25bc83 Updated the includes to relative paths.
Change-Id: I0ea1a59dd0f6cb1df9f41e048e0c5a13e7fb8335
2011-12-01 15:30:41 +05:30
Vikas Arora
a0ec9aace9 Update WebP encoder (cwebp) to support Alpha.
Updated cwebp (Webp Encoder) binary to support Alpha encoding.
Modified man page and WebP container spec appropriately.

Change-Id: I52f6a5cb3e870c386591e9a7776293fa6a8fb04b
2011-12-01 15:13:17 +05:30
Vikas Arora
667b769aee Fixed the include for types.h within mux.h
Made the include (for types.h) to relative path w.r.t mux.h

Change-Id: Ifb2a36557d7c8b63490738a2cc48e03993d24639
2011-12-01 13:47:32 +05:30
Vikas Arora
9523f2a5de Add Alpha Encode support from WebPEncode.
Extend WebP Encode functionality to encode Alpha data and produce
bit-stream (RIFF+VP8X+ALPH+VP8) corresponding to WebP-Alpha.

Change-Id: I983b4cd97be94a86a8e6d03b3b9c728db851bf48
2011-12-01 12:15:58 +05:30
pascal massimino
16612ddd30 Merge "Add Alpha Decode support from WebPDecode." 2011-11-30 22:02:03 -08:00
Vikas Arora
d117a94046 Add Alpha Decode support from WebPDecode.
Extend WebP decode functionality to extract Alpha data (support ALPH
chunk) and decode the Alpha plane using Alpha (utils/alpha) core-lib.

Change-Id: I6f0ee1b189c13caba3c1dd9b681383bfd00aa212
2011-12-01 11:24:50 +05:30
James Zern
67228734dc cosmetics after e1947a9
indent / spelling / line length & a couple missing consts

Change-Id: Id282cb7bc6881d4738a3d9fa912b5b22a007c4d2
2011-11-30 18:51:20 -08:00
Vikas Arora
e1947a9299 Add Alpha encode/decode code.
Add code for Alpha encoding & decoding. The alpha compression is done
via backward reference counts encoded with Arithmetic encoder (TCoder).
Also provided is lossy Alpha pre-processing option via level-quantizations
using kNN heuristic.

Change-Id: Ib6b13530c1a4ab6493edcb586ad29fe242bc1766
2011-11-30 17:53:09 +05:30
Pascal Massimino
afc4c5d695 simplify code by introducing a CopyPlane() helper func
Change-Id: Id1a2a5d8a3bf48cf614213442c1386a77c0d6880
2011-11-23 18:00:39 -08:00
pascal massimino
113b312881 Merge "MUX API Updates" 2011-11-23 05:58:02 -08:00
Urvang Joshi
c398f59536 MUX API Updates
- Add alpha support in mux.
- Remove WebPMuxAddNamedData() and WebPMuxGetNamedData() APIs. Add WebPMuxSetImage(), WebPmuxGetImage() and WebPMuxDeleteImage() APIs instead.
- Refactor code using WebPImage struct.
- Corresponding changes in webpmux binary.
- WebPMuxSetImage()/AddFrame()/AddTile() can now work with data which starts from "RIFF...". This simplifies reading a single-image webp file and adding it as an image/frame/tile in mux.

Change-Id: I7d98a6407dfe55c84a682ef7e46bc622f5a6f8d9
2011-11-23 19:03:13 +05:30
Somnath Banerjee
5acf04ef8c remove orphan source file
similar to 8962030 enc/enc_sse2.c became a part of dsp/ w/e06ac08.

Change-Id: Ia0cef3133e3f8ec5da0bd7a5172c22e86f1d41cb
2011-11-19 11:01:19 -08:00
pascal massimino
059f03ef99 Merge "dec: validate colorspace before using as array index" 2011-11-17 10:24:59 -08:00
James Zern
70a0398988 Merge "factorize some code" 2011-11-16 19:14:49 -08:00
Pascal Massimino
9b243b3db0 factorize some code
Change-Id: Iac4cf0cf05888b7dd6613028dac619d8f5b0501b
2011-11-16 19:00:27 -08:00
Urvang Joshi
372e2b463b Correct a bug in ReadPNG() with GRAY_ALPHA images
Change-Id: I4676160ee544ed914cc0de3f9cd140d9ee65addc
2011-11-16 18:56:23 -08:00
James Zern
469d6eb974 Merge "Makefile.am: remove redundant noinst_HEADERS" 2011-11-16 18:41:55 -08:00
James Zern
9fe3372f19 dec: validate colorspace before using as array index
Change-Id: I5bcf01769d58d39a5f8d50f54cf0cd83a2309602
2011-11-16 18:21:56 -08:00
James Zern
8962030f52 remove orphan source file
enc/enc.c became a part of dsp/ w/e06ac08.

Change-Id: I9e99aa6eac7b28162f58f3f0dc180a68a279d136
2011-11-14 19:31:02 -08:00
James Zern
ced3e3f4e0 Makefile.am: remove redundant noinst_HEADERS
When they appear in _SOURCES they won't be installed [1].

[1]: http://www.gnu.org/software/automake/manual/automake.html#Headers

Change-Id: I14fd816294682e7bd0fccefd6428e1526c9470d8
2011-11-11 16:29:32 -08:00