Commit Graph

19 Commits

Author SHA1 Message Date
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