Commit Graph

1214 Commits

Author SHA1 Message Date
Vikas Arora
b7fb0ed567 Log warning for unsupported options for lossless.
Change-Id: I30d4e775959c7a4a8f5b649c8c90a4edb8cced47
2012-06-20 10:51:50 +05:30
James Zern
e1f769fe1c msvc: add intrinsic based BitsLog2Floor
Change-Id: Ic0c7d2f03e300c6699e130916a759403e672f9d8
2012-06-19 16:14:54 -07:00
Vikas Arora
8a69c7d8af Bug-fix: Clamp backward dist to 1.
Check for valid bounds on the 'dist' in backward reference case.
Clamp it to 1 in case of zero and negative values.

Change-Id: I78e956d4595955efa02b1f9628b475093f6ee001
2012-06-19 16:44:03 +05:30
James Zern
b5b6ac979f Merge "Bring the special writer 'WebPMemoryWriter' to public API" 2012-06-18 16:22:17 -07:00
pascal massimino
a6a1909fff Merge "Fix floating point exception with cwebp -progress" 2012-06-18 16:11:53 -07:00
James Zern
f2cee06708 Fix floating point exception with cwebp -progress
Adds a test of enc->mb_h_ to VP8IteratorProgress() to avoid a division
by zero. Fixes issue #121.

Original patch from even rouault (even dot rouault at gmail dot com).

Change-Id: Ie5fcc1821860c0a9366d5aa11f3aded4f5b98ed7
2012-06-18 15:43:28 -07:00
Pascal Massimino
91b7a8c754 Bring the special writer 'WebPMemoryWriter' to public API
=> WebPMemoryWriter, WebPMemoryWriterInit(), WebPMemoryWrite()

Change-Id: I142fb22b0290ece7a6f6d74f00964a2e9e58ec9b
2012-06-18 15:42:56 -07:00
Pascal Massimino
310e297205 support resize and crop for RGBA input
Change-Id: I19eac3fb4f8ecb973ff5872ac3a921f8947054bf
2012-06-18 15:20:46 -07:00
James Zern
a89835d33a Merge changes Ice662960,Ie8d7aa90,I2d996d5e,I01c04772
* changes:
  Manually number "chapters," as chapter numbers are used in the narrative.
  Re-wrap at <= 72 columns
  Apply inline emphasis and monospacing, per gdoc / PDF
  Incorporate gdoc changes through 2012-06-08
2012-06-18 14:19:58 -07:00
pascal massimino
ce614c0caf Merge "dec/vp8: avoid setting decoder status twice" 2012-06-18 14:12:21 -07:00
James Zern
900285dac3 dec/vp8: avoid setting decoder status twice
Has the potential of returning confusing USER_ABORT for bitstream errors
in some cases.

Change-Id: I358fdb0b36549179df6dc2a95c09a872bd35aa24
2012-06-18 14:10:01 -07:00
pascal massimino
8227adc878 Merge changes I6f02b0d0,I5cbc9c0a,I9dd9d4ed,Id684d2a1
* changes:
  Removed CodeRay syntax declarations ...
  Provide for code-block syntax highlighting.
  Replace high ASCII artifacts (curly quotes, etc.).
  Lossless WebP doc largely ported to markdown text.
2012-06-18 13:55:21 -07:00
James Zern
dcda59c12d Merge "demux: rename SetTile to SelectTile" 2012-06-18 13:50:45 -07:00
James Zern
622ef12ea5 demux: rename SetTile to SelectTile
Change-Id: I52b0b30578aeb77b71069f355c6b00901b948634
2012-06-18 13:49:41 -07:00
pascal massimino
81ebd37505 Merge "demux: add {Next,Prev}Frame" 2012-06-18 13:41:42 -07:00
James Zern
02dd37a2a3 demux: add {Next,Prev}Frame
Replaces WebPDemuxSetFrame().

Change-Id: I38cef0ebeabb5c2f164322502abe1780f7a65e06
2012-06-18 13:37:16 -07:00
pascal massimino
4b79fa5923 Merge "Limit the maximum size of huffman Image to 16MB." 2012-06-17 00:20:26 -07:00
Lou Quillio
9aa34b3438 Manually number "chapters," as chapter numbers are used in the narrative.
modified:   doc/webp-lossless-bitstream-spec.txt

Change-Id: Ice662960ff988a6ff577a8ca5a594e14ba69d4de
2012-06-15 14:54:19 -07:00
Lou Quillio
2a4c6c29a0 Re-wrap at <= 72 columns
modified:   doc/webp-lossless-bitstream-spec.txt

