Issue 241 in webp: Incorrect flag details in WebP file header documentation?

18 views
Skip to first unread message

we...@googlecode.com

unread,
Feb 12, 2015, 11:05:29 AM2/12/15
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 241 by drewnoakes: Incorrect flag details in WebP file header
documentation?
https://code.google.com/p/webp/issues/detail?id=241

The documentation of the WebP container format here:

https://developers.google.com/speed/webp/docs/riff_container#extended_file_format

Shows:

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| WebP file header (12 bytes) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ChunkHeader('VP8X') |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Rsv|I|L|E|X|A|R| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Canvas Width Minus One | ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... Canvas Height Minus One |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Where the flags are:

I: ICC profile
L: Alpha
E: EXIF metadata
X: XMP metadata
A: Animation

However the project source code shows (in mux_types.h):

// VP8X Feature Flags.
typedef enum WebPFeatureFlags {
FRAGMENTS_FLAG = 0x00000001,
ANIMATION_FLAG = 0x00000002,
XMP_FLAG = 0x00000004,
EXIF_FLAG = 0x00000008,
ALPHA_FLAG = 0x00000010,
ICCP_FLAG = 0x00000020
} WebPFeatureFlags;

Does this differ across versions of the file format, or am I
misunderstanding the documentation?

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

we...@googlecode.com

unread,
Feb 12, 2015, 4:06:42 PM2/12/15
to webp-d...@webmproject.org

Comment #1 on issue 241 by jz...@google.com: Incorrect flag details in WebP
The bits in the image are in MSB order -- with the numbering starting
at '0' for the high order bit. This is pretty common in RFC(-like)
documents, but I don't think that's mentioned explicitly. The doc could use
an update.

we...@googlecode.com

unread,
Feb 13, 2015, 6:52:12 PM2/13/15
to webp-d...@webmproject.org
Updates:
Status: Started

Comment #2 on issue 241 by jz...@google.com: Incorrect flag details in WebP
I made an update to the document which has been merged. Thanks for the
report!
I'll close this once the copy on developers.google.com has been updated.

https://gerrit.chromium.org/gerrit/#/c/73776/
b510fbf doc/webp-container-spec: note MSB order for chunk diagrams

we...@googlecode.com

unread,
Feb 14, 2015, 5:06:55 AM2/14/15
to webp-d...@webmproject.org
Updates:
Status: Verified

Comment #3 on issue 241 by pascal.m...@gmail.com: Incorrect flag details in
doc page[1] has been refreshed. Thanks for the report!

[1] https://developers.google.com/speed/webp/docs/riff_container

we...@googlecode.com

unread,
Feb 14, 2015, 7:47:55 AM2/14/15
to webp-d...@webmproject.org

Comment #4 on issue 241 by drewnoakes: Incorrect flag details in WebP file
header documentation?
https://code.google.com/p/webp/issues/detail?id=241

Thanks for the clarification. MSb order does make more sense in the layout
diagram. My brain reassociated the given indices with the (more familiar to
me) LSb ordering.
Reply all
Reply to author
Forward
0 new messages