Print relevant lossless encoding stats in cwebp.

Change-Id: Ib8dfab498b1a05e49734bba2d3e72810343e8b0a
Provide one entry point for backward references.

The new method VP8LGetBackwardReferences hides internal
heuristics used for choosing RLE or LZ77 based refs.
- Tuned VP8LHashChainFindCopy for better compression at higher Q.
- Refactored code.
- Removed the unused method VP8LVerifyBackwardReferences.

Change-Id: Ibb7bb072bab5a49a001577a20d88226f52e6c663
Set correct encode size in encoder's stats.

The current implementation doesn't take care one byte
signature and associated one byte padding (for odd sized chunk).

Change-Id: I35b81d0644818cdba38189aa48c75db5f92e68f4
fix the return value and handle missing input file case.

Change-Id: I42a64fcf7587ff3a487115808e2cfa51cec0031d
Merge "Set correct encode size in encoder's stats."
add support for animation

it's using glutTimerFunc() for trigger next frame's decoding

Reminder: how to build and use manually (integration in makefile.unix coming soon)

Unix:
cd libwebp
make -f makefile.unix
cd examples
cc -o vwebp vwebp.c -framework GLUT -framework OpenGL -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a

Mac + xcode:
cd libwebp
make -f makefile.unix
cd examples
cc -o vwebp vwebp.c -lglut -lGL -lpthread -lm -I../src/ ../src/libwebp.a ../src/mux/libwebpmux.a

Change-Id: Id49e87c26628c2b58ec221f6030cbd2e46a807b4
Some cleanup in VP8LCreateHuffmanTree() (and related functions
CompareHuffmanTrees() and SetBitDepths()):
- Move 'tree_size' initialization and malloc for 'tree + tree_pool'
  outside the loop.
- Some renames/tweaks for readability.

Change-Id: I5cb3cc942afac6e9f51a0b97c57ee897677a48a2
remove unneeded error condition for WebPMuxNumNamedElements()

+ fix error message

Change-Id: If283ff6609ee0c5dff81a9c1c3f194faa729161c
Fix a crash in lossless decoder.

This was due to incorrect update of 'ok'.

Change-Id: I91edfb5682527e8bc7eaa10e635c0261edb016b6
Fix a crash due to wrong pointer-integer arithmetic.

[Basically, the condition "src - dist < data" can be wrongly evaluated
to be false if "src < dist" due to underflow. Instead, "src - data <
dist" is the correct condition, as "src > data" is always true and so
there would never be an underflow].

Change-Id: Ic9f64bfe76a9acae97abc1fb7c1f4868e81f1eb8
Merge "Some cleanup in VP8LCreateHuffmanTree() (and related functions CompareHuffmanTrees() and SetBitDepths()): - Move 'tree_size' initialization and malloc for 'tree + tree_pool'   outside the loop. - Some renames/tweaks for readability."
Merge "Fix a crash in lossless decoder."
Merge "Fix a crash due to wrong pointer-integer arithmetic."
cwebp: fix WIC/Microsoft SDK compatibility issue

Fixes issue #115.
Define local copies of GUID_WICPixelFormat24bppRGB &
GUID_WICPixelFormat32bppRGBA (and GUID_WICPixelFormat32bppBGRA for
symmetry) to avoid link issues when building against older versions of
the SDK.

Change-Id: I2a26be1b7fe6d970feb3211cf0059e5898e3028d
Merge "cwebp: fix WIC/Microsoft SDK compatibility issue"
cwebp/windows: use MAKE_REFGUID where appropriate

Change-Id: If595c75a833d37df86c16bf926da5f032015c68e
cosmetics: VP8LCreateHuffmanTree: fix indent

Change-Id: I025fada400366f8937208e1f9b8df483cd53a942
enc/vp8l: fix double free on error

GetHuffBitLengthsAndCodes and the caller would both free
bit_lengths/bit_codes

Change-Id: I1b62ff727c82567f11c39a847f74fe765b5f527c
Merge "cosmetics: VP8LCreateHuffmanTree: fix indent"
Merge "enc/vp8l: fix double free on error"