Change-Id: Ie8d7aa907dc20d941b74455f8657d4e1b4e23bbb
2012-06-15 14:54:13 -07:00
Lou Quillio
a45adc1918 Apply inline emphasis and monospacing, per gdoc / PDF
modified:   doc/webp-lossless-bitstream-spec.txt

Change-Id: I2d996d5e80967641e22997d4f6e7173b39df0978
2012-06-15 14:54:06 -07:00
Lou Quillio
91011206ad Incorporate gdoc changes through 2012-06-08
modified:   doc/webp-lossless-bitstream-spec.txt

Change-Id: I01c04772bff7e3d7d6f0b526949cd846b5a97c8d
2012-06-15 14:53:55 -07:00
Lou Quillio
7a18248716 Removed CodeRay syntax declarations ...
... as they became unnecessary when upstream (kramdown)
implemented LQ feature request:
17625c8082

Also updated (and simplified) syntax-highlighting instructions.

modified:   doc/README
modified:   doc/webp-lossless-bitstream-spec.txt
Change-Id: I6f02b0d0a69a4d1d96cb0f771936cbe9e2e6bbec
2012-06-15 14:53:39 -07:00
Lou Quillio
b3ec18c556 Provide for code-block syntax highlighting.
modified:   doc/README
modified:   doc/webp-lossless-bitstream-spec.txt

Change-Id: I5cbc9c0a4fbbcc049a4d792e1fac367d28acf4a6
2012-06-15 14:53:29 -07:00
Lou Quillio
709d770241 Replace high ASCII artifacts (curly quotes, etc.).
modified:   doc/webp-lossless-bitstream-spec.txt
Change-Id: I9dd9d4ed05c8f93d4cafadf8c99cc21c300a9299
2012-06-15 14:53:16 -07:00
Lou Quillio
930e8abbda Lossless WebP doc largely ported to markdown text.
Word-level formatting (italics, bold) remains to be done,
but awaits final author edits, to avoid rework.

modified:   doc/template.html
new file:   doc/webp-lossless-bitstream-spec.txt

Change-Id: Id684d2a10d02e197d660a960540fe83f87d317f2
2012-06-15 14:52:57 -07:00
James Zern
18cae37b91 msvc: silence some build warnings
these are related to the removal of USE_LOSSLESS_ENCODER

Change-Id: Ib0ca5bc2766c351130507bc2e657a034c8455b34
2012-06-13 13:51:50 -07:00
Vikas Arora
b3923084b9 Limit the maximum size of huffman Image to 16MB.
This limit corresponds to default histo_bits=3 for images upto sizes 400x400.
Any image higher than this dimension will bump up the histo_bits to 4 internally.

Change-Id: Ic8ba3dcd50e9c588cbbc4a0457289086498ff4ee
2012-06-13 13:27:43 +05:30
pascal massimino
f180df2afd Merge "libwebp/demux: add Frame/Chunk iteration" 2012-06-13 00:29:29 -07:00
James Zern
2bbe1c9aa0 Merge "Enable lossless encoder code" 2012-06-13 00:28:42 -07:00
pascal massimino
d0601b0107 Merge changes I1d97a633,I81c59093
* changes:
  libwebp/demux: add WebPDemuxGetI
  libwebp/demux: add extended format parsing
2012-06-13 00:28:25 -07:00
Pascal Massimino
78f3e34504 Enable lossless encoder code
Remove USE_LOSSLESS_ENCODER compile flag
Update Makefile.am and makefile.unix

Change-Id: If7080c4d8f37994c7c784730c5e547bb0a851455
2012-06-13 00:26:58 -07:00
pascal massimino
d974a9cc15 Merge "libwebp/demux: add simple format parsing" 2012-06-13 00:03:37 -07:00
pascal massimino
26bf223280 Merge "libwebp: add WebPDemux stub functions" 2012-06-12 23:57:18 -07:00
James Zern
2f66668882 Merge "modify WebPParseHeaders to allow reuse by GetFeatures" 2012-06-12 23:51:55 -07:00
James Zern
b402b1fbb9 libwebp/demux: add Frame/Chunk iteration
Change-Id: I2da68611b375de48391adcf446df31a93450c7d8
2012-06-12 23:45:11 -07:00
James Zern
ad9ada3b9f libwebp/demux: add WebPDemuxGetI
Enables queries for format flag, canvas width/height.

