Tile structure support

109 views
Skip to first unread message

MistaED

unread,
Oct 9, 2011, 7:23:03 PM10/9/11
to WebP Discussion
Hi all,

I remember reading that one of the webp supported features was going
to be tile structure support. I'm curious, will this be supported
anytime soon? I have an idea to stream image data to OpenGL and I was
planning to use webp as a container (for instance, a large 8192x8192
file with 128x128 tiles). Currently I read that the advanced decoding
API can allow cropping and scaling at load time, but does this require
touching the entire webp file to gain access or will it only use
memory and decode what you specify? (Let's just say I access a
8192x8192 webp file but I only want to decode a 128x128 chunk out of
it, will this only read that part of the file or all of it to gain
access to this one part?)

Also, I found out the current format only supports up to 16383x16383,
will tile support increase this to something a lot bigger?

Kind regards
-Alex

Vikas Arora

unread,
Oct 10, 2011, 12:00:24 AM10/10/11
to webp-d...@webmproject.org
Hi Alex -

Recently we have pushed WebP-Mux (a RIFF based container) framework. (Refer: https://groups.google.com/a/webmproject.org/group/webp-discuss/browse_thread/thread/4ab76cbde89e6ade#).

One can use this WebP container to represent one large WebP file (like you mentioned here) via multiple tile-images of smaller size. Refer to MUX API (src/webp/mux.h) for creating such container file programmatically, else  use command line tool 'webpmux' for creating this WebP container file.

For rendering a specific tile, the client can map the tile position (x_offset, y_offset) to the appropriate tile number and get the specific tile-image without requiring to decode the full image.

Using tiles RIFF container, one can represent WebP image larger than the current limit of 16383x16383.

Please let us know if you require further help in exploring WebP-container for using tile in your client application.

Regards,
Vikas



--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/?hl=en.


MistaED

unread,
Oct 14, 2011, 11:39:32 PM10/14/11
to WebP Discussion
Hello Vikas thank you for your reply.

I've been studying the webp-mux code and this looks like it is exactly
what I was after, a way to manage a large webp image made of smaller
128x128 tiles. However one question I have is that the function
"WebPMux* mux = WebPMuxCreate(data, data_size, copy_data);" requires
(from what I understand of reading the webpmux program) that 'data'
needs to be the entire file loaded into memory. Could I get away with
just loading the header or will I need to do something else like
memory map this potentially large file so that the entire payload
doesn't need to be loaded into memory?

Kind regards,
-Alex

On Oct 10, 3:00 pm, Vikas Arora <vik...@google.com> wrote:
> Hi Alex -
>
> Recently we have pushed WebP-Mux (a RIFF based container) framework.
> (Refer:https://groups.google.com/a/webmproject.org/group/webp-discuss/browse...
> ).
> > To post to this group, send email to webp-disc...@webmproject.org.
> > To unsubscribe from this group, send email to
> > webp-discuss+unsubscr...@webmproject.org.

Vikas Arora

unread,
Oct 17, 2011, 1:39:05 AM10/17/11
to webp-d...@webmproject.org
Alex -

The current Image-Tile solution via WebP-Mux requires one to load the full encoded WebP image canvas to memory and decode the sub-rectangle (cropped-portion) of image on need basis. We haven't implemented memory-mapped or equivalent to do away the requirement to load the full encoded image canvas yet.

WebP image format will typically compresses the raw image bytes (3xWxH) to 0.05 bytes per pixel per color channel. So loading the full WebP encoded image-canvas and decoding (20X size) a portion should be amortized for most of the client applications.

Could be that for some application requirements like yours, further optimization should also be possible. Just out of curiosity, how big images (#pixels) your client application is dealing with ?

Regards,
Vikas

To post to this group, send email to webp-d...@webmproject.org.
To unsubscribe from this group, send email to webp-discuss...@webmproject.org.
Reply all
Reply to author
Forward
0 new messages