Error in Webp VP8X header format

157 views
Skip to first unread message

Gonzalo Herrero

unread,
Oct 12, 2022, 12:13:31 PM10/12/22
to WebP Discussion
Hello, in:


The VP8X header format is declared as:

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

So it seems here that after 'VP8X' it comes two reserved bits and the ICCP and other flags. I think that that's not correct and after VP8X comes the 4 bytes with the VP8X chunk size. Maybe it's clear for some people cause all chunks' names must be followed by its size, but I think the image can cause confussion. Thanks.

James Zern

unread,
Oct 12, 2022, 5:47:17 PM10/12/22
to webp-d...@webmproject.org
Hi,

In isolation this can be confusing, but ChunkHeader is defined as both the fourcc and size earlier in the document, which is why it's illustrated as taking 8 bytes. Given we expanded the entry -- previously it took only one line, which caused its own confusion -- I don't know if there's much value in this aside from avoiding duplicating the size description. I'll take another look and maybe remove the indirection altogether.
Reply all
Reply to author
Forward
0 new messages