Change-Id: I1d97a633712141e42dfc86c95492eb6da5cefa01
2012-06-12 23:45:10 -07:00
James Zern
2f2d4d5889 libwebp/demux: add extended format parsing
Extends parser to support 'VP8X' and its components

Change-Id: I81c59093b02c7ad27810a7b0473129ea06f99952
2012-06-12 23:45:08 -07:00
James Zern
962dcef6a8 libwebp/demux: add simple format parsing
Adds image parsing / validation framework for 'VP8 '/'VP8L' files

Change-Id: I8b0a5d1f20d86ab137c881a01dba3275ea191aa4
2012-06-12 23:45:06 -07:00
James Zern
f8f94081be libwebp: add WebPDemux stub functions
beginning of a separate interface to demux webp files.

Change-Id: If8bf9c43defe5f6c8678afd03541f7cd8261c99a
2012-06-12 23:45:02 -07:00
pascal massimino
fb47bb5cf4 Merge "NumNamedElements() should take an enum param." 2012-06-11 00:23:39 -07:00
Vikas Arora
7c6898051e Fix asserts in Palette and BackwardReference code.
Fix inequality assertion on number of palette colors.
Fix inequality assertion test in BackwardReferencesHashChainFollowChosenPath.

Change-Id: Ie3242f1bbeaf96db91b839b6732ccce2634cebf3
2012-06-11 12:27:59 +05:30
Urvang Joshi
fbdcb7ea38 NumNamedElements() should take an enum param.
- Move TAG_ID to webp/mux.h
- Rename it to WebPChunkId
- Rename IDs to WEBP_CHUNK_<tag>
- Remove "name" param from ChunkInfo struct and related changes.
- Rename WebPMuxNumNamedElements to WebPMuxNumChunks().
- WebPMuxNumChunks() takes WebPChunkId as param.

Change-Id: Ic6546e4a9ab823b556cdbc600faa137076546a2b
2012-06-11 12:26:13 +05:30
James Zern
fb4943bdf9 modify WebPParseHeaders to allow reuse by GetFeatures
moves the implementation to ParseHeadersInternal. this also allows
decoding to start at a VP8X sub-chunk, e.g. 'ALPH'.

Change-Id: I06791f87d90f888de32746ecb02705e4b0ff227a
2012-06-08 14:55:14 -07:00
Pascal Massimino
3697b5ceb2 write an ad-hoc EncodeImageInternal variant
Used when we don't code a Huffman Image.
-> Simplify the code quite some because we don't have to
deal with special cases of histo bits

Change-Id: I0c3f46cbf3b501e021c093e07253e7404c01ff4f
2012-06-08 11:52:31 -07:00
Vikas Arora
eaee9e79f7 Bug-Fix: Decode small (less than 32 bytes) images.
ParseVP8X was checking for presence of extra 20 bytes (after RIFF header).
This check should not be executed for non-mux (non-VP8X) images.

Change-Id: I3fc89fa098ac0a53102e7bbf6c291269817c8e47
2012-06-08 14:30:56 +05:30
pascal massimino
0bceae488e Merge "cwebp: fix alpha reporting in stats output" 2012-06-07 21:27:02 -07:00
Vikas Arora
0424b1ef3b Rebase default encoding settings.
Updated histo_bits to 3 from 4 and changed the quality threshold for inner loop for HashChainFindCopy.
Impact: 0.5%-0.8% better bpp with 15%-20% hit on encoding throughput
at default encoding settings.

Change-Id: I316ef88403148b1e19036fa0817d944eb0301255
2012-06-08 09:18:15 +05:30
James Zern
c71ff9e359 cwebp: fix alpha reporting in stats output
Since
 437999f introduce a generic WebPPictureHasTransparency() function
lossy encodes will not encode alpha if the alpha channel is completely
opaque.

Change-Id: I1826669c3932483650d7f8ce806cfebd4e5225fc
2012-06-07 17:32:29 -07:00
pascal massimino
e2ffe446bd Merge "Stop indefinite recursion for Huffman Image." 2012-06-07 10:52:26 -07:00
Vikas Arora
70eb2bd687 Stop indefinite recursion for Huffman Image.
Ensure that the lossless bit-stream doesn't allow for such cases and
safe-gaurd decoder against indefinite recursion.

Change-Id: Ia6d7f519291de8739f79a977a5800982872aae71
2012-06-07 17:27:19 +05:30