Commit Graph

877 Commits

Author SHA1 Message Date
Vikas Arora
eb6f9b8a72 Updated cwebp man's help for Alpha & Lossless.
Change-Id: Iaa129685fdbd95c3b408c92c77532b321bc2637f
2012-07-04 12:51:56 +05:30
Pascal Massimino
0fa844fb8f cosmetic fixes on assert and 'const' where applicable
Change-Id: Iede15b8464be453e7d12929513ed82183921265c
2012-07-03 05:50:36 -07:00
Pascal Massimino
7f22bd2596 check limit of width * height is 32 bits
Update the RIFF-specs file too

Change-Id: I113a7e25da2f7a19c1344c1dc5d496127cfe2596
2012-07-03 05:42:13 -07:00
James Zern
16c46e83ac autoconf/make: cosmetics: break long lines
Change-Id: If08350a27cdfc4371dcb28ecb9d88d05eceaf977
2012-07-02 21:48:18 -07:00
James Zern
ab22a07afc configure: add helper macro to define --with-*
replaces repeated --with-{jpeg,png,tiff}{include,lib}dir defines

Change-Id: Ic0eb8622dfc94184ab74f8302112c36547a34664
2012-07-02 21:26:48 -07:00
James Zern
c17699b343 configure: add libtiff test
Change-Id: Ia5828797bae9c993a3d00ddd5e0089d3b828e975
2012-07-02 18:01:49 -07:00
pascal massimino
0e09732c5e Merge "cwebp: fix crash with yuv input + lossless" 2012-07-02 14:40:00 -07:00
pascal massimino
88a510ff53 Merge "fix big-endian VP8LWriteBits" 2012-07-02 14:38:32 -07:00
James Zern
da99e3bfcd Merge "Makefile.vc: split mux into separate lib" 2012-07-02 14:36:17 -07:00
James Zern
7bda392b50 cwebp: fix crash with yuv input + lossless
Change-Id: Ia27c925f532a4243369288e954abdc063b9f94f9
2012-07-02 14:33:25 -07:00
James Zern
f56a369ab0 fix big-endian VP8LWriteBits
bits would be lost if n_bits was > 17

Change-Id: Id315d075075338a08e10c04faa91cab347a53591
2012-07-02 14:30:41 -07:00
pascal massimino
54169d6cd7 Merge "cwebp: name InputFileFormat members consistently" 2012-07-02 13:19:27 -07:00
James Zern
e2feefa9b8 Makefile.vc: split mux into separate lib
similar to other builds, reusing some variable naming from
makefile.unix.
also change the main output file names to libwebp{,mux}.{lib,dll} with
the import lib retaining the _dll suffix.

Change-Id: I6bbc4fb39ab37957f153e9f31954387b24094581
2012-07-02 12:37:57 -07:00
pascal massimino
27caa5aa34 Merge "cwebp: add basic TIFF support" 2012-07-02 11:39:21 -07:00
James Zern
d8921dd4e6 cwebp: name InputFileFormat members consistently
append an '_'. TIFF introduced TIFF_ to avoid a name clash.

Change-Id: Iebe484d43aeb8e1912cd5bd10d36e1c5e66a4b42
2012-07-02 11:24:23 -07:00
James Zern
6f76d246ba cwebp: add basic TIFF support
Change-Id: I29f354e1ef9cf8f23002cf2e15814a53a94b4ed5
2012-07-02 11:22:52 -07:00
pascal massimino
4691407bb3 Merge changes If39ab7f5,I3658b5ae
* changes:
  WebPMuxCreate() error handling:
  Fix a memleak in WebPMuxCreate()
2012-07-02 01:46:17 -07:00
Vikas Arora
cca7c7b81b Fixed nit: 10 -> 10.f
Change-Id: I0cdb096525460b27f3adcb9f802f6dc193d5f590
2012-07-02 11:29:01 +05:30
Urvang Joshi
5d09a244b7 WebPMuxCreate() error handling:
Directly return NULL if no allocation is done yet.

Change-Id: If39ab7f5a55833263d3372fa0a5d9b0a600cb9ed
2012-07-02 11:20:09 +05:30
Urvang Joshi
777341c3d0 Fix a memleak in WebPMuxCreate()
Change-Id: I3658b5ae487082aef28989eb8abc274c207fef0f
2012-07-02 10:19:21 +05:30
James Zern
61c9d161d5 doc: correct lossless prefix coding table & code
extra bit counts and literal distance return value

