Commit Graph

186 Commits

Author SHA1 Message Date
Pascal Massimino
44a09a3ccd add missing description of the alpha filtering methods
Change-Id: Id7bdf5e30121ce5d610b7fa00f64bcd2d7bed2bf
2012-07-10 19:50:30 -07:00
Urvang Joshi
135ca69eb7 WebP Container Spec:
Clarify that a file must contain at least one frame.

Change-Id: I7ecc97084498adc108275585d0c7d0aaa9f5c6ed
2012-07-04 17:28:17 +05:30
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
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
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
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
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
Lou Quillio
b7ac19fec9 Add kramdown version information to README
Example kramdown command line to apply syntax highlighting requires
kramdown latest. Command is slightly different for earlier versions.

modified:   doc/README

Change-Id: Icda1197436b5c5ed936ceff53c1dc51aa4ce409b
2012-06-20 14:17:36 -07:00
Lou Quillio
04e33f17de Edit for consistency, usage and grammar.
Substantial edit, though less than 100% thorough.  This
makes changes that are clearly safe, but avoids others
where my domain knowledge is incomplete and accuracy
might be compromised.

modified:   doc/webp-lossless-bitstream-spec.txt

Change-Id: I89361a2e1157b8d2e44a8b4f4603f65833f0c1e6
2012-06-20 10:08:53 -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
0ca170c2dd doc: update lossless pdf
Change-Id: I8c6d0e6fc21196f6dd239b21eda2097ba4ce2bba
2012-06-04 16:53:16 -07:00
Pascal Massimino
0862ac6e7e add a PDF of the lossless spec
(cherry picked from commit db9967748781d73832b3875db1dfcbefb180f7c9)

Change-Id: I5909abc48d9b4c4415f81a019681968f06d6a3d7
2012-06-04 16:51:39 -07:00
James Zern
88f41ec6ec doc: fix bit alignment in VP8X chunk
Change-Id: I7eaa7be48213642e3eceaaac95ad00952e085330
2012-05-24 12:33:48 -07:00
Pascal Massimino
42d61b6def update the spec for the lossy-alpha compression methods.
No further experiments are to be expected, so this is quite the
final format so far, pending supplemental feedbacks.

Change-Id: I2a3de025c90b7bb5fdd8792b2b2ccdc2e3753f56
2012-05-24 07:22:52 -07:00
Urvang Joshi
c975c44ea5 Alpha flag fix for lossless.
- Make sure alpha flag is set in case of a lossless file with VP8X chunk.
  The semantic of ALPHA_FLAG changes with this: it means the images
  contain alpha (rather than ALPH chunk in particular).
- Update the mux container spec to add 1-line description of alpha
  flag.
- Rename "HasLosslessImages()" to "MuxHasLosslessImages()", and other
  similar function renames.
- Rename FeatureFlags to WebPFeatureFlags
- Elaborated a comment for a special case.
- A misc comment fix.

Change-Id: If212ccf4338c125b4c71c10bf281a51b3ba7ff45
2012-05-24 11:35:12 +05:30
Pascal Massimino
638528cd1e bitstream update for lossy alpha compression
now, we only use 2 bits for the filtering method, and 2 bits
for the compression method.
There's two additional bits which are INFORMATIVE, to specify
whether the source has been pre-processed (level reduction)
during compression. This can be used at decompression time
for some post-processing (see DequantizeLevels()).

New relevant spec excerpt:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                      ChunkHeader('ALPH')                      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |Rsv| P | F | C |     Alpha Bitstream...                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Compression method (C): 2 bits

: The compression method used:

  * `0`: No compression.
  * `1`: Backward reference counts encoded with arithmetic encoder.

Filtering method (F): 2 bits

: The filtering method used:

  * `0`: None.
  * `1`: Horizontal filter.
  * `2`: Vertical filter.
  * `3`: Gradient filter.

Pre-processing (P): 2 bits

: These INFORMATIVE bits are used to signal the pre-processing that has
been performed during compression. The decoder can use this information to
e.g. dither the values or smooth the gradients prior to display.

  * `0`: no pre-processing
  * `1`: level reduction

Decoders are not required to use this information in any specified way.

Reserved (Rsv): 2 bits

: SHOULD be `0`.

Alpha bitstream: _Chunk Size_ - `1` bytes

: Encoded alpha bitstream.

This optional chunk contains encoded alpha data for a single tile.
Either **ALL or NONE** of the tiles must contain this chunk.

