Pulled from the current HEAD (218c32e).
The history of this and related files is a bit entangled so rather
trying to split the changes and introduce some noise in master's history
we'll start with a fresh snapshot.
The file progression is still available in the experimental branch.
Change-Id: I40538799dbf999abb9408ac83f55b897d8e22498
Pulled from the current HEAD (218c32e).
The history of this and related files is a bit entangled so rather
trying to split the changes and introduce some noise in master's history
we'll start with a fresh snapshot.
The file progression is still available in the experimental branch.
Change-Id: Ie57be21bf50ad83808c72aeb5fc706d9954d01d8
Pulled from the current HEAD (218c32e).
The history of this and related files is a bit entangled so rather
trying to split the changes and introduce some noise in master's history
we'll start with a fresh snapshot.
The file progression is still available in the experimental branch.
Change-Id: Id879be453a94d9f44ec8d47747823ca7297ae008
by packing the symbol map more efficiently.
This is mainly useful in making it harder to generate invalid bitstream:
before this change, one could code the same symbol twice. Now, it's
impossible, since we code the position using empty symbol slots, instead
of total position.
* Fix the HasOnlyLeftChild() naming while at it.
Change-Id: I63c56c80a4f04a86ac83eded1e3306329815b6c9
group like parameters together in prototypes, comments, move variable
declarations closer to first use.
Change-Id: Idd6bd87d0366d783fed83f4dd21bd7968cbe6948
_byteswap_ulong is defined in stdlib.h, release builds seem to pull it
in through a different path.
Change-Id: I510d2624150f89a4a77734bf3dc5b4db60a4ba95
- const / move declarations closer to first use
- remove unnecessary ()s
- don't return int unnecessarily with internal Init/Release
- compact some lines
Change-Id: If7ab505e417221debc356f21f075506939110a84
A call to Append/Update would index the parts_ array w/-1 as num_parts_
had yet to be set by DecodePartition0. This would cause corruption
within the VP8Decoder member.
Fixes issue #106.
Change-Id: Ib9f2811594ff19e948a66fda862a4e0a384bb9aa
If the first call to WebPIUpdate contained all of partition 0, but not
enough to decode a macroblock the test for max macro block size could
fail (4096 bytes) due to a memory buffer offset not being updated.
This change offsets the buffer in the same manner as Append().
Fixes issue #105.
Change-Id: I90ca3d0dde92eedc076933b8349d2d297f2469e8
- remove some unused functions
- move global arrays from data to read only section
- explicitly cast malloc returns; not specifically necessary, but helps
show intent
- miscellaneous formatting
Change-Id: Ib15fe5b37fe6c29c369ad928bdc3a7290cd13c84
As with the loop filter, implementing this with intrinsics is difficult
because we require subscript access for reading and writing 32 bits at a
time.
Approximately 5% decode speed improvement. This could be increased by
exposing TransformOne and rewriting TransformTwo to only handle dual
IDCTs.
Change-Id: Idd409264ab5d154a537107a1d54b419a48f7c1a8
Add a dirty_ flag to keep track of updated probabilities and the need to
recompute the level costs.
This only makes a difference for "-m 2" method which was sub-optimal.
But it's overall cleaner to have this flag.
Change-Id: I21c71201e1d07a923d97a3adf2fbbd7d67d35433
This proved being ok, even for large pictures, provided one
takes care of overflow. When an overflow is bound to occur, the
counters are renormalized.
Overall, shaves ~12k of memory.
Change-Id: I2ba21a407964fe1a34c352371cba15166e0c4548
the p0 proba was incorrectly accumulated. Merging its contribution into
the LevelCost[] was creating more problems than anything (esp. with trellis)
so let's just not.
Change-Id: I4c07bfee471085df901228d97b20a4d9606ba44e
These will report the 7x7-averaged PSNR or SSIM, using the
new internal function WebPPictureDistortion().
This is for information only. These flags have no encoding impact.
+misc opportunistic cosmetics
Change-Id: I64c0a7eca679134d39062e438886274b22bb643f
to 'clean up' the fully-transparent area and make it more compressible
new cwebp flags: -alpha_cleanup (off by default, since gain is not 100% guaranteed)
Change-Id: I74d77e1915eee146584cd61c9c1132a41db922eb
gcc-4.0 defines __PIC__ but not __pic__. This leaves the test for
__pic__ should the inverse case exist.
Fixes issue #103; build failing with:
"error: can't find a register in class 'BREG' while reloading 'asm'"
Change-Id: Ia767a733de6ce0294146f9477ff9c46f0ebe13b0
Make sure chunk->data and wpi are not leaked by
MuxAddFrameTileInternal() in case of MEMORY_ERROR in ChunkSetNth().
Change-Id: Ie20e84b92f4bdcb7c3b94520f36b20dd2e730545
Add extern to kChunks[] in muxi.h.
Fixes:
ld: duplicate symbol _kChunks in .libs/muxinternal.o and .libs/muxedit.o
Change-Id: Ibeb060f7fdec5fe904097a2443f0cda2f7ede884
MAX_LEN -> max_len
This was sub-optimal at the end of the picture, when there's
less than MAX_LEN bytes left to match.
Change-Id: I5ebe1fca4e7c112dcd34748a082d1c97f95eb099
often reduces compressed size by ~10's of bytes
+ refactored / sped-up the prediction code (gradient: ~30% faster)
Change-Id: I26bd983655dad4f85d5c5ddc20a1980f384c4dd6
.. where only 2 filtering modes are potentially
tried, instead of all of them. This is fast than the exhaustive 'best'
mode, and not much worse.
Options for cwebp are:
-alpha_filter none
-alpha_filter fast (<- default)
-alpha_filter best (<- slow)
Change-Id: I8cb90ee11b8f981811e013ea4ad5bf72ba3ea7d4
Fix bug for Alpha data in RGBA_4444 color-mode.
The Alpha data is required to be clipped [0, 15] while
converting from 8 bits to 4 bits.
Change-Id: I80705d575c35121beb9633a05ec8823435c79586
Add predictive filtering option for Alpha plane.
Valid range for filter option is [0, 5] corresponding to prediction
methods none, horizontal, vertical, gradient & paeth filter.
The prediction method 5 will try all the prediction methods (0 to 4)
and pick the prediction method that gives best compression.
Change-Id: I9244d4a9c5017501a9696c7cec5045f04c16d49b
- 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
alpha information is not to be found at RIFF chunks level, not
in the VP8 bitstream (that was a tmp hack)
Change-Id: Idd1629c696b03c26f6f30650d7216f627f1761df
This speeds things up for long message, while not damaging
the stats too much for usual-sized cases
Change-Id: I3f45e28b771d701e2e1da11eb800de18c4ed12fc
- 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
Extend WebP Encode functionality to encode Alpha data and produce
bit-stream (RIFF+VP8X+ALPH+VP8) corresponding to WebP-Alpha.
Change-Id: I983b4cd97be94a86a8e6d03b3b9c728db851bf48