Change-Id: I290e3ee8900469503a323f87e9dbb8ca5cb4afc7
2012-07-01 14:10:32 -07:00
James Zern
4c3975792b Merge "mark VP8{,L}{GetInfo,CheckSignature} as WEBP_EXTERN" 2012-06-29 10:31:26 -07:00
pascal massimino
e4e36cc6c6 Merge "Mux: Allow only some frames/tiles to have alpha." 2012-06-29 05:17:26 -07:00
pascal massimino
ad2aad3c21 Merge "WebP Decoding error handling:" 2012-06-29 05:15:55 -07:00
Urvang Joshi
97649c8f6b Mux: Allow only some frames/tiles to have alpha.
And related const fixes.

Change-Id: I79f6f1b9f8c6faac8cc4ef24b58edff6d90de045
2012-06-29 17:17:19 +05:30
Vikas Arora
f864be3b2c Lower the quality settings for Alpha encoding.
Evaluated the impact of this change over 1000 image corpus.
The compression density is up (on average) by 1.2% and encoding time has
gone down considerably from 716 ms (per file) to 146 ms (per file)
(4.9X improvement in encoding time).

Change-Id: Ida562cc0bfe18c9d6f5f00873c95f8396b480eab
2012-06-29 16:19:42 +05:30
Urvang Joshi
3ba81bbe8b WebP Decoding error handling:
- Don't allow any extended chunks (except ALPH) without RIFF & VP8X
chunks.
- Also, don't allow VP8X without RIFF.

Change-Id: I1beba43e617ec637901aeeb93f2f484ec086a75d
2012-06-29 14:32:21 +05:30
Pascal Massimino
fcc69923b9 add automatic YUVA/ARGB conversion during WebPEncode()
Adds new methods WebPPictureARGBToYUVA() and WebPPictureYUVAToARGB()
Depending on the value of picture->use_argb_input,
the main call WebPEncode() will convert appropriately.
Note that both conversions are lossy, so it's recommended to:
* use YUVA input for lossy compression (picture->use_argb_input=0)
* use ARGB input for lossless compression (picture->use_argb_input=1)

Change-Id: I8269d607723ee8a1136b9f4999f7ff4e657bbb04
2012-06-28 00:34:23 -07:00
Pascal Massimino
802e012a18 fix compilation in non-FANCY_UPSAMPLING mode
Change-Id: Id0b1fad3a4888b6e9563a227412b2e6a656d9a2a
2012-06-28 00:26:35 -07:00
Pascal Massimino
e012dfd90f make width/height coding match the spec
* width/height in VP8X chunk is 24bit now
* Added some more constants #defines

Change-Id: I2f8ca7f965a247bccd341dd079ed2abf549c39d7
2012-06-28 00:20:28 -07:00
James Zern
228d96a538 mark VP8{,L}{GetInfo,CheckSignature} as WEBP_EXTERN
these functions are used by libwebpmux

Change-Id: Ifcb79e685f3a6b53007c0dc5f220737daba97d47
2012-06-27 16:07:33 -07:00
Pascal Massimino
637a314f97 remove the now unused *KeepA variants
Change-Id: I65217f3075e30bc9a7f38a49d09f01c9d7271d6a
2012-06-27 10:00:48 -07:00
Urvang Joshi
d11f6fcc82 webpmux returns error strings rather than numbers
Change-Id: Ifc8d8aaf0f6c03ecb1508ec7fbc34c918bf69c61
2012-06-27 16:55:57 +05:30
James Zern
fcec059322 makefile.unix: cwebp: fix OSX link
this is more a workaround than a fix. this change forces the tables
from yuv.h into the data section rather than generating them as common
blocks. prior to this the linkage would fail with e.g.,

Undefined symbols:
...
  "_VP8kClip4Bits", referenced from:
      _Yuv444ToRgba4444 in libwebp.a(libwebpdsp_la-upsampling.o)

broken since:
 48f8275 add colorspace for premultiplied alpha