The alpha channel data is losslessly stored as raw data (when
compression method is '0') or compressed using the lossless format
(when the compression method is '1').

Change-Id: Ied8f5fb922707a953e6a2b601c69c73e552dda6b
2012-05-22 02:36:22 -07:00
James Zern
5249e94a22 doc: tile/alpha corrections
- the tile chunk size does not include the alpha or vp8 chunks that
  follow
- remove 'experimental' note from alpha section
- drop an unused term from the terminology section

Change-Id: I46f0fd610bbce579446e19339c3458dddfb595f7
2012-04-24 17:43:06 -07:00
James Zern
e9a7d145e7 Reformat container doc
- split the doc into sections for simple and extended format and move
  example layouts to the end.
- use ASCII tables to describe chunk formats
- attempt to consistently use MUST/SHOULD, etc.
- remove bold from most terms, but add them to definition lists which
  allow for the styling to be changed.

Change-Id: I93c1cd33bde9ccf0b265b202ec4182ce98fd6b48
2012-02-08 11:32:42 -08:00
James Zern
241ddd38e2 doc: delete mux container pdf
The source is now webp-container-spec.txt.

Change-Id: I43debf616b7eec774b5e1586c286974c7332fb48
2012-01-17 12:54:51 -08:00
James Zern
8b1ba272d2 doc: update VP8 decode guide link
The draft is now RFC6386.

Change-Id: Ief019357af5a5de9c6290cafd34db09d984f58aa
2012-01-17 12:52:27 -08:00
Urvang Joshi
dba37fea0e Update webp container spec with alpha filter options.
Change-Id: I032f350c8c698aeb139f7dd148f01a0a3b012b6d
2012-01-12 18:25:00 -08:00
Vikas Arora
a0ec9aace9 Update WebP encoder (cwebp) to support Alpha.
Updated cwebp (Webp Encoder) binary to support Alpha encoding.
Modified man page and WebP container spec appropriately.

Change-Id: I52f6a5cb3e870c386591e9a7776293fa6a8fb04b
2011-12-01 15:13:17 +05:30
Urvang Joshi
c398f59536 MUX API Updates
- Add alpha support in mux.
- Remove WebPMuxAddNamedData() and WebPMuxGetNamedData() APIs. Add WebPMuxSetImage(), WebPmuxGetImage() and WebPMuxDeleteImage() APIs instead.
- Refactor code using WebPImage struct.
- Corresponding changes in webpmux binary.
- WebPMuxSetImage()/AddFrame()/AddTile() can now work with data which starts from "RIFF...". This simplifies reading a single-image webp file and adding it as an image/frame/tile in mux.

Change-Id: I7d98a6407dfe55c84a682ef7e46bc622f5a6f8d9
2011-11-23 19:03:13 +05:30
Lou Quillio
868b96aef4 More aggressive copy-edit; add TODO; validate HTML5
Change-Id: I45e7fde3eb33067274b5d454451f1bf8785511fd
2011-10-12 15:54:02 -07:00
Lou Quillio
03bec9e0c0 Linewrap at 72 cols. Casual copy-edit.
Change-Id: Iebecff7eb0a64080eab456f903afacca178d9d59
2011-10-07 14:37:54 -07:00
Lou Quillio
2678d819a4 Restore (most) emphasis; add emphasis to normative
RFC 2119 terms (MUST, etc.)

Change-Id: Ia07a64dd4eadebfe9ba8a98a4eef613d1b5d614a
2011-10-07 14:31:43 -07:00
Lou Quillio
428674dad1 Basic container doc source clean-up; fix lists and pseudocode blocks.
Add some furniture (README, template).

Change-Id: Ida154a625fe7013a1a759d16f11fd7ccd867c25d
2011-10-07 14:28:18 -07:00
Lou Quillio
55be2cf878 Initial import of container spec document, from pdftotext transform.
new file:   doc/webp-container-spec.txt

Change-Id: I60b97d6f0219f0041c92b6d980cd8ebae8ae4ca5
2011-10-04 16:27:59 -07:00
Vikas Arora
f3bf4c769f Added Mux Container Spec & README for MUX-API.
Added the Mux Container Spec (RIFF structure) for the features supported
(Color Profile, XMP Metadata, Animation & Tiling) via WebP Mux. Also
added README file with example psudo code for using the Mux API(s) and a
short description on webpmux (comand line tool, planned to be pushed out
in subsequent Git change).

Change-Id: I87c322cada89955bd758dd524a862a8cbc407541
2011-09-30 10:51:35 +05:30