gif2webp: Separate out each step into a method

We now have ReadFrame(), OptimizeFrame(), EncodeFrame() and
DisposeFrame()
methods.

Change-Id: I522834bad18dd6a7a3ddac7c00dfd829c48248f8
Add support for "no blend" in webpmux binary

Change-Id: I6d07b120626317df73f1a6f026931c5b9485a340
enc->Iterator memory cleanup

* move yuv_in_/out_* scratch buffers to iterator
* add y_top_/uv_top_ shortcuts in iterator

That's ~3k of stack size instead of heap.
But it allows having several iterators work in parallel.

Change-Id: I6a437c0f2ef1e5d398c1d6a2fd4974fa0869f0c1
use NULL for lf_stats_ testing, not bool

Change-Id: I14c6341bce1c745b7f2d1b790f2d4f8441d01be6
(de)mux.h: wrap pseudo-code in /* */

easier to copy / read as a block

Change-Id: Ia22689a13afd8ea2325dcdf432e35fc802d8177a
make -pass option work with token buffers

-pass 2 can be useful sometimes. More passes usually don't help more.
This change is a step toward being able to re-code the whole picture
with varying parameter (when token buffer is used).

Change-Id: Ia2538e2069a53c080e2ad248c18a1e04623a9304
Merge "(de)mux.h: wrap pseudo-code in /* */"
dwebp: use default dct_method

No significant speed diff was observed.
Avoids idct mismatch artifacts.

Change-Id: I9ca64d165d313f23b4aa231e7a97a20213ff86c7
Merge "use NULL for lf_stats_ testing, not bool"
remove the PACK() bit-packing tricks

was too smart for its own good :)
This is more ARM-friendly, since it removes a mult.

Change-Id: If146034c8efa2e71e3eaaf1230cb553884a42ebb
Merge "remove the PACK() bit-packing tricks"
multi-threaded segment analysis

When -mt is used, the analysis pass will be split in two
and each halves performed in parallel. This gives a 5%-9% speed-up.

This was a good occasion to revamp the iterator and analysis-loop
code. As a result, the default (non-mt) behaviour is a tad (~1%) faster.

Change-Id: Id0828c2ebe2e968db8ca227da80af591d6a4055f
up to 6% faster encoding with clang compiler

mostly by revamping the main loop of GetResidualCost() and avoiding some branches

Change-Id: Ib05763e18a6bf46c82dc3d5d1d8eb65e99474207
simplify VP8IteratorSaveBoundary() arg passing

we only need to save yuv_out_, so no need for the arg

Change-Id: I7bad5d910e81ed2eda5c9787821fd1cfe905bd92
fix compile error on ARM/gcc

use of uint8_t type was causing error like:
src/dsp/upsampling.c:223:1: internal compiler error: in vect_determine_vectorization_factor, at tree-vect-loop.c:349

with gcc 4.6.3

Change-Id: Ieb6189a1375c47fc4ff992e6c09b34a7f1f605da
Demux.h: Correct a method name reference

Change-Id: I5638a4e40d9fcb44860952028f8b5ef2ea78621d
Merge "simplify VP8IteratorSaveBoundary() arg passing"
encoder: misc rate-related fixes

* fix VP8FixedCostsI4ÆÅ table
   (the constant cost '211' was erronenously included)
* use the rd-score for '211' correctly (calling SetRDScore() for good)
* count partition0 bits separately during rd-opt

No meaningful difference in rd-curve.

Change-Id: I6c49a150cf28928d9a92c32fff097600d7145ca4
Merge "fix compile error on ARM/gcc"
enc/quant.c: silence a warning

score_t -> int: rd_i4.H contains a value from a uint16_t
lookup

Change-Id: I7227de2dfab74b4f796abbc47955197ffa0e6110