Change-Id: I69c36758c31cd3a4b3ea5c412674d1a47b45447e
2012-06-26 18:09:55 -07:00
pascal massimino
6b811f1b06 Merge "doc: remove lossless pdf" 2012-06-22 15:43:20 -07:00
James Zern
c963482124 doc: remove lossless pdf
superseded by webp-lossless-bitstream-spec.txt

Change-Id: I5f233d4c3c2fa048a180db950ad4319ffdb9bced
2012-06-22 15:25:03 -07:00
James Zern
b9ae4f0d88 cosmetics after mux changes b74ed6e, b494ad5
Change-Id: I8f693b1ba2537de89bda1dfbcf3b95abd17e420a
2012-06-22 14:30:01 -07:00
Urvang Joshi
b494ad5096 Mux: only allow adding frame/tiles at the end.
Change-Id: I5d685628da8c8ac85144cee2e5808b30ec79fef9
2012-06-22 11:18:18 -07:00
pascal massimino
2c341b0eed Merge "Added image characteristic hint for the codec." 2012-06-22 02:54:51 -07:00
Vikas Arora
d373076a53 Added image characteristic hint for the codec.
This image type hint is used by codec to apply appropriate set of
transform filters to the image.

Change-Id: Ibb24e47ba14c40fa7f9f2c50ae86e03f2b29e9a6
2012-06-22 14:03:46 +05:30
pascal massimino
2ed2adb5ba Merge "msvc: add intrinsic based BitsLog2Floor" 2012-06-22 00:13:47 -07:00
James Zern
e595e7c552 Merge "add demux.c to the makefiles" 2012-06-21 23:44:44 -07:00
James Zern
da47b5bda7 Merge "demux: add {Next,Prev}Chunk" 2012-06-21 23:43:03 -07:00
James Zern
e5f467420d add demux.c to the makefiles
Change-Id: If98c0ea859c845261218196df35e905589f09e76
2012-06-21 23:21:41 -07:00
James Zern
4708393c3b demux: add {Next,Prev}Chunk
replaces WebPDemuxSetChunk(). makes this consistent with the Frame
interface.

Change-Id: Ia2b1b98cc290f35b41fd14ee35a2a17cecac7ba8
2012-06-21 23:18:39 -07:00
James Zern
e8a0a821d2 demux: quiet msvc warnings
min_size is safe to be a uint32_t so avoid the size_t -> uint32_t
conversion

Change-Id: Ib53fe58d313b55dfcf3bee35d0cad48f210d07bf
2012-06-21 23:09:38 -07:00
Urvang Joshi
7f8472a610 Update the WebP Container Spec.
- Add details about the VP8L chunk support.
- Also add new example bitsteams containing VP8L chunk.
- Add back a section describing the VP8 chunk.
- Restrict some fields to 16 or 24 bits instead of 32 bits.
- Fields whose values are always positive are stored 1-based
instead of 0-based.
- Unknown chunks can only occur at certain places in the file.
- Remove the restriction for some fields to be divisible by 32 or 16.
  Instead they are restricted to be even.
- Add a restriction for (canvas_width * canvas_height) product.
- Add 3 bits for rotation & symmetry in VP8X flags.
- Add some new example layouts.
- Add/clarify some nitty-gritties throughout the doc.
- Use the terms frame/tile more consistently and logically.
- Update related TODOs.

Change-Id: I611c1f58ecc3ee87546ca31bad1609376fad251e
2012-06-21 16:04:58 -07:00
Pascal Massimino
31b68fe639 cleanup WebPPicture struct and API
* add a real proper pointer for holding memory chunk pointer
  (instead of using y and argb fields)
* polish the doc with details
* add a WebPPictureView() that extract a view from a picture
  without any copy (kind of a fast-crop).
* properly snap the top-left corner for Crop/View. Previously,
  the luma position was not snapped, and was off compared to the chroma.

Change-Id: I8a3620c7f5fc6f7d1f8dd89d9da167c91e237439
2012-06-21 00:30:43 -07:00
Pascal Massimino
9144a18643 add overflow check before calling malloc()
It's preferable to be over-strict and paranoid here.

Change-Id: Ia928b279b753fa8f836d17decb17a35e6dc441b3
2012-06-20 23:58:43 -07:00
Pascal Massimino
81720c9139 consistency cosmetics
Change-Id: Ie8e372ddcdd6e48527478f70bf716953ed18292a
2012-06-20 23:56:11 